diff --git a/.gitignore b/.gitignore
index e8e4620..82b829a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
node_modules.zip
.DS_Store
node_modules/bcrypt.zip
+.env
+.env.prod
diff --git a/app.js b/app.js
index 05d83e3..2be76ce 100644
--- a/app.js
+++ b/app.js
@@ -1,5 +1,5 @@
const express = require('express')
-const mysql = require("mysql")
+const mysql = require("mysql2")
const dotenv = require('dotenv')
const app = express()
const path = require("path")
@@ -30,19 +30,10 @@ db.connect((error) => {
app.set('view engine', 'hbs');
app.use(express.static(publicDir));
app.use('/css', express.static(__dirname + '/node_modules/bootstrap/dist/css'));
+app.use('/css', express.static(__dirname + '/node_modules/@eonasdan/tempus-dominus/dist/css'));
+app.use('/js', express.static(__dirname + '/node_modules/@eonasdan/tempus-dominus/dist/js'));
app.use(bodyParser.urlencoded({extended: false}));
-app.use(express.json())
-
-
-async function recupListeSessions() {
- let today = functions.getNowDate("yyyymmdd");
-
- // On récupère la liste des sessions actives et pour lesquelles il reste de la place
- db.query('SELECT ID, topic, DATE_FORMAT(scheduled_on, "%d/%m/%Y") as "date", DATE_FORMAT(scheduled_on, "%Hh%i") as "heure", IF(nb_of_attended-nb_of_participants=0, true, false) as "maxAtteint" FROM session WHERE DATE_FORMAT(scheduled_on, "%Y%m%d") >= ?', [today], async (error, result) => {
- if(error){ console.log(error); }
- return result;
- });
-}
+app.use(bodyParser.json());
// ******************************************* Arrivée sur la page d'accueil *******************************************
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index fc7424c..5a97aef 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -4,6 +4,22 @@
"lockfileVersion": 3,
"requires": true,
"packages": {
+ "node_modules/@eonasdan/tempus-dominus": {
+ "version": "6.7.19",
+ "resolved": "https://registry.npmjs.org/@eonasdan/tempus-dominus/-/tempus-dominus-6.7.19.tgz",
+ "integrity": "sha512-rUHm1lTZLWdYUBAJJvic1p4Df/0h0rqV523r+DZtCkfty2ejf9NDsTYw3Vi0acSCt2kqwXom9R8jslzxxVcfOw==",
+ "funding": {
+ "url": "https://ko-fi.com/eonasdan"
+ },
+ "peerDependencies": {
+ "@popperjs/core": "^2.11.6"
+ },
+ "peerDependenciesMeta": {
+ "@popperjs/core\"": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@mapbox/node-pre-gyp": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
@@ -41,7 +57,6 @@
"version": "2.11.8",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
- "peer": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
@@ -53,12 +68,12 @@
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"node_modules/accepts": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
- "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "version": "1.2.13",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz",
+ "integrity": "sha512-R190A3EzrS4huFOVZajhXCYZt5p5yrkaQOB4nsWzfth0cYaDcSN5J86l58FJ1dt7igp37fB/QhnuFkGAJmr+eg==",
"dependencies": {
- "mime-types": "~2.1.34",
- "negotiator": "0.6.3"
+ "mime-types": "~2.1.6",
+ "negotiator": "0.5.3"
},
"engines": {
"node": ">= 0.6"
@@ -147,9 +162,9 @@
}
},
"node_modules/array-flatten": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.0.tgz",
+ "integrity": "sha512-B9Cdx2PIqexNnAWplLzRP89pa0vcEMkHGKr6/CY0ZzuI1Z5o6E392/7OtSFyrzEIXZ/pDdoGRoDaWJHg9mJMaA=="
},
"node_modules/balanced-match": {
"version": "1.0.2",
@@ -169,14 +184,6 @@
"node": ">= 10.0.0"
}
},
- "node_modules/bignumber.js": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
- "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==",
- "engines": {
- "node": "*"
- }
- },
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -186,12 +193,12 @@
}
},
"node_modules/body-parser": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
- "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
+ "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
"dependencies": {
"bytes": "3.1.2",
- "content-type": "~1.0.4",
+ "content-type": "~1.0.5",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
@@ -199,7 +206,7 @@
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
"qs": "6.11.0",
- "raw-body": "2.5.1",
+ "raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
},
@@ -320,12 +327,9 @@
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
},
"node_modules/content-disposition": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
- "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
- "dependencies": {
- "safe-buffer": "5.2.1"
- },
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz",
+ "integrity": "sha512-PWzG8GssMHTPSLBoOeK5MvPPJeWU5ZVX8omvJC16BUH/nUX6J/jM/hgm/mrPWzTXVV3B3OoBhFdHXyGLU4TgUw==",
"engines": {
"node": ">= 0.6"
}
@@ -339,11 +343,11 @@
}
},
"node_modules/cookie": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
- "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.3.tgz",
+ "integrity": "sha512-mWkFhcL+HVG1KjeCjEBVJJ7s4sAGMLiBDFSDs4bzzvgLZt7rW8BhP6XV/8b1+pNvx/skd3yYxPuaF3Z6LlQzyw==",
"engines": {
- "node": ">= 0.6"
+ "node": "*"
}
},
"node_modules/cookie-parser": {
@@ -371,11 +375,6 @@
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
},
- "node_modules/core-util-is": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
- "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
- },
"node_modules/dateformat": {
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz",
@@ -410,6 +409,14 @@
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
},
+ "node_modules/denque": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
+ "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -456,68 +463,101 @@
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
- "node_modules/encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz",
+ "integrity": "sha512-J5ahyCRC4liskWVAfkmosNWfG0eHQxI0W+Ko7k3cZaYVMfgt05dwZ68vw6S/TZM1BPvuTv3kq6CRCb7WWtBUVA=="
},
"node_modules/etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz",
+ "integrity": "sha512-Mbv5pNpLNPrm1b4rzZlZlfTRpdDr31oiD43N362sIyvSWVNu5Du33EcJGzvEV4YdYLuENB1HzND907cQkFmXNw==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/express": {
- "version": "4.18.2",
- "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
- "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
+ "version": "5.0.0-alpha.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-5.0.0-alpha.2.tgz",
+ "integrity": "sha512-dCv747cpHLEUBzHm5MR8y6eq43izDxmfWtpq1oaTY3vlW3nlLugPob1rzg7/mul/a7o/Svg6SNx/oc/3fz61mA==",
"dependencies": {
- "accepts": "~1.3.8",
- "array-flatten": "1.1.1",
- "body-parser": "1.20.1",
- "content-disposition": "0.5.4",
- "content-type": "~1.0.4",
- "cookie": "0.5.0",
+ "accepts": "~1.2.10",
+ "array-flatten": "1.1.0",
+ "content-disposition": "0.5.0",
+ "content-type": "~1.0.1",
+ "cookie": "0.1.3",
"cookie-signature": "1.0.6",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "finalhandler": "1.2.0",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "merge-descriptors": "1.0.1",
- "methods": "~1.1.2",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "path-to-regexp": "0.1.7",
- "proxy-addr": "~2.0.7",
- "qs": "6.11.0",
- "range-parser": "~1.2.1",
- "safe-buffer": "5.2.1",
- "send": "0.18.0",
- "serve-static": "1.15.0",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "type-is": "~1.6.18",
- "utils-merge": "1.0.1",
- "vary": "~1.1.2"
+ "debug": "~2.2.0",
+ "depd": "~1.0.1",
+ "escape-html": "1.0.2",
+ "etag": "~1.7.0",
+ "finalhandler": "0.4.0",
+ "fresh": "0.3.0",
+ "merge-descriptors": "1.0.0",
+ "methods": "~1.1.1",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.0",
+ "path-is-absolute": "1.0.0",
+ "path-to-regexp": "0.1.6",
+ "proxy-addr": "~1.0.8",
+ "qs": "4.0.0",
+ "range-parser": "~1.0.2",
+ "router": "~1.1.2",
+ "send": "0.13.0",
+ "serve-static": "~1.10.0",
+ "type-is": "~1.6.4",
+ "utils-merge": "1.0.0",
+ "vary": "~1.0.0"
},
"engines": {
"node": ">= 0.10.0"
}
},
+ "node_modules/express/node_modules/debug": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
+ "dependencies": {
+ "ms": "0.7.1"
+ }
+ },
+ "node_modules/express/node_modules/depd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz",
+ "integrity": "sha512-OEWAMbCkK9IWQ8pfTvHBhCSqHgR+sk5pbiYqq0FqfARG4Cy+cRsCbITx6wh5pcsmfBPiJAcbd98tfdz5fnBbag==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express/node_modules/ms": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
+ },
+ "node_modules/express/node_modules/on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/express/node_modules/path-is-absolute": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz",
+ "integrity": "sha512-hUUTsB/vByumPhn43R+Azhsx4TQPvyQqW+XyCR6UA8ae+FGIjf5Oygj6o/FYK4ZdwnrXth2eIBKk4YlrUU0ElQ==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/express/node_modules/qs": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz",
+ "integrity": "sha512-8MPmJ83uBOPsQj5tQCv4g04/nTiY+d17yl9o3Bw73vC6XlEm2POIRRlOgWJ8i74bkGLII670cDJJZkgiZ2sIkg=="
+ },
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -530,39 +570,60 @@
}
},
"node_modules/finalhandler": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
- "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz",
+ "integrity": "sha512-jJU2WE88OqUvwAIf/1K2G2fTdKKZ8LvSwYQyFFekDcmBnBmht38enbcmErnA7iNZktcEo/o2JAHYbe1QDOAgaA==",
"dependencies": {
- "debug": "2.6.9",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "statuses": "2.0.1",
+ "debug": "~2.2.0",
+ "escape-html": "1.0.2",
+ "on-finished": "~2.3.0",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
+ "node_modules/finalhandler/node_modules/debug": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
+ "dependencies": {
+ "ms": "0.7.1"
+ }
+ },
+ "node_modules/finalhandler/node_modules/ms": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
+ },
+ "node_modules/finalhandler/node_modules/on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/foreachasync": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
"integrity": "sha512-J+ler7Ta54FwwNcx6wQRDhTIbNeyDcARMkOcguEqnEdtm0jKvN3Li3PDAb2Du3ubJYEWfYL83XMROXdsXAXycw=="
},
"node_modules/forwarded": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
+ "integrity": "sha512-Ua9xNhH0b8pwE3yRbFfXJvfdWF0UHNCdeyb2sbi9Ul/M+r3PTdrz7Cv4SCfZRMjmzEM9PhraqfZFbGTIg3OMyA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fresh": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz",
+ "integrity": "sha512-akx5WBKAwMSg36qoHTuMMVncHWctlaDGslJASDYAhoLrzDUDCjZlOngNa/iC6lPm9aA0qk8pN5KnpmbJHSIIQQ==",
"engines": {
"node": ">= 0.6"
}
@@ -634,6 +695,14 @@
"node": ">=10"
}
},
+ "node_modules/generate-function": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
+ "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
+ "dependencies": {
+ "is-property": "^1.0.2"
+ }
+ },
"node_modules/get-intrinsic": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
@@ -858,9 +927,9 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/ipaddr.js": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
- "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz",
+ "integrity": "sha512-wBj+q+3uP78gMowwWgFLAYm/q4x5goyZmDsmuvyz+nd1u0D/ghgXXtc1OkgmTzSiWT101kiqGacwFk9eGQw6xQ==",
"engines": {
"node": ">= 0.10"
}
@@ -911,10 +980,15 @@
"node": ">=0.12.0"
}
},
- "node_modules/isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
+ "node_modules/is-property": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
+ "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
+ },
+ "node_modules/long": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
+ "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
},
"node_modules/lru-cache": {
"version": "6.0.0",
@@ -958,9 +1032,9 @@
}
},
"node_modules/merge-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.0.tgz",
+ "integrity": "sha512-YJiZmTZTkrqvgefMsWdioTKsZdHnfAhHHkEdPg+4PCqMJEGHQo5iJQjEbMv3XyBZ6y3Z2Rj1mqq1WNKq9e0yNw=="
},
"node_modules/methods": {
"version": "1.1.2",
@@ -971,14 +1045,11 @@
}
},
"node_modules/mime": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
+ "integrity": "sha512-sAaYXszED5ALBt665F0wMQCUXpGuZsGdopoqcHPdL39ZYdi7uHoZlhrfZfhv8WzivhBzr/oXwaj+yiK5wY8MXQ==",
"bin": {
"mime": "cli.js"
- },
- "engines": {
- "node": ">=4"
}
},
"node_modules/mime-db": {
@@ -1066,29 +1137,66 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
},
- "node_modules/mysql": {
- "version": "2.18.1",
- "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
- "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
+ "node_modules/mysql2": {
+ "version": "3.6.5",
+ "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.5.tgz",
+ "integrity": "sha512-pS/KqIb0xlXmtmqEuTvBXTmLoQ5LmAz5NW/r8UyQ1ldvnprNEj3P9GbmuQQ2J0A4LO+ynotGi6TbscPa8OUb+w==",
"dependencies": {
- "bignumber.js": "9.0.0",
- "readable-stream": "2.3.7",
- "safe-buffer": "5.1.2",
- "sqlstring": "2.3.1"
+ "denque": "^2.1.0",
+ "generate-function": "^2.3.1",
+ "iconv-lite": "^0.6.3",
+ "long": "^5.2.1",
+ "lru-cache": "^8.0.0",
+ "named-placeholders": "^1.1.3",
+ "seq-queue": "^0.0.5",
+ "sqlstring": "^2.3.2"
},
"engines": {
- "node": ">= 0.6"
+ "node": ">= 8.0"
}
},
- "node_modules/mysql/node_modules/safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ "node_modules/mysql2/node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/mysql2/node_modules/lru-cache": {
+ "version": "8.0.5",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz",
+ "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==",
+ "engines": {
+ "node": ">=16.14"
+ }
+ },
+ "node_modules/named-placeholders": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz",
+ "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==",
+ "dependencies": {
+ "lru-cache": "^7.14.1"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/named-placeholders/node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/negotiator": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
- "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz",
+ "integrity": "sha512-oXmnazqehLNFohqgLxRyUdOQU9/UX0NpCpsnbjWUjM62ZM8oSOXYZpHc68XR130ftPNano0oQXGdREAplZRhaQ==",
"engines": {
"node": ">= 0.6"
}
@@ -1247,9 +1355,9 @@
}
},
"node_modules/path-to-regexp": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.6.tgz",
+ "integrity": "sha512-Ut++lkiF1BogIUY+3SADhfDDdvzb8EOU/D8JutrlrfEuh+DGQbo5c78P96dSuapLEfeH7rpWhiBfJCDAGvSJVQ=="
},
"node_modules/picomatch": {
"version": "2.3.1",
@@ -1262,21 +1370,16 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/process-nextick-args": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
- },
"node_modules/proxy-addr": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.10.tgz",
+ "integrity": "sha512-iq6kR9KN32aFvXjDyC8nIrm203AHeIBPjL6dpaHgSdbpTO8KoPlD0xG92xwwtkCL9+yt1LE5VwpEk43TyP38Dg==",
"dependencies": {
- "forwarded": "0.2.0",
- "ipaddr.js": "1.9.1"
+ "forwarded": "~0.1.0",
+ "ipaddr.js": "1.0.5"
},
"engines": {
- "node": ">= 0.10"
+ "node": ">= 0.6"
}
},
"node_modules/pstree.remy": {
@@ -1299,17 +1402,17 @@
}
},
"node_modules/range-parser": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz",
+ "integrity": "sha512-nDsRrtIxVUO5opg/A8T2S3ebULVIfuh8ECbh4w3N4mWxIiT3QILDJDUQayPqm2e8Q8NUa0RSUkGCfe33AfjR3Q==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/raw-body": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
- "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
"dependencies": {
"bytes": "3.1.2",
"http-errors": "2.0.0",
@@ -1320,25 +1423,6 @@
"node": ">= 0.8"
}
},
- "node_modules/readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "node_modules/readable-stream/node_modules/safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
- },
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
@@ -1364,24 +1448,50 @@
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "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/router": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/router/-/router-1.1.5.tgz",
+ "integrity": "sha512-p0l/vfNVavaB7DXh3BxJv3NMZi3QKEiIYDnLVyOV5Bo/7Uo3YYk3z65T2IJHG7cfC9QV8UanGhHLOIfPoS9A5g==",
+ "dependencies": {
+ "array-flatten": "2.1.1",
+ "debug": "~2.2.0",
+ "methods": "~1.1.2",
+ "parseurl": "~1.3.1",
+ "path-to-regexp": "0.1.7",
+ "setprototypeof": "1.0.2",
+ "utils-merge": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/router/node_modules/array-flatten": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz",
+ "integrity": "sha512-Ylfqm/V1V/VKGazsJeRDZ31wV9gdNeK3ZsvwbYBAVSNgH8o8CMLfdx/ofn9pnMVsvTMfvC3yfcBYzGpD1vxnlw=="
+ },
+ "node_modules/router/node_modules/debug": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
+ "dependencies": {
+ "ms": "0.7.1"
+ }
+ },
+ "node_modules/router/node_modules/ms": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
+ },
+ "node_modules/router/node_modules/path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
+ },
+ "node_modules/router/node_modules/setprototypeof": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz",
+ "integrity": "sha512-mNRSo7UFE4c4tjxlZ3KxO5r+3oQUD1M/KXbp/XTwTwybL4VR9T8Ltmv5DvZX8iRz6C3hQmQftXEV0EmTKRV6mg=="
},
"node_modules/safer-buffer": {
"version": "2.1.2",
@@ -1403,47 +1513,180 @@
}
},
"node_modules/send": {
- "version": "0.18.0",
- "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
- "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.13.0.tgz",
+ "integrity": "sha512-zck2y84i0SbUUiwq2l5gGPNVpCplL48og5xIhFjNjQa09003YCTy6Vb3rKfVuG8W8PWNUtUOntjQEBdwkJ9oBw==",
"dependencies": {
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "mime": "1.6.0",
- "ms": "2.1.3",
- "on-finished": "2.4.1",
- "range-parser": "~1.2.1",
- "statuses": "2.0.1"
+ "debug": "~2.2.0",
+ "depd": "~1.0.1",
+ "destroy": "1.0.3",
+ "escape-html": "1.0.2",
+ "etag": "~1.7.0",
+ "fresh": "0.3.0",
+ "http-errors": "~1.3.1",
+ "mime": "1.3.4",
+ "ms": "0.7.1",
+ "on-finished": "~2.3.0",
+ "range-parser": "~1.0.2",
+ "statuses": "~1.2.1"
},
"engines": {
"node": ">= 0.8.0"
}
},
+ "node_modules/send/node_modules/debug": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
+ "dependencies": {
+ "ms": "0.7.1"
+ }
+ },
+ "node_modules/send/node_modules/depd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz",
+ "integrity": "sha512-OEWAMbCkK9IWQ8pfTvHBhCSqHgR+sk5pbiYqq0FqfARG4Cy+cRsCbITx6wh5pcsmfBPiJAcbd98tfdz5fnBbag==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/send/node_modules/destroy": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz",
+ "integrity": "sha512-KB/AVLKRwZPOEo6/lxkDJ+Bv3jFRRrhmnRMPvpWwmIfUggpzGkQBqolyo8FRf833b/F5rzmy1uVN3fHBkjTxgw=="
+ },
+ "node_modules/send/node_modules/http-errors": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz",
+ "integrity": "sha512-gMygNskMurDCWfoCdyh1gOeDfSbkAHXqz94QoPj5IHIUjC/BG8/xv7FSEUr7waR5RcAya4j58bft9Wu/wHNeXA==",
+ "dependencies": {
+ "inherits": "~2.0.1",
+ "statuses": "1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/send/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
+ },
+ "node_modules/send/node_modules/on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/send/node_modules/statuses": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz",
+ "integrity": "sha512-pVEuxHdSGrt8QmQ3LOZXLhSA6MP/iPqKzZeO6Squ7PNGkA/9MBsSfV0/L+bIxkoDmjF4tZcLpcVq/fkqoHvuKg=="
+ },
+ "node_modules/seq-queue": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
+ "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
},
"node_modules/serve-static": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
- "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "version": "1.10.3",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.10.3.tgz",
+ "integrity": "sha512-ScsFovjz3Db+vGgpofR/U8p8UULEcGV9akqyo8TQ1mMnjcxemE7Y5Muo+dvy3tJLY/doY2v1H61eCBMYGmwfrA==",
"dependencies": {
- "encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
- "parseurl": "~1.3.3",
- "send": "0.18.0"
+ "parseurl": "~1.3.1",
+ "send": "0.13.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
+ "node_modules/serve-static/node_modules/debug": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
+ "dependencies": {
+ "ms": "0.7.1"
+ }
+ },
+ "node_modules/serve-static/node_modules/depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-static/node_modules/destroy": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+ "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg=="
+ },
+ "node_modules/serve-static/node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ },
+ "node_modules/serve-static/node_modules/http-errors": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz",
+ "integrity": "sha512-gMygNskMurDCWfoCdyh1gOeDfSbkAHXqz94QoPj5IHIUjC/BG8/xv7FSEUr7waR5RcAya4j58bft9Wu/wHNeXA==",
+ "dependencies": {
+ "inherits": "~2.0.1",
+ "statuses": "1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-static/node_modules/ms": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
+ },
+ "node_modules/serve-static/node_modules/on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/serve-static/node_modules/send": {
+ "version": "0.13.2",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.13.2.tgz",
+ "integrity": "sha512-cQ0rmXHrdO2Iof08igV2bG/yXWD106ANwBg6DkGQNT2Vsznbgq6T0oAIQboy1GoFsIuy51jCim26aA9tj3Z3Zg==",
+ "dependencies": {
+ "debug": "~2.2.0",
+ "depd": "~1.1.0",
+ "destroy": "~1.0.4",
+ "escape-html": "~1.0.3",
+ "etag": "~1.7.0",
+ "fresh": "0.3.0",
+ "http-errors": "~1.3.1",
+ "mime": "1.3.4",
+ "ms": "0.7.1",
+ "on-finished": "~2.3.0",
+ "range-parser": "~1.0.3",
+ "statuses": "~1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/serve-static/node_modules/statuses": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz",
+ "integrity": "sha512-pVEuxHdSGrt8QmQ3LOZXLhSA6MP/iPqKzZeO6Squ7PNGkA/9MBsSfV0/L+bIxkoDmjF4tZcLpcVq/fkqoHvuKg=="
+ },
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
@@ -1506,9 +1749,9 @@
}
},
"node_modules/sqlstring": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
- "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==",
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
+ "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
"engines": {
"node": ">= 0.6"
}
@@ -1663,9 +1906,9 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"node_modules/utils-merge": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz",
+ "integrity": "sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ==",
"engines": {
"node": ">= 0.4.0"
}
@@ -1683,9 +1926,9 @@
}
},
"node_modules/vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz",
+ "integrity": "sha512-yNsH+tC0r8quK2tg/yqkXqqaYzeKTkSqQ+8T6xCoWgOi/bU/omMYz+6k+I91JJJDeltJzI7oridTOq6OYkY0Tw==",
"engines": {
"node": ">= 0.8"
}
diff --git a/node_modules/@eonasdan/tempus-dominus/LICENSE b/node_modules/@eonasdan/tempus-dominus/LICENSE
new file mode 100644
index 0000000..dcc3b2d
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2021 Jonathan Peterson (@Eonasdan)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@eonasdan/tempus-dominus/README.md b/node_modules/@eonasdan/tempus-dominus/README.md
new file mode 100644
index 0000000..80f4593
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/README.md
@@ -0,0 +1,31 @@
+[](https://ko-fi.com/R6R53OEFF)
+
+# Tempus Dominus Date/Time Picker v6.7.19
+
+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.
+
+# Developers
+
+## Building
+
+Run `npm i` to install needed packages.
+
+The docs folder contains the generated documentation site, don't modify this directly as it will be overwritten on build. The dist folder contains the built js/css files.
+
+## Running
+
+You can run `npm run serve` which will start a web server. Navigate to `http://localhost:3001/` to view the docs.
+
+## Watching for changes
+
+Do not run `npm run serve` at the same time.
+
+Run `npm start`. This runs web server, the build and watchers for the docs, styles, and typescript.
+
+## Where do you use this?
+
+I'd love to know if your public site is using this plugin and list your logo on the documentation site. Leave [create a discussion](https://github.com/Eonasdan/tempus-dominus/discussions/categories/show-your-love) and let me know.
+
+## Priority support is available at an hourly rate.
+
+If you have an urgent request, bug or need installation help, please contact in the discord server.
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css b/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css
new file mode 100644
index 0000000..2c830b1
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css
@@ -0,0 +1,700 @@
+.visually-hidden, .tempus-dominus-widget [data-action]::after {
+ position: absolute !important;
+ width: 1px !important;
+ height: 1px !important;
+ padding: 0 !important;
+ margin: -1px !important;
+ overflow: hidden !important;
+ clip: rect(0, 0, 0, 0) !important;
+ white-space: nowrap !important;
+ border: 0 !important;
+}
+
+.tempus-dominus-widget {
+ list-style: none;
+ padding: 4px;
+ width: 19rem;
+ border-radius: 4px;
+ display: none;
+ z-index: 9999;
+ box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
+}
+.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.show.date-container {
+ min-height: 315px;
+}
+.tempus-dominus-widget.show.time-container {
+ min-height: 217px;
+}
+.tempus-dominus-widget .td-collapse:not(.show) {
+ display: none;
+}
+.tempus-dominus-widget .td-collapsing {
+ height: 0;
+ overflow: hidden;
+ transition: height 0.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 {
+ width: 54px;
+ font-weight: bold;
+ font-size: 1.2em;
+ margin: 0;
+}
+.tempus-dominus-widget button[data-action] {
+ padding: 6px;
+}
+.tempus-dominus-widget .toggleMeridiem {
+ text-align: center;
+ height: 38px;
+}
+.tempus-dominus-widget .calendar-header {
+ display: grid;
+ grid-template-areas: "a a a";
+ margin-bottom: 10px;
+ font-weight: bold;
+}
+.tempus-dominus-widget .calendar-header .next {
+ text-align: right;
+ padding-right: 10px;
+}
+.tempus-dominus-widget .calendar-header .previous {
+ text-align: left;
+ padding-left: 10px;
+}
+.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 {
+ border-radius: 999px;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ display: flex;
+}
+.tempus-dominus-widget .date-container-days {
+ display: grid;
+ grid-template-areas: "a a a a a a a";
+ grid-auto-rows: 40px;
+ grid-auto-columns: 14.2857142857%;
+}
+.tempus-dominus-widget .date-container-days .range-in {
+ background-color: #01419e !important;
+ border: none;
+ border-radius: 0 !important;
+ box-shadow: -5px 0 0 #01419e, 5px 0 0 #01419e;
+}
+.tempus-dominus-widget .date-container-days .range-end {
+ border-radius: 0 50px 50px 0 !important;
+}
+.tempus-dominus-widget .date-container-days .range-start {
+ border-radius: 50px 0 0 50px !important;
+}
+.tempus-dominus-widget .date-container-days .dow {
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+}
+.tempus-dominus-widget .date-container-days .cw {
+ width: 90%;
+ height: 90%;
+ align-items: center;
+ justify-content: center;
+ display: flex;
+ font-size: 0.8em;
+ line-height: 20px;
+ cursor: default;
+}
+.tempus-dominus-widget .date-container-decades,
+.tempus-dominus-widget .date-container-years,
+.tempus-dominus-widget .date-container-months {
+ display: grid;
+ grid-template-areas: "a a a";
+ grid-auto-rows: calc((19rem - 8px) / 7);
+}
+.tempus-dominus-widget .time-container-hour,
+.tempus-dominus-widget .time-container-minute,
+.tempus-dominus-widget .time-container-second {
+ display: grid;
+ grid-template-areas: "a a a a";
+ grid-auto-rows: calc((19rem - 8px) / 7);
+}
+.tempus-dominus-widget .time-container-clock {
+ display: grid;
+ grid-auto-rows: calc((19rem - 8px) / 7);
+}
+.tempus-dominus-widget .time-container-clock .no-highlight {
+ width: 90%;
+ height: 90%;
+ align-items: center;
+ justify-content: center;
+ display: flex;
+}
+.tempus-dominus-widget .date-container-decades div:not(.no-highlight),
+.tempus-dominus-widget .date-container-years div:not(.no-highlight),
+.tempus-dominus-widget .date-container-months div:not(.no-highlight),
+.tempus-dominus-widget .date-container-days 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) {
+ width: 90%;
+ height: 90%;
+ border-radius: 999px;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ display: flex;
+}
+.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-years div:not(.no-highlight).disabled,
+.tempus-dominus-widget .date-container-years 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-days div:not(.no-highlight).disabled,
+.tempus-dominus-widget .date-container-days 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-decades div:not(.no-highlight).today,
+.tempus-dominus-widget .date-container-years div:not(.no-highlight).today,
+.tempus-dominus-widget .date-container-months div:not(.no-highlight).today,
+.tempus-dominus-widget .date-container-days 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-decades div:not(.no-highlight).today:before,
+.tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before,
+.tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before,
+.tempus-dominus-widget .date-container-days 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 {
+ content: "";
+ display: inline-block;
+ border: solid transparent;
+ border-width: 0 0 7px 7px;
+ position: absolute;
+ bottom: 6px;
+ right: 6px;
+}
+.tempus-dominus-widget .time-container {
+ margin-bottom: 0.5rem;
+}
+.tempus-dominus-widget button {
+ display: inline-block;
+ font-weight: 400;
+ line-height: 1.5;
+ text-align: center;
+ text-decoration: none;
+ vertical-align: middle;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ border-radius: 0.25rem;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+.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=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=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=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] {
+ pointer-events: none;
+ cursor: default;
+}
+.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=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=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=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 {
+ color: #000;
+ background-color: #fff;
+}
+.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, 0.5);
+}
+.tempus-dominus-widget.light .date-container-days .cw {
+ color: rgba(0, 0, 0, 0.38);
+}
+.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight):hover,
+.tempus-dominus-widget.light .date-container-years div:not(.no-highlight):hover,
+.tempus-dominus-widget.light .date-container-months div:not(.no-highlight):hover,
+.tempus-dominus-widget.light .date-container-days 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-decades div:not(.no-highlight).active,
+.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active,
+.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active,
+.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active,
+.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight),
+.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight),
+.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight),
+.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, 0.25);
+}
+.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-end:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-end:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-end:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-end:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.old,
+.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-years .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.new,
+.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-years .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.old,
+.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-months .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.new,
+.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-months .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.old,
+.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.new,
+.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.old,
+.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.new,
+.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.old,
+.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.new,
+.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.old,
+.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.new,
+.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.old,
+.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-second .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.new,
+.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-second .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).new {
+ color: #fff;
+}
+.tempus-dominus-widget.light .date-container-decades 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 .date-container-months div:not(.no-highlight).active.today:before,
+.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.today:before,
+.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).today:before,
+.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).today:before,
+.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).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-decades div:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).new,
+.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).old,
+.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).new,
+.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).old,
+.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).new {
+ color: rgba(0, 0, 0, 0.38);
+}
+.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-years div:not(.no-highlight).disabled,
+.tempus-dominus-widget.light .date-container-years 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-days div:not(.no-highlight).disabled,
+.tempus-dominus-widget.light .date-container-days 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-decades div:not(.no-highlight).today:before,
+.tempus-dominus-widget.light .date-container-years 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-days 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, 0.2);
+}
+.tempus-dominus-widget.light button {
+ color: #fff;
+ background-color: #0d6efd;
+ border-color: #0d6efd;
+}
+.tempus-dominus-widget.dark {
+ color: #e3e3e3;
+ background-color: #1b1b1b;
+}
+.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: rgb(35, 38, 39);
+}
+.tempus-dominus-widget.dark .date-container-days .dow {
+ color: rgba(232, 230, 227, 0.5);
+}
+.tempus-dominus-widget.dark .date-container-days .range-in {
+ background-color: #0071c7 !important;
+ box-shadow: -5px 0 0 #0071c7, 5px 0 0 #0071c7;
+}
+.tempus-dominus-widget.dark .date-container-days .cw {
+ color: rgba(232, 230, 227, 0.38);
+}
+.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight):hover,
+.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight):hover,
+.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight):hover,
+.tempus-dominus-widget.dark .date-container-days 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: rgb(35, 38, 39);
+}
+.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active,
+.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active,
+.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active,
+.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active,
+.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight),
+.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight),
+.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight),
+.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 rgba(232, 230, 227, 0.25);
+}
+.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-end:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-end:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-end:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-end:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.old,
+.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.new,
+.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.old,
+.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.new,
+.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.old,
+.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.new,
+.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.old,
+.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.new,
+.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.old,
+.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.new,
+.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.old,
+.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.new,
+.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.old,
+.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.new,
+.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).new {
+ color: #fff;
+}
+.tempus-dominus-widget.dark .date-container-decades 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 .date-container-months div:not(.no-highlight).active.today:before,
+.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.today:before,
+.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).today:before,
+.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).today:before,
+.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).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-decades div:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).new,
+.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).old,
+.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).new,
+.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).old,
+.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).new {
+ color: rgba(232, 230, 227, 0.38);
+}
+.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-years div:not(.no-highlight).disabled,
+.tempus-dominus-widget.dark .date-container-years 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-days div:not(.no-highlight).disabled,
+.tempus-dominus-widget.dark .date-container-days 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-decades div:not(.no-highlight).today:before,
+.tempus-dominus-widget.dark .date-container-years 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-days 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: rgba(232, 230, 227, 0.2);
+}
+.tempus-dominus-widget.dark button {
+ color: #fff;
+ background-color: #4db2ff;
+ border-color: #4db2ff;
+}
+/*# sourceMappingURL=tempus-dominus.css.map */
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css.map b/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css.map
new file mode 100644
index 0000000..7564a06
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["tempus-dominus.scss"],"names":[],"mappings":"AAAA;EACE,6BAA6B;EAC7B,qBAAqB;EACrB,sBAAsB;EACtB,qBAAqB;EACrB,uBAAuB;EACvB,2BAA2B;EAC3B,iCAAiC;EACjC,8BAA8B;EAC9B,oBAAoB;AACtB;;AAEA;EACE,gBAAgB;EAChB,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,aAAa;EACb,gHAAgH;AAClH;AACA;EACE,YAAY;AACd;AACA;EACE,wBAAwB;EACxB,sCAAsC;AACxC;AACA;EACE,eAAe;AACjB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,iBAAiB;AACnB;AACA;EACE,iBAAiB;AACnB;AACA;EACE,aAAa;AACf;AACA;EACE,SAAS;EACT,gBAAgB;EAChB,6BAA6B;AAC/B;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,UAAU;AACZ;AACA;EACE,gBAAgB;AAClB;AACA;;;EAGE,WAAW;EACX,iBAAiB;EACjB,gBAAgB;EAChB,SAAS;AACX;AACA;EACE,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,aAAa;EACb,4BAA4B;EAC5B,mBAAmB;EACnB,iBAAiB;AACnB;AACA;EACE,iBAAiB;EACjB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,kBAAkB;AACpB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,aAAa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EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;AACvB","file":"tempus-dominus.css","sourcesContent":[".visually-hidden, .tempus-dominus-widget [data-action]::after {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.tempus-dominus-widget {\n list-style: none;\n padding: 4px;\n width: 19rem;\n border-radius: 4px;\n display: none;\n z-index: 9999;\n box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);\n}\n.tempus-dominus-widget.calendarWeeks {\n width: 21rem;\n}\n.tempus-dominus-widget.calendarWeeks .date-container-days {\n grid-auto-columns: 12.5%;\n grid-template-areas: \"a a a a a a a a\";\n}\n.tempus-dominus-widget [data-action] {\n cursor: pointer;\n}\n.tempus-dominus-widget [data-action]::after {\n content: attr(title);\n}\n.tempus-dominus-widget [data-action].disabled, .tempus-dominus-widget [data-action].disabled:hover {\n background: none;\n cursor: not-allowed;\n}\n.tempus-dominus-widget .arrow {\n display: none;\n}\n.tempus-dominus-widget.show {\n display: block;\n}\n.tempus-dominus-widget.show.date-container {\n min-height: 315px;\n}\n.tempus-dominus-widget.show.time-container {\n min-height: 217px;\n}\n.tempus-dominus-widget .td-collapse:not(.show) {\n display: none;\n}\n.tempus-dominus-widget .td-collapsing {\n height: 0;\n overflow: hidden;\n transition: height 0.35s ease;\n}\n@media (min-width: 576px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n@media (min-width: 768px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n@media (min-width: 992px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n.tempus-dominus-widget.timepicker-sbs .td-row {\n display: flex;\n}\n.tempus-dominus-widget.timepicker-sbs .td-row .td-half {\n flex: 0 0 auto;\n width: 50%;\n}\n.tempus-dominus-widget div[data-action]:active {\n box-shadow: none;\n}\n.tempus-dominus-widget .timepicker-hour,\n.tempus-dominus-widget .timepicker-minute,\n.tempus-dominus-widget .timepicker-second {\n width: 54px;\n font-weight: bold;\n font-size: 1.2em;\n margin: 0;\n}\n.tempus-dominus-widget button[data-action] {\n padding: 6px;\n}\n.tempus-dominus-widget .toggleMeridiem {\n text-align: center;\n height: 38px;\n}\n.tempus-dominus-widget .calendar-header {\n display: grid;\n grid-template-areas: \"a a a\";\n margin-bottom: 10px;\n font-weight: bold;\n}\n.tempus-dominus-widget .calendar-header .next {\n text-align: right;\n padding-right: 10px;\n}\n.tempus-dominus-widget .calendar-header .previous {\n text-align: left;\n padding-left: 10px;\n}\n.tempus-dominus-widget .calendar-header .picker-switch {\n text-align: center;\n}\n.tempus-dominus-widget .toolbar {\n display: grid;\n grid-auto-flow: column;\n grid-auto-rows: 40px;\n}\n.tempus-dominus-widget .toolbar div {\n border-radius: 999px;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n display: flex;\n}\n.tempus-dominus-widget .date-container-days {\n display: grid;\n grid-template-areas: \"a a a a a a a\";\n grid-auto-rows: 40px;\n grid-auto-columns: 14.2857142857%;\n}\n.tempus-dominus-widget .date-container-days .range-in {\n background-color: #01419e !important;\n border: none;\n border-radius: 0 !important;\n box-shadow: -5px 0 0 #01419e, 5px 0 0 #01419e;\n}\n.tempus-dominus-widget .date-container-days .range-end {\n border-radius: 0 50px 50px 0 !important;\n}\n.tempus-dominus-widget .date-container-days .range-start {\n border-radius: 50px 0 0 50px !important;\n}\n.tempus-dominus-widget .date-container-days .dow {\n align-items: center;\n justify-content: center;\n text-align: center;\n}\n.tempus-dominus-widget .date-container-days .cw {\n width: 90%;\n height: 90%;\n align-items: center;\n justify-content: center;\n display: flex;\n font-size: 0.8em;\n line-height: 20px;\n cursor: default;\n}\n.tempus-dominus-widget .date-container-decades,\n.tempus-dominus-widget .date-container-years,\n.tempus-dominus-widget .date-container-months {\n display: grid;\n grid-template-areas: \"a a a\";\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-hour,\n.tempus-dominus-widget .time-container-minute,\n.tempus-dominus-widget .time-container-second {\n display: grid;\n grid-template-areas: \"a a a a\";\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-clock {\n display: grid;\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-clock .no-highlight {\n width: 90%;\n height: 90%;\n align-items: center;\n justify-content: center;\n display: flex;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight),\n.tempus-dominus-widget .date-container-years div:not(.no-highlight),\n.tempus-dominus-widget .date-container-months div:not(.no-highlight),\n.tempus-dominus-widget .date-container-days div:not(.no-highlight),\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight),\n.tempus-dominus-widget .time-container-hour div:not(.no-highlight),\n.tempus-dominus-widget .time-container-minute div:not(.no-highlight),\n.tempus-dominus-widget .time-container-second div:not(.no-highlight) {\n width: 90%;\n height: 90%;\n border-radius: 999px;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n display: flex;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled,\n.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled,\n.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled,\n.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled,\n.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled,\n.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled,\n.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover {\n background: none;\n cursor: not-allowed;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today,\n.tempus-dominus-widget .date-container-years div:not(.no-highlight).today,\n.tempus-dominus-widget .date-container-months div:not(.no-highlight).today,\n.tempus-dominus-widget .date-container-days div:not(.no-highlight).today,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today,\n.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today,\n.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today,\n.tempus-dominus-widget .time-container-second div:not(.no-highlight).today {\n position: relative;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before,\n.tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before,\n.tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before,\n.tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before,\n.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before,\n.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before,\n.tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before {\n content: \"\";\n display: inline-block;\n border: solid transparent;\n border-width: 0 0 7px 7px;\n position: absolute;\n bottom: 6px;\n right: 6px;\n}\n.tempus-dominus-widget .time-container {\n margin-bottom: 0.5rem;\n}\n.tempus-dominus-widget button {\n display: inline-block;\n font-weight: 400;\n line-height: 1.5;\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n border-radius: 0.25rem;\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n}\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod] {\n pointer-events: none;\n cursor: default;\n}\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]:hover {\n background: none;\n}\n.tempus-dominus-widget.light {\n color: #000;\n background-color: #fff;\n}\n.tempus-dominus-widget.light [data-action].disabled, .tempus-dominus-widget.light [data-action].disabled:hover {\n color: #6c757d;\n}\n.tempus-dominus-widget.light .toolbar div:hover {\n background: #e9ecef;\n}\n.tempus-dominus-widget.light .date-container-days .dow {\n color: rgba(0, 0, 0, 0.5);\n}\n.tempus-dominus-widget.light .date-container-days .cw {\n color: rgba(0, 0, 0, 0.38);\n}\n.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight):hover,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight):hover,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight):hover,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight):hover,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight):hover,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight):hover,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight):hover,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight):hover {\n background: #e9ecef;\n}\n.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active,\n.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight),\n.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight),\n.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight),\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active {\n background-color: #0d6efd;\n color: #fff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-end:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-end:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-end:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-end:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.old,\n.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-years .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.new,\n.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-years .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.old,\n.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-months .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.new,\n.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-months .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.old,\n.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.new,\n.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.old,\n.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.new,\n.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.old,\n.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.new,\n.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.old,\n.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.new,\n.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.old,\n.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-second .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.new,\n.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-second .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).new {\n color: #fff;\n}\n.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.today:before {\n border-bottom-color: #fff;\n}\n.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).new,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).old,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).new,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).old,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).new {\n color: rgba(0, 0, 0, 0.38);\n}\n.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,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled:hover {\n color: #6c757d;\n}\n.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).today:before,\n.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).today:before {\n border-bottom-color: #0d6efd;\n border-top-color: rgba(0, 0, 0, 0.2);\n}\n.tempus-dominus-widget.light button {\n color: #fff;\n background-color: #0d6efd;\n border-color: #0d6efd;\n}\n.tempus-dominus-widget.dark {\n color: #e3e3e3;\n background-color: #1b1b1b;\n}\n.tempus-dominus-widget.dark [data-action].disabled, .tempus-dominus-widget.dark [data-action].disabled:hover {\n color: #6c757d;\n}\n.tempus-dominus-widget.dark .toolbar div:hover {\n background: rgb(35, 38, 39);\n}\n.tempus-dominus-widget.dark .date-container-days .dow {\n color: rgba(232, 230, 227, 0.5);\n}\n.tempus-dominus-widget.dark .date-container-days .range-in {\n background-color: #0071c7 !important;\n box-shadow: -5px 0 0 #0071c7, 5px 0 0 #0071c7;\n}\n.tempus-dominus-widget.dark .date-container-days .cw {\n color: rgba(232, 230, 227, 0.38);\n}\n.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight):hover,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight):hover,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight):hover,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight):hover,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight):hover,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight):hover,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight):hover,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight):hover {\n background: rgb(35, 38, 39);\n}\n.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active,\n.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight),\n.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight),\n.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight),\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active {\n background-color: #4db2ff;\n color: #fff;\n text-shadow: 0 -1px 0 rgba(232, 230, 227, 0.25);\n}\n.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-end:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-end:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-end:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-end:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.old,\n.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.new,\n.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.old,\n.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.new,\n.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.old,\n.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.new,\n.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.old,\n.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.new,\n.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.old,\n.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.new,\n.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.old,\n.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.new,\n.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.old,\n.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.new,\n.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).new {\n color: #fff;\n}\n.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.today:before {\n border-bottom-color: #1b1b1b;\n}\n.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).new,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).old,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).new,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).old,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).new {\n color: rgba(232, 230, 227, 0.38);\n}\n.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,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled:hover {\n color: #6c757d;\n}\n.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).today:before,\n.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).today:before {\n border-bottom-color: #4db2ff;\n border-top-color: rgba(232, 230, 227, 0.2);\n}\n.tempus-dominus-widget.dark button {\n color: #fff;\n background-color: #4db2ff;\n border-color: #4db2ff;\n}"]}
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.min.css b/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.min.css
new file mode 100644
index 0000000..062b959
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.min.css
@@ -0,0 +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.show.date-container{min-height:315px}.tempus-dominus-widget.show.time-container{min-height:217px}.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 .range-in{background-color:#01419e!important;border:none;border-radius:0!important;box-shadow:-5px 0 0 #01419e,5px 0 0 #01419e}.tempus-dominus-widget .date-container-days .range-end{border-radius:0 50px 50px 0!important}.tempus-dominus-widget .date-container-days .range-start{border-radius:50px 0 0 50px!important}.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.range-end:not(.no-highlight),.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight),.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight),.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 .date-container-decades div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-decades div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).old,.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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-decades .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-months .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-years .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-second .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).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.range-end:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).today:before,.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 .range-in{background-color:#0071c7!important;box-shadow:-5px 0 0 #0071c7,5px 0 0 #0071c7}.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.range-end:not(.no-highlight),.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight),.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight),.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 .date-container-decades div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).old,.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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).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 .date-container-days div.range-end:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-end:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).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.range-end:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).today:before,.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/node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.js b/node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.js
new file mode 100644
index 0000000..ebf087f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.js
@@ -0,0 +1,154 @@
+///
+/*global $, tempusDominus */
+
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2021 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+tempusDominus.jQueryInterface = function (option, argument) {
+ if (this.length === 1) {
+ return tempusDominus.jQueryHandleThis(this, option, argument);
+ }
+ // "this" is jquery here
+ return this.each(function () {
+ tempusDominus.jQueryHandleThis(this, option, argument);
+ });
+};
+
+tempusDominus.jQueryHandleThis = function (me, option, argument) {
+ let data = $(me).data(tempusDominus.Namespace.dataKey);
+ if (typeof option === 'object') {
+ option = $.extend({}, tempusDominus.DefaultOptions, option);
+ }
+
+ if (!data) {
+ data = new tempusDominus.TempusDominus($(me)[0], option);
+ $(me).data(tempusDominus.Namespace.dataKey, data);
+ }
+
+ if (typeof option === 'string') {
+ if (data[option] === undefined) {
+ throw new Error(`No method named "${option}"`);
+ }
+ if (argument === undefined) {
+ return data[option]();
+ } else {
+ if (option === 'date') {
+ data.isDateUpdateThroughDateOptionFromClientCode = true;
+ }
+ const ret = data[option](argument);
+ data.isDateUpdateThroughDateOptionFromClientCode = false;
+ return ret;
+ }
+ }
+};
+
+tempusDominus.getSelectorFromElement = function ($element) {
+ let selector = $element.data('target'),
+ $selector;
+
+ if (!selector) {
+ selector = $element.attr('href') || '';
+ selector = /^#[a-z]/i.test(selector) ? selector : null;
+ }
+ $selector = $(selector);
+ if ($selector.length === 0) {
+ return $element;
+ }
+
+ if (!$selector.data(tempusDominus.Namespace.dataKey)) {
+ $.extend({}, $selector.data(), $(this).data());
+ }
+
+ return $selector;
+};
+
+/**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+$(document)
+ .on(
+ `click${tempusDominus.Namespace.events.key}.data-api`,
+ `[data-toggle="${tempusDominus.Namespace.dataKey}"]`,
+ function () {
+ const $originalTarget = $(this),
+ $target = tempusDominus.getSelectorFromElement($originalTarget),
+ config = $target.data(tempusDominus.Namespace.dataKey);
+ if ($target.length === 0) {
+ return;
+ }
+ if (
+ config._options.allowInputToggle &&
+ $originalTarget.is('input[data-toggle="datetimepicker"]')
+ ) {
+ return;
+ }
+ tempusDominus.jQueryInterface.call($target, 'toggle');
+ }
+ )
+ .on(
+ tempusDominus.Namespace.events.change,
+ `.${tempusDominus.Namespace.NAME}-input`,
+ function (event) {
+ const $target = tempusDominus.getSelectorFromElement($(this));
+ if ($target.length === 0 || event.isInit) {
+ return;
+ }
+ tempusDominus.jQueryInterface.call($target, '_change', event);
+ }
+ )
+ .on(
+ tempusDominus.Namespace.events.blur,
+ `.${tempusDominus.Namespace.NAME}-input`,
+ function (event) {
+ const $target = tempusDominus.getSelectorFromElement($(this)),
+ config = $target.data(tempusDominus.Namespace.dataKey);
+ if ($target.length === 0) {
+ return;
+ }
+ if (config._options.debug || window.debug) {
+ return;
+ }
+ tempusDominus.jQueryInterface.call($target, 'hide', event);
+ }
+ )
+ /*.on(tempusDominus.Namespace.Events.keydown, `.${tempusDominus.Namespace.NAME}-input`, function (event) {
+ const $target = tempusDominus.getSelectorFromElement($(this));
+ if ($target.length === 0) {
+ return;
+ }
+ tempusDominus.jQueryInterface.call($target, '_keydown', event);
+ })
+ .on(tempusDominus.Namespace.Events.keyup, `.${tempusDominus.Namespace.NAME}-input`, function (event) {
+ const $target = tempusDominus.getSelectorFromElement($(this));
+ if ($target.length === 0) {
+ return;
+ }
+ tempusDominus.jQueryInterface.call($target, '_keyup', event);
+ })*/
+ .on(
+ tempusDominus.Namespace.events.focus,
+ `.${tempusDominus.Namespace.NAME}-input`,
+ function (event) {
+ const $target = tempusDominus.getSelectorFromElement($(this)),
+ config = $target.data(tempusDominus.Namespace.dataKey);
+ if ($target.length === 0) {
+ return;
+ }
+ if (!config._options.allowInputToggle) {
+ return;
+ }
+ tempusDominus.jQueryInterface.call($target, 'show', event);
+ }
+ );
+const name = 'tempusDominus';
+const JQUERY_NO_CONFLICT = $.fn[name];
+$.fn[name] = tempusDominus.jQueryInterface;
+$.fn[name].Constructor = tempusDominus.TempusDominus;
+$.fn[name].noConflict = function () {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return tempusDominus.jQueryInterface;
+};
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.min.js b/node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.min.js
new file mode 100644
index 0000000..3a37f20
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2021 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+tempusDominus.jQueryInterface=function(e,t){return 1===this.length?tempusDominus.jQueryHandleThis(this,e,t):this.each((function(){tempusDominus.jQueryHandleThis(this,e,t)}))},tempusDominus.jQueryHandleThis=function(e,t,n){let s=$(e).data(tempusDominus.Namespace.dataKey);if("object"==typeof t&&(t=$.extend({},tempusDominus.DefaultOptions,t)),s||(s=new tempusDominus.TempusDominus($(e)[0],t),$(e).data(tempusDominus.Namespace.dataKey,s)),"string"==typeof t){if(void 0===s[t])throw new Error(`No method named "${t}"`);if(void 0===n)return s[t]();{"date"===t&&(s.isDateUpdateThroughDateOptionFromClientCode=!0);const e=s[t](n);return s.isDateUpdateThroughDateOptionFromClientCode=!1,e}}},tempusDominus.getSelectorFromElement=function(e){let t,n=e.data("target");return n||(n=e.attr("href")||"",n=/^#[a-z]/i.test(n)?n:null),t=$(n),0===t.length?e:(t.data(tempusDominus.Namespace.dataKey)||$.extend({},t.data(),$(this).data()),t)},$(document).on(`click${tempusDominus.Namespace.events.key}.data-api`,`[data-toggle="${tempusDominus.Namespace.dataKey}"]`,(function(){const e=$(this),t=tempusDominus.getSelectorFromElement(e),n=t.data(tempusDominus.Namespace.dataKey);0!==t.length&&(n._options.allowInputToggle&&e.is('input[data-toggle="datetimepicker"]')||tempusDominus.jQueryInterface.call(t,"toggle"))})).on(tempusDominus.Namespace.events.change,`.${tempusDominus.Namespace.NAME}-input`,(function(e){const t=tempusDominus.getSelectorFromElement($(this));0===t.length||e.isInit||tempusDominus.jQueryInterface.call(t,"_change",e)})).on(tempusDominus.Namespace.events.blur,`.${tempusDominus.Namespace.NAME}-input`,(function(e){const t=tempusDominus.getSelectorFromElement($(this)),n=t.data(tempusDominus.Namespace.dataKey);0!==t.length&&(n._options.debug||window.debug||tempusDominus.jQueryInterface.call(t,"hide",e))})).on(tempusDominus.Namespace.events.focus,`.${tempusDominus.Namespace.NAME}-input`,(function(e){const t=tempusDominus.getSelectorFromElement($(this)),n=t.data(tempusDominus.Namespace.dataKey);0!==t.length&&n._options.allowInputToggle&&tempusDominus.jQueryInterface.call(t,"show",e)}));const e="tempusDominus",t=$.fn[e];$.fn[e]=tempusDominus.jQueryInterface,$.fn[e].Constructor=tempusDominus.TempusDominus,$.fn[e].noConflict=function(){return $.fn[e]=t,tempusDominus.jQueryInterface};
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js
new file mode 100644
index 0000000..6401c1b
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js
@@ -0,0 +1,4673 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+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
+ */
+ numbersOutOfRange(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.
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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} Custom Date Format: ${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.`);
+ }
+ deprecatedWarning(message, remediation) {
+ console.warn(`${this.base} Warning ${message} is deprecated and will be removed in a future version. ${remediation}`);
+ }
+ throwError(message) {
+ const error = new TdError(`${this.base} ${message}`);
+ error.code = 9;
+ throw error;
+ }
+}
+
+// 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 decade 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';
+ this.rangeIn = 'range-in';
+ this.rangeStart = 'range-start';
+ this.rangeEnd = 'range-end';
+ //#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();
+
+const DefaultFormatLocalization = {
+ 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',
+ },
+ format: 'L LT',
+ locale: 'default',
+ hourCycle: undefined,
+ ordinal: (n) => {
+ const s = ['th', 'st', 'nd', 'rd'];
+ const v = n % 100;
+ return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`;
+ },
+};
+var DefaultFormatLocalization$1 = { ...DefaultFormatLocalization };
+
+var Unit;
+(function (Unit) {
+ Unit["seconds"] = "seconds";
+ Unit["minutes"] = "minutes";
+ Unit["hours"] = "hours";
+ Unit["date"] = "date";
+ Unit["month"] = "month";
+ Unit["year"] = "year";
+})(Unit || (Unit = {}));
+const twoDigitTemplate = {
+ month: '2-digit',
+ day: '2-digit',
+ year: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+};
+/**
+ * Returns an Intl format object based on the provided object
+ * @param unit
+ */
+const getFormatByUnit = (unit) => {
+ switch (unit) {
+ case 'date':
+ return { dateStyle: 'short' };
+ case 'month':
+ return {
+ month: 'numeric',
+ year: 'numeric',
+ };
+ case 'year':
+ return { year: 'numeric' };
+ }
+};
+/**
+ * Attempts to guess the hour cycle of the given local
+ * @param locale
+ */
+const guessHourCycle = (locale) => {
+ if (!locale)
+ return 'h12';
+ // noinspection SpellCheckingInspection
+ const template = {
+ hour: '2-digit',
+ minute: '2-digit',
+ numberingSystem: 'latn',
+ };
+ const dt = new DateTime().setLocalization({ locale });
+ dt.hours = 0;
+ const start = dt.parts(undefined, template).hour;
+ //midnight is 12 so en-US style 12 AM
+ if (start === '12')
+ return 'h12';
+ //midnight is 24 is from 00-24
+ if (start === '24')
+ return 'h24';
+ dt.hours = 23;
+ const end = dt.parts(undefined, template).hour;
+ //if midnight is 00 and hour 23 is 11 then
+ if (start === '00' && end === '11')
+ return 'h11';
+ if (start === '00' && end === '23')
+ return 'h23';
+ console.warn(`couldn't determine hour cycle for ${locale}. start: ${start}. end: ${end}`);
+ return undefined;
+};
+/**
+ * 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);
+ this.localization = DefaultFormatLocalization$1;
+ 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];
+ //#region CDF stuff
+ this.dateTimeRegex =
+ //is regex cannot be simplified beyond what it already is
+ /(\[[^[\]]*])|y{1,4}|M{1,4}|d{1,4}|H{1,2}|h{1,2}|t|T|m{1,2}|s{1,2}|f{3}/g; //NOSONAR
+ this.formattingTokens = /(\[[^[\]]*])|([-_:/.,()\s]+)|(T|t|yyyy|yy?|MM?M?M?|Do|dd?|hh?|HH?|mm?|ss?)/g; //NOSONAR is regex cannot be simplified beyond what it already is
+ this.match2 = /\d\d/; // 00 - 99
+ this.match3 = /\d{3}/; // 000 - 999
+ this.match4 = /\d{4}/; // 0000 - 9999
+ this.match1to2 = /\d\d?/; // 0 - 99
+ this.matchSigned = /[+-]?\d+/; // -inf - inf
+ this.matchOffset = /[+-]\d\d:?(\d\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z
+ this.matchWord = /[^\d_:/,\-()\s]+/; // Word
+ this.zoneExpressions = [
+ this.matchOffset,
+ (obj, input) => {
+ obj.offset = this.offsetFromString(input);
+ },
+ ];
+ this.expressions = {
+ t: {
+ pattern: undefined,
+ parser: (obj, input) => {
+ obj.afternoon = this.meridiemMatch(input);
+ },
+ },
+ T: {
+ pattern: undefined,
+ parser: (obj, input) => {
+ obj.afternoon = this.meridiemMatch(input);
+ },
+ },
+ fff: {
+ pattern: this.match3,
+ parser: (obj, input) => {
+ obj.milliseconds = +input;
+ },
+ },
+ s: {
+ pattern: this.match1to2,
+ parser: this.addInput('seconds'),
+ },
+ ss: {
+ pattern: this.match1to2,
+ parser: this.addInput('seconds'),
+ },
+ m: {
+ pattern: this.match1to2,
+ parser: this.addInput('minutes'),
+ },
+ mm: {
+ pattern: this.match1to2,
+ parser: this.addInput('minutes'),
+ },
+ H: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ h: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ HH: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ hh: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ d: {
+ pattern: this.match1to2,
+ parser: this.addInput('day'),
+ },
+ dd: {
+ pattern: this.match2,
+ parser: this.addInput('day'),
+ },
+ Do: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ obj.day = +(input.match(/\d+/)[0] || 1);
+ if (!this.localization.ordinal)
+ return;
+ for (let i = 1; i <= 31; i += 1) {
+ if (this.localization.ordinal(i).replace(/[[\]]/g, '') === input) {
+ obj.day = i;
+ }
+ }
+ },
+ },
+ M: {
+ pattern: this.match1to2,
+ parser: this.addInput('month'),
+ },
+ MM: {
+ pattern: this.match2,
+ parser: this.addInput('month'),
+ },
+ MMM: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ const months = this.getAllMonths();
+ const monthsShort = this.getAllMonths('short');
+ const matchIndex = (monthsShort || months.map((_) => _.slice(0, 3))).indexOf(input) + 1;
+ if (matchIndex < 1) {
+ throw new Error();
+ }
+ obj.month = matchIndex % 12 || matchIndex;
+ },
+ },
+ MMMM: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ const months = this.getAllMonths();
+ const matchIndex = months.indexOf(input) + 1;
+ if (matchIndex < 1) {
+ throw new Error();
+ }
+ obj.month = matchIndex % 12 || matchIndex;
+ },
+ },
+ y: {
+ pattern: this.matchSigned,
+ parser: this.addInput('year'),
+ },
+ yy: {
+ pattern: this.match2,
+ parser: (obj, input) => {
+ obj.year = this.parseTwoDigitYear(+input);
+ },
+ },
+ yyyy: {
+ pattern: this.match4,
+ parser: this.addInput('year'),
+ },
+ // z: this.zoneExpressions,
+ // zz: this.zoneExpressions,
+ // zzz: this.zoneExpressions
+ };
+ //#endregion CDF stuff
+ }
+ /**
+ * Chainable way to set the {@link locale}
+ * @param value
+ * @deprecated use setLocalization with a FormatLocalization object instead
+ */
+ setLocale(value) {
+ if (!this.localization) {
+ this.localization = DefaultFormatLocalization$1;
+ this.localization.locale = value;
+ }
+ return this;
+ }
+ /**
+ * Chainable way to set the {@link localization}
+ * @param value
+ */
+ setLocalization(value) {
+ this.localization = value;
+ return this;
+ }
+ /**
+ * Converts a plain JS date object to a DateTime object.
+ * Doing this allows access to format, etc.
+ * @param date
+ * @param locale this parameter is deprecated. Use formatLocalization instead.
+ * @param formatLocalization
+ */
+ static convert(date, locale = 'default', formatLocalization = undefined) {
+ if (!date)
+ throw new Error(`A date is required`);
+ if (!formatLocalization) {
+ formatLocalization = DefaultFormatLocalization$1;
+ formatLocalization.locale = locale;
+ }
+ return new DateTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).setLocalization(formatLocalization);
+ }
+ /**
+ * 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()).setLocalization(this.localization);
+ }
+ static isValid(d) {
+ if (d === undefined || JSON.stringify(d) === 'null')
+ return false;
+ if (d.constructor.name === DateTime.name)
+ return true;
+ return false;
+ }
+ /**
+ * 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(Unit.date);
+ if (this.weekDay === startOfTheWeek)
+ break;
+ const goBack = (this.weekDay - startOfTheWeek + 7) % 7;
+ this.manipulate(goBack * -1, Unit.date);
+ break;
+ }
+ case 'month':
+ this.startOf(Unit.date);
+ this.setDate(1);
+ break;
+ case 'year':
+ this.startOf(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(Unit.date);
+ const endOfWeek = 6 + startOfTheWeek;
+ if (this.weekDay === endOfWeek)
+ break;
+ this.manipulate(endOfWeek - this.weekDay, Unit.date);
+ break;
+ }
+ case 'month':
+ this.endOf(Unit.date);
+ this.manipulate(1, Unit.month);
+ this.setDate(0);
+ break;
+ case 'year':
+ this.endOf(Unit.date);
+ this.setMonth(11, 31);
+ 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;
+ }
+ /**
+ * Return true if {@link compare} is before this date
+ * @param compare The Date/DateTime to compare
+ * @param unit If provided, uses {@link startOf} for
+ * comparison.
+ */
+ isBefore(compare, unit) {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare))
+ return false;
+ 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
+ * comparison.
+ */
+ isAfter(compare, unit) {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare))
+ return false;
+ 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
+ * comparison.
+ */
+ isSame(compare, unit) {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare))
+ return false;
+ 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 one of the comparisons is undefined, return false
+ if (!DateTime.isValid(left) || !DateTime.isValid(right))
+ return false;
+ // If a unit is provided and is not a valid property of the DateTime object, throw an error
+ if (unit && this[unit] === undefined) {
+ throw new Error(`Unit '${unit}' is not valid`);
+ }
+ const leftInclusivity = inclusivity[0] === '(';
+ const rightInclusivity = inclusivity[1] === ')';
+ const isLeftInRange = leftInclusivity
+ ? this.isAfter(left, unit)
+ : !this.isBefore(left, unit);
+ const isRightInRange = rightInclusivity
+ ? this.isBefore(right, unit)
+ : !this.isAfter(right, unit);
+ return isLeftInRange && isRightInRange;
+ }
+ /**
+ * Returns flattened object of the date. Does not include literals
+ * @param locale
+ * @param template
+ */
+ parts(locale = this.localization.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 hour, e.g. 01...10
+ * @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.
+ */
+ getHoursFormatted(hourCycle = 'h12') {
+ return this.parts(undefined, { ...twoDigitTemplate, hourCycle: hourCycle })
+ .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.localization.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();
+ }
+ else if (weekNumber > this.weeksInWeekYear()) {
+ weekNumber = 1;
+ }
+ return weekNumber;
+ }
+ /**
+ * Returns the number of weeks in the year
+ */
+ weeksInWeekYear() {
+ const p1 = (this.year +
+ Math.floor(this.year / 4) -
+ Math.floor(this.year / 100) +
+ Math.floor(this.year / 400)) %
+ 7, last = this.year - 1, p2 = (last +
+ Math.floor(last / 4) -
+ Math.floor(last / 100) +
+ Math.floor(last / 400)) %
+ 7;
+ return p1 === 4 || p2 === 3 ? 53 : 52;
+ }
+ /**
+ * Returns true or false depending on if the year is a leap year or not.
+ */
+ 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]);
+ }
+ /**
+ * Returns a list of month values based on the current locale
+ */
+ getAllMonths(format = 'long') {
+ const applyFormat = new Intl.DateTimeFormat(this.localization.locale, {
+ month: format,
+ }).format;
+ return [...Array(12).keys()].map((m) => applyFormat(new Date(2021, m)));
+ }
+ /**
+ * Replaces an expanded token set (e.g. LT/LTS)
+ */
+ replaceTokens(formatStr, formats) {
+ /***
+ * _ => match
+ * a => first capture group. Anything between [ and ]
+ * b => second capture group
+ */
+ return formatStr.replace(/(\[[^[\]]*])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {
+ const B = b && b.toUpperCase();
+ return a || formats[B] || DefaultFormatLocalization$1.dateFormats[B];
+ });
+ }
+ parseTwoDigitYear(input) {
+ return input + (input > 68 ? 1900 : 2000);
+ }
+ offsetFromString(input) {
+ if (!input)
+ return 0;
+ if (input === 'Z')
+ return 0;
+ const [first, second, third] = input.match(/([+-]|\d\d)/g);
+ const minutes = +second * 60 + (+third || 0);
+ const signed = first === '+' ? -minutes : minutes;
+ return minutes === 0 ? 0 : signed; // eslint-disable-line no-nested-ternary
+ }
+ /**
+ * z = -4, zz = -04, zzz = -0400
+ * @param date
+ * @param style
+ * @private
+ */
+ zoneInformation(date, style) {
+ let name = date
+ .parts(this.localization.locale, { timeZoneName: 'longOffset' })
+ .timeZoneName.replace('GMT', '')
+ .replace(':', '');
+ const negative = name.includes('-');
+ name = name.replace('-', '');
+ if (style === 'z')
+ name = name.substring(1, 2);
+ else if (style === 'zz')
+ name = name.substring(0, 2);
+ return `${negative ? '-' : ''}${name}`;
+ }
+ addInput(property) {
+ return (obj, input) => {
+ obj[property] = +input;
+ };
+ }
+ getLocaleAfternoon() {
+ return new Intl.DateTimeFormat(this.localization.locale, {
+ hour: 'numeric',
+ hour12: true,
+ })
+ .formatToParts(new Date(2022, 3, 4, 13))
+ .find((p) => p.type === 'dayPeriod')
+ ?.value?.replace(/\s+/g, ' ');
+ }
+ meridiemMatch(input) {
+ return input.toLowerCase() === this.getLocaleAfternoon().toLowerCase();
+ }
+ correctHours(time) {
+ const { afternoon } = time;
+ if (afternoon !== undefined) {
+ const { hours } = time;
+ if (afternoon) {
+ if (hours < 12) {
+ time.hours += 12;
+ }
+ }
+ else if (hours === 12) {
+ time.hours = 0;
+ }
+ delete time.afternoon;
+ }
+ }
+ makeParser(format) {
+ format = this.replaceTokens(format, this.localization.dateFormats);
+ const matchArray = format.match(this.formattingTokens);
+ const { length } = matchArray;
+ const expressionArray = [];
+ for (let i = 0; i < length; i += 1) {
+ const token = matchArray[i];
+ const expression = this.expressions[token];
+ if (expression?.parser) {
+ expressionArray[i] = expression;
+ }
+ else {
+ expressionArray[i] = token.replace(/^\[[^[\]]*]$/g, '');
+ }
+ }
+ return (input) => {
+ const time = {
+ hours: 0,
+ minutes: 0,
+ seconds: 0,
+ milliseconds: 0,
+ };
+ for (let i = 0, start = 0; i < length; i += 1) {
+ const token = expressionArray[i];
+ if (typeof token === 'string') {
+ start += token.length;
+ }
+ else {
+ const part = input.slice(start);
+ let value = part;
+ if (token.pattern) {
+ const match = token.pattern.exec(part);
+ value = match[0];
+ }
+ token.parser.call(this, time, value);
+ input = input.replace(value, '');
+ }
+ }
+ this.correctHours(time);
+ return time;
+ };
+ }
+ /**
+ * Attempts to create a DateTime from a string.
+ * @param input date as string
+ * @param localization provides the date template the string is in via the format property
+ */
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ static fromString(input, localization) {
+ if (!localization?.format) {
+ Namespace.errorMessages.customDateFormatError('No format was provided');
+ }
+ try {
+ const dt = new DateTime();
+ dt.setLocalization(localization);
+ if (['x', 'X'].indexOf(localization.format) > -1)
+ return new DateTime((localization.format === 'X' ? 1000 : 1) * +input);
+ input = input.replace(/\s+/g, ' ');
+ const parser = dt.makeParser(localization.format);
+ const { year, month, day, hours, minutes, seconds, milliseconds, zone } = parser(input);
+ const d = day || (!year && !month ? dt.getDate() : 1);
+ const y = year || dt.getFullYear();
+ let M = 0;
+ if (!(year && !month)) {
+ M = month > 0 ? month - 1 : dt.getMonth();
+ }
+ if (zone) {
+ return new DateTime(Date.UTC(y, M, d, hours, minutes, seconds, milliseconds + zone.offset * 60 * 1000));
+ }
+ return new DateTime(y, M, d, hours, minutes, seconds, milliseconds);
+ }
+ catch (e) {
+ Namespace.errorMessages.customDateFormatError(`Unable to parse provided input: ${input}, format: ${localization.format}`);
+ }
+ }
+ /**
+ * 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 optional object. If provided, method will use Intl., otherwise the localizations format properties
+ * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.
+ */
+ format(template, locale = this.localization.locale) {
+ if (template && typeof template === 'object')
+ return new Intl.DateTimeFormat(locale, template).format(this);
+ const formatString = this.replaceTokens(
+ //try template first
+ template ||
+ //otherwise try localization format
+ this.localization.format ||
+ //otherwise try date + time
+ `${DefaultFormatLocalization$1.dateFormats.L}, ${DefaultFormatLocalization$1.dateFormats.LT}`, this.localization.dateFormats);
+ const formatter = (template) => new Intl.DateTimeFormat(this.localization.locale, template).format(this);
+ if (!this.localization.hourCycle)
+ this.localization.hourCycle = guessHourCycle(this.localization.locale);
+ //if the format asks for a twenty-four-hour string but the hour cycle is not, then make a base guess
+ const HHCycle = this.localization.hourCycle.startsWith('h1')
+ ? 'h24'
+ : this.localization.hourCycle;
+ const hhCycle = this.localization.hourCycle.startsWith('h2')
+ ? 'h12'
+ : this.localization.hourCycle;
+ const matches = {
+ y: this.year,
+ yy: formatter({ year: '2-digit' }),
+ yyyy: this.year,
+ M: formatter({ month: 'numeric' }),
+ MM: this.monthFormatted,
+ MMM: this.getAllMonths('short')[this.getMonth()],
+ MMMM: this.getAllMonths()[this.getMonth()],
+ d: this.date,
+ dd: this.dateFormatted,
+ ddd: formatter({ weekday: 'short' }),
+ dddd: formatter({ weekday: 'long' }),
+ H: this.getHours(),
+ HH: this.getHoursFormatted(HHCycle),
+ h: this.hours > 12 ? this.hours - 12 : this.hours,
+ hh: this.getHoursFormatted(hhCycle),
+ t: this.meridiem(),
+ T: this.meridiem().toUpperCase(),
+ m: this.minutes,
+ mm: this.minutesFormatted,
+ s: this.seconds,
+ ss: this.secondsFormatted,
+ fff: this.getMilliseconds(),
+ // z: this.zoneInformation(dateTime, 'z'), //-4
+ // zz: this.zoneInformation(dateTime, 'zz'), //-04
+ // zzz: this.zoneInformation(dateTime, 'zzz') //-0400
+ };
+ return formatString
+ .replace(this.dateTimeRegex, (match, $1) => {
+ return $1 || matches[match];
+ })
+ .replace(/\[/g, '')
+ .replace(/]/g, '');
+ }
+}
+
+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;
+
+const CalendarModes = [
+ {
+ name: 'calendar',
+ className: Namespace.css.daysContainer,
+ unit: Unit.month,
+ step: 1,
+ },
+ {
+ name: 'months',
+ className: Namespace.css.monthsContainer,
+ unit: Unit.year,
+ step: 1,
+ },
+ {
+ name: 'years',
+ className: Namespace.css.yearsContainer,
+ unit: Unit.year,
+ step: 10,
+ },
+ {
+ name: 'decades',
+ className: Namespace.css.decadesContainer,
+ unit: Unit.year,
+ step: 100,
+ },
+];
+
+class OptionsStore {
+ constructor() {
+ this._currentCalendarViewMode = 0;
+ this._viewDate = new DateTime();
+ this.minimumCalendarViewMode = 0;
+ this.currentView = 'calendar';
+ }
+ get currentCalendarViewMode() {
+ return this._currentCalendarViewMode;
+ }
+ set currentCalendarViewMode(value) {
+ this._currentCalendarViewMode = value;
+ this.currentView = CalendarModes[value].name;
+ }
+ get viewDate() {
+ return this._viewDate;
+ }
+ set viewDate(v) {
+ this._viewDate = v;
+ if (this.options)
+ this.options.viewDate = v;
+ }
+ /**
+ * When switching back to the calendar from the clock,
+ * this sets currentView to the correct calendar view.
+ */
+ refreshCurrentView() {
+ this.currentView = CalendarModes[this.currentCalendarViewMode].name;
+ }
+ get isTwelveHour() {
+ return ['h12', 'h11'].includes(this.options.localization.hourCycle);
+ }
+}
+
+/**
+ * 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._enabledDisabledDatesIsValid(granularity, targetDate))
+ return false;
+ if (granularity !== Unit.month &&
+ granularity !== Unit.year &&
+ this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&
+ this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1)
+ return false;
+ if (!this._minMaxIsValid(granularity, targetDate))
+ return false;
+ if (granularity === Unit.hours ||
+ granularity === Unit.minutes ||
+ granularity === Unit.seconds) {
+ if (!this._enabledDisabledHoursIsValid(targetDate))
+ return false;
+ if (this.optionsStore.options.restrictions.disabledTimeIntervals?.filter((internal) => targetDate.isBetween(internal.from, internal.to)).length !== 0)
+ return false;
+ }
+ return true;
+ }
+ _enabledDisabledDatesIsValid(granularity, targetDate) {
+ if (granularity !== Unit.date)
+ return true;
+ if (this.optionsStore.options.restrictions.disabledDates.length > 0 &&
+ this._isInDisabledDates(targetDate)) {
+ return false;
+ }
+ // noinspection RedundantIfStatementJS
+ if (this.optionsStore.options.restrictions.enabledDates.length > 0 &&
+ !this._isInEnabledDates(targetDate)) {
+ 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;
+ return !!this.optionsStore.options.restrictions.disabledDates.find((x) => x.isSame(testDate, Unit.date));
+ }
+ /**
+ * 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;
+ return !!this.optionsStore.options.restrictions.enabledDates.find((x) => x.isSame(testDate, Unit.date));
+ }
+ _minMaxIsValid(granularity, targetDate) {
+ if (this.optionsStore.options.restrictions.minDate &&
+ targetDate.isBefore(this.optionsStore.options.restrictions.minDate, granularity)) {
+ return false;
+ }
+ // noinspection RedundantIfStatementJS
+ if (this.optionsStore.options.restrictions.maxDate &&
+ targetDate.isAfter(this.optionsStore.options.restrictions.maxDate, granularity)) {
+ return false;
+ }
+ return true;
+ }
+ _enabledDisabledHoursIsValid(targetDate) {
+ if (this.optionsStore.options.restrictions.disabledHours.length > 0 &&
+ this._isInDisabledHours(targetDate)) {
+ return false;
+ }
+ // noinspection RedundantIfStatementJS
+ if (this.optionsStore.options.restrictions.enabledHours.length > 0 &&
+ !this._isInEnabledHours(targetDate)) {
+ return false;
+ }
+ return true;
+ }
+ /**
+ * 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.includes(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.includes(formattedDate);
+ }
+ dateRangeIsValid(dates, index, target) {
+ // if we're not using the option, then return valid
+ if (!this.optionsStore.options.dateRange)
+ return true;
+ // if we've only selected 0..1 dates, and we're not setting the end date
+ // then return valid. We only want to validate the range if both are selected,
+ // because the other validation on the target has already occurred.
+ if (dates.length !== 2 && index !== 1)
+ return true;
+ // initialize start date
+ const start = dates[0].clone;
+ // check if start date is not the same as target date
+ if (start.isSame(target, Unit.date))
+ return true;
+ // add one day to start; start has already been validated
+ start.manipulate(1, Unit.date);
+ // check each date in the range to make sure it's valid
+ while (!start.isSame(target, Unit.date)) {
+ const valid = this.isValid(start, Unit.date);
+ if (!valid)
+ return false;
+ start.manipulate(1, Unit.date);
+ }
+ return true;
+ }
+}
+
+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(); //eslint-disable-line @typescript-eslint/no-explicit-any
+ this.updateViewDate = new EventEmitter();
+ }
+ destroy() {
+ this.triggerEvent.destroy();
+ this.viewUpdate.destroy();
+ this.updateDisplay.destroy();
+ this.action.destroy();
+ this.updateViewDate.destroy();
+ }
+}
+
+const defaultEnLocalization = {
+ clear: 'Clear selection',
+ close: 'Close the picker',
+ dateFormats: DefaultFormatLocalization$1.dateFormats,
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ decrementHour: 'Decrement Hour',
+ decrementMinute: 'Decrement Minute',
+ decrementSecond: 'Decrement Second',
+ format: DefaultFormatLocalization$1.format,
+ hourCycle: DefaultFormatLocalization$1.hourCycle,
+ incrementHour: 'Increment Hour',
+ incrementMinute: 'Increment Minute',
+ incrementSecond: 'Increment Second',
+ locale: DefaultFormatLocalization$1.locale,
+ maxWeekdayLength: 0,
+ nextCentury: 'Next Century',
+ nextDecade: 'Next Decade',
+ nextMonth: 'Next Month',
+ nextYear: 'Next Year',
+ ordinal: DefaultFormatLocalization$1.ordinal,
+ pickHour: 'Pick Hour',
+ pickMinute: 'Pick Minute',
+ pickSecond: 'Pick Second',
+ previousCentury: 'Previous Century',
+ previousDecade: 'Previous Decade',
+ previousMonth: 'Previous Month',
+ previousYear: 'Previous Year',
+ selectDate: 'Select Date',
+ selectDecade: 'Select Decade',
+ selectMonth: 'Select Month',
+ selectTime: 'Select Time',
+ selectYear: 'Select Year',
+ startOfTheWeek: 0,
+ today: 'Go to today',
+ toggleMeridiem: 'Toggle Meridiem',
+};
+const DefaultOptions = {
+ allowInputToggle: false,
+ container: undefined,
+ dateRange: false,
+ debug: false,
+ defaultDate: undefined,
+ 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',
+ placement: 'bottom',
+ },
+ keepInvalid: false,
+ localization: defaultEnLocalization,
+ meta: {},
+ multipleDates: false,
+ multipleDatesSeparator: '; ',
+ promptTimeOnDateChange: false,
+ promptTimeOnDateChangeTransitionDelay: 200,
+ restrictions: {
+ minDate: undefined,
+ maxDate: undefined,
+ disabledDates: [],
+ enabledDates: [],
+ daysOfWeekDisabled: [],
+ disabledTimeIntervals: [],
+ disabledHours: [],
+ enabledHours: [],
+ },
+ stepping: 1,
+ useCurrent: true,
+ viewDate: new DateTime(),
+};
+const DefaultEnLocalization = { ...defaultEnLocalization };
+
+/**
+ * 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
+ */
+function tryConvertToDateTime(d, localization) {
+ if (!d)
+ return null;
+ 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;
+}
+/**
+ * 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
+ */
+function convertToDateTime(d, optionName, localization) {
+ if (typeof d === typeof '' && optionName !== 'input') {
+ Namespace.errorMessages.dateString();
+ }
+ const converted = tryConvertToDateTime(d, localization);
+ if (!converted) {
+ Namespace.errorMessages.failedToParseDate(optionName, d, optionName === 'input');
+ }
+ return converted;
+}
+/**
+ * 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
+ */
+function typeCheckDateArray(optionName, value, //eslint-disable-line @typescript-eslint/no-explicit-any
+providedType, localization = DefaultFormatLocalization$1) {
+ if (!Array.isArray(value)) {
+ Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of DateTime or Date');
+ }
+ for (let i = 0; i < value.length; i++) {
+ const d = value[i];
+ const dateTime = convertToDateTime(d, optionName, localization);
+ dateTime.setLocalization(localization);
+ 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
+ */
+function typeCheckNumberArray(optionName, value, //eslint-disable-line @typescript-eslint/no-explicit-any
+providedType) {
+ if (!Array.isArray(value) || value.some((x) => typeof x !== typeof 0)) {
+ Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of numbers');
+ }
+}
+
+function mandatoryDate(key) {
+ return ({ value, providedType, localization }) => {
+ const dateTime = convertToDateTime(value, key, localization);
+ if (dateTime !== undefined) {
+ dateTime.setLocalization(localization);
+ return dateTime;
+ }
+ };
+}
+function optionalDate(key) {
+ const mandatory = mandatoryDate(key);
+ return (args) => {
+ if (args.value === undefined) {
+ return args.value;
+ }
+ return mandatory(args);
+ };
+}
+function numbersInRange(key, lower, upper) {
+ return ({ value, providedType }) => {
+ if (value === undefined) {
+ return [];
+ }
+ typeCheckNumberArray(key, value, providedType);
+ if (value.some((x) => x < lower || x > upper))
+ Namespace.errorMessages.numbersOutOfRange(key, lower, upper);
+ return value;
+ };
+}
+function validHourRange(key) {
+ return numbersInRange(key, 0, 23);
+}
+function validDateArray(key) {
+ return ({ value, providedType, localization }) => {
+ if (value === undefined) {
+ return [];
+ }
+ typeCheckDateArray(key, value, providedType, localization);
+ return value;
+ };
+}
+function validKeyOption(keyOptions) {
+ return ({ value, path }) => {
+ if (!keyOptions.includes(value))
+ Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions);
+ return value;
+ };
+}
+const optionProcessors = Object.freeze({
+ defaultDate: mandatoryDate('defaultDate'),
+ viewDate: mandatoryDate('viewDate'),
+ minDate: optionalDate('restrictions.minDate'),
+ maxDate: optionalDate('restrictions.maxDate'),
+ disabledHours: validHourRange('restrictions.disabledHours'),
+ enabledHours: validHourRange('restrictions.enabledHours'),
+ disabledDates: validDateArray('restrictions.disabledDates'),
+ enabledDates: validDateArray('restrictions.enabledDates'),
+ daysOfWeekDisabled: numbersInRange('restrictions.daysOfWeekDisabled', 0, 6),
+ disabledTimeIntervals: ({ key, value, providedType, localization }) => {
+ if (value === undefined) {
+ return [];
+ }
+ if (!Array.isArray(value)) {
+ Namespace.errorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }');
+ }
+ const valueObject = value; //eslint-disable-line @typescript-eslint/no-explicit-any
+ for (let i = 0; i < valueObject.length; i++) {
+ Object.keys(valueObject[i]).forEach((vk) => {
+ const subOptionName = `${key}[${i}].${vk}`;
+ const d = valueObject[i][vk];
+ const dateTime = convertToDateTime(d, subOptionName, localization);
+ dateTime.setLocalization(localization);
+ valueObject[i][vk] = dateTime;
+ });
+ }
+ return valueObject;
+ },
+ toolbarPlacement: validKeyOption(['top', 'bottom', 'default']),
+ type: validKeyOption(['icons', 'sprites']),
+ viewMode: validKeyOption([
+ 'clock',
+ 'calendar',
+ 'months',
+ 'years',
+ 'decades',
+ ]),
+ theme: validKeyOption(['light', 'dark', 'auto']),
+ placement: validKeyOption(['top', 'bottom']),
+ meta: ({ value }) => value,
+ dayViewHeaderFormat: ({ value }) => value,
+ container: ({ value, path }) => {
+ if (value &&
+ !(value instanceof HTMLElement ||
+ value instanceof Element ||
+ value?.appendChild)) {
+ Namespace.errorMessages.typeMismatch(path.substring(1), typeof value, 'HTMLElement');
+ }
+ return value;
+ },
+ useTwentyfourHour: ({ value, path, providedType, defaultType }) => {
+ Namespace.errorMessages.deprecatedWarning('useTwentyfourHour', 'Please use "options.localization.hourCycle" instead');
+ if (value === undefined || providedType === 'boolean')
+ return value;
+ Namespace.errorMessages.typeMismatch(path, providedType, defaultType);
+ },
+ hourCycle: validKeyOption(['h11', 'h12', 'h23', 'h24']),
+});
+const defaultProcessor = ({ value, defaultType, providedType, path, }) => {
+ 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);
+ }
+};
+function processKey(args) {
+ return (optionProcessors[args.key] || defaultProcessor)(args);
+}
+
+class OptionConverter {
+ static deepCopy(input) {
+ const o = {};
+ Object.keys(input).forEach((key) => {
+ const inputElement = input[key];
+ if (inputElement instanceof DateTime) {
+ o[key] = inputElement.clone;
+ return;
+ }
+ else if (inputElement instanceof Date) {
+ o[key] = new Date(inputElement.valueOf());
+ return;
+ }
+ o[key] = inputElement;
+ if (typeof inputElement !== 'object' ||
+ inputElement instanceof HTMLElement ||
+ inputElement instanceof Element)
+ 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 localization
+ * @param path
+ */
+ static spread(provided, copyTo, localization, path = '') {
+ 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.`;
+ const 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];
+ const providedType = typeof provided[key];
+ const defaultType = typeof defaultOptionValue;
+ const 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], localization, path);
+ }
+ else {
+ copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization);
+ }
+ path = path.substring(0, path.lastIndexOf(`.${key}`));
+ });
+ }
+ static processKey(key, value, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType, defaultType, path, localization) {
+ return processKey({
+ key,
+ value,
+ providedType,
+ defaultType,
+ path,
+ localization,
+ });
+ }
+ 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;
+ const 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 normalizeObject = this.normalizeObject(objectToNormalized);
+ 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] = normalizeObject(split, 1, options[keyOption], eData[`td${key}`]);
+ }
+ }
+ // or key = multipleDate
+ else if (keyOption !== undefined) {
+ dataOptions[keyOption] = eData[`td${key}`];
+ }
+ });
+ return this._mergeOptions(dataOptions, options);
+ }
+ //todo clean this up
+ static normalizeObject(objectToNormalized) {
+ const normalizeObject = (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] = normalizeObject(split, index, optionSubgroup[keyOption], value);
+ }
+ else {
+ internalObject[keyOption] = value;
+ }
+ return internalObject;
+ };
+ return normalizeObject;
+ }
+ /**
+ * 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, //eslint-disable-line @typescript-eslint/no-explicit-any
+ localization) {
+ return tryConvertToDateTime(d, localization);
+ }
+ /**
+ * 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) {
+ return typeCheckDateArray(optionName, value, providedType, localization);
+ }
+ /**
+ * 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) {
+ return typeCheckNumberArray(optionName, value, providedType);
+ }
+ /**
+ * 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, //eslint-disable-line @typescript-eslint/no-explicit-any
+ optionName, localization) {
+ return convertToDateTime(d, optionName, localization);
+ }
+ 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');
+ }
+ }
+ if (config.multipleDates && config.dateRange) {
+ Namespace.errorMessages.conflictingConfiguration('Cannot uss option "multipleDates" with "dateRange"');
+ }
+ }
+}
+OptionConverter.ignoreProperties = [
+ 'meta',
+ 'dayViewHeaderFormat',
+ 'container',
+ 'dateForms',
+ 'ordinal',
+];
+OptionConverter.isValue = (a) => a != null; // everything except undefined + null
+
+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]?.clone;
+ }
+ /**
+ * 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) {
+ if (!date)
+ return '';
+ date.localization = this.optionsStore.options.localization;
+ return date.format();
+ }
+ /**
+ * parse the value into a DateTime object.
+ * this can be overwritten to supply your own parsing.
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ setFromInput(value, index) {
+ if (!value) {
+ this.setValue(undefined, index);
+ return;
+ }
+ const converted = this.parseInput(value);
+ if (converted) {
+ converted.setLocalization(this.optionsStore.options.localization);
+ 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 (!DateTime.isValid(targetDate))
+ return false;
+ if (!unit)
+ return this._dates.find((x) => x.isSame(targetDate)) !== undefined;
+ const format = getFormatByUnit(unit);
+ const 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 (!DateTime.isValid(targetDate))
+ return -1;
+ if (!unit)
+ return this._dates.map((x) => x.valueOf()).indexOf(targetDate.valueOf());
+ const format = getFormatByUnit(unit);
+ const 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 = [];
+ if (this.optionsStore.input)
+ this.optionsStore.input.value = '';
+ this._eventEmitters.updateDisplay.emit('all');
+ }
+ /**
+ * 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];
+ }
+ updateInput(target) {
+ if (!this.optionsStore.input)
+ return;
+ let newValue = this.formatInput(target);
+ if (this.optionsStore.options.multipleDates ||
+ this.optionsStore.options.dateRange) {
+ newValue = this._dates
+ .map((d) => this.formatInput(d))
+ .join(this.optionsStore.options.multipleDatesSeparator);
+ }
+ if (this.optionsStore.input.value != newValue)
+ this.optionsStore.input.value = newValue;
+ }
+ /**
+ * 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]?.clone;
+ if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {
+ oldDate = this.lastPicked;
+ }
+ if (target && oldDate?.isSame(target)) {
+ this.updateInput(target);
+ return;
+ }
+ // case of calling setValue(null)
+ if (!target) {
+ this._setValueNull(isClear, index, oldDate);
+ 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.startOf(Unit.minutes);
+ }
+ const onUpdate = (isValid) => {
+ this._dates[index] = target;
+ this._eventEmitters.updateViewDate.emit(target.clone);
+ this.updateInput(target);
+ this.optionsStore.unset = false;
+ this._eventEmitters.updateDisplay.emit('all');
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.change,
+ date: target,
+ oldDate,
+ isClear,
+ isValid: isValid,
+ });
+ };
+ if (this.validation.isValid(target) &&
+ this.validation.dateRangeIsValid(this.picked, index, target)) {
+ onUpdate(true);
+ return;
+ }
+ if (this.optionsStore.options.keepInvalid) {
+ onUpdate(false);
+ }
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.error,
+ reason: Namespace.errorMessages.failedToSetInvalidDate,
+ date: target,
+ oldDate,
+ });
+ }
+ _setValueNull(isClear, index, oldDate) {
+ if (!this.optionsStore.options.multipleDates ||
+ this._dates.length === 1 ||
+ isClear) {
+ this.optionsStore.unset = true;
+ this._dates = [];
+ }
+ else {
+ this._dates.splice(index, 1);
+ }
+ this.updateInput();
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.change,
+ date: undefined,
+ oldDate,
+ isClear,
+ isValid: true,
+ });
+ this._eventEmitters.updateDisplay.emit('all');
+ }
+}
+
+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 `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);
+ }
+ const { rangeHoverEvent, rangeHoverOutEvent } = this.handleMouseEvents(container);
+ 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);
+ // if hover is supported then add the events
+ if (matchMedia('(hover: hover)').matches &&
+ this.optionsStore.options.dateRange) {
+ div.addEventListener('mouseover', rangeHoverEvent);
+ div.addEventListener('mouseout', rangeHoverOutEvent);
+ }
+ }
+ return container;
+ }
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget, paint) {
+ const container = widget.getElementsByClassName(Namespace.css.daysContainer)[0];
+ this._updateCalendarView(container);
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf(Unit.month)
+ .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)
+ .manipulate(12, Unit.hours);
+ this._handleCalendarWeeks(container, innerDate.clone);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectDay}"]`)
+ .forEach((element) => {
+ const classes = [];
+ classes.push(Namespace.css.day);
+ if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {
+ classes.push(Namespace.css.old);
+ }
+ if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {
+ classes.push(Namespace.css.new);
+ }
+ if (!this.optionsStore.unset &&
+ !this.optionsStore.options.dateRange &&
+ this.dates.isPicked(innerDate, Unit.date)) {
+ classes.push(Namespace.css.active);
+ }
+ if (!this.validation.isValid(innerDate, Unit.date)) {
+ classes.push(Namespace.css.disabled);
+ }
+ if (innerDate.isSame(new DateTime(), Unit.date)) {
+ classes.push(Namespace.css.today);
+ }
+ if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {
+ classes.push(Namespace.css.weekend);
+ }
+ this._handleDateRange(innerDate, classes);
+ paint(Unit.date, innerDate, classes, element);
+ element.classList.remove(...element.classList);
+ element.classList.add(...classes);
+ element.setAttribute('data-value', this._dateToDataValue(innerDate));
+ element.setAttribute('data-day', `${innerDate.date}`);
+ element.innerText = innerDate.parts(undefined, {
+ day: 'numeric',
+ }).day;
+ innerDate.manipulate(1, Unit.date);
+ });
+ }
+ _dateToDataValue(date) {
+ if (!DateTime.isValid(date))
+ return '';
+ return `${date.year}-${date.monthFormatted}-${date.dateFormatted}`;
+ }
+ _handleDateRange(innerDate, classes) {
+ const rangeStart = this.dates.picked[0];
+ const rangeEnd = this.dates.picked[1];
+ if (this.optionsStore.options.dateRange) {
+ if (innerDate.isBetween(rangeStart, rangeEnd, Unit.date)) {
+ classes.push(Namespace.css.rangeIn);
+ }
+ if (innerDate.isSame(rangeStart, Unit.date)) {
+ classes.push(Namespace.css.rangeStart);
+ }
+ if (innerDate.isSame(rangeEnd, Unit.date)) {
+ classes.push(Namespace.css.rangeEnd);
+ }
+ }
+ }
+ handleMouseEvents(container) {
+ const rangeHoverEvent = (e) => {
+ const currentTarget = e?.currentTarget;
+ // if we have 0 or 2 selected or if the target is disabled then ignore
+ if (this.dates.picked.length !== 1 ||
+ currentTarget.classList.contains(Namespace.css.disabled))
+ return;
+ // select all the date divs
+ const allDays = [...container.querySelectorAll('.day')];
+ // get the date value from the element being hovered over
+ const attributeValue = currentTarget.getAttribute('data-value');
+ // format the string to a date
+ const innerDate = DateTime.fromString(attributeValue, {
+ format: 'yyyy-MM-dd',
+ });
+ // find the position of the target in the date container
+ const dayIndex = allDays.findIndex((e) => e.getAttribute('data-value') === attributeValue);
+ // find the first and second selected dates
+ const rangeStart = this.dates.picked[0];
+ const rangeEnd = this.dates.picked[1];
+ //format the start date so that it can be found by the attribute
+ const rangeStartFormatted = this._dateToDataValue(rangeStart);
+ const rangeStartIndex = allDays.findIndex((e) => e.getAttribute('data-value') === rangeStartFormatted);
+ const rangeStartElement = allDays[rangeStartIndex];
+ //make sure we don't leave start/end classes if we don't need them
+ if (!innerDate.isSame(rangeStart, Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeStart);
+ }
+ if (!innerDate.isSame(rangeEnd, Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeEnd);
+ }
+ // the following figures out which direct from start date is selected
+ // the selection "cap" classes are applied if needed
+ // otherwise all the dates between will get the `rangeIn` class.
+ // We make this selection based on the element's index and the rangeStart index
+ let lambda;
+ if (innerDate.isBefore(rangeStart)) {
+ currentTarget.classList.add(Namespace.css.rangeStart);
+ rangeStartElement?.classList.remove(Namespace.css.rangeStart);
+ rangeStartElement?.classList.add(Namespace.css.rangeEnd);
+ lambda = (_, index) => index > dayIndex && index < rangeStartIndex;
+ }
+ else {
+ currentTarget.classList.add(Namespace.css.rangeEnd);
+ rangeStartElement?.classList.remove(Namespace.css.rangeEnd);
+ rangeStartElement?.classList.add(Namespace.css.rangeStart);
+ lambda = (_, index) => index < dayIndex && index > rangeStartIndex;
+ }
+ allDays.filter(lambda).forEach((e) => {
+ e.classList.add(Namespace.css.rangeIn);
+ });
+ };
+ const rangeHoverOutEvent = (e) => {
+ // find all the dates in the container
+ const allDays = [...container.querySelectorAll('.day')];
+ // if only the start is selected, remove all the rangeIn classes
+ // we do this because once the user hovers over a new date the range will be recalculated.
+ if (this.dates.picked.length === 1)
+ allDays.forEach((e) => e.classList.remove(Namespace.css.rangeIn));
+ // if we have 0 or 2 dates selected then ignore
+ if (this.dates.picked.length !== 1)
+ return;
+ const currentTarget = e?.currentTarget;
+ // get the elements date from the attribute value
+ const innerDate = new DateTime(currentTarget.getAttribute('data-value'));
+ // verify selections and remove invalid classes
+ if (!innerDate.isSame(this.dates.picked[0], Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeStart);
+ }
+ if (!innerDate.isSame(this.dates.picked[1], Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeEnd);
+ }
+ };
+ return { rangeHoverEvent, rangeHoverOutEvent };
+ }
+ _updateCalendarView(container) {
+ if (this.optionsStore.currentView !== 'calendar')
+ return;
+ 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, Unit.month), Unit.month)
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+ this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.month), Unit.month)
+ ? next.classList.remove(Namespace.css.disabled)
+ : next.classList.add(Namespace.css.disabled);
+ }
+ /***
+ * Generates a html row that contains the days of the week.
+ * @private
+ */
+ _daysOfTheWeek() {
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)
+ .startOf(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);
+ let weekDay = innerDate.format({ weekday: 'short' });
+ if (this.optionsStore.options.localization.maxWeekdayLength > 0)
+ weekDay = weekDay.substring(0, this.optionsStore.options.localization.maxWeekdayLength);
+ htmlDivElement.innerText = weekDay;
+ innerDate.manipulate(1, Unit.date);
+ row.push(htmlDivElement);
+ }
+ return row;
+ }
+ _handleCalendarWeeks(container, innerDate) {
+ [...container.querySelectorAll(`.${Namespace.css.calendarWeeks}`)]
+ .filter((e) => e.innerText !== '#')
+ .forEach((element) => {
+ element.innerText = `${innerDate.week}`;
+ innerDate.manipulate(7, Unit.date);
+ });
+ }
+}
+
+/**
+ * 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, Unit.year), Unit.year)
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+ this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.year), Unit.year)
+ ? next.classList.remove(Namespace.css.disabled)
+ : next.classList.add(Namespace.css.disabled);
+ }
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectMonth}"]`)
+ .forEach((containerClone, index) => {
+ const classes = [];
+ classes.push(Namespace.css.month);
+ if (!this.optionsStore.unset &&
+ this.dates.isPicked(innerDate, Unit.month)) {
+ classes.push(Namespace.css.active);
+ }
+ if (!this.validation.isValid(innerDate, Unit.month)) {
+ classes.push(Namespace.css.disabled);
+ }
+ paint(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, Unit.month);
+ });
+ }
+}
+
+/**
+ * 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, Unit.year);
+ this._endYear = this.optionsStore.viewDate.clone.manipulate(10, 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, Unit.year)
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+ this.validation.isValid(this._endYear, Unit.year)
+ ? next.classList.remove(Namespace.css.disabled)
+ : next.classList.add(Namespace.css.disabled);
+ }
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf(Unit.year)
+ .manipulate(-1, Unit.year);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectYear}"]`)
+ .forEach((containerClone) => {
+ const classes = [];
+ classes.push(Namespace.css.year);
+ if (!this.optionsStore.unset &&
+ this.dates.isPicked(innerDate, Unit.year)) {
+ classes.push(Namespace.css.active);
+ }
+ if (!this.validation.isValid(innerDate, Unit.year)) {
+ classes.push(Namespace.css.disabled);
+ }
+ paint(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, Unit.year);
+ });
+ }
+}
+
+/**
+ * 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(Unit.year);
+ this._startDecade.year = start;
+ this._endDecade = this.optionsStore.viewDate.clone.startOf(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, Unit.year)
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+ this.validation.isValid(this._endDecade, 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, Unit.year)
+ .format({ year: 'numeric' });
+ containerClone.setAttribute('data-value', `${this._startDecade.year}`);
+ return;
+ }
+ }
+ const 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, Unit.year);
+ });
+ }
+}
+
+/**
+ * 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]);
+ let lastPicked = this.dates.lastPicked?.clone;
+ if (!lastPicked && this.optionsStore.options.useCurrent)
+ 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, Unit.hours), Unit.hours)) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes$1.incrementHours}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours), Unit.hours)) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes$1.decrementHours}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ timesDiv.querySelector(`[data-time-component=${Unit.hours}]`).innerText = lastPicked
+ ? lastPicked.getHoursFormatted(this.optionsStore.options.localization.hourCycle)
+ : '--';
+ }
+ if (this.optionsStore.options.display.components.minutes) {
+ if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes), Unit.minutes)) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes$1.incrementMinutes}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes), Unit.minutes)) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes$1.decrementMinutes}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ timesDiv.querySelector(`[data-time-component=${Unit.minutes}]`).innerText = lastPicked ? lastPicked.minutesFormatted : '--';
+ }
+ if (this.optionsStore.options.display.components.seconds) {
+ if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds), Unit.seconds)) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes$1.incrementSeconds}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds), Unit.seconds)) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes$1.decrementSeconds}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ timesDiv.querySelector(`[data-time-component=${Unit.seconds}]`).innerText = lastPicked ? lastPicked.secondsFormatted : '--';
+ }
+ if (this.optionsStore.isTwelveHour) {
+ const toggle = timesDiv.querySelector(`[data-action=${ActionTypes$1.toggleMeridiem}]`);
+ const meridiemDate = (lastPicked || this.optionsStore.viewDate).clone;
+ toggle.innerText = meridiemDate.meridiem();
+ if (!this.validation.isValid(meridiemDate.manipulate(meridiemDate.hours >= 12 ? -12 : 12, 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', 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', 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', 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.isTwelveHour) {
+ this._gridColumns += ' a';
+ let divElement = getSeparator();
+ top.push(divElement);
+ const button = document.createElement('button');
+ button.setAttribute('type', '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 `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.isTwelveHour ? 12 : 24); 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];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectHour}"]`)
+ .forEach((containerClone) => {
+ const classes = [];
+ classes.push(Namespace.css.hour);
+ if (!this.validation.isValid(innerDate, Unit.hours)) {
+ classes.push(Namespace.css.disabled);
+ }
+ paint(Unit.hours, innerDate, classes, containerClone);
+ containerClone.classList.remove(...containerClone.classList);
+ containerClone.classList.add(...classes);
+ containerClone.setAttribute('data-value', `${innerDate.hours}`);
+ containerClone.innerText = innerDate.getHoursFormatted(this.optionsStore.options.localization.hourCycle);
+ innerDate.manipulate(1, Unit.hours);
+ });
+ }
+}
+
+/**
+ * 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);
+ const 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];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);
+ const step = this.optionsStore.options.stepping === 1
+ ? 5
+ : this.optionsStore.options.stepping;
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectMinute}"]`)
+ .forEach((containerClone) => {
+ const classes = [];
+ classes.push(Namespace.css.minute);
+ if (!this.validation.isValid(innerDate, Unit.minutes)) {
+ classes.push(Namespace.css.disabled);
+ }
+ paint(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, Unit.minutes);
+ });
+ }
+}
+
+/**
+ * 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];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectSecond}"]`)
+ .forEach((containerClone) => {
+ const classes = [];
+ classes.push(Namespace.css.second);
+ if (!this.validation.isValid(innerDate, Unit.seconds)) {
+ classes.push(Namespace.css.disabled);
+ }
+ paint(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, Unit.seconds);
+ });
+ }
+}
+
+/**
+ * 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);
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ 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 = '';
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ 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);
+};
+
+/**
+ * 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; //eslint-disable-line @typescript-eslint/no-explicit-any
+ 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;
+ }
+ get dateContainer() {
+ return this.widget?.querySelector(`div.${Namespace.css.dateContainer}`);
+ }
+ get timeContainer() {
+ return this.widget?.querySelector(`div.${Namespace.css.timeContainer}`);
+ }
+ /**
+ * 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;
+ switch (unit) {
+ case Unit.seconds:
+ this.secondDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.minutes:
+ this.minuteDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.hours:
+ this.hourDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.date:
+ this.dateDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.month:
+ this.monthDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.year:
+ this.yearDisplay._update(this.widget, this.paint);
+ break;
+ case 'decade':
+ this.decadeDisplay._update(this.widget, this.paint);
+ break;
+ case 'clock':
+ if (!this._hasTime)
+ break;
+ this.timeDisplay._update(this.widget);
+ this._update(Unit.hours);
+ this._update(Unit.minutes);
+ this._update(Unit.seconds);
+ break;
+ case 'calendar':
+ this._update(Unit.date);
+ this._update(Unit.year);
+ this._update(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
+ */
+ /* eslint-disable @typescript-eslint/no-unused-vars */
+ 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) {
+ this._showSetDefaultIfNeeded();
+ this._buildWidget();
+ this._updateTheme();
+ this._showSetupViewMode();
+ if (!this.optionsStore.options.display.inline) {
+ // If needed to change the parent container
+ const container = this.optionsStore.options?.container || document.body;
+ const placement = this.optionsStore.options?.display?.placement || 'bottom';
+ container.appendChild(this.widget);
+ this.createPopup(this.optionsStore.element, this.widget, {
+ modifiers: [{ name: 'eventListeners', enabled: true }],
+ //#2400
+ placement: document.documentElement.dir === 'rtl'
+ ? `${placement}-end`
+ : `${placement}-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;
+ }
+ _showSetupViewMode() {
+ // 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
+ else 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.timeContainer);
+ }
+ else {
+ Collapse.show(this.timeContainer);
+ }
+ }
+ Collapse.show(this.dateContainer);
+ }
+ if (this._hasDate) {
+ this._showMode();
+ }
+ }
+ _showSetDefaultIfNeeded() {
+ if (this.dates.picked.length != 0)
+ return;
+ if (this.optionsStore.options.useCurrent &&
+ !this.optionsStore.options.defaultDate) {
+ const date = new DateTime().setLocalization(this.optionsStore.options.localization);
+ 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) && tries > 31) {
+ date.manipulate(direction, Unit.date);
+ tries++;
+ }
+ }
+ this.dates.setValue(date);
+ }
+ if (this.optionsStore.options.defaultDate) {
+ this.dates.setValue(this.optionsStore.options.defaultDate);
+ }
+ }
+ async createPopup(element, widget,
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ options) {
+ let createPopperFunction;
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (window?.Popper) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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];
+ const 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';
+ if (this.optionsStore.options.display.sideBySide)
+ (this.widget.querySelectorAll(`.${Namespace.css.clockContainer}`)[0]).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() {
+ if (!this._hasDate)
+ return;
+ 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.setAttribute(showing, 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?.clone,
+ });
+ 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._hasDateAndTime) {
+ this._buildWidgetSideBySide(template, dateView, timeView, toolbar);
+ return;
+ }
+ if (this.optionsStore.options.display.toolbarPlacement === 'top') {
+ template.appendChild(toolbar);
+ }
+ const setupComponentView = (hasFirst, hasSecond, element, shouldShow) => {
+ if (!hasFirst)
+ return;
+ if (hasSecond) {
+ element.classList.add(Namespace.css.collapse);
+ if (shouldShow)
+ element.classList.add(Namespace.css.show);
+ }
+ template.appendChild(element);
+ };
+ setupComponentView(this._hasDate, this._hasTime, dateView, this.optionsStore.options.display.viewMode !== 'clock');
+ setupComponentView(this._hasTime, this._hasDate, timeView, this.optionsStore.options.display.viewMode === 'clock');
+ 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;
+ }
+ _buildWidgetSideBySide(template, dateView, timeView, toolbar) {
+ 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;
+ }
+ /**
+ * 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 _hasDateAndTime() {
+ return this._hasDate && this._hasTime;
+ }
+ /**
+ * 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;
+ this._dispose();
+ if (wasVisible)
+ this.show();
+ }
+ refreshCurrentView() {
+ //if the widget is not showing, just destroy it
+ if (!this._isVisible)
+ this._dispose();
+ switch (this.optionsStore.currentView) {
+ case 'clock':
+ this._update('clock');
+ break;
+ case 'calendar':
+ this._update(Unit.date);
+ break;
+ case 'months':
+ this._update(Unit.month);
+ break;
+ case 'years':
+ this._update(Unit.year);
+ break;
+ case 'decades':
+ this._update('decade');
+ break;
+ }
+ }
+}
+
+/**
+ * Logic for various click actions
+ */
+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]
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ do(e, action) {
+ const currentTarget = e?.currentTarget;
+ if (currentTarget?.classList?.contains(Namespace.css.disabled))
+ return;
+ 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:
+ this.handleSelectCalendarMode(action, currentTarget);
+ break;
+ case ActionTypes$1.selectDay:
+ this.handleSelectDay(currentTarget);
+ break;
+ case ActionTypes$1.selectHour: {
+ let hour = +currentTarget.dataset.value;
+ if (lastPicked.hours >= 12 && this.optionsStore.isTwelveHour)
+ 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, Unit.hours);
+ break;
+ case ActionTypes$1.incrementMinutes:
+ this.manipulateAndSet(lastPicked, Unit.minutes, this.optionsStore.options.stepping);
+ break;
+ case ActionTypes$1.incrementSeconds:
+ this.manipulateAndSet(lastPicked, Unit.seconds);
+ break;
+ case ActionTypes$1.decrementHours:
+ this.manipulateAndSet(lastPicked, Unit.hours, -1);
+ break;
+ case ActionTypes$1.decrementMinutes:
+ this.manipulateAndSet(lastPicked, Unit.minutes, this.optionsStore.options.stepping * -1);
+ break;
+ case ActionTypes$1.decrementSeconds:
+ this.manipulateAndSet(lastPicked, Unit.seconds, -1);
+ break;
+ case ActionTypes$1.toggleMeridiem:
+ this.manipulateAndSet(lastPicked, Unit.hours, this.dates.lastPicked.hours >= 12 ? -12 : 12);
+ break;
+ case ActionTypes$1.togglePicker:
+ this.handleToggle(currentTarget);
+ 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.dateContainer);
+ //show clock
+ Collapse.showImmediately(this.display.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().setLocalization(this.optionsStore.options.localization);
+ this._eventEmitters.updateViewDate.emit(today);
+ //todo this this really a good idea?
+ if (this.validation.isValid(today, 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.');
+ /* ignore coverage: should never happen */
+ 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(Unit.hours);
+ break;
+ case ActionTypes$1.showMinutes:
+ classToUse = Namespace.css.minuteContainer;
+ this.display._update(Unit.minutes);
+ break;
+ case ActionTypes$1.showSeconds:
+ classToUse = Namespace.css.secondContainer;
+ this.display._update(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.isTwelveHour &&
+ !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);
+ }
+ }
+ handleSelectCalendarMode(action, currentTarget) {
+ 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);
+ }
+ }
+ handleToggle(currentTarget) {
+ 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();
+ }
+ handleSelectDay(currentTarget) {
+ const day = this.optionsStore.viewDate.clone;
+ if (currentTarget.classList.contains(Namespace.css.old)) {
+ day.manipulate(-1, Unit.month);
+ }
+ if (currentTarget.classList.contains(Namespace.css.new)) {
+ day.manipulate(1, Unit.month);
+ }
+ day.date = +currentTarget.dataset.day;
+ if (this.optionsStore.options.dateRange)
+ this.handleDateRange(day);
+ else if (this.optionsStore.options.multipleDates) {
+ this.handleMultiDate(day);
+ }
+ 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.optionsStore.options.dateRange) {
+ this.display.hide();
+ }
+ }
+ handleMultiDate(day) {
+ let index = this.dates.pickedIndex(day, Unit.date);
+ console.log(index);
+ if (index !== -1) {
+ this.dates.setValue(null, index); //deselect multi-date
+ }
+ else {
+ index = this.dates.lastPickedIndex + 1;
+ if (this.dates.picked.length === 0)
+ index = 0;
+ this.dates.setValue(day, index);
+ }
+ }
+ handleDateRange(day) {
+ switch (this.dates.picked.length) {
+ case 2: {
+ this.dates.clear();
+ break;
+ }
+ case 1: {
+ const other = this.dates.picked[0];
+ if (day.getTime() === other.getTime()) {
+ this.dates.clear();
+ break;
+ }
+ if (day.isBefore(other)) {
+ this.dates.setValue(day, 0);
+ this.dates.setValue(other, 1);
+ return;
+ }
+ else {
+ this.dates.setValue(day, 1);
+ return;
+ }
+ }
+ }
+ this.dates.setValue(day, 0);
+ }
+}
+
+/**
+ * A robust and powerful date/time picker component.
+ */
+class TempusDominus {
+ constructor(element, options = {}) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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 ||
+ this.optionsStore.options.dateRange) {
+ 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 ||
+ //if we just have the input and allow input toggle is enabled, then don't cause a toggle
+ (this._toggle.nodeName === 'INPUT' &&
+ this._toggle?.type === 'text' &&
+ this.optionsStore.options.allowInputToggle))
+ return;
+ this.toggle();
+ };
+ /**
+ * Event for when the toggle is clicked. This is a class level method so there's
+ * something for the remove listener function.
+ * @private
+ */
+ this._openClickEvent = () => {
+ if (this.optionsStore.element?.disabled ||
+ this.optionsStore.input?.disabled)
+ return;
+ if (!this.display.isVisible)
+ this.show();
+ };
+ 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.setLocalization(this.optionsStore.options.localization);
+ 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();
+ });
+ this._eventEmitters.updateViewDate.subscribe((dateTime) => {
+ this.viewDate = dateTime;
+ });
+ }
+ get viewDate() {
+ return this.optionsStore.viewDate;
+ }
+ set viewDate(value) {
+ this.optionsStore.viewDate = value;
+ this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization);
+ this.display._update(this.optionsStore.currentView === 'clock' ? 'clock' : 'calendar');
+ }
+ // 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.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization);
+ this.display.refreshCurrentView();
+ }
+ // 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 //eslint-disable-line @typescript-eslint/no-explicit-any
+ ) {
+ if (typeof eventTypes === 'string') {
+ eventTypes = [eventTypes];
+ }
+ let callBackArray; //eslint-disable-line @typescript-eslint/no-explicit-any
+ 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._eventEmitters.destroy();
+ this.optionsStore.input?.removeEventListener('change', this._inputChangeEvent);
+ if (this.optionsStore.options.allowInputToggle) {
+ this.optionsStore.input?.removeEventListener('click', this._openClickEvent);
+ this.optionsStore.input?.removeEventListener('focus', this._openClickEvent);
+ }
+ 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) {
+ const 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(
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ new CustomEvent('change', { detail: event }));
+ }
+ this.optionsStore.element.dispatchEvent(
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ new CustomEvent(event.type, { detail: event }));
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (window.jQuery) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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.setLocalization(newConfig.localization);
+ 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 &&
+ newConfig.localization.hourCycle === undefined)
+ newConfig.localization.hourCycle = 'h24';
+ else if (newConfig.localization.hourCycle === undefined) {
+ newConfig.localization.hourCycle = guessHourCycle(newConfig.localization.locale);
+ }
+ this.optionsStore.options = newConfig;
+ if (newConfig.restrictions.maxDate &&
+ this.viewDate.isAfter(newConfig.restrictions.maxDate))
+ this.viewDate = newConfig.restrictions.maxDate;
+ if (newConfig.restrictions.minDate &&
+ this.viewDate.isBefore(newConfig.restrictions.minDate))
+ this.viewDate = newConfig.restrictions.minDate;
+ }
+ /**
+ * 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 {
+ const 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;
+ if (!this.optionsStore.input.value && this.optionsStore.options.defaultDate)
+ this.optionsStore.input.value = this.dates.formatInput(this.optionsStore.options.defaultDate);
+ this.optionsStore.input.addEventListener('change', this._inputChangeEvent);
+ if (this.optionsStore.options.allowInputToggle) {
+ this.optionsStore.input.addEventListener('click', this._openClickEvent);
+ this.optionsStore.input.addEventListener('focus', this._openClickEvent);
+ }
+ 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.multipleDates ||
+ 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('[data-action="togglePicker"]'),
+ },
+ 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) => {
+ const 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 = undefined) {
+ if (!plugin)
+ return tempusDominus;
+ if (!plugin.installed) {
+ // install plugin only once
+ plugin(option, { TempusDominus, Dates, Display, DateTime, Namespace }, tempusDominus);
+ plugin.installed = true;
+ }
+ return tempusDominus;
+};
+const version = '6.7.19';
+const tempusDominus = {
+ TempusDominus,
+ extend,
+ loadLocale,
+ locale,
+ Namespace,
+ DefaultOptions,
+ DateTime,
+ Unit,
+ version,
+ DefaultEnLocalization,
+};
+
+export { DateTime, DefaultEnLocalization, DefaultOptions, Namespace, TempusDominus, Unit, extend, loadLocale, locale, version };
+//# sourceMappingURL=tempus-dominus.esm.js.map
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js.map b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js.map
new file mode 100644
index 0000000..4e51d2a
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"tempus-dominus.esm.js","sources":["../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/default-format-localization.ts","../../src/js/datetime.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/typeChecker.ts","../../src/js/utilities/optionProcessor.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 class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRange(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalid string or an invalid Date object.\n * @param optionName\n * @param date\n * @param soft If true, logs a warning instead of an error.\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n failedToParseDate(optionName: string, date: any, soft = false) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\n );\n error.code = 5;\n if (!soft) throw error;\n console.warn(error);\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * customDateFormat errors\n */\n customDateFormatError(message?: string) {\n const error = new TdError(`${this.base} Custom Date Format: ${message}`);\n error.code = 9;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`\n );\n }\n\n deprecatedWarning(message: string, remediation?: string) {\n console.warn(\n `${this.base} Warning ${message} is deprecated and will be removed in a future version. ${remediation}`\n );\n }\n\n throwError(message) {\n const error = new TdError(`${this.base} ${message}`);\n error.code = 9;\n throw error;\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decade container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n rangeIn = 'range-in';\n rangeStart = 'range-start';\n rangeEnd = 'range-end';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n /**\n * Applied AM/PM toggle button.\n */\n toggleMeridiem = 'toggleMeridiem';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n\n /**\n * Applied to the widget when the option display.theme is light.\n */\n lightTheme = 'light';\n\n /**\n * Applied to the widget when the option display.theme is dark.\n */\n darkTheme = 'dark';\n\n /**\n * Used for detecting if the system color preference is dark mode\n */\n isDarkPreferredQuery = '(prefers-color-scheme: dark)';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { FormatLocalization } from './options';\n\nconst DefaultFormatLocalization: FormatLocalization = {\n dateFormats: {\n LTS: 'h:mm:ss T',\n LT: 'h:mm T',\n L: 'MM/dd/yyyy',\n LL: 'MMMM d, yyyy',\n LLL: 'MMMM d, yyyy h:mm T',\n LLLL: 'dddd, MMMM d, yyyy h:mm T',\n },\n format: 'L LT',\n locale: 'default',\n hourCycle: undefined,\n ordinal: (n) => {\n const s = ['th', 'st', 'nd', 'rd'];\n const v = n % 100;\n return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`;\n },\n};\n\nexport default { ...DefaultFormatLocalization };\n","import { FormatLocalization } from './utilities/options';\nimport Namespace from './utilities/namespace';\nimport DefaultFormatLocalization from './utilities/default-format-localization';\n\ntype parsedTime = {\n afternoon?: boolean;\n year?: number;\n month?: number;\n day?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n milliseconds?: number;\n zone?: {\n offset: number;\n };\n};\n\nexport enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\nconst twoDigitTemplate = {\n month: '2-digit',\n day: '2-digit',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n};\n\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n numberingSystem?: string;\n}\n\n/**\n * Returns an Intl format object based on the provided object\n * @param unit\n */\nexport const getFormatByUnit = (unit: Unit): object => {\n switch (unit) {\n case 'date':\n return { dateStyle: 'short' };\n case 'month':\n return {\n month: 'numeric',\n year: 'numeric',\n };\n case 'year':\n return { year: 'numeric' };\n }\n};\n\n/**\n * Attempts to guess the hour cycle of the given local\n * @param locale\n */\nexport const guessHourCycle = (locale: string): Intl.LocaleHourCycleKey => {\n if (!locale) return 'h12';\n\n // noinspection SpellCheckingInspection\n const template = {\n hour: '2-digit',\n minute: '2-digit',\n numberingSystem: 'latn',\n };\n\n const dt = new DateTime().setLocalization({ locale });\n dt.hours = 0;\n\n const start = dt.parts(undefined, template).hour;\n\n //midnight is 12 so en-US style 12 AM\n if (start === '12') return 'h12';\n //midnight is 24 is from 00-24\n if (start === '24') return 'h24';\n\n dt.hours = 23;\n const end = dt.parts(undefined, template).hour;\n\n //if midnight is 00 and hour 23 is 11 then\n if (start === '00' && end === '11') return 'h11';\n\n if (start === '00' && end === '23') return 'h23';\n\n console.warn(\n `couldn't determine hour cycle for ${locale}. start: ${start}. end: ${end}`\n );\n\n return undefined;\n};\n\ninterface FormatMatch {\n parser: (obj: parsedTime, input: number) => void;\n pattern?: RegExp;\n}\n\ninterface FormatMatchString {\n parser: (obj: parsedTime, input: string) => void;\n pattern?: RegExp;\n}\n\ninterface FormatExpression {\n t: FormatMatchString;\n T: FormatMatchString;\n fff: FormatMatch;\n s: FormatMatch;\n ss: FormatMatch;\n m: FormatMatch;\n mm: FormatMatch;\n H: FormatMatch;\n h: FormatMatch;\n HH: FormatMatch;\n hh: FormatMatch;\n d: FormatMatch;\n dd: FormatMatch;\n Do: FormatMatchString;\n M: FormatMatch;\n MM: FormatMatch;\n MMM: FormatMatchString;\n MMMM: FormatMatchString;\n y: FormatMatch;\n yy: FormatMatch;\n yyyy: FormatMatch;\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n localization: FormatLocalization = DefaultFormatLocalization;\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n * @deprecated use setLocalization with a FormatLocalization object instead\n */\n setLocale(value: string): this {\n if (!this.localization) {\n this.localization = DefaultFormatLocalization;\n this.localization.locale = value;\n }\n return this;\n }\n\n /**\n * Chainable way to set the {@link localization}\n * @param value\n */\n setLocalization(value: FormatLocalization): this {\n this.localization = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n * @param locale this parameter is deprecated. Use formatLocalization instead.\n * @param formatLocalization\n */\n static convert(\n date: Date,\n locale = 'default',\n formatLocalization: FormatLocalization = undefined\n ): DateTime {\n if (!date) throw new Error(`A date is required`);\n\n if (!formatLocalization) {\n formatLocalization = DefaultFormatLocalization;\n formatLocalization.locale = locale;\n }\n\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ).setLocalization(formatLocalization);\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocalization(this.localization);\n }\n\n static isValid(d): boolean {\n if (d === undefined || JSON.stringify(d) === 'null') return false;\n if (d.constructor.name === DateTime.name) return true;\n return false;\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n * @param startOfTheWeek Allows for the changing the start of the week.\n */\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay': {\n this.startOf(Unit.date);\n if (this.weekDay === startOfTheWeek) break;\n const goBack = (this.weekDay - startOfTheWeek + 7) % 7;\n this.manipulate(goBack * -1, Unit.date);\n break;\n }\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n * @param startOfTheWeek\n */\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay': {\n this.endOf(Unit.date);\n const endOfWeek = 6 + startOfTheWeek;\n if (this.weekDay === endOfWeek) break;\n this.manipulate(endOfWeek - this.weekDay, Unit.date);\n break;\n }\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.setMonth(11, 31);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n this[unit] += value;\n return this;\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparison.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n // If the comparisons is undefined, return false\n if (!DateTime.isValid(compare)) return false;\n\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparison.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n // If the comparisons is undefined, return false\n if (!DateTime.isValid(compare)) return false;\n\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparison.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n // If the comparisons is undefined, return false\n if (!DateTime.isValid(compare)) return false;\n\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n // If one of the comparisons is undefined, return false\n if (!DateTime.isValid(left) || !DateTime.isValid(right)) return false;\n // If a unit is provided and is not a valid property of the DateTime object, throw an error\n if (unit && this[unit] === undefined) {\n throw new Error(`Unit '${unit}' is not valid`);\n }\n\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n const isLeftInRange = leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit);\n const isRightInRange = rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit);\n\n return isLeftInRange && isRightInRange;\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.localization.locale,\n template: Record = { dateStyle: 'full', timeStyle: 'long' }\n ): Record {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).second;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit minutes\n */\n get minutesFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).minute;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hour, e.g. 01...10\n * @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.\n */\n getHoursFormatted(hourCycle: Intl.LocaleHourCycleKey = 'h12') {\n return this.parts(undefined, { ...twoDigitTemplate, hourCycle: hourCycle })\n .hour;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.localization.locale): string {\n return new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true,\n })\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).day;\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n const targetMonth = new Date(this.year, value + 1);\n targetMonth.setDate(0);\n const endOfMonth = targetMonth.getDate();\n if (this.date > endOfMonth) {\n this.date = endOfMonth;\n }\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).month;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n\n // borrowed a bunch of stuff from Luxon\n /**\n * Gets the week of the year\n */\n get week(): number {\n const ordinal = this.computeOrdinal(),\n weekday = this.getUTCDay();\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\n\n if (weekNumber < 1) {\n weekNumber = this.weeksInWeekYear();\n } else if (weekNumber > this.weeksInWeekYear()) {\n weekNumber = 1;\n }\n\n return weekNumber;\n }\n\n /**\n * Returns the number of weeks in the year\n */\n weeksInWeekYear() {\n const p1 =\n (this.year +\n Math.floor(this.year / 4) -\n Math.floor(this.year / 100) +\n Math.floor(this.year / 400)) %\n 7,\n last = this.year - 1,\n p2 =\n (last +\n Math.floor(last / 4) -\n Math.floor(last / 100) +\n Math.floor(last / 400)) %\n 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n }\n\n /**\n * Returns true or false depending on if the year is a leap year or not.\n */\n get isLeapYear() {\n return (\n this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0)\n );\n }\n\n private computeOrdinal() {\n return (\n this.date +\n (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month]\n );\n }\n\n private nonLeapLadder = [\n 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,\n ];\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\n //#region CDF stuff\n\n private dateTimeRegex =\n //is regex cannot be simplified beyond what it already is\n /(\\[[^[\\]]*])|y{1,4}|M{1,4}|d{1,4}|H{1,2}|h{1,2}|t|T|m{1,2}|s{1,2}|f{3}/g; //NOSONAR\n\n private formattingTokens =\n /(\\[[^[\\]]*])|([-_:/.,()\\s]+)|(T|t|yyyy|yy?|MM?M?M?|Do|dd?|hh?|HH?|mm?|ss?)/g; //NOSONAR is regex cannot be simplified beyond what it already is\n\n /**\n * Returns a list of month values based on the current locale\n */\n private getAllMonths(\n format: '2-digit' | 'numeric' | 'long' | 'short' | 'narrow' = 'long'\n ) {\n const applyFormat = new Intl.DateTimeFormat(this.localization.locale, {\n month: format,\n }).format;\n return [...Array(12).keys()].map((m) => applyFormat(new Date(2021, m)));\n }\n\n /**\n * Replaces an expanded token set (e.g. LT/LTS)\n */\n private replaceTokens(formatStr, formats) {\n /***\n * _ => match\n * a => first capture group. Anything between [ and ]\n * b => second capture group\n */\n return formatStr.replace(\n /(\\[[^[\\]]*])|(LTS?|l{1,4}|L{1,4})/g,\n (_, a, b) => {\n const B = b && b.toUpperCase();\n return a || formats[B] || DefaultFormatLocalization.dateFormats[B];\n }\n );\n }\n\n private match2 = /\\d\\d/; // 00 - 99\n private match3 = /\\d{3}/; // 000 - 999\n private match4 = /\\d{4}/; // 0000 - 9999\n private match1to2 = /\\d\\d?/; // 0 - 99\n private matchSigned = /[+-]?\\d+/; // -inf - inf\n private matchOffset = /[+-]\\d\\d:?(\\d\\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z\n private matchWord = /[^\\d_:/,\\-()\\s]+/; // Word\n\n private parseTwoDigitYear(input: number) {\n return input + (input > 68 ? 1900 : 2000);\n }\n\n private offsetFromString(input: string) {\n if (!input) return 0;\n if (input === 'Z') return 0;\n const [first, second, third] = input.match(/([+-]|\\d\\d)/g);\n const minutes = +second * 60 + (+third || 0);\n const signed = first === '+' ? -minutes : minutes;\n return minutes === 0 ? 0 : signed; // eslint-disable-line no-nested-ternary\n }\n\n /**\n * z = -4, zz = -04, zzz = -0400\n * @param date\n * @param style\n * @private\n */\n private zoneInformation(date: DateTime, style: 'z' | 'zz' | 'zzz') {\n let name = date\n .parts(this.localization.locale, { timeZoneName: 'longOffset' })\n .timeZoneName.replace('GMT', '')\n .replace(':', '');\n\n const negative = name.includes('-');\n\n name = name.replace('-', '');\n\n if (style === 'z') name = name.substring(1, 2);\n else if (style === 'zz') name = name.substring(0, 2);\n\n return `${negative ? '-' : ''}${name}`;\n }\n\n private zoneExpressions = [\n this.matchOffset,\n (obj, input) => {\n obj.offset = this.offsetFromString(input);\n },\n ];\n\n private addInput(property) {\n return (obj, input) => {\n obj[property] = +input;\n };\n }\n\n private getLocaleAfternoon(): string {\n return new Intl.DateTimeFormat(this.localization.locale, {\n hour: 'numeric',\n hour12: true,\n })\n .formatToParts(new Date(2022, 3, 4, 13))\n .find((p) => p.type === 'dayPeriod')\n ?.value?.replace(/\\s+/g, ' ');\n }\n\n private meridiemMatch(input: string) {\n return input.toLowerCase() === this.getLocaleAfternoon().toLowerCase();\n }\n\n private expressions: FormatExpression = {\n t: {\n pattern: undefined, //this.matchWord,\n parser: (obj, input) => {\n obj.afternoon = this.meridiemMatch(input);\n },\n },\n T: {\n pattern: undefined, //this.matchWord,\n parser: (obj, input) => {\n obj.afternoon = this.meridiemMatch(input);\n },\n },\n fff: {\n pattern: this.match3,\n parser: (obj, input) => {\n obj.milliseconds = +input;\n },\n },\n s: {\n pattern: this.match1to2,\n parser: this.addInput('seconds'),\n },\n ss: {\n pattern: this.match1to2,\n parser: this.addInput('seconds'),\n },\n m: {\n pattern: this.match1to2,\n parser: this.addInput('minutes'),\n },\n mm: {\n pattern: this.match1to2,\n parser: this.addInput('minutes'),\n },\n H: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n h: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n HH: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n hh: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n d: {\n pattern: this.match1to2,\n parser: this.addInput('day'),\n },\n dd: {\n pattern: this.match2,\n parser: this.addInput('day'),\n },\n Do: {\n pattern: this.matchWord,\n parser: (obj, input) => {\n obj.day = +(input.match(/\\d+/)[0] || 1);\n if (!this.localization.ordinal) return;\n for (let i = 1; i <= 31; i += 1) {\n if (this.localization.ordinal(i).replace(/[[\\]]/g, '') === input) {\n obj.day = i;\n }\n }\n },\n },\n M: {\n pattern: this.match1to2,\n parser: this.addInput('month'),\n },\n MM: {\n pattern: this.match2,\n parser: this.addInput('month'),\n },\n MMM: {\n pattern: this.matchWord,\n parser: (obj, input) => {\n const months = this.getAllMonths();\n const monthsShort = this.getAllMonths('short');\n const matchIndex =\n (monthsShort || months.map((_) => _.slice(0, 3))).indexOf(input) + 1;\n if (matchIndex < 1) {\n throw new Error();\n }\n obj.month = matchIndex % 12 || matchIndex;\n },\n },\n MMMM: {\n pattern: this.matchWord,\n parser: (obj, input) => {\n const months = this.getAllMonths();\n const matchIndex = months.indexOf(input) + 1;\n if (matchIndex < 1) {\n throw new Error();\n }\n obj.month = matchIndex % 12 || matchIndex;\n },\n },\n y: {\n pattern: this.matchSigned,\n parser: this.addInput('year'),\n },\n yy: {\n pattern: this.match2,\n parser: (obj, input) => {\n obj.year = this.parseTwoDigitYear(+input);\n },\n },\n yyyy: {\n pattern: this.match4,\n parser: this.addInput('year'),\n },\n // z: this.zoneExpressions,\n // zz: this.zoneExpressions,\n // zzz: this.zoneExpressions\n };\n\n private correctHours(time) {\n const { afternoon } = time;\n if (afternoon !== undefined) {\n const { hours } = time;\n if (afternoon) {\n if (hours < 12) {\n time.hours += 12;\n }\n } else if (hours === 12) {\n time.hours = 0;\n }\n delete time.afternoon;\n }\n }\n\n private makeParser(format: string) {\n format = this.replaceTokens(format, this.localization.dateFormats);\n const matchArray = format.match(this.formattingTokens);\n const { length } = matchArray;\n const expressionArray: (FormatMatch | string)[] = [];\n for (let i = 0; i < length; i += 1) {\n const token = matchArray[i];\n const expression = this.expressions[token] as FormatMatch;\n if (expression?.parser) {\n expressionArray[i] = expression;\n } else {\n expressionArray[i] = (token as string).replace(/^\\[[^[\\]]*]$/g, '');\n }\n }\n\n return (input: string): parsedTime => {\n const time = {\n hours: 0,\n minutes: 0,\n seconds: 0,\n milliseconds: 0,\n };\n for (let i = 0, start = 0; i < length; i += 1) {\n const token = expressionArray[i];\n if (typeof token === 'string') {\n start += token.length;\n } else {\n const part = input.slice(start);\n let value = part;\n\n if (token.pattern) {\n const match = token.pattern.exec(part);\n value = match[0];\n }\n token.parser.call(this, time, value);\n input = input.replace(value, '');\n }\n }\n this.correctHours(time);\n return time;\n };\n }\n\n /**\n * Attempts to create a DateTime from a string.\n * @param input date as string\n * @param localization provides the date template the string is in via the format property\n */\n //eslint-disable-next-line @typescript-eslint/no-unused-vars\n static fromString(input: string, localization: FormatLocalization): DateTime {\n if (!localization?.format) {\n Namespace.errorMessages.customDateFormatError('No format was provided');\n }\n try {\n const dt = new DateTime();\n dt.setLocalization(localization);\n if (['x', 'X'].indexOf(localization.format) > -1)\n return new DateTime((localization.format === 'X' ? 1000 : 1) * +input);\n\n input = input.replace(/\\s+/g, ' ');\n const parser = dt.makeParser(localization.format);\n const { year, month, day, hours, minutes, seconds, milliseconds, zone } =\n parser(input);\n const d = day || (!year && !month ? dt.getDate() : 1);\n const y = year || dt.getFullYear();\n let M = 0;\n if (!(year && !month)) {\n M = month > 0 ? month - 1 : dt.getMonth();\n }\n if (zone) {\n return new DateTime(\n Date.UTC(\n y,\n M,\n d,\n hours,\n minutes,\n seconds,\n milliseconds + zone.offset * 60 * 1000\n )\n );\n }\n return new DateTime(y, M, d, hours, minutes, seconds, milliseconds);\n } catch (e) {\n Namespace.errorMessages.customDateFormatError(\n `Unable to parse provided input: ${input}, format: ${localization.format}`\n );\n }\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An optional object. If provided, method will use Intl., otherwise the localizations format properties\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(\n template?: DateTimeFormatOptions | string,\n locale = this.localization.locale\n ): string {\n if (template && typeof template === 'object')\n return new Intl.DateTimeFormat(locale, template).format(this);\n\n const formatString = this.replaceTokens(\n //try template first\n template ||\n //otherwise try localization format\n this.localization.format ||\n //otherwise try date + time\n `${DefaultFormatLocalization.dateFormats.L}, ${DefaultFormatLocalization.dateFormats.LT}`,\n this.localization.dateFormats\n );\n\n const formatter = (template) =>\n new Intl.DateTimeFormat(this.localization.locale, template).format(this);\n\n if (!this.localization.hourCycle)\n this.localization.hourCycle = guessHourCycle(this.localization.locale);\n\n //if the format asks for a twenty-four-hour string but the hour cycle is not, then make a base guess\n const HHCycle = this.localization.hourCycle.startsWith('h1')\n ? 'h24'\n : this.localization.hourCycle;\n const hhCycle = this.localization.hourCycle.startsWith('h2')\n ? 'h12'\n : this.localization.hourCycle;\n\n const matches = {\n y: this.year,\n yy: formatter({ year: '2-digit' }),\n yyyy: this.year,\n M: formatter({ month: 'numeric' }),\n MM: this.monthFormatted,\n MMM: this.getAllMonths('short')[this.getMonth()],\n MMMM: this.getAllMonths()[this.getMonth()],\n d: this.date,\n dd: this.dateFormatted,\n ddd: formatter({ weekday: 'short' }),\n dddd: formatter({ weekday: 'long' }),\n H: this.getHours(),\n HH: this.getHoursFormatted(HHCycle),\n h: this.hours > 12 ? this.hours - 12 : this.hours,\n hh: this.getHoursFormatted(hhCycle),\n t: this.meridiem(),\n T: this.meridiem().toUpperCase(),\n m: this.minutes,\n mm: this.minutesFormatted,\n s: this.seconds,\n ss: this.secondsFormatted,\n fff: this.getMilliseconds(),\n // z: this.zoneInformation(dateTime, 'z'), //-4\n // zz: this.zoneInformation(dateTime, 'zz'), //-04\n // zzz: this.zoneInformation(dateTime, 'zzz') //-0400\n };\n\n return formatString\n .replace(this.dateTimeRegex, (match, $1) => {\n return $1 || matches[match];\n })\n .replace(/\\[/g, '')\n .replace(/]/g, '');\n }\n\n //#endregion CDF stuff\n}\n","//eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare type Constructable = new (...args: any[]) => T;\n\nclass ServiceLocator {\n private cache: Map, unknown | symbol> = new Map();\n\n locate(identifier: Constructable): T {\n const service = this.cache.get(identifier);\n if (service) return service as T;\n const value = new identifier();\n this.cache.set(identifier, value);\n return value;\n }\n}\nexport const setupServiceLocator = () => {\n serviceLocator = new ServiceLocator();\n};\n\nexport let serviceLocator: ServiceLocator;\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';\nimport CalendarModes from './calendar-modes';\nimport ViewMode from './view-mode';\nimport Options from './options';\n\nexport class OptionsStore {\n options: Options;\n element: HTMLElement;\n input: HTMLInputElement;\n unset: boolean;\n private _currentCalendarViewMode = 0;\n\n get currentCalendarViewMode() {\n return this._currentCalendarViewMode;\n }\n\n set currentCalendarViewMode(value) {\n this._currentCalendarViewMode = value;\n this.currentView = CalendarModes[value].name;\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n set viewDate(v) {\n this._viewDate = v;\n if (this.options) this.options.viewDate = v;\n }\n\n /**\n * When switching back to the calendar from the clock,\n * this sets currentView to the correct calendar view.\n */\n refreshCurrentView() {\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\n }\n\n minimumCalendarViewMode = 0;\n currentView: keyof ViewMode = 'calendar';\n\n get isTwelveHour() {\n return ['h12', 'h11'].includes(this.options.localization.hourCycle);\n }\n}\n","import { DateTime, Unit } from './datetime';\nimport { serviceLocator } from './utilities/service-locator';\nimport { OptionsStore } from './utilities/optionsStore';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private optionsStore: OptionsStore;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provided to check portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (!this._enabledDisabledDatesIsValid(granularity, targetDate))\n return false;\n\n if (\n granularity !== Unit.month &&\n granularity !== Unit.year &&\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n )\n return false;\n\n if (!this._minMaxIsValid(granularity, targetDate)) return false;\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (!this._enabledDisabledHoursIsValid(targetDate)) return false;\n\n if (\n this.optionsStore.options.restrictions.disabledTimeIntervals?.filter(\n (internal) => targetDate.isBetween(internal.from, internal.to)\n ).length !== 0\n )\n return false;\n }\n\n return true;\n }\n\n private _enabledDisabledDatesIsValid(\n granularity: Unit,\n targetDate: DateTime\n ): boolean {\n if (granularity !== Unit.date) return true;\n\n if (\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n\n // noinspection RedundantIfStatementJS\n if (\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.disabledDates ||\n this.optionsStore.options.restrictions.disabledDates.length === 0\n )\n return false;\n\n return !!this.optionsStore.options.restrictions.disabledDates.find((x) =>\n x.isSame(testDate, Unit.date)\n );\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.enabledDates ||\n this.optionsStore.options.restrictions.enabledDates.length === 0\n )\n return true;\n\n return !!this.optionsStore.options.restrictions.enabledDates.find((x) =>\n x.isSame(testDate, Unit.date)\n );\n }\n\n private _minMaxIsValid(granularity: Unit, targetDate: DateTime) {\n if (\n this.optionsStore.options.restrictions.minDate &&\n targetDate.isBefore(\n this.optionsStore.options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n\n // noinspection RedundantIfStatementJS\n if (\n this.optionsStore.options.restrictions.maxDate &&\n targetDate.isAfter(\n this.optionsStore.options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n return true;\n }\n\n private _enabledDisabledHoursIsValid(targetDate) {\n if (\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n\n // noinspection RedundantIfStatementJS\n if (\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.disabledHours ||\n this.optionsStore.options.restrictions.disabledHours.length === 0\n )\n return false;\n\n const formattedDate = testDate.hours;\n return this.optionsStore.options.restrictions.disabledHours.includes(\n formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.enabledHours ||\n this.optionsStore.options.restrictions.enabledHours.length === 0\n )\n return true;\n\n const formattedDate = testDate.hours;\n return this.optionsStore.options.restrictions.enabledHours.includes(\n formattedDate\n );\n }\n\n dateRangeIsValid(dates: DateTime[], index: number, target: DateTime) {\n // if we're not using the option, then return valid\n if (!this.optionsStore.options.dateRange) return true;\n\n // if we've only selected 0..1 dates, and we're not setting the end date\n // then return valid. We only want to validate the range if both are selected,\n // because the other validation on the target has already occurred.\n if (dates.length !== 2 && index !== 1) return true;\n\n // initialize start date\n const start = dates[0].clone;\n // check if start date is not the same as target date\n if (start.isSame(target, Unit.date)) return true;\n\n // add one day to start; start has already been validated\n start.manipulate(1, Unit.date);\n\n // check each date in the range to make sure it's valid\n while (!start.isSame(target, Unit.date)) {\n const valid = this.isValid(start, Unit.date);\n if (!valid) return false;\n start.manipulate(1, Unit.date);\n }\n\n return true;\n }\n}\n","import { DateTime, Unit } from '../datetime';\nimport ActionTypes from './action-types';\nimport { BaseEvent } from './event-types';\n\nexport type ViewUpdateValues = Unit | 'decade' | 'clock' | 'calendar' | 'all';\n\nclass EventEmitter {\n private subscribers: ((value?: T) => void)[] = [];\n\n subscribe(callback: (value: T) => void) {\n this.subscribers.push(callback);\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\n }\n\n unsubscribe(index: number) {\n this.subscribers.splice(index, 1);\n }\n\n emit(value?: T) {\n this.subscribers.forEach((callback) => {\n callback(value);\n });\n }\n\n destroy() {\n this.subscribers = null;\n this.subscribers = [];\n }\n}\n\nexport class EventEmitters {\n triggerEvent = new EventEmitter();\n viewUpdate = new EventEmitter();\n updateDisplay = new EventEmitter();\n action = new EventEmitter<{ e: any; action?: ActionTypes }>(); //eslint-disable-line @typescript-eslint/no-explicit-any\n updateViewDate = new EventEmitter();\n\n destroy() {\n this.triggerEvent.destroy();\n this.viewUpdate.destroy();\n this.updateDisplay.destroy();\n this.action.destroy();\n this.updateViewDate.destroy();\n }\n}\n","import Options, { Localization } from './options';\nimport { DateTime } from '../datetime';\nimport DefaultFormatLocalization from './default-format-localization';\n\nconst defaultEnLocalization: Localization = {\n clear: 'Clear selection',\n close: 'Close the picker',\n dateFormats: DefaultFormatLocalization.dateFormats,\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\n decrementHour: 'Decrement Hour',\n decrementMinute: 'Decrement Minute',\n decrementSecond: 'Decrement Second',\n format: DefaultFormatLocalization.format,\n hourCycle: DefaultFormatLocalization.hourCycle,\n incrementHour: 'Increment Hour',\n incrementMinute: 'Increment Minute',\n incrementSecond: 'Increment Second',\n locale: DefaultFormatLocalization.locale,\n maxWeekdayLength: 0,\n nextCentury: 'Next Century',\n nextDecade: 'Next Decade',\n nextMonth: 'Next Month',\n nextYear: 'Next Year',\n ordinal: DefaultFormatLocalization.ordinal,\n pickHour: 'Pick Hour',\n pickMinute: 'Pick Minute',\n pickSecond: 'Pick Second',\n previousCentury: 'Previous Century',\n previousDecade: 'Previous Decade',\n previousMonth: 'Previous Month',\n previousYear: 'Previous Year',\n selectDate: 'Select Date',\n selectDecade: 'Select Decade',\n selectMonth: 'Select Month',\n selectTime: 'Select Time',\n selectYear: 'Select Year',\n startOfTheWeek: 0,\n today: 'Go to today',\n toggleMeridiem: 'Toggle Meridiem',\n};\n\nconst DefaultOptions: Options = {\n allowInputToggle: false,\n container: undefined,\n dateRange: false,\n debug: false,\n defaultDate: undefined,\n display: {\n icons: {\n type: 'icons',\n time: 'fa-solid fa-clock',\n date: 'fa-solid fa-calendar',\n up: 'fa-solid fa-arrow-up',\n down: 'fa-solid fa-arrow-down',\n previous: 'fa-solid fa-chevron-left',\n next: 'fa-solid fa-chevron-right',\n today: 'fa-solid fa-calendar-check',\n clear: 'fa-solid fa-trash',\n close: 'fa-solid fa-xmark',\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false,\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: undefined,\n },\n inline: false,\n theme: 'auto',\n placement: 'bottom',\n },\n keepInvalid: false,\n localization: defaultEnLocalization,\n meta: {},\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: [],\n },\n stepping: 1,\n useCurrent: true,\n viewDate: new DateTime(),\n};\n\nexport default DefaultOptions;\nexport const DefaultEnLocalization = { ...defaultEnLocalization };\n","import Namespace from './namespace';\nimport { DateTime } from '../datetime';\nimport { FormatLocalization } from './options';\nimport DefaultFormatLocalization from './default-format-localization';\n\n/**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @param localization object containing locale and format settings. Only used with the custom formats\n * @private\n */\nexport function tryConvertToDateTime(\n this: void,\n d: DateTime | Date | string,\n localization: FormatLocalization\n): DateTime | null {\n if (!d) return null;\n if (d.constructor.name === DateTime.name) return d as DateTime;\n if (d.constructor.name === Date.name) {\n return DateTime.convert(d as Date);\n }\n if (typeof d === typeof '') {\n const dateTime = DateTime.fromString(d as unknown as string, localization);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n}\n\n/**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param localization object containing locale and format settings. Only used with the custom formats\n */\nexport function convertToDateTime(\n this: void,\n d: DateTime | Date | string,\n optionName: string,\n localization: FormatLocalization\n): DateTime {\n if (typeof d === typeof '' && optionName !== 'input') {\n Namespace.errorMessages.dateString();\n }\n\n const converted = tryConvertToDateTime(d, localization);\n\n if (!converted) {\n Namespace.errorMessages.failedToParseDate(\n optionName,\n d,\n optionName === 'input'\n );\n }\n return converted;\n}\n\n/**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n * @param localization\n */\nexport function typeCheckDateArray(\n this: void,\n optionName: string,\n value: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string,\n localization: FormatLocalization = DefaultFormatLocalization\n) {\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n const d = value[i];\n const dateTime = convertToDateTime(d, optionName, localization);\n dateTime.setLocalization(localization);\n value[i] = dateTime;\n }\n}\n\n/**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\nexport function typeCheckNumberArray(\n this: void,\n optionName: string,\n value: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string\n) {\n if (!Array.isArray(value) || value.some((x) => typeof x !== typeof 0)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n}\n","import Namespace from './namespace';\nimport type { FormatLocalization } from './options';\nimport {\n convertToDateTime,\n typeCheckNumberArray,\n typeCheckDateArray,\n} from './typeChecker';\n\ninterface OptionProcessorFunctionArguments {\n key: string;\n value: any; //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string;\n defaultType: string;\n path: string;\n localization: FormatLocalization;\n}\n\ntype OptionProcessorFunction = (\n this: void,\n args: OptionProcessorFunctionArguments\n) => any; //eslint-disable-line @typescript-eslint/no-explicit-any\n\nfunction mandatoryDate(key: string): OptionProcessorFunction {\n return ({ value, providedType, localization }) => {\n const dateTime = convertToDateTime(value, key, localization);\n if (dateTime !== undefined) {\n dateTime.setLocalization(localization);\n return dateTime;\n }\n };\n}\n\nfunction optionalDate(key: string): OptionProcessorFunction {\n const mandatory = mandatoryDate(key);\n return (args) => {\n if (args.value === undefined) {\n return args.value;\n }\n return mandatory(args);\n };\n}\n\nfunction numbersInRange(\n key: string,\n lower: number,\n upper: number\n): OptionProcessorFunction {\n return ({ value, providedType }) => {\n if (value === undefined) {\n return [];\n }\n typeCheckNumberArray(key, value, providedType);\n if ((value as number[]).some((x) => x < lower || x > upper))\n Namespace.errorMessages.numbersOutOfRange(key, lower, upper);\n return value;\n };\n}\n\nfunction validHourRange(key: string): OptionProcessorFunction {\n return numbersInRange(key, 0, 23);\n}\n\nfunction validDateArray(key: string): OptionProcessorFunction {\n return ({ value, providedType, localization }) => {\n if (value === undefined) {\n return [];\n }\n typeCheckDateArray(key, value, providedType, localization);\n return value;\n };\n}\n\nfunction validKeyOption(keyOptions: string[]): OptionProcessorFunction {\n return ({ value, path }) => {\n if (!keyOptions.includes(value))\n Namespace.errorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n return value;\n };\n}\n\nconst optionProcessors: { [key: string]: OptionProcessorFunction } =\n Object.freeze({\n defaultDate: mandatoryDate('defaultDate'),\n viewDate: mandatoryDate('viewDate'),\n minDate: optionalDate('restrictions.minDate'),\n maxDate: optionalDate('restrictions.maxDate'),\n disabledHours: validHourRange('restrictions.disabledHours'),\n enabledHours: validHourRange('restrictions.enabledHours'),\n disabledDates: validDateArray('restrictions.disabledDates'),\n enabledDates: validDateArray('restrictions.enabledDates'),\n daysOfWeekDisabled: numbersInRange('restrictions.daysOfWeekDisabled', 0, 6),\n disabledTimeIntervals: ({ key, value, providedType, localization }) => {\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[]; //eslint-disable-line @typescript-eslint/no-explicit-any\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n const d = valueObject[i][vk];\n const dateTime = convertToDateTime(d, subOptionName, localization);\n dateTime.setLocalization(localization);\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n },\n toolbarPlacement: validKeyOption(['top', 'bottom', 'default']),\n type: validKeyOption(['icons', 'sprites']),\n viewMode: validKeyOption([\n 'clock',\n 'calendar',\n 'months',\n 'years',\n 'decades',\n ]),\n theme: validKeyOption(['light', 'dark', 'auto']),\n placement: validKeyOption(['top', 'bottom']),\n meta: ({ value }) => value,\n dayViewHeaderFormat: ({ value }) => value,\n container: ({ value, path }) => {\n if (\n value &&\n !(\n value instanceof HTMLElement ||\n value instanceof Element ||\n value?.appendChild\n )\n ) {\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n typeof value,\n 'HTMLElement'\n );\n }\n return value;\n },\n useTwentyfourHour: ({ value, path, providedType, defaultType }) => {\n Namespace.errorMessages.deprecatedWarning(\n 'useTwentyfourHour',\n 'Please use \"options.localization.hourCycle\" instead'\n );\n if (value === undefined || providedType === 'boolean') return value;\n Namespace.errorMessages.typeMismatch(path, providedType, defaultType);\n },\n hourCycle: validKeyOption(['h11', 'h12', 'h23', 'h24']),\n });\n\nconst defaultProcessor: OptionProcessorFunction = ({\n value,\n defaultType,\n providedType,\n path,\n}) => {\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.errorMessages.typeMismatch(path, providedType, defaultType);\n }\n};\n\nexport function processKey(this: void, args: OptionProcessorFunctionArguments) {\n return (optionProcessors[args.key] || defaultProcessor)(args);\n}\n","import Namespace from './namespace';\nimport { DateTime } from '../datetime';\nimport DefaultOptions from './default-options';\nimport Options, { FormatLocalization } from './options';\nimport { processKey } from './optionProcessor';\nimport {\n convertToDateTime,\n tryConvertToDateTime,\n typeCheckDateArray,\n typeCheckNumberArray,\n} from './typeChecker';\n\nexport class OptionConverter {\n private static ignoreProperties = [\n 'meta',\n 'dayViewHeaderFormat',\n 'container',\n 'dateForms',\n 'ordinal',\n ];\n\n static deepCopy(input): Options {\n const o = {};\n\n Object.keys(input).forEach((key) => {\n const inputElement = input[key];\n\n if (inputElement instanceof DateTime) {\n o[key] = inputElement.clone;\n return;\n } else if (inputElement instanceof Date) {\n o[key] = new Date(inputElement.valueOf());\n return;\n }\n\n o[key] = inputElement;\n if (\n typeof inputElement !== 'object' ||\n inputElement instanceof HTMLElement ||\n inputElement instanceof Element\n )\n return;\n if (!Array.isArray(inputElement)) {\n o[key] = OptionConverter.deepCopy(inputElement);\n }\n });\n\n return o;\n }\n\n private static isValue = (a) => a != null; // everything except undefined + null\n\n /**\n * Finds value out of an object based on a string, period delimited, path\n * @param paths\n * @param obj\n */\n static objectPath(paths: string, obj) {\n if (paths.charAt(0) === '.') paths = paths.slice(1);\n if (!paths) return obj;\n return paths\n .split('.')\n .reduce(\n (value, key) =>\n OptionConverter.isValue(value) || OptionConverter.isValue(value[key])\n ? value[key]\n : undefined,\n obj\n );\n }\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param copyTo Destination object. This was added to prevent reference copies\n * @param localization\n * @param path\n */\n static spread(provided, copyTo, localization: FormatLocalization, path = '') {\n const defaultOptions = OptionConverter.objectPath(path, DefaultOptions);\n\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(defaultOptions).includes(x)\n );\n\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path}.${x}\" in not a known option.`;\n const didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += ` Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.errorMessages.unexpectedOptions(errors);\n }\n\n Object.keys(provided)\n .filter((key) => key !== '__proto__' && key !== 'constructor')\n .forEach((key) => {\n path += `.${key}`;\n if (path.charAt(0) === '.') path = path.slice(1);\n\n const defaultOptionValue = defaultOptions[key];\n const providedType = typeof provided[key];\n const defaultType = typeof defaultOptionValue;\n const value = provided[key];\n\n if (value === undefined || value === null) {\n copyTo[key] = value;\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n\n if (\n typeof defaultOptionValue === 'object' &&\n !Array.isArray(provided[key]) &&\n !(\n defaultOptionValue instanceof Date ||\n OptionConverter.ignoreProperties.includes(key)\n )\n ) {\n OptionConverter.spread(\n provided[key],\n copyTo[key],\n localization,\n path\n );\n } else {\n copyTo[key] = OptionConverter.processKey(\n key,\n value,\n providedType,\n defaultType,\n path,\n localization\n );\n }\n\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n }\n\n static processKey(\n key: string,\n value: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string,\n defaultType: string,\n path: string,\n localization: FormatLocalization\n ) {\n return processKey({\n key,\n value,\n providedType,\n defaultType,\n path,\n localization,\n });\n }\n\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newConfig = OptionConverter.deepCopy(mergeTo);\n //see if the options specify a locale\n const localization =\n mergeTo.localization?.locale !== 'default'\n ? mergeTo.localization\n : providedOptions?.localization || DefaultOptions.localization;\n\n OptionConverter.spread(providedOptions, newConfig, localization, '');\n\n return newConfig;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = JSON.parse(JSON.stringify(element.dataset));\n\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\n\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n const dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const normalizeObject = this.normalizeObject(objectToNormalized);\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = normalizeObject(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n //todo clean this up\n private static normalizeObject(objectToNormalized: (object) => object) {\n const normalizeObject = (\n split: string[],\n index: number,\n optionSubgroup: unknown,\n value: unknown\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = normalizeObject(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n return normalizeObject;\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @param localization object containing locale and format settings. Only used with the custom formats\n * @private\n */\n static _dateTypeCheck(\n d: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n localization: FormatLocalization\n ): DateTime | null {\n return tryConvertToDateTime(d, localization);\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n * @param localization\n */\n static _typeCheckDateArray(\n optionName: string,\n value,\n providedType: string,\n localization: FormatLocalization\n ) {\n return typeCheckDateArray(optionName, value, providedType, localization);\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n return typeCheckNumberArray(optionName, value, providedType);\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param localization object containing locale and format settings. Only used with the custom formats\n */\n static dateConversion(\n d: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n optionName: string,\n localization: FormatLocalization\n ): DateTime {\n return convertToDateTime(d, optionName, localization);\n }\n\n private static _flattenDefaults: string[];\n\n private static getFlattenDefaultOptions(): string[] {\n if (this._flattenDefaults) return this._flattenDefaults;\n const deepKeys = (t, pre = []) => {\n if (Array.isArray(t)) return [];\n if (Object(t) === t) {\n return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]));\n } else {\n return pre.join('.');\n }\n };\n\n this._flattenDefaults = deepKeys(DefaultOptions);\n\n return this._flattenDefaults;\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflicts(config: Options) {\n if (\n config.display.sideBySide &&\n (!config.display.components.clock ||\n !(\n config.display.components.hours ||\n config.display.components.minutes ||\n config.display.components.seconds\n ))\n ) {\n Namespace.errorMessages.conflictingConfiguration(\n 'Cannot use side by side mode without the clock components'\n );\n }\n\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n\n if (config.multipleDates && config.dateRange) {\n Namespace.errorMessages.conflictingConfiguration(\n 'Cannot uss option \"multipleDates\" with \"dateRange\"'\n );\n }\n }\n}\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\nimport Namespace from './utilities/namespace';\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\nimport Validation from './validation';\nimport { serviceLocator } from './utilities/service-locator';\nimport { EventEmitters } from './utilities/event-emitter';\nimport { OptionsStore } from './utilities/optionsStore';\nimport { OptionConverter } from './utilities/optionConverter';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private optionsStore: OptionsStore;\n private validation: Validation;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return [...this._dates];\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex]?.clone;\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Formats a DateTime object to a string. Used when setting the input value.\n * @param date\n */\n formatInput(date: DateTime): string {\n if (!date) return '';\n date.localization = this.optionsStore.options.localization;\n return date.format();\n }\n\n /**\n * parse the value into a DateTime object.\n * this can be overwritten to supply your own parsing.\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n parseInput(value: any): DateTime {\n return OptionConverter.dateConversion(\n value,\n 'input',\n this.optionsStore.options.localization\n );\n }\n\n /**\n * Tries to convert the provided value to a DateTime object.\n * If value is null|undefined then clear the value of the provided index (or 0).\n * @param value Value to convert or null|undefined\n * @param index When using multidates this is the index in the array\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n setFromInput(value: any, index?: number) {\n if (!value) {\n this.setValue(undefined, index);\n return;\n }\n const converted = this.parseInput(value);\n if (converted) {\n converted.setLocalization(this.optionsStore.options.localization);\n this.setValue(converted, index);\n }\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!DateTime.isValid(targetDate)) return false;\n if (!unit)\n return this._dates.find((x) => x.isSame(targetDate)) !== undefined;\n\n const format = getFormatByUnit(unit);\n\n const innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!DateTime.isValid(targetDate)) return -1;\n if (!unit)\n return this._dates.map((x) => x.valueOf()).indexOf(targetDate.valueOf());\n\n const format = getFormatByUnit(unit);\n\n const innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this.optionsStore.unset = true;\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n if (this.optionsStore.input) this.optionsStore.input.value = '';\n this._eventEmitters.updateDisplay.emit('all');\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n updateInput(target?: DateTime) {\n if (!this.optionsStore.input) return;\n\n let newValue = this.formatInput(target);\n if (\n this.optionsStore.options.multipleDates ||\n this.optionsStore.options.dateRange\n ) {\n newValue = this._dates\n .map((d) => this.formatInput(d))\n .join(this.optionsStore.options.multipleDatesSeparator);\n }\n if (this.optionsStore.input.value != newValue)\n this.optionsStore.input.value = newValue;\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this.optionsStore.unset ? null : this._dates[index]?.clone;\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n if (target && oldDate?.isSame(target)) {\n this.updateInput(target);\n return;\n }\n\n // case of calling setValue(null)\n if (!target) {\n this._setValueNull(isClear, index, oldDate);\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this.optionsStore.options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this.optionsStore.options.stepping) *\n this.optionsStore.options.stepping;\n target.startOf(Unit.minutes);\n }\n\n const onUpdate = (isValid: boolean) => {\n this._dates[index] = target;\n this._eventEmitters.updateViewDate.emit(target.clone);\n\n this.updateInput(target);\n\n this.optionsStore.unset = false;\n this._eventEmitters.updateDisplay.emit('all');\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: isValid,\n } as ChangeEvent);\n };\n\n if (\n this.validation.isValid(target) &&\n this.validation.dateRangeIsValid(this.picked, index, target)\n ) {\n onUpdate(true);\n return;\n }\n\n if (this.optionsStore.options.keepInvalid) {\n onUpdate(false);\n }\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n\n private _setValueNull(isClear: boolean, index: number, oldDate: DateTime) {\n if (\n !this.optionsStore.options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this.optionsStore.unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n\n this.updateInput();\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n this._eventEmitters.updateDisplay.emit('all');\n }\n}\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';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n const { rangeHoverEvent, rangeHoverOutEvent } =\n this.handleMouseEvents(container);\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n\n // if hover is supported then add the events\n if (\n matchMedia('(hover: hover)').matches &&\n this.optionsStore.options.dateRange\n ) {\n div.addEventListener('mouseover', rangeHoverEvent);\n div.addEventListener('mouseout', rangeHoverOutEvent);\n }\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0] as HTMLElement;\n\n this._updateCalendarView(container);\n\n const innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .manipulate(12, Unit.hours);\n\n this._handleCalendarWeeks(container, innerDate.clone);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDay}\"]`)\n .forEach((element: HTMLElement) => {\n const classes: string[] = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this.optionsStore.unset &&\n !this.optionsStore.options.dateRange &&\n this.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n this._handleDateRange(innerDate, classes);\n\n paint(Unit.date, innerDate, classes, element);\n\n element.classList.remove(...element.classList);\n element.classList.add(...classes);\n element.setAttribute('data-value', this._dateToDataValue(innerDate));\n element.setAttribute('data-day', `${innerDate.date}`);\n element.innerText = innerDate.parts(undefined, {\n day: 'numeric',\n }).day;\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n private _dateToDataValue(date: DateTime): string {\n if (!DateTime.isValid(date)) return '';\n\n return `${date.year}-${date.monthFormatted}-${date.dateFormatted}`;\n }\n\n private _handleDateRange(innerDate: DateTime, classes: string[]) {\n const rangeStart = this.dates.picked[0];\n const rangeEnd = this.dates.picked[1];\n\n if (this.optionsStore.options.dateRange) {\n if (innerDate.isBetween(rangeStart, rangeEnd, Unit.date)) {\n classes.push(Namespace.css.rangeIn);\n }\n\n if (innerDate.isSame(rangeStart, Unit.date)) {\n classes.push(Namespace.css.rangeStart);\n }\n\n if (innerDate.isSame(rangeEnd, Unit.date)) {\n classes.push(Namespace.css.rangeEnd);\n }\n }\n }\n\n private handleMouseEvents(container: HTMLElement) {\n const rangeHoverEvent = (e: MouseEvent) => {\n const currentTarget = e?.currentTarget as HTMLElement;\n\n // if we have 0 or 2 selected or if the target is disabled then ignore\n if (\n this.dates.picked.length !== 1 ||\n currentTarget.classList.contains(Namespace.css.disabled)\n )\n return;\n\n // select all the date divs\n const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];\n\n // get the date value from the element being hovered over\n const attributeValue = currentTarget.getAttribute('data-value');\n\n // format the string to a date\n const innerDate = DateTime.fromString(attributeValue, {\n format: 'yyyy-MM-dd',\n });\n\n // find the position of the target in the date container\n const dayIndex = allDays.findIndex(\n (e) => e.getAttribute('data-value') === attributeValue\n );\n\n // find the first and second selected dates\n const rangeStart = this.dates.picked[0];\n const rangeEnd = this.dates.picked[1];\n\n //format the start date so that it can be found by the attribute\n const rangeStartFormatted = this._dateToDataValue(rangeStart);\n const rangeStartIndex = allDays.findIndex(\n (e) => e.getAttribute('data-value') === rangeStartFormatted\n );\n const rangeStartElement = allDays[rangeStartIndex];\n\n //make sure we don't leave start/end classes if we don't need them\n if (!innerDate.isSame(rangeStart, Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeStart);\n }\n\n if (!innerDate.isSame(rangeEnd, Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeEnd);\n }\n\n // the following figures out which direct from start date is selected\n // the selection \"cap\" classes are applied if needed\n // otherwise all the dates between will get the `rangeIn` class.\n // We make this selection based on the element's index and the rangeStart index\n\n let lambda: (_, index) => boolean;\n\n if (innerDate.isBefore(rangeStart)) {\n currentTarget.classList.add(Namespace.css.rangeStart);\n rangeStartElement?.classList.remove(Namespace.css.rangeStart);\n rangeStartElement?.classList.add(Namespace.css.rangeEnd);\n lambda = (_, index) => index > dayIndex && index < rangeStartIndex;\n } else {\n currentTarget.classList.add(Namespace.css.rangeEnd);\n rangeStartElement?.classList.remove(Namespace.css.rangeEnd);\n rangeStartElement?.classList.add(Namespace.css.rangeStart);\n lambda = (_, index) => index < dayIndex && index > rangeStartIndex;\n }\n\n allDays.filter(lambda).forEach((e) => {\n e.classList.add(Namespace.css.rangeIn);\n });\n };\n\n const rangeHoverOutEvent = (e: MouseEvent) => {\n // find all the dates in the container\n const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];\n\n // if only the start is selected, remove all the rangeIn classes\n // we do this because once the user hovers over a new date the range will be recalculated.\n if (this.dates.picked.length === 1)\n allDays.forEach((e) => e.classList.remove(Namespace.css.rangeIn));\n\n // if we have 0 or 2 dates selected then ignore\n if (this.dates.picked.length !== 1) return;\n\n const currentTarget = e?.currentTarget as HTMLElement;\n\n // get the elements date from the attribute value\n const innerDate = new DateTime(currentTarget.getAttribute('data-value'));\n\n // verify selections and remove invalid classes\n if (!innerDate.isSame(this.dates.picked[0], Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeStart);\n }\n\n if (!innerDate.isSame(this.dates.picked[1], Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeEnd);\n }\n };\n\n return { rangeHoverEvent, rangeHoverOutEvent };\n }\n\n private _updateCalendarView(container: Element) {\n if (this.optionsStore.currentView !== 'calendar') return;\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this.optionsStore.viewDate.format(\n this.optionsStore.options.localization.dayViewHeaderFormat\n )\n );\n this.optionsStore.options.display.components.month\n ? switcher.classList.remove(Namespace.css.disabled)\n : switcher.classList.add(Namespace.css.disabled);\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n /***\n * Generates a html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n const innerDate = this.optionsStore.viewDate.clone\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n let weekDay = innerDate.format({ weekday: 'short' });\n if (this.optionsStore.options.localization.maxWeekdayLength > 0)\n weekDay = weekDay.substring(\n 0,\n this.optionsStore.options.localization.maxWeekdayLength\n );\n htmlDivElement.innerText = weekDay;\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n\n private _handleCalendarWeeks(container: HTMLElement, innerDate: DateTime) {\n [...container.querySelectorAll(`.${Namespace.css.calendarWeeks}`)]\n .filter((e: HTMLElement) => e.innerText !== '#')\n .forEach((element: HTMLElement) => {\n element.innerText = `${innerDate.week}`;\n innerDate.manipulate(7, Unit.date);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n\n if (this.optionsStore.currentView === 'months') {\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this.optionsStore.viewDate.format({ year: 'numeric' })\n );\n\n this.optionsStore.options.display.components.year\n ? switcher.classList.remove(Namespace.css.disabled)\n : switcher.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n const classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.month, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Dates from '../../dates';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _startYear: DateTime;\n private _endYear: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n this._startYear = this.optionsStore.viewDate.clone.manipulate(\n -1,\n Unit.year\n );\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\n\n const container = widget.getElementsByClassName(\n Namespace.css.yearsContainer\n )[0];\n\n if (this.optionsStore.currentView === 'years') {\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.yearsContainer,\n `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({\n year: 'numeric',\n })}`\n );\n\n this.optionsStore.options.display.components.decades\n ? switcher.classList.remove(Namespace.css.disabled)\n : switcher.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n const innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.year);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.year, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = innerDate.format({ year: 'numeric' });\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this.optionsStore.viewDate.year\n );\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = widget.getElementsByClassName(\n Namespace.css.decadesContainer\n )[0];\n\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n if (this.optionsStore.currentView === 'decades') {\n switcher.setAttribute(\n Namespace.css.decadesContainer,\n `${this._startDecade.format({\n year: 'numeric',\n })}-${this._endDecade.format({ year: 'numeric' })}`\n );\n\n this.validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n const pickedYears = this.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.css.disabled);\n containerClone.classList.add(Namespace.css.disabled);\n containerClone.setAttribute('data-value', '');\n return;\n } else {\n containerClone.innerText = this._startDecade.clone\n .manipulate(-10, Unit.year)\n .format({ year: 'numeric' });\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year}`\n );\n return;\n }\n }\n\n const classes = [];\n classes.push(Namespace.css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this.optionsStore.unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.css.active);\n }\n\n paint('decade', this._startDecade, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${this._startDecade.year}`);\n containerClone.innerText = `${this._startDecade.format({\n year: 'numeric',\n })}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _gridColumns = '';\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid(iconTag));\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(widget: HTMLElement): void {\n const timesDiv = (\n widget.getElementsByClassName(Namespace.css.clockContainer)[0]\n );\n let lastPicked = this.dates.lastPicked?.clone;\n if (!lastPicked && this.optionsStore.options.useCurrent)\n lastPicked = this.optionsStore.viewDate.clone;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this.optionsStore.options.display.components.hours) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = lastPicked\n ? lastPicked.getHoursFormatted(\n this.optionsStore.options.localization.hourCycle\n )\n : '--';\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked ? lastPicked.minutesFormatted : '--';\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked ? lastPicked.secondsFormatted : '--';\n }\n\n if (this.optionsStore.isTwelveHour) {\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.toggleMeridiem}]`\n );\n\n const meridiemDate = (lastPicked || this.optionsStore.viewDate).clone;\n\n toggle.innerText = meridiemDate.meridiem();\n\n if (\n !this.validation.isValid(\n meridiemDate.manipulate(\n meridiemDate.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\n this._gridColumns = '';\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = iconTag(this.optionsStore.options.display.icons.up),\n downIcon = iconTag(this.optionsStore.options.display.icons.down);\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this.optionsStore.options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n this._gridColumns += 'a';\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this.optionsStore.isTwelveHour) {\n this._gridColumns += ' a';\n let divElement = getSeparator();\n top.push(divElement);\n\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.setAttribute(\n 'title',\n this.optionsStore.options.localization.toggleMeridiem\n );\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\n button.setAttribute('tabindex', '-1');\n if (Namespace.css.toggleMeridiem.includes(',')) {\n //todo move this to paint function?\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\n } else button.classList.add(Namespace.css.toggleMeridiem);\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n this._gridColumns = this._gridColumns.trim();\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (let i = 0; i < (this.optionsStore.isTwelveHour ? 12 : 24); i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this.validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.hours, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = innerDate.getHoursFormatted(\n this.optionsStore.options.localization.hourCycle\n );\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n const step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\n const step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.minutes, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.minutes}`);\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.second);\n\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.seconds, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import Namespace from '../utilities/namespace';\n\n/**\n * Provides a collapse functionality to the view changes\n */\nexport default class Collapse {\n /**\n * Flips the show/hide state of `target`\n * @param target html element to affect.\n */\n static toggle(target: HTMLElement) {\n if (target.classList.contains(Namespace.css.show)) {\n this.hide(target);\n } else {\n this.show(target);\n }\n }\n\n /**\n * Skips any animation or timeouts and immediately set the element to show.\n * @param target\n */\n static showImmediately(target: HTMLElement) {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\n target.style.height = '';\n }\n\n /**\n * If `target` is not already showing, then show after the animation.\n * @param target\n */\n static show(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n Collapse.showImmediately(target);\n timeOut = null;\n };\n\n target.style.height = '0';\n target.classList.remove(Namespace.css.collapse);\n target.classList.add(Namespace.css.collapsing);\n\n //eslint-disable-next-line @typescript-eslint/no-unused-vars\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n target.style.height = `${target.scrollHeight}px`;\n }\n\n /**\n * Skips any animation or timeouts and immediately set the element to hide.\n * @param target\n */\n static hideImmediately(target: HTMLElement) {\n if (!target) return;\n target.classList.remove(Namespace.css.collapsing, Namespace.css.show);\n target.classList.add(Namespace.css.collapse);\n }\n\n /**\n * If `target` is not already hidden, then hide after the animation.\n * @param target HTML Element\n */\n static hide(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n !target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n Collapse.hideImmediately(target);\n timeOut = null;\n };\n\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\n\n const reflow = (element) => element.offsetHeight;\n\n reflow(target);\n\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\n target.classList.add(Namespace.css.collapsing);\n target.style.height = '';\n\n //eslint-disable-next-line @typescript-eslint/no-unused-vars\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n }\n\n /**\n * Gets the transition duration from the `element` by getting css properties\n * `transition-duration` and `transition-delay`\n * @param element HTML Element\n */\n private static getTransitionDurationFromElement = (element: HTMLElement) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } =\n window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) +\n Number.parseFloat(transitionDelay)) *\n 1000\n );\n };\n}\n","import DateDisplay from './calendar/date-display';\nimport MonthDisplay from './calendar/month-display';\nimport YearDisplay from './calendar/year-display';\nimport DecadeDisplay from './calendar/decade-display';\nimport TimeDisplay from './time/time-display';\nimport HourDisplay from './time/hour-display';\nimport MinuteDisplay from './time/minute-display';\nimport SecondDisplay from './time/second-display';\nimport { DateTime, Unit } from '../datetime';\nimport Namespace from '../utilities/namespace';\nimport { HideEvent } from '../utilities/event-types';\nimport Collapse from './collapse';\nimport Validation from '../validation';\nimport Dates from '../dates';\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\nimport { serviceLocator } from '../utilities/service-locator';\nimport ActionTypes from '../utilities/action-types';\nimport CalendarModes from '../utilities/calendar-modes';\nimport { OptionsStore } from '../utilities/optionsStore';\n\n/**\n * Main class for all things display related.\n */\nexport default class Display {\n private _widget: HTMLElement;\n private _popperInstance: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n private _isVisible = false;\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n\n dateDisplay: DateDisplay;\n monthDisplay: MonthDisplay;\n yearDisplay: YearDisplay;\n decadeDisplay: DecadeDisplay;\n timeDisplay: TimeDisplay;\n hourDisplay: HourDisplay;\n minuteDisplay: MinuteDisplay;\n secondDisplay: SecondDisplay;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n this.dates = serviceLocator.locate(Dates);\n\n this.dateDisplay = serviceLocator.locate(DateDisplay);\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\n this.yearDisplay = serviceLocator.locate(YearDisplay);\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\n this.hourDisplay = serviceLocator.locate(HourDisplay);\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n this._widget = undefined;\n\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\n this._update(result);\n });\n }\n\n /**\n * Returns the widget body or undefined\n * @private\n */\n get widget(): HTMLElement | undefined {\n return this._widget;\n }\n\n get dateContainer(): HTMLElement | undefined {\n return this.widget?.querySelector(`div.${Namespace.css.dateContainer}`);\n }\n\n get timeContainer(): HTMLElement | undefined {\n return this.widget?.querySelector(`div.${Namespace.css.timeContainer}`);\n }\n\n /**\n * Returns this visible state of the picker (shown)\n */\n get isVisible() {\n return this._isVisible;\n }\n\n /**\n * Updates the table for a particular unit. Used when an option as changed or\n * whenever the class list might need to be refreshed.\n * @param unit\n * @private\n */\n _update(unit: ViewUpdateValues): void {\n if (!this.widget) return;\n switch (unit) {\n case Unit.seconds:\n this.secondDisplay._update(this.widget, this.paint);\n break;\n case Unit.minutes:\n this.minuteDisplay._update(this.widget, this.paint);\n break;\n case Unit.hours:\n this.hourDisplay._update(this.widget, this.paint);\n break;\n case Unit.date:\n this.dateDisplay._update(this.widget, this.paint);\n break;\n case Unit.month:\n this.monthDisplay._update(this.widget, this.paint);\n break;\n case Unit.year:\n this.yearDisplay._update(this.widget, this.paint);\n break;\n case 'decade':\n this.decadeDisplay._update(this.widget, this.paint);\n break;\n case 'clock':\n if (!this._hasTime) break;\n this.timeDisplay._update(this.widget);\n this._update(Unit.hours);\n this._update(Unit.minutes);\n this._update(Unit.seconds);\n break;\n case 'calendar':\n this._update(Unit.date);\n this._update(Unit.year);\n this._update(Unit.month);\n this.decadeDisplay._update(this.widget, this.paint);\n this._updateCalendarHeader();\n break;\n case 'all':\n if (this._hasTime) {\n this._update('clock');\n }\n if (this._hasDate) {\n this._update('calendar');\n }\n }\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * Allows developers to add/remove classes from an element.\n * @param _unit\n * @param _date\n * @param _classes\n * @param _element\n */\n\n /* eslint-disable @typescript-eslint/no-unused-vars */\n paint(\n _unit: Unit | 'decade',\n _date: DateTime,\n _classes: string[],\n _element: HTMLElement\n ) {\n // implemented in plugin\n }\n\n /**\n * Shows the picker and creates a Popper instance if needed.\n * Add document click event to hide when clicking outside the picker.\n * fires Events#show\n */\n show(): void {\n if (this.widget == undefined) {\n this._showSetDefaultIfNeeded();\n\n this._buildWidget();\n this._updateTheme();\n\n this._showSetupViewMode();\n\n if (!this.optionsStore.options.display.inline) {\n // If needed to change the parent container\n const container = this.optionsStore.options?.container || document.body;\n const placement =\n this.optionsStore.options?.display?.placement || 'bottom';\n\n container.appendChild(this.widget);\n this.createPopup(this.optionsStore.element, this.widget, {\n modifiers: [{ name: 'eventListeners', enabled: true }],\n //#2400\n placement:\n document.documentElement.dir === 'rtl'\n ? `${placement}-end`\n : `${placement}-start`,\n }).then();\n } else {\n this.optionsStore.element.appendChild(this.widget);\n }\n\n if (this.optionsStore.options.display.viewMode == 'clock') {\n this._eventEmitters.action.emit({\n e: null,\n action: ActionTypes.showClock,\n });\n }\n\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.addEventListener('click', this._actionsClickEvent)\n );\n\n // show the clock when using sideBySide\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\n this.timeDisplay._update(this.widget);\n (\n this.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0] as HTMLElement\n ).style.display = 'grid';\n }\n }\n\n this.widget.classList.add(Namespace.css.show);\n if (!this.optionsStore.options.display.inline) {\n this.updatePopup();\n document.addEventListener('click', this._documentClickEvent);\n }\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\n this._isVisible = true;\n }\n\n private _showSetupViewMode() {\n // If modeView is only clock\n const onlyClock = this._hasTime && !this._hasDate;\n\n // reset the view to the clock if there's no date components\n if (onlyClock) {\n this.optionsStore.currentView = 'clock';\n this._eventEmitters.action.emit({\n e: null,\n action: ActionTypes.showClock,\n });\n }\n // otherwise return to the calendar view\n else if (!this.optionsStore.currentCalendarViewMode) {\n this.optionsStore.currentCalendarViewMode =\n this.optionsStore.minimumCalendarViewMode;\n }\n\n if (!onlyClock && this.optionsStore.options.display.viewMode !== 'clock') {\n if (this._hasTime) {\n if (!this.optionsStore.options.display.sideBySide) {\n Collapse.hideImmediately(this.timeContainer);\n } else {\n Collapse.show(this.timeContainer);\n }\n }\n Collapse.show(this.dateContainer);\n }\n\n if (this._hasDate) {\n this._showMode();\n }\n }\n\n private _showSetDefaultIfNeeded() {\n if (this.dates.picked.length != 0) return;\n\n if (\n this.optionsStore.options.useCurrent &&\n !this.optionsStore.options.defaultDate\n ) {\n const date = new DateTime().setLocalization(\n this.optionsStore.options.localization\n );\n if (!this.optionsStore.options.keepInvalid) {\n let tries = 0;\n let direction = 1;\n if (this.optionsStore.options.restrictions.maxDate?.isBefore(date)) {\n direction = -1;\n }\n while (!this.validation.isValid(date) && tries > 31) {\n date.manipulate(direction, Unit.date);\n tries++;\n }\n }\n this.dates.setValue(date);\n }\n\n if (this.optionsStore.options.defaultDate) {\n this.dates.setValue(this.optionsStore.options.defaultDate);\n }\n }\n\n async createPopup(\n element: HTMLElement,\n widget: HTMLElement,\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n options: any\n ): Promise {\n let createPopperFunction;\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any)?.Popper) {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n createPopperFunction = (window as any)?.Popper?.createPopper;\n } else {\n const { createPopper } = await import('@popperjs/core');\n createPopperFunction = createPopper;\n }\n if (createPopperFunction) {\n this._popperInstance = createPopperFunction(element, widget, options);\n }\n }\n\n updatePopup(): void {\n this._popperInstance?.update();\n }\n\n /**\n * Changes the calendar view mode. E.g. month <-> year\n * @param direction -/+ number to move currentViewMode\n * @private\n */\n _showMode(direction?: number): void {\n if (!this.widget) {\n return;\n }\n if (direction) {\n const max = Math.max(\n this.optionsStore.minimumCalendarViewMode,\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\n );\n if (this.optionsStore.currentCalendarViewMode == max) return;\n this.optionsStore.currentCalendarViewMode = max;\n }\n\n this.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\n )\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\n\n const datePickerMode =\n CalendarModes[this.optionsStore.currentCalendarViewMode];\n const picker: HTMLElement = this.widget.querySelector(\n `.${datePickerMode.className}`\n );\n\n switch (datePickerMode.className) {\n case Namespace.css.decadesContainer:\n this.decadeDisplay._update(this.widget, this.paint);\n break;\n case Namespace.css.yearsContainer:\n this.yearDisplay._update(this.widget, this.paint);\n break;\n case Namespace.css.monthsContainer:\n this.monthDisplay._update(this.widget, this.paint);\n break;\n case Namespace.css.daysContainer:\n this.dateDisplay._update(this.widget, this.paint);\n break;\n }\n\n picker.style.display = 'grid';\n\n if (this.optionsStore.options.display.sideBySide)\n ((\n this.widget.querySelectorAll(`.${Namespace.css.clockContainer}`)[0]\n )).style.display = 'grid';\n\n this._updateCalendarHeader();\n this._eventEmitters.viewUpdate.emit();\n }\n\n /**\n * Changes the theme. E.g. light, dark or auto\n * @param theme the theme name\n * @private\n */\n _updateTheme(theme?: 'light' | 'dark' | 'auto'): void {\n if (!this.widget) {\n return;\n }\n if (theme) {\n if (this.optionsStore.options.display.theme === theme) return;\n this.optionsStore.options.display.theme = theme;\n }\n\n this.widget.classList.remove('light', 'dark');\n this.widget.classList.add(this._getThemeClass());\n\n if (this.optionsStore.options.display.theme === 'auto') {\n window\n .matchMedia(Namespace.css.isDarkPreferredQuery)\n .addEventListener('change', () => this._updateTheme());\n } else {\n window\n .matchMedia(Namespace.css.isDarkPreferredQuery)\n .removeEventListener('change', () => this._updateTheme());\n }\n }\n\n _getThemeClass(): string {\n const currentTheme = this.optionsStore.options.display.theme || 'auto';\n\n const isDarkMode =\n window.matchMedia &&\n window.matchMedia(Namespace.css.isDarkPreferredQuery).matches;\n\n switch (currentTheme) {\n case 'light':\n return Namespace.css.lightTheme;\n case 'dark':\n return Namespace.css.darkTheme;\n case 'auto':\n return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme;\n }\n }\n\n _updateCalendarHeader() {\n if (!this._hasDate) return;\n const showing = [\n ...this.widget.querySelector(\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\n ).classList,\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\n\n const [previous, switcher, next] = this.widget\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switch (showing) {\n case Namespace.css.decadesContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousCentury\n );\n switcher.setAttribute('title', '');\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextCentury\n );\n break;\n case Namespace.css.yearsContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousDecade\n );\n switcher.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectDecade\n );\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextDecade\n );\n break;\n case Namespace.css.monthsContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousYear\n );\n switcher.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectYear\n );\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextYear\n );\n break;\n case Namespace.css.daysContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousMonth\n );\n switcher.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectMonth\n );\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextMonth\n );\n switcher.setAttribute(\n showing,\n this.optionsStore.viewDate.format(\n this.optionsStore.options.localization.dayViewHeaderFormat\n )\n );\n break;\n }\n switcher.innerText = switcher.getAttribute(showing);\n }\n\n /**\n * Hides the picker if needed.\n * Remove document click event to hide when clicking outside the picker.\n * fires Events#hide\n */\n hide(): void {\n if (!this.widget || !this._isVisible) return;\n\n this.widget.classList.remove(Namespace.css.show);\n\n if (this._isVisible) {\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.hide,\n date: this.optionsStore.unset ? null : this.dates.lastPicked?.clone,\n } as HideEvent);\n this._isVisible = false;\n }\n\n document.removeEventListener('click', this._documentClickEvent);\n }\n\n /**\n * Toggles the picker's open state. Fires a show/hide event depending.\n */\n toggle() {\n return this._isVisible ? this.hide() : this.show();\n }\n\n /**\n * Removes document and data-action click listener and reset the widget\n * @private\n */\n _dispose() {\n document.removeEventListener('click', this._documentClickEvent);\n if (!this.widget) return;\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.removeEventListener('click', this._actionsClickEvent)\n );\n this.widget.parentNode.removeChild(this.widget);\n this._widget = undefined;\n }\n\n /**\n * Builds the widgets html template.\n * @private\n */\n private _buildWidget(): HTMLElement {\n const template = document.createElement('div');\n template.classList.add(Namespace.css.widget);\n\n const dateView = document.createElement('div');\n dateView.classList.add(Namespace.css.dateContainer);\n dateView.append(\n this.getHeadTemplate(),\n this.decadeDisplay.getPicker(),\n this.yearDisplay.getPicker(),\n this.monthDisplay.getPicker(),\n this.dateDisplay.getPicker()\n );\n\n const timeView = document.createElement('div');\n timeView.classList.add(Namespace.css.timeContainer);\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\n timeView.appendChild(this.hourDisplay.getPicker());\n timeView.appendChild(this.minuteDisplay.getPicker());\n timeView.appendChild(this.secondDisplay.getPicker());\n\n const toolbar = document.createElement('div');\n toolbar.classList.add(Namespace.css.toolbar);\n toolbar.append(...this.getToolbarElements());\n\n if (this.optionsStore.options.display.inline) {\n template.classList.add(Namespace.css.inline);\n }\n\n if (this.optionsStore.options.display.calendarWeeks) {\n template.classList.add('calendarWeeks');\n }\n\n if (this.optionsStore.options.display.sideBySide && this._hasDateAndTime) {\n this._buildWidgetSideBySide(template, dateView, timeView, toolbar);\n return;\n }\n\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n\n const setupComponentView = (hasFirst, hasSecond, element, shouldShow) => {\n if (!hasFirst) return;\n if (hasSecond) {\n element.classList.add(Namespace.css.collapse);\n if (shouldShow) element.classList.add(Namespace.css.show);\n }\n template.appendChild(element);\n };\n\n setupComponentView(\n this._hasDate,\n this._hasTime,\n dateView,\n this.optionsStore.options.display.viewMode !== 'clock'\n );\n\n setupComponentView(\n this._hasTime,\n this._hasDate,\n timeView,\n this.optionsStore.options.display.viewMode === 'clock'\n );\n\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n\n const arrow = document.createElement('div');\n arrow.classList.add('arrow');\n arrow.setAttribute('data-popper-arrow', '');\n template.appendChild(arrow);\n\n this._widget = template;\n }\n\n private _buildWidgetSideBySide(\n template: HTMLDivElement,\n dateView: HTMLDivElement,\n timeView: HTMLDivElement,\n toolbar: HTMLDivElement\n ) {\n template.classList.add(Namespace.css.sideBySide);\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n const row = document.createElement('div');\n row.classList.add('td-row');\n dateView.classList.add('td-half');\n timeView.classList.add('td-half');\n\n row.appendChild(dateView);\n row.appendChild(timeView);\n template.appendChild(row);\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n this._widget = template;\n }\n\n /**\n * Returns true if the hours, minutes, or seconds component is turned on\n */\n get _hasTime(): boolean {\n return (\n this.optionsStore.options.display.components.clock &&\n (this.optionsStore.options.display.components.hours ||\n this.optionsStore.options.display.components.minutes ||\n this.optionsStore.options.display.components.seconds)\n );\n }\n\n /**\n * Returns true if the year, month, or date component is turned on\n */\n get _hasDate(): boolean {\n return (\n this.optionsStore.options.display.components.calendar &&\n (this.optionsStore.options.display.components.year ||\n this.optionsStore.options.display.components.month ||\n this.optionsStore.options.display.components.date)\n );\n }\n\n get _hasDateAndTime(): boolean {\n return this._hasDate && this._hasTime;\n }\n\n /**\n * Get the toolbar html based on options like buttons => today\n * @private\n */\n getToolbarElements(): HTMLElement[] {\n const toolbar = [];\n\n if (this.optionsStore.options.display.buttons.today) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.today);\n div.setAttribute('title', this.optionsStore.options.localization.today);\n\n div.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.today)\n );\n toolbar.push(div);\n }\n if (\n !this.optionsStore.options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n let title, icon;\n if (this.optionsStore.options.display.viewMode === 'clock') {\n title = this.optionsStore.options.localization.selectDate;\n icon = this.optionsStore.options.display.icons.date;\n } else {\n title = this.optionsStore.options.localization.selectTime;\n icon = this.optionsStore.options.display.icons.time;\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.togglePicker);\n div.setAttribute('title', title);\n\n div.appendChild(this._iconTag(icon));\n toolbar.push(div);\n }\n if (this.optionsStore.options.display.buttons.clear) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.clear);\n div.setAttribute('title', this.optionsStore.options.localization.clear);\n\n div.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.clear)\n );\n toolbar.push(div);\n }\n if (this.optionsStore.options.display.buttons.close) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.close);\n div.setAttribute('title', this.optionsStore.options.localization.close);\n\n div.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.close)\n );\n toolbar.push(div);\n }\n\n return toolbar;\n }\n\n /***\n * Builds the base header template with next and previous icons\n * @private\n */\n getHeadTemplate(): HTMLElement {\n const calendarHeader = document.createElement('div');\n calendarHeader.classList.add(Namespace.css.calendarHeader);\n\n const previous = document.createElement('div');\n previous.classList.add(Namespace.css.previous);\n previous.setAttribute('data-action', ActionTypes.previous);\n previous.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.previous)\n );\n\n const switcher = document.createElement('div');\n switcher.classList.add(Namespace.css.switch);\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\n\n const next = document.createElement('div');\n next.classList.add(Namespace.css.next);\n next.setAttribute('data-action', ActionTypes.next);\n next.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.next)\n );\n\n calendarHeader.append(previous, switcher, next);\n return calendarHeader;\n }\n\n /**\n * Builds an icon tag as either an ``\n * or with icons => type is `sprites` then a svg tag instead\n * @param iconClass\n * @private\n */\n _iconTag(iconClass: string): HTMLElement | SVGElement {\n if (this.optionsStore.options.display.icons.type === 'sprites') {\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n const icon = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'use'\n );\n icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility\n icon.setAttribute('href', iconClass);\n svg.appendChild(icon);\n\n return svg;\n }\n const icon = document.createElement('i');\n icon.classList.add(...iconClass.split(' '));\n return icon;\n }\n\n /**\n * A document click event to hide the widget if click is outside\n * @private\n * @param e MouseEvent\n */\n private _documentClickEvent = (e: MouseEvent) => {\n if (this.optionsStore.options.debug || (window as any).debug) return; //eslint-disable-line @typescript-eslint/no-explicit-any\n\n if (\n this._isVisible &&\n !e.composedPath().includes(this.widget) && // click inside the widget\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\n ) {\n this.hide();\n }\n };\n\n /**\n * Click event for any action like selecting a date\n * @param e MouseEvent\n * @private\n */\n private _actionsClickEvent = (e: MouseEvent) => {\n this._eventEmitters.action.emit({ e: e });\n };\n\n /**\n * Causes the widget to get rebuilt on next show. If the picker is already open\n * then hide and reshow it.\n * @private\n */\n _rebuild() {\n const wasVisible = this._isVisible;\n this._dispose();\n if (wasVisible) this.show();\n }\n\n refreshCurrentView() {\n //if the widget is not showing, just destroy it\n if (!this._isVisible) this._dispose();\n\n switch (this.optionsStore.currentView) {\n case 'clock':\n this._update('clock');\n break;\n case 'calendar':\n this._update(Unit.date);\n break;\n case 'months':\n this._update(Unit.month);\n break;\n case 'years':\n this._update(Unit.year);\n break;\n case 'decades':\n this._update('decade');\n break;\n }\n }\n}\n\nexport type Paint = (\n unit: Unit | 'decade',\n innerDate: DateTime,\n classes: string[],\n element: HTMLElement\n) => void;\n","import { DateTime, Unit } from './datetime';\nimport Collapse from './display/collapse';\nimport Namespace from './utilities/namespace';\nimport Dates from './dates';\nimport Validation from './validation';\nimport Display from './display';\nimport { EventEmitters } from './utilities/event-emitter';\nimport { serviceLocator } from './utilities/service-locator.js';\nimport ActionTypes from './utilities/action-types';\nimport CalendarModes from './utilities/calendar-modes';\nimport { OptionsStore } from './utilities/optionsStore';\n\n/**\n * Logic for various click actions\n */\nexport default class Actions {\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n private display: Display;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n this.display = serviceLocator.locate(Display);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n\n this._eventEmitters.action.subscribe((result) => {\n this.do(result.e, result.action);\n });\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n do(e: any, action?: ActionTypes) {\n const currentTarget = e?.currentTarget as HTMLElement;\n if (currentTarget?.classList?.contains(Namespace.css.disabled)) return;\n action = action || (currentTarget?.dataset?.action as ActionTypes);\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\n .clone;\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n this.handleNextPrevious(action);\n break;\n case ActionTypes.changeCalendarView:\n this.display._showMode(1);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n this.handleSelectCalendarMode(action, currentTarget);\n break;\n case ActionTypes.selectDay:\n this.handleSelectDay(currentTarget);\n break;\n case ActionTypes.selectHour: {\n let hour = +currentTarget.dataset.value;\n if (lastPicked.hours >= 12 && this.optionsStore.isTwelveHour)\n hour += 12;\n lastPicked.hours = hour;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n }\n case ActionTypes.selectMinute: {\n lastPicked.minutes = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n }\n case ActionTypes.selectSecond: {\n lastPicked.seconds = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n }\n case ActionTypes.incrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping\n );\n break;\n case ActionTypes.incrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping * -1\n );\n break;\n case ActionTypes.decrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\n break;\n case ActionTypes.toggleMeridiem:\n this.manipulateAndSet(\n lastPicked,\n Unit.hours,\n this.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n this.handleToggle(currentTarget);\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n //make sure the clock is actually displaying\n if (\n !this.optionsStore.options.display.sideBySide &&\n this.optionsStore.currentView !== 'clock'\n ) {\n //hide calendar\n Collapse.hideImmediately(this.display.dateContainer);\n //show clock\n Collapse.showImmediately(this.display.timeContainer);\n }\n this.handleShowClockContainers(action);\n break;\n case ActionTypes.clear:\n this.dates.setValue(null);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this.display.hide();\n break;\n case ActionTypes.today: {\n const today = new DateTime().setLocalization(\n this.optionsStore.options.localization\n );\n this._eventEmitters.updateViewDate.emit(today);\n\n //todo this this really a good idea?\n if (this.validation.isValid(today, Unit.date))\n this.dates.setValue(today, this.dates.lastPickedIndex);\n break;\n }\n }\n }\n\n private handleShowClockContainers(action: ActionTypes) {\n if (!this.display._hasTime) {\n Namespace.errorMessages.throwError(\n 'Cannot show clock containers when time is disabled.'\n );\n /* ignore coverage: should never happen */\n return;\n }\n\n this.optionsStore.currentView = 'clock';\n this.display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this.display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this.display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this.display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this.display._update(Unit.seconds);\n break;\n }\n\n ((\n this.display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n }\n\n private handleNextPrevious(action: ActionTypes) {\n const { unit, step } =\n CalendarModes[this.optionsStore.currentCalendarViewMode];\n if (action === ActionTypes.next)\n this.optionsStore.viewDate.manipulate(step, unit);\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\n this._eventEmitters.viewUpdate.emit();\n\n this.display._showMode();\n }\n\n /**\n * After setting the value it will either show the clock or hide the widget.\n * @param e\n */\n private hideOrClock(e) {\n if (\n !this.optionsStore.isTwelveHour &&\n !this.optionsStore.options.display.components.minutes &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline\n ) {\n this.display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n }\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * @param lastPicked\n * @param unit\n * @param value Value to change by\n */\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\n const newDate = lastPicked.manipulate(value, unit);\n if (this.validation.isValid(newDate, unit)) {\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\n }\n }\n\n private handleSelectCalendarMode(\n action:\n | ActionTypes.selectMonth\n | ActionTypes.selectYear\n | ActionTypes.selectDecade,\n currentTarget: HTMLElement\n ) {\n const value = +currentTarget.dataset.value;\n switch (action) {\n case ActionTypes.selectMonth:\n this.optionsStore.viewDate.month = value;\n break;\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n this.optionsStore.viewDate.year = value;\n break;\n }\n\n if (\n this.optionsStore.currentCalendarViewMode ===\n this.optionsStore.minimumCalendarViewMode\n ) {\n this.dates.setValue(\n this.optionsStore.viewDate,\n this.dates.lastPickedIndex\n );\n\n if (!this.optionsStore.options.display.inline) {\n this.display.hide();\n }\n } else {\n this.display._showMode(-1);\n }\n }\n\n private handleToggle(currentTarget: HTMLElement) {\n if (\n currentTarget.getAttribute('title') ===\n this.optionsStore.options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectTime\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.time\n ).outerHTML;\n\n this.display._updateCalendarHeader();\n this.optionsStore.refreshCurrentView();\n } else {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectDate\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.date\n ).outerHTML;\n if (this.display._hasTime) {\n this.handleShowClockContainers(ActionTypes.showClock);\n this.display._update('clock');\n }\n }\n\n this.display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\n this._eventEmitters.viewUpdate.emit();\n }\n\n private handleSelectDay(currentTarget: HTMLElement) {\n const day = this.optionsStore.viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.dataset.day;\n if (this.optionsStore.options.dateRange) this.handleDateRange(day);\n else if (this.optionsStore.options.multipleDates) {\n this.handleMultiDate(day);\n } else {\n this.dates.setValue(day, this.dates.lastPickedIndex);\n }\n\n if (\n !this.display._hasTime &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline &&\n !this.optionsStore.options.multipleDates &&\n !this.optionsStore.options.dateRange\n ) {\n this.display.hide();\n }\n }\n\n private handleMultiDate(day: DateTime) {\n let index = this.dates.pickedIndex(day, Unit.date);\n console.log(index);\n if (index !== -1) {\n this.dates.setValue(null, index); //deselect multi-date\n } else {\n index = this.dates.lastPickedIndex + 1;\n if (this.dates.picked.length === 0) index = 0;\n\n this.dates.setValue(day, index);\n }\n }\n\n private handleDateRange(day: DateTime) {\n switch (this.dates.picked.length) {\n case 2: {\n this.dates.clear();\n break;\n }\n case 1: {\n const other = this.dates.picked[0];\n if (day.getTime() === other.getTime()) {\n this.dates.clear();\n break;\n }\n if (day.isBefore(other)) {\n this.dates.setValue(day, 0);\n this.dates.setValue(other, 1);\n return;\n } else {\n this.dates.setValue(day, 1);\n return;\n }\n }\n }\n\n this.dates.setValue(day, 0);\n }\n}\n","import Display from './display/index';\nimport Dates from './dates';\nimport Actions from './actions';\nimport {\n DateTime,\n DateTimeFormatOptions,\n guessHourCycle,\n Unit,\n} from './datetime';\nimport Namespace from './utilities/namespace';\nimport Options from './utilities/options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n} from './utilities/event-types';\nimport { EventEmitters } from './utilities/event-emitter';\nimport {\n serviceLocator,\n setupServiceLocator,\n} from './utilities/service-locator';\nimport CalendarModes from './utilities/calendar-modes';\nimport DefaultOptions, {\n DefaultEnLocalization,\n} from './utilities/default-options';\nimport ActionTypes from './utilities/action-types';\nimport { OptionsStore } from './utilities/optionsStore';\nimport { OptionConverter } from './utilities/optionConverter';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n _subscribers: { [key: string]: ((event: any) => Record)[] } =\n {};\n private _isDisabled = false;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: NodeJS.Timeout;\n private actions: Actions;\n private optionsStore: OptionsStore;\n private _eventEmitters: EventEmitters;\n display: Display;\n dates: Dates;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n setupServiceLocator();\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.display = serviceLocator.locate(Display);\n this.dates = serviceLocator.locate(Dates);\n this.actions = serviceLocator.locate(Actions);\n\n if (!element) {\n Namespace.errorMessages.mustProvideElement();\n }\n\n this.optionsStore.element = element;\n this._initializeOptions(options, DefaultOptions, true);\n this.optionsStore.viewDate.setLocalization(\n this.optionsStore.options.localization\n );\n this.optionsStore.unset = true;\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this.optionsStore.options.display.inline) this.display.show();\n\n this._eventEmitters.triggerEvent.subscribe((e) => {\n this._triggerEvent(e);\n });\n\n this._eventEmitters.viewUpdate.subscribe(() => {\n this._viewUpdate();\n });\n\n this._eventEmitters.updateViewDate.subscribe((dateTime) => {\n this.viewDate = dateTime;\n });\n }\n\n get viewDate() {\n return this.optionsStore.viewDate;\n }\n\n set viewDate(value) {\n this.optionsStore.viewDate = value;\n this.optionsStore.viewDate.setLocalization(\n this.optionsStore.options.localization\n );\n this.display._update(\n this.optionsStore.currentView === 'clock' ? 'clock' : 'calendar'\n );\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._initializeOptions(options, DefaultOptions);\n else this._initializeOptions(options, this.optionsStore.options);\n\n this.optionsStore.viewDate.setLocalization(\n this.optionsStore.options.localization\n );\n this.display.refreshCurrentView();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this.display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this.display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this.display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\n this.display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this.optionsStore.input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.optionsStore.input.value = '';\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => void | ((event: any) => void)[] //eslint-disable-line @typescript-eslint/no-explicit-any\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray: any[]; //eslint-disable-line @typescript-eslint/no-explicit-any\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.errorMessages.subscribeMismatch();\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this.display.hide();\n // this will clear the document click event listener\n this.display._dispose();\n this._eventEmitters.destroy();\n this.optionsStore.input?.removeEventListener(\n 'change',\n this._inputChangeEvent\n );\n if (this.optionsStore.options.allowInputToggle) {\n this.optionsStore.input?.removeEventListener(\n 'click',\n this._openClickEvent\n );\n this.optionsStore.input?.removeEventListener(\n 'focus',\n this._openClickEvent\n );\n }\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Updates the options to use the provided language.\n * THe language file must be loaded first.\n * @param language\n */\n locale(language: string) {\n const asked = loadedLocales[language];\n if (!asked) return;\n this.updateOptions({\n localization: asked,\n });\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n private _triggerEvent(event: BaseEvent) {\n event.viewMode = this.optionsStore.currentView;\n\n const isChangeEvent = event.type === Namespace.events.change;\n if (isChangeEvent) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate)\n ) {\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n\n this.optionsStore.input?.dispatchEvent(\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n new CustomEvent('change', { detail: event as any })\n );\n }\n\n this.optionsStore.element.dispatchEvent(\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n new CustomEvent(event.type, { detail: event as any })\n );\n\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any).jQuery) {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n const $ = (window as any).jQuery;\n\n if (isChangeEvent && this.optionsStore.input) {\n $(this.optionsStore.input).trigger(event);\n } else {\n $(this.optionsStore.element).trigger(event);\n }\n }\n\n this._publish(event);\n }\n\n private _publish(event: BaseEvent) {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @private\n */\n private _viewUpdate() {\n this._triggerEvent({\n type: Namespace.events.update,\n viewDate: this.optionsStore.viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): void {\n let newConfig = OptionConverter.deepCopy(config);\n newConfig = OptionConverter._mergeOptions(newConfig, mergeTo);\n if (includeDataset)\n newConfig = OptionConverter._dataToOptions(\n this.optionsStore.element,\n newConfig\n );\n\n OptionConverter._validateConflicts(newConfig);\n\n newConfig.viewDate = newConfig.viewDate.setLocalization(\n newConfig.localization\n );\n\n if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) {\n this.optionsStore.viewDate = newConfig.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (newConfig.display.components.year) {\n this.optionsStore.minimumCalendarViewMode = 2;\n }\n if (newConfig.display.components.month) {\n this.optionsStore.minimumCalendarViewMode = 1;\n }\n if (newConfig.display.components.date) {\n this.optionsStore.minimumCalendarViewMode = 0;\n }\n\n this.optionsStore.currentCalendarViewMode = Math.max(\n this.optionsStore.minimumCalendarViewMode,\n this.optionsStore.currentCalendarViewMode\n );\n\n // Update view mode if needed\n if (\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\n newConfig.display.viewMode\n ) {\n this.optionsStore.currentCalendarViewMode = Math.max(\n CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode),\n this.optionsStore.minimumCalendarViewMode\n );\n }\n\n if (this.display?.isVisible) {\n this.display._update('all');\n }\n\n if (\n newConfig.display.components.useTwentyfourHour &&\n newConfig.localization.hourCycle === undefined\n )\n newConfig.localization.hourCycle = 'h24';\n else if (newConfig.localization.hourCycle === undefined) {\n newConfig.localization.hourCycle = guessHourCycle(\n newConfig.localization.locale\n );\n }\n\n this.optionsStore.options = newConfig;\n\n if (\n newConfig.restrictions.maxDate &&\n this.viewDate.isAfter(newConfig.restrictions.maxDate)\n )\n this.viewDate = newConfig.restrictions.maxDate;\n\n if (\n newConfig.restrictions.minDate &&\n this.viewDate.isBefore(newConfig.restrictions.minDate)\n )\n this.viewDate = newConfig.restrictions.minDate;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this.optionsStore.element.tagName == 'INPUT') {\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\n } else {\n const query = this.optionsStore.element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this.optionsStore.input =\n this.optionsStore.element.querySelector('input');\n } else {\n this.optionsStore.input =\n this.optionsStore.element.querySelector(query);\n }\n }\n\n if (!this.optionsStore.input) return;\n\n if (!this.optionsStore.input.value && this.optionsStore.options.defaultDate)\n this.optionsStore.input.value = this.dates.formatInput(\n this.optionsStore.options.defaultDate\n );\n\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\n if (this.optionsStore.options.allowInputToggle) {\n this.optionsStore.input.addEventListener('click', this._openClickEvent);\n this.optionsStore.input.addEventListener('focus', this._openClickEvent);\n }\n\n if (this.optionsStore.input.value) {\n this._inputChangeEvent();\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this.optionsStore.options.display.inline) return;\n let query = this.optionsStore.element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined\n ? this.optionsStore.element\n : this.optionsStore.element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this.optionsStore.options.promptTimeOnDateChange ||\n this.optionsStore.options.multipleDates ||\n this.optionsStore.options.display.inline ||\n this.optionsStore.options.display.sideBySide ||\n // time is disabled\n !this.display._hasTime ||\n // clock component is already showing\n this.display.widget\n ?.getElementsByClassName(Namespace.css.show)[0]\n .classList.contains(Namespace.css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this.display.widget) {\n this._eventEmitters.action.emit({\n e: {\n currentTarget: this.display.widget.querySelector(\n '[data-action=\"togglePicker\"]'\n ),\n },\n action: ActionTypes.togglePicker,\n });\n }\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _inputChangeEvent = (event?: any) => {\n const internallyTriggered = event?.detail;\n if (internallyTriggered) return;\n\n const setViewDate = () => {\n if (this.dates.lastPicked)\n this.optionsStore.viewDate = this.dates.lastPicked.clone;\n };\n\n const value = this.optionsStore.input.value;\n if (\n this.optionsStore.options.multipleDates ||\n this.optionsStore.options.dateRange\n ) {\n try {\n const valueSplit = value.split(\n this.optionsStore.options.multipleDatesSeparator\n );\n for (let i = 0; i < valueSplit.length; i++) {\n this.dates.setFromInput(valueSplit[i], i);\n }\n setViewDate();\n } catch {\n console.warn(\n 'TD: Something went wrong trying to set the multipleDates values from the input field.'\n );\n }\n } else {\n this.dates.setFromInput(value, 0);\n setViewDate();\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n if (\n (this.optionsStore.element as HTMLInputElement)?.disabled ||\n this.optionsStore.input?.disabled ||\n //if we just have the input and allow input toggle is enabled, then don't cause a toggle\n (this._toggle.nodeName === 'INPUT' &&\n (this._toggle as HTMLInputElement)?.type === 'text' &&\n this.optionsStore.options.allowInputToggle)\n )\n return;\n this.toggle();\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _openClickEvent = () => {\n if (\n (this.optionsStore.element as HTMLInputElement)?.disabled ||\n this.optionsStore.input?.disabled\n )\n return;\n if (!this.display.isVisible) this.show();\n };\n}\n\n/**\n * Whenever a locale is loaded via a plugin then store it here based on the\n * locale name. E.g. loadedLocales['ru']\n */\nconst loadedLocales = {};\n\n// noinspection JSUnusedGlobalSymbols\n/**\n * Called from a locale plugin.\n * @param l locale object for localization options\n */\nconst loadLocale = (l) => {\n if (loadedLocales[l.name]) return;\n loadedLocales[l.name] = l.localization;\n};\n\n/**\n * A sets the global localization options to the provided locale name.\n * `loadLocale` MUST be called first.\n * @param l\n */\nconst locale = (l: string) => {\n const asked = loadedLocales[l];\n if (!asked) return;\n DefaultOptions.localization = asked;\n};\n\n// noinspection JSUnusedGlobalSymbols\n/**\n * Called from a plugin to extend or override picker defaults.\n * @param plugin\n * @param option\n */\nconst extend = function (plugin, option = undefined) {\n if (!plugin) return tempusDominus;\n if (!plugin.installed) {\n // install plugin only once\n plugin(\n option,\n { TempusDominus, Dates, Display, DateTime, Namespace },\n tempusDominus\n );\n plugin.installed = true;\n }\n return tempusDominus;\n};\n\nconst version = '6.7.19';\n\nconst tempusDominus = {\n TempusDominus,\n extend,\n loadLocale,\n locale,\n Namespace,\n DefaultOptions,\n DateTime,\n Unit,\n version,\n DefaultEnLocalization,\n};\n\nexport {\n TempusDominus,\n extend,\n loadLocale,\n locale,\n Namespace,\n DefaultOptions,\n DateTime,\n Unit,\n version,\n DateTimeFormatOptions,\n Options,\n DefaultEnLocalization,\n};\n"],"names":["DefaultFormatLocalization","ActionTypes","SecondDisplay"],"mappings":";;;;;AAAM,MAAO,OAAQ,SAAQ,KAAK,CAAA;AAEjC,CAAA;MAEY,aAAa,CAAA;AAA1B,IAAA,WAAA,GAAA;QACU,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;;;AAqKrB;;;AAGG;QACH,IAAsB,CAAA,sBAAA,GAAG,4BAA4B,CAAC;AAEtD;;;AAGG;QACH,IAAkB,CAAA,kBAAA,GAAG,0BAA0B,CAAC;;KAGjD;;AA9KC;;;AAGG;AACH,IAAA,gBAAgB,CAAC,UAAkB,EAAA;AACjC,QAAA,MAAM,KAAK,GAAG,IAAI,OAAO,CACvB,CAAA,EAAG,IAAI,CAAC,IAAI,CAAA,oBAAA,EAAuB,UAAU,CAAA,+BAAA,CAAiC,CAC/E,CAAC;AACF,QAAA,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;AACf,QAAA,MAAM,KAAK,CAAC;KACb;AAED;;;AAGG;AACH,IAAA,i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ACzC,EAAE;AAEF;;;;AAIG;AACH,MAAM,MAAM,GAAG,CAAC,CAAS,KAAI;AAC3B,IAAA,MAAM,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAC/B,IAAA,IAAI,CAAC,KAAK;QAAE,OAAO;AACnB,IAAA,cAAc,CAAC,YAAY,GAAG,KAAK,CAAC;AACtC,EAAE;AAEF;AACA;;;;AAIG;AACH,MAAM,MAAM,GAAG,UAAU,MAAM,EAAE,MAAM,GAAG,SAAS,EAAA;AACjD,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,aAAa,CAAC;AAClC,IAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;;AAErB,QAAA,MAAM,CACJ,MAAM,EACN,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EACtD,aAAa,CACd,CAAC;AACF,QAAA,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;AACzB,KAAA;AACD,IAAA,OAAO,aAAa,CAAC;AACvB,EAAE;AAEI,MAAA,OAAO,GAAG,SAAS;AAEzB,MAAM,aAAa,GAAG;IACpB,aAAa;IACb,MAAM;IACN,UAAU;IACV,MAAM;IACN,SAAS;IACT,cAAc;IACd,QAAQ;IACR,IAAI;IACJ,OAAO;IACP,qBAAqB;CACtB;;;;"}
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.min.js b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.min.js
new file mode 100644
index 0000000..b3dd416
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+class t extends Error{}const e="tempus-dominus";class s{}s.NAME=e,s.dataKey="td",s.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}`}},s.css=new class{constructor(){this.widget=`${e}-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.rangeIn="range-in",this.rangeStart="range-start",this.rangeEnd="range-end",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)"}},s.errorMessages=new class{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(e){const s=new t(`${this.base} Unexpected option: ${e} does not match a known option.`);throw s.code=1,s}unexpectedOptions(e){const s=new t(`${this.base}: ${e.join(", ")}`);throw s.code=1,s}unexpectedOptionValue(e,s,i){const o=new t(`${this.base} Unexpected option value: ${e} does not accept a value of "${s}". Valid values are: ${i.join(", ")}`);throw o.code=2,o}typeMismatch(e,s,i){const o=new t(`${this.base} Mismatch types: ${e} has a type of ${s} instead of the required ${i}`);throw o.code=3,o}numbersOutOfRange(e,s,i){const o=new t(`${this.base} ${e} expected an array of number between ${s} and ${i}.`);throw o.code=4,o}failedToParseDate(e,s,i=!1){const o=new t(`${this.base} Could not correctly parse "${s}" to a date for ${e}.`);if(o.code=5,!i)throw o;console.warn(o)}mustProvideElement(){const e=new t(`${this.base} No element was provided.`);throw e.code=6,e}subscribeMismatch(){const e=new t(`${this.base} The subscribed events does not match the number of callbacks`);throw e.code=7,e}conflictingConfiguration(e){const s=new t(`${this.base} A configuration value conflicts with another rule. ${e}`);throw s.code=8,s}customDateFormatError(e){const s=new t(`${this.base} Custom Date Format: ${e}`);throw s.code=9,s}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.`)}deprecatedWarning(t,e){console.warn(`${this.base} Warning ${t} is deprecated and will be removed in a future version. ${e}`)}throwError(e){const s=new t(`${this.base} ${e}`);throw s.code=9,s}};var i,o={...{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"},format:"L LT",locale:"default",hourCycle:void 0,ordinal:t=>{const e=["th","st","nd","rd"],s=t%100;return`[${t}${e[(s-20)%10]||e[s]||e[0]}]`}}};!function(t){t.seconds="seconds",t.minutes="minutes",t.hours="hours",t.date="date",t.month="month",t.year="year"}(i||(i={}));const a={month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},n=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}},r=t=>{if(!t)return"h12";const e={hour:"2-digit",minute:"2-digit",numberingSystem:"latn"},s=(new d).setLocalization({locale:t});s.hours=0;const i=s.parts(void 0,e).hour;if("12"===i)return"h12";if("24"===i)return"h24";s.hours=23;const o=s.parts(void 0,e).hour;return"00"===i&&"11"===o?"h11":"00"===i&&"23"===o?"h23":void console.warn(`couldn't determine hour cycle for ${t}. start: ${i}. end: ${o}`)};class d extends Date{constructor(){super(...arguments),this.localization=o,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],this.dateTimeRegex=/(\[[^[\]]*])|y{1,4}|M{1,4}|d{1,4}|H{1,2}|h{1,2}|t|T|m{1,2}|s{1,2}|f{3}/g,this.formattingTokens=/(\[[^[\]]*])|([-_:/.,()\s]+)|(T|t|yyyy|yy?|MM?M?M?|Do|dd?|hh?|HH?|mm?|ss?)/g,this.match2=/\d\d/,this.match3=/\d{3}/,this.match4=/\d{4}/,this.match1to2=/\d\d?/,this.matchSigned=/[+-]?\d+/,this.matchOffset=/[+-]\d\d:?(\d\d)?|Z/,this.matchWord=/[^\d_:/,\-()\s]+/,this.zoneExpressions=[this.matchOffset,(t,e)=>{t.offset=this.offsetFromString(e)}],this.expressions={t:{pattern:void 0,parser:(t,e)=>{t.afternoon=this.meridiemMatch(e)}},T:{pattern:void 0,parser:(t,e)=>{t.afternoon=this.meridiemMatch(e)}},fff:{pattern:this.match3,parser:(t,e)=>{t.milliseconds=+e}},s:{pattern:this.match1to2,parser:this.addInput("seconds")},ss:{pattern:this.match1to2,parser:this.addInput("seconds")},m:{pattern:this.match1to2,parser:this.addInput("minutes")},mm:{pattern:this.match1to2,parser:this.addInput("minutes")},H:{pattern:this.match1to2,parser:this.addInput("hours")},h:{pattern:this.match1to2,parser:this.addInput("hours")},HH:{pattern:this.match1to2,parser:this.addInput("hours")},hh:{pattern:this.match1to2,parser:this.addInput("hours")},d:{pattern:this.match1to2,parser:this.addInput("day")},dd:{pattern:this.match2,parser:this.addInput("day")},Do:{pattern:this.matchWord,parser:(t,e)=>{if(t.day=+(e.match(/\d+/)[0]||1),this.localization.ordinal)for(let s=1;s<=31;s+=1)this.localization.ordinal(s).replace(/[[\]]/g,"")===e&&(t.day=s)}},M:{pattern:this.match1to2,parser:this.addInput("month")},MM:{pattern:this.match2,parser:this.addInput("month")},MMM:{pattern:this.matchWord,parser:(t,e)=>{const s=this.getAllMonths(),i=(this.getAllMonths("short")||s.map((t=>t.slice(0,3)))).indexOf(e)+1;if(i<1)throw new Error;t.month=i%12||i}},MMMM:{pattern:this.matchWord,parser:(t,e)=>{const s=this.getAllMonths().indexOf(e)+1;if(s<1)throw new Error;t.month=s%12||s}},y:{pattern:this.matchSigned,parser:this.addInput("year")},yy:{pattern:this.match2,parser:(t,e)=>{t.year=this.parseTwoDigitYear(+e)}},yyyy:{pattern:this.match4,parser:this.addInput("year")}}}setLocale(t){return this.localization||(this.localization=o,this.localization.locale=t),this}setLocalization(t){return this.localization=t,this}static convert(t,e="default",s=undefined){if(!t)throw new Error("A date is required");return s||((s=o).locale=e),new d(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocalization(s)}get clone(){return new d(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocalization(this.localization)}static isValid(t){return void 0!==t&&"null"!==JSON.stringify(t)&&t.constructor.name===d.name}startOf(t,e=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(i.date),this.weekDay===e)break;const t=(this.weekDay-e+7)%7;this.manipulate(-1*t,i.date);break}case"month":this.startOf(i.date),this.setDate(1);break;case"year":this.startOf(i.date),this.setMonth(0,1)}return this}endOf(t,e=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(i.date);const t=6+e;if(this.weekDay===t)break;this.manipulate(t-this.weekDay,i.date);break}case"month":this.endOf(i.date),this.manipulate(1,i.month),this.setDate(0);break;case"year":this.endOf(i.date),this.setMonth(11,31)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}isBefore(t,e){if(!d.isValid(t))return!1;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(!d.isValid(t))return!1;if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=d.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(!d.isValid(t)||!d.isValid(e))return!1;if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1],n=o?this.isAfter(t,s):!this.isBefore(t,s),r=a?this.isBefore(e,s):!this.isAfter(e,s);return n&&r}parts(t=this.localization.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,a).second}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.parts(void 0,a).minute}get hours(){return this.getHours()}set hours(t){this.setHours(t)}getHoursFormatted(t="h12"){return this.parts(void 0,{...a,hourCycle:t}).hour}meridiem(t=this.localization.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,a).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,a).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():s>this.weeksInWeekYear()&&(s=1),s}weeksInWeekYear(){const t=(this.year+Math.floor(this.year/4)-Math.floor(this.year/100)+Math.floor(this.year/400))%7,e=this.year-1,s=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4===t||3===s?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]}getAllMonths(t="long"){const e=new Intl.DateTimeFormat(this.localization.locale,{month:t}).format;return[...Array(12).keys()].map((t=>e(new Date(2021,t))))}replaceTokens(t,e){return t.replace(/(\[[^[\]]*])|(LTS?|l{1,4}|L{1,4})/g,((t,s,i)=>{const a=i&&i.toUpperCase();return s||e[a]||o.dateFormats[a]}))}parseTwoDigitYear(t){return t+(t>68?1900:2e3)}offsetFromString(t){if(!t)return 0;if("Z"===t)return 0;const[e,s,i]=t.match(/([+-]|\d\d)/g),o=60*+s+(+i||0);return 0===o?0:"+"===e?-o:o}zoneInformation(t,e){let s=t.parts(this.localization.locale,{timeZoneName:"longOffset"}).timeZoneName.replace("GMT","").replace(":","");const i=s.includes("-");return s=s.replace("-",""),"z"===e?s=s.substring(1,2):"zz"===e&&(s=s.substring(0,2)),`${i?"-":""}${s}`}addInput(t){return(e,s)=>{e[t]=+s}}getLocaleAfternoon(){return new Intl.DateTimeFormat(this.localization.locale,{hour:"numeric",hour12:!0}).formatToParts(new Date(2022,3,4,13)).find((t=>"dayPeriod"===t.type))?.value?.replace(/\s+/g," ")}meridiemMatch(t){return t.toLowerCase()===this.getLocaleAfternoon().toLowerCase()}correctHours(t){const{afternoon:e}=t;if(void 0!==e){const{hours:s}=t;e?s<12&&(t.hours+=12):12===s&&(t.hours=0),delete t.afternoon}}makeParser(t){const e=(t=this.replaceTokens(t,this.localization.dateFormats)).match(this.formattingTokens),{length:s}=e,i=[];for(let t=0;t{const e={hours:0,minutes:0,seconds:0,milliseconds:0};for(let o=0,a=0;o-1)return new d(("X"===e.format?1e3:1)*+t);t=t.replace(/\s+/g," ");const i=s.makeParser(e.format),{year:o,month:a,day:n,hours:r,minutes:l,seconds:c,milliseconds:h,zone:p}=i(t),u=n||(o||a?1:s.getDate()),m=o||s.getFullYear();let y=0;return o&&!a||(y=a>0?a-1:s.getMonth()),p?new d(Date.UTC(m,y,u,r,l,c,h+60*p.offset*1e3)):new d(m,y,u,r,l,c,h)}catch(i){s.errorMessages.customDateFormatError(`Unable to parse provided input: ${t}, format: ${e.format}`)}}format(t,e=this.localization.locale){if(t&&"object"==typeof t)return new Intl.DateTimeFormat(e,t).format(this);const s=this.replaceTokens(t||this.localization.format||`${o.dateFormats.L}, ${o.dateFormats.LT}`,this.localization.dateFormats),i=t=>new Intl.DateTimeFormat(this.localization.locale,t).format(this);this.localization.hourCycle||(this.localization.hourCycle=r(this.localization.locale));const a=this.localization.hourCycle.startsWith("h1")?"h24":this.localization.hourCycle,n=this.localization.hourCycle.startsWith("h2")?"h12":this.localization.hourCycle,d={y:this.year,yy:i({year:"2-digit"}),yyyy:this.year,M:i({month:"numeric"}),MM:this.monthFormatted,MMM:this.getAllMonths("short")[this.getMonth()],MMMM:this.getAllMonths()[this.getMonth()],d:this.date,dd:this.dateFormatted,ddd:i({weekday:"short"}),dddd:i({weekday:"long"}),H:this.getHours(),HH:this.getHoursFormatted(a),h:this.hours>12?this.hours-12:this.hours,hh:this.getHoursFormatted(n),t:this.meridiem(),T:this.meridiem().toUpperCase(),m:this.minutes,mm:this.minutesFormatted,s:this.seconds,ss:this.secondsFormatted,fff:this.getMilliseconds()};return s.replace(this.dateTimeRegex,((t,e)=>e||d[t])).replace(/\[/g,"").replace(/]/g,"")}}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 c;const h=[{name:"calendar",className:s.css.daysContainer,unit:i.month,step:1},{name:"months",className:s.css.monthsContainer,unit:i.year,step:1},{name:"years",className:s.css.yearsContainer,unit:i.year,step:10},{name:"decades",className:s.css.decadesContainer,unit:i.year,step:100}];class p{constructor(){this._currentCalendarViewMode=0,this._viewDate=new d,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=h[t].name}get viewDate(){return this._viewDate}set viewDate(t){this._viewDate=t,this.options&&(this.options.viewDate=t)}refreshCurrentView(){this.currentView=h[this.currentCalendarViewMode].name}get isTwelveHour(){return["h12","h11"].includes(this.options.localization.hourCycle)}}class u{constructor(){this.optionsStore=c.locate(p)}isValid(t,e){if(!this._enabledDisabledDatesIsValid(e,t))return!1;if(e!==i.month&&e!==i.year&&this.optionsStore.options.restrictions.daysOfWeekDisabled?.length>0&&-1!==this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(t.weekDay))return!1;if(!this._minMaxIsValid(e,t))return!1;if(e===i.hours||e===i.minutes||e===i.seconds){if(!this._enabledDisabledHoursIsValid(t))return!1;if(0!==this.optionsStore.options.restrictions.disabledTimeIntervals?.filter((e=>t.isBetween(e.from,e.to))).length)return!1}return!0}_enabledDisabledDatesIsValid(t,e){return t!==i.date||!(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(e))&&!(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(e))}_isInDisabledDates(t){return!(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)&&!!this.optionsStore.options.restrictions.disabledDates.find((e=>e.isSame(t,i.date)))}_isInEnabledDates(t){return!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length||!!this.optionsStore.options.restrictions.enabledDates.find((e=>e.isSame(t,i.date)))}_minMaxIsValid(t,e){return(!this.optionsStore.options.restrictions.minDate||!e.isBefore(this.optionsStore.options.restrictions.minDate,t))&&(!this.optionsStore.options.restrictions.maxDate||!e.isAfter(this.optionsStore.options.restrictions.maxDate,t))}_enabledDisabledHoursIsValid(t){return!(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(t))&&!(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(t))}_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.includes(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.includes(e)}dateRangeIsValid(t,e,s){if(!this.optionsStore.options.dateRange)return!0;if(2!==t.length&&1!==e)return!0;const o=t[0].clone;if(o.isSame(s,i.date))return!0;for(o.manipulate(1,i.date);!o.isSame(s,i.date);){if(!this.isValid(o,i.date))return!1;o.manipulate(1,i.date)}return!0}}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,this.updateViewDate=new m}destroy(){this.triggerEvent.destroy(),this.viewUpdate.destroy(),this.updateDisplay.destroy(),this.action.destroy(),this.updateViewDate.destroy()}}const g={clear:"Clear selection",close:"Close the picker",dateFormats:o.dateFormats,dayViewHeaderFormat:{month:"long",year:"2-digit"},decrementHour:"Decrement Hour",decrementMinute:"Decrement Minute",decrementSecond:"Decrement Second",format:o.format,hourCycle:o.hourCycle,incrementHour:"Increment Hour",incrementMinute:"Increment Minute",incrementSecond:"Increment Second",locale:o.locale,maxWeekdayLength:0,nextCentury:"Next Century",nextDecade:"Next Decade",nextMonth:"Next Month",nextYear:"Next Year",ordinal:o.ordinal,pickHour:"Pick Hour",pickMinute:"Pick Minute",pickSecond:"Pick Second",previousCentury:"Previous Century",previousDecade:"Previous Decade",previousMonth:"Previous Month",previousYear:"Previous Year",selectDate:"Select Date",selectDecade:"Select Decade",selectMonth:"Select Month",selectTime:"Select Time",selectYear:"Select Year",startOfTheWeek:0,today:"Go to today",toggleMeridiem:"Toggle Meridiem"},v={allowInputToggle:!1,container:void 0,dateRange:!1,debug:!1,defaultDate:void 0,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",placement:"bottom"},keepInvalid:!1,localization:g,meta:{},multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},stepping:1,useCurrent:!0,viewDate:new d},S={...g};function f(t,e){if(!t)return null;if(t.constructor.name===d.name)return t;if(t.constructor.name===Date.name)return d.convert(t);if("string"==typeof t){const s=d.fromString(t,e);return"null"===JSON.stringify(s)?null:s}return null}function w(t,e,i){"string"==typeof t&&"input"!==e&&s.errorMessages.dateString();const o=f(t,i);return o||s.errorMessages.failedToParseDate(e,t,"input"===e),o}function b(t,e,i,a=o){Array.isArray(e)||s.errorMessages.typeMismatch(t,i,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||s.errorMessages.typeMismatch(t,i,"array of numbers")}function _(t){return({value:e,providedType:s,localization:i})=>{const o=w(e,t,i);if(void 0!==o)return o.setLocalization(i),o}}function k(t){const e=_(t);return t=>void 0===t.value?t.value:e(t)}function C(t,e,i){return({value:o,providedType:a})=>void 0===o?[]:(D(t,o,a),o.some((t=>ti))&&s.errorMessages.numbersOutOfRange(t,e,i),o)}function M(t){return C(t,0,23)}function E(t){return({value:e,providedType:s,localization:i})=>void 0===e?[]:(b(t,e,s,i),e)}function L(t){return({value:e,path:i})=>(t.includes(e)||s.errorMessages.unexpectedOptionValue(i.substring(1),e,t),e)}const T=Object.freeze({defaultDate:_("defaultDate"),viewDate:_("viewDate"),minDate:k("restrictions.minDate"),maxDate:k("restrictions.maxDate"),disabledHours:M("restrictions.disabledHours"),enabledHours:M("restrictions.enabledHours"),disabledDates:E("restrictions.disabledDates"),enabledDates:E("restrictions.enabledDates"),daysOfWeekDisabled:C("restrictions.daysOfWeekDisabled",0,6),disabledTimeIntervals:({key:t,value:e,providedType:i,localization:o})=>{if(void 0===e)return[];Array.isArray(e)||s.errorMessages.typeMismatch(t,i,"array of { from: DateTime|Date, to: DateTime|Date }");const a=e;for(let e=0;e{const i=`${t}[${e}].${s}`,n=w(a[e][s],i,o);n.setLocalization(o),a[e][s]=n}));return a},toolbarPlacement:L(["top","bottom","default"]),type:L(["icons","sprites"]),viewMode:L(["clock","calendar","months","years","decades"]),theme:L(["light","dark","auto"]),placement:L(["top","bottom"]),meta:({value:t})=>t,dayViewHeaderFormat:({value:t})=>t,container:({value:t,path:e})=>(t&&!(t instanceof HTMLElement||t instanceof Element||t?.appendChild)&&s.errorMessages.typeMismatch(e.substring(1),typeof t,"HTMLElement"),t),useTwentyfourHour:({value:t,path:e,providedType:i,defaultType:o})=>{if(s.errorMessages.deprecatedWarning("useTwentyfourHour",'Please use "options.localization.hourCycle" instead'),void 0===t||"boolean"===i)return t;s.errorMessages.typeMismatch(e,i,o)},hourCycle:L(["h11","h12","h23","h24"])}),A=({value:t,defaultType:e,providedType:i,path:o})=>{switch(e){case"boolean":return"true"===t||!0===t;case"number":return+t;case"string":return t.toString();case"object":return{};case"function":return t;default:s.errorMessages.typeMismatch(o,i,e)}};class V{static deepCopy(t){const e={};return Object.keys(t).forEach((s=>{const i=t[s];i instanceof d?e[s]=i.clone:i instanceof Date?e[s]=new Date(i.valueOf()):(e[s]=i,"object"!=typeof i||i instanceof HTMLElement||i instanceof Element||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,i,o=""){const a=V.objectPath(o,v),n=Object.keys(t).filter((t=>!Object.keys(a).includes(t)));if(n.length>0){const t=V.getFlattenDefaultOptions(),e=n.map((e=>{let s=`"${o}.${e}" in not a known option.`;const i=t.find((t=>t.includes(e)));return i&&(s+=` Did you mean "${i}"?`),s}));s.errorMessages.unexpectedOptions(e)}Object.keys(t).filter((t=>"__proto__"!==t&&"constructor"!==t)).forEach((s=>{"."===(o+=`.${s}`).charAt(0)&&(o=o.slice(1));const n=a[s],r=typeof t[s],d=typeof n,l=t[s];if(null==l)return e[s]=l,void(o=o.substring(0,o.lastIndexOf(`.${s}`)));"object"!=typeof n||Array.isArray(t[s])||n instanceof Date||V.ignoreProperties.includes(s)?e[s]=V.processKey(s,l,r,d,o,i):V.spread(t[s],e[s],i,o),o=o.substring(0,o.lastIndexOf(`.${s}`))}))}static processKey(t,e,s,i,o,a){return(T[(n={key:t,value:e,providedType:s,defaultType:i,path:o,localization:a}).key]||A)(n);var n}static _mergeOptions(t,e){const s=V.deepCopy(e),i="default"!==e.localization?.locale?e.localization:t?.localization||v.localization;return V.spread(t,s,i,""),s}static _dataToOptions(t,e){const i=JSON.parse(JSON.stringify(t.dataset));if(i?.tdTargetInput&&delete i.tdTargetInput,i?.tdTargetToggle&&delete i.tdTargetToggle,!i||0===Object.keys(i).length||i.constructor!==DOMStringMap)return e;const o={},a=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},n=this.normalizeObject(a),r=a(e);return Object.keys(i).filter((t=>t.startsWith(s.dataKey))).map((t=>t.substring(2))).forEach((t=>{let s=r[t.toLowerCase()];if(t.includes("_")){const a=t.split("_");s=r[a[0].toLowerCase()],void 0!==s&&e[s].constructor===Object&&(o[s]=n(a,1,e[s],i[`td${t}`]))}else void 0!==s&&(o[s]=i[`td${t}`])})),this._mergeOptions(o,e)}static normalizeObject(t){const e=(s,i,o,a)=>{const n=t(o)[s[i].toLowerCase()],r={};return void 0===n||(o[n].constructor===Object?(i++,r[n]=e(s,i,o[n],a)):r[n]=a),r};return e}static _dateTypeCheck(t,e){return f(t,e)}static _typeCheckDateArray(t,e,s,i){return b(t,e,s,i)}static _typeCheckNumberArray(t,e,s){return D(t,e,s)}static dateConversion(t,e,s){return w(t,e,s)}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)||s.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)&&s.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&s.errorMessages.conflictingConfiguration("maxDate is before minDate")),t.multipleDates&&t.dateRange&&s.errorMessages.conflictingConfiguration('Cannot uss option "multipleDates" with "dateRange"')}}V.ignoreProperties=["meta","dayViewHeaderFormat","container","dateForms","ordinal"],V.isValue=t=>null!=t;class ${constructor(){this._dates=[],this.optionsStore=c.locate(p),this.validation=c.locate(u),this._eventEmitters=c.locate(y)}get picked(){return[...this._dates]}get lastPicked(){return this._dates[this.lastPickedIndex]?.clone}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){return t?(t.localization=this.optionsStore.options.localization,t.format()):""}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.setLocalization(this.optionsStore.options.localization),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!d.isValid(t))return!1;if(!e)return void 0!==this._dates.find((e=>e.isSame(t)));const s=n(e),i=t.format(s);return void 0!==this._dates.map((t=>t.format(s))).find((t=>t===i))}pickedIndex(t,e){if(!d.isValid(t))return-1;if(!e)return this._dates.map((t=>t.valueOf())).indexOf(t.valueOf());const s=n(e),i=t.format(s);return this._dates.map((t=>t.format(s))).indexOf(i)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:s.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[],this.optionsStore.input&&(this.optionsStore.input.value=""),this._eventEmitters.updateDisplay.emit("all")}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}updateInput(t){if(!this.optionsStore.input)return;let e=this.formatInput(t);(this.optionsStore.options.multipleDates||this.optionsStore.options.dateRange)&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)}setValue(t,e){const o=void 0===e,a=!t&&o;let n=this.optionsStore.unset?null:this._dates[e]?.clone;if(!n&&!this.optionsStore.unset&&o&&a&&(n=this.lastPicked),t&&n?.isSame(t))return void this.updateInput(t);if(!t)return void this._setValueNull(a,e,n);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.startOf(i.minutes));const r=i=>{this._dates[e]=t,this._eventEmitters.updateViewDate.emit(t.clone),this.updateInput(t),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),this._eventEmitters.triggerEvent.emit({type:s.events.change,date:t,oldDate:n,isClear:a,isValid:i})};this.validation.isValid(t)&&this.validation.dateRangeIsValid(this.picked,e,t)?r(!0):(this.optionsStore.options.keepInvalid&&r(!1),this._eventEmitters.triggerEvent.emit({type:s.events.error,reason:s.errorMessages.failedToSetInvalidDate,date:t,oldDate:n}))}_setValueNull(t,e,i){!this.optionsStore.options.multipleDates||1===this._dates.length||t?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),this.updateInput(),this._eventEmitters.triggerEvent.emit({type:s.events.change,date:void 0,oldDate:i,isClear:t,isValid:!0}),this._eventEmitters.updateDisplay.emit("all")}}var z;!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"}(z||(z={}));var H=z;class O{constructor(){this.optionsStore=c.locate(p),this.dates=c.locate($),this.validation=c.locate(u)}getPicker(){const t=document.createElement("div");if(t.classList.add(s.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(s.css.calendarWeeks,s.css.noHighlight),t.appendChild(e)}const{rangeHoverEvent:e,rangeHoverOutEvent:i}=this.handleMouseEvents(t);for(let o=0;o<42;o++){if(0!==o&&o%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(s.css.calendarWeeks,s.css.noHighlight),t.appendChild(e)}const a=document.createElement("div");a.setAttribute("data-action",H.selectDay),t.appendChild(a),matchMedia("(hover: hover)").matches&&this.optionsStore.options.dateRange&&(a.addEventListener("mouseover",e),a.addEventListener("mouseout",i))}return t}_update(t,e){const o=t.getElementsByClassName(s.css.daysContainer)[0];this._updateCalendarView(o);const a=this.optionsStore.viewDate.clone.startOf(i.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,i.hours);this._handleCalendarWeeks(o,a.clone),o.querySelectorAll(`[data-action="${H.selectDay}"]`).forEach((t=>{const o=[];o.push(s.css.day),a.isBefore(this.optionsStore.viewDate,i.month)&&o.push(s.css.old),a.isAfter(this.optionsStore.viewDate,i.month)&&o.push(s.css.new),this.optionsStore.unset||this.optionsStore.options.dateRange||!this.dates.isPicked(a,i.date)||o.push(s.css.active),this.validation.isValid(a,i.date)||o.push(s.css.disabled),a.isSame(new d,i.date)&&o.push(s.css.today),0!==a.weekDay&&6!==a.weekDay||o.push(s.css.weekend),this._handleDateRange(a,o),e(i.date,a,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",this._dateToDataValue(a)),t.setAttribute("data-day",`${a.date}`),t.innerText=a.parts(void 0,{day:"numeric"}).day,a.manipulate(1,i.date)}))}_dateToDataValue(t){return d.isValid(t)?`${t.year}-${t.monthFormatted}-${t.dateFormatted}`:""}_handleDateRange(t,e){const o=this.dates.picked[0],a=this.dates.picked[1];this.optionsStore.options.dateRange&&(t.isBetween(o,a,i.date)&&e.push(s.css.rangeIn),t.isSame(o,i.date)&&e.push(s.css.rangeStart),t.isSame(a,i.date)&&e.push(s.css.rangeEnd))}handleMouseEvents(t){return{rangeHoverEvent:e=>{const o=e?.currentTarget;if(1!==this.dates.picked.length||o.classList.contains(s.css.disabled))return;const a=[...t.querySelectorAll(".day")],n=o.getAttribute("data-value"),r=d.fromString(n,{format:"yyyy-MM-dd"}),l=a.findIndex((t=>t.getAttribute("data-value")===n)),c=this.dates.picked[0],h=this.dates.picked[1],p=this._dateToDataValue(c),u=a.findIndex((t=>t.getAttribute("data-value")===p)),m=a[u];let y;r.isSame(c,i.date)||o.classList.remove(s.css.rangeStart),r.isSame(h,i.date)||o.classList.remove(s.css.rangeEnd),r.isBefore(c)?(o.classList.add(s.css.rangeStart),m?.classList.remove(s.css.rangeStart),m?.classList.add(s.css.rangeEnd),y=(t,e)=>e>l&&eeu),a.filter(y).forEach((t=>{t.classList.add(s.css.rangeIn)}))},rangeHoverOutEvent:e=>{const o=[...t.querySelectorAll(".day")];if(1===this.dates.picked.length&&o.forEach((t=>t.classList.remove(s.css.rangeIn))),1!==this.dates.picked.length)return;const a=e?.currentTarget,n=new d(a.getAttribute("data-value"));n.isSame(this.dates.picked[0],i.date)||a.classList.remove(s.css.rangeStart),n.isSame(this.dates.picked[1],i.date)||a.classList.remove(s.css.rangeEnd)}}}_updateCalendarView(t){if("calendar"!==this.optionsStore.currentView)return;const[e,o,a]=t.parentElement.getElementsByClassName(s.css.calendarHeader)[0].getElementsByTagName("div");o.setAttribute(s.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.optionsStore.options.display.components.month?o.classList.remove(s.css.disabled):o.classList.add(s.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,i.month),i.month)?e.classList.remove(s.css.disabled):e.classList.add(s.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,i.month),i.month)?a.classList.remove(s.css.disabled):a.classList.add(s.css.disabled)}_daysOfTheWeek(){const t=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(i.date),e=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(s.css.calendarWeeks,s.css.noHighlight),t.innerText="#",e.push(t)}for(let o=0;o<7;o++){const o=document.createElement("div");o.classList.add(s.css.dayOfTheWeek,s.css.noHighlight);let a=t.format({weekday:"short"});this.optionsStore.options.localization.maxWeekdayLength>0&&(a=a.substring(0,this.optionsStore.options.localization.maxWeekdayLength)),o.innerText=a,t.manipulate(1,i.date),e.push(o)}return e}_handleCalendarWeeks(t,e){[...t.querySelectorAll(`.${s.css.calendarWeeks}`)].filter((t=>"#"!==t.innerText)).forEach((t=>{t.innerText=`${e.week}`,e.manipulate(7,i.date)}))}}class x{constructor(){this.optionsStore=c.locate(p),this.dates=c.locate($),this.validation=c.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(s.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",H.selectMonth),t.appendChild(e)}return t}_update(t,e){const o=t.getElementsByClassName(s.css.monthsContainer)[0];if("months"===this.optionsStore.currentView){const[t,e,a]=o.parentElement.getElementsByClassName(s.css.calendarHeader)[0].getElementsByTagName("div");e.setAttribute(s.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.optionsStore.options.display.components.year?e.classList.remove(s.css.disabled):e.classList.add(s.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,i.year),i.year)?t.classList.remove(s.css.disabled):t.classList.add(s.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,i.year),i.year)?a.classList.remove(s.css.disabled):a.classList.add(s.css.disabled)}const a=this.optionsStore.viewDate.clone.startOf(i.year);o.querySelectorAll(`[data-action="${H.selectMonth}"]`).forEach(((t,o)=>{const n=[];n.push(s.css.month),!this.optionsStore.unset&&this.dates.isPicked(a,i.month)&&n.push(s.css.active),this.validation.isValid(a,i.month)||n.push(s.css.disabled),e(i.month,a,n,t),t.classList.remove(...t.classList),t.classList.add(...n),t.setAttribute("data-value",`${o}`),t.innerText=`${a.format({month:"short"})}`,a.manipulate(1,i.month)}))}}class I{constructor(){this.optionsStore=c.locate(p),this.dates=c.locate($),this.validation=c.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(s.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",H.selectYear),t.appendChild(e)}return t}_update(t,e){this._startYear=this.optionsStore.viewDate.clone.manipulate(-1,i.year),this._endYear=this.optionsStore.viewDate.clone.manipulate(10,i.year);const o=t.getElementsByClassName(s.css.yearsContainer)[0];if("years"===this.optionsStore.currentView){const[t,e,a]=o.parentElement.getElementsByClassName(s.css.calendarHeader)[0].getElementsByTagName("div");e.setAttribute(s.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.optionsStore.options.display.components.decades?e.classList.remove(s.css.disabled):e.classList.add(s.css.disabled),this.validation.isValid(this._startYear,i.year)?t.classList.remove(s.css.disabled):t.classList.add(s.css.disabled),this.validation.isValid(this._endYear,i.year)?a.classList.remove(s.css.disabled):a.classList.add(s.css.disabled)}const a=this.optionsStore.viewDate.clone.startOf(i.year).manipulate(-1,i.year);o.querySelectorAll(`[data-action="${H.selectYear}"]`).forEach((t=>{const o=[];o.push(s.css.year),!this.optionsStore.unset&&this.dates.isPicked(a,i.year)&&o.push(s.css.active),this.validation.isValid(a,i.year)||o.push(s.css.disabled),e(i.year,a,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${a.year}`),t.innerText=a.format({year:"numeric"}),a.manipulate(1,i.year)}))}}class P{constructor(){this.optionsStore=c.locate(p),this.dates=c.locate($),this.validation=c.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(s.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",H.selectDecade),t.appendChild(e)}return t}_update(t,e){const[o,a]=$.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(i.year),this._startDecade.year=o,this._endDecade=this.optionsStore.viewDate.clone.startOf(i.year),this._endDecade.year=a;const n=t.getElementsByClassName(s.css.decadesContainer)[0],[r,d,l]=n.parentElement.getElementsByClassName(s.css.calendarHeader)[0].getElementsByTagName("div");"decades"===this.optionsStore.currentView&&(d.setAttribute(s.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,i.year)?r.classList.remove(s.css.disabled):r.classList.add(s.css.disabled),this.validation.isValid(this._endDecade,i.year)?l.classList.remove(s.css.disabled):l.classList.add(s.css.disabled));const c=this.dates.picked.map((t=>t.year));n.querySelectorAll(`[data-action="${H.selectDecade}"]`).forEach(((t,o)=>{if(0===o)return t.classList.add(s.css.old),this._startDecade.year-10<0?(t.textContent=" ",r.classList.add(s.css.disabled),t.classList.add(s.css.disabled),void t.setAttribute("data-value","")):(t.innerText=this._startDecade.clone.manipulate(-10,i.year).format({year:"numeric"}),void t.setAttribute("data-value",`${this._startDecade.year}`));const a=[];a.push(s.css.decade);const n=this._startDecade.year,d=this._startDecade.year+9;!this.optionsStore.unset&&c.filter((t=>t>=n&&t<=d)).length>0&&a.push(s.css.active),e("decade",this._startDecade,a,t),t.classList.remove(...t.classList),t.classList.add(...a),t.setAttribute("data-value",`${this._startDecade.year}`),t.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,i.year)}))}}class N{constructor(){this._gridColumns="",this.optionsStore=c.locate(p),this.dates=c.locate($),this.validation=c.locate(u)}getPicker(t){const e=document.createElement("div");return e.classList.add(s.css.clockContainer),e.append(...this._grid(t)),e}_update(t){const e=t.getElementsByClassName(s.css.clockContainer)[0];let o=this.dates.lastPicked?.clone;if(!o&&this.optionsStore.options.useCurrent&&(o=this.optionsStore.viewDate.clone),e.querySelectorAll(".disabled").forEach((t=>t.classList.remove(s.css.disabled))),this.optionsStore.options.display.components.hours&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,i.hours),i.hours)||e.querySelector(`[data-action=${H.incrementHours}]`).classList.add(s.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,i.hours),i.hours)||e.querySelector(`[data-action=${H.decrementHours}]`).classList.add(s.css.disabled),e.querySelector(`[data-time-component=${i.hours}]`).innerText=o?o.getHoursFormatted(this.optionsStore.options.localization.hourCycle):"--"),this.optionsStore.options.display.components.minutes&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,i.minutes),i.minutes)||e.querySelector(`[data-action=${H.incrementMinutes}]`).classList.add(s.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,i.minutes),i.minutes)||e.querySelector(`[data-action=${H.decrementMinutes}]`).classList.add(s.css.disabled),e.querySelector(`[data-time-component=${i.minutes}]`).innerText=o?o.minutesFormatted:"--"),this.optionsStore.options.display.components.seconds&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,i.seconds),i.seconds)||e.querySelector(`[data-action=${H.incrementSeconds}]`).classList.add(s.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,i.seconds),i.seconds)||e.querySelector(`[data-action=${H.decrementSeconds}]`).classList.add(s.css.disabled),e.querySelector(`[data-time-component=${i.seconds}]`).innerText=o?o.secondsFormatted:"--"),this.optionsStore.isTwelveHour){const t=e.querySelector(`[data-action=${H.toggleMeridiem}]`),a=(o||this.optionsStore.viewDate).clone;t.innerText=a.meridiem(),this.validation.isValid(a.manipulate(a.hours>=12?-12:12,i.hours))?t.classList.remove(s.css.disabled):t.classList.add(s.css.disabled)}e.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(t){this._gridColumns="";const e=[],o=[],a=[],n=document.createElement("div"),r=t(this.optionsStore.options.display.icons.up),d=t(this.optionsStore.options.display.icons.down);n.classList.add(s.css.separator,s.css.noHighlight);const l=n.cloneNode(!0);l.innerHTML=":";const c=(t=!1)=>t?l.cloneNode(!0):n.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",H.incrementHours),t.appendChild(r.cloneNode(!0)),e.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickHour),t.setAttribute("data-action",H.showHours),t.setAttribute("data-time-component",i.hours),o.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementHour),t.setAttribute("data-action",H.decrementHours),t.appendChild(d.cloneNode(!0)),a.push(t),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(e.push(c()),o.push(c(!0)),a.push(c()),this._gridColumns+=" a");let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementMinute),t.setAttribute("data-action",H.incrementMinutes),t.appendChild(r.cloneNode(!0)),e.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickMinute),t.setAttribute("data-action",H.showMinutes),t.setAttribute("data-time-component",i.minutes),o.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementMinute),t.setAttribute("data-action",H.decrementMinutes),t.appendChild(d.cloneNode(!0)),a.push(t)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(e.push(c()),o.push(c(!0)),a.push(c()),this._gridColumns+=" a");let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementSecond),t.setAttribute("data-action",H.incrementSeconds),t.appendChild(r.cloneNode(!0)),e.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickSecond),t.setAttribute("data-action",H.showSeconds),t.setAttribute("data-time-component",i.seconds),o.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementSecond),t.setAttribute("data-action",H.decrementSeconds),t.appendChild(d.cloneNode(!0)),a.push(t)}if(this.optionsStore.isTwelveHour){this._gridColumns+=" a";let t=c();e.push(t);const i=document.createElement("button");i.setAttribute("type","button"),i.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),i.setAttribute("data-action",H.toggleMeridiem),i.setAttribute("tabindex","-1"),s.css.toggleMeridiem.includes(",")?i.classList.add(...s.css.toggleMeridiem.split(",")):i.classList.add(s.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(s.css.noHighlight),t.appendChild(i),o.push(t),t=c(),a.push(t)}return this._gridColumns=this._gridColumns.trim(),[...e,...o,...a]}}class F{constructor(){this.optionsStore=c.locate(p),this.validation=c.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(s.css.hourContainer);for(let e=0;e<(this.optionsStore.isTwelveHour?12:24);e++){const e=document.createElement("div");e.setAttribute("data-action",H.selectHour),t.appendChild(e)}return t}_update(t,e){const o=t.getElementsByClassName(s.css.hourContainer)[0],a=this.optionsStore.viewDate.clone.startOf(i.date);o.querySelectorAll(`[data-action="${H.selectHour}"]`).forEach((t=>{const o=[];o.push(s.css.hour),this.validation.isValid(a,i.hours)||o.push(s.css.disabled),e(i.hours,a,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${a.hours}`),t.innerText=a.getHoursFormatted(this.optionsStore.options.localization.hourCycle),a.manipulate(1,i.hours)}))}}class B{constructor(){this.optionsStore=c.locate(p),this.validation=c.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(s.css.minuteContainer);const 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",H.selectMinute),t.appendChild(e)}return t}_update(t,e){const o=t.getElementsByClassName(s.css.minuteContainer)[0],a=this.optionsStore.viewDate.clone.startOf(i.hours),n=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;o.querySelectorAll(`[data-action="${H.selectMinute}"]`).forEach((t=>{const o=[];o.push(s.css.minute),this.validation.isValid(a,i.minutes)||o.push(s.css.disabled),e(i.minutes,a,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${a.minutes}`),t.innerText=a.minutesFormatted,a.manipulate(n,i.minutes)}))}}class W{constructor(){this.optionsStore=c.locate(p),this.validation=c.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(s.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",H.selectSecond),t.appendChild(e)}return t}_update(t,e){const o=t.getElementsByClassName(s.css.secondContainer)[0],a=this.optionsStore.viewDate.clone.startOf(i.minutes);o.querySelectorAll(`[data-action="${H.selectSecond}"]`).forEach((t=>{const o=[];o.push(s.css.second),this.validation.isValid(a,i.seconds)||o.push(s.css.disabled),e(i.seconds,a,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${a.seconds}`),t.innerText=a.secondsFormatted,a.manipulate(5,i.seconds)}))}}class q{static toggle(t){t.classList.contains(s.css.show)?this.hide(t):this.show(t)}static showImmediately(t){t.classList.remove(s.css.collapsing),t.classList.add(s.css.collapse,s.css.show),t.style.height=""}static show(t){if(t.classList.contains(s.css.collapsing)||t.classList.contains(s.css.show))return;t.style.height="0",t.classList.remove(s.css.collapse),t.classList.add(s.css.collapsing),setTimeout((()=>{q.showImmediately(t)}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hideImmediately(t){t&&(t.classList.remove(s.css.collapsing,s.css.show),t.classList.add(s.css.collapse))}static hide(t){if(t.classList.contains(s.css.collapsing)||!t.classList.contains(s.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(s.css.collapse,s.css.show),t.classList.add(s.css.collapsing),t.style.height="",setTimeout((()=>{q.hideImmediately(t)}),this.getTransitionDurationFromElement(t))}}q.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 Y{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=c.locate(p),this.validation=c.locate(u),this.dates=c.locate($),this.dateDisplay=c.locate(O),this.monthDisplay=c.locate(x),this.yearDisplay=c.locate(I),this.decadeDisplay=c.locate(P),this.timeDisplay=c.locate(N),this.hourDisplay=c.locate(F),this.minuteDisplay=c.locate(B),this.secondDisplay=c.locate(W),this._eventEmitters=c.locate(y),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get dateContainer(){return this.widget?.querySelector(`div.${s.css.dateContainer}`)}get timeContainer(){return this.widget?.querySelector(`div.${s.css.timeContainer}`)}get isVisible(){return this._isVisible}_update(t){if(this.widget)switch(t){case i.seconds:this.secondDisplay._update(this.widget,this.paint);break;case i.minutes:this.minuteDisplay._update(this.widget,this.paint);break;case i.hours:this.hourDisplay._update(this.widget,this.paint);break;case i.date:this.dateDisplay._update(this.widget,this.paint);break;case i.month:this.monthDisplay._update(this.widget,this.paint);break;case i.year:this.yearDisplay._update(this.widget,this.paint);break;case"decade":this.decadeDisplay._update(this.widget,this.paint);break;case"clock":if(!this._hasTime)break;this.timeDisplay._update(this.widget),this._update(i.hours),this._update(i.minutes),this._update(i.seconds);break;case"calendar":this._update(i.date),this._update(i.year),this._update(i.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(this._showSetDefaultIfNeeded(),this._buildWidget(),this._updateTheme(),this._showSetupViewMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{const t=this.optionsStore.options?.container||document.body,e=this.optionsStore.options?.display?.placement||"bottom";t.appendChild(this.widget),this.createPopup(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?`${e}-end`:`${e}-start`}).then()}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:H.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(s.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(s.css.show),this.optionsStore.options.display.inline||(this.updatePopup(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:s.events.show}),this._isVisible=!0}_showSetupViewMode(){const t=this._hasTime&&!this._hasDate;t?(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:H.showClock})):this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),t||"clock"===this.optionsStore.options.display.viewMode||(this._hasTime&&(this.optionsStore.options.display.sideBySide?q.show(this.timeContainer):q.hideImmediately(this.timeContainer)),q.show(this.dateContainer)),this._hasDate&&this._showMode()}_showSetDefaultIfNeeded(){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const t=(new d).setLocalization(this.optionsStore.options.localization);if(!this.optionsStore.options.keepInvalid){let e=0,s=1;for(this.optionsStore.options.restrictions.maxDate?.isBefore(t)&&(s=-1);!this.validation.isValid(t)&&e>31;)t.manipulate(s,i.date),e++}this.dates.setValue(t)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}}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(`.${s.css.dateContainer} > div:not(.${s.css.calendarHeader}), .${s.css.timeContainer} > div:not(.${s.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=h[this.optionsStore.currentCalendarViewMode],i=this.widget.querySelector(`.${e.className}`);switch(e.className){case s.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case s.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case s.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case s.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}i.style.display="grid",this.optionsStore.options.display.sideBySide&&(this.widget.querySelectorAll(`.${s.css.clockContainer}`)[0].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(s.css.isDarkPreferredQuery).addEventListener("change",(()=>this._updateTheme())):window.matchMedia(s.css.isDarkPreferredQuery).removeEventListener("change",(()=>this._updateTheme()))}}_getThemeClass(){const t=this.optionsStore.options.display.theme||"auto",e=window.matchMedia&&window.matchMedia(s.css.isDarkPreferredQuery).matches;switch(t){case"light":return s.css.lightTheme;case"dark":return s.css.darkTheme;case"auto":return e?s.css.darkTheme:s.css.lightTheme}}_updateCalendarHeader(){if(!this._hasDate)return;const t=[...this.widget.querySelector(`.${s.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(s.css.dateContainer))),[e,i,o]=this.widget.getElementsByClassName(s.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case s.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),i.setAttribute("title",""),o.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case s.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),i.setAttribute("title",this.optionsStore.options.localization.selectDecade),o.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case s.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),i.setAttribute("title",this.optionsStore.options.localization.selectYear),o.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case s.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),i.setAttribute("title",this.optionsStore.options.localization.selectMonth),o.setAttribute("title",this.optionsStore.options.localization.nextMonth),i.setAttribute(t,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat))}i.innerText=i.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(s.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:s.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?.clone}),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(s.css.widget);const e=document.createElement("div");e.classList.add(s.css.dateContainer),e.append(this.getHeadTemplate(),this.decadeDisplay.getPicker(),this.yearDisplay.getPicker(),this.monthDisplay.getPicker(),this.dateDisplay.getPicker());const i=document.createElement("div");i.classList.add(s.css.timeContainer),i.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))),i.appendChild(this.hourDisplay.getPicker()),i.appendChild(this.minuteDisplay.getPicker()),i.appendChild(this.secondDisplay.getPicker());const o=document.createElement("div");if(o.classList.add(s.css.toolbar),o.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(s.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDateAndTime)return void this._buildWidgetSideBySide(t,e,i,o);"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(o);const a=(e,i,o,a)=>{e&&(i&&(o.classList.add(s.css.collapse),a&&o.classList.add(s.css.show)),t.appendChild(o))};a(this._hasDate,this._hasTime,e,"clock"!==this.optionsStore.options.display.viewMode),a(this._hasTime,this._hasDate,i,"clock"===this.optionsStore.options.display.viewMode),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(o);const n=document.createElement("div");n.classList.add("arrow"),n.setAttribute("data-popper-arrow",""),t.appendChild(n),this._widget=t}_buildWidgetSideBySide(t,e,i,o){t.classList.add(s.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(o);const a=document.createElement("div");a.classList.add("td-row"),e.classList.add("td-half"),i.classList.add("td-half"),a.appendChild(e),a.appendChild(i),t.appendChild(a),"bottom"===this.optionsStore.options.display.toolbarPlacement&&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)}get _hasDateAndTime(){return this._hasDate&&this._hasTime}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",H.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",H.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",H.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",H.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(s.css.calendarHeader);const e=document.createElement("div");e.classList.add(s.css.previous),e.setAttribute("data-action",H.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const i=document.createElement("div");i.classList.add(s.css.switch),i.setAttribute("data-action",H.changeCalendarView);const o=document.createElement("div");return o.classList.add(s.css.next),o.setAttribute("data-action",H.next),o.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,i,o),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;this._dispose(),t&&this.show()}refreshCurrentView(){switch(this._isVisible||this._dispose(),this.optionsStore.currentView){case"clock":this._update("clock");break;case"calendar":this._update(i.date);break;case"months":this._update(i.month);break;case"years":this._update(i.year);break;case"decades":this._update("decade")}}}class j{constructor(){this.optionsStore=c.locate(p),this.dates=c.locate($),this.validation=c.locate(u),this.display=c.locate(Y),this._eventEmitters=c.locate(y),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(t,e){const o=t?.currentTarget;if(o?.classList?.contains(s.css.disabled))return;e=e||o?.dataset?.action;const a=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(e){case H.next:case H.previous:this.handleNextPrevious(e);break;case H.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case H.selectMonth:case H.selectYear:case H.selectDecade:this.handleSelectCalendarMode(e,o);break;case H.selectDay:this.handleSelectDay(o);break;case H.selectHour:{let e=+o.dataset.value;a.hours>=12&&this.optionsStore.isTwelveHour&&(e+=12),a.hours=e,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(t);break}case H.selectMinute:a.minutes=+o.dataset.value,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(t);break;case H.selectSecond:a.seconds=+o.dataset.value,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(t);break;case H.incrementHours:this.manipulateAndSet(a,i.hours);break;case H.incrementMinutes:this.manipulateAndSet(a,i.minutes,this.optionsStore.options.stepping);break;case H.incrementSeconds:this.manipulateAndSet(a,i.seconds);break;case H.decrementHours:this.manipulateAndSet(a,i.hours,-1);break;case H.decrementMinutes:this.manipulateAndSet(a,i.minutes,-1*this.optionsStore.options.stepping);break;case H.decrementSeconds:this.manipulateAndSet(a,i.seconds,-1);break;case H.toggleMeridiem:this.manipulateAndSet(a,i.hours,this.dates.lastPicked.hours>=12?-12:12);break;case H.togglePicker:this.handleToggle(o);break;case H.showClock:case H.showHours:case H.showMinutes:case H.showSeconds:this.optionsStore.options.display.sideBySide||"clock"===this.optionsStore.currentView||(q.hideImmediately(this.display.dateContainer),q.showImmediately(this.display.timeContainer)),this.handleShowClockContainers(e);break;case H.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case H.close:this.display.hide();break;case H.today:{const t=(new d).setLocalization(this.optionsStore.options.localization);this._eventEmitters.updateViewDate.emit(t),this.validation.isValid(t,i.date)&&this.dates.setValue(t,this.dates.lastPickedIndex);break}}}handleShowClockContainers(t){if(!this.display._hasTime)return void s.errorMessages.throwError("Cannot show clock containers when time is disabled.");this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${s.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let e="";switch(t){case H.showClock:e=s.css.clockContainer,this.display._update("clock");break;case H.showHours:e=s.css.hourContainer,this.display._update(i.hours);break;case H.showMinutes:e=s.css.minuteContainer,this.display._update(i.minutes);break;case H.showSeconds:e=s.css.secondContainer,this.display._update(i.seconds)}this.display.widget.getElementsByClassName(e)[0].style.display="grid"}handleNextPrevious(t){const{unit:e,step:s}=h[this.optionsStore.currentCalendarViewMode];t===H.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.isTwelveHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,H.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)}handleSelectCalendarMode(t,e){const s=+e.dataset.value;switch(t){case H.selectMonth:this.optionsStore.viewDate.month=s;break;case H.selectYear:case H.selectDecade:this.optionsStore.viewDate.year=s}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)}handleToggle(t){t.getAttribute("title")===this.optionsStore.options.localization.selectDate?(t.setAttribute("title",this.optionsStore.options.localization.selectTime),t.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(t.setAttribute("title",this.optionsStore.options.localization.selectDate),t.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.handleShowClockContainers(H.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${s.css.dateContainer}, .${s.css.timeContainer}`).forEach((t=>q.toggle(t))),this._eventEmitters.viewUpdate.emit()}handleSelectDay(t){const e=this.optionsStore.viewDate.clone;t.classList.contains(s.css.old)&&e.manipulate(-1,i.month),t.classList.contains(s.css.new)&&e.manipulate(1,i.month),e.date=+t.dataset.day,this.optionsStore.options.dateRange?this.handleDateRange(e):this.optionsStore.options.multipleDates?this.handleMultiDate(e):this.dates.setValue(e,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.optionsStore.options.dateRange||this.display.hide()}handleMultiDate(t){let e=this.dates.pickedIndex(t,i.date);console.log(e),-1!==e?this.dates.setValue(null,e):(e=this.dates.lastPickedIndex+1,0===this.dates.picked.length&&(e=0),this.dates.setValue(t,e))}handleDateRange(t){switch(this.dates.picked.length){case 2:this.dates.clear();break;case 1:{const e=this.dates.picked[0];if(t.getTime()===e.getTime()){this.dates.clear();break}return t.isBefore(e)?(this.dates.setValue(t,0),void this.dates.setValue(e,1)):void this.dates.setValue(t,1)}}this.dates.setValue(t,0)}}class U{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||this.optionsStore.options.dateRange)try{const t=i.split(this.optionsStore.options.multipleDatesSeparator);for(let e=0;e{this.optionsStore.element?.disabled||this.optionsStore.input?.disabled||"INPUT"===this._toggle.nodeName&&"text"===this._toggle?.type&&this.optionsStore.options.allowInputToggle||this.toggle()},this._openClickEvent=()=>{this.optionsStore.element?.disabled||this.optionsStore.input?.disabled||this.display.isVisible||this.show()},c=new l,this._eventEmitters=c.locate(y),this.optionsStore=c.locate(p),this.display=c.locate(Y),this.dates=c.locate($),this.actions=c.locate(j),t||s.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,v,!0),this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization),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()})),this._eventEmitters.updateViewDate.subscribe((t=>{this.viewDate=t}))}get viewDate(){return this.optionsStore.viewDate}set viewDate(t){this.optionsStore.viewDate=t,this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization),this.display._update("clock"===this.optionsStore.currentView?"clock":"calendar")}updateOptions(t,e=!1){e?this._initializeOptions(t,v):this._initializeOptions(t,this.optionsStore.options),this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization),this.display.refreshCurrentView()}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 i;"string"==typeof t&&(t=[t]),i=Array.isArray(e)?e:[e],t.length!==i.length&&s.errorMessages.subscribeMismatch();const o=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:s.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.setLocalization(i.localization),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"),i.display.components.useTwentyfourHour&&void 0===i.localization.hourCycle?i.localization.hourCycle="h24":void 0===i.localization.hourCycle&&(i.localization.hourCycle=r(i.localization.locale)),this.optionsStore.options=i,i.restrictions.maxDate&&this.viewDate.isAfter(i.restrictions.maxDate)&&(this.viewDate=i.restrictions.maxDate),i.restrictions.minDate&&this.viewDate.isBefore(i.restrictions.minDate)&&(this.viewDate=i.restrictions.minDate)}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{const 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.value&&this.optionsStore.options.defaultDate&&(this.optionsStore.input.value=this.dates.formatInput(this.optionsStore.options.defaultDate)),this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&(this.optionsStore.input.addEventListener("click",this._openClickEvent),this.optionsStore.input.addEventListener("focus",this._openClickEvent)),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.multipleDates||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||this.display.widget?.getElementsByClassName(s.css.show)[0].classList.contains(s.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('[data-action="togglePicker"]')},action:H.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const R={},Q=t=>{R[t.name]||(R[t.name]=t.localization)},J=t=>{const e=R[t];e&&(v.localization=e)},K=function(t,e=undefined){return t?(t.installed||(t(e,{TempusDominus:U,Dates:$,Display:Y,DateTime:d,Namespace:s},G),t.installed=!0),G):G},Z="6.7.19",G={TempusDominus:U,extend:K,loadLocale:Q,locale:J,Namespace:s,DefaultOptions:v,DateTime:d,Unit:i,version:Z,DefaultEnLocalization:S};export{d as DateTime,S as DefaultEnLocalization,v as DefaultOptions,s as Namespace,U as TempusDominus,i as Unit,K as extend,Q as loadLocale,J as locale,Z as version};
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js
new file mode 100644
index 0000000..cb9d513
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js
@@ -0,0 +1,4691 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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 = {}));
+})(this, (function (exports) { 'use strict';
+
+ 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
+ */
+ numbersOutOfRange(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.
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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} Custom Date Format: ${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.`);
+ }
+ deprecatedWarning(message, remediation) {
+ console.warn(`${this.base} Warning ${message} is deprecated and will be removed in a future version. ${remediation}`);
+ }
+ throwError(message) {
+ const error = new TdError(`${this.base} ${message}`);
+ error.code = 9;
+ throw error;
+ }
+ }
+
+ // 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 decade 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';
+ this.rangeIn = 'range-in';
+ this.rangeStart = 'range-start';
+ this.rangeEnd = 'range-end';
+ //#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();
+
+ const DefaultFormatLocalization = {
+ 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',
+ },
+ format: 'L LT',
+ locale: 'default',
+ hourCycle: undefined,
+ ordinal: (n) => {
+ const s = ['th', 'st', 'nd', 'rd'];
+ const v = n % 100;
+ return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`;
+ },
+ };
+ var DefaultFormatLocalization$1 = { ...DefaultFormatLocalization };
+
+ 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',
+ };
+ /**
+ * Returns an Intl format object based on the provided object
+ * @param unit
+ */
+ const getFormatByUnit = (unit) => {
+ switch (unit) {
+ case 'date':
+ return { dateStyle: 'short' };
+ case 'month':
+ return {
+ month: 'numeric',
+ year: 'numeric',
+ };
+ case 'year':
+ return { year: 'numeric' };
+ }
+ };
+ /**
+ * Attempts to guess the hour cycle of the given local
+ * @param locale
+ */
+ const guessHourCycle = (locale) => {
+ if (!locale)
+ return 'h12';
+ // noinspection SpellCheckingInspection
+ const template = {
+ hour: '2-digit',
+ minute: '2-digit',
+ numberingSystem: 'latn',
+ };
+ const dt = new DateTime().setLocalization({ locale });
+ dt.hours = 0;
+ const start = dt.parts(undefined, template).hour;
+ //midnight is 12 so en-US style 12 AM
+ if (start === '12')
+ return 'h12';
+ //midnight is 24 is from 00-24
+ if (start === '24')
+ return 'h24';
+ dt.hours = 23;
+ const end = dt.parts(undefined, template).hour;
+ //if midnight is 00 and hour 23 is 11 then
+ if (start === '00' && end === '11')
+ return 'h11';
+ if (start === '00' && end === '23')
+ return 'h23';
+ console.warn(`couldn't determine hour cycle for ${locale}. start: ${start}. end: ${end}`);
+ return undefined;
+ };
+ /**
+ * 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);
+ this.localization = DefaultFormatLocalization$1;
+ 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];
+ //#region CDF stuff
+ this.dateTimeRegex =
+ //is regex cannot be simplified beyond what it already is
+ /(\[[^[\]]*])|y{1,4}|M{1,4}|d{1,4}|H{1,2}|h{1,2}|t|T|m{1,2}|s{1,2}|f{3}/g; //NOSONAR
+ this.formattingTokens = /(\[[^[\]]*])|([-_:/.,()\s]+)|(T|t|yyyy|yy?|MM?M?M?|Do|dd?|hh?|HH?|mm?|ss?)/g; //NOSONAR is regex cannot be simplified beyond what it already is
+ this.match2 = /\d\d/; // 00 - 99
+ this.match3 = /\d{3}/; // 000 - 999
+ this.match4 = /\d{4}/; // 0000 - 9999
+ this.match1to2 = /\d\d?/; // 0 - 99
+ this.matchSigned = /[+-]?\d+/; // -inf - inf
+ this.matchOffset = /[+-]\d\d:?(\d\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z
+ this.matchWord = /[^\d_:/,\-()\s]+/; // Word
+ this.zoneExpressions = [
+ this.matchOffset,
+ (obj, input) => {
+ obj.offset = this.offsetFromString(input);
+ },
+ ];
+ this.expressions = {
+ t: {
+ pattern: undefined,
+ parser: (obj, input) => {
+ obj.afternoon = this.meridiemMatch(input);
+ },
+ },
+ T: {
+ pattern: undefined,
+ parser: (obj, input) => {
+ obj.afternoon = this.meridiemMatch(input);
+ },
+ },
+ fff: {
+ pattern: this.match3,
+ parser: (obj, input) => {
+ obj.milliseconds = +input;
+ },
+ },
+ s: {
+ pattern: this.match1to2,
+ parser: this.addInput('seconds'),
+ },
+ ss: {
+ pattern: this.match1to2,
+ parser: this.addInput('seconds'),
+ },
+ m: {
+ pattern: this.match1to2,
+ parser: this.addInput('minutes'),
+ },
+ mm: {
+ pattern: this.match1to2,
+ parser: this.addInput('minutes'),
+ },
+ H: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ h: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ HH: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ hh: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ d: {
+ pattern: this.match1to2,
+ parser: this.addInput('day'),
+ },
+ dd: {
+ pattern: this.match2,
+ parser: this.addInput('day'),
+ },
+ Do: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ obj.day = +(input.match(/\d+/)[0] || 1);
+ if (!this.localization.ordinal)
+ return;
+ for (let i = 1; i <= 31; i += 1) {
+ if (this.localization.ordinal(i).replace(/[[\]]/g, '') === input) {
+ obj.day = i;
+ }
+ }
+ },
+ },
+ M: {
+ pattern: this.match1to2,
+ parser: this.addInput('month'),
+ },
+ MM: {
+ pattern: this.match2,
+ parser: this.addInput('month'),
+ },
+ MMM: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ const months = this.getAllMonths();
+ const monthsShort = this.getAllMonths('short');
+ const matchIndex = (monthsShort || months.map((_) => _.slice(0, 3))).indexOf(input) + 1;
+ if (matchIndex < 1) {
+ throw new Error();
+ }
+ obj.month = matchIndex % 12 || matchIndex;
+ },
+ },
+ MMMM: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ const months = this.getAllMonths();
+ const matchIndex = months.indexOf(input) + 1;
+ if (matchIndex < 1) {
+ throw new Error();
+ }
+ obj.month = matchIndex % 12 || matchIndex;
+ },
+ },
+ y: {
+ pattern: this.matchSigned,
+ parser: this.addInput('year'),
+ },
+ yy: {
+ pattern: this.match2,
+ parser: (obj, input) => {
+ obj.year = this.parseTwoDigitYear(+input);
+ },
+ },
+ yyyy: {
+ pattern: this.match4,
+ parser: this.addInput('year'),
+ },
+ // z: this.zoneExpressions,
+ // zz: this.zoneExpressions,
+ // zzz: this.zoneExpressions
+ };
+ //#endregion CDF stuff
+ }
+ /**
+ * Chainable way to set the {@link locale}
+ * @param value
+ * @deprecated use setLocalization with a FormatLocalization object instead
+ */
+ setLocale(value) {
+ if (!this.localization) {
+ this.localization = DefaultFormatLocalization$1;
+ this.localization.locale = value;
+ }
+ return this;
+ }
+ /**
+ * Chainable way to set the {@link localization}
+ * @param value
+ */
+ setLocalization(value) {
+ this.localization = value;
+ return this;
+ }
+ /**
+ * Converts a plain JS date object to a DateTime object.
+ * Doing this allows access to format, etc.
+ * @param date
+ * @param locale this parameter is deprecated. Use formatLocalization instead.
+ * @param formatLocalization
+ */
+ static convert(date, locale = 'default', formatLocalization = undefined) {
+ if (!date)
+ throw new Error(`A date is required`);
+ if (!formatLocalization) {
+ formatLocalization = DefaultFormatLocalization$1;
+ formatLocalization.locale = locale;
+ }
+ return new DateTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).setLocalization(formatLocalization);
+ }
+ /**
+ * 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()).setLocalization(this.localization);
+ }
+ static isValid(d) {
+ if (d === undefined || JSON.stringify(d) === 'null')
+ return false;
+ if (d.constructor.name === DateTime.name)
+ return true;
+ return false;
+ }
+ /**
+ * 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;
+ const goBack = (this.weekDay - startOfTheWeek + 7) % 7;
+ this.manipulate(goBack * -1, 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);
+ const endOfWeek = 6 + startOfTheWeek;
+ if (this.weekDay === endOfWeek)
+ break;
+ this.manipulate(endOfWeek - 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.setMonth(11, 31);
+ 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;
+ }
+ /**
+ * Return true if {@link compare} is before this date
+ * @param compare The Date/DateTime to compare
+ * @param unit If provided, uses {@link startOf} for
+ * comparison.
+ */
+ isBefore(compare, unit) {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare))
+ return false;
+ 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
+ * comparison.
+ */
+ isAfter(compare, unit) {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare))
+ return false;
+ 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
+ * comparison.
+ */
+ isSame(compare, unit) {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare))
+ return false;
+ 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 one of the comparisons is undefined, return false
+ if (!DateTime.isValid(left) || !DateTime.isValid(right))
+ return false;
+ // If a unit is provided and is not a valid property of the DateTime object, throw an error
+ if (unit && this[unit] === undefined) {
+ throw new Error(`Unit '${unit}' is not valid`);
+ }
+ const leftInclusivity = inclusivity[0] === '(';
+ const rightInclusivity = inclusivity[1] === ')';
+ const isLeftInRange = leftInclusivity
+ ? this.isAfter(left, unit)
+ : !this.isBefore(left, unit);
+ const isRightInRange = rightInclusivity
+ ? this.isBefore(right, unit)
+ : !this.isAfter(right, unit);
+ return isLeftInRange && isRightInRange;
+ }
+ /**
+ * Returns flattened object of the date. Does not include literals
+ * @param locale
+ * @param template
+ */
+ parts(locale = this.localization.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 hour, e.g. 01...10
+ * @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.
+ */
+ getHoursFormatted(hourCycle = 'h12') {
+ return this.parts(undefined, { ...twoDigitTemplate, hourCycle: hourCycle })
+ .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.localization.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();
+ }
+ else if (weekNumber > this.weeksInWeekYear()) {
+ weekNumber = 1;
+ }
+ return weekNumber;
+ }
+ /**
+ * Returns the number of weeks in the year
+ */
+ weeksInWeekYear() {
+ const p1 = (this.year +
+ Math.floor(this.year / 4) -
+ Math.floor(this.year / 100) +
+ Math.floor(this.year / 400)) %
+ 7, last = this.year - 1, p2 = (last +
+ Math.floor(last / 4) -
+ Math.floor(last / 100) +
+ Math.floor(last / 400)) %
+ 7;
+ return p1 === 4 || p2 === 3 ? 53 : 52;
+ }
+ /**
+ * Returns true or false depending on if the year is a leap year or not.
+ */
+ 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]);
+ }
+ /**
+ * Returns a list of month values based on the current locale
+ */
+ getAllMonths(format = 'long') {
+ const applyFormat = new Intl.DateTimeFormat(this.localization.locale, {
+ month: format,
+ }).format;
+ return [...Array(12).keys()].map((m) => applyFormat(new Date(2021, m)));
+ }
+ /**
+ * Replaces an expanded token set (e.g. LT/LTS)
+ */
+ replaceTokens(formatStr, formats) {
+ /***
+ * _ => match
+ * a => first capture group. Anything between [ and ]
+ * b => second capture group
+ */
+ return formatStr.replace(/(\[[^[\]]*])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {
+ const B = b && b.toUpperCase();
+ return a || formats[B] || DefaultFormatLocalization$1.dateFormats[B];
+ });
+ }
+ parseTwoDigitYear(input) {
+ return input + (input > 68 ? 1900 : 2000);
+ }
+ offsetFromString(input) {
+ if (!input)
+ return 0;
+ if (input === 'Z')
+ return 0;
+ const [first, second, third] = input.match(/([+-]|\d\d)/g);
+ const minutes = +second * 60 + (+third || 0);
+ const signed = first === '+' ? -minutes : minutes;
+ return minutes === 0 ? 0 : signed; // eslint-disable-line no-nested-ternary
+ }
+ /**
+ * z = -4, zz = -04, zzz = -0400
+ * @param date
+ * @param style
+ * @private
+ */
+ zoneInformation(date, style) {
+ let name = date
+ .parts(this.localization.locale, { timeZoneName: 'longOffset' })
+ .timeZoneName.replace('GMT', '')
+ .replace(':', '');
+ const negative = name.includes('-');
+ name = name.replace('-', '');
+ if (style === 'z')
+ name = name.substring(1, 2);
+ else if (style === 'zz')
+ name = name.substring(0, 2);
+ return `${negative ? '-' : ''}${name}`;
+ }
+ addInput(property) {
+ return (obj, input) => {
+ obj[property] = +input;
+ };
+ }
+ getLocaleAfternoon() {
+ return new Intl.DateTimeFormat(this.localization.locale, {
+ hour: 'numeric',
+ hour12: true,
+ })
+ .formatToParts(new Date(2022, 3, 4, 13))
+ .find((p) => p.type === 'dayPeriod')
+ ?.value?.replace(/\s+/g, ' ');
+ }
+ meridiemMatch(input) {
+ return input.toLowerCase() === this.getLocaleAfternoon().toLowerCase();
+ }
+ correctHours(time) {
+ const { afternoon } = time;
+ if (afternoon !== undefined) {
+ const { hours } = time;
+ if (afternoon) {
+ if (hours < 12) {
+ time.hours += 12;
+ }
+ }
+ else if (hours === 12) {
+ time.hours = 0;
+ }
+ delete time.afternoon;
+ }
+ }
+ makeParser(format) {
+ format = this.replaceTokens(format, this.localization.dateFormats);
+ const matchArray = format.match(this.formattingTokens);
+ const { length } = matchArray;
+ const expressionArray = [];
+ for (let i = 0; i < length; i += 1) {
+ const token = matchArray[i];
+ const expression = this.expressions[token];
+ if (expression?.parser) {
+ expressionArray[i] = expression;
+ }
+ else {
+ expressionArray[i] = token.replace(/^\[[^[\]]*]$/g, '');
+ }
+ }
+ return (input) => {
+ const time = {
+ hours: 0,
+ minutes: 0,
+ seconds: 0,
+ milliseconds: 0,
+ };
+ for (let i = 0, start = 0; i < length; i += 1) {
+ const token = expressionArray[i];
+ if (typeof token === 'string') {
+ start += token.length;
+ }
+ else {
+ const part = input.slice(start);
+ let value = part;
+ if (token.pattern) {
+ const match = token.pattern.exec(part);
+ value = match[0];
+ }
+ token.parser.call(this, time, value);
+ input = input.replace(value, '');
+ }
+ }
+ this.correctHours(time);
+ return time;
+ };
+ }
+ /**
+ * Attempts to create a DateTime from a string.
+ * @param input date as string
+ * @param localization provides the date template the string is in via the format property
+ */
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ static fromString(input, localization) {
+ if (!localization?.format) {
+ Namespace.errorMessages.customDateFormatError('No format was provided');
+ }
+ try {
+ const dt = new DateTime();
+ dt.setLocalization(localization);
+ if (['x', 'X'].indexOf(localization.format) > -1)
+ return new DateTime((localization.format === 'X' ? 1000 : 1) * +input);
+ input = input.replace(/\s+/g, ' ');
+ const parser = dt.makeParser(localization.format);
+ const { year, month, day, hours, minutes, seconds, milliseconds, zone } = parser(input);
+ const d = day || (!year && !month ? dt.getDate() : 1);
+ const y = year || dt.getFullYear();
+ let M = 0;
+ if (!(year && !month)) {
+ M = month > 0 ? month - 1 : dt.getMonth();
+ }
+ if (zone) {
+ return new DateTime(Date.UTC(y, M, d, hours, minutes, seconds, milliseconds + zone.offset * 60 * 1000));
+ }
+ return new DateTime(y, M, d, hours, minutes, seconds, milliseconds);
+ }
+ catch (e) {
+ Namespace.errorMessages.customDateFormatError(`Unable to parse provided input: ${input}, format: ${localization.format}`);
+ }
+ }
+ /**
+ * 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 optional object. If provided, method will use Intl., otherwise the localizations format properties
+ * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.
+ */
+ format(template, locale = this.localization.locale) {
+ if (template && typeof template === 'object')
+ return new Intl.DateTimeFormat(locale, template).format(this);
+ const formatString = this.replaceTokens(
+ //try template first
+ template ||
+ //otherwise try localization format
+ this.localization.format ||
+ //otherwise try date + time
+ `${DefaultFormatLocalization$1.dateFormats.L}, ${DefaultFormatLocalization$1.dateFormats.LT}`, this.localization.dateFormats);
+ const formatter = (template) => new Intl.DateTimeFormat(this.localization.locale, template).format(this);
+ if (!this.localization.hourCycle)
+ this.localization.hourCycle = guessHourCycle(this.localization.locale);
+ //if the format asks for a twenty-four-hour string but the hour cycle is not, then make a base guess
+ const HHCycle = this.localization.hourCycle.startsWith('h1')
+ ? 'h24'
+ : this.localization.hourCycle;
+ const hhCycle = this.localization.hourCycle.startsWith('h2')
+ ? 'h12'
+ : this.localization.hourCycle;
+ const matches = {
+ y: this.year,
+ yy: formatter({ year: '2-digit' }),
+ yyyy: this.year,
+ M: formatter({ month: 'numeric' }),
+ MM: this.monthFormatted,
+ MMM: this.getAllMonths('short')[this.getMonth()],
+ MMMM: this.getAllMonths()[this.getMonth()],
+ d: this.date,
+ dd: this.dateFormatted,
+ ddd: formatter({ weekday: 'short' }),
+ dddd: formatter({ weekday: 'long' }),
+ H: this.getHours(),
+ HH: this.getHoursFormatted(HHCycle),
+ h: this.hours > 12 ? this.hours - 12 : this.hours,
+ hh: this.getHoursFormatted(hhCycle),
+ t: this.meridiem(),
+ T: this.meridiem().toUpperCase(),
+ m: this.minutes,
+ mm: this.minutesFormatted,
+ s: this.seconds,
+ ss: this.secondsFormatted,
+ fff: this.getMilliseconds(),
+ // z: this.zoneInformation(dateTime, 'z'), //-4
+ // zz: this.zoneInformation(dateTime, 'zz'), //-04
+ // zzz: this.zoneInformation(dateTime, 'zzz') //-0400
+ };
+ return formatString
+ .replace(this.dateTimeRegex, (match, $1) => {
+ return $1 || matches[match];
+ })
+ .replace(/\[/g, '')
+ .replace(/]/g, '');
+ }
+ }
+
+ 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;
+
+ 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 OptionsStore {
+ constructor() {
+ this._currentCalendarViewMode = 0;
+ this._viewDate = new DateTime();
+ this.minimumCalendarViewMode = 0;
+ this.currentView = 'calendar';
+ }
+ get currentCalendarViewMode() {
+ return this._currentCalendarViewMode;
+ }
+ set currentCalendarViewMode(value) {
+ this._currentCalendarViewMode = value;
+ this.currentView = CalendarModes[value].name;
+ }
+ get viewDate() {
+ return this._viewDate;
+ }
+ set viewDate(v) {
+ this._viewDate = v;
+ if (this.options)
+ this.options.viewDate = v;
+ }
+ /**
+ * When switching back to the calendar from the clock,
+ * this sets currentView to the correct calendar view.
+ */
+ refreshCurrentView() {
+ this.currentView = CalendarModes[this.currentCalendarViewMode].name;
+ }
+ get isTwelveHour() {
+ return ['h12', 'h11'].includes(this.options.localization.hourCycle);
+ }
+ }
+
+ /**
+ * 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._enabledDisabledDatesIsValid(granularity, 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._minMaxIsValid(granularity, targetDate))
+ return false;
+ if (granularity === exports.Unit.hours ||
+ granularity === exports.Unit.minutes ||
+ granularity === exports.Unit.seconds) {
+ if (!this._enabledDisabledHoursIsValid(targetDate))
+ return false;
+ if (this.optionsStore.options.restrictions.disabledTimeIntervals?.filter((internal) => targetDate.isBetween(internal.from, internal.to)).length !== 0)
+ return false;
+ }
+ return true;
+ }
+ _enabledDisabledDatesIsValid(granularity, targetDate) {
+ if (granularity !== exports.Unit.date)
+ return true;
+ if (this.optionsStore.options.restrictions.disabledDates.length > 0 &&
+ this._isInDisabledDates(targetDate)) {
+ return false;
+ }
+ // noinspection RedundantIfStatementJS
+ if (this.optionsStore.options.restrictions.enabledDates.length > 0 &&
+ !this._isInEnabledDates(targetDate)) {
+ 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;
+ return !!this.optionsStore.options.restrictions.disabledDates.find((x) => x.isSame(testDate, exports.Unit.date));
+ }
+ /**
+ * 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;
+ return !!this.optionsStore.options.restrictions.enabledDates.find((x) => x.isSame(testDate, exports.Unit.date));
+ }
+ _minMaxIsValid(granularity, targetDate) {
+ if (this.optionsStore.options.restrictions.minDate &&
+ targetDate.isBefore(this.optionsStore.options.restrictions.minDate, granularity)) {
+ return false;
+ }
+ // noinspection RedundantIfStatementJS
+ if (this.optionsStore.options.restrictions.maxDate &&
+ targetDate.isAfter(this.optionsStore.options.restrictions.maxDate, granularity)) {
+ return false;
+ }
+ return true;
+ }
+ _enabledDisabledHoursIsValid(targetDate) {
+ if (this.optionsStore.options.restrictions.disabledHours.length > 0 &&
+ this._isInDisabledHours(targetDate)) {
+ return false;
+ }
+ // noinspection RedundantIfStatementJS
+ if (this.optionsStore.options.restrictions.enabledHours.length > 0 &&
+ !this._isInEnabledHours(targetDate)) {
+ return false;
+ }
+ return true;
+ }
+ /**
+ * 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.includes(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.includes(formattedDate);
+ }
+ dateRangeIsValid(dates, index, target) {
+ // if we're not using the option, then return valid
+ if (!this.optionsStore.options.dateRange)
+ return true;
+ // if we've only selected 0..1 dates, and we're not setting the end date
+ // then return valid. We only want to validate the range if both are selected,
+ // because the other validation on the target has already occurred.
+ if (dates.length !== 2 && index !== 1)
+ return true;
+ // initialize start date
+ const start = dates[0].clone;
+ // check if start date is not the same as target date
+ if (start.isSame(target, exports.Unit.date))
+ return true;
+ // add one day to start; start has already been validated
+ start.manipulate(1, exports.Unit.date);
+ // check each date in the range to make sure it's valid
+ while (!start.isSame(target, exports.Unit.date)) {
+ const valid = this.isValid(start, exports.Unit.date);
+ if (!valid)
+ return false;
+ start.manipulate(1, exports.Unit.date);
+ }
+ return true;
+ }
+ }
+
+ 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(); //eslint-disable-line @typescript-eslint/no-explicit-any
+ this.updateViewDate = new EventEmitter();
+ }
+ destroy() {
+ this.triggerEvent.destroy();
+ this.viewUpdate.destroy();
+ this.updateDisplay.destroy();
+ this.action.destroy();
+ this.updateViewDate.destroy();
+ }
+ }
+
+ const defaultEnLocalization = {
+ clear: 'Clear selection',
+ close: 'Close the picker',
+ dateFormats: DefaultFormatLocalization$1.dateFormats,
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ decrementHour: 'Decrement Hour',
+ decrementMinute: 'Decrement Minute',
+ decrementSecond: 'Decrement Second',
+ format: DefaultFormatLocalization$1.format,
+ hourCycle: DefaultFormatLocalization$1.hourCycle,
+ incrementHour: 'Increment Hour',
+ incrementMinute: 'Increment Minute',
+ incrementSecond: 'Increment Second',
+ locale: DefaultFormatLocalization$1.locale,
+ maxWeekdayLength: 0,
+ nextCentury: 'Next Century',
+ nextDecade: 'Next Decade',
+ nextMonth: 'Next Month',
+ nextYear: 'Next Year',
+ ordinal: DefaultFormatLocalization$1.ordinal,
+ pickHour: 'Pick Hour',
+ pickMinute: 'Pick Minute',
+ pickSecond: 'Pick Second',
+ previousCentury: 'Previous Century',
+ previousDecade: 'Previous Decade',
+ previousMonth: 'Previous Month',
+ previousYear: 'Previous Year',
+ selectDate: 'Select Date',
+ selectDecade: 'Select Decade',
+ selectMonth: 'Select Month',
+ selectTime: 'Select Time',
+ selectYear: 'Select Year',
+ startOfTheWeek: 0,
+ today: 'Go to today',
+ toggleMeridiem: 'Toggle Meridiem',
+ };
+ const DefaultOptions = {
+ allowInputToggle: false,
+ container: undefined,
+ dateRange: false,
+ debug: false,
+ defaultDate: undefined,
+ 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',
+ placement: 'bottom',
+ },
+ keepInvalid: false,
+ localization: defaultEnLocalization,
+ meta: {},
+ multipleDates: false,
+ multipleDatesSeparator: '; ',
+ promptTimeOnDateChange: false,
+ promptTimeOnDateChangeTransitionDelay: 200,
+ restrictions: {
+ minDate: undefined,
+ maxDate: undefined,
+ disabledDates: [],
+ enabledDates: [],
+ daysOfWeekDisabled: [],
+ disabledTimeIntervals: [],
+ disabledHours: [],
+ enabledHours: [],
+ },
+ stepping: 1,
+ useCurrent: true,
+ viewDate: new DateTime(),
+ };
+ const DefaultEnLocalization = { ...defaultEnLocalization };
+
+ /**
+ * 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
+ */
+ function tryConvertToDateTime(d, localization) {
+ if (!d)
+ return null;
+ 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;
+ }
+ /**
+ * 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
+ */
+ function convertToDateTime(d, optionName, localization) {
+ if (typeof d === typeof '' && optionName !== 'input') {
+ Namespace.errorMessages.dateString();
+ }
+ const converted = tryConvertToDateTime(d, localization);
+ if (!converted) {
+ Namespace.errorMessages.failedToParseDate(optionName, d, optionName === 'input');
+ }
+ return converted;
+ }
+ /**
+ * 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
+ */
+ function typeCheckDateArray(optionName, value, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType, localization = DefaultFormatLocalization$1) {
+ if (!Array.isArray(value)) {
+ Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of DateTime or Date');
+ }
+ for (let i = 0; i < value.length; i++) {
+ const d = value[i];
+ const dateTime = convertToDateTime(d, optionName, localization);
+ dateTime.setLocalization(localization);
+ 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
+ */
+ function typeCheckNumberArray(optionName, value, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType) {
+ if (!Array.isArray(value) || value.some((x) => typeof x !== typeof 0)) {
+ Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of numbers');
+ }
+ }
+
+ function mandatoryDate(key) {
+ return ({ value, providedType, localization }) => {
+ const dateTime = convertToDateTime(value, key, localization);
+ if (dateTime !== undefined) {
+ dateTime.setLocalization(localization);
+ return dateTime;
+ }
+ };
+ }
+ function optionalDate(key) {
+ const mandatory = mandatoryDate(key);
+ return (args) => {
+ if (args.value === undefined) {
+ return args.value;
+ }
+ return mandatory(args);
+ };
+ }
+ function numbersInRange(key, lower, upper) {
+ return ({ value, providedType }) => {
+ if (value === undefined) {
+ return [];
+ }
+ typeCheckNumberArray(key, value, providedType);
+ if (value.some((x) => x < lower || x > upper))
+ Namespace.errorMessages.numbersOutOfRange(key, lower, upper);
+ return value;
+ };
+ }
+ function validHourRange(key) {
+ return numbersInRange(key, 0, 23);
+ }
+ function validDateArray(key) {
+ return ({ value, providedType, localization }) => {
+ if (value === undefined) {
+ return [];
+ }
+ typeCheckDateArray(key, value, providedType, localization);
+ return value;
+ };
+ }
+ function validKeyOption(keyOptions) {
+ return ({ value, path }) => {
+ if (!keyOptions.includes(value))
+ Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions);
+ return value;
+ };
+ }
+ const optionProcessors = Object.freeze({
+ defaultDate: mandatoryDate('defaultDate'),
+ viewDate: mandatoryDate('viewDate'),
+ minDate: optionalDate('restrictions.minDate'),
+ maxDate: optionalDate('restrictions.maxDate'),
+ disabledHours: validHourRange('restrictions.disabledHours'),
+ enabledHours: validHourRange('restrictions.enabledHours'),
+ disabledDates: validDateArray('restrictions.disabledDates'),
+ enabledDates: validDateArray('restrictions.enabledDates'),
+ daysOfWeekDisabled: numbersInRange('restrictions.daysOfWeekDisabled', 0, 6),
+ disabledTimeIntervals: ({ key, value, providedType, localization }) => {
+ if (value === undefined) {
+ return [];
+ }
+ if (!Array.isArray(value)) {
+ Namespace.errorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }');
+ }
+ const valueObject = value; //eslint-disable-line @typescript-eslint/no-explicit-any
+ for (let i = 0; i < valueObject.length; i++) {
+ Object.keys(valueObject[i]).forEach((vk) => {
+ const subOptionName = `${key}[${i}].${vk}`;
+ const d = valueObject[i][vk];
+ const dateTime = convertToDateTime(d, subOptionName, localization);
+ dateTime.setLocalization(localization);
+ valueObject[i][vk] = dateTime;
+ });
+ }
+ return valueObject;
+ },
+ toolbarPlacement: validKeyOption(['top', 'bottom', 'default']),
+ type: validKeyOption(['icons', 'sprites']),
+ viewMode: validKeyOption([
+ 'clock',
+ 'calendar',
+ 'months',
+ 'years',
+ 'decades',
+ ]),
+ theme: validKeyOption(['light', 'dark', 'auto']),
+ placement: validKeyOption(['top', 'bottom']),
+ meta: ({ value }) => value,
+ dayViewHeaderFormat: ({ value }) => value,
+ container: ({ value, path }) => {
+ if (value &&
+ !(value instanceof HTMLElement ||
+ value instanceof Element ||
+ value?.appendChild)) {
+ Namespace.errorMessages.typeMismatch(path.substring(1), typeof value, 'HTMLElement');
+ }
+ return value;
+ },
+ useTwentyfourHour: ({ value, path, providedType, defaultType }) => {
+ Namespace.errorMessages.deprecatedWarning('useTwentyfourHour', 'Please use "options.localization.hourCycle" instead');
+ if (value === undefined || providedType === 'boolean')
+ return value;
+ Namespace.errorMessages.typeMismatch(path, providedType, defaultType);
+ },
+ hourCycle: validKeyOption(['h11', 'h12', 'h23', 'h24']),
+ });
+ const defaultProcessor = ({ value, defaultType, providedType, path, }) => {
+ 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);
+ }
+ };
+ function processKey(args) {
+ return (optionProcessors[args.key] || defaultProcessor)(args);
+ }
+
+ class OptionConverter {
+ static deepCopy(input) {
+ const o = {};
+ Object.keys(input).forEach((key) => {
+ const inputElement = input[key];
+ if (inputElement instanceof DateTime) {
+ o[key] = inputElement.clone;
+ return;
+ }
+ else if (inputElement instanceof Date) {
+ o[key] = new Date(inputElement.valueOf());
+ return;
+ }
+ o[key] = inputElement;
+ if (typeof inputElement !== 'object' ||
+ inputElement instanceof HTMLElement ||
+ inputElement instanceof Element)
+ 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 localization
+ * @param path
+ */
+ static spread(provided, copyTo, localization, path = '') {
+ 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.`;
+ const 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];
+ const providedType = typeof provided[key];
+ const defaultType = typeof defaultOptionValue;
+ const 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], localization, path);
+ }
+ else {
+ copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization);
+ }
+ path = path.substring(0, path.lastIndexOf(`.${key}`));
+ });
+ }
+ static processKey(key, value, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType, defaultType, path, localization) {
+ return processKey({
+ key,
+ value,
+ providedType,
+ defaultType,
+ path,
+ localization,
+ });
+ }
+ 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;
+ const 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 normalizeObject = this.normalizeObject(objectToNormalized);
+ 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] = normalizeObject(split, 1, options[keyOption], eData[`td${key}`]);
+ }
+ }
+ // or key = multipleDate
+ else if (keyOption !== undefined) {
+ dataOptions[keyOption] = eData[`td${key}`];
+ }
+ });
+ return this._mergeOptions(dataOptions, options);
+ }
+ //todo clean this up
+ static normalizeObject(objectToNormalized) {
+ const normalizeObject = (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] = normalizeObject(split, index, optionSubgroup[keyOption], value);
+ }
+ else {
+ internalObject[keyOption] = value;
+ }
+ return internalObject;
+ };
+ return normalizeObject;
+ }
+ /**
+ * 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, //eslint-disable-line @typescript-eslint/no-explicit-any
+ localization) {
+ return tryConvertToDateTime(d, localization);
+ }
+ /**
+ * 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) {
+ return typeCheckDateArray(optionName, value, providedType, localization);
+ }
+ /**
+ * 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) {
+ return typeCheckNumberArray(optionName, value, providedType);
+ }
+ /**
+ * 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, //eslint-disable-line @typescript-eslint/no-explicit-any
+ optionName, localization) {
+ return convertToDateTime(d, optionName, localization);
+ }
+ 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');
+ }
+ }
+ if (config.multipleDates && config.dateRange) {
+ Namespace.errorMessages.conflictingConfiguration('Cannot uss option "multipleDates" with "dateRange"');
+ }
+ }
+ }
+ OptionConverter.ignoreProperties = [
+ 'meta',
+ 'dayViewHeaderFormat',
+ 'container',
+ 'dateForms',
+ 'ordinal',
+ ];
+ OptionConverter.isValue = (a) => a != null; // everything except undefined + null
+
+ 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]?.clone;
+ }
+ /**
+ * 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) {
+ if (!date)
+ return '';
+ date.localization = this.optionsStore.options.localization;
+ return date.format();
+ }
+ /**
+ * parse the value into a DateTime object.
+ * this can be overwritten to supply your own parsing.
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ setFromInput(value, index) {
+ if (!value) {
+ this.setValue(undefined, index);
+ return;
+ }
+ const converted = this.parseInput(value);
+ if (converted) {
+ converted.setLocalization(this.optionsStore.options.localization);
+ 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 (!DateTime.isValid(targetDate))
+ return false;
+ if (!unit)
+ return this._dates.find((x) => x.isSame(targetDate)) !== undefined;
+ const format = getFormatByUnit(unit);
+ const 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 (!DateTime.isValid(targetDate))
+ return -1;
+ if (!unit)
+ return this._dates.map((x) => x.valueOf()).indexOf(targetDate.valueOf());
+ const format = getFormatByUnit(unit);
+ const 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 = [];
+ if (this.optionsStore.input)
+ this.optionsStore.input.value = '';
+ this._eventEmitters.updateDisplay.emit('all');
+ }
+ /**
+ * 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];
+ }
+ updateInput(target) {
+ if (!this.optionsStore.input)
+ return;
+ let newValue = this.formatInput(target);
+ if (this.optionsStore.options.multipleDates ||
+ this.optionsStore.options.dateRange) {
+ newValue = this._dates
+ .map((d) => this.formatInput(d))
+ .join(this.optionsStore.options.multipleDatesSeparator);
+ }
+ if (this.optionsStore.input.value != newValue)
+ this.optionsStore.input.value = newValue;
+ }
+ /**
+ * 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]?.clone;
+ if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {
+ oldDate = this.lastPicked;
+ }
+ if (target && oldDate?.isSame(target)) {
+ this.updateInput(target);
+ return;
+ }
+ // case of calling setValue(null)
+ if (!target) {
+ this._setValueNull(isClear, index, oldDate);
+ 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.startOf(exports.Unit.minutes);
+ }
+ const onUpdate = (isValid) => {
+ this._dates[index] = target;
+ this._eventEmitters.updateViewDate.emit(target.clone);
+ this.updateInput(target);
+ this.optionsStore.unset = false;
+ this._eventEmitters.updateDisplay.emit('all');
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.change,
+ date: target,
+ oldDate,
+ isClear,
+ isValid: isValid,
+ });
+ };
+ if (this.validation.isValid(target) &&
+ this.validation.dateRangeIsValid(this.picked, index, target)) {
+ onUpdate(true);
+ return;
+ }
+ if (this.optionsStore.options.keepInvalid) {
+ onUpdate(false);
+ }
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.error,
+ reason: Namespace.errorMessages.failedToSetInvalidDate,
+ date: target,
+ oldDate,
+ });
+ }
+ _setValueNull(isClear, index, oldDate) {
+ if (!this.optionsStore.options.multipleDates ||
+ this._dates.length === 1 ||
+ isClear) {
+ this.optionsStore.unset = true;
+ this._dates = [];
+ }
+ else {
+ this._dates.splice(index, 1);
+ }
+ this.updateInput();
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.change,
+ date: undefined,
+ oldDate,
+ isClear,
+ isValid: true,
+ });
+ this._eventEmitters.updateDisplay.emit('all');
+ }
+ }
+
+ 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 `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);
+ }
+ const { rangeHoverEvent, rangeHoverOutEvent } = this.handleMouseEvents(container);
+ 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);
+ // if hover is supported then add the events
+ if (matchMedia('(hover: hover)').matches &&
+ this.optionsStore.options.dateRange) {
+ div.addEventListener('mouseover', rangeHoverEvent);
+ div.addEventListener('mouseout', rangeHoverOutEvent);
+ }
+ }
+ return container;
+ }
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget, paint) {
+ const container = widget.getElementsByClassName(Namespace.css.daysContainer)[0];
+ this._updateCalendarView(container);
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf(exports.Unit.month)
+ .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)
+ .manipulate(12, exports.Unit.hours);
+ this._handleCalendarWeeks(container, innerDate.clone);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectDay}"]`)
+ .forEach((element) => {
+ const 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.optionsStore.options.dateRange &&
+ 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);
+ }
+ this._handleDateRange(innerDate, classes);
+ paint(exports.Unit.date, innerDate, classes, element);
+ element.classList.remove(...element.classList);
+ element.classList.add(...classes);
+ element.setAttribute('data-value', this._dateToDataValue(innerDate));
+ element.setAttribute('data-day', `${innerDate.date}`);
+ element.innerText = innerDate.parts(undefined, {
+ day: 'numeric',
+ }).day;
+ innerDate.manipulate(1, exports.Unit.date);
+ });
+ }
+ _dateToDataValue(date) {
+ if (!DateTime.isValid(date))
+ return '';
+ return `${date.year}-${date.monthFormatted}-${date.dateFormatted}`;
+ }
+ _handleDateRange(innerDate, classes) {
+ const rangeStart = this.dates.picked[0];
+ const rangeEnd = this.dates.picked[1];
+ if (this.optionsStore.options.dateRange) {
+ if (innerDate.isBetween(rangeStart, rangeEnd, exports.Unit.date)) {
+ classes.push(Namespace.css.rangeIn);
+ }
+ if (innerDate.isSame(rangeStart, exports.Unit.date)) {
+ classes.push(Namespace.css.rangeStart);
+ }
+ if (innerDate.isSame(rangeEnd, exports.Unit.date)) {
+ classes.push(Namespace.css.rangeEnd);
+ }
+ }
+ }
+ handleMouseEvents(container) {
+ const rangeHoverEvent = (e) => {
+ const currentTarget = e?.currentTarget;
+ // if we have 0 or 2 selected or if the target is disabled then ignore
+ if (this.dates.picked.length !== 1 ||
+ currentTarget.classList.contains(Namespace.css.disabled))
+ return;
+ // select all the date divs
+ const allDays = [...container.querySelectorAll('.day')];
+ // get the date value from the element being hovered over
+ const attributeValue = currentTarget.getAttribute('data-value');
+ // format the string to a date
+ const innerDate = DateTime.fromString(attributeValue, {
+ format: 'yyyy-MM-dd',
+ });
+ // find the position of the target in the date container
+ const dayIndex = allDays.findIndex((e) => e.getAttribute('data-value') === attributeValue);
+ // find the first and second selected dates
+ const rangeStart = this.dates.picked[0];
+ const rangeEnd = this.dates.picked[1];
+ //format the start date so that it can be found by the attribute
+ const rangeStartFormatted = this._dateToDataValue(rangeStart);
+ const rangeStartIndex = allDays.findIndex((e) => e.getAttribute('data-value') === rangeStartFormatted);
+ const rangeStartElement = allDays[rangeStartIndex];
+ //make sure we don't leave start/end classes if we don't need them
+ if (!innerDate.isSame(rangeStart, exports.Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeStart);
+ }
+ if (!innerDate.isSame(rangeEnd, exports.Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeEnd);
+ }
+ // the following figures out which direct from start date is selected
+ // the selection "cap" classes are applied if needed
+ // otherwise all the dates between will get the `rangeIn` class.
+ // We make this selection based on the element's index and the rangeStart index
+ let lambda;
+ if (innerDate.isBefore(rangeStart)) {
+ currentTarget.classList.add(Namespace.css.rangeStart);
+ rangeStartElement?.classList.remove(Namespace.css.rangeStart);
+ rangeStartElement?.classList.add(Namespace.css.rangeEnd);
+ lambda = (_, index) => index > dayIndex && index < rangeStartIndex;
+ }
+ else {
+ currentTarget.classList.add(Namespace.css.rangeEnd);
+ rangeStartElement?.classList.remove(Namespace.css.rangeEnd);
+ rangeStartElement?.classList.add(Namespace.css.rangeStart);
+ lambda = (_, index) => index < dayIndex && index > rangeStartIndex;
+ }
+ allDays.filter(lambda).forEach((e) => {
+ e.classList.add(Namespace.css.rangeIn);
+ });
+ };
+ const rangeHoverOutEvent = (e) => {
+ // find all the dates in the container
+ const allDays = [...container.querySelectorAll('.day')];
+ // if only the start is selected, remove all the rangeIn classes
+ // we do this because once the user hovers over a new date the range will be recalculated.
+ if (this.dates.picked.length === 1)
+ allDays.forEach((e) => e.classList.remove(Namespace.css.rangeIn));
+ // if we have 0 or 2 dates selected then ignore
+ if (this.dates.picked.length !== 1)
+ return;
+ const currentTarget = e?.currentTarget;
+ // get the elements date from the attribute value
+ const innerDate = new DateTime(currentTarget.getAttribute('data-value'));
+ // verify selections and remove invalid classes
+ if (!innerDate.isSame(this.dates.picked[0], exports.Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeStart);
+ }
+ if (!innerDate.isSame(this.dates.picked[1], exports.Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeEnd);
+ }
+ };
+ return { rangeHoverEvent, rangeHoverOutEvent };
+ }
+ _updateCalendarView(container) {
+ if (this.optionsStore.currentView !== 'calendar')
+ return;
+ 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);
+ }
+ /***
+ * Generates a html row that contains the days of the week.
+ * @private
+ */
+ _daysOfTheWeek() {
+ const 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);
+ let weekDay = innerDate.format({ weekday: 'short' });
+ if (this.optionsStore.options.localization.maxWeekdayLength > 0)
+ weekDay = weekDay.substring(0, this.optionsStore.options.localization.maxWeekdayLength);
+ htmlDivElement.innerText = weekDay;
+ innerDate.manipulate(1, exports.Unit.date);
+ row.push(htmlDivElement);
+ }
+ return row;
+ }
+ _handleCalendarWeeks(container, innerDate) {
+ [...container.querySelectorAll(`.${Namespace.css.calendarWeeks}`)]
+ .filter((e) => e.innerText !== '#')
+ .forEach((element) => {
+ element.innerText = `${innerDate.week}`;
+ innerDate.manipulate(7, exports.Unit.date);
+ });
+ }
+ }
+
+ /**
+ * 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);
+ }
+ const innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.year);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectMonth}"]`)
+ .forEach((containerClone, index) => {
+ const 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 `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);
+ }
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf(exports.Unit.year)
+ .manipulate(-1, exports.Unit.year);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectYear}"]`)
+ .forEach((containerClone) => {
+ const 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 `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;
+ }
+ }
+ const 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 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]);
+ let lastPicked = this.dates.lastPicked?.clone;
+ if (!lastPicked && this.optionsStore.options.useCurrent)
+ 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 = lastPicked
+ ? lastPicked.getHoursFormatted(this.optionsStore.options.localization.hourCycle)
+ : '--';
+ }
+ 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 ? 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 ? lastPicked.secondsFormatted : '--';
+ }
+ if (this.optionsStore.isTwelveHour) {
+ const toggle = timesDiv.querySelector(`[data-action=${ActionTypes$1.toggleMeridiem}]`);
+ const meridiemDate = (lastPicked || this.optionsStore.viewDate).clone;
+ toggle.innerText = meridiemDate.meridiem();
+ if (!this.validation.isValid(meridiemDate.manipulate(meridiemDate.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.isTwelveHour) {
+ this._gridColumns += ' a';
+ let divElement = getSeparator();
+ top.push(divElement);
+ const button = document.createElement('button');
+ button.setAttribute('type', '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 `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.isTwelveHour ? 12 : 24); 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];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.date);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectHour}"]`)
+ .forEach((containerClone) => {
+ const 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 = innerDate.getHoursFormatted(this.optionsStore.options.localization.hourCycle);
+ innerDate.manipulate(1, exports.Unit.hours);
+ });
+ }
+ }
+
+ /**
+ * 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);
+ const 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];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.hours);
+ const step = this.optionsStore.options.stepping === 1
+ ? 5
+ : this.optionsStore.options.stepping;
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectMinute}"]`)
+ .forEach((containerClone) => {
+ const 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 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];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.minutes);
+ container
+ .querySelectorAll(`[data-action="${ActionTypes$1.selectSecond}"]`)
+ .forEach((containerClone) => {
+ const 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);
+ });
+ }
+ }
+
+ /**
+ * 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);
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ 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 = '';
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ 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);
+ };
+
+ /**
+ * 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; //eslint-disable-line @typescript-eslint/no-explicit-any
+ 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;
+ }
+ get dateContainer() {
+ return this.widget?.querySelector(`div.${Namespace.css.dateContainer}`);
+ }
+ get timeContainer() {
+ return this.widget?.querySelector(`div.${Namespace.css.timeContainer}`);
+ }
+ /**
+ * 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;
+ 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 'decade':
+ this.decadeDisplay._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
+ */
+ /* eslint-disable @typescript-eslint/no-unused-vars */
+ 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) {
+ this._showSetDefaultIfNeeded();
+ this._buildWidget();
+ this._updateTheme();
+ this._showSetupViewMode();
+ if (!this.optionsStore.options.display.inline) {
+ // If needed to change the parent container
+ const container = this.optionsStore.options?.container || document.body;
+ const placement = this.optionsStore.options?.display?.placement || 'bottom';
+ container.appendChild(this.widget);
+ this.createPopup(this.optionsStore.element, this.widget, {
+ modifiers: [{ name: 'eventListeners', enabled: true }],
+ //#2400
+ placement: document.documentElement.dir === 'rtl'
+ ? `${placement}-end`
+ : `${placement}-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;
+ }
+ _showSetupViewMode() {
+ // 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
+ else 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.timeContainer);
+ }
+ else {
+ Collapse.show(this.timeContainer);
+ }
+ }
+ Collapse.show(this.dateContainer);
+ }
+ if (this._hasDate) {
+ this._showMode();
+ }
+ }
+ _showSetDefaultIfNeeded() {
+ if (this.dates.picked.length != 0)
+ return;
+ if (this.optionsStore.options.useCurrent &&
+ !this.optionsStore.options.defaultDate) {
+ const date = new DateTime().setLocalization(this.optionsStore.options.localization);
+ 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) && tries > 31) {
+ date.manipulate(direction, exports.Unit.date);
+ tries++;
+ }
+ }
+ this.dates.setValue(date);
+ }
+ if (this.optionsStore.options.defaultDate) {
+ this.dates.setValue(this.optionsStore.options.defaultDate);
+ }
+ }
+ async createPopup(element, widget,
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ options) {
+ let createPopperFunction;
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (window?.Popper) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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];
+ const 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';
+ if (this.optionsStore.options.display.sideBySide)
+ (this.widget.querySelectorAll(`.${Namespace.css.clockContainer}`)[0]).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() {
+ if (!this._hasDate)
+ return;
+ 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.setAttribute(showing, 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?.clone,
+ });
+ 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._hasDateAndTime) {
+ this._buildWidgetSideBySide(template, dateView, timeView, toolbar);
+ return;
+ }
+ if (this.optionsStore.options.display.toolbarPlacement === 'top') {
+ template.appendChild(toolbar);
+ }
+ const setupComponentView = (hasFirst, hasSecond, element, shouldShow) => {
+ if (!hasFirst)
+ return;
+ if (hasSecond) {
+ element.classList.add(Namespace.css.collapse);
+ if (shouldShow)
+ element.classList.add(Namespace.css.show);
+ }
+ template.appendChild(element);
+ };
+ setupComponentView(this._hasDate, this._hasTime, dateView, this.optionsStore.options.display.viewMode !== 'clock');
+ setupComponentView(this._hasTime, this._hasDate, timeView, this.optionsStore.options.display.viewMode === 'clock');
+ 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;
+ }
+ _buildWidgetSideBySide(template, dateView, timeView, toolbar) {
+ 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;
+ }
+ /**
+ * 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 _hasDateAndTime() {
+ return this._hasDate && this._hasTime;
+ }
+ /**
+ * 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;
+ this._dispose();
+ if (wasVisible)
+ this.show();
+ }
+ refreshCurrentView() {
+ //if the widget is not showing, just destroy it
+ if (!this._isVisible)
+ this._dispose();
+ switch (this.optionsStore.currentView) {
+ case 'clock':
+ this._update('clock');
+ break;
+ case 'calendar':
+ this._update(exports.Unit.date);
+ break;
+ case 'months':
+ this._update(exports.Unit.month);
+ break;
+ case 'years':
+ this._update(exports.Unit.year);
+ break;
+ case 'decades':
+ this._update('decade');
+ break;
+ }
+ }
+ }
+
+ /**
+ * Logic for various click actions
+ */
+ 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]
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ do(e, action) {
+ const currentTarget = e?.currentTarget;
+ if (currentTarget?.classList?.contains(Namespace.css.disabled))
+ return;
+ 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:
+ this.handleSelectCalendarMode(action, currentTarget);
+ break;
+ case ActionTypes$1.selectDay:
+ this.handleSelectDay(currentTarget);
+ break;
+ case ActionTypes$1.selectHour: {
+ let hour = +currentTarget.dataset.value;
+ if (lastPicked.hours >= 12 && this.optionsStore.isTwelveHour)
+ 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:
+ this.handleToggle(currentTarget);
+ 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.dateContainer);
+ //show clock
+ Collapse.showImmediately(this.display.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().setLocalization(this.optionsStore.options.localization);
+ this._eventEmitters.updateViewDate.emit(today);
+ //todo this this really a good idea?
+ 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.');
+ /* ignore coverage: should never happen */
+ 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.isTwelveHour &&
+ !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);
+ }
+ }
+ handleSelectCalendarMode(action, currentTarget) {
+ 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);
+ }
+ }
+ handleToggle(currentTarget) {
+ 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();
+ }
+ handleSelectDay(currentTarget) {
+ 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;
+ if (this.optionsStore.options.dateRange)
+ this.handleDateRange(day);
+ else if (this.optionsStore.options.multipleDates) {
+ this.handleMultiDate(day);
+ }
+ 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.optionsStore.options.dateRange) {
+ this.display.hide();
+ }
+ }
+ handleMultiDate(day) {
+ let index = this.dates.pickedIndex(day, exports.Unit.date);
+ console.log(index);
+ if (index !== -1) {
+ this.dates.setValue(null, index); //deselect multi-date
+ }
+ else {
+ index = this.dates.lastPickedIndex + 1;
+ if (this.dates.picked.length === 0)
+ index = 0;
+ this.dates.setValue(day, index);
+ }
+ }
+ handleDateRange(day) {
+ switch (this.dates.picked.length) {
+ case 2: {
+ this.dates.clear();
+ break;
+ }
+ case 1: {
+ const other = this.dates.picked[0];
+ if (day.getTime() === other.getTime()) {
+ this.dates.clear();
+ break;
+ }
+ if (day.isBefore(other)) {
+ this.dates.setValue(day, 0);
+ this.dates.setValue(other, 1);
+ return;
+ }
+ else {
+ this.dates.setValue(day, 1);
+ return;
+ }
+ }
+ }
+ this.dates.setValue(day, 0);
+ }
+ }
+
+ /**
+ * A robust and powerful date/time picker component.
+ */
+ class TempusDominus {
+ constructor(element, options = {}) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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 ||
+ this.optionsStore.options.dateRange) {
+ 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 ||
+ //if we just have the input and allow input toggle is enabled, then don't cause a toggle
+ (this._toggle.nodeName === 'INPUT' &&
+ this._toggle?.type === 'text' &&
+ this.optionsStore.options.allowInputToggle))
+ return;
+ this.toggle();
+ };
+ /**
+ * Event for when the toggle is clicked. This is a class level method so there's
+ * something for the remove listener function.
+ * @private
+ */
+ this._openClickEvent = () => {
+ if (this.optionsStore.element?.disabled ||
+ this.optionsStore.input?.disabled)
+ return;
+ if (!this.display.isVisible)
+ this.show();
+ };
+ 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.setLocalization(this.optionsStore.options.localization);
+ 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();
+ });
+ this._eventEmitters.updateViewDate.subscribe((dateTime) => {
+ this.viewDate = dateTime;
+ });
+ }
+ get viewDate() {
+ return this.optionsStore.viewDate;
+ }
+ set viewDate(value) {
+ this.optionsStore.viewDate = value;
+ this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization);
+ this.display._update(this.optionsStore.currentView === 'clock' ? 'clock' : 'calendar');
+ }
+ // 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.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization);
+ this.display.refreshCurrentView();
+ }
+ // 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 //eslint-disable-line @typescript-eslint/no-explicit-any
+ ) {
+ if (typeof eventTypes === 'string') {
+ eventTypes = [eventTypes];
+ }
+ let callBackArray; //eslint-disable-line @typescript-eslint/no-explicit-any
+ 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._eventEmitters.destroy();
+ this.optionsStore.input?.removeEventListener('change', this._inputChangeEvent);
+ if (this.optionsStore.options.allowInputToggle) {
+ this.optionsStore.input?.removeEventListener('click', this._openClickEvent);
+ this.optionsStore.input?.removeEventListener('focus', this._openClickEvent);
+ }
+ 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) {
+ const 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(
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ new CustomEvent('change', { detail: event }));
+ }
+ this.optionsStore.element.dispatchEvent(
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ new CustomEvent(event.type, { detail: event }));
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (window.jQuery) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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.setLocalization(newConfig.localization);
+ 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 &&
+ newConfig.localization.hourCycle === undefined)
+ newConfig.localization.hourCycle = 'h24';
+ else if (newConfig.localization.hourCycle === undefined) {
+ newConfig.localization.hourCycle = guessHourCycle(newConfig.localization.locale);
+ }
+ this.optionsStore.options = newConfig;
+ if (newConfig.restrictions.maxDate &&
+ this.viewDate.isAfter(newConfig.restrictions.maxDate))
+ this.viewDate = newConfig.restrictions.maxDate;
+ if (newConfig.restrictions.minDate &&
+ this.viewDate.isBefore(newConfig.restrictions.minDate))
+ this.viewDate = newConfig.restrictions.minDate;
+ }
+ /**
+ * 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 {
+ const 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;
+ if (!this.optionsStore.input.value && this.optionsStore.options.defaultDate)
+ this.optionsStore.input.value = this.dates.formatInput(this.optionsStore.options.defaultDate);
+ this.optionsStore.input.addEventListener('change', this._inputChangeEvent);
+ if (this.optionsStore.options.allowInputToggle) {
+ this.optionsStore.input.addEventListener('click', this._openClickEvent);
+ this.optionsStore.input.addEventListener('focus', this._openClickEvent);
+ }
+ 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.multipleDates ||
+ 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('[data-action="togglePicker"]'),
+ },
+ 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) => {
+ const 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 = undefined) {
+ if (!plugin)
+ return tempusDominus;
+ if (!plugin.installed) {
+ // install plugin only once
+ plugin(option, { TempusDominus, Dates, Display, DateTime, Namespace }, tempusDominus);
+ plugin.installed = true;
+ }
+ return tempusDominus;
+ };
+ const version = '6.7.19';
+ const tempusDominus = {
+ TempusDominus,
+ extend,
+ loadLocale,
+ locale,
+ Namespace,
+ DefaultOptions,
+ DateTime,
+ Unit: exports.Unit,
+ version,
+ DefaultEnLocalization,
+ };
+
+ exports.DateTime = DateTime;
+ exports.DefaultEnLocalization = DefaultEnLocalization;
+ 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 });
+
+}));
+//# sourceMappingURL=tempus-dominus.js.map
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js.map b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js.map
new file mode 100644
index 0000000..56597d9
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/default-format-localization.ts","../../src/js/datetime.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/typeChecker.ts","../../src/js/utilities/optionProcessor.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 class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRange(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalid string or an invalid Date object.\n * @param optionName\n * @param date\n * @param soft If true, logs a warning instead of an error.\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n failedToParseDate(optionName: string, date: any, soft = false) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\n );\n error.code = 5;\n if (!soft) throw error;\n console.warn(error);\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * customDateFormat errors\n */\n customDateFormatError(message?: string) {\n const error = new TdError(`${this.base} Custom Date Format: ${message}`);\n error.code = 9;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`\n );\n }\n\n deprecatedWarning(message: string, remediation?: string) {\n console.warn(\n `${this.base} Warning ${message} is deprecated and will be removed in a future version. ${remediation}`\n );\n }\n\n throwError(message) {\n const error = new TdError(`${this.base} ${message}`);\n error.code = 9;\n throw error;\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decade container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n rangeIn = 'range-in';\n rangeStart = 'range-start';\n rangeEnd = 'range-end';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n /**\n * Applied AM/PM toggle button.\n */\n toggleMeridiem = 'toggleMeridiem';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n\n /**\n * Applied to the widget when the option display.theme is light.\n */\n lightTheme = 'light';\n\n /**\n * Applied to the widget when the option display.theme is dark.\n */\n darkTheme = 'dark';\n\n /**\n * Used for detecting if the system color preference is dark mode\n */\n isDarkPreferredQuery = '(prefers-color-scheme: dark)';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { FormatLocalization } from './options';\n\nconst DefaultFormatLocalization: FormatLocalization = {\n dateFormats: {\n LTS: 'h:mm:ss T',\n LT: 'h:mm T',\n L: 'MM/dd/yyyy',\n LL: 'MMMM d, yyyy',\n LLL: 'MMMM d, yyyy h:mm T',\n LLLL: 'dddd, MMMM d, yyyy h:mm T',\n },\n format: 'L LT',\n locale: 'default',\n hourCycle: undefined,\n ordinal: (n) => {\n const s = ['th', 'st', 'nd', 'rd'];\n const v = n % 100;\n return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`;\n },\n};\n\nexport default { ...DefaultFormatLocalization };\n","import { FormatLocalization } from './utilities/options';\nimport Namespace from './utilities/namespace';\nimport DefaultFormatLocalization from './utilities/default-format-localization';\n\ntype parsedTime = {\n afternoon?: boolean;\n year?: number;\n month?: number;\n day?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n milliseconds?: number;\n zone?: {\n offset: number;\n };\n};\n\nexport enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\nconst twoDigitTemplate = {\n month: '2-digit',\n day: '2-digit',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n};\n\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n numberingSystem?: string;\n}\n\n/**\n * Returns an Intl format object based on the provided object\n * @param unit\n */\nexport const getFormatByUnit = (unit: Unit): object => {\n switch (unit) {\n case 'date':\n return { dateStyle: 'short' };\n case 'month':\n return {\n month: 'numeric',\n year: 'numeric',\n };\n case 'year':\n return { year: 'numeric' };\n }\n};\n\n/**\n * Attempts to guess the hour cycle of the given local\n * @param locale\n */\nexport const guessHourCycle = (locale: string): Intl.LocaleHourCycleKey => {\n if (!locale) return 'h12';\n\n // noinspection SpellCheckingInspection\n const template = {\n hour: '2-digit',\n minute: '2-digit',\n numberingSystem: 'latn',\n };\n\n const dt = new DateTime().setLocalization({ locale });\n dt.hours = 0;\n\n const start = dt.parts(undefined, template).hour;\n\n //midnight is 12 so en-US style 12 AM\n if (start === '12') return 'h12';\n //midnight is 24 is from 00-24\n if (start === '24') return 'h24';\n\n dt.hours = 23;\n const end = dt.parts(undefined, template).hour;\n\n //if midnight is 00 and hour 23 is 11 then\n if (start === '00' && end === '11') return 'h11';\n\n if (start === '00' && end === '23') return 'h23';\n\n console.warn(\n `couldn't determine hour cycle for ${locale}. start: ${start}. end: ${end}`\n );\n\n return undefined;\n};\n\ninterface FormatMatch {\n parser: (obj: parsedTime, input: number) => void;\n pattern?: RegExp;\n}\n\ninterface FormatMatchString {\n parser: (obj: parsedTime, input: string) => void;\n pattern?: RegExp;\n}\n\ninterface FormatExpression {\n t: FormatMatchString;\n T: FormatMatchString;\n fff: FormatMatch;\n s: FormatMatch;\n ss: FormatMatch;\n m: FormatMatch;\n mm: FormatMatch;\n H: FormatMatch;\n h: FormatMatch;\n HH: FormatMatch;\n hh: FormatMatch;\n d: FormatMatch;\n dd: FormatMatch;\n Do: FormatMatchString;\n M: FormatMatch;\n MM: FormatMatch;\n MMM: FormatMatchString;\n MMMM: FormatMatchString;\n y: FormatMatch;\n yy: FormatMatch;\n yyyy: FormatMatch;\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n localization: FormatLocalization = DefaultFormatLocalization;\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n * @deprecated use setLocalization with a FormatLocalization object instead\n */\n setLocale(value: string): this {\n if (!this.localization) {\n this.localization = DefaultFormatLocalization;\n this.localization.locale = value;\n }\n return this;\n }\n\n /**\n * Chainable way to set the {@link localization}\n * @param value\n */\n setLocalization(value: FormatLocalization): this {\n this.localization = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n * @param locale this parameter is deprecated. Use formatLocalization instead.\n * @param formatLocalization\n */\n static convert(\n date: Date,\n locale = 'default',\n formatLocalization: FormatLocalization = undefined\n ): DateTime {\n if (!date) throw new Error(`A date is required`);\n\n if (!formatLocalization) {\n formatLocalization = DefaultFormatLocalization;\n formatLocalization.locale = locale;\n }\n\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ).setLocalization(formatLocalization);\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocalization(this.localization);\n }\n\n static isValid(d): boolean {\n if (d === undefined || JSON.stringify(d) === 'null') return false;\n if (d.constructor.name === DateTime.name) return true;\n return false;\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n * @param startOfTheWeek Allows for the changing the start of the week.\n */\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay': {\n this.startOf(Unit.date);\n if (this.weekDay === startOfTheWeek) break;\n const goBack = (this.weekDay - startOfTheWeek + 7) % 7;\n this.manipulate(goBack * -1, Unit.date);\n break;\n }\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n * @param startOfTheWeek\n */\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay': {\n this.endOf(Unit.date);\n const endOfWeek = 6 + startOfTheWeek;\n if (this.weekDay === endOfWeek) break;\n this.manipulate(endOfWeek - this.weekDay, Unit.date);\n break;\n }\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.setMonth(11, 31);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n this[unit] += value;\n return this;\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparison.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n // If the comparisons is undefined, return false\n if (!DateTime.isValid(compare)) return false;\n\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparison.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n // If the comparisons is undefined, return false\n if (!DateTime.isValid(compare)) return false;\n\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparison.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n // If the comparisons is undefined, return false\n if (!DateTime.isValid(compare)) return false;\n\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined)\n throw new Error(`Unit '${unit}' is not valid`);\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n // If one of the comparisons is undefined, return false\n if (!DateTime.isValid(left) || !DateTime.isValid(right)) return false;\n // If a unit is provided and is not a valid property of the DateTime object, throw an error\n if (unit && this[unit] === undefined) {\n throw new Error(`Unit '${unit}' is not valid`);\n }\n\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n const isLeftInRange = leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit);\n const isRightInRange = rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit);\n\n return isLeftInRange && isRightInRange;\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.localization.locale,\n template: Record = { dateStyle: 'full', timeStyle: 'long' }\n ): Record {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).second;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit minutes\n */\n get minutesFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).minute;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hour, e.g. 01...10\n * @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.\n */\n getHoursFormatted(hourCycle: Intl.LocaleHourCycleKey = 'h12') {\n return this.parts(undefined, { ...twoDigitTemplate, hourCycle: hourCycle })\n .hour;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.localization.locale): string {\n return new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true,\n })\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).day;\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n const targetMonth = new Date(this.year, value + 1);\n targetMonth.setDate(0);\n const endOfMonth = targetMonth.getDate();\n if (this.date > endOfMonth) {\n this.date = endOfMonth;\n }\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.parts(undefined, twoDigitTemplate).month;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n\n // borrowed a bunch of stuff from Luxon\n /**\n * Gets the week of the year\n */\n get week(): number {\n const ordinal = this.computeOrdinal(),\n weekday = this.getUTCDay();\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\n\n if (weekNumber < 1) {\n weekNumber = this.weeksInWeekYear();\n } else if (weekNumber > this.weeksInWeekYear()) {\n weekNumber = 1;\n }\n\n return weekNumber;\n }\n\n /**\n * Returns the number of weeks in the year\n */\n weeksInWeekYear() {\n const p1 =\n (this.year +\n Math.floor(this.year / 4) -\n Math.floor(this.year / 100) +\n Math.floor(this.year / 400)) %\n 7,\n last = this.year - 1,\n p2 =\n (last +\n Math.floor(last / 4) -\n Math.floor(last / 100) +\n Math.floor(last / 400)) %\n 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n }\n\n /**\n * Returns true or false depending on if the year is a leap year or not.\n */\n get isLeapYear() {\n return (\n this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0)\n );\n }\n\n private computeOrdinal() {\n return (\n this.date +\n (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month]\n );\n }\n\n private nonLeapLadder = [\n 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,\n ];\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\n //#region CDF stuff\n\n private dateTimeRegex =\n //is regex cannot be simplified beyond what it already is\n /(\\[[^[\\]]*])|y{1,4}|M{1,4}|d{1,4}|H{1,2}|h{1,2}|t|T|m{1,2}|s{1,2}|f{3}/g; //NOSONAR\n\n private formattingTokens =\n /(\\[[^[\\]]*])|([-_:/.,()\\s]+)|(T|t|yyyy|yy?|MM?M?M?|Do|dd?|hh?|HH?|mm?|ss?)/g; //NOSONAR is regex cannot be simplified beyond what it already is\n\n /**\n * Returns a list of month values based on the current locale\n */\n private getAllMonths(\n format: '2-digit' | 'numeric' | 'long' | 'short' | 'narrow' = 'long'\n ) {\n const applyFormat = new Intl.DateTimeFormat(this.localization.locale, {\n month: format,\n }).format;\n return [...Array(12).keys()].map((m) => applyFormat(new Date(2021, m)));\n }\n\n /**\n * Replaces an expanded token set (e.g. LT/LTS)\n */\n private replaceTokens(formatStr, formats) {\n /***\n * _ => match\n * a => first capture group. Anything between [ and ]\n * b => second capture group\n */\n return formatStr.replace(\n /(\\[[^[\\]]*])|(LTS?|l{1,4}|L{1,4})/g,\n (_, a, b) => {\n const B = b && b.toUpperCase();\n return a || formats[B] || DefaultFormatLocalization.dateFormats[B];\n }\n );\n }\n\n private match2 = /\\d\\d/; // 00 - 99\n private match3 = /\\d{3}/; // 000 - 999\n private match4 = /\\d{4}/; // 0000 - 9999\n private match1to2 = /\\d\\d?/; // 0 - 99\n private matchSigned = /[+-]?\\d+/; // -inf - inf\n private matchOffset = /[+-]\\d\\d:?(\\d\\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z\n private matchWord = /[^\\d_:/,\\-()\\s]+/; // Word\n\n private parseTwoDigitYear(input: number) {\n return input + (input > 68 ? 1900 : 2000);\n }\n\n private offsetFromString(input: string) {\n if (!input) return 0;\n if (input === 'Z') return 0;\n const [first, second, third] = input.match(/([+-]|\\d\\d)/g);\n const minutes = +second * 60 + (+third || 0);\n const signed = first === '+' ? -minutes : minutes;\n return minutes === 0 ? 0 : signed; // eslint-disable-line no-nested-ternary\n }\n\n /**\n * z = -4, zz = -04, zzz = -0400\n * @param date\n * @param style\n * @private\n */\n private zoneInformation(date: DateTime, style: 'z' | 'zz' | 'zzz') {\n let name = date\n .parts(this.localization.locale, { timeZoneName: 'longOffset' })\n .timeZoneName.replace('GMT', '')\n .replace(':', '');\n\n const negative = name.includes('-');\n\n name = name.replace('-', '');\n\n if (style === 'z') name = name.substring(1, 2);\n else if (style === 'zz') name = name.substring(0, 2);\n\n return `${negative ? '-' : ''}${name}`;\n }\n\n private zoneExpressions = [\n this.matchOffset,\n (obj, input) => {\n obj.offset = this.offsetFromString(input);\n },\n ];\n\n private addInput(property) {\n return (obj, input) => {\n obj[property] = +input;\n };\n }\n\n private getLocaleAfternoon(): string {\n return new Intl.DateTimeFormat(this.localization.locale, {\n hour: 'numeric',\n hour12: true,\n })\n .formatToParts(new Date(2022, 3, 4, 13))\n .find((p) => p.type === 'dayPeriod')\n ?.value?.replace(/\\s+/g, ' ');\n }\n\n private meridiemMatch(input: string) {\n return input.toLowerCase() === this.getLocaleAfternoon().toLowerCase();\n }\n\n private expressions: FormatExpression = {\n t: {\n pattern: undefined, //this.matchWord,\n parser: (obj, input) => {\n obj.afternoon = this.meridiemMatch(input);\n },\n },\n T: {\n pattern: undefined, //this.matchWord,\n parser: (obj, input) => {\n obj.afternoon = this.meridiemMatch(input);\n },\n },\n fff: {\n pattern: this.match3,\n parser: (obj, input) => {\n obj.milliseconds = +input;\n },\n },\n s: {\n pattern: this.match1to2,\n parser: this.addInput('seconds'),\n },\n ss: {\n pattern: this.match1to2,\n parser: this.addInput('seconds'),\n },\n m: {\n pattern: this.match1to2,\n parser: this.addInput('minutes'),\n },\n mm: {\n pattern: this.match1to2,\n parser: this.addInput('minutes'),\n },\n H: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n h: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n HH: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n hh: {\n pattern: this.match1to2,\n parser: this.addInput('hours'),\n },\n d: {\n pattern: this.match1to2,\n parser: this.addInput('day'),\n },\n dd: {\n pattern: this.match2,\n parser: this.addInput('day'),\n },\n Do: {\n pattern: this.matchWord,\n parser: (obj, input) => {\n obj.day = +(input.match(/\\d+/)[0] || 1);\n if (!this.localization.ordinal) return;\n for (let i = 1; i <= 31; i += 1) {\n if (this.localization.ordinal(i).replace(/[[\\]]/g, '') === input) {\n obj.day = i;\n }\n }\n },\n },\n M: {\n pattern: this.match1to2,\n parser: this.addInput('month'),\n },\n MM: {\n pattern: this.match2,\n parser: this.addInput('month'),\n },\n MMM: {\n pattern: this.matchWord,\n parser: (obj, input) => {\n const months = this.getAllMonths();\n const monthsShort = this.getAllMonths('short');\n const matchIndex =\n (monthsShort || months.map((_) => _.slice(0, 3))).indexOf(input) + 1;\n if (matchIndex < 1) {\n throw new Error();\n }\n obj.month = matchIndex % 12 || matchIndex;\n },\n },\n MMMM: {\n pattern: this.matchWord,\n parser: (obj, input) => {\n const months = this.getAllMonths();\n const matchIndex = months.indexOf(input) + 1;\n if (matchIndex < 1) {\n throw new Error();\n }\n obj.month = matchIndex % 12 || matchIndex;\n },\n },\n y: {\n pattern: this.matchSigned,\n parser: this.addInput('year'),\n },\n yy: {\n pattern: this.match2,\n parser: (obj, input) => {\n obj.year = this.parseTwoDigitYear(+input);\n },\n },\n yyyy: {\n pattern: this.match4,\n parser: this.addInput('year'),\n },\n // z: this.zoneExpressions,\n // zz: this.zoneExpressions,\n // zzz: this.zoneExpressions\n };\n\n private correctHours(time) {\n const { afternoon } = time;\n if (afternoon !== undefined) {\n const { hours } = time;\n if (afternoon) {\n if (hours < 12) {\n time.hours += 12;\n }\n } else if (hours === 12) {\n time.hours = 0;\n }\n delete time.afternoon;\n }\n }\n\n private makeParser(format: string) {\n format = this.replaceTokens(format, this.localization.dateFormats);\n const matchArray = format.match(this.formattingTokens);\n const { length } = matchArray;\n const expressionArray: (FormatMatch | string)[] = [];\n for (let i = 0; i < length; i += 1) {\n const token = matchArray[i];\n const expression = this.expressions[token] as FormatMatch;\n if (expression?.parser) {\n expressionArray[i] = expression;\n } else {\n expressionArray[i] = (token as string).replace(/^\\[[^[\\]]*]$/g, '');\n }\n }\n\n return (input: string): parsedTime => {\n const time = {\n hours: 0,\n minutes: 0,\n seconds: 0,\n milliseconds: 0,\n };\n for (let i = 0, start = 0; i < length; i += 1) {\n const token = expressionArray[i];\n if (typeof token === 'string') {\n start += token.length;\n } else {\n const part = input.slice(start);\n let value = part;\n\n if (token.pattern) {\n const match = token.pattern.exec(part);\n value = match[0];\n }\n token.parser.call(this, time, value);\n input = input.replace(value, '');\n }\n }\n this.correctHours(time);\n return time;\n };\n }\n\n /**\n * Attempts to create a DateTime from a string.\n * @param input date as string\n * @param localization provides the date template the string is in via the format property\n */\n //eslint-disable-next-line @typescript-eslint/no-unused-vars\n static fromString(input: string, localization: FormatLocalization): DateTime {\n if (!localization?.format) {\n Namespace.errorMessages.customDateFormatError('No format was provided');\n }\n try {\n const dt = new DateTime();\n dt.setLocalization(localization);\n if (['x', 'X'].indexOf(localization.format) > -1)\n return new DateTime((localization.format === 'X' ? 1000 : 1) * +input);\n\n input = input.replace(/\\s+/g, ' ');\n const parser = dt.makeParser(localization.format);\n const { year, month, day, hours, minutes, seconds, milliseconds, zone } =\n parser(input);\n const d = day || (!year && !month ? dt.getDate() : 1);\n const y = year || dt.getFullYear();\n let M = 0;\n if (!(year && !month)) {\n M = month > 0 ? month - 1 : dt.getMonth();\n }\n if (zone) {\n return new DateTime(\n Date.UTC(\n y,\n M,\n d,\n hours,\n minutes,\n seconds,\n milliseconds + zone.offset * 60 * 1000\n )\n );\n }\n return new DateTime(y, M, d, hours, minutes, seconds, milliseconds);\n } catch (e) {\n Namespace.errorMessages.customDateFormatError(\n `Unable to parse provided input: ${input}, format: ${localization.format}`\n );\n }\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An optional object. If provided, method will use Intl., otherwise the localizations format properties\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(\n template?: DateTimeFormatOptions | string,\n locale = this.localization.locale\n ): string {\n if (template && typeof template === 'object')\n return new Intl.DateTimeFormat(locale, template).format(this);\n\n const formatString = this.replaceTokens(\n //try template first\n template ||\n //otherwise try localization format\n this.localization.format ||\n //otherwise try date + time\n `${DefaultFormatLocalization.dateFormats.L}, ${DefaultFormatLocalization.dateFormats.LT}`,\n this.localization.dateFormats\n );\n\n const formatter = (template) =>\n new Intl.DateTimeFormat(this.localization.locale, template).format(this);\n\n if (!this.localization.hourCycle)\n this.localization.hourCycle = guessHourCycle(this.localization.locale);\n\n //if the format asks for a twenty-four-hour string but the hour cycle is not, then make a base guess\n const HHCycle = this.localization.hourCycle.startsWith('h1')\n ? 'h24'\n : this.localization.hourCycle;\n const hhCycle = this.localization.hourCycle.startsWith('h2')\n ? 'h12'\n : this.localization.hourCycle;\n\n const matches = {\n y: this.year,\n yy: formatter({ year: '2-digit' }),\n yyyy: this.year,\n M: formatter({ month: 'numeric' }),\n MM: this.monthFormatted,\n MMM: this.getAllMonths('short')[this.getMonth()],\n MMMM: this.getAllMonths()[this.getMonth()],\n d: this.date,\n dd: this.dateFormatted,\n ddd: formatter({ weekday: 'short' }),\n dddd: formatter({ weekday: 'long' }),\n H: this.getHours(),\n HH: this.getHoursFormatted(HHCycle),\n h: this.hours > 12 ? this.hours - 12 : this.hours,\n hh: this.getHoursFormatted(hhCycle),\n t: this.meridiem(),\n T: this.meridiem().toUpperCase(),\n m: this.minutes,\n mm: this.minutesFormatted,\n s: this.seconds,\n ss: this.secondsFormatted,\n fff: this.getMilliseconds(),\n // z: this.zoneInformation(dateTime, 'z'), //-4\n // zz: this.zoneInformation(dateTime, 'zz'), //-04\n // zzz: this.zoneInformation(dateTime, 'zzz') //-0400\n };\n\n return formatString\n .replace(this.dateTimeRegex, (match, $1) => {\n return $1 || matches[match];\n })\n .replace(/\\[/g, '')\n .replace(/]/g, '');\n }\n\n //#endregion CDF stuff\n}\n","//eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport declare type Constructable = new (...args: any[]) => T;\n\nclass ServiceLocator {\n private cache: Map, unknown | symbol> = new Map();\n\n locate(identifier: Constructable): T {\n const service = this.cache.get(identifier);\n if (service) return service as T;\n const value = new identifier();\n this.cache.set(identifier, value);\n return value;\n }\n}\nexport const setupServiceLocator = () => {\n serviceLocator = new ServiceLocator();\n};\n\nexport let serviceLocator: ServiceLocator;\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';\nimport CalendarModes from './calendar-modes';\nimport ViewMode from './view-mode';\nimport Options from './options';\n\nexport class OptionsStore {\n options: Options;\n element: HTMLElement;\n input: HTMLInputElement;\n unset: boolean;\n private _currentCalendarViewMode = 0;\n\n get currentCalendarViewMode() {\n return this._currentCalendarViewMode;\n }\n\n set currentCalendarViewMode(value) {\n this._currentCalendarViewMode = value;\n this.currentView = CalendarModes[value].name;\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n set viewDate(v) {\n this._viewDate = v;\n if (this.options) this.options.viewDate = v;\n }\n\n /**\n * When switching back to the calendar from the clock,\n * this sets currentView to the correct calendar view.\n */\n refreshCurrentView() {\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\n }\n\n minimumCalendarViewMode = 0;\n currentView: keyof ViewMode = 'calendar';\n\n get isTwelveHour() {\n return ['h12', 'h11'].includes(this.options.localization.hourCycle);\n }\n}\n","import { DateTime, Unit } from './datetime';\nimport { serviceLocator } from './utilities/service-locator';\nimport { OptionsStore } from './utilities/optionsStore';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private optionsStore: OptionsStore;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provided to check portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (!this._enabledDisabledDatesIsValid(granularity, targetDate))\n return false;\n\n if (\n granularity !== Unit.month &&\n granularity !== Unit.year &&\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n )\n return false;\n\n if (!this._minMaxIsValid(granularity, targetDate)) return false;\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (!this._enabledDisabledHoursIsValid(targetDate)) return false;\n\n if (\n this.optionsStore.options.restrictions.disabledTimeIntervals?.filter(\n (internal) => targetDate.isBetween(internal.from, internal.to)\n ).length !== 0\n )\n return false;\n }\n\n return true;\n }\n\n private _enabledDisabledDatesIsValid(\n granularity: Unit,\n targetDate: DateTime\n ): boolean {\n if (granularity !== Unit.date) return true;\n\n if (\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n\n // noinspection RedundantIfStatementJS\n if (\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.disabledDates ||\n this.optionsStore.options.restrictions.disabledDates.length === 0\n )\n return false;\n\n return !!this.optionsStore.options.restrictions.disabledDates.find((x) =>\n x.isSame(testDate, Unit.date)\n );\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.enabledDates ||\n this.optionsStore.options.restrictions.enabledDates.length === 0\n )\n return true;\n\n return !!this.optionsStore.options.restrictions.enabledDates.find((x) =>\n x.isSame(testDate, Unit.date)\n );\n }\n\n private _minMaxIsValid(granularity: Unit, targetDate: DateTime) {\n if (\n this.optionsStore.options.restrictions.minDate &&\n targetDate.isBefore(\n this.optionsStore.options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n\n // noinspection RedundantIfStatementJS\n if (\n this.optionsStore.options.restrictions.maxDate &&\n targetDate.isAfter(\n this.optionsStore.options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n return true;\n }\n\n private _enabledDisabledHoursIsValid(targetDate) {\n if (\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n\n // noinspection RedundantIfStatementJS\n if (\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.disabledHours ||\n this.optionsStore.options.restrictions.disabledHours.length === 0\n )\n return false;\n\n const formattedDate = testDate.hours;\n return this.optionsStore.options.restrictions.disabledHours.includes(\n formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this.optionsStore.options.restrictions.enabledHours ||\n this.optionsStore.options.restrictions.enabledHours.length === 0\n )\n return true;\n\n const formattedDate = testDate.hours;\n return this.optionsStore.options.restrictions.enabledHours.includes(\n formattedDate\n );\n }\n\n dateRangeIsValid(dates: DateTime[], index: number, target: DateTime) {\n // if we're not using the option, then return valid\n if (!this.optionsStore.options.dateRange) return true;\n\n // if we've only selected 0..1 dates, and we're not setting the end date\n // then return valid. We only want to validate the range if both are selected,\n // because the other validation on the target has already occurred.\n if (dates.length !== 2 && index !== 1) return true;\n\n // initialize start date\n const start = dates[0].clone;\n // check if start date is not the same as target date\n if (start.isSame(target, Unit.date)) return true;\n\n // add one day to start; start has already been validated\n start.manipulate(1, Unit.date);\n\n // check each date in the range to make sure it's valid\n while (!start.isSame(target, Unit.date)) {\n const valid = this.isValid(start, Unit.date);\n if (!valid) return false;\n start.manipulate(1, Unit.date);\n }\n\n return true;\n }\n}\n","import { DateTime, Unit } from '../datetime';\nimport ActionTypes from './action-types';\nimport { BaseEvent } from './event-types';\n\nexport type ViewUpdateValues = Unit | 'decade' | 'clock' | 'calendar' | 'all';\n\nclass EventEmitter {\n private subscribers: ((value?: T) => void)[] = [];\n\n subscribe(callback: (value: T) => void) {\n this.subscribers.push(callback);\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\n }\n\n unsubscribe(index: number) {\n this.subscribers.splice(index, 1);\n }\n\n emit(value?: T) {\n this.subscribers.forEach((callback) => {\n callback(value);\n });\n }\n\n destroy() {\n this.subscribers = null;\n this.subscribers = [];\n }\n}\n\nexport class EventEmitters {\n triggerEvent = new EventEmitter();\n viewUpdate = new EventEmitter();\n updateDisplay = new EventEmitter();\n action = new EventEmitter<{ e: any; action?: ActionTypes }>(); //eslint-disable-line @typescript-eslint/no-explicit-any\n updateViewDate = new EventEmitter();\n\n destroy() {\n this.triggerEvent.destroy();\n this.viewUpdate.destroy();\n this.updateDisplay.destroy();\n this.action.destroy();\n this.updateViewDate.destroy();\n }\n}\n","import Options, { Localization } from './options';\nimport { DateTime } from '../datetime';\nimport DefaultFormatLocalization from './default-format-localization';\n\nconst defaultEnLocalization: Localization = {\n clear: 'Clear selection',\n close: 'Close the picker',\n dateFormats: DefaultFormatLocalization.dateFormats,\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\n decrementHour: 'Decrement Hour',\n decrementMinute: 'Decrement Minute',\n decrementSecond: 'Decrement Second',\n format: DefaultFormatLocalization.format,\n hourCycle: DefaultFormatLocalization.hourCycle,\n incrementHour: 'Increment Hour',\n incrementMinute: 'Increment Minute',\n incrementSecond: 'Increment Second',\n locale: DefaultFormatLocalization.locale,\n maxWeekdayLength: 0,\n nextCentury: 'Next Century',\n nextDecade: 'Next Decade',\n nextMonth: 'Next Month',\n nextYear: 'Next Year',\n ordinal: DefaultFormatLocalization.ordinal,\n pickHour: 'Pick Hour',\n pickMinute: 'Pick Minute',\n pickSecond: 'Pick Second',\n previousCentury: 'Previous Century',\n previousDecade: 'Previous Decade',\n previousMonth: 'Previous Month',\n previousYear: 'Previous Year',\n selectDate: 'Select Date',\n selectDecade: 'Select Decade',\n selectMonth: 'Select Month',\n selectTime: 'Select Time',\n selectYear: 'Select Year',\n startOfTheWeek: 0,\n today: 'Go to today',\n toggleMeridiem: 'Toggle Meridiem',\n};\n\nconst DefaultOptions: Options = {\n allowInputToggle: false,\n container: undefined,\n dateRange: false,\n debug: false,\n defaultDate: undefined,\n display: {\n icons: {\n type: 'icons',\n time: 'fa-solid fa-clock',\n date: 'fa-solid fa-calendar',\n up: 'fa-solid fa-arrow-up',\n down: 'fa-solid fa-arrow-down',\n previous: 'fa-solid fa-chevron-left',\n next: 'fa-solid fa-chevron-right',\n today: 'fa-solid fa-calendar-check',\n clear: 'fa-solid fa-trash',\n close: 'fa-solid fa-xmark',\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false,\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: undefined,\n },\n inline: false,\n theme: 'auto',\n placement: 'bottom',\n },\n keepInvalid: false,\n localization: defaultEnLocalization,\n meta: {},\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: [],\n },\n stepping: 1,\n useCurrent: true,\n viewDate: new DateTime(),\n};\n\nexport default DefaultOptions;\nexport const DefaultEnLocalization = { ...defaultEnLocalization };\n","import Namespace from './namespace';\nimport { DateTime } from '../datetime';\nimport { FormatLocalization } from './options';\nimport DefaultFormatLocalization from './default-format-localization';\n\n/**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @param localization object containing locale and format settings. Only used with the custom formats\n * @private\n */\nexport function tryConvertToDateTime(\n this: void,\n d: DateTime | Date | string,\n localization: FormatLocalization\n): DateTime | null {\n if (!d) return null;\n if (d.constructor.name === DateTime.name) return d as DateTime;\n if (d.constructor.name === Date.name) {\n return DateTime.convert(d as Date);\n }\n if (typeof d === typeof '') {\n const dateTime = DateTime.fromString(d as unknown as string, localization);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n}\n\n/**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param localization object containing locale and format settings. Only used with the custom formats\n */\nexport function convertToDateTime(\n this: void,\n d: DateTime | Date | string,\n optionName: string,\n localization: FormatLocalization\n): DateTime {\n if (typeof d === typeof '' && optionName !== 'input') {\n Namespace.errorMessages.dateString();\n }\n\n const converted = tryConvertToDateTime(d, localization);\n\n if (!converted) {\n Namespace.errorMessages.failedToParseDate(\n optionName,\n d,\n optionName === 'input'\n );\n }\n return converted;\n}\n\n/**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n * @param localization\n */\nexport function typeCheckDateArray(\n this: void,\n optionName: string,\n value: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string,\n localization: FormatLocalization = DefaultFormatLocalization\n) {\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n const d = value[i];\n const dateTime = convertToDateTime(d, optionName, localization);\n dateTime.setLocalization(localization);\n value[i] = dateTime;\n }\n}\n\n/**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\nexport function typeCheckNumberArray(\n this: void,\n optionName: string,\n value: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string\n) {\n if (!Array.isArray(value) || value.some((x) => typeof x !== typeof 0)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n}\n","import Namespace from './namespace';\nimport type { FormatLocalization } from './options';\nimport {\n convertToDateTime,\n typeCheckNumberArray,\n typeCheckDateArray,\n} from './typeChecker';\n\ninterface OptionProcessorFunctionArguments {\n key: string;\n value: any; //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string;\n defaultType: string;\n path: string;\n localization: FormatLocalization;\n}\n\ntype OptionProcessorFunction = (\n this: void,\n args: OptionProcessorFunctionArguments\n) => any; //eslint-disable-line @typescript-eslint/no-explicit-any\n\nfunction mandatoryDate(key: string): OptionProcessorFunction {\n return ({ value, providedType, localization }) => {\n const dateTime = convertToDateTime(value, key, localization);\n if (dateTime !== undefined) {\n dateTime.setLocalization(localization);\n return dateTime;\n }\n };\n}\n\nfunction optionalDate(key: string): OptionProcessorFunction {\n const mandatory = mandatoryDate(key);\n return (args) => {\n if (args.value === undefined) {\n return args.value;\n }\n return mandatory(args);\n };\n}\n\nfunction numbersInRange(\n key: string,\n lower: number,\n upper: number\n): OptionProcessorFunction {\n return ({ value, providedType }) => {\n if (value === undefined) {\n return [];\n }\n typeCheckNumberArray(key, value, providedType);\n if ((value as number[]).some((x) => x < lower || x > upper))\n Namespace.errorMessages.numbersOutOfRange(key, lower, upper);\n return value;\n };\n}\n\nfunction validHourRange(key: string): OptionProcessorFunction {\n return numbersInRange(key, 0, 23);\n}\n\nfunction validDateArray(key: string): OptionProcessorFunction {\n return ({ value, providedType, localization }) => {\n if (value === undefined) {\n return [];\n }\n typeCheckDateArray(key, value, providedType, localization);\n return value;\n };\n}\n\nfunction validKeyOption(keyOptions: string[]): OptionProcessorFunction {\n return ({ value, path }) => {\n if (!keyOptions.includes(value))\n Namespace.errorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n return value;\n };\n}\n\nconst optionProcessors: { [key: string]: OptionProcessorFunction } =\n Object.freeze({\n defaultDate: mandatoryDate('defaultDate'),\n viewDate: mandatoryDate('viewDate'),\n minDate: optionalDate('restrictions.minDate'),\n maxDate: optionalDate('restrictions.maxDate'),\n disabledHours: validHourRange('restrictions.disabledHours'),\n enabledHours: validHourRange('restrictions.enabledHours'),\n disabledDates: validDateArray('restrictions.disabledDates'),\n enabledDates: validDateArray('restrictions.enabledDates'),\n daysOfWeekDisabled: numbersInRange('restrictions.daysOfWeekDisabled', 0, 6),\n disabledTimeIntervals: ({ key, value, providedType, localization }) => {\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[]; //eslint-disable-line @typescript-eslint/no-explicit-any\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n const d = valueObject[i][vk];\n const dateTime = convertToDateTime(d, subOptionName, localization);\n dateTime.setLocalization(localization);\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n },\n toolbarPlacement: validKeyOption(['top', 'bottom', 'default']),\n type: validKeyOption(['icons', 'sprites']),\n viewMode: validKeyOption([\n 'clock',\n 'calendar',\n 'months',\n 'years',\n 'decades',\n ]),\n theme: validKeyOption(['light', 'dark', 'auto']),\n placement: validKeyOption(['top', 'bottom']),\n meta: ({ value }) => value,\n dayViewHeaderFormat: ({ value }) => value,\n container: ({ value, path }) => {\n if (\n value &&\n !(\n value instanceof HTMLElement ||\n value instanceof Element ||\n value?.appendChild\n )\n ) {\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n typeof value,\n 'HTMLElement'\n );\n }\n return value;\n },\n useTwentyfourHour: ({ value, path, providedType, defaultType }) => {\n Namespace.errorMessages.deprecatedWarning(\n 'useTwentyfourHour',\n 'Please use \"options.localization.hourCycle\" instead'\n );\n if (value === undefined || providedType === 'boolean') return value;\n Namespace.errorMessages.typeMismatch(path, providedType, defaultType);\n },\n hourCycle: validKeyOption(['h11', 'h12', 'h23', 'h24']),\n });\n\nconst defaultProcessor: OptionProcessorFunction = ({\n value,\n defaultType,\n providedType,\n path,\n}) => {\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.errorMessages.typeMismatch(path, providedType, defaultType);\n }\n};\n\nexport function processKey(this: void, args: OptionProcessorFunctionArguments) {\n return (optionProcessors[args.key] || defaultProcessor)(args);\n}\n","import Namespace from './namespace';\nimport { DateTime } from '../datetime';\nimport DefaultOptions from './default-options';\nimport Options, { FormatLocalization } from './options';\nimport { processKey } from './optionProcessor';\nimport {\n convertToDateTime,\n tryConvertToDateTime,\n typeCheckDateArray,\n typeCheckNumberArray,\n} from './typeChecker';\n\nexport class OptionConverter {\n private static ignoreProperties = [\n 'meta',\n 'dayViewHeaderFormat',\n 'container',\n 'dateForms',\n 'ordinal',\n ];\n\n static deepCopy(input): Options {\n const o = {};\n\n Object.keys(input).forEach((key) => {\n const inputElement = input[key];\n\n if (inputElement instanceof DateTime) {\n o[key] = inputElement.clone;\n return;\n } else if (inputElement instanceof Date) {\n o[key] = new Date(inputElement.valueOf());\n return;\n }\n\n o[key] = inputElement;\n if (\n typeof inputElement !== 'object' ||\n inputElement instanceof HTMLElement ||\n inputElement instanceof Element\n )\n return;\n if (!Array.isArray(inputElement)) {\n o[key] = OptionConverter.deepCopy(inputElement);\n }\n });\n\n return o;\n }\n\n private static isValue = (a) => a != null; // everything except undefined + null\n\n /**\n * Finds value out of an object based on a string, period delimited, path\n * @param paths\n * @param obj\n */\n static objectPath(paths: string, obj) {\n if (paths.charAt(0) === '.') paths = paths.slice(1);\n if (!paths) return obj;\n return paths\n .split('.')\n .reduce(\n (value, key) =>\n OptionConverter.isValue(value) || OptionConverter.isValue(value[key])\n ? value[key]\n : undefined,\n obj\n );\n }\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param copyTo Destination object. This was added to prevent reference copies\n * @param localization\n * @param path\n */\n static spread(provided, copyTo, localization: FormatLocalization, path = '') {\n const defaultOptions = OptionConverter.objectPath(path, DefaultOptions);\n\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(defaultOptions).includes(x)\n );\n\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path}.${x}\" in not a known option.`;\n const didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += ` Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.errorMessages.unexpectedOptions(errors);\n }\n\n Object.keys(provided)\n .filter((key) => key !== '__proto__' && key !== 'constructor')\n .forEach((key) => {\n path += `.${key}`;\n if (path.charAt(0) === '.') path = path.slice(1);\n\n const defaultOptionValue = defaultOptions[key];\n const providedType = typeof provided[key];\n const defaultType = typeof defaultOptionValue;\n const value = provided[key];\n\n if (value === undefined || value === null) {\n copyTo[key] = value;\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n\n if (\n typeof defaultOptionValue === 'object' &&\n !Array.isArray(provided[key]) &&\n !(\n defaultOptionValue instanceof Date ||\n OptionConverter.ignoreProperties.includes(key)\n )\n ) {\n OptionConverter.spread(\n provided[key],\n copyTo[key],\n localization,\n path\n );\n } else {\n copyTo[key] = OptionConverter.processKey(\n key,\n value,\n providedType,\n defaultType,\n path,\n localization\n );\n }\n\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n }\n\n static processKey(\n key: string,\n value: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n providedType: string,\n defaultType: string,\n path: string,\n localization: FormatLocalization\n ) {\n return processKey({\n key,\n value,\n providedType,\n defaultType,\n path,\n localization,\n });\n }\n\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newConfig = OptionConverter.deepCopy(mergeTo);\n //see if the options specify a locale\n const localization =\n mergeTo.localization?.locale !== 'default'\n ? mergeTo.localization\n : providedOptions?.localization || DefaultOptions.localization;\n\n OptionConverter.spread(providedOptions, newConfig, localization, '');\n\n return newConfig;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = JSON.parse(JSON.stringify(element.dataset));\n\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\n\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n const dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const normalizeObject = this.normalizeObject(objectToNormalized);\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = normalizeObject(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n //todo clean this up\n private static normalizeObject(objectToNormalized: (object) => object) {\n const normalizeObject = (\n split: string[],\n index: number,\n optionSubgroup: unknown,\n value: unknown\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = normalizeObject(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n return normalizeObject;\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @param localization object containing locale and format settings. Only used with the custom formats\n * @private\n */\n static _dateTypeCheck(\n d: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n localization: FormatLocalization\n ): DateTime | null {\n return tryConvertToDateTime(d, localization);\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n * @param localization\n */\n static _typeCheckDateArray(\n optionName: string,\n value,\n providedType: string,\n localization: FormatLocalization\n ) {\n return typeCheckDateArray(optionName, value, providedType, localization);\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n return typeCheckNumberArray(optionName, value, providedType);\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param localization object containing locale and format settings. Only used with the custom formats\n */\n static dateConversion(\n d: any, //eslint-disable-line @typescript-eslint/no-explicit-any\n optionName: string,\n localization: FormatLocalization\n ): DateTime {\n return convertToDateTime(d, optionName, localization);\n }\n\n private static _flattenDefaults: string[];\n\n private static getFlattenDefaultOptions(): string[] {\n if (this._flattenDefaults) return this._flattenDefaults;\n const deepKeys = (t, pre = []) => {\n if (Array.isArray(t)) return [];\n if (Object(t) === t) {\n return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]));\n } else {\n return pre.join('.');\n }\n };\n\n this._flattenDefaults = deepKeys(DefaultOptions);\n\n return this._flattenDefaults;\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflicts(config: Options) {\n if (\n config.display.sideBySide &&\n (!config.display.components.clock ||\n !(\n config.display.components.hours ||\n config.display.components.minutes ||\n config.display.components.seconds\n ))\n ) {\n Namespace.errorMessages.conflictingConfiguration(\n 'Cannot use side by side mode without the clock components'\n );\n }\n\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n\n if (config.multipleDates && config.dateRange) {\n Namespace.errorMessages.conflictingConfiguration(\n 'Cannot uss option \"multipleDates\" with \"dateRange\"'\n );\n }\n }\n}\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\nimport Namespace from './utilities/namespace';\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\nimport Validation from './validation';\nimport { serviceLocator } from './utilities/service-locator';\nimport { EventEmitters } from './utilities/event-emitter';\nimport { OptionsStore } from './utilities/optionsStore';\nimport { OptionConverter } from './utilities/optionConverter';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private optionsStore: OptionsStore;\n private validation: Validation;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return [...this._dates];\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex]?.clone;\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Formats a DateTime object to a string. Used when setting the input value.\n * @param date\n */\n formatInput(date: DateTime): string {\n if (!date) return '';\n date.localization = this.optionsStore.options.localization;\n return date.format();\n }\n\n /**\n * parse the value into a DateTime object.\n * this can be overwritten to supply your own parsing.\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n parseInput(value: any): DateTime {\n return OptionConverter.dateConversion(\n value,\n 'input',\n this.optionsStore.options.localization\n );\n }\n\n /**\n * Tries to convert the provided value to a DateTime object.\n * If value is null|undefined then clear the value of the provided index (or 0).\n * @param value Value to convert or null|undefined\n * @param index When using multidates this is the index in the array\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n setFromInput(value: any, index?: number) {\n if (!value) {\n this.setValue(undefined, index);\n return;\n }\n const converted = this.parseInput(value);\n if (converted) {\n converted.setLocalization(this.optionsStore.options.localization);\n this.setValue(converted, index);\n }\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!DateTime.isValid(targetDate)) return false;\n if (!unit)\n return this._dates.find((x) => x.isSame(targetDate)) !== undefined;\n\n const format = getFormatByUnit(unit);\n\n const innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!DateTime.isValid(targetDate)) return -1;\n if (!unit)\n return this._dates.map((x) => x.valueOf()).indexOf(targetDate.valueOf());\n\n const format = getFormatByUnit(unit);\n\n const innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this.optionsStore.unset = true;\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n if (this.optionsStore.input) this.optionsStore.input.value = '';\n this._eventEmitters.updateDisplay.emit('all');\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n updateInput(target?: DateTime) {\n if (!this.optionsStore.input) return;\n\n let newValue = this.formatInput(target);\n if (\n this.optionsStore.options.multipleDates ||\n this.optionsStore.options.dateRange\n ) {\n newValue = this._dates\n .map((d) => this.formatInput(d))\n .join(this.optionsStore.options.multipleDatesSeparator);\n }\n if (this.optionsStore.input.value != newValue)\n this.optionsStore.input.value = newValue;\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this.optionsStore.unset ? null : this._dates[index]?.clone;\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n if (target && oldDate?.isSame(target)) {\n this.updateInput(target);\n return;\n }\n\n // case of calling setValue(null)\n if (!target) {\n this._setValueNull(isClear, index, oldDate);\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this.optionsStore.options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this.optionsStore.options.stepping) *\n this.optionsStore.options.stepping;\n target.startOf(Unit.minutes);\n }\n\n const onUpdate = (isValid: boolean) => {\n this._dates[index] = target;\n this._eventEmitters.updateViewDate.emit(target.clone);\n\n this.updateInput(target);\n\n this.optionsStore.unset = false;\n this._eventEmitters.updateDisplay.emit('all');\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: isValid,\n } as ChangeEvent);\n };\n\n if (\n this.validation.isValid(target) &&\n this.validation.dateRangeIsValid(this.picked, index, target)\n ) {\n onUpdate(true);\n return;\n }\n\n if (this.optionsStore.options.keepInvalid) {\n onUpdate(false);\n }\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n\n private _setValueNull(isClear: boolean, index: number, oldDate: DateTime) {\n if (\n !this.optionsStore.options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this.optionsStore.unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n\n this.updateInput();\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n this._eventEmitters.updateDisplay.emit('all');\n }\n}\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';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n const { rangeHoverEvent, rangeHoverOutEvent } =\n this.handleMouseEvents(container);\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n\n // if hover is supported then add the events\n if (\n matchMedia('(hover: hover)').matches &&\n this.optionsStore.options.dateRange\n ) {\n div.addEventListener('mouseover', rangeHoverEvent);\n div.addEventListener('mouseout', rangeHoverOutEvent);\n }\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0] as HTMLElement;\n\n this._updateCalendarView(container);\n\n const innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .manipulate(12, Unit.hours);\n\n this._handleCalendarWeeks(container, innerDate.clone);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDay}\"]`)\n .forEach((element: HTMLElement) => {\n const classes: string[] = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this.optionsStore.unset &&\n !this.optionsStore.options.dateRange &&\n this.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n this._handleDateRange(innerDate, classes);\n\n paint(Unit.date, innerDate, classes, element);\n\n element.classList.remove(...element.classList);\n element.classList.add(...classes);\n element.setAttribute('data-value', this._dateToDataValue(innerDate));\n element.setAttribute('data-day', `${innerDate.date}`);\n element.innerText = innerDate.parts(undefined, {\n day: 'numeric',\n }).day;\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n private _dateToDataValue(date: DateTime): string {\n if (!DateTime.isValid(date)) return '';\n\n return `${date.year}-${date.monthFormatted}-${date.dateFormatted}`;\n }\n\n private _handleDateRange(innerDate: DateTime, classes: string[]) {\n const rangeStart = this.dates.picked[0];\n const rangeEnd = this.dates.picked[1];\n\n if (this.optionsStore.options.dateRange) {\n if (innerDate.isBetween(rangeStart, rangeEnd, Unit.date)) {\n classes.push(Namespace.css.rangeIn);\n }\n\n if (innerDate.isSame(rangeStart, Unit.date)) {\n classes.push(Namespace.css.rangeStart);\n }\n\n if (innerDate.isSame(rangeEnd, Unit.date)) {\n classes.push(Namespace.css.rangeEnd);\n }\n }\n }\n\n private handleMouseEvents(container: HTMLElement) {\n const rangeHoverEvent = (e: MouseEvent) => {\n const currentTarget = e?.currentTarget as HTMLElement;\n\n // if we have 0 or 2 selected or if the target is disabled then ignore\n if (\n this.dates.picked.length !== 1 ||\n currentTarget.classList.contains(Namespace.css.disabled)\n )\n return;\n\n // select all the date divs\n const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];\n\n // get the date value from the element being hovered over\n const attributeValue = currentTarget.getAttribute('data-value');\n\n // format the string to a date\n const innerDate = DateTime.fromString(attributeValue, {\n format: 'yyyy-MM-dd',\n });\n\n // find the position of the target in the date container\n const dayIndex = allDays.findIndex(\n (e) => e.getAttribute('data-value') === attributeValue\n );\n\n // find the first and second selected dates\n const rangeStart = this.dates.picked[0];\n const rangeEnd = this.dates.picked[1];\n\n //format the start date so that it can be found by the attribute\n const rangeStartFormatted = this._dateToDataValue(rangeStart);\n const rangeStartIndex = allDays.findIndex(\n (e) => e.getAttribute('data-value') === rangeStartFormatted\n );\n const rangeStartElement = allDays[rangeStartIndex];\n\n //make sure we don't leave start/end classes if we don't need them\n if (!innerDate.isSame(rangeStart, Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeStart);\n }\n\n if (!innerDate.isSame(rangeEnd, Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeEnd);\n }\n\n // the following figures out which direct from start date is selected\n // the selection \"cap\" classes are applied if needed\n // otherwise all the dates between will get the `rangeIn` class.\n // We make this selection based on the element's index and the rangeStart index\n\n let lambda: (_, index) => boolean;\n\n if (innerDate.isBefore(rangeStart)) {\n currentTarget.classList.add(Namespace.css.rangeStart);\n rangeStartElement?.classList.remove(Namespace.css.rangeStart);\n rangeStartElement?.classList.add(Namespace.css.rangeEnd);\n lambda = (_, index) => index > dayIndex && index < rangeStartIndex;\n } else {\n currentTarget.classList.add(Namespace.css.rangeEnd);\n rangeStartElement?.classList.remove(Namespace.css.rangeEnd);\n rangeStartElement?.classList.add(Namespace.css.rangeStart);\n lambda = (_, index) => index < dayIndex && index > rangeStartIndex;\n }\n\n allDays.filter(lambda).forEach((e) => {\n e.classList.add(Namespace.css.rangeIn);\n });\n };\n\n const rangeHoverOutEvent = (e: MouseEvent) => {\n // find all the dates in the container\n const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];\n\n // if only the start is selected, remove all the rangeIn classes\n // we do this because once the user hovers over a new date the range will be recalculated.\n if (this.dates.picked.length === 1)\n allDays.forEach((e) => e.classList.remove(Namespace.css.rangeIn));\n\n // if we have 0 or 2 dates selected then ignore\n if (this.dates.picked.length !== 1) return;\n\n const currentTarget = e?.currentTarget as HTMLElement;\n\n // get the elements date from the attribute value\n const innerDate = new DateTime(currentTarget.getAttribute('data-value'));\n\n // verify selections and remove invalid classes\n if (!innerDate.isSame(this.dates.picked[0], Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeStart);\n }\n\n if (!innerDate.isSame(this.dates.picked[1], Unit.date)) {\n currentTarget.classList.remove(Namespace.css.rangeEnd);\n }\n };\n\n return { rangeHoverEvent, rangeHoverOutEvent };\n }\n\n private _updateCalendarView(container: Element) {\n if (this.optionsStore.currentView !== 'calendar') return;\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this.optionsStore.viewDate.format(\n this.optionsStore.options.localization.dayViewHeaderFormat\n )\n );\n this.optionsStore.options.display.components.month\n ? switcher.classList.remove(Namespace.css.disabled)\n : switcher.classList.add(Namespace.css.disabled);\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n /***\n * Generates a html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n const innerDate = this.optionsStore.viewDate.clone\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n let weekDay = innerDate.format({ weekday: 'short' });\n if (this.optionsStore.options.localization.maxWeekdayLength > 0)\n weekDay = weekDay.substring(\n 0,\n this.optionsStore.options.localization.maxWeekdayLength\n );\n htmlDivElement.innerText = weekDay;\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n\n private _handleCalendarWeeks(container: HTMLElement, innerDate: DateTime) {\n [...container.querySelectorAll(`.${Namespace.css.calendarWeeks}`)]\n .filter((e: HTMLElement) => e.innerText !== '#')\n .forEach((element: HTMLElement) => {\n element.innerText = `${innerDate.week}`;\n innerDate.manipulate(7, Unit.date);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n\n if (this.optionsStore.currentView === 'months') {\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this.optionsStore.viewDate.format({ year: 'numeric' })\n );\n\n this.optionsStore.options.display.components.year\n ? switcher.classList.remove(Namespace.css.disabled)\n : switcher.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n const classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.month, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Dates from '../../dates';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _startYear: DateTime;\n private _endYear: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n this._startYear = this.optionsStore.viewDate.clone.manipulate(\n -1,\n Unit.year\n );\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\n\n const container = widget.getElementsByClassName(\n Namespace.css.yearsContainer\n )[0];\n\n if (this.optionsStore.currentView === 'years') {\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.yearsContainer,\n `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({\n year: 'numeric',\n })}`\n );\n\n this.optionsStore.options.display.components.decades\n ? switcher.classList.remove(Namespace.css.disabled)\n : switcher.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n const innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.year);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.year, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = innerDate.format({ year: 'numeric' });\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this.optionsStore.viewDate.year\n );\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = widget.getElementsByClassName(\n Namespace.css.decadesContainer\n )[0];\n\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n if (this.optionsStore.currentView === 'decades') {\n switcher.setAttribute(\n Namespace.css.decadesContainer,\n `${this._startDecade.format({\n year: 'numeric',\n })}-${this._endDecade.format({ year: 'numeric' })}`\n );\n\n this.validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n }\n\n const pickedYears = this.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.css.disabled);\n containerClone.classList.add(Namespace.css.disabled);\n containerClone.setAttribute('data-value', '');\n return;\n } else {\n containerClone.innerText = this._startDecade.clone\n .manipulate(-10, Unit.year)\n .format({ year: 'numeric' });\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year}`\n );\n return;\n }\n }\n\n const classes = [];\n classes.push(Namespace.css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this.optionsStore.unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.css.active);\n }\n\n paint('decade', this._startDecade, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${this._startDecade.year}`);\n containerClone.innerText = `${this._startDecade.format({\n year: 'numeric',\n })}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _gridColumns = '';\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid(iconTag));\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(widget: HTMLElement): void {\n const timesDiv = (\n widget.getElementsByClassName(Namespace.css.clockContainer)[0]\n );\n let lastPicked = this.dates.lastPicked?.clone;\n if (!lastPicked && this.optionsStore.options.useCurrent)\n lastPicked = this.optionsStore.viewDate.clone;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this.optionsStore.options.display.components.hours) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = lastPicked\n ? lastPicked.getHoursFormatted(\n this.optionsStore.options.localization.hourCycle\n )\n : '--';\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked ? lastPicked.minutesFormatted : '--';\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked ? lastPicked.secondsFormatted : '--';\n }\n\n if (this.optionsStore.isTwelveHour) {\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.toggleMeridiem}]`\n );\n\n const meridiemDate = (lastPicked || this.optionsStore.viewDate).clone;\n\n toggle.innerText = meridiemDate.meridiem();\n\n if (\n !this.validation.isValid(\n meridiemDate.manipulate(\n meridiemDate.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\n this._gridColumns = '';\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = iconTag(this.optionsStore.options.display.icons.up),\n downIcon = iconTag(this.optionsStore.options.display.icons.down);\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this.optionsStore.options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n this._gridColumns += 'a';\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this.optionsStore.isTwelveHour) {\n this._gridColumns += ' a';\n let divElement = getSeparator();\n top.push(divElement);\n\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.setAttribute(\n 'title',\n this.optionsStore.options.localization.toggleMeridiem\n );\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\n button.setAttribute('tabindex', '-1');\n if (Namespace.css.toggleMeridiem.includes(',')) {\n //todo move this to paint function?\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\n } else button.classList.add(Namespace.css.toggleMeridiem);\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n this._gridColumns = this._gridColumns.trim();\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (let i = 0; i < (this.optionsStore.isTwelveHour ? 12 : 24); i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this.validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.hours, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = innerDate.getHoursFormatted(\n this.optionsStore.options.localization.hourCycle\n );\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n const step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\n const step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.minutes, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.minutes}`);\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\nimport { OptionsStore } from '../../utilities/optionsStore';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement) => {\n const classes = [];\n classes.push(Namespace.css.second);\n\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.seconds, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import Namespace from '../utilities/namespace';\n\n/**\n * Provides a collapse functionality to the view changes\n */\nexport default class Collapse {\n /**\n * Flips the show/hide state of `target`\n * @param target html element to affect.\n */\n static toggle(target: HTMLElement) {\n if (target.classList.contains(Namespace.css.show)) {\n this.hide(target);\n } else {\n this.show(target);\n }\n }\n\n /**\n * Skips any animation or timeouts and immediately set the element to show.\n * @param target\n */\n static showImmediately(target: HTMLElement) {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\n target.style.height = '';\n }\n\n /**\n * If `target` is not already showing, then show after the animation.\n * @param target\n */\n static show(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n Collapse.showImmediately(target);\n timeOut = null;\n };\n\n target.style.height = '0';\n target.classList.remove(Namespace.css.collapse);\n target.classList.add(Namespace.css.collapsing);\n\n //eslint-disable-next-line @typescript-eslint/no-unused-vars\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n target.style.height = `${target.scrollHeight}px`;\n }\n\n /**\n * Skips any animation or timeouts and immediately set the element to hide.\n * @param target\n */\n static hideImmediately(target: HTMLElement) {\n if (!target) return;\n target.classList.remove(Namespace.css.collapsing, Namespace.css.show);\n target.classList.add(Namespace.css.collapse);\n }\n\n /**\n * If `target` is not already hidden, then hide after the animation.\n * @param target HTML Element\n */\n static hide(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n !target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n Collapse.hideImmediately(target);\n timeOut = null;\n };\n\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\n\n const reflow = (element) => element.offsetHeight;\n\n reflow(target);\n\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\n target.classList.add(Namespace.css.collapsing);\n target.style.height = '';\n\n //eslint-disable-next-line @typescript-eslint/no-unused-vars\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n }\n\n /**\n * Gets the transition duration from the `element` by getting css properties\n * `transition-duration` and `transition-delay`\n * @param element HTML Element\n */\n private static getTransitionDurationFromElement = (element: HTMLElement) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } =\n window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) +\n Number.parseFloat(transitionDelay)) *\n 1000\n );\n };\n}\n","import DateDisplay from './calendar/date-display';\nimport MonthDisplay from './calendar/month-display';\nimport YearDisplay from './calendar/year-display';\nimport DecadeDisplay from './calendar/decade-display';\nimport TimeDisplay from './time/time-display';\nimport HourDisplay from './time/hour-display';\nimport MinuteDisplay from './time/minute-display';\nimport SecondDisplay from './time/second-display';\nimport { DateTime, Unit } from '../datetime';\nimport Namespace from '../utilities/namespace';\nimport { HideEvent } from '../utilities/event-types';\nimport Collapse from './collapse';\nimport Validation from '../validation';\nimport Dates from '../dates';\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\nimport { serviceLocator } from '../utilities/service-locator';\nimport ActionTypes from '../utilities/action-types';\nimport CalendarModes from '../utilities/calendar-modes';\nimport { OptionsStore } from '../utilities/optionsStore';\n\n/**\n * Main class for all things display related.\n */\nexport default class Display {\n private _widget: HTMLElement;\n private _popperInstance: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n private _isVisible = false;\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n\n dateDisplay: DateDisplay;\n monthDisplay: MonthDisplay;\n yearDisplay: YearDisplay;\n decadeDisplay: DecadeDisplay;\n timeDisplay: TimeDisplay;\n hourDisplay: HourDisplay;\n minuteDisplay: MinuteDisplay;\n secondDisplay: SecondDisplay;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n this.dates = serviceLocator.locate(Dates);\n\n this.dateDisplay = serviceLocator.locate(DateDisplay);\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\n this.yearDisplay = serviceLocator.locate(YearDisplay);\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\n this.hourDisplay = serviceLocator.locate(HourDisplay);\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n this._widget = undefined;\n\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\n this._update(result);\n });\n }\n\n /**\n * Returns the widget body or undefined\n * @private\n */\n get widget(): HTMLElement | undefined {\n return this._widget;\n }\n\n get dateContainer(): HTMLElement | undefined {\n return this.widget?.querySelector(`div.${Namespace.css.dateContainer}`);\n }\n\n get timeContainer(): HTMLElement | undefined {\n return this.widget?.querySelector(`div.${Namespace.css.timeContainer}`);\n }\n\n /**\n * Returns this visible state of the picker (shown)\n */\n get isVisible() {\n return this._isVisible;\n }\n\n /**\n * Updates the table for a particular unit. Used when an option as changed or\n * whenever the class list might need to be refreshed.\n * @param unit\n * @private\n */\n _update(unit: ViewUpdateValues): void {\n if (!this.widget) return;\n switch (unit) {\n case Unit.seconds:\n this.secondDisplay._update(this.widget, this.paint);\n break;\n case Unit.minutes:\n this.minuteDisplay._update(this.widget, this.paint);\n break;\n case Unit.hours:\n this.hourDisplay._update(this.widget, this.paint);\n break;\n case Unit.date:\n this.dateDisplay._update(this.widget, this.paint);\n break;\n case Unit.month:\n this.monthDisplay._update(this.widget, this.paint);\n break;\n case Unit.year:\n this.yearDisplay._update(this.widget, this.paint);\n break;\n case 'decade':\n this.decadeDisplay._update(this.widget, this.paint);\n break;\n case 'clock':\n if (!this._hasTime) break;\n this.timeDisplay._update(this.widget);\n this._update(Unit.hours);\n this._update(Unit.minutes);\n this._update(Unit.seconds);\n break;\n case 'calendar':\n this._update(Unit.date);\n this._update(Unit.year);\n this._update(Unit.month);\n this.decadeDisplay._update(this.widget, this.paint);\n this._updateCalendarHeader();\n break;\n case 'all':\n if (this._hasTime) {\n this._update('clock');\n }\n if (this._hasDate) {\n this._update('calendar');\n }\n }\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * Allows developers to add/remove classes from an element.\n * @param _unit\n * @param _date\n * @param _classes\n * @param _element\n */\n\n /* eslint-disable @typescript-eslint/no-unused-vars */\n paint(\n _unit: Unit | 'decade',\n _date: DateTime,\n _classes: string[],\n _element: HTMLElement\n ) {\n // implemented in plugin\n }\n\n /**\n * Shows the picker and creates a Popper instance if needed.\n * Add document click event to hide when clicking outside the picker.\n * fires Events#show\n */\n show(): void {\n if (this.widget == undefined) {\n this._showSetDefaultIfNeeded();\n\n this._buildWidget();\n this._updateTheme();\n\n this._showSetupViewMode();\n\n if (!this.optionsStore.options.display.inline) {\n // If needed to change the parent container\n const container = this.optionsStore.options?.container || document.body;\n const placement =\n this.optionsStore.options?.display?.placement || 'bottom';\n\n container.appendChild(this.widget);\n this.createPopup(this.optionsStore.element, this.widget, {\n modifiers: [{ name: 'eventListeners', enabled: true }],\n //#2400\n placement:\n document.documentElement.dir === 'rtl'\n ? `${placement}-end`\n : `${placement}-start`,\n }).then();\n } else {\n this.optionsStore.element.appendChild(this.widget);\n }\n\n if (this.optionsStore.options.display.viewMode == 'clock') {\n this._eventEmitters.action.emit({\n e: null,\n action: ActionTypes.showClock,\n });\n }\n\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.addEventListener('click', this._actionsClickEvent)\n );\n\n // show the clock when using sideBySide\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\n this.timeDisplay._update(this.widget);\n (\n this.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0] as HTMLElement\n ).style.display = 'grid';\n }\n }\n\n this.widget.classList.add(Namespace.css.show);\n if (!this.optionsStore.options.display.inline) {\n this.updatePopup();\n document.addEventListener('click', this._documentClickEvent);\n }\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\n this._isVisible = true;\n }\n\n private _showSetupViewMode() {\n // If modeView is only clock\n const onlyClock = this._hasTime && !this._hasDate;\n\n // reset the view to the clock if there's no date components\n if (onlyClock) {\n this.optionsStore.currentView = 'clock';\n this._eventEmitters.action.emit({\n e: null,\n action: ActionTypes.showClock,\n });\n }\n // otherwise return to the calendar view\n else if (!this.optionsStore.currentCalendarViewMode) {\n this.optionsStore.currentCalendarViewMode =\n this.optionsStore.minimumCalendarViewMode;\n }\n\n if (!onlyClock && this.optionsStore.options.display.viewMode !== 'clock') {\n if (this._hasTime) {\n if (!this.optionsStore.options.display.sideBySide) {\n Collapse.hideImmediately(this.timeContainer);\n } else {\n Collapse.show(this.timeContainer);\n }\n }\n Collapse.show(this.dateContainer);\n }\n\n if (this._hasDate) {\n this._showMode();\n }\n }\n\n private _showSetDefaultIfNeeded() {\n if (this.dates.picked.length != 0) return;\n\n if (\n this.optionsStore.options.useCurrent &&\n !this.optionsStore.options.defaultDate\n ) {\n const date = new DateTime().setLocalization(\n this.optionsStore.options.localization\n );\n if (!this.optionsStore.options.keepInvalid) {\n let tries = 0;\n let direction = 1;\n if (this.optionsStore.options.restrictions.maxDate?.isBefore(date)) {\n direction = -1;\n }\n while (!this.validation.isValid(date) && tries > 31) {\n date.manipulate(direction, Unit.date);\n tries++;\n }\n }\n this.dates.setValue(date);\n }\n\n if (this.optionsStore.options.defaultDate) {\n this.dates.setValue(this.optionsStore.options.defaultDate);\n }\n }\n\n async createPopup(\n element: HTMLElement,\n widget: HTMLElement,\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n options: any\n ): Promise {\n let createPopperFunction;\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any)?.Popper) {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n createPopperFunction = (window as any)?.Popper?.createPopper;\n } else {\n const { createPopper } = await import('@popperjs/core');\n createPopperFunction = createPopper;\n }\n if (createPopperFunction) {\n this._popperInstance = createPopperFunction(element, widget, options);\n }\n }\n\n updatePopup(): void {\n this._popperInstance?.update();\n }\n\n /**\n * Changes the calendar view mode. E.g. month <-> year\n * @param direction -/+ number to move currentViewMode\n * @private\n */\n _showMode(direction?: number): void {\n if (!this.widget) {\n return;\n }\n if (direction) {\n const max = Math.max(\n this.optionsStore.minimumCalendarViewMode,\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\n );\n if (this.optionsStore.currentCalendarViewMode == max) return;\n this.optionsStore.currentCalendarViewMode = max;\n }\n\n this.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\n )\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\n\n const datePickerMode =\n CalendarModes[this.optionsStore.currentCalendarViewMode];\n const picker: HTMLElement = this.widget.querySelector(\n `.${datePickerMode.className}`\n );\n\n switch (datePickerMode.className) {\n case Namespace.css.decadesContainer:\n this.decadeDisplay._update(this.widget, this.paint);\n break;\n case Namespace.css.yearsContainer:\n this.yearDisplay._update(this.widget, this.paint);\n break;\n case Namespace.css.monthsContainer:\n this.monthDisplay._update(this.widget, this.paint);\n break;\n case Namespace.css.daysContainer:\n this.dateDisplay._update(this.widget, this.paint);\n break;\n }\n\n picker.style.display = 'grid';\n\n if (this.optionsStore.options.display.sideBySide)\n ((\n this.widget.querySelectorAll(`.${Namespace.css.clockContainer}`)[0]\n )).style.display = 'grid';\n\n this._updateCalendarHeader();\n this._eventEmitters.viewUpdate.emit();\n }\n\n /**\n * Changes the theme. E.g. light, dark or auto\n * @param theme the theme name\n * @private\n */\n _updateTheme(theme?: 'light' | 'dark' | 'auto'): void {\n if (!this.widget) {\n return;\n }\n if (theme) {\n if (this.optionsStore.options.display.theme === theme) return;\n this.optionsStore.options.display.theme = theme;\n }\n\n this.widget.classList.remove('light', 'dark');\n this.widget.classList.add(this._getThemeClass());\n\n if (this.optionsStore.options.display.theme === 'auto') {\n window\n .matchMedia(Namespace.css.isDarkPreferredQuery)\n .addEventListener('change', () => this._updateTheme());\n } else {\n window\n .matchMedia(Namespace.css.isDarkPreferredQuery)\n .removeEventListener('change', () => this._updateTheme());\n }\n }\n\n _getThemeClass(): string {\n const currentTheme = this.optionsStore.options.display.theme || 'auto';\n\n const isDarkMode =\n window.matchMedia &&\n window.matchMedia(Namespace.css.isDarkPreferredQuery).matches;\n\n switch (currentTheme) {\n case 'light':\n return Namespace.css.lightTheme;\n case 'dark':\n return Namespace.css.darkTheme;\n case 'auto':\n return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme;\n }\n }\n\n _updateCalendarHeader() {\n if (!this._hasDate) return;\n const showing = [\n ...this.widget.querySelector(\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\n ).classList,\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\n\n const [previous, switcher, next] = this.widget\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switch (showing) {\n case Namespace.css.decadesContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousCentury\n );\n switcher.setAttribute('title', '');\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextCentury\n );\n break;\n case Namespace.css.yearsContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousDecade\n );\n switcher.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectDecade\n );\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextDecade\n );\n break;\n case Namespace.css.monthsContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousYear\n );\n switcher.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectYear\n );\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextYear\n );\n break;\n case Namespace.css.daysContainer:\n previous.setAttribute(\n 'title',\n this.optionsStore.options.localization.previousMonth\n );\n switcher.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectMonth\n );\n next.setAttribute(\n 'title',\n this.optionsStore.options.localization.nextMonth\n );\n switcher.setAttribute(\n showing,\n this.optionsStore.viewDate.format(\n this.optionsStore.options.localization.dayViewHeaderFormat\n )\n );\n break;\n }\n switcher.innerText = switcher.getAttribute(showing);\n }\n\n /**\n * Hides the picker if needed.\n * Remove document click event to hide when clicking outside the picker.\n * fires Events#hide\n */\n hide(): void {\n if (!this.widget || !this._isVisible) return;\n\n this.widget.classList.remove(Namespace.css.show);\n\n if (this._isVisible) {\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.hide,\n date: this.optionsStore.unset ? null : this.dates.lastPicked?.clone,\n } as HideEvent);\n this._isVisible = false;\n }\n\n document.removeEventListener('click', this._documentClickEvent);\n }\n\n /**\n * Toggles the picker's open state. Fires a show/hide event depending.\n */\n toggle() {\n return this._isVisible ? this.hide() : this.show();\n }\n\n /**\n * Removes document and data-action click listener and reset the widget\n * @private\n */\n _dispose() {\n document.removeEventListener('click', this._documentClickEvent);\n if (!this.widget) return;\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.removeEventListener('click', this._actionsClickEvent)\n );\n this.widget.parentNode.removeChild(this.widget);\n this._widget = undefined;\n }\n\n /**\n * Builds the widgets html template.\n * @private\n */\n private _buildWidget(): HTMLElement {\n const template = document.createElement('div');\n template.classList.add(Namespace.css.widget);\n\n const dateView = document.createElement('div');\n dateView.classList.add(Namespace.css.dateContainer);\n dateView.append(\n this.getHeadTemplate(),\n this.decadeDisplay.getPicker(),\n this.yearDisplay.getPicker(),\n this.monthDisplay.getPicker(),\n this.dateDisplay.getPicker()\n );\n\n const timeView = document.createElement('div');\n timeView.classList.add(Namespace.css.timeContainer);\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\n timeView.appendChild(this.hourDisplay.getPicker());\n timeView.appendChild(this.minuteDisplay.getPicker());\n timeView.appendChild(this.secondDisplay.getPicker());\n\n const toolbar = document.createElement('div');\n toolbar.classList.add(Namespace.css.toolbar);\n toolbar.append(...this.getToolbarElements());\n\n if (this.optionsStore.options.display.inline) {\n template.classList.add(Namespace.css.inline);\n }\n\n if (this.optionsStore.options.display.calendarWeeks) {\n template.classList.add('calendarWeeks');\n }\n\n if (this.optionsStore.options.display.sideBySide && this._hasDateAndTime) {\n this._buildWidgetSideBySide(template, dateView, timeView, toolbar);\n return;\n }\n\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n\n const setupComponentView = (hasFirst, hasSecond, element, shouldShow) => {\n if (!hasFirst) return;\n if (hasSecond) {\n element.classList.add(Namespace.css.collapse);\n if (shouldShow) element.classList.add(Namespace.css.show);\n }\n template.appendChild(element);\n };\n\n setupComponentView(\n this._hasDate,\n this._hasTime,\n dateView,\n this.optionsStore.options.display.viewMode !== 'clock'\n );\n\n setupComponentView(\n this._hasTime,\n this._hasDate,\n timeView,\n this.optionsStore.options.display.viewMode === 'clock'\n );\n\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n\n const arrow = document.createElement('div');\n arrow.classList.add('arrow');\n arrow.setAttribute('data-popper-arrow', '');\n template.appendChild(arrow);\n\n this._widget = template;\n }\n\n private _buildWidgetSideBySide(\n template: HTMLDivElement,\n dateView: HTMLDivElement,\n timeView: HTMLDivElement,\n toolbar: HTMLDivElement\n ) {\n template.classList.add(Namespace.css.sideBySide);\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n const row = document.createElement('div');\n row.classList.add('td-row');\n dateView.classList.add('td-half');\n timeView.classList.add('td-half');\n\n row.appendChild(dateView);\n row.appendChild(timeView);\n template.appendChild(row);\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n this._widget = template;\n }\n\n /**\n * Returns true if the hours, minutes, or seconds component is turned on\n */\n get _hasTime(): boolean {\n return (\n this.optionsStore.options.display.components.clock &&\n (this.optionsStore.options.display.components.hours ||\n this.optionsStore.options.display.components.minutes ||\n this.optionsStore.options.display.components.seconds)\n );\n }\n\n /**\n * Returns true if the year, month, or date component is turned on\n */\n get _hasDate(): boolean {\n return (\n this.optionsStore.options.display.components.calendar &&\n (this.optionsStore.options.display.components.year ||\n this.optionsStore.options.display.components.month ||\n this.optionsStore.options.display.components.date)\n );\n }\n\n get _hasDateAndTime(): boolean {\n return this._hasDate && this._hasTime;\n }\n\n /**\n * Get the toolbar html based on options like buttons => today\n * @private\n */\n getToolbarElements(): HTMLElement[] {\n const toolbar = [];\n\n if (this.optionsStore.options.display.buttons.today) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.today);\n div.setAttribute('title', this.optionsStore.options.localization.today);\n\n div.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.today)\n );\n toolbar.push(div);\n }\n if (\n !this.optionsStore.options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n let title, icon;\n if (this.optionsStore.options.display.viewMode === 'clock') {\n title = this.optionsStore.options.localization.selectDate;\n icon = this.optionsStore.options.display.icons.date;\n } else {\n title = this.optionsStore.options.localization.selectTime;\n icon = this.optionsStore.options.display.icons.time;\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.togglePicker);\n div.setAttribute('title', title);\n\n div.appendChild(this._iconTag(icon));\n toolbar.push(div);\n }\n if (this.optionsStore.options.display.buttons.clear) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.clear);\n div.setAttribute('title', this.optionsStore.options.localization.clear);\n\n div.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.clear)\n );\n toolbar.push(div);\n }\n if (this.optionsStore.options.display.buttons.close) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.close);\n div.setAttribute('title', this.optionsStore.options.localization.close);\n\n div.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.close)\n );\n toolbar.push(div);\n }\n\n return toolbar;\n }\n\n /***\n * Builds the base header template with next and previous icons\n * @private\n */\n getHeadTemplate(): HTMLElement {\n const calendarHeader = document.createElement('div');\n calendarHeader.classList.add(Namespace.css.calendarHeader);\n\n const previous = document.createElement('div');\n previous.classList.add(Namespace.css.previous);\n previous.setAttribute('data-action', ActionTypes.previous);\n previous.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.previous)\n );\n\n const switcher = document.createElement('div');\n switcher.classList.add(Namespace.css.switch);\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\n\n const next = document.createElement('div');\n next.classList.add(Namespace.css.next);\n next.setAttribute('data-action', ActionTypes.next);\n next.appendChild(\n this._iconTag(this.optionsStore.options.display.icons.next)\n );\n\n calendarHeader.append(previous, switcher, next);\n return calendarHeader;\n }\n\n /**\n * Builds an icon tag as either an ``\n * or with icons => type is `sprites` then a svg tag instead\n * @param iconClass\n * @private\n */\n _iconTag(iconClass: string): HTMLElement | SVGElement {\n if (this.optionsStore.options.display.icons.type === 'sprites') {\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n const icon = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'use'\n );\n icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility\n icon.setAttribute('href', iconClass);\n svg.appendChild(icon);\n\n return svg;\n }\n const icon = document.createElement('i');\n icon.classList.add(...iconClass.split(' '));\n return icon;\n }\n\n /**\n * A document click event to hide the widget if click is outside\n * @private\n * @param e MouseEvent\n */\n private _documentClickEvent = (e: MouseEvent) => {\n if (this.optionsStore.options.debug || (window as any).debug) return; //eslint-disable-line @typescript-eslint/no-explicit-any\n\n if (\n this._isVisible &&\n !e.composedPath().includes(this.widget) && // click inside the widget\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\n ) {\n this.hide();\n }\n };\n\n /**\n * Click event for any action like selecting a date\n * @param e MouseEvent\n * @private\n */\n private _actionsClickEvent = (e: MouseEvent) => {\n this._eventEmitters.action.emit({ e: e });\n };\n\n /**\n * Causes the widget to get rebuilt on next show. If the picker is already open\n * then hide and reshow it.\n * @private\n */\n _rebuild() {\n const wasVisible = this._isVisible;\n this._dispose();\n if (wasVisible) this.show();\n }\n\n refreshCurrentView() {\n //if the widget is not showing, just destroy it\n if (!this._isVisible) this._dispose();\n\n switch (this.optionsStore.currentView) {\n case 'clock':\n this._update('clock');\n break;\n case 'calendar':\n this._update(Unit.date);\n break;\n case 'months':\n this._update(Unit.month);\n break;\n case 'years':\n this._update(Unit.year);\n break;\n case 'decades':\n this._update('decade');\n break;\n }\n }\n}\n\nexport type Paint = (\n unit: Unit | 'decade',\n innerDate: DateTime,\n classes: string[],\n element: HTMLElement\n) => void;\n","import { DateTime, Unit } from './datetime';\nimport Collapse from './display/collapse';\nimport Namespace from './utilities/namespace';\nimport Dates from './dates';\nimport Validation from './validation';\nimport Display from './display';\nimport { EventEmitters } from './utilities/event-emitter';\nimport { serviceLocator } from './utilities/service-locator.js';\nimport ActionTypes from './utilities/action-types';\nimport CalendarModes from './utilities/calendar-modes';\nimport { OptionsStore } from './utilities/optionsStore';\n\n/**\n * Logic for various click actions\n */\nexport default class Actions {\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n private display: Display;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n this.display = serviceLocator.locate(Display);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n\n this._eventEmitters.action.subscribe((result) => {\n this.do(result.e, result.action);\n });\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n do(e: any, action?: ActionTypes) {\n const currentTarget = e?.currentTarget as HTMLElement;\n if (currentTarget?.classList?.contains(Namespace.css.disabled)) return;\n action = action || (currentTarget?.dataset?.action as ActionTypes);\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\n .clone;\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n this.handleNextPrevious(action);\n break;\n case ActionTypes.changeCalendarView:\n this.display._showMode(1);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n this.handleSelectCalendarMode(action, currentTarget);\n break;\n case ActionTypes.selectDay:\n this.handleSelectDay(currentTarget);\n break;\n case ActionTypes.selectHour: {\n let hour = +currentTarget.dataset.value;\n if (lastPicked.hours >= 12 && this.optionsStore.isTwelveHour)\n hour += 12;\n lastPicked.hours = hour;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n }\n case ActionTypes.selectMinute: {\n lastPicked.minutes = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n }\n case ActionTypes.selectSecond: {\n lastPicked.seconds = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n }\n case ActionTypes.incrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping\n );\n break;\n case ActionTypes.incrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping * -1\n );\n break;\n case ActionTypes.decrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\n break;\n case ActionTypes.toggleMeridiem:\n this.manipulateAndSet(\n lastPicked,\n Unit.hours,\n this.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n this.handleToggle(currentTarget);\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n //make sure the clock is actually displaying\n if (\n !this.optionsStore.options.display.sideBySide &&\n this.optionsStore.currentView !== 'clock'\n ) {\n //hide calendar\n Collapse.hideImmediately(this.display.dateContainer);\n //show clock\n Collapse.showImmediately(this.display.timeContainer);\n }\n this.handleShowClockContainers(action);\n break;\n case ActionTypes.clear:\n this.dates.setValue(null);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this.display.hide();\n break;\n case ActionTypes.today: {\n const today = new DateTime().setLocalization(\n this.optionsStore.options.localization\n );\n this._eventEmitters.updateViewDate.emit(today);\n\n //todo this this really a good idea?\n if (this.validation.isValid(today, Unit.date))\n this.dates.setValue(today, this.dates.lastPickedIndex);\n break;\n }\n }\n }\n\n private handleShowClockContainers(action: ActionTypes) {\n if (!this.display._hasTime) {\n Namespace.errorMessages.throwError(\n 'Cannot show clock containers when time is disabled.'\n );\n /* ignore coverage: should never happen */\n return;\n }\n\n this.optionsStore.currentView = 'clock';\n this.display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this.display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this.display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this.display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this.display._update(Unit.seconds);\n break;\n }\n\n ((\n this.display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n }\n\n private handleNextPrevious(action: ActionTypes) {\n const { unit, step } =\n CalendarModes[this.optionsStore.currentCalendarViewMode];\n if (action === ActionTypes.next)\n this.optionsStore.viewDate.manipulate(step, unit);\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\n this._eventEmitters.viewUpdate.emit();\n\n this.display._showMode();\n }\n\n /**\n * After setting the value it will either show the clock or hide the widget.\n * @param e\n */\n private hideOrClock(e) {\n if (\n !this.optionsStore.isTwelveHour &&\n !this.optionsStore.options.display.components.minutes &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline\n ) {\n this.display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n }\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * @param lastPicked\n * @param unit\n * @param value Value to change by\n */\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\n const newDate = lastPicked.manipulate(value, unit);\n if (this.validation.isValid(newDate, unit)) {\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\n }\n }\n\n private handleSelectCalendarMode(\n action:\n | ActionTypes.selectMonth\n | ActionTypes.selectYear\n | ActionTypes.selectDecade,\n currentTarget: HTMLElement\n ) {\n const value = +currentTarget.dataset.value;\n switch (action) {\n case ActionTypes.selectMonth:\n this.optionsStore.viewDate.month = value;\n break;\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n this.optionsStore.viewDate.year = value;\n break;\n }\n\n if (\n this.optionsStore.currentCalendarViewMode ===\n this.optionsStore.minimumCalendarViewMode\n ) {\n this.dates.setValue(\n this.optionsStore.viewDate,\n this.dates.lastPickedIndex\n );\n\n if (!this.optionsStore.options.display.inline) {\n this.display.hide();\n }\n } else {\n this.display._showMode(-1);\n }\n }\n\n private handleToggle(currentTarget: HTMLElement) {\n if (\n currentTarget.getAttribute('title') ===\n this.optionsStore.options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectTime\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.time\n ).outerHTML;\n\n this.display._updateCalendarHeader();\n this.optionsStore.refreshCurrentView();\n } else {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectDate\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.date\n ).outerHTML;\n if (this.display._hasTime) {\n this.handleShowClockContainers(ActionTypes.showClock);\n this.display._update('clock');\n }\n }\n\n this.display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\n this._eventEmitters.viewUpdate.emit();\n }\n\n private handleSelectDay(currentTarget: HTMLElement) {\n const day = this.optionsStore.viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.dataset.day;\n if (this.optionsStore.options.dateRange) this.handleDateRange(day);\n else if (this.optionsStore.options.multipleDates) {\n this.handleMultiDate(day);\n } else {\n this.dates.setValue(day, this.dates.lastPickedIndex);\n }\n\n if (\n !this.display._hasTime &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline &&\n !this.optionsStore.options.multipleDates &&\n !this.optionsStore.options.dateRange\n ) {\n this.display.hide();\n }\n }\n\n private handleMultiDate(day: DateTime) {\n let index = this.dates.pickedIndex(day, Unit.date);\n console.log(index);\n if (index !== -1) {\n this.dates.setValue(null, index); //deselect multi-date\n } else {\n index = this.dates.lastPickedIndex + 1;\n if (this.dates.picked.length === 0) index = 0;\n\n this.dates.setValue(day, index);\n }\n }\n\n private handleDateRange(day: DateTime) {\n switch (this.dates.picked.length) {\n case 2: {\n this.dates.clear();\n break;\n }\n case 1: {\n const other = this.dates.picked[0];\n if (day.getTime() === other.getTime()) {\n this.dates.clear();\n break;\n }\n if (day.isBefore(other)) {\n this.dates.setValue(day, 0);\n this.dates.setValue(other, 1);\n return;\n } else {\n this.dates.setValue(day, 1);\n return;\n }\n }\n }\n\n this.dates.setValue(day, 0);\n }\n}\n","import Display from './display/index';\nimport Dates from './dates';\nimport Actions from './actions';\nimport {\n DateTime,\n DateTimeFormatOptions,\n guessHourCycle,\n Unit,\n} from './datetime';\nimport Namespace from './utilities/namespace';\nimport Options from './utilities/options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n} from './utilities/event-types';\nimport { EventEmitters } from './utilities/event-emitter';\nimport {\n serviceLocator,\n setupServiceLocator,\n} from './utilities/service-locator';\nimport CalendarModes from './utilities/calendar-modes';\nimport DefaultOptions, {\n DefaultEnLocalization,\n} from './utilities/default-options';\nimport ActionTypes from './utilities/action-types';\nimport { OptionsStore } from './utilities/optionsStore';\nimport { OptionConverter } from './utilities/optionConverter';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n _subscribers: { [key: string]: ((event: any) => Record)[] } =\n {};\n private _isDisabled = false;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: NodeJS.Timeout;\n private actions: Actions;\n private optionsStore: OptionsStore;\n private _eventEmitters: EventEmitters;\n display: Display;\n dates: Dates;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n setupServiceLocator();\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.display = serviceLocator.locate(Display);\n this.dates = serviceLocator.locate(Dates);\n this.actions = serviceLocator.locate(Actions);\n\n if (!element) {\n Namespace.errorMessages.mustProvideElement();\n }\n\n this.optionsStore.element = element;\n this._initializeOptions(options, DefaultOptions, true);\n this.optionsStore.viewDate.setLocalization(\n this.optionsStore.options.localization\n );\n this.optionsStore.unset = true;\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this.optionsStore.options.display.inline) this.display.show();\n\n this._eventEmitters.triggerEvent.subscribe((e) => {\n this._triggerEvent(e);\n });\n\n this._eventEmitters.viewUpdate.subscribe(() => {\n this._viewUpdate();\n });\n\n this._eventEmitters.updateViewDate.subscribe((dateTime) => {\n this.viewDate = dateTime;\n });\n }\n\n get viewDate() {\n return this.optionsStore.viewDate;\n }\n\n set viewDate(value) {\n this.optionsStore.viewDate = value;\n this.optionsStore.viewDate.setLocalization(\n this.optionsStore.options.localization\n );\n this.display._update(\n this.optionsStore.currentView === 'clock' ? 'clock' : 'calendar'\n );\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._initializeOptions(options, DefaultOptions);\n else this._initializeOptions(options, this.optionsStore.options);\n\n this.optionsStore.viewDate.setLocalization(\n this.optionsStore.options.localization\n );\n this.display.refreshCurrentView();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this.display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this.display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this.display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\n this.display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this.optionsStore.input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.optionsStore.input.value = '';\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => void | ((event: any) => void)[] //eslint-disable-line @typescript-eslint/no-explicit-any\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray: any[]; //eslint-disable-line @typescript-eslint/no-explicit-any\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.errorMessages.subscribeMismatch();\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this.display.hide();\n // this will clear the document click event listener\n this.display._dispose();\n this._eventEmitters.destroy();\n this.optionsStore.input?.removeEventListener(\n 'change',\n this._inputChangeEvent\n );\n if (this.optionsStore.options.allowInputToggle) {\n this.optionsStore.input?.removeEventListener(\n 'click',\n this._openClickEvent\n );\n this.optionsStore.input?.removeEventListener(\n 'focus',\n this._openClickEvent\n );\n }\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Updates the options to use the provided language.\n * THe language file must be loaded first.\n * @param language\n */\n locale(language: string) {\n const asked = loadedLocales[language];\n if (!asked) return;\n this.updateOptions({\n localization: asked,\n });\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n private _triggerEvent(event: BaseEvent) {\n event.viewMode = this.optionsStore.currentView;\n\n const isChangeEvent = event.type === Namespace.events.change;\n if (isChangeEvent) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate)\n ) {\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n\n this.optionsStore.input?.dispatchEvent(\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n new CustomEvent('change', { detail: event as any })\n );\n }\n\n this.optionsStore.element.dispatchEvent(\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n new CustomEvent(event.type, { detail: event as any })\n );\n\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any).jQuery) {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n const $ = (window as any).jQuery;\n\n if (isChangeEvent && this.optionsStore.input) {\n $(this.optionsStore.input).trigger(event);\n } else {\n $(this.optionsStore.element).trigger(event);\n }\n }\n\n this._publish(event);\n }\n\n private _publish(event: BaseEvent) {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @private\n */\n private _viewUpdate() {\n this._triggerEvent({\n type: Namespace.events.update,\n viewDate: this.optionsStore.viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): void {\n let newConfig = OptionConverter.deepCopy(config);\n newConfig = OptionConverter._mergeOptions(newConfig, mergeTo);\n if (includeDataset)\n newConfig = OptionConverter._dataToOptions(\n this.optionsStore.element,\n newConfig\n );\n\n OptionConverter._validateConflicts(newConfig);\n\n newConfig.viewDate = newConfig.viewDate.setLocalization(\n newConfig.localization\n );\n\n if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) {\n this.optionsStore.viewDate = newConfig.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (newConfig.display.components.year) {\n this.optionsStore.minimumCalendarViewMode = 2;\n }\n if (newConfig.display.components.month) {\n this.optionsStore.minimumCalendarViewMode = 1;\n }\n if (newConfig.display.components.date) {\n this.optionsStore.minimumCalendarViewMode = 0;\n }\n\n this.optionsStore.currentCalendarViewMode = Math.max(\n this.optionsStore.minimumCalendarViewMode,\n this.optionsStore.currentCalendarViewMode\n );\n\n // Update view mode if needed\n if (\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\n newConfig.display.viewMode\n ) {\n this.optionsStore.currentCalendarViewMode = Math.max(\n CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode),\n this.optionsStore.minimumCalendarViewMode\n );\n }\n\n if (this.display?.isVisible) {\n this.display._update('all');\n }\n\n if (\n newConfig.display.components.useTwentyfourHour &&\n newConfig.localization.hourCycle === undefined\n )\n newConfig.localization.hourCycle = 'h24';\n else if (newConfig.localization.hourCycle === undefined) {\n newConfig.localization.hourCycle = guessHourCycle(\n newConfig.localization.locale\n );\n }\n\n this.optionsStore.options = newConfig;\n\n if (\n newConfig.restrictions.maxDate &&\n this.viewDate.isAfter(newConfig.restrictions.maxDate)\n )\n this.viewDate = newConfig.restrictions.maxDate;\n\n if (\n newConfig.restrictions.minDate &&\n this.viewDate.isBefore(newConfig.restrictions.minDate)\n )\n this.viewDate = newConfig.restrictions.minDate;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this.optionsStore.element.tagName == 'INPUT') {\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\n } else {\n const query = this.optionsStore.element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this.optionsStore.input =\n this.optionsStore.element.querySelector('input');\n } else {\n this.optionsStore.input =\n this.optionsStore.element.querySelector(query);\n }\n }\n\n if (!this.optionsStore.input) return;\n\n if (!this.optionsStore.input.value && this.optionsStore.options.defaultDate)\n this.optionsStore.input.value = this.dates.formatInput(\n this.optionsStore.options.defaultDate\n );\n\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\n if (this.optionsStore.options.allowInputToggle) {\n this.optionsStore.input.addEventListener('click', this._openClickEvent);\n this.optionsStore.input.addEventListener('focus', this._openClickEvent);\n }\n\n if (this.optionsStore.input.value) {\n this._inputChangeEvent();\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this.optionsStore.options.display.inline) return;\n let query = this.optionsStore.element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined\n ? this.optionsStore.element\n : this.optionsStore.element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this.optionsStore.options.promptTimeOnDateChange ||\n this.optionsStore.options.multipleDates ||\n this.optionsStore.options.display.inline ||\n this.optionsStore.options.display.sideBySide ||\n // time is disabled\n !this.display._hasTime ||\n // clock component is already showing\n this.display.widget\n ?.getElementsByClassName(Namespace.css.show)[0]\n .classList.contains(Namespace.css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this.display.widget) {\n this._eventEmitters.action.emit({\n e: {\n currentTarget: this.display.widget.querySelector(\n '[data-action=\"togglePicker\"]'\n ),\n },\n action: ActionTypes.togglePicker,\n });\n }\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _inputChangeEvent = (event?: any) => {\n const internallyTriggered = event?.detail;\n if (internallyTriggered) return;\n\n const setViewDate = () => {\n if (this.dates.lastPicked)\n this.optionsStore.viewDate = this.dates.lastPicked.clone;\n };\n\n const value = this.optionsStore.input.value;\n if (\n this.optionsStore.options.multipleDates ||\n this.optionsStore.options.dateRange\n ) {\n try {\n const valueSplit = value.split(\n this.optionsStore.options.multipleDatesSeparator\n );\n for (let i = 0; i < valueSplit.length; i++) {\n this.dates.setFromInput(valueSplit[i], i);\n }\n setViewDate();\n } catch {\n console.warn(\n 'TD: Something went wrong trying to set the multipleDates values from the input field.'\n );\n }\n } else {\n this.dates.setFromInput(value, 0);\n setViewDate();\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n if (\n (this.optionsStore.element as HTMLInputElement)?.disabled ||\n this.optionsStore.input?.disabled ||\n //if we just have the input and allow input toggle is enabled, then don't cause a toggle\n (this._toggle.nodeName === 'INPUT' &&\n (this._toggle as HTMLInputElement)?.type === 'text' &&\n this.optionsStore.options.allowInputToggle)\n )\n return;\n this.toggle();\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _openClickEvent = () => {\n if (\n (this.optionsStore.element as HTMLInputElement)?.disabled ||\n this.optionsStore.input?.disabled\n )\n return;\n if (!this.display.isVisible) this.show();\n };\n}\n\n/**\n * Whenever a locale is loaded via a plugin then store it here based on the\n * locale name. E.g. loadedLocales['ru']\n */\nconst loadedLocales = {};\n\n// noinspection JSUnusedGlobalSymbols\n/**\n * Called from a locale plugin.\n * @param l locale object for localization options\n */\nconst loadLocale = (l) => {\n if (loadedLocales[l.name]) return;\n loadedLocales[l.name] = l.localization;\n};\n\n/**\n * A sets the global localization options to the provided locale name.\n * `loadLocale` MUST be called first.\n * @param l\n */\nconst locale = (l: string) => {\n const asked = loadedLocales[l];\n if (!asked) return;\n DefaultOptions.localization = asked;\n};\n\n// noinspection JSUnusedGlobalSymbols\n/**\n * Called from a plugin to extend or override picker defaults.\n * @param plugin\n * @param option\n */\nconst extend = function (plugin, option = undefined) {\n if (!plugin) return tempusDominus;\n if (!plugin.installed) {\n // install plugin only once\n plugin(\n option,\n { TempusDominus, Dates, Display, DateTime, Namespace },\n tempusDominus\n );\n plugin.installed = true;\n }\n return tempusDominus;\n};\n\nconst version = '6.7.19';\n\nconst tempusDominus = {\n TempusDominus,\n extend,\n loadLocale,\n locale,\n Namespace,\n DefaultOptions,\n DateTime,\n Unit,\n version,\n DefaultEnLocalization,\n};\n\nexport {\n TempusDominus,\n extend,\n loadLocale,\n locale,\n Namespace,\n DefaultOptions,\n DateTime,\n Unit,\n version,\n DateTimeFormatOptions,\n Options,\n DefaultEnLocalization,\n};\n"],"names":["Unit","DefaultFormatLocalization","ActionTypes","SecondDisplay"],"mappings":";;;;;;;;;;;EAAM,MAAO,OAAQ,SAAQ,KAAK,CAAA;EAEjC,CAAA;QAEY,aAAa,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AAI,CAAC;EACzB,KAAA;EACD,IAAA,OAAO,aAAa,CAAC;EACvB,EAAE;AAEI,QAAA,OAAO,GAAG,SAAS;EAEzB,MAAM,aAAa,GAAG;MACpB,aAAa;MACb,MAAM;MACN,UAAU;MACV,MAAM;MACN,SAAS;MACT,cAAc;MACd,QAAQ;YACRF,YAAI;MACJ,OAAO;MACP,qBAAqB;GACtB;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.min.js b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.min.js
new file mode 100644
index 0000000..92df3cc
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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";class e extends Error{}const s="tempus-dominus";class i{}i.NAME=s,i.dataKey="td",i.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}`}},i.css=new class{constructor(){this.widget=`${s}-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.rangeIn="range-in",this.rangeStart="range-start",this.rangeEnd="range-end",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)"}},i.errorMessages=new class{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(t){const s=new e(`${this.base} Unexpected option: ${t} does not match a known option.`);throw s.code=1,s}unexpectedOptions(t){const s=new e(`${this.base}: ${t.join(", ")}`);throw s.code=1,s}unexpectedOptionValue(t,s,i){const o=new e(`${this.base} Unexpected option value: ${t} does not accept a value of "${s}". Valid values are: ${i.join(", ")}`);throw o.code=2,o}typeMismatch(t,s,i){const o=new e(`${this.base} Mismatch types: ${t} has a type of ${s} instead of the required ${i}`);throw o.code=3,o}numbersOutOfRange(t,s,i){const o=new e(`${this.base} ${t} expected an array of number between ${s} and ${i}.`);throw o.code=4,o}failedToParseDate(t,s,i=!1){const o=new e(`${this.base} Could not correctly parse "${s}" to a date for ${t}.`);if(o.code=5,!i)throw o;console.warn(o)}mustProvideElement(){const t=new e(`${this.base} No element was provided.`);throw t.code=6,t}subscribeMismatch(){const t=new e(`${this.base} The subscribed events does not match the number of callbacks`);throw t.code=7,t}conflictingConfiguration(t){const s=new e(`${this.base} A configuration value conflicts with another rule. ${t}`);throw s.code=8,s}customDateFormatError(t){const s=new e(`${this.base} Custom Date Format: ${t}`);throw s.code=9,s}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.`)}deprecatedWarning(t,e){console.warn(`${this.base} Warning ${t} is deprecated and will be removed in a future version. ${e}`)}throwError(t){const s=new e(`${this.base} ${t}`);throw s.code=9,s}};var o,a={...{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"},format:"L LT",locale:"default",hourCycle:void 0,ordinal:t=>{const e=["th","st","nd","rd"],s=t%100;return`[${t}${e[(s-20)%10]||e[s]||e[0]}]`}}};t.Unit=void 0,(o=t.Unit||(t.Unit={})).seconds="seconds",o.minutes="minutes",o.hours="hours",o.date="date",o.month="month",o.year="year";const n={month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},r=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}},d=t=>{if(!t)return"h12";const e={hour:"2-digit",minute:"2-digit",numberingSystem:"latn"},s=(new l).setLocalization({locale:t});s.hours=0;const i=s.parts(void 0,e).hour;if("12"===i)return"h12";if("24"===i)return"h24";s.hours=23;const o=s.parts(void 0,e).hour;return"00"===i&&"11"===o?"h11":"00"===i&&"23"===o?"h23":void console.warn(`couldn't determine hour cycle for ${t}. start: ${i}. end: ${o}`)};class l extends Date{constructor(){super(...arguments),this.localization=a,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],this.dateTimeRegex=/(\[[^[\]]*])|y{1,4}|M{1,4}|d{1,4}|H{1,2}|h{1,2}|t|T|m{1,2}|s{1,2}|f{3}/g,this.formattingTokens=/(\[[^[\]]*])|([-_:/.,()\s]+)|(T|t|yyyy|yy?|MM?M?M?|Do|dd?|hh?|HH?|mm?|ss?)/g,this.match2=/\d\d/,this.match3=/\d{3}/,this.match4=/\d{4}/,this.match1to2=/\d\d?/,this.matchSigned=/[+-]?\d+/,this.matchOffset=/[+-]\d\d:?(\d\d)?|Z/,this.matchWord=/[^\d_:/,\-()\s]+/,this.zoneExpressions=[this.matchOffset,(t,e)=>{t.offset=this.offsetFromString(e)}],this.expressions={t:{pattern:void 0,parser:(t,e)=>{t.afternoon=this.meridiemMatch(e)}},T:{pattern:void 0,parser:(t,e)=>{t.afternoon=this.meridiemMatch(e)}},fff:{pattern:this.match3,parser:(t,e)=>{t.milliseconds=+e}},s:{pattern:this.match1to2,parser:this.addInput("seconds")},ss:{pattern:this.match1to2,parser:this.addInput("seconds")},m:{pattern:this.match1to2,parser:this.addInput("minutes")},mm:{pattern:this.match1to2,parser:this.addInput("minutes")},H:{pattern:this.match1to2,parser:this.addInput("hours")},h:{pattern:this.match1to2,parser:this.addInput("hours")},HH:{pattern:this.match1to2,parser:this.addInput("hours")},hh:{pattern:this.match1to2,parser:this.addInput("hours")},d:{pattern:this.match1to2,parser:this.addInput("day")},dd:{pattern:this.match2,parser:this.addInput("day")},Do:{pattern:this.matchWord,parser:(t,e)=>{if(t.day=+(e.match(/\d+/)[0]||1),this.localization.ordinal)for(let s=1;s<=31;s+=1)this.localization.ordinal(s).replace(/[[\]]/g,"")===e&&(t.day=s)}},M:{pattern:this.match1to2,parser:this.addInput("month")},MM:{pattern:this.match2,parser:this.addInput("month")},MMM:{pattern:this.matchWord,parser:(t,e)=>{const s=this.getAllMonths(),i=(this.getAllMonths("short")||s.map((t=>t.slice(0,3)))).indexOf(e)+1;if(i<1)throw new Error;t.month=i%12||i}},MMMM:{pattern:this.matchWord,parser:(t,e)=>{const s=this.getAllMonths().indexOf(e)+1;if(s<1)throw new Error;t.month=s%12||s}},y:{pattern:this.matchSigned,parser:this.addInput("year")},yy:{pattern:this.match2,parser:(t,e)=>{t.year=this.parseTwoDigitYear(+e)}},yyyy:{pattern:this.match4,parser:this.addInput("year")}}}setLocale(t){return this.localization||(this.localization=a,this.localization.locale=t),this}setLocalization(t){return this.localization=t,this}static convert(t,e="default",s=undefined){if(!t)throw new Error("A date is required");return s||((s=a).locale=e),new l(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocalization(s)}get clone(){return new l(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocalization(this.localization)}static isValid(t){return void 0!==t&&"null"!==JSON.stringify(t)&&t.constructor.name===l.name}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;const e=(this.weekDay-s+7)%7;this.manipulate(-1*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);const e=6+s;if(this.weekDay===e)break;this.manipulate(e-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.setMonth(11,31)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}isBefore(t,e){if(!l.isValid(t))return!1;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(!l.isValid(t))return!1;if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=l.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(!l.isValid(t)||!l.isValid(e))return!1;if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1],n=o?this.isAfter(t,s):!this.isBefore(t,s),r=a?this.isBefore(e,s):!this.isAfter(e,s);return n&&r}parts(t=this.localization.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,n).second}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.parts(void 0,n).minute}get hours(){return this.getHours()}set hours(t){this.setHours(t)}getHoursFormatted(t="h12"){return this.parts(void 0,{...n,hourCycle:t}).hour}meridiem(t=this.localization.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,n).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,n).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():s>this.weeksInWeekYear()&&(s=1),s}weeksInWeekYear(){const t=(this.year+Math.floor(this.year/4)-Math.floor(this.year/100)+Math.floor(this.year/400))%7,e=this.year-1,s=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4===t||3===s?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]}getAllMonths(t="long"){const e=new Intl.DateTimeFormat(this.localization.locale,{month:t}).format;return[...Array(12).keys()].map((t=>e(new Date(2021,t))))}replaceTokens(t,e){return t.replace(/(\[[^[\]]*])|(LTS?|l{1,4}|L{1,4})/g,((t,s,i)=>{const o=i&&i.toUpperCase();return s||e[o]||a.dateFormats[o]}))}parseTwoDigitYear(t){return t+(t>68?1900:2e3)}offsetFromString(t){if(!t)return 0;if("Z"===t)return 0;const[e,s,i]=t.match(/([+-]|\d\d)/g),o=60*+s+(+i||0);return 0===o?0:"+"===e?-o:o}zoneInformation(t,e){let s=t.parts(this.localization.locale,{timeZoneName:"longOffset"}).timeZoneName.replace("GMT","").replace(":","");const i=s.includes("-");return s=s.replace("-",""),"z"===e?s=s.substring(1,2):"zz"===e&&(s=s.substring(0,2)),`${i?"-":""}${s}`}addInput(t){return(e,s)=>{e[t]=+s}}getLocaleAfternoon(){return new Intl.DateTimeFormat(this.localization.locale,{hour:"numeric",hour12:!0}).formatToParts(new Date(2022,3,4,13)).find((t=>"dayPeriod"===t.type))?.value?.replace(/\s+/g," ")}meridiemMatch(t){return t.toLowerCase()===this.getLocaleAfternoon().toLowerCase()}correctHours(t){const{afternoon:e}=t;if(void 0!==e){const{hours:s}=t;e?s<12&&(t.hours+=12):12===s&&(t.hours=0),delete t.afternoon}}makeParser(t){const e=(t=this.replaceTokens(t,this.localization.dateFormats)).match(this.formattingTokens),{length:s}=e,i=[];for(let t=0;t{const e={hours:0,minutes:0,seconds:0,milliseconds:0};for(let o=0,a=0;o-1)return new l(("X"===e.format?1e3:1)*+t);t=t.replace(/\s+/g," ");const i=s.makeParser(e.format),{year:o,month:a,day:n,hours:r,minutes:d,seconds:c,milliseconds:h,zone:p}=i(t),u=n||(o||a?1:s.getDate()),m=o||s.getFullYear();let y=0;return o&&!a||(y=a>0?a-1:s.getMonth()),p?new l(Date.UTC(m,y,u,r,d,c,h+60*p.offset*1e3)):new l(m,y,u,r,d,c,h)}catch(s){i.errorMessages.customDateFormatError(`Unable to parse provided input: ${t}, format: ${e.format}`)}}format(t,e=this.localization.locale){if(t&&"object"==typeof t)return new Intl.DateTimeFormat(e,t).format(this);const s=this.replaceTokens(t||this.localization.format||`${a.dateFormats.L}, ${a.dateFormats.LT}`,this.localization.dateFormats),i=t=>new Intl.DateTimeFormat(this.localization.locale,t).format(this);this.localization.hourCycle||(this.localization.hourCycle=d(this.localization.locale));const o=this.localization.hourCycle.startsWith("h1")?"h24":this.localization.hourCycle,n=this.localization.hourCycle.startsWith("h2")?"h12":this.localization.hourCycle,r={y:this.year,yy:i({year:"2-digit"}),yyyy:this.year,M:i({month:"numeric"}),MM:this.monthFormatted,MMM:this.getAllMonths("short")[this.getMonth()],MMMM:this.getAllMonths()[this.getMonth()],d:this.date,dd:this.dateFormatted,ddd:i({weekday:"short"}),dddd:i({weekday:"long"}),H:this.getHours(),HH:this.getHoursFormatted(o),h:this.hours>12?this.hours-12:this.hours,hh:this.getHoursFormatted(n),t:this.meridiem(),T:this.meridiem().toUpperCase(),m:this.minutes,mm:this.minutesFormatted,s:this.seconds,ss:this.secondsFormatted,fff:this.getMilliseconds()};return s.replace(this.dateTimeRegex,((t,e)=>e||r[t])).replace(/\[/g,"").replace(/]/g,"")}}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:i.css.daysContainer,unit:t.Unit.month,step:1},{name:"months",className:i.css.monthsContainer,unit:t.Unit.year,step:1},{name:"years",className:i.css.yearsContainer,unit:t.Unit.year,step:10},{name:"decades",className:i.css.decadesContainer,unit:t.Unit.year,step:100}];class u{constructor(){this._currentCalendarViewMode=0,this._viewDate=new l,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=p[t].name}get viewDate(){return this._viewDate}set viewDate(t){this._viewDate=t,this.options&&(this.options.viewDate=t)}refreshCurrentView(){this.currentView=p[this.currentCalendarViewMode].name}get isTwelveHour(){return["h12","h11"].includes(this.options.localization.hourCycle)}}class m{constructor(){this.optionsStore=h.locate(u)}isValid(e,s){if(!this._enabledDisabledDatesIsValid(s,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._minMaxIsValid(s,e))return!1;if(s===t.Unit.hours||s===t.Unit.minutes||s===t.Unit.seconds){if(!this._enabledDisabledHoursIsValid(e))return!1;if(0!==this.optionsStore.options.restrictions.disabledTimeIntervals?.filter((t=>e.isBetween(t.from,t.to))).length)return!1}return!0}_enabledDisabledDatesIsValid(e,s){return e!==t.Unit.date||!(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(s))&&!(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(s))}_isInDisabledDates(e){return!(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)&&!!this.optionsStore.options.restrictions.disabledDates.find((s=>s.isSame(e,t.Unit.date)))}_isInEnabledDates(e){return!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length||!!this.optionsStore.options.restrictions.enabledDates.find((s=>s.isSame(e,t.Unit.date)))}_minMaxIsValid(t,e){return(!this.optionsStore.options.restrictions.minDate||!e.isBefore(this.optionsStore.options.restrictions.minDate,t))&&(!this.optionsStore.options.restrictions.maxDate||!e.isAfter(this.optionsStore.options.restrictions.maxDate,t))}_enabledDisabledHoursIsValid(t){return!(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(t))&&!(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(t))}_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.includes(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.includes(e)}dateRangeIsValid(e,s,i){if(!this.optionsStore.options.dateRange)return!0;if(2!==e.length&&1!==s)return!0;const o=e[0].clone;if(o.isSame(i,t.Unit.date))return!0;for(o.manipulate(1,t.Unit.date);!o.isSame(i,t.Unit.date);){if(!this.isValid(o,t.Unit.date))return!1;o.manipulate(1,t.Unit.date)}return!0}}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,this.updateViewDate=new y}destroy(){this.triggerEvent.destroy(),this.viewUpdate.destroy(),this.updateDisplay.destroy(),this.action.destroy(),this.updateViewDate.destroy()}}const v={clear:"Clear selection",close:"Close the picker",dateFormats:a.dateFormats,dayViewHeaderFormat:{month:"long",year:"2-digit"},decrementHour:"Decrement Hour",decrementMinute:"Decrement Minute",decrementSecond:"Decrement Second",format:a.format,hourCycle:a.hourCycle,incrementHour:"Increment Hour",incrementMinute:"Increment Minute",incrementSecond:"Increment Second",locale:a.locale,maxWeekdayLength:0,nextCentury:"Next Century",nextDecade:"Next Decade",nextMonth:"Next Month",nextYear:"Next Year",ordinal:a.ordinal,pickHour:"Pick Hour",pickMinute:"Pick Minute",pickSecond:"Pick Second",previousCentury:"Previous Century",previousDecade:"Previous Decade",previousMonth:"Previous Month",previousYear:"Previous Year",selectDate:"Select Date",selectDecade:"Select Decade",selectMonth:"Select Month",selectTime:"Select Time",selectYear:"Select Year",startOfTheWeek:0,today:"Go to today",toggleMeridiem:"Toggle Meridiem"},f={allowInputToggle:!1,container:void 0,dateRange:!1,debug:!1,defaultDate:void 0,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",placement:"bottom"},keepInvalid:!1,localization:v,meta:{},multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},stepping:1,useCurrent:!0,viewDate:new l},S={...v};function w(t,e){if(!t)return null;if(t.constructor.name===l.name)return t;if(t.constructor.name===Date.name)return l.convert(t);if("string"==typeof t){const s=l.fromString(t,e);return"null"===JSON.stringify(s)?null:s}return null}function b(t,e,s){"string"==typeof t&&"input"!==e&&i.errorMessages.dateString();const o=w(t,s);return o||i.errorMessages.failedToParseDate(e,t,"input"===e),o}function D(t,e,s,o=a){Array.isArray(e)||i.errorMessages.typeMismatch(t,s,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||i.errorMessages.typeMismatch(t,s,"array of numbers")}function k(t){return({value:e,providedType:s,localization:i})=>{const o=b(e,t,i);if(void 0!==o)return o.setLocalization(i),o}}function C(t){const e=k(t);return t=>void 0===t.value?t.value:e(t)}function M(t,e,s){return({value:o,providedType:a})=>void 0===o?[]:(_(t,o,a),o.some((t=>ts))&&i.errorMessages.numbersOutOfRange(t,e,s),o)}function E(t){return M(t,0,23)}function T(t){return({value:e,providedType:s,localization:i})=>void 0===e?[]:(D(t,e,s,i),e)}function L(t){return({value:e,path:s})=>(t.includes(e)||i.errorMessages.unexpectedOptionValue(s.substring(1),e,t),e)}const U=Object.freeze({defaultDate:k("defaultDate"),viewDate:k("viewDate"),minDate:C("restrictions.minDate"),maxDate:C("restrictions.maxDate"),disabledHours:E("restrictions.disabledHours"),enabledHours:E("restrictions.enabledHours"),disabledDates:T("restrictions.disabledDates"),enabledDates:T("restrictions.enabledDates"),daysOfWeekDisabled:M("restrictions.daysOfWeekDisabled",0,6),disabledTimeIntervals:({key:t,value:e,providedType:s,localization:o})=>{if(void 0===e)return[];Array.isArray(e)||i.errorMessages.typeMismatch(t,s,"array of { from: DateTime|Date, to: DateTime|Date }");const a=e;for(let e=0;e{const i=`${t}[${e}].${s}`,n=b(a[e][s],i,o);n.setLocalization(o),a[e][s]=n}));return a},toolbarPlacement:L(["top","bottom","default"]),type:L(["icons","sprites"]),viewMode:L(["clock","calendar","months","years","decades"]),theme:L(["light","dark","auto"]),placement:L(["top","bottom"]),meta:({value:t})=>t,dayViewHeaderFormat:({value:t})=>t,container:({value:t,path:e})=>(t&&!(t instanceof HTMLElement||t instanceof Element||t?.appendChild)&&i.errorMessages.typeMismatch(e.substring(1),typeof t,"HTMLElement"),t),useTwentyfourHour:({value:t,path:e,providedType:s,defaultType:o})=>{if(i.errorMessages.deprecatedWarning("useTwentyfourHour",'Please use "options.localization.hourCycle" instead'),void 0===t||"boolean"===s)return t;i.errorMessages.typeMismatch(e,s,o)},hourCycle:L(["h11","h12","h23","h24"])}),A=({value:t,defaultType:e,providedType:s,path:o})=>{switch(e){case"boolean":return"true"===t||!0===t;case"number":return+t;case"string":return t.toString();case"object":return{};case"function":return t;default:i.errorMessages.typeMismatch(o,s,e)}};class V{static deepCopy(t){const e={};return Object.keys(t).forEach((s=>{const i=t[s];i instanceof l?e[s]=i.clone:i instanceof Date?e[s]=new Date(i.valueOf()):(e[s]=i,"object"!=typeof i||i instanceof HTMLElement||i instanceof Element||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,o=""){const a=V.objectPath(o,f),n=Object.keys(t).filter((t=>!Object.keys(a).includes(t)));if(n.length>0){const t=V.getFlattenDefaultOptions(),e=n.map((e=>{let s=`"${o}.${e}" in not a known option.`;const i=t.find((t=>t.includes(e)));return i&&(s+=` Did you mean "${i}"?`),s}));i.errorMessages.unexpectedOptions(e)}Object.keys(t).filter((t=>"__proto__"!==t&&"constructor"!==t)).forEach((i=>{"."===(o+=`.${i}`).charAt(0)&&(o=o.slice(1));const n=a[i],r=typeof t[i],d=typeof n,l=t[i];if(null==l)return e[i]=l,void(o=o.substring(0,o.lastIndexOf(`.${i}`)));"object"!=typeof n||Array.isArray(t[i])||n instanceof Date||V.ignoreProperties.includes(i)?e[i]=V.processKey(i,l,r,d,o,s):V.spread(t[i],e[i],s,o),o=o.substring(0,o.lastIndexOf(`.${i}`))}))}static processKey(t,e,s,i,o,a){return(U[(n={key:t,value:e,providedType:s,defaultType:i,path:o,localization:a}).key]||A)(n);var n}static _mergeOptions(t,e){const s=V.deepCopy(e),i="default"!==e.localization?.locale?e.localization:t?.localization||f.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;const o={},a=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},n=this.normalizeObject(a),r=a(e);return Object.keys(s).filter((t=>t.startsWith(i.dataKey))).map((t=>t.substring(2))).forEach((t=>{let i=r[t.toLowerCase()];if(t.includes("_")){const a=t.split("_");i=r[a[0].toLowerCase()],void 0!==i&&e[i].constructor===Object&&(o[i]=n(a,1,e[i],s[`td${t}`]))}else void 0!==i&&(o[i]=s[`td${t}`])})),this._mergeOptions(o,e)}static normalizeObject(t){const e=(s,i,o,a)=>{const n=t(o)[s[i].toLowerCase()],r={};return void 0===n||(o[n].constructor===Object?(i++,r[n]=e(s,i,o[n],a)):r[n]=a),r};return e}static _dateTypeCheck(t,e){return w(t,e)}static _typeCheckDateArray(t,e,s,i){return D(t,e,s,i)}static _typeCheckNumberArray(t,e,s){return _(t,e,s)}static dateConversion(t,e,s){return b(t,e,s)}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(f),this._flattenDefaults}static _validateConflicts(t){!t.display.sideBySide||t.display.components.clock&&(t.display.components.hours||t.display.components.minutes||t.display.components.seconds)||i.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)&&i.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&i.errorMessages.conflictingConfiguration("maxDate is before minDate")),t.multipleDates&&t.dateRange&&i.errorMessages.conflictingConfiguration('Cannot uss option "multipleDates" with "dateRange"')}}V.ignoreProperties=["meta","dayViewHeaderFormat","container","dateForms","ordinal"],V.isValue=t=>null!=t;class ${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]?.clone}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){return t?(t.localization=this.optionsStore.options.localization,t.format()):""}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.setLocalization(this.optionsStore.options.localization),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!l.isValid(t))return!1;if(!e)return void 0!==this._dates.find((e=>e.isSame(t)));const s=r(e),i=t.format(s);return void 0!==this._dates.map((t=>t.format(s))).find((t=>t===i))}pickedIndex(t,e){if(!l.isValid(t))return-1;if(!e)return this._dates.map((t=>t.valueOf())).indexOf(t.valueOf());const s=r(e),i=t.format(s);return this._dates.map((t=>t.format(s))).indexOf(i)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:i.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[],this.optionsStore.input&&(this.optionsStore.input.value=""),this._eventEmitters.updateDisplay.emit("all")}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}updateInput(t){if(!this.optionsStore.input)return;let e=this.formatInput(t);(this.optionsStore.options.multipleDates||this.optionsStore.options.dateRange)&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)}setValue(e,s){const o=void 0===s,a=!e&&o;let n=this.optionsStore.unset?null:this._dates[s]?.clone;if(!n&&!this.optionsStore.unset&&o&&a&&(n=this.lastPicked),e&&n?.isSame(e))return void this.updateInput(e);if(!e)return void this._setValueNull(a,s,n);s=s||0,e=e.clone,1!==this.optionsStore.options.stepping&&(e.minutes=Math.round(e.minutes/this.optionsStore.options.stepping)*this.optionsStore.options.stepping,e.startOf(t.Unit.minutes));const r=t=>{this._dates[s]=e,this._eventEmitters.updateViewDate.emit(e.clone),this.updateInput(e),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),this._eventEmitters.triggerEvent.emit({type:i.events.change,date:e,oldDate:n,isClear:a,isValid:t})};this.validation.isValid(e)&&this.validation.dateRangeIsValid(this.picked,s,e)?r(!0):(this.optionsStore.options.keepInvalid&&r(!1),this._eventEmitters.triggerEvent.emit({type:i.events.error,reason:i.errorMessages.failedToSetInvalidDate,date:e,oldDate:n}))}_setValueNull(t,e,s){!this.optionsStore.options.multipleDates||1===this._dates.length||t?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),this.updateInput(),this._eventEmitters.triggerEvent.emit({type:i.events.change,date:void 0,oldDate:s,isClear:t,isValid:!0}),this._eventEmitters.updateDisplay.emit("all")}}var z;!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"}(z||(z={}));var O=z;class H{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate($),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");if(t.classList.add(i.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(i.css.calendarWeeks,i.css.noHighlight),t.appendChild(e)}const{rangeHoverEvent:e,rangeHoverOutEvent:s}=this.handleMouseEvents(t);for(let o=0;o<42;o++){if(0!==o&&o%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(i.css.calendarWeeks,i.css.noHighlight),t.appendChild(e)}const a=document.createElement("div");a.setAttribute("data-action",O.selectDay),t.appendChild(a),matchMedia("(hover: hover)").matches&&this.optionsStore.options.dateRange&&(a.addEventListener("mouseover",e),a.addEventListener("mouseout",s))}return t}_update(e,s){const o=e.getElementsByClassName(i.css.daysContainer)[0];this._updateCalendarView(o);const a=this.optionsStore.viewDate.clone.startOf(t.Unit.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,t.Unit.hours);this._handleCalendarWeeks(o,a.clone),o.querySelectorAll(`[data-action="${O.selectDay}"]`).forEach((e=>{const o=[];o.push(i.css.day),a.isBefore(this.optionsStore.viewDate,t.Unit.month)&&o.push(i.css.old),a.isAfter(this.optionsStore.viewDate,t.Unit.month)&&o.push(i.css.new),this.optionsStore.unset||this.optionsStore.options.dateRange||!this.dates.isPicked(a,t.Unit.date)||o.push(i.css.active),this.validation.isValid(a,t.Unit.date)||o.push(i.css.disabled),a.isSame(new l,t.Unit.date)&&o.push(i.css.today),0!==a.weekDay&&6!==a.weekDay||o.push(i.css.weekend),this._handleDateRange(a,o),s(t.Unit.date,a,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",this._dateToDataValue(a)),e.setAttribute("data-day",`${a.date}`),e.innerText=a.parts(void 0,{day:"numeric"}).day,a.manipulate(1,t.Unit.date)}))}_dateToDataValue(t){return l.isValid(t)?`${t.year}-${t.monthFormatted}-${t.dateFormatted}`:""}_handleDateRange(e,s){const o=this.dates.picked[0],a=this.dates.picked[1];this.optionsStore.options.dateRange&&(e.isBetween(o,a,t.Unit.date)&&s.push(i.css.rangeIn),e.isSame(o,t.Unit.date)&&s.push(i.css.rangeStart),e.isSame(a,t.Unit.date)&&s.push(i.css.rangeEnd))}handleMouseEvents(e){return{rangeHoverEvent:s=>{const o=s?.currentTarget;if(1!==this.dates.picked.length||o.classList.contains(i.css.disabled))return;const a=[...e.querySelectorAll(".day")],n=o.getAttribute("data-value"),r=l.fromString(n,{format:"yyyy-MM-dd"}),d=a.findIndex((t=>t.getAttribute("data-value")===n)),c=this.dates.picked[0],h=this.dates.picked[1],p=this._dateToDataValue(c),u=a.findIndex((t=>t.getAttribute("data-value")===p)),m=a[u];let y;r.isSame(c,t.Unit.date)||o.classList.remove(i.css.rangeStart),r.isSame(h,t.Unit.date)||o.classList.remove(i.css.rangeEnd),r.isBefore(c)?(o.classList.add(i.css.rangeStart),m?.classList.remove(i.css.rangeStart),m?.classList.add(i.css.rangeEnd),y=(t,e)=>e>d&&eeu),a.filter(y).forEach((t=>{t.classList.add(i.css.rangeIn)}))},rangeHoverOutEvent:s=>{const o=[...e.querySelectorAll(".day")];if(1===this.dates.picked.length&&o.forEach((t=>t.classList.remove(i.css.rangeIn))),1!==this.dates.picked.length)return;const a=s?.currentTarget,n=new l(a.getAttribute("data-value"));n.isSame(this.dates.picked[0],t.Unit.date)||a.classList.remove(i.css.rangeStart),n.isSame(this.dates.picked[1],t.Unit.date)||a.classList.remove(i.css.rangeEnd)}}}_updateCalendarView(e){if("calendar"!==this.optionsStore.currentView)return;const[s,o,a]=e.parentElement.getElementsByClassName(i.css.calendarHeader)[0].getElementsByTagName("div");o.setAttribute(i.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.optionsStore.options.display.components.month?o.classList.remove(i.css.disabled):o.classList.add(i.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.month),t.Unit.month)?s.classList.remove(i.css.disabled):s.classList.add(i.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.month),t.Unit.month)?a.classList.remove(i.css.disabled):a.classList.add(i.css.disabled)}_daysOfTheWeek(){const e=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(t.Unit.date),s=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(i.css.calendarWeeks,i.css.noHighlight),t.innerText="#",s.push(t)}for(let o=0;o<7;o++){const o=document.createElement("div");o.classList.add(i.css.dayOfTheWeek,i.css.noHighlight);let a=e.format({weekday:"short"});this.optionsStore.options.localization.maxWeekdayLength>0&&(a=a.substring(0,this.optionsStore.options.localization.maxWeekdayLength)),o.innerText=a,e.manipulate(1,t.Unit.date),s.push(o)}return s}_handleCalendarWeeks(e,s){[...e.querySelectorAll(`.${i.css.calendarWeeks}`)].filter((t=>"#"!==t.innerText)).forEach((e=>{e.innerText=`${s.week}`,s.manipulate(7,t.Unit.date)}))}}class x{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate($),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(i.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",O.selectMonth),t.appendChild(e)}return t}_update(e,s){const o=e.getElementsByClassName(i.css.monthsContainer)[0];if("months"===this.optionsStore.currentView){const[e,s,a]=o.parentElement.getElementsByClassName(i.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(i.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.optionsStore.options.display.components.year?s.classList.remove(i.css.disabled):s.classList.add(i.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.year),t.Unit.year)?e.classList.remove(i.css.disabled):e.classList.add(i.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.year),t.Unit.year)?a.classList.remove(i.css.disabled):a.classList.add(i.css.disabled)}const a=this.optionsStore.viewDate.clone.startOf(t.Unit.year);o.querySelectorAll(`[data-action="${O.selectMonth}"]`).forEach(((e,o)=>{const n=[];n.push(i.css.month),!this.optionsStore.unset&&this.dates.isPicked(a,t.Unit.month)&&n.push(i.css.active),this.validation.isValid(a,t.Unit.month)||n.push(i.css.disabled),s(t.Unit.month,a,n,e),e.classList.remove(...e.classList),e.classList.add(...n),e.setAttribute("data-value",`${o}`),e.innerText=`${a.format({month:"short"})}`,a.manipulate(1,t.Unit.month)}))}}class I{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate($),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(i.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",O.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 o=e.getElementsByClassName(i.css.yearsContainer)[0];if("years"===this.optionsStore.currentView){const[e,s,a]=o.parentElement.getElementsByClassName(i.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(i.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.optionsStore.options.display.components.decades?s.classList.remove(i.css.disabled):s.classList.add(i.css.disabled),this.validation.isValid(this._startYear,t.Unit.year)?e.classList.remove(i.css.disabled):e.classList.add(i.css.disabled),this.validation.isValid(this._endYear,t.Unit.year)?a.classList.remove(i.css.disabled):a.classList.add(i.css.disabled)}const a=this.optionsStore.viewDate.clone.startOf(t.Unit.year).manipulate(-1,t.Unit.year);o.querySelectorAll(`[data-action="${O.selectYear}"]`).forEach((e=>{const o=[];o.push(i.css.year),!this.optionsStore.unset&&this.dates.isPicked(a,t.Unit.year)&&o.push(i.css.active),this.validation.isValid(a,t.Unit.year)||o.push(i.css.disabled),s(t.Unit.year,a,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${a.year}`),e.innerText=a.format({year:"numeric"}),a.manipulate(1,t.Unit.year)}))}}class P{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate($),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(i.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",O.selectDecade),t.appendChild(e)}return t}_update(e,s){const[o,a]=$.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._startDecade.year=o,this._endDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._endDecade.year=a;const n=e.getElementsByClassName(i.css.decadesContainer)[0],[r,d,l]=n.parentElement.getElementsByClassName(i.css.calendarHeader)[0].getElementsByTagName("div");"decades"===this.optionsStore.currentView&&(d.setAttribute(i.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,t.Unit.year)?r.classList.remove(i.css.disabled):r.classList.add(i.css.disabled),this.validation.isValid(this._endDecade,t.Unit.year)?l.classList.remove(i.css.disabled):l.classList.add(i.css.disabled));const c=this.dates.picked.map((t=>t.year));n.querySelectorAll(`[data-action="${O.selectDecade}"]`).forEach(((e,o)=>{if(0===o)return e.classList.add(i.css.old),this._startDecade.year-10<0?(e.textContent=" ",r.classList.add(i.css.disabled),e.classList.add(i.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}`));const a=[];a.push(i.css.decade);const n=this._startDecade.year,d=this._startDecade.year+9;!this.optionsStore.unset&&c.filter((t=>t>=n&&t<=d)).length>0&&a.push(i.css.active),s("decade",this._startDecade,a,e),e.classList.remove(...e.classList),e.classList.add(...a),e.setAttribute("data-value",`${this._startDecade.year}`),e.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,t.Unit.year)}))}}class N{constructor(){this._gridColumns="",this.optionsStore=h.locate(u),this.dates=h.locate($),this.validation=h.locate(m)}getPicker(t){const e=document.createElement("div");return e.classList.add(i.css.clockContainer),e.append(...this._grid(t)),e}_update(e){const s=e.getElementsByClassName(i.css.clockContainer)[0];let o=this.dates.lastPicked?.clone;if(!o&&this.optionsStore.options.useCurrent&&(o=this.optionsStore.viewDate.clone),s.querySelectorAll(".disabled").forEach((t=>t.classList.remove(i.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=${O.incrementHours}]`).classList.add(i.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.hours),t.Unit.hours)||s.querySelector(`[data-action=${O.decrementHours}]`).classList.add(i.css.disabled),s.querySelector(`[data-time-component=${t.Unit.hours}]`).innerText=o?o.getHoursFormatted(this.optionsStore.options.localization.hourCycle):"--"),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=${O.incrementMinutes}]`).classList.add(i.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.minutes),t.Unit.minutes)||s.querySelector(`[data-action=${O.decrementMinutes}]`).classList.add(i.css.disabled),s.querySelector(`[data-time-component=${t.Unit.minutes}]`).innerText=o?o.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=${O.incrementSeconds}]`).classList.add(i.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.seconds),t.Unit.seconds)||s.querySelector(`[data-action=${O.decrementSeconds}]`).classList.add(i.css.disabled),s.querySelector(`[data-time-component=${t.Unit.seconds}]`).innerText=o?o.secondsFormatted:"--"),this.optionsStore.isTwelveHour){const e=s.querySelector(`[data-action=${O.toggleMeridiem}]`),a=(o||this.optionsStore.viewDate).clone;e.innerText=a.meridiem(),this.validation.isValid(a.manipulate(a.hours>=12?-12:12,t.Unit.hours))?e.classList.remove(i.css.disabled):e.classList.add(i.css.disabled)}s.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(e){this._gridColumns="";const s=[],o=[],a=[],n=document.createElement("div"),r=e(this.optionsStore.options.display.icons.up),d=e(this.optionsStore.options.display.icons.down);n.classList.add(i.css.separator,i.css.noHighlight);const l=n.cloneNode(!0);l.innerHTML=":";const c=(t=!1)=>t?l.cloneNode(!0):n.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",O.incrementHours),e.appendChild(r.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickHour),e.setAttribute("data-action",O.showHours),e.setAttribute("data-time-component",t.Unit.hours),o.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementHour),e.setAttribute("data-action",O.decrementHours),e.appendChild(d.cloneNode(!0)),a.push(e),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(s.push(c()),o.push(c(!0)),a.push(c()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementMinute),e.setAttribute("data-action",O.incrementMinutes),e.appendChild(r.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickMinute),e.setAttribute("data-action",O.showMinutes),e.setAttribute("data-time-component",t.Unit.minutes),o.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementMinute),e.setAttribute("data-action",O.decrementMinutes),e.appendChild(d.cloneNode(!0)),a.push(e)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(s.push(c()),o.push(c(!0)),a.push(c()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementSecond),e.setAttribute("data-action",O.incrementSeconds),e.appendChild(r.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickSecond),e.setAttribute("data-action",O.showSeconds),e.setAttribute("data-time-component",t.Unit.seconds),o.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementSecond),e.setAttribute("data-action",O.decrementSeconds),e.appendChild(d.cloneNode(!0)),a.push(e)}if(this.optionsStore.isTwelveHour){this._gridColumns+=" a";let t=c();s.push(t);const e=document.createElement("button");e.setAttribute("type","button"),e.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),e.setAttribute("data-action",O.toggleMeridiem),e.setAttribute("tabindex","-1"),i.css.toggleMeridiem.includes(",")?e.classList.add(...i.css.toggleMeridiem.split(",")):e.classList.add(i.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(i.css.noHighlight),t.appendChild(e),o.push(t),t=c(),a.push(t)}return this._gridColumns=this._gridColumns.trim(),[...s,...o,...a]}}class F{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(i.css.hourContainer);for(let e=0;e<(this.optionsStore.isTwelveHour?12:24);e++){const e=document.createElement("div");e.setAttribute("data-action",O.selectHour),t.appendChild(e)}return t}_update(e,s){const o=e.getElementsByClassName(i.css.hourContainer)[0],a=this.optionsStore.viewDate.clone.startOf(t.Unit.date);o.querySelectorAll(`[data-action="${O.selectHour}"]`).forEach((e=>{const o=[];o.push(i.css.hour),this.validation.isValid(a,t.Unit.hours)||o.push(i.css.disabled),s(t.Unit.hours,a,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${a.hours}`),e.innerText=a.getHoursFormatted(this.optionsStore.options.localization.hourCycle),a.manipulate(1,t.Unit.hours)}))}}class B{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(i.css.minuteContainer);const 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",O.selectMinute),t.appendChild(e)}return t}_update(e,s){const o=e.getElementsByClassName(i.css.minuteContainer)[0],a=this.optionsStore.viewDate.clone.startOf(t.Unit.hours),n=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;o.querySelectorAll(`[data-action="${O.selectMinute}"]`).forEach((e=>{const o=[];o.push(i.css.minute),this.validation.isValid(a,t.Unit.minutes)||o.push(i.css.disabled),s(t.Unit.minutes,a,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${a.minutes}`),e.innerText=a.minutesFormatted,a.manipulate(n,t.Unit.minutes)}))}}class W{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(i.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",O.selectSecond),t.appendChild(e)}return t}_update(e,s){const o=e.getElementsByClassName(i.css.secondContainer)[0],a=this.optionsStore.viewDate.clone.startOf(t.Unit.minutes);o.querySelectorAll(`[data-action="${O.selectSecond}"]`).forEach((e=>{const o=[];o.push(i.css.second),this.validation.isValid(a,t.Unit.seconds)||o.push(i.css.disabled),s(t.Unit.seconds,a,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${a.seconds}`),e.innerText=a.secondsFormatted,a.manipulate(5,t.Unit.seconds)}))}}class q{static toggle(t){t.classList.contains(i.css.show)?this.hide(t):this.show(t)}static showImmediately(t){t.classList.remove(i.css.collapsing),t.classList.add(i.css.collapse,i.css.show),t.style.height=""}static show(t){if(t.classList.contains(i.css.collapsing)||t.classList.contains(i.css.show))return;t.style.height="0",t.classList.remove(i.css.collapse),t.classList.add(i.css.collapsing),setTimeout((()=>{q.showImmediately(t)}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hideImmediately(t){t&&(t.classList.remove(i.css.collapsing,i.css.show),t.classList.add(i.css.collapse))}static hide(t){if(t.classList.contains(i.css.collapsing)||!t.classList.contains(i.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(i.css.collapse,i.css.show),t.classList.add(i.css.collapsing),t.style.height="",setTimeout((()=>{q.hideImmediately(t)}),this.getTransitionDurationFromElement(t))}}q.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 Y{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($),this.dateDisplay=h.locate(H),this.monthDisplay=h.locate(x),this.yearDisplay=h.locate(I),this.decadeDisplay=h.locate(P),this.timeDisplay=h.locate(N),this.hourDisplay=h.locate(F),this.minuteDisplay=h.locate(B),this.secondDisplay=h.locate(W),this._eventEmitters=h.locate(g),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get dateContainer(){return this.widget?.querySelector(`div.${i.css.dateContainer}`)}get timeContainer(){return this.widget?.querySelector(`div.${i.css.timeContainer}`)}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"decade":this.decadeDisplay._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(this._showSetDefaultIfNeeded(),this._buildWidget(),this._updateTheme(),this._showSetupViewMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{const t=this.optionsStore.options?.container||document.body,e=this.optionsStore.options?.display?.placement||"bottom";t.appendChild(this.widget),this.createPopup(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?`${e}-end`:`${e}-start`}).then()}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:O.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(i.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(i.css.show),this.optionsStore.options.display.inline||(this.updatePopup(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:i.events.show}),this._isVisible=!0}_showSetupViewMode(){const t=this._hasTime&&!this._hasDate;t?(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:O.showClock})):this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),t||"clock"===this.optionsStore.options.display.viewMode||(this._hasTime&&(this.optionsStore.options.display.sideBySide?q.show(this.timeContainer):q.hideImmediately(this.timeContainer)),q.show(this.dateContainer)),this._hasDate&&this._showMode()}_showSetDefaultIfNeeded(){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const e=(new l).setLocalization(this.optionsStore.options.localization);if(!this.optionsStore.options.keepInvalid){let s=0,i=1;for(this.optionsStore.options.restrictions.maxDate?.isBefore(e)&&(i=-1);!this.validation.isValid(e)&&s>31;)e.manipulate(i,t.Unit.date),s++}this.dates.setValue(e)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}}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(`.${i.css.dateContainer} > div:not(.${i.css.calendarHeader}), .${i.css.timeContainer} > div:not(.${i.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=p[this.optionsStore.currentCalendarViewMode],s=this.widget.querySelector(`.${e.className}`);switch(e.className){case i.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case i.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case i.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case i.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}s.style.display="grid",this.optionsStore.options.display.sideBySide&&(this.widget.querySelectorAll(`.${i.css.clockContainer}`)[0].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(i.css.isDarkPreferredQuery).addEventListener("change",(()=>this._updateTheme())):window.matchMedia(i.css.isDarkPreferredQuery).removeEventListener("change",(()=>this._updateTheme()))}}_getThemeClass(){const t=this.optionsStore.options.display.theme||"auto",e=window.matchMedia&&window.matchMedia(i.css.isDarkPreferredQuery).matches;switch(t){case"light":return i.css.lightTheme;case"dark":return i.css.darkTheme;case"auto":return e?i.css.darkTheme:i.css.lightTheme}}_updateCalendarHeader(){if(!this._hasDate)return;const t=[...this.widget.querySelector(`.${i.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(i.css.dateContainer))),[e,s,o]=this.widget.getElementsByClassName(i.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case i.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),s.setAttribute("title",""),o.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case i.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),s.setAttribute("title",this.optionsStore.options.localization.selectDecade),o.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case i.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),s.setAttribute("title",this.optionsStore.options.localization.selectYear),o.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case i.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),s.setAttribute("title",this.optionsStore.options.localization.selectMonth),o.setAttribute("title",this.optionsStore.options.localization.nextMonth),s.setAttribute(t,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat))}s.innerText=s.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(i.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:i.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?.clone}),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(i.css.widget);const e=document.createElement("div");e.classList.add(i.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(i.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 o=document.createElement("div");if(o.classList.add(i.css.toolbar),o.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(i.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDateAndTime)return void this._buildWidgetSideBySide(t,e,s,o);"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(o);const a=(e,s,o,a)=>{e&&(s&&(o.classList.add(i.css.collapse),a&&o.classList.add(i.css.show)),t.appendChild(o))};a(this._hasDate,this._hasTime,e,"clock"!==this.optionsStore.options.display.viewMode),a(this._hasTime,this._hasDate,s,"clock"===this.optionsStore.options.display.viewMode),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(o);const n=document.createElement("div");n.classList.add("arrow"),n.setAttribute("data-popper-arrow",""),t.appendChild(n),this._widget=t}_buildWidgetSideBySide(t,e,s,o){t.classList.add(i.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(o);const a=document.createElement("div");a.classList.add("td-row"),e.classList.add("td-half"),s.classList.add("td-half"),a.appendChild(e),a.appendChild(s),t.appendChild(a),"bottom"===this.optionsStore.options.display.toolbarPlacement&&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)}get _hasDateAndTime(){return this._hasDate&&this._hasTime}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",O.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",O.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",O.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",O.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(i.css.calendarHeader);const e=document.createElement("div");e.classList.add(i.css.previous),e.setAttribute("data-action",O.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const s=document.createElement("div");s.classList.add(i.css.switch),s.setAttribute("data-action",O.changeCalendarView);const o=document.createElement("div");return o.classList.add(i.css.next),o.setAttribute("data-action",O.next),o.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,s,o),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;this._dispose(),t&&this.show()}refreshCurrentView(){switch(this._isVisible||this._dispose(),this.optionsStore.currentView){case"clock":this._update("clock");break;case"calendar":this._update(t.Unit.date);break;case"months":this._update(t.Unit.month);break;case"years":this._update(t.Unit.year);break;case"decades":this._update("decade")}}}class j{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate($),this.validation=h.locate(m),this.display=h.locate(Y),this._eventEmitters=h.locate(g),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(e,s){const o=e?.currentTarget;if(o?.classList?.contains(i.css.disabled))return;s=s||o?.dataset?.action;const a=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(s){case O.next:case O.previous:this.handleNextPrevious(s);break;case O.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case O.selectMonth:case O.selectYear:case O.selectDecade:this.handleSelectCalendarMode(s,o);break;case O.selectDay:this.handleSelectDay(o);break;case O.selectHour:{let t=+o.dataset.value;a.hours>=12&&this.optionsStore.isTwelveHour&&(t+=12),a.hours=t,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(e);break}case O.selectMinute:a.minutes=+o.dataset.value,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(e);break;case O.selectSecond:a.seconds=+o.dataset.value,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(e);break;case O.incrementHours:this.manipulateAndSet(a,t.Unit.hours);break;case O.incrementMinutes:this.manipulateAndSet(a,t.Unit.minutes,this.optionsStore.options.stepping);break;case O.incrementSeconds:this.manipulateAndSet(a,t.Unit.seconds);break;case O.decrementHours:this.manipulateAndSet(a,t.Unit.hours,-1);break;case O.decrementMinutes:this.manipulateAndSet(a,t.Unit.minutes,-1*this.optionsStore.options.stepping);break;case O.decrementSeconds:this.manipulateAndSet(a,t.Unit.seconds,-1);break;case O.toggleMeridiem:this.manipulateAndSet(a,t.Unit.hours,this.dates.lastPicked.hours>=12?-12:12);break;case O.togglePicker:this.handleToggle(o);break;case O.showClock:case O.showHours:case O.showMinutes:case O.showSeconds:this.optionsStore.options.display.sideBySide||"clock"===this.optionsStore.currentView||(q.hideImmediately(this.display.dateContainer),q.showImmediately(this.display.timeContainer)),this.handleShowClockContainers(s);break;case O.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case O.close:this.display.hide();break;case O.today:{const e=(new l).setLocalization(this.optionsStore.options.localization);this._eventEmitters.updateViewDate.emit(e),this.validation.isValid(e,t.Unit.date)&&this.dates.setValue(e,this.dates.lastPickedIndex);break}}}handleShowClockContainers(e){if(!this.display._hasTime)return void i.errorMessages.throwError("Cannot show clock containers when time is disabled.");this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${i.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let s="";switch(e){case O.showClock:s=i.css.clockContainer,this.display._update("clock");break;case O.showHours:s=i.css.hourContainer,this.display._update(t.Unit.hours);break;case O.showMinutes:s=i.css.minuteContainer,this.display._update(t.Unit.minutes);break;case O.showSeconds:s=i.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===O.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.isTwelveHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,O.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)}handleSelectCalendarMode(t,e){const s=+e.dataset.value;switch(t){case O.selectMonth:this.optionsStore.viewDate.month=s;break;case O.selectYear:case O.selectDecade:this.optionsStore.viewDate.year=s}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)}handleToggle(t){t.getAttribute("title")===this.optionsStore.options.localization.selectDate?(t.setAttribute("title",this.optionsStore.options.localization.selectTime),t.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(t.setAttribute("title",this.optionsStore.options.localization.selectDate),t.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.handleShowClockContainers(O.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${i.css.dateContainer}, .${i.css.timeContainer}`).forEach((t=>q.toggle(t))),this._eventEmitters.viewUpdate.emit()}handleSelectDay(e){const s=this.optionsStore.viewDate.clone;e.classList.contains(i.css.old)&&s.manipulate(-1,t.Unit.month),e.classList.contains(i.css.new)&&s.manipulate(1,t.Unit.month),s.date=+e.dataset.day,this.optionsStore.options.dateRange?this.handleDateRange(s):this.optionsStore.options.multipleDates?this.handleMultiDate(s):this.dates.setValue(s,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.optionsStore.options.dateRange||this.display.hide()}handleMultiDate(e){let s=this.dates.pickedIndex(e,t.Unit.date);console.log(s),-1!==s?this.dates.setValue(null,s):(s=this.dates.lastPickedIndex+1,0===this.dates.picked.length&&(s=0),this.dates.setValue(e,s))}handleDateRange(t){switch(this.dates.picked.length){case 2:this.dates.clear();break;case 1:{const e=this.dates.picked[0];if(t.getTime()===e.getTime()){this.dates.clear();break}return t.isBefore(e)?(this.dates.setValue(t,0),void this.dates.setValue(e,1)):void this.dates.setValue(t,1)}}this.dates.setValue(t,0)}}class R{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||this.optionsStore.options.dateRange)try{const t=i.split(this.optionsStore.options.multipleDatesSeparator);for(let e=0;e{this.optionsStore.element?.disabled||this.optionsStore.input?.disabled||"INPUT"===this._toggle.nodeName&&"text"===this._toggle?.type&&this.optionsStore.options.allowInputToggle||this.toggle()},this._openClickEvent=()=>{this.optionsStore.element?.disabled||this.optionsStore.input?.disabled||this.display.isVisible||this.show()},h=new c,this._eventEmitters=h.locate(g),this.optionsStore=h.locate(u),this.display=h.locate(Y),this.dates=h.locate($),this.actions=h.locate(j),t||i.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,f,!0),this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization),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()})),this._eventEmitters.updateViewDate.subscribe((t=>{this.viewDate=t}))}get viewDate(){return this.optionsStore.viewDate}set viewDate(t){this.optionsStore.viewDate=t,this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization),this.display._update("clock"===this.optionsStore.currentView?"clock":"calendar")}updateOptions(t,e=!1){e?this._initializeOptions(t,f):this._initializeOptions(t,this.optionsStore.options),this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization),this.display.refreshCurrentView()}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&&i.errorMessages.subscribeMismatch();const o=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:i.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.setLocalization(i.localization),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"),i.display.components.useTwentyfourHour&&void 0===i.localization.hourCycle?i.localization.hourCycle="h24":void 0===i.localization.hourCycle&&(i.localization.hourCycle=d(i.localization.locale)),this.optionsStore.options=i,i.restrictions.maxDate&&this.viewDate.isAfter(i.restrictions.maxDate)&&(this.viewDate=i.restrictions.maxDate),i.restrictions.minDate&&this.viewDate.isBefore(i.restrictions.minDate)&&(this.viewDate=i.restrictions.minDate)}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{const 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.value&&this.optionsStore.options.defaultDate&&(this.optionsStore.input.value=this.dates.formatInput(this.optionsStore.options.defaultDate)),this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&(this.optionsStore.input.addEventListener("click",this._openClickEvent),this.optionsStore.input.addEventListener("focus",this._openClickEvent)),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.multipleDates||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||this.display.widget?.getElementsByClassName(i.css.show)[0].classList.contains(i.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('[data-action="togglePicker"]')},action:O.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const Q={},J=t=>{Q[t.name]||(Q[t.name]=t.localization)},K=t=>{const e=Q[t];e&&(f.localization=e)},Z=function(t,e=undefined){return t?(t.installed||(t(e,{TempusDominus:R,Dates:$,Display:Y,DateTime:l,Namespace:i},X),t.installed=!0),X):X},G="6.7.19",X={TempusDominus:R,extend:Z,loadLocale:J,locale:K,Namespace:i,DefaultOptions:f,DateTime:l,Unit:t.Unit,version:G,DefaultEnLocalization:S};t.DateTime=l,t.DefaultEnLocalization=S,t.DefaultOptions=f,t.Namespace=i,t.TempusDominus=R,t.extend=Z,t.loadLocale=J,t.locale=K,t.version=G,Object.defineProperty(t,"__esModule",{value:!0})}));
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/ar-SA.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/ar-SA.js
new file mode 100644
index 0000000..6043f8f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/ar-SA.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.ar_SA={})));})(this,(function(exports){'use strict';const name = 'ar-SA';
+const localization = {
+ today: 'اليوم',
+ clear: 'مسح',
+ close: 'إغلاق',
+ selectMonth: 'اختر الشهر',
+ previousMonth: 'الشهر السابق',
+ nextMonth: 'الشهر التالي',
+ selectYear: 'اختر السنة',
+ previousYear: 'العام السابق',
+ nextYear: 'العام التالي',
+ selectDecade: 'اختر العقد',
+ previousDecade: 'العقد السابق',
+ nextDecade: 'العقد التالي',
+ previousCentury: 'القرن السابق',
+ nextCentury: 'القرن التالي',
+ pickHour: 'اختر الساعة',
+ incrementHour: 'أضف ساعة',
+ decrementHour: 'أنقص ساعة',
+ pickMinute: 'اختر الدقيقة',
+ incrementMinute: 'أضف دقيقة',
+ decrementMinute: 'أنقص دقيقة',
+ pickSecond: 'اختر الثانية',
+ incrementSecond: 'أضف ثانية',
+ decrementSecond: 'أنقص ثانية',
+ toggleMeridiem: 'تبديل الفترة',
+ selectTime: 'اخر الوقت',
+ selectDate: 'اختر التاريخ',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ar-SA',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/ar.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/ar.js
new file mode 100644
index 0000000..eadeb73
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/ar.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.ar={})));})(this,(function(exports){'use strict';const name = 'ar';
+const localization = {
+ today: 'اليوم',
+ clear: 'مسح',
+ close: 'إغلاق',
+ selectMonth: 'اختر الشهر',
+ previousMonth: 'الشهر السابق',
+ nextMonth: 'الشهر التالي',
+ selectYear: 'اختر السنة',
+ previousYear: 'العام السابق',
+ nextYear: 'العام التالي',
+ selectDecade: 'اختر العقد',
+ previousDecade: 'العقد السابق',
+ nextDecade: 'العقد التالي',
+ previousCentury: 'القرن السابق',
+ nextCentury: 'القرن التالي',
+ pickHour: 'اختر الساعة',
+ incrementHour: 'أضف ساعة',
+ decrementHour: 'أنقص ساعة',
+ pickMinute: 'اختر الدقيقة',
+ incrementMinute: 'أضف دقيقة',
+ decrementMinute: 'أنقص دقيقة',
+ pickSecond: 'اختر الثانية',
+ incrementSecond: 'أضف ثانية',
+ decrementSecond: 'أنقص ثانية',
+ toggleMeridiem: 'تبديل الفترة',
+ selectTime: 'اخر الوقت',
+ selectDate: 'اختر التاريخ',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ar',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'd/M/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/ca.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/ca.js
new file mode 100644
index 0000000..e4a62fa
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/ca.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.ca={})));})(this,(function(exports){'use strict';const name = 'ca';
+const localization = {
+ today: 'Avui',
+ clear: 'Esborrar selecció',
+ close: 'Tancar selector',
+ selectMonth: 'Seleccionar mes',
+ previousMonth: 'Mes anterior',
+ nextMonth: 'Pròxim mes',
+ selectYear: 'Seleccionar any',
+ previousYear: 'Any anterior',
+ nextYear: 'Pròxim any',
+ selectDecade: 'Seleccionar dècada',
+ previousDecade: 'Dècada anterior',
+ nextDecade: 'Pròxima dècada',
+ previousCentury: 'Segle anterior',
+ nextCentury: 'Pròxim segle',
+ pickHour: 'Escollir hora',
+ incrementHour: 'Incrementar hora',
+ decrementHour: 'Decrementar hora',
+ pickMinute: 'Escollir minut',
+ incrementMinute: 'Incrementar minut',
+ decrementMinute: 'Decrementar minut',
+ pickSecond: 'Escollir segon',
+ incrementSecond: 'Incrementar segon',
+ decrementSecond: 'Decrementar segon',
+ toggleMeridiem: 'Canviar AM/PM',
+ selectTime: 'Seleccionar temps',
+ selectDate: 'Seleccionar data',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ startOfTheWeek: 1,
+ locale: 'ca',
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd [de] MMMM [de] yyyy',
+ LLL: 'd [de] MMMM [de] yyyy H:mm',
+ LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
+ },
+ ordinal: (n) => `${n}º`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/cs.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/cs.js
new file mode 100644
index 0000000..0f67e4b
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/cs.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.cs={})));})(this,(function(exports){'use strict';const name = 'cs';
+const localization = {
+ today: 'Dnes',
+ clear: 'Vymazat výběr',
+ close: 'Zavřít výběrové okno',
+ selectMonth: 'Vybrat měsíc',
+ previousMonth: 'Předchozí měsíc',
+ nextMonth: 'Následující měsíc',
+ selectYear: 'Vybrat rok',
+ previousYear: 'Předchozí rok',
+ nextYear: 'Následující rok',
+ selectDecade: 'Vybrat desetiletí',
+ previousDecade: 'Předchozí desetiletí',
+ nextDecade: 'Následující desetiletí',
+ previousCentury: 'Předchozí století',
+ nextCentury: 'Následující století',
+ pickHour: 'Vybrat hodinu',
+ incrementHour: 'Zvýšit hodinu',
+ decrementHour: 'Snížit hodinu',
+ pickMinute: 'Vybrat minutu',
+ incrementMinute: 'Zvýšit minutu',
+ decrementMinute: 'Snížit minutu',
+ pickSecond: 'Vybrat sekundu',
+ incrementSecond: 'Zvýšit sekundu',
+ decrementSecond: 'Snížit sekundu',
+ toggleMeridiem: 'Přepnout ráno / odpoledne',
+ selectTime: 'Vybrat čas',
+ selectDate: 'Vybrat datum',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'de',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LTS: 'HH:mm:ss',
+ LT: 'HH:mm',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM yyyy',
+ LLL: 'd. MMMM yyyy HH:mm',
+ LLLL: 'dddd, d. MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/de.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/de.js
new file mode 100644
index 0000000..c000828
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/de.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.de={})));})(this,(function(exports){'use strict';const name = 'de';
+const localization = {
+ today: 'Heute',
+ clear: 'Auswahl löschen',
+ close: 'Auswahlbox schließen',
+ selectMonth: 'Monat wählen',
+ previousMonth: 'Letzter Monat',
+ nextMonth: 'Nächster Monat',
+ selectYear: 'Jahr wählen',
+ previousYear: 'Letztes Jahr',
+ nextYear: 'Nächstes Jahr',
+ selectDecade: 'Jahrzehnt wählen',
+ previousDecade: 'Letztes Jahrzehnt',
+ nextDecade: 'Nächstes Jahrzehnt',
+ previousCentury: 'Letztes Jahrhundert',
+ nextCentury: 'Nächstes Jahrhundert',
+ pickHour: 'Stunde wählen',
+ incrementHour: 'Stunde erhöhen',
+ decrementHour: 'Stunde verringern',
+ pickMinute: 'Minute wählen',
+ incrementMinute: 'Minute erhöhen',
+ decrementMinute: 'Minute verringern',
+ pickSecond: 'Sekunde wählen',
+ incrementSecond: 'Sekunde erhöhen',
+ decrementSecond: 'Sekunde verringern',
+ toggleMeridiem: 'Tageszeit umschalten',
+ selectTime: 'Zeit wählen',
+ selectDate: 'Datum wählen',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'de',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LTS: 'HH:mm:ss',
+ LT: 'HH:mm',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM yyyy',
+ LLL: 'd. MMMM yyyy HH:mm',
+ LLLL: 'dddd, d. MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/es.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/es.js
new file mode 100644
index 0000000..7deb6d2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/es.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.es={})));})(this,(function(exports){'use strict';const name = 'es';
+const localization = {
+ today: 'Hoy',
+ clear: 'Borrar selección',
+ close: 'Cerrar selector',
+ selectMonth: 'Seleccionar mes',
+ previousMonth: 'Mes anterior',
+ nextMonth: 'Próximo mes',
+ selectYear: 'Seleccionar año',
+ previousYear: 'Año anterior',
+ nextYear: 'Próximo año',
+ selectDecade: 'Seleccionar década',
+ previousDecade: 'Década anterior',
+ nextDecade: 'Próxima década',
+ previousCentury: 'Siglo anterior',
+ nextCentury: 'Próximo siglo',
+ pickHour: 'Elegir hora',
+ incrementHour: 'Incrementar hora',
+ decrementHour: 'Decrementar hora',
+ pickMinute: 'Elegir minuto',
+ incrementMinute: 'Incrementar minuto',
+ decrementMinute: 'Decrementar minuto',
+ pickSecond: 'Elegir segundo',
+ incrementSecond: 'Incrementar segundo',
+ decrementSecond: 'Decrementar segundo',
+ toggleMeridiem: 'Cambiar AM/PM',
+ selectTime: 'Seleccionar tiempo',
+ selectDate: 'Seleccionar fecha',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ startOfTheWeek: 1,
+ locale: 'es',
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd [de] MMMM [de] yyyy',
+ LLL: 'd [de] MMMM [de] yyyy H:mm',
+ LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
+ },
+ ordinal: (n) => `${n}º`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/fi.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/fi.js
new file mode 100644
index 0000000..e1b2f31
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/fi.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.fi={})));})(this,(function(exports){'use strict';const name = 'fi';
+const localization = {
+ today: 'Tänään',
+ clear: 'Tyhjennä',
+ close: 'Sulje',
+ selectMonth: 'Valitse kuukausi',
+ previousMonth: 'Edellinen kuukausi',
+ nextMonth: 'Seuraava kuukausi',
+ selectYear: 'Valitse vuosi',
+ previousYear: 'Edellinen vuosi',
+ nextYear: 'Seuraava vuosi',
+ selectDecade: 'Valitse vuosikymmen',
+ previousDecade: 'Edellinen vuosikymmen',
+ nextDecade: 'Seuraava vuosikymmen',
+ previousCentury: 'Edellinen vuosisata',
+ nextCentury: 'Seuraava vuosisata',
+ pickHour: 'Valitse tunnit',
+ incrementHour: 'Vähennä tunteja',
+ decrementHour: 'Lisää tunteja',
+ pickMinute: 'Valitse minuutit',
+ incrementMinute: 'Vähennä minuutteja',
+ decrementMinute: 'Lisää minuutteja',
+ pickSecond: 'Valitse sekuntit',
+ incrementSecond: 'Vähennä sekunteja',
+ decrementSecond: 'Lisää sekunteja',
+ toggleMeridiem: 'Vaihda kellonaikaa',
+ selectTime: 'Valitse aika',
+ selectDate: 'Valise päivä',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'fi',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM[ta] yyyy',
+ LLL: 'd. MMMM[ta] yyyy, [klo] HH.mm',
+ LLLL: 'dddd, d. MMMM[ta] yyyy, [klo] HH.mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/fr.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/fr.js
new file mode 100644
index 0000000..41a9bb7
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/fr.js
@@ -0,0 +1,50 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.fr={})));})(this,(function(exports){'use strict';const name = 'fr';
+const localization = {
+ today: "Aujourd'hui",
+ clear: 'Effacer la sélection',
+ close: 'Fermer',
+ selectMonth: 'Sélectionner le mois',
+ previousMonth: 'Mois précédent',
+ nextMonth: 'Mois suivant',
+ selectYear: "Sélectionner l'année",
+ previousYear: 'Année précédente',
+ nextYear: 'Année suivante',
+ selectDecade: 'Sélectionner la décennie',
+ previousDecade: 'Décennie précédente',
+ nextDecade: 'Décennie suivante',
+ previousCentury: 'Siècle précédente',
+ nextCentury: 'Siècle suivante',
+ pickHour: "Sélectionner l'heure",
+ incrementHour: "Incrementer l'heure",
+ decrementHour: "Diminuer l'heure",
+ pickMinute: 'Sélectionner les minutes',
+ incrementMinute: 'Incrementer les minutes',
+ decrementMinute: 'Diminuer les minutes',
+ pickSecond: 'Sélectionner les secondes',
+ incrementSecond: 'Incrementer les secondes',
+ decrementSecond: 'Diminuer les secondes',
+ toggleMeridiem: 'Basculer AM-PM',
+ selectTime: "Sélectionner l'heure",
+ selectDate: 'Sélectionner une date',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'fr',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => {
+ const o = n === 1 ? 'er' : '';
+ return `${n}${o}`;
+ },
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/hy.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/hy.js
new file mode 100644
index 0000000..0168146
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/hy.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.hy={})));})(this,(function(exports){'use strict';const name = 'hy';
+const localization = {
+ today: 'Այսօր',
+ clear: 'Ջնջել ընտրվածը',
+ close: 'Փակել',
+ selectMonth: 'Ընտրել ամիս',
+ previousMonth: 'Նախորդ ամիս',
+ nextMonth: 'Հաջորդ ամիս',
+ selectYear: 'Ընտրել տարի',
+ previousYear: 'Նախորդ տարի',
+ nextYear: 'Հաջորդ տարի',
+ selectDecade: 'Ընտրել տասնամյակ',
+ previousDecade: 'Նախորդ տասնամյակ',
+ nextDecade: 'Հաջորդ տասնամյակ',
+ previousCentury: 'Նախորդ դար',
+ nextCentury: 'Հաջորդ դար',
+ pickHour: 'Ընտրել ժամ',
+ incrementHour: 'Ավելացնել ժամ',
+ decrementHour: 'Նվազեցնել ժամ',
+ pickMinute: 'Ընտրել րոպե',
+ incrementMinute: 'Ավելացնել րոպե',
+ decrementMinute: 'Նվազեցնել րոպե',
+ pickSecond: 'Ընտրել երկրորդը',
+ incrementSecond: 'Ավելացնել վայրկյան',
+ decrementSecond: 'Նվազեցնել վայրկյան',
+ toggleMeridiem: 'Փոփոխել Ժամանակաշրջանը',
+ selectTime: 'Ընտրել Ժամ',
+ selectDate: 'Ընտրել ամսաթիվ',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'hy',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy թ.',
+ LLL: 'd MMMM yyyy թ., H:mm',
+ LLLL: 'dddd, d MMMM yyyy թ., H:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LTS',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/it.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/it.js
new file mode 100644
index 0000000..4c9d098
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/it.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.it={})));})(this,(function(exports){'use strict';const name = 'it';
+const localization = {
+ today: 'Oggi',
+ clear: 'Cancella selezione',
+ close: 'Chiudi',
+ selectMonth: 'Seleziona mese',
+ previousMonth: 'Mese precedente',
+ nextMonth: 'Mese successivo',
+ selectYear: 'Seleziona anno',
+ previousYear: 'Anno precedente',
+ nextYear: 'Anno successivo',
+ selectDecade: 'Seleziona decennio',
+ previousDecade: 'Decennio precedente',
+ nextDecade: 'Decennio successivo',
+ previousCentury: 'Secolo precedente',
+ nextCentury: 'Secolo successivo',
+ pickHour: "Seleziona l'ora",
+ incrementHour: "Incrementa l'ora",
+ decrementHour: "Decrementa l'ora",
+ pickMinute: 'Seleziona i minuti',
+ incrementMinute: 'Incrementa i minuti',
+ decrementMinute: 'Decrementa i minuti',
+ pickSecond: 'Seleziona i secondi',
+ incrementSecond: 'Incrementa i secondi',
+ decrementSecond: 'Decrementa i secondi',
+ toggleMeridiem: 'Scambia AM-PM',
+ selectTime: "Seleziona l'ora",
+ selectDate: 'Seleziona una data',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'it',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}º`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/nl.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/nl.js
new file mode 100644
index 0000000..523befd
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/nl.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.nl={})));})(this,(function(exports){'use strict';const name = 'nl';
+const localization = {
+ today: 'Vandaag',
+ clear: 'Verwijder selectie',
+ close: 'Sluit de picker',
+ selectMonth: 'Selecteer een maand',
+ previousMonth: 'Vorige maand',
+ nextMonth: 'Volgende maand',
+ selectYear: 'Selecteer een jaar',
+ previousYear: 'Vorige jaar',
+ nextYear: 'Volgende jaar',
+ selectDecade: 'Selecteer decennium',
+ previousDecade: 'Vorige decennium',
+ nextDecade: 'Volgende decennium',
+ previousCentury: 'Vorige eeuw',
+ nextCentury: 'Volgende eeuw',
+ pickHour: 'Kies een uur',
+ incrementHour: 'Verhoog uur',
+ decrementHour: 'Verlaag uur',
+ pickMinute: 'Kies een minute',
+ incrementMinute: 'Verhoog minuut',
+ decrementMinute: 'Verlaag minuut',
+ pickSecond: 'Kies een seconde',
+ incrementSecond: 'Verhoog seconde',
+ decrementSecond: 'Verlaag seconde',
+ toggleMeridiem: 'Schakel tussen AM/PM',
+ selectTime: 'Selecteer een tijd',
+ selectDate: 'Selecteer een datum',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'nl',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd-MM-yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `[${n}${n === 1 || n === 8 || n >= 20 ? 'ste' : 'de'}]`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/pl.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/pl.js
new file mode 100644
index 0000000..b764c70
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/pl.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.pl={})));})(this,(function(exports){'use strict';const name = 'pl';
+const localization = {
+ today: 'Dzisiaj',
+ clear: 'Wyczyść',
+ close: 'Zamknij',
+ selectMonth: 'Wybierz miesiąc',
+ previousMonth: 'Poprzedni miesiąc',
+ nextMonth: 'Następny miesiąc',
+ selectYear: 'Wybierz rok',
+ previousYear: 'Poprzedni rok',
+ nextYear: 'Następny rok',
+ selectDecade: 'Wybierz dekadę',
+ previousDecade: 'Poprzednia dekada',
+ nextDecade: 'Następna dekada',
+ previousCentury: 'Poprzednie stulecie',
+ nextCentury: 'Następne stulecie',
+ pickHour: 'Wybierz godzinę',
+ incrementHour: 'Kolejna godzina',
+ decrementHour: 'Poprzednia godzina',
+ pickMinute: 'Wybierz minutę',
+ incrementMinute: 'Kolejna minuta',
+ decrementMinute: 'Poprzednia minuta',
+ pickSecond: 'Wybierz sekundę',
+ incrementSecond: 'Kolejna sekunda',
+ decrementSecond: 'Poprzednia sekunda',
+ toggleMeridiem: 'Przełącz porę dnia',
+ selectTime: 'Ustaw godzinę',
+ selectDate: 'Ustaw datę',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'pl',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd, d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/ro.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/ro.js
new file mode 100644
index 0000000..2cd12ea
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/ro.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.ro={})));})(this,(function(exports){'use strict';const name = 'ro';
+const localization = {
+ today: 'Mergi la ziua de astăzi',
+ clear: 'Șterge selecția',
+ close: 'Închide calendarul',
+ selectMonth: 'Selectează luna',
+ previousMonth: 'Luna precedentă',
+ nextMonth: 'Luna următoare',
+ selectYear: 'Selectează anul',
+ previousYear: 'Anul precedent',
+ nextYear: 'Anul următor',
+ selectDecade: 'Selectează deceniul',
+ previousDecade: 'Deceniul precedent',
+ nextDecade: 'Deceniul următor',
+ previousCentury: 'Secolul precedent',
+ nextCentury: 'Secolul următor',
+ pickHour: 'Alege ora',
+ incrementHour: 'Incrementează ora',
+ decrementHour: 'Decrementează ora',
+ pickMinute: 'Alege minutul',
+ incrementMinute: 'Incrementează minutul',
+ decrementMinute: 'Decrementează minutul',
+ pickSecond: 'Alege secunda',
+ incrementSecond: 'Incrementează secunda',
+ decrementSecond: 'Decrementează secunda',
+ toggleMeridiem: 'Comută modul AM/PM',
+ selectTime: 'Selectează ora',
+ selectDate: 'Selectează data',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ro',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy H:mm',
+ LLLL: 'dddd, d MMMM yyyy H:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/ru.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/ru.js
new file mode 100644
index 0000000..4fd9040
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/ru.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.ru={})));})(this,(function(exports){'use strict';const name = 'ru';
+const localization = {
+ today: 'Перейти сегодня',
+ clear: 'Очистить выделение',
+ close: 'Закрыть сборщик',
+ selectMonth: 'Выбрать месяц',
+ previousMonth: 'Предыдущий месяц',
+ nextMonth: 'В следующем месяце',
+ selectYear: 'Выбрать год',
+ previousYear: 'Предыдущий год',
+ nextYear: 'В следующем году',
+ selectDecade: 'Выбрать десятилетие',
+ previousDecade: 'Предыдущее десятилетие',
+ nextDecade: 'Следующее десятилетие',
+ previousCentury: 'Предыдущий век',
+ nextCentury: 'Следующий век',
+ pickHour: 'Выберите час',
+ incrementHour: 'Время увеличения',
+ decrementHour: 'Уменьшить час',
+ pickMinute: 'Выбрать минуту',
+ incrementMinute: 'Минута приращения',
+ decrementMinute: 'Уменьшить минуту',
+ pickSecond: 'Выбрать второй',
+ incrementSecond: 'Увеличение секунды',
+ decrementSecond: 'Уменьшение секунды',
+ toggleMeridiem: 'Переключить период',
+ selectTime: 'Выбрать время',
+ selectDate: 'Выбрать дату',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ru',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy г.',
+ LLL: 'd MMMM yyyy г., H:mm',
+ LLLL: 'dddd, d MMMM yyyy г., H:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/sl.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/sl.js
new file mode 100644
index 0000000..ac6f6c1
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/sl.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.sl={})));})(this,(function(exports){'use strict';const name = 'sl';
+const localization = {
+ today: 'Danes',
+ clear: 'Počisti',
+ close: 'Zapri',
+ selectMonth: 'Izberite mesec',
+ previousMonth: 'Prejšnji mesec',
+ nextMonth: 'Naslednji mesec',
+ selectYear: 'Izberite leto',
+ previousYear: 'Prejšnje Leto',
+ nextYear: 'Naslednje leto',
+ selectDecade: 'Izberite desetletje',
+ previousDecade: 'Prejšnje desetletje',
+ nextDecade: 'Naslednje desetletje',
+ previousCentury: 'Prejšnje stoletje',
+ nextCentury: 'Naslednje stoletje',
+ pickHour: 'Izberite uro',
+ incrementHour: 'Povečaj ure',
+ decrementHour: 'Zmanjšaj uro',
+ pickMinute: 'Izberite minuto',
+ incrementMinute: 'Povečaj minuto',
+ decrementMinute: 'Zmanjšaj minuto',
+ pickSecond: 'Izberite drugo',
+ incrementSecond: 'Povečaj sekundo',
+ decrementSecond: 'Zmanjšaj sekundo',
+ toggleMeridiem: 'Preklop dopoldne/popoldne',
+ selectTime: 'Izberite čas',
+ selectDate: 'Izberite Datum',
+ dayViewHeaderFormat: { month: 'long', year: 'numeric' },
+ locale: 'sl',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM yyyy',
+ LLL: 'd. MMMM yyyy H:mm',
+ LLLL: 'dddd, d. MMMM yyyy H:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/locales/tr.js b/node_modules/@eonasdan/tempus-dominus/dist/locales/tr.js
new file mode 100644
index 0000000..c457138
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/locales/tr.js
@@ -0,0 +1,47 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd, d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/plugins/bi-one.js b/node_modules/@eonasdan/tempus-dominus/dist/plugins/bi-one.js
new file mode 100644
index 0000000..44f7b66
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/plugins/bi-one.js
@@ -0,0 +1,22 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.bi_one={})));})(this,(function(exports){'use strict';// this obviously requires the Bootstrap Icons v1 libraries to be loaded
+const biOneIcons = {
+ type: 'icons',
+ time: 'bi bi-clock',
+ date: 'bi bi-calendar-week',
+ up: 'bi bi-arrow-up',
+ down: 'bi bi-arrow-down',
+ previous: 'bi bi-chevron-left',
+ next: 'bi bi-chevron-right',
+ today: 'bi bi-calendar-check',
+ clear: 'bi bi-trash',
+ close: 'bi bi-x',
+};
+// noinspection JSUnusedGlobalSymbols
+const load = (_, __, tdFactory) => {
+ tdFactory.DefaultOptions.display.icons = biOneIcons;
+};exports.biOneIcons=biOneIcons;exports.load=load;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/plugins/customDateFormat.js b/node_modules/@eonasdan/tempus-dominus/dist/plugins/customDateFormat.js
new file mode 100644
index 0000000..ab333b4
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/plugins/customDateFormat.js
@@ -0,0 +1,8 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.customDateFormat=f()));})(this,(function(){'use strict';var index = () => {
+ console.warn('This plugin has been merged with the main picker and is now longer required');
+};return index;}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/custom-paint-job.js b/node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/custom-paint-job.js
new file mode 100644
index 0000000..4d369d6
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/custom-paint-job.js
@@ -0,0 +1,17 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.custom_paint_job=f()));})(this,(function(){'use strict';/* eslint-disable */
+// noinspection JSUnusedGlobalSymbols
+var customPaintJob = (option, tdClasses, tdFactory) => {
+ // noinspection JSUnusedLocalSymbols
+ tdClasses.Display.prototype.paint = (unit, date, classes, element) => {
+ if (unit === tdFactory.Unit.date) {
+ if (date.isSame(new tdFactory.DateTime(), unit)) {
+ classes.push('special-day');
+ }
+ }
+ };
+};return customPaintJob;}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/sample.js b/node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/sample.js
new file mode 100644
index 0000000..b646d4a
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/sample.js
@@ -0,0 +1,30 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.sample=f()));})(this,(function(){'use strict';// noinspection JSUnusedGlobalSymbols
+var sample = (option, tdClasses, tdFactory) => {
+ // extend the picker
+ // e.g. add new tempusDominus.TempusDominus(...).someFunction()
+ tdClasses.TempusDominus.prototype.someFunction = (a, logger) => {
+ logger = logger || console.log;
+ logger(a);
+ };
+ // extend tempusDominus
+ // e.g. add tempusDominus.example()
+ tdFactory.example = (a, logger) => {
+ logger = logger || console.log;
+ logger(a);
+ };
+ // overriding existing API
+ // e.g. extend new tempusDominus.TempusDominus(...).show()
+ const oldShow = tdClasses.TempusDominus.prototype.show;
+ tdClasses.TempusDominus.prototype.show = function (a, logger) {
+ logger = logger || console.log;
+ alert('from plugin');
+ logger(a);
+ oldShow.bind(this)();
+ // return modified result
+ };
+};return sample;}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/plugins/fa-five.js b/node_modules/@eonasdan/tempus-dominus/dist/plugins/fa-five.js
new file mode 100644
index 0000000..fa369c8
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/plugins/fa-five.js
@@ -0,0 +1,22 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 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.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.fa_five={})));})(this,(function(exports){'use strict';// this obviously requires the FA 6 libraries to be loaded
+const faFiveIcons = {
+ type: 'icons',
+ time: 'fas fa-clock',
+ date: 'fas fa-calendar',
+ up: 'fas fa-arrow-up',
+ down: 'fas fa-arrow-down',
+ previous: 'fas fa-chevron-left',
+ next: 'fas fa-chevron-right',
+ today: 'fas fa-calendar-check',
+ clear: 'fas fa-trash',
+ close: 'fas fa-times',
+};
+// noinspection JSUnusedGlobalSymbols
+const load = (_, __, tdFactory) => {
+ tdFactory.DefaultOptions.display.icons = faFiveIcons;
+};exports.faFiveIcons=faFiveIcons;exports.load=load;Object.defineProperty(exports,'__esModule',{value:true});}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/dist/plugins/moment-parse.js b/node_modules/@eonasdan/tempus-dominus/dist/plugins/moment-parse.js
new file mode 100644
index 0000000..2e0acc2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/dist/plugins/moment-parse.js
@@ -0,0 +1,20 @@
+/*!
+ * Tempus Dominus v6.7.19 (https://getdatepicker.com/)
+ * Copyright 2013-2023 Jonathan Peterson
+ * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
+ */
+(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.moment_parse=f()));})(this,(function(){'use strict';var index = (option, tdClasses, tdFactory) => {
+ tdClasses.Dates.prototype.setFromInput = function (value, index) {
+ const converted = moment(value, option);
+ if (converted.isValid()) {
+ const date = tdFactory.DateTime.convert(converted.toDate(), this.optionsStore.options.localization.locale);
+ this.setValue(date, index);
+ }
+ else {
+ console.warn('Momentjs failed to parse the input date.');
+ }
+ };
+ tdClasses.Dates.prototype.formatInput = function (date) {
+ return moment(date).format(option);
+ };
+};return index;}));
\ No newline at end of file
diff --git a/node_modules/@eonasdan/tempus-dominus/package.json b/node_modules/@eonasdan/tempus-dominus/package.json
new file mode 100644
index 0000000..ebc3c6f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/package.json
@@ -0,0 +1,115 @@
+{
+ "author": {
+ "name": "Jonathan Peterson"
+ },
+ "name": "@eonasdan/tempus-dominus",
+ "version": "6.7.19",
+ "style": "dist/css/tempus-dominus.css",
+ "sass": "scss/tempus-dominus.scss",
+ "main": "dist/js/tempus-dominus.js",
+ "module": "dist/js/tempus-dominus.esm.js",
+ "types": "types/tempus-dominus.d.ts",
+ "files": [
+ "dist/**/*",
+ "src/js/**/*.ts",
+ "src/js/locales/**/*.ts",
+ "src/js/plugins/**/*.ts",
+ "src/scss/**/*.scss",
+ "types/**/*"
+ ],
+ "scripts": {
+ "start": "npm run build && concurrently \"npm:*-watch\"",
+ "test": "vitest --ui",
+ "test:silent": "vitest --run --silent",
+ "test:coverage": "vitest run --coverage",
+ "serve": "node ./build/serve.js",
+ "clean": "node ./build/utilities.js --clean ./dist && node ./build/utilities.js --clean ./types",
+ "build": "npm run clean && node ./build/utilities.js --copy && npm run rollup && npm run build:declarations && npm run build:plugins-and-locales",
+ "build:plugins": "node ./build/plugins.js -p",
+ "build:locales": "node ./build/plugins.js -l",
+ "build:plugins-and-locales": "node ./build/plugins.js",
+ "build:declarations": "node ./build/utilities.js --clean ./types && tsc --declaration --emitDeclarationOnly --outDir types",
+ "sass": "sass src/scss/tempus-dominus.scss ./dist/css/tempus-dominus.css",
+ "rollup": "rollup -c ./build/rollup.config.js",
+ "rollup-watch": "rollup -c ./build/rollup.config.js -w",
+ "docs": "node ./src/docs/make.js",
+ "docs-watch": "node ./src/docs/make.js --watch",
+ "release": "npm run eslint && npm run test:silent && npm run build",
+ "release:version": "npm run release && node build/change-version.js",
+ "prepare": "husky install",
+ "prettier": "prettier --ignore-unknown --write .",
+ "eslint": "npm run prettier && npx eslint --ext .html,.ts ."
+ },
+ "lint-staged": {
+ "**/*!(.d)/.ts": [
+ "npm run eslint"
+ ],
+ "**/*": [
+ "npm run prettier"
+ ]
+ },
+ "bugs": {
+ "url": "https://github.com/eonasdan/tempus-dominus/issues"
+ },
+ "peerDependencies": {
+ "@popperjs/core": "^2.11.6"
+ },
+ "peerDependenciesMeta": {
+ "@popperjs/core\"": {
+ "optional": true
+ }
+ },
+ "description": "A robust and powerful date/time picker component. For usage, installation and demos see Project Site on GitHub",
+ "devDependencies": {
+ "@eonasdan/parvus-server": "^1.1.9",
+ "@popperjs/core": "^2.11.6",
+ "@rollup/plugin-node-resolve": "^14.1.0",
+ "@types/node": "^18.14.2",
+ "@typescript-eslint/eslint-plugin": "^5.54.0",
+ "@typescript-eslint/parser": "^5.54.0",
+ "@vitest/coverage-c8": "^0.29.2",
+ "@vitest/ui": "^0.29.2",
+ "bootstrap": "^5.2.3",
+ "chokidar": "^3.5.3",
+ "clean-css": "^5.3.2",
+ "concurrently": "^7.6.0",
+ "dropcss": "^1.0.16",
+ "eslint": "^8.35.0",
+ "eslint-config-prettier": "^8.6.0",
+ "glob": "^7.2.3",
+ "globby": "^11.1.0",
+ "html-minifier-terser": "^5.1.1",
+ "husky": "^8.0.3",
+ "jsdom": "^20.0.3",
+ "lint-staged": "^13.1.2",
+ "prettier": "^2.8.4",
+ "rollup": "^2.79.1",
+ "rollup-plugin-ignore": "^1.0.10",
+ "rollup-plugin-postcss": "^4.0.2",
+ "rollup-plugin-terser": "^7.0.2",
+ "rollup-plugin-ts": "^3.2.0",
+ "sass": "^1.58.3",
+ "terser": "^5.16.5",
+ "tslib": "^2.5.0",
+ "typescript": "~4.9.5",
+ "vitest": "^0.29.2",
+ "vitest-github-actions-reporter": "^0.10.0"
+ },
+ "homepage": "https://getdatepicker.com/",
+ "keywords": [
+ "datepicker",
+ "datetimepicker",
+ "timepicker"
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Eonasdan/tempus-dominus.git"
+ },
+ "wallaby": {
+ "filesWithNoCoverageCalculated": [
+ "test/fixtures/**/*"
+ ]
+ },
+ "funding": "https://ko-fi.com/eonasdan"
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/actions.ts b/node_modules/@eonasdan/tempus-dominus/src/js/actions.ts
new file mode 100644
index 0000000..fa18510
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/actions.ts
@@ -0,0 +1,379 @@
+import { DateTime, Unit } from './datetime';
+import Collapse from './display/collapse';
+import Namespace from './utilities/namespace';
+import Dates from './dates';
+import Validation from './validation';
+import Display from './display';
+import { EventEmitters } from './utilities/event-emitter';
+import { serviceLocator } from './utilities/service-locator.js';
+import ActionTypes from './utilities/action-types';
+import CalendarModes from './utilities/calendar-modes';
+import { OptionsStore } from './utilities/optionsStore';
+
+/**
+ * Logic for various click actions
+ */
+export default class Actions {
+ private optionsStore: OptionsStore;
+ private validation: Validation;
+ private dates: Dates;
+ private display: Display;
+ private _eventEmitters: EventEmitters;
+
+ 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]
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ do(e: any, action?: ActionTypes) {
+ const currentTarget = e?.currentTarget as HTMLElement;
+ if (currentTarget?.classList?.contains(Namespace.css.disabled)) return;
+ action = action || (currentTarget?.dataset?.action as ActionTypes);
+ const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)
+ .clone;
+
+ switch (action) {
+ case ActionTypes.next:
+ case ActionTypes.previous:
+ this.handleNextPrevious(action);
+ break;
+ case ActionTypes.changeCalendarView:
+ this.display._showMode(1);
+ this.display._updateCalendarHeader();
+ break;
+ case ActionTypes.selectMonth:
+ case ActionTypes.selectYear:
+ case ActionTypes.selectDecade:
+ this.handleSelectCalendarMode(action, currentTarget);
+ break;
+ case ActionTypes.selectDay:
+ this.handleSelectDay(currentTarget);
+ break;
+ case ActionTypes.selectHour: {
+ let hour = +currentTarget.dataset.value;
+ if (lastPicked.hours >= 12 && this.optionsStore.isTwelveHour)
+ hour += 12;
+ lastPicked.hours = hour;
+ this.dates.setValue(lastPicked, this.dates.lastPickedIndex);
+ this.hideOrClock(e);
+ break;
+ }
+ case ActionTypes.selectMinute: {
+ lastPicked.minutes = +currentTarget.dataset.value;
+ this.dates.setValue(lastPicked, this.dates.lastPickedIndex);
+ this.hideOrClock(e);
+ break;
+ }
+ case ActionTypes.selectSecond: {
+ lastPicked.seconds = +currentTarget.dataset.value;
+ this.dates.setValue(lastPicked, this.dates.lastPickedIndex);
+ this.hideOrClock(e);
+ break;
+ }
+ case ActionTypes.incrementHours:
+ this.manipulateAndSet(lastPicked, Unit.hours);
+ break;
+ case ActionTypes.incrementMinutes:
+ this.manipulateAndSet(
+ lastPicked,
+ Unit.minutes,
+ this.optionsStore.options.stepping
+ );
+ break;
+ case ActionTypes.incrementSeconds:
+ this.manipulateAndSet(lastPicked, Unit.seconds);
+ break;
+ case ActionTypes.decrementHours:
+ this.manipulateAndSet(lastPicked, Unit.hours, -1);
+ break;
+ case ActionTypes.decrementMinutes:
+ this.manipulateAndSet(
+ lastPicked,
+ Unit.minutes,
+ this.optionsStore.options.stepping * -1
+ );
+ break;
+ case ActionTypes.decrementSeconds:
+ this.manipulateAndSet(lastPicked, Unit.seconds, -1);
+ break;
+ case ActionTypes.toggleMeridiem:
+ this.manipulateAndSet(
+ lastPicked,
+ Unit.hours,
+ this.dates.lastPicked.hours >= 12 ? -12 : 12
+ );
+ break;
+ case ActionTypes.togglePicker:
+ this.handleToggle(currentTarget);
+ break;
+ case ActionTypes.showClock:
+ case ActionTypes.showHours:
+ case ActionTypes.showMinutes:
+ case ActionTypes.showSeconds:
+ //make sure the clock is actually displaying
+ if (
+ !this.optionsStore.options.display.sideBySide &&
+ this.optionsStore.currentView !== 'clock'
+ ) {
+ //hide calendar
+ Collapse.hideImmediately(this.display.dateContainer);
+ //show clock
+ Collapse.showImmediately(this.display.timeContainer);
+ }
+ this.handleShowClockContainers(action);
+ break;
+ case ActionTypes.clear:
+ this.dates.setValue(null);
+ this.display._updateCalendarHeader();
+ break;
+ case ActionTypes.close:
+ this.display.hide();
+ break;
+ case ActionTypes.today: {
+ const today = new DateTime().setLocalization(
+ this.optionsStore.options.localization
+ );
+ this._eventEmitters.updateViewDate.emit(today);
+
+ //todo this this really a good idea?
+ if (this.validation.isValid(today, Unit.date))
+ this.dates.setValue(today, this.dates.lastPickedIndex);
+ break;
+ }
+ }
+ }
+
+ private handleShowClockContainers(action: ActionTypes) {
+ if (!this.display._hasTime) {
+ Namespace.errorMessages.throwError(
+ 'Cannot show clock containers when time is disabled.'
+ );
+ /* ignore coverage: should never happen */
+ return;
+ }
+
+ this.optionsStore.currentView = 'clock';
+ this.display.widget
+ .querySelectorAll(`.${Namespace.css.timeContainer} > div`)
+ .forEach(
+ (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')
+ );
+
+ let classToUse = '';
+ switch (action) {
+ case ActionTypes.showClock:
+ classToUse = Namespace.css.clockContainer;
+ this.display._update('clock');
+ break;
+ case ActionTypes.showHours:
+ classToUse = Namespace.css.hourContainer;
+ this.display._update(Unit.hours);
+ break;
+ case ActionTypes.showMinutes:
+ classToUse = Namespace.css.minuteContainer;
+ this.display._update(Unit.minutes);
+ break;
+ case ActionTypes.showSeconds:
+ classToUse = Namespace.css.secondContainer;
+ this.display._update(Unit.seconds);
+ break;
+ }
+
+ ((
+ this.display.widget.getElementsByClassName(classToUse)[0]
+ )).style.display = 'grid';
+ }
+
+ private handleNextPrevious(action: ActionTypes) {
+ const { unit, step } =
+ CalendarModes[this.optionsStore.currentCalendarViewMode];
+ if (action === ActionTypes.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
+ */
+ private hideOrClock(e) {
+ if (
+ !this.optionsStore.isTwelveHour &&
+ !this.optionsStore.options.display.components.minutes &&
+ !this.optionsStore.options.display.keepOpen &&
+ !this.optionsStore.options.display.inline
+ ) {
+ this.display.hide();
+ } else {
+ this.do(e, ActionTypes.showClock);
+ }
+ }
+
+ /**
+ * Common function to manipulate {@link lastPicked} by `unit`.
+ * @param lastPicked
+ * @param unit
+ * @param value Value to change by
+ */
+ private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {
+ const newDate = lastPicked.manipulate(value, unit);
+ if (this.validation.isValid(newDate, unit)) {
+ this.dates.setValue(newDate, this.dates.lastPickedIndex);
+ }
+ }
+
+ private handleSelectCalendarMode(
+ action:
+ | ActionTypes.selectMonth
+ | ActionTypes.selectYear
+ | ActionTypes.selectDecade,
+ currentTarget: HTMLElement
+ ) {
+ const value = +currentTarget.dataset.value;
+ switch (action) {
+ case ActionTypes.selectMonth:
+ this.optionsStore.viewDate.month = value;
+ break;
+ case ActionTypes.selectYear:
+ case ActionTypes.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);
+ }
+ }
+
+ private handleToggle(currentTarget: HTMLElement) {
+ 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.showClock);
+ this.display._update('clock');
+ }
+ }
+
+ this.display.widget
+ .querySelectorAll(
+ `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`
+ )
+ .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));
+ this._eventEmitters.viewUpdate.emit();
+ }
+
+ private handleSelectDay(currentTarget: HTMLElement) {
+ const day = this.optionsStore.viewDate.clone;
+ if (currentTarget.classList.contains(Namespace.css.old)) {
+ day.manipulate(-1, Unit.month);
+ }
+ if (currentTarget.classList.contains(Namespace.css.new)) {
+ day.manipulate(1, Unit.month);
+ }
+
+ day.date = +currentTarget.dataset.day;
+ if (this.optionsStore.options.dateRange) this.handleDateRange(day);
+ else if (this.optionsStore.options.multipleDates) {
+ this.handleMultiDate(day);
+ } 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.optionsStore.options.dateRange
+ ) {
+ this.display.hide();
+ }
+ }
+
+ private handleMultiDate(day: DateTime) {
+ let index = this.dates.pickedIndex(day, Unit.date);
+ console.log(index);
+ if (index !== -1) {
+ this.dates.setValue(null, index); //deselect multi-date
+ } else {
+ index = this.dates.lastPickedIndex + 1;
+ if (this.dates.picked.length === 0) index = 0;
+
+ this.dates.setValue(day, index);
+ }
+ }
+
+ private handleDateRange(day: DateTime) {
+ switch (this.dates.picked.length) {
+ case 2: {
+ this.dates.clear();
+ break;
+ }
+ case 1: {
+ const other = this.dates.picked[0];
+ if (day.getTime() === other.getTime()) {
+ this.dates.clear();
+ break;
+ }
+ if (day.isBefore(other)) {
+ this.dates.setValue(day, 0);
+ this.dates.setValue(other, 1);
+ return;
+ } else {
+ this.dates.setValue(day, 1);
+ return;
+ }
+ }
+ }
+
+ this.dates.setValue(day, 0);
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/dates.ts b/node_modules/@eonasdan/tempus-dominus/src/js/dates.ts
new file mode 100644
index 0000000..cf2fe90
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/dates.ts
@@ -0,0 +1,284 @@
+import { DateTime, getFormatByUnit, Unit } from './datetime';
+import Namespace from './utilities/namespace';
+import { ChangeEvent, FailEvent } from './utilities/event-types';
+import Validation from './validation';
+import { serviceLocator } from './utilities/service-locator';
+import { EventEmitters } from './utilities/event-emitter';
+import { OptionsStore } from './utilities/optionsStore';
+import { OptionConverter } from './utilities/optionConverter';
+
+export default class Dates {
+ private _dates: DateTime[] = [];
+ private optionsStore: OptionsStore;
+ private validation: Validation;
+ private _eventEmitters: EventEmitters;
+
+ constructor() {
+ this.optionsStore = serviceLocator.locate(OptionsStore);
+ this.validation = serviceLocator.locate(Validation);
+ this._eventEmitters = serviceLocator.locate(EventEmitters);
+ }
+
+ /**
+ * Returns the array of selected dates
+ */
+ get picked(): DateTime[] {
+ return [...this._dates];
+ }
+
+ /**
+ * Returns the last picked value.
+ */
+ get lastPicked(): DateTime {
+ return this._dates[this.lastPickedIndex]?.clone;
+ }
+
+ /**
+ * Returns the length of picked dates -1 or 0 if none are selected.
+ */
+ get lastPickedIndex(): number {
+ 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: DateTime): string {
+ if (!date) return '';
+ date.localization = this.optionsStore.options.localization;
+ return date.format();
+ }
+
+ /**
+ * parse the value into a DateTime object.
+ * this can be overwritten to supply your own parsing.
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ parseInput(value: any): DateTime {
+ 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
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ setFromInput(value: any, index?: number) {
+ if (!value) {
+ this.setValue(undefined, index);
+ return;
+ }
+ const converted = this.parseInput(value);
+ if (converted) {
+ converted.setLocalization(this.optionsStore.options.localization);
+ this.setValue(converted, index);
+ }
+ }
+
+ /**
+ * Adds a new DateTime to selected dates array
+ * @param date
+ */
+ add(date: DateTime): void {
+ 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: DateTime, unit?: Unit): boolean {
+ if (!DateTime.isValid(targetDate)) return false;
+ if (!unit)
+ return this._dates.find((x) => x.isSame(targetDate)) !== undefined;
+
+ const format = getFormatByUnit(unit);
+
+ const 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: DateTime, unit?: Unit): number {
+ if (!DateTime.isValid(targetDate)) return -1;
+ if (!unit)
+ return this._dates.map((x) => x.valueOf()).indexOf(targetDate.valueOf());
+
+ const format = getFormatByUnit(unit);
+
+ const 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,
+ } as ChangeEvent);
+ this._dates = [];
+ if (this.optionsStore.input) this.optionsStore.input.value = '';
+ this._eventEmitters.updateDisplay.emit('all');
+ }
+
+ /**
+ * 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] {
+ const step = factor / 10,
+ startYear = Math.floor(year / factor) * factor,
+ endYear = startYear + step * 9,
+ focusValue = Math.floor(year / step) * step;
+ return [startYear, endYear, focusValue];
+ }
+
+ updateInput(target?: DateTime) {
+ if (!this.optionsStore.input) return;
+
+ let newValue = this.formatInput(target);
+ if (
+ this.optionsStore.options.multipleDates ||
+ this.optionsStore.options.dateRange
+ ) {
+ newValue = this._dates
+ .map((d) => this.formatInput(d))
+ .join(this.optionsStore.options.multipleDatesSeparator);
+ }
+ if (this.optionsStore.input.value != newValue)
+ this.optionsStore.input.value = newValue;
+ }
+
+ /**
+ * 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 {
+ const noIndex = typeof index === 'undefined',
+ isClear = !target && noIndex;
+ let oldDate = this.optionsStore.unset ? null : this._dates[index]?.clone;
+ if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {
+ oldDate = this.lastPicked;
+ }
+
+ if (target && oldDate?.isSame(target)) {
+ this.updateInput(target);
+ return;
+ }
+
+ // case of calling setValue(null)
+ if (!target) {
+ this._setValueNull(isClear, index, oldDate);
+ 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.startOf(Unit.minutes);
+ }
+
+ const onUpdate = (isValid: boolean) => {
+ this._dates[index] = target;
+ this._eventEmitters.updateViewDate.emit(target.clone);
+
+ this.updateInput(target);
+
+ this.optionsStore.unset = false;
+ this._eventEmitters.updateDisplay.emit('all');
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.change,
+ date: target,
+ oldDate,
+ isClear,
+ isValid: isValid,
+ } as ChangeEvent);
+ };
+
+ if (
+ this.validation.isValid(target) &&
+ this.validation.dateRangeIsValid(this.picked, index, target)
+ ) {
+ onUpdate(true);
+ return;
+ }
+
+ if (this.optionsStore.options.keepInvalid) {
+ onUpdate(false);
+ }
+
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.error,
+ reason: Namespace.errorMessages.failedToSetInvalidDate,
+ date: target,
+ oldDate,
+ } as FailEvent);
+ }
+
+ private _setValueNull(isClear: boolean, index: number, oldDate: DateTime) {
+ if (
+ !this.optionsStore.options.multipleDates ||
+ this._dates.length === 1 ||
+ isClear
+ ) {
+ this.optionsStore.unset = true;
+ this._dates = [];
+ } else {
+ this._dates.splice(index, 1);
+ }
+
+ this.updateInput();
+
+ this._eventEmitters.triggerEvent.emit({
+ type: Namespace.events.change,
+ date: undefined,
+ oldDate,
+ isClear,
+ isValid: true,
+ } as ChangeEvent);
+
+ this._eventEmitters.updateDisplay.emit('all');
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/datetime.ts b/node_modules/@eonasdan/tempus-dominus/src/js/datetime.ts
new file mode 100644
index 0000000..fb03a46
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/datetime.ts
@@ -0,0 +1,1039 @@
+import { FormatLocalization } from './utilities/options';
+import Namespace from './utilities/namespace';
+import DefaultFormatLocalization from './utilities/default-format-localization';
+
+type parsedTime = {
+ afternoon?: boolean;
+ year?: number;
+ month?: number;
+ day?: number;
+ hours?: number;
+ minutes?: number;
+ seconds?: number;
+ milliseconds?: number;
+ zone?: {
+ offset: number;
+ };
+};
+
+export enum Unit {
+ seconds = 'seconds',
+ minutes = 'minutes',
+ hours = 'hours',
+ date = 'date',
+ month = 'month',
+ year = 'year',
+}
+
+const twoDigitTemplate = {
+ month: '2-digit',
+ day: '2-digit',
+ year: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+};
+
+export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {
+ timeStyle?: 'short' | 'medium' | 'long';
+ dateStyle?: 'short' | 'medium' | 'long' | 'full';
+ numberingSystem?: string;
+}
+
+/**
+ * Returns an Intl format object based on the provided object
+ * @param unit
+ */
+export const getFormatByUnit = (unit: Unit): object => {
+ switch (unit) {
+ case 'date':
+ return { dateStyle: 'short' };
+ case 'month':
+ return {
+ month: 'numeric',
+ year: 'numeric',
+ };
+ case 'year':
+ return { year: 'numeric' };
+ }
+};
+
+/**
+ * Attempts to guess the hour cycle of the given local
+ * @param locale
+ */
+export const guessHourCycle = (locale: string): Intl.LocaleHourCycleKey => {
+ if (!locale) return 'h12';
+
+ // noinspection SpellCheckingInspection
+ const template = {
+ hour: '2-digit',
+ minute: '2-digit',
+ numberingSystem: 'latn',
+ };
+
+ const dt = new DateTime().setLocalization({ locale });
+ dt.hours = 0;
+
+ const start = dt.parts(undefined, template).hour;
+
+ //midnight is 12 so en-US style 12 AM
+ if (start === '12') return 'h12';
+ //midnight is 24 is from 00-24
+ if (start === '24') return 'h24';
+
+ dt.hours = 23;
+ const end = dt.parts(undefined, template).hour;
+
+ //if midnight is 00 and hour 23 is 11 then
+ if (start === '00' && end === '11') return 'h11';
+
+ if (start === '00' && end === '23') return 'h23';
+
+ console.warn(
+ `couldn't determine hour cycle for ${locale}. start: ${start}. end: ${end}`
+ );
+
+ return undefined;
+};
+
+interface FormatMatch {
+ parser: (obj: parsedTime, input: number) => void;
+ pattern?: RegExp;
+}
+
+interface FormatMatchString {
+ parser: (obj: parsedTime, input: string) => void;
+ pattern?: RegExp;
+}
+
+interface FormatExpression {
+ t: FormatMatchString;
+ T: FormatMatchString;
+ fff: FormatMatch;
+ s: FormatMatch;
+ ss: FormatMatch;
+ m: FormatMatch;
+ mm: FormatMatch;
+ H: FormatMatch;
+ h: FormatMatch;
+ HH: FormatMatch;
+ hh: FormatMatch;
+ d: FormatMatch;
+ dd: FormatMatch;
+ Do: FormatMatchString;
+ M: FormatMatch;
+ MM: FormatMatch;
+ MMM: FormatMatchString;
+ MMMM: FormatMatchString;
+ y: FormatMatch;
+ yy: FormatMatch;
+ yyyy: FormatMatch;
+}
+
+/**
+ * For the most part this object behaves exactly the same way
+ * as the native Date object with a little extra spice.
+ */
+export class DateTime extends Date {
+ localization: FormatLocalization = DefaultFormatLocalization;
+
+ /**
+ * Chainable way to set the {@link locale}
+ * @param value
+ * @deprecated use setLocalization with a FormatLocalization object instead
+ */
+ setLocale(value: string): this {
+ if (!this.localization) {
+ this.localization = DefaultFormatLocalization;
+ this.localization.locale = value;
+ }
+ return this;
+ }
+
+ /**
+ * Chainable way to set the {@link localization}
+ * @param value
+ */
+ setLocalization(value: FormatLocalization): this {
+ this.localization = value;
+ return this;
+ }
+
+ /**
+ * Converts a plain JS date object to a DateTime object.
+ * Doing this allows access to format, etc.
+ * @param date
+ * @param locale this parameter is deprecated. Use formatLocalization instead.
+ * @param formatLocalization
+ */
+ static convert(
+ date: Date,
+ locale = 'default',
+ formatLocalization: FormatLocalization = undefined
+ ): DateTime {
+ if (!date) throw new Error(`A date is required`);
+
+ if (!formatLocalization) {
+ formatLocalization = DefaultFormatLocalization;
+ formatLocalization.locale = locale;
+ }
+
+ return new DateTime(
+ date.getFullYear(),
+ date.getMonth(),
+ date.getDate(),
+ date.getHours(),
+ date.getMinutes(),
+ date.getSeconds(),
+ date.getMilliseconds()
+ ).setLocalization(formatLocalization);
+ }
+
+ /**
+ * 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()
+ ).setLocalization(this.localization);
+ }
+
+ static isValid(d): boolean {
+ if (d === undefined || JSON.stringify(d) === 'null') return false;
+ if (d.constructor.name === DateTime.name) return true;
+ return false;
+ }
+
+ /**
+ * 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 = 0): this {
+ 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(Unit.date);
+ if (this.weekDay === startOfTheWeek) break;
+ const goBack = (this.weekDay - startOfTheWeek + 7) % 7;
+ this.manipulate(goBack * -1, Unit.date);
+ break;
+ }
+ case 'month':
+ this.startOf(Unit.date);
+ this.setDate(1);
+ break;
+ case 'year':
+ this.startOf(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: Unit | 'weekDay', startOfTheWeek = 0): this {
+ 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(Unit.date);
+ const endOfWeek = 6 + startOfTheWeek;
+ if (this.weekDay === endOfWeek) break;
+ this.manipulate(endOfWeek - this.weekDay, Unit.date);
+ break;
+ }
+ case 'month':
+ this.endOf(Unit.date);
+ this.manipulate(1, Unit.month);
+ this.setDate(0);
+ break;
+ case 'year':
+ this.endOf(Unit.date);
+ this.setMonth(11, 31);
+ 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: number, unit: Unit): this {
+ if (this[unit] === undefined)
+ throw new Error(`Unit '${unit}' is not valid`);
+ this[unit] += value;
+ return 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
+ * comparison.
+ */
+ isBefore(compare: DateTime, unit?: Unit): boolean {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare)) return false;
+
+ 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
+ * comparison.
+ */
+ isAfter(compare: DateTime, unit?: Unit): boolean {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare)) return false;
+
+ 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
+ * comparison.
+ */
+ isSame(compare: DateTime, unit?: Unit): boolean {
+ // If the comparisons is undefined, return false
+ if (!DateTime.isValid(compare)) return false;
+
+ 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: DateTime,
+ right: DateTime,
+ unit?: Unit,
+ inclusivity: '()' | '[]' | '(]' | '[)' = '()'
+ ): boolean {
+ // If one of the comparisons is undefined, return false
+ if (!DateTime.isValid(left) || !DateTime.isValid(right)) return false;
+ // If a unit is provided and is not a valid property of the DateTime object, throw an error
+ if (unit && this[unit] === undefined) {
+ throw new Error(`Unit '${unit}' is not valid`);
+ }
+
+ const leftInclusivity = inclusivity[0] === '(';
+ const rightInclusivity = inclusivity[1] === ')';
+
+ const isLeftInRange = leftInclusivity
+ ? this.isAfter(left, unit)
+ : !this.isBefore(left, unit);
+ const isRightInRange = rightInclusivity
+ ? this.isBefore(right, unit)
+ : !this.isAfter(right, unit);
+
+ return isLeftInRange && isRightInRange;
+ }
+
+ /**
+ * Returns flattened object of the date. Does not include literals
+ * @param locale
+ * @param template
+ */
+ parts(
+ locale = this.localization.locale,
+ template: Record = { dateStyle: 'full', timeStyle: 'long' }
+ ): Record {
+ 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(): number {
+ return this.getSeconds();
+ }
+
+ /**
+ * Shortcut to Date.setSeconds()
+ */
+ set seconds(value: number) {
+ this.setSeconds(value);
+ }
+
+ /**
+ * Returns two digit hours
+ */
+ get secondsFormatted(): string {
+ return this.parts(undefined, twoDigitTemplate).second;
+ }
+
+ /**
+ * Shortcut to Date.getMinutes()
+ */
+ get minutes(): number {
+ return this.getMinutes();
+ }
+
+ /**
+ * Shortcut to Date.setMinutes()
+ */
+ set minutes(value: number) {
+ this.setMinutes(value);
+ }
+
+ /**
+ * Returns two digit minutes
+ */
+ get minutesFormatted(): string {
+ return this.parts(undefined, twoDigitTemplate).minute;
+ }
+
+ /**
+ * Shortcut to Date.getHours()
+ */
+ get hours(): number {
+ return this.getHours();
+ }
+
+ /**
+ * Shortcut to Date.setHours()
+ */
+ set hours(value: number) {
+ this.setHours(value);
+ }
+
+ /**
+ * Returns two digit hour, e.g. 01...10
+ * @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.
+ */
+ getHoursFormatted(hourCycle: Intl.LocaleHourCycleKey = 'h12') {
+ return this.parts(undefined, { ...twoDigitTemplate, hourCycle: hourCycle })
+ .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: string = this.localization.locale): string {
+ return new Intl.DateTimeFormat(locale, {
+ hour: 'numeric',
+ hour12: true,
+ })
+ .formatToParts(this)
+ .find((p) => p.type === 'dayPeriod')?.value;
+ }
+
+ /**
+ * Shortcut to Date.getDate()
+ */
+ get date(): number {
+ return this.getDate();
+ }
+
+ /**
+ * Shortcut to Date.setDate()
+ */
+ set date(value: number) {
+ this.setDate(value);
+ }
+
+ /**
+ * Return two digit date
+ */
+ get dateFormatted(): string {
+ return this.parts(undefined, twoDigitTemplate).day;
+ }
+
+ /**
+ * Shortcut to Date.getDay()
+ */
+ get weekDay(): number {
+ return this.getDay();
+ }
+
+ /**
+ * Shortcut to Date.getMonth()
+ */
+ get month(): number {
+ return this.getMonth();
+ }
+
+ /**
+ * Shortcut to Date.setMonth()
+ */
+ set month(value: number) {
+ 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(): string {
+ return this.parts(undefined, twoDigitTemplate).month;
+ }
+
+ /**
+ * Shortcut to Date.getFullYear()
+ */
+ get year(): number {
+ return this.getFullYear();
+ }
+
+ /**
+ * Shortcut to Date.setFullYear()
+ */
+ set year(value: number) {
+ this.setFullYear(value);
+ }
+
+ // borrowed a bunch of stuff from Luxon
+ /**
+ * Gets the week of the year
+ */
+ get week(): number {
+ const ordinal = this.computeOrdinal(),
+ weekday = this.getUTCDay();
+
+ let weekNumber = Math.floor((ordinal - weekday + 10) / 7);
+
+ if (weekNumber < 1) {
+ weekNumber = this.weeksInWeekYear();
+ } else if (weekNumber > this.weeksInWeekYear()) {
+ weekNumber = 1;
+ }
+
+ return weekNumber;
+ }
+
+ /**
+ * Returns the number of weeks in the year
+ */
+ weeksInWeekYear() {
+ const p1 =
+ (this.year +
+ Math.floor(this.year / 4) -
+ Math.floor(this.year / 100) +
+ Math.floor(this.year / 400)) %
+ 7,
+ last = this.year - 1,
+ p2 =
+ (last +
+ Math.floor(last / 4) -
+ Math.floor(last / 100) +
+ Math.floor(last / 400)) %
+ 7;
+ return p1 === 4 || p2 === 3 ? 53 : 52;
+ }
+
+ /**
+ * Returns true or false depending on if the year is a leap year or not.
+ */
+ get isLeapYear() {
+ return (
+ this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0)
+ );
+ }
+
+ private computeOrdinal() {
+ return (
+ this.date +
+ (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month]
+ );
+ }
+
+ private nonLeapLadder = [
+ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,
+ ];
+ private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
+
+ //#region CDF stuff
+
+ private dateTimeRegex =
+ //is regex cannot be simplified beyond what it already is
+ /(\[[^[\]]*])|y{1,4}|M{1,4}|d{1,4}|H{1,2}|h{1,2}|t|T|m{1,2}|s{1,2}|f{3}/g; //NOSONAR
+
+ private formattingTokens =
+ /(\[[^[\]]*])|([-_:/.,()\s]+)|(T|t|yyyy|yy?|MM?M?M?|Do|dd?|hh?|HH?|mm?|ss?)/g; //NOSONAR is regex cannot be simplified beyond what it already is
+
+ /**
+ * Returns a list of month values based on the current locale
+ */
+ private getAllMonths(
+ format: '2-digit' | 'numeric' | 'long' | 'short' | 'narrow' = 'long'
+ ) {
+ const applyFormat = new Intl.DateTimeFormat(this.localization.locale, {
+ month: format,
+ }).format;
+ return [...Array(12).keys()].map((m) => applyFormat(new Date(2021, m)));
+ }
+
+ /**
+ * Replaces an expanded token set (e.g. LT/LTS)
+ */
+ private replaceTokens(formatStr, formats) {
+ /***
+ * _ => match
+ * a => first capture group. Anything between [ and ]
+ * b => second capture group
+ */
+ return formatStr.replace(
+ /(\[[^[\]]*])|(LTS?|l{1,4}|L{1,4})/g,
+ (_, a, b) => {
+ const B = b && b.toUpperCase();
+ return a || formats[B] || DefaultFormatLocalization.dateFormats[B];
+ }
+ );
+ }
+
+ private match2 = /\d\d/; // 00 - 99
+ private match3 = /\d{3}/; // 000 - 999
+ private match4 = /\d{4}/; // 0000 - 9999
+ private match1to2 = /\d\d?/; // 0 - 99
+ private matchSigned = /[+-]?\d+/; // -inf - inf
+ private matchOffset = /[+-]\d\d:?(\d\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z
+ private matchWord = /[^\d_:/,\-()\s]+/; // Word
+
+ private parseTwoDigitYear(input: number) {
+ return input + (input > 68 ? 1900 : 2000);
+ }
+
+ private offsetFromString(input: string) {
+ if (!input) return 0;
+ if (input === 'Z') return 0;
+ const [first, second, third] = input.match(/([+-]|\d\d)/g);
+ const minutes = +second * 60 + (+third || 0);
+ const signed = first === '+' ? -minutes : minutes;
+ return minutes === 0 ? 0 : signed; // eslint-disable-line no-nested-ternary
+ }
+
+ /**
+ * z = -4, zz = -04, zzz = -0400
+ * @param date
+ * @param style
+ * @private
+ */
+ private zoneInformation(date: DateTime, style: 'z' | 'zz' | 'zzz') {
+ let name = date
+ .parts(this.localization.locale, { timeZoneName: 'longOffset' })
+ .timeZoneName.replace('GMT', '')
+ .replace(':', '');
+
+ const negative = name.includes('-');
+
+ name = name.replace('-', '');
+
+ if (style === 'z') name = name.substring(1, 2);
+ else if (style === 'zz') name = name.substring(0, 2);
+
+ return `${negative ? '-' : ''}${name}`;
+ }
+
+ private zoneExpressions = [
+ this.matchOffset,
+ (obj, input) => {
+ obj.offset = this.offsetFromString(input);
+ },
+ ];
+
+ private addInput(property) {
+ return (obj, input) => {
+ obj[property] = +input;
+ };
+ }
+
+ private getLocaleAfternoon(): string {
+ return new Intl.DateTimeFormat(this.localization.locale, {
+ hour: 'numeric',
+ hour12: true,
+ })
+ .formatToParts(new Date(2022, 3, 4, 13))
+ .find((p) => p.type === 'dayPeriod')
+ ?.value?.replace(/\s+/g, ' ');
+ }
+
+ private meridiemMatch(input: string) {
+ return input.toLowerCase() === this.getLocaleAfternoon().toLowerCase();
+ }
+
+ private expressions: FormatExpression = {
+ t: {
+ pattern: undefined, //this.matchWord,
+ parser: (obj, input) => {
+ obj.afternoon = this.meridiemMatch(input);
+ },
+ },
+ T: {
+ pattern: undefined, //this.matchWord,
+ parser: (obj, input) => {
+ obj.afternoon = this.meridiemMatch(input);
+ },
+ },
+ fff: {
+ pattern: this.match3,
+ parser: (obj, input) => {
+ obj.milliseconds = +input;
+ },
+ },
+ s: {
+ pattern: this.match1to2,
+ parser: this.addInput('seconds'),
+ },
+ ss: {
+ pattern: this.match1to2,
+ parser: this.addInput('seconds'),
+ },
+ m: {
+ pattern: this.match1to2,
+ parser: this.addInput('minutes'),
+ },
+ mm: {
+ pattern: this.match1to2,
+ parser: this.addInput('minutes'),
+ },
+ H: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ h: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ HH: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ hh: {
+ pattern: this.match1to2,
+ parser: this.addInput('hours'),
+ },
+ d: {
+ pattern: this.match1to2,
+ parser: this.addInput('day'),
+ },
+ dd: {
+ pattern: this.match2,
+ parser: this.addInput('day'),
+ },
+ Do: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ obj.day = +(input.match(/\d+/)[0] || 1);
+ if (!this.localization.ordinal) return;
+ for (let i = 1; i <= 31; i += 1) {
+ if (this.localization.ordinal(i).replace(/[[\]]/g, '') === input) {
+ obj.day = i;
+ }
+ }
+ },
+ },
+ M: {
+ pattern: this.match1to2,
+ parser: this.addInput('month'),
+ },
+ MM: {
+ pattern: this.match2,
+ parser: this.addInput('month'),
+ },
+ MMM: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ const months = this.getAllMonths();
+ const monthsShort = this.getAllMonths('short');
+ const matchIndex =
+ (monthsShort || months.map((_) => _.slice(0, 3))).indexOf(input) + 1;
+ if (matchIndex < 1) {
+ throw new Error();
+ }
+ obj.month = matchIndex % 12 || matchIndex;
+ },
+ },
+ MMMM: {
+ pattern: this.matchWord,
+ parser: (obj, input) => {
+ const months = this.getAllMonths();
+ const matchIndex = months.indexOf(input) + 1;
+ if (matchIndex < 1) {
+ throw new Error();
+ }
+ obj.month = matchIndex % 12 || matchIndex;
+ },
+ },
+ y: {
+ pattern: this.matchSigned,
+ parser: this.addInput('year'),
+ },
+ yy: {
+ pattern: this.match2,
+ parser: (obj, input) => {
+ obj.year = this.parseTwoDigitYear(+input);
+ },
+ },
+ yyyy: {
+ pattern: this.match4,
+ parser: this.addInput('year'),
+ },
+ // z: this.zoneExpressions,
+ // zz: this.zoneExpressions,
+ // zzz: this.zoneExpressions
+ };
+
+ private correctHours(time) {
+ const { afternoon } = time;
+ if (afternoon !== undefined) {
+ const { hours } = time;
+ if (afternoon) {
+ if (hours < 12) {
+ time.hours += 12;
+ }
+ } else if (hours === 12) {
+ time.hours = 0;
+ }
+ delete time.afternoon;
+ }
+ }
+
+ private makeParser(format: string) {
+ format = this.replaceTokens(format, this.localization.dateFormats);
+ const matchArray = format.match(this.formattingTokens);
+ const { length } = matchArray;
+ const expressionArray: (FormatMatch | string)[] = [];
+ for (let i = 0; i < length; i += 1) {
+ const token = matchArray[i];
+ const expression = this.expressions[token] as FormatMatch;
+ if (expression?.parser) {
+ expressionArray[i] = expression;
+ } else {
+ expressionArray[i] = (token as string).replace(/^\[[^[\]]*]$/g, '');
+ }
+ }
+
+ return (input: string): parsedTime => {
+ const time = {
+ hours: 0,
+ minutes: 0,
+ seconds: 0,
+ milliseconds: 0,
+ };
+ for (let i = 0, start = 0; i < length; i += 1) {
+ const token = expressionArray[i];
+ if (typeof token === 'string') {
+ start += token.length;
+ } else {
+ const part = input.slice(start);
+ let value = part;
+
+ if (token.pattern) {
+ const match = token.pattern.exec(part);
+ value = match[0];
+ }
+ token.parser.call(this, time, value);
+ input = input.replace(value, '');
+ }
+ }
+ this.correctHours(time);
+ return time;
+ };
+ }
+
+ /**
+ * Attempts to create a DateTime from a string.
+ * @param input date as string
+ * @param localization provides the date template the string is in via the format property
+ */
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ static fromString(input: string, localization: FormatLocalization): DateTime {
+ if (!localization?.format) {
+ Namespace.errorMessages.customDateFormatError('No format was provided');
+ }
+ try {
+ const dt = new DateTime();
+ dt.setLocalization(localization);
+ if (['x', 'X'].indexOf(localization.format) > -1)
+ return new DateTime((localization.format === 'X' ? 1000 : 1) * +input);
+
+ input = input.replace(/\s+/g, ' ');
+ const parser = dt.makeParser(localization.format);
+ const { year, month, day, hours, minutes, seconds, milliseconds, zone } =
+ parser(input);
+ const d = day || (!year && !month ? dt.getDate() : 1);
+ const y = year || dt.getFullYear();
+ let M = 0;
+ if (!(year && !month)) {
+ M = month > 0 ? month - 1 : dt.getMonth();
+ }
+ if (zone) {
+ return new DateTime(
+ Date.UTC(
+ y,
+ M,
+ d,
+ hours,
+ minutes,
+ seconds,
+ milliseconds + zone.offset * 60 * 1000
+ )
+ );
+ }
+ return new DateTime(y, M, d, hours, minutes, seconds, milliseconds);
+ } catch (e) {
+ Namespace.errorMessages.customDateFormatError(
+ `Unable to parse provided input: ${input}, format: ${localization.format}`
+ );
+ }
+ }
+
+ /**
+ * 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 optional object. If provided, method will use Intl., otherwise the localizations format properties
+ * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.
+ */
+ format(
+ template?: DateTimeFormatOptions | string,
+ locale = this.localization.locale
+ ): string {
+ if (template && typeof template === 'object')
+ return new Intl.DateTimeFormat(locale, template).format(this);
+
+ const formatString = this.replaceTokens(
+ //try template first
+ template ||
+ //otherwise try localization format
+ this.localization.format ||
+ //otherwise try date + time
+ `${DefaultFormatLocalization.dateFormats.L}, ${DefaultFormatLocalization.dateFormats.LT}`,
+ this.localization.dateFormats
+ );
+
+ const formatter = (template) =>
+ new Intl.DateTimeFormat(this.localization.locale, template).format(this);
+
+ if (!this.localization.hourCycle)
+ this.localization.hourCycle = guessHourCycle(this.localization.locale);
+
+ //if the format asks for a twenty-four-hour string but the hour cycle is not, then make a base guess
+ const HHCycle = this.localization.hourCycle.startsWith('h1')
+ ? 'h24'
+ : this.localization.hourCycle;
+ const hhCycle = this.localization.hourCycle.startsWith('h2')
+ ? 'h12'
+ : this.localization.hourCycle;
+
+ const matches = {
+ y: this.year,
+ yy: formatter({ year: '2-digit' }),
+ yyyy: this.year,
+ M: formatter({ month: 'numeric' }),
+ MM: this.monthFormatted,
+ MMM: this.getAllMonths('short')[this.getMonth()],
+ MMMM: this.getAllMonths()[this.getMonth()],
+ d: this.date,
+ dd: this.dateFormatted,
+ ddd: formatter({ weekday: 'short' }),
+ dddd: formatter({ weekday: 'long' }),
+ H: this.getHours(),
+ HH: this.getHoursFormatted(HHCycle),
+ h: this.hours > 12 ? this.hours - 12 : this.hours,
+ hh: this.getHoursFormatted(hhCycle),
+ t: this.meridiem(),
+ T: this.meridiem().toUpperCase(),
+ m: this.minutes,
+ mm: this.minutesFormatted,
+ s: this.seconds,
+ ss: this.secondsFormatted,
+ fff: this.getMilliseconds(),
+ // z: this.zoneInformation(dateTime, 'z'), //-4
+ // zz: this.zoneInformation(dateTime, 'zz'), //-04
+ // zzz: this.zoneInformation(dateTime, 'zzz') //-0400
+ };
+
+ return formatString
+ .replace(this.dateTimeRegex, (match, $1) => {
+ return $1 || matches[match];
+ })
+ .replace(/\[/g, '')
+ .replace(/]/g, '');
+ }
+
+ //#endregion CDF stuff
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/date-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/date-display.ts
new file mode 100644
index 0000000..01ad586
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/date-display.ts
@@ -0,0 +1,338 @@
+import { DateTime, Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Validation from '../../validation';
+import Dates from '../../dates';
+import { Paint } from '../index';
+import { serviceLocator } from '../../utilities/service-locator';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates and updates the grid for `date`
+ */
+export default class DateDisplay {
+ private optionsStore: OptionsStore;
+ private dates: Dates;
+ private validation: Validation;
+
+ 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(): HTMLElement {
+ 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);
+ }
+
+ const { rangeHoverEvent, rangeHoverOutEvent } =
+ this.handleMouseEvents(container);
+
+ 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.selectDay);
+ container.appendChild(div);
+
+ // if hover is supported then add the events
+ if (
+ matchMedia('(hover: hover)').matches &&
+ this.optionsStore.options.dateRange
+ ) {
+ div.addEventListener('mouseover', rangeHoverEvent);
+ div.addEventListener('mouseout', rangeHoverOutEvent);
+ }
+ }
+
+ return container;
+ }
+
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget: HTMLElement, paint: Paint): void {
+ const container = widget.getElementsByClassName(
+ Namespace.css.daysContainer
+ )[0] as HTMLElement;
+
+ this._updateCalendarView(container);
+
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf(Unit.month)
+ .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)
+ .manipulate(12, Unit.hours);
+
+ this._handleCalendarWeeks(container, innerDate.clone);
+
+ container
+ .querySelectorAll(`[data-action="${ActionTypes.selectDay}"]`)
+ .forEach((element: HTMLElement) => {
+ const classes: string[] = [];
+ classes.push(Namespace.css.day);
+
+ if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {
+ classes.push(Namespace.css.old);
+ }
+ if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {
+ classes.push(Namespace.css.new);
+ }
+
+ if (
+ !this.optionsStore.unset &&
+ !this.optionsStore.options.dateRange &&
+ this.dates.isPicked(innerDate, Unit.date)
+ ) {
+ classes.push(Namespace.css.active);
+ }
+ if (!this.validation.isValid(innerDate, Unit.date)) {
+ classes.push(Namespace.css.disabled);
+ }
+ if (innerDate.isSame(new DateTime(), Unit.date)) {
+ classes.push(Namespace.css.today);
+ }
+ if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {
+ classes.push(Namespace.css.weekend);
+ }
+
+ this._handleDateRange(innerDate, classes);
+
+ paint(Unit.date, innerDate, classes, element);
+
+ element.classList.remove(...element.classList);
+ element.classList.add(...classes);
+ element.setAttribute('data-value', this._dateToDataValue(innerDate));
+ element.setAttribute('data-day', `${innerDate.date}`);
+ element.innerText = innerDate.parts(undefined, {
+ day: 'numeric',
+ }).day;
+ innerDate.manipulate(1, Unit.date);
+ });
+ }
+
+ private _dateToDataValue(date: DateTime): string {
+ if (!DateTime.isValid(date)) return '';
+
+ return `${date.year}-${date.monthFormatted}-${date.dateFormatted}`;
+ }
+
+ private _handleDateRange(innerDate: DateTime, classes: string[]) {
+ const rangeStart = this.dates.picked[0];
+ const rangeEnd = this.dates.picked[1];
+
+ if (this.optionsStore.options.dateRange) {
+ if (innerDate.isBetween(rangeStart, rangeEnd, Unit.date)) {
+ classes.push(Namespace.css.rangeIn);
+ }
+
+ if (innerDate.isSame(rangeStart, Unit.date)) {
+ classes.push(Namespace.css.rangeStart);
+ }
+
+ if (innerDate.isSame(rangeEnd, Unit.date)) {
+ classes.push(Namespace.css.rangeEnd);
+ }
+ }
+ }
+
+ private handleMouseEvents(container: HTMLElement) {
+ const rangeHoverEvent = (e: MouseEvent) => {
+ const currentTarget = e?.currentTarget as HTMLElement;
+
+ // if we have 0 or 2 selected or if the target is disabled then ignore
+ if (
+ this.dates.picked.length !== 1 ||
+ currentTarget.classList.contains(Namespace.css.disabled)
+ )
+ return;
+
+ // select all the date divs
+ const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];
+
+ // get the date value from the element being hovered over
+ const attributeValue = currentTarget.getAttribute('data-value');
+
+ // format the string to a date
+ const innerDate = DateTime.fromString(attributeValue, {
+ format: 'yyyy-MM-dd',
+ });
+
+ // find the position of the target in the date container
+ const dayIndex = allDays.findIndex(
+ (e) => e.getAttribute('data-value') === attributeValue
+ );
+
+ // find the first and second selected dates
+ const rangeStart = this.dates.picked[0];
+ const rangeEnd = this.dates.picked[1];
+
+ //format the start date so that it can be found by the attribute
+ const rangeStartFormatted = this._dateToDataValue(rangeStart);
+ const rangeStartIndex = allDays.findIndex(
+ (e) => e.getAttribute('data-value') === rangeStartFormatted
+ );
+ const rangeStartElement = allDays[rangeStartIndex];
+
+ //make sure we don't leave start/end classes if we don't need them
+ if (!innerDate.isSame(rangeStart, Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeStart);
+ }
+
+ if (!innerDate.isSame(rangeEnd, Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeEnd);
+ }
+
+ // the following figures out which direct from start date is selected
+ // the selection "cap" classes are applied if needed
+ // otherwise all the dates between will get the `rangeIn` class.
+ // We make this selection based on the element's index and the rangeStart index
+
+ let lambda: (_, index) => boolean;
+
+ if (innerDate.isBefore(rangeStart)) {
+ currentTarget.classList.add(Namespace.css.rangeStart);
+ rangeStartElement?.classList.remove(Namespace.css.rangeStart);
+ rangeStartElement?.classList.add(Namespace.css.rangeEnd);
+ lambda = (_, index) => index > dayIndex && index < rangeStartIndex;
+ } else {
+ currentTarget.classList.add(Namespace.css.rangeEnd);
+ rangeStartElement?.classList.remove(Namespace.css.rangeEnd);
+ rangeStartElement?.classList.add(Namespace.css.rangeStart);
+ lambda = (_, index) => index < dayIndex && index > rangeStartIndex;
+ }
+
+ allDays.filter(lambda).forEach((e) => {
+ e.classList.add(Namespace.css.rangeIn);
+ });
+ };
+
+ const rangeHoverOutEvent = (e: MouseEvent) => {
+ // find all the dates in the container
+ const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];
+
+ // if only the start is selected, remove all the rangeIn classes
+ // we do this because once the user hovers over a new date the range will be recalculated.
+ if (this.dates.picked.length === 1)
+ allDays.forEach((e) => e.classList.remove(Namespace.css.rangeIn));
+
+ // if we have 0 or 2 dates selected then ignore
+ if (this.dates.picked.length !== 1) return;
+
+ const currentTarget = e?.currentTarget as HTMLElement;
+
+ // get the elements date from the attribute value
+ const innerDate = new DateTime(currentTarget.getAttribute('data-value'));
+
+ // verify selections and remove invalid classes
+ if (!innerDate.isSame(this.dates.picked[0], Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeStart);
+ }
+
+ if (!innerDate.isSame(this.dates.picked[1], Unit.date)) {
+ currentTarget.classList.remove(Namespace.css.rangeEnd);
+ }
+ };
+
+ return { rangeHoverEvent, rangeHoverOutEvent };
+ }
+
+ private _updateCalendarView(container: Element) {
+ if (this.optionsStore.currentView !== 'calendar') return;
+ 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, Unit.month),
+ Unit.month
+ )
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+ this.validation.isValid(
+ this.optionsStore.viewDate.clone.manipulate(1, Unit.month),
+ Unit.month
+ )
+ ? next.classList.remove(Namespace.css.disabled)
+ : next.classList.add(Namespace.css.disabled);
+ }
+
+ /***
+ * Generates a html row that contains the days of the week.
+ * @private
+ */
+ private _daysOfTheWeek(): HTMLElement[] {
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)
+ .startOf(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
+ );
+ let weekDay = innerDate.format({ weekday: 'short' });
+ if (this.optionsStore.options.localization.maxWeekdayLength > 0)
+ weekDay = weekDay.substring(
+ 0,
+ this.optionsStore.options.localization.maxWeekdayLength
+ );
+ htmlDivElement.innerText = weekDay;
+ innerDate.manipulate(1, Unit.date);
+ row.push(htmlDivElement);
+ }
+
+ return row;
+ }
+
+ private _handleCalendarWeeks(container: HTMLElement, innerDate: DateTime) {
+ [...container.querySelectorAll(`.${Namespace.css.calendarWeeks}`)]
+ .filter((e: HTMLElement) => e.innerText !== '#')
+ .forEach((element: HTMLElement) => {
+ element.innerText = `${innerDate.week}`;
+ innerDate.manipulate(7, Unit.date);
+ });
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/decade-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/decade-display.ts
new file mode 100644
index 0000000..261e05e
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/decade-display.ts
@@ -0,0 +1,130 @@
+import Dates from '../../dates';
+import { DateTime, Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Validation from '../../validation';
+import { Paint } from '../index';
+import { serviceLocator } from '../../utilities/service-locator';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates and updates the grid for `seconds`
+ */
+export default class DecadeDisplay {
+ private _startDecade: DateTime;
+ private _endDecade: DateTime;
+ private optionsStore: OptionsStore;
+ private dates: Dates;
+ private validation: Validation;
+
+ 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.selectDecade);
+ container.appendChild(div);
+ }
+ return container;
+ }
+
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget: HTMLElement, paint: Paint) {
+ const [start, end] = Dates.getStartEndYear(
+ 100,
+ this.optionsStore.viewDate.year
+ );
+ this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);
+ this._startDecade.year = start;
+ this._endDecade = this.optionsStore.viewDate.clone.startOf(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, Unit.year)
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+ this.validation.isValid(this._endDecade, 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.selectDecade}"]`)
+ .forEach((containerClone: HTMLElement, 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, Unit.year)
+ .format({ year: 'numeric' });
+ containerClone.setAttribute(
+ 'data-value',
+ `${this._startDecade.year}`
+ );
+ return;
+ }
+ }
+
+ const 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, Unit.year);
+ });
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/month-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/month-display.ts
new file mode 100644
index 0000000..431631e
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/month-display.ts
@@ -0,0 +1,105 @@
+import { Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Validation from '../../validation';
+import Dates from '../../dates';
+import { Paint } from '../index';
+import { serviceLocator } from '../../utilities/service-locator';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates and updates the grid for `month`
+ */
+export default class MonthDisplay {
+ private optionsStore: OptionsStore;
+ private dates: Dates;
+ private validation: Validation;
+
+ 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(): HTMLElement {
+ 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.selectMonth);
+ container.appendChild(div);
+ }
+
+ return container;
+ }
+
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget: HTMLElement, paint: Paint): void {
+ 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, Unit.year),
+ Unit.year
+ )
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+
+ this.validation.isValid(
+ this.optionsStore.viewDate.clone.manipulate(1, Unit.year),
+ Unit.year
+ )
+ ? next.classList.remove(Namespace.css.disabled)
+ : next.classList.add(Namespace.css.disabled);
+ }
+
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);
+
+ container
+ .querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`)
+ .forEach((containerClone: HTMLElement, index) => {
+ const classes = [];
+ classes.push(Namespace.css.month);
+
+ if (
+ !this.optionsStore.unset &&
+ this.dates.isPicked(innerDate, Unit.month)
+ ) {
+ classes.push(Namespace.css.active);
+ }
+ if (!this.validation.isValid(innerDate, Unit.month)) {
+ classes.push(Namespace.css.disabled);
+ }
+
+ paint(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, Unit.month);
+ });
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/year-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/year-display.ts
new file mode 100644
index 0000000..27e2880
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/year-display.ts
@@ -0,0 +1,112 @@
+import { DateTime, Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Dates from '../../dates';
+import Validation from '../../validation';
+import { Paint } from '../index';
+import { serviceLocator } from '../../utilities/service-locator';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates and updates the grid for `year`
+ */
+export default class YearDisplay {
+ private _startYear: DateTime;
+ private _endYear: DateTime;
+ private optionsStore: OptionsStore;
+ private dates: Dates;
+ private validation: Validation;
+
+ 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(): HTMLElement {
+ 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.selectYear);
+ container.appendChild(div);
+ }
+
+ return container;
+ }
+
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget: HTMLElement, paint: Paint) {
+ this._startYear = this.optionsStore.viewDate.clone.manipulate(
+ -1,
+ Unit.year
+ );
+ this._endYear = this.optionsStore.viewDate.clone.manipulate(10, 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, Unit.year)
+ ? previous.classList.remove(Namespace.css.disabled)
+ : previous.classList.add(Namespace.css.disabled);
+ this.validation.isValid(this._endYear, Unit.year)
+ ? next.classList.remove(Namespace.css.disabled)
+ : next.classList.add(Namespace.css.disabled);
+ }
+
+ const innerDate = this.optionsStore.viewDate.clone
+ .startOf(Unit.year)
+ .manipulate(-1, Unit.year);
+
+ container
+ .querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`)
+ .forEach((containerClone: HTMLElement) => {
+ const classes = [];
+ classes.push(Namespace.css.year);
+
+ if (
+ !this.optionsStore.unset &&
+ this.dates.isPicked(innerDate, Unit.year)
+ ) {
+ classes.push(Namespace.css.active);
+ }
+ if (!this.validation.isValid(innerDate, Unit.year)) {
+ classes.push(Namespace.css.disabled);
+ }
+
+ paint(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, Unit.year);
+ });
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/collapse.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/collapse.ts
new file mode 100644
index 0000000..1a73248
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/collapse.ts
@@ -0,0 +1,134 @@
+import Namespace from '../utilities/namespace';
+
+/**
+ * Provides a collapse functionality to the view changes
+ */
+export default class Collapse {
+ /**
+ * Flips the show/hide state of `target`
+ * @param target html element to affect.
+ */
+ static toggle(target: HTMLElement) {
+ 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: HTMLElement) {
+ 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: HTMLElement) {
+ if (
+ target.classList.contains(Namespace.css.collapsing) ||
+ target.classList.contains(Namespace.css.show)
+ )
+ return;
+
+ let timeOut = null;
+ const complete = () => {
+ Collapse.showImmediately(target);
+ timeOut = null;
+ };
+
+ target.style.height = '0';
+ target.classList.remove(Namespace.css.collapse);
+ target.classList.add(Namespace.css.collapsing);
+
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ timeOut = 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: HTMLElement) {
+ 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: HTMLElement) {
+ if (
+ target.classList.contains(Namespace.css.collapsing) ||
+ !target.classList.contains(Namespace.css.show)
+ )
+ return;
+
+ let timeOut = null;
+ const complete = () => {
+ Collapse.hideImmediately(target);
+ timeOut = null;
+ };
+
+ target.style.height = `${target.getBoundingClientRect()['height']}px`;
+
+ const reflow = (element) => element.offsetHeight;
+
+ reflow(target);
+
+ target.classList.remove(Namespace.css.collapse, Namespace.css.show);
+ target.classList.add(Namespace.css.collapsing);
+ target.style.height = '';
+
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
+ timeOut = 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
+ */
+ private static getTransitionDurationFromElement = (element: HTMLElement) => {
+ 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
+ );
+ };
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/index.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/index.ts
new file mode 100644
index 0000000..8e087f1
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/index.ts
@@ -0,0 +1,849 @@
+import DateDisplay from './calendar/date-display';
+import MonthDisplay from './calendar/month-display';
+import YearDisplay from './calendar/year-display';
+import DecadeDisplay from './calendar/decade-display';
+import TimeDisplay from './time/time-display';
+import HourDisplay from './time/hour-display';
+import MinuteDisplay from './time/minute-display';
+import SecondDisplay from './time/second-display';
+import { DateTime, Unit } from '../datetime';
+import Namespace from '../utilities/namespace';
+import { HideEvent } from '../utilities/event-types';
+import Collapse from './collapse';
+import Validation from '../validation';
+import Dates from '../dates';
+import { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';
+import { serviceLocator } from '../utilities/service-locator';
+import ActionTypes from '../utilities/action-types';
+import CalendarModes from '../utilities/calendar-modes';
+import { OptionsStore } from '../utilities/optionsStore';
+
+/**
+ * Main class for all things display related.
+ */
+export default class Display {
+ private _widget: HTMLElement;
+ private _popperInstance: any; // eslint-disable-line @typescript-eslint/no-explicit-any
+ private _isVisible = false;
+ private optionsStore: OptionsStore;
+ private validation: Validation;
+ private dates: Dates;
+
+ dateDisplay: DateDisplay;
+ monthDisplay: MonthDisplay;
+ yearDisplay: YearDisplay;
+ decadeDisplay: DecadeDisplay;
+ timeDisplay: TimeDisplay;
+ hourDisplay: HourDisplay;
+ minuteDisplay: MinuteDisplay;
+ secondDisplay: SecondDisplay;
+ private _eventEmitters: EventEmitters;
+
+ constructor() {
+ 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: ViewUpdateValues) => {
+ this._update(result);
+ });
+ }
+
+ /**
+ * Returns the widget body or undefined
+ * @private
+ */
+ get widget(): HTMLElement | undefined {
+ return this._widget;
+ }
+
+ get dateContainer(): HTMLElement | undefined {
+ return this.widget?.querySelector(`div.${Namespace.css.dateContainer}`);
+ }
+
+ get timeContainer(): HTMLElement | undefined {
+ return this.widget?.querySelector(`div.${Namespace.css.timeContainer}`);
+ }
+
+ /**
+ * 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: ViewUpdateValues): void {
+ if (!this.widget) return;
+ switch (unit) {
+ case Unit.seconds:
+ this.secondDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.minutes:
+ this.minuteDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.hours:
+ this.hourDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.date:
+ this.dateDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.month:
+ this.monthDisplay._update(this.widget, this.paint);
+ break;
+ case Unit.year:
+ this.yearDisplay._update(this.widget, this.paint);
+ break;
+ case 'decade':
+ this.decadeDisplay._update(this.widget, this.paint);
+ break;
+ case 'clock':
+ if (!this._hasTime) break;
+ this.timeDisplay._update(this.widget);
+ this._update(Unit.hours);
+ this._update(Unit.minutes);
+ this._update(Unit.seconds);
+ break;
+ case 'calendar':
+ this._update(Unit.date);
+ this._update(Unit.year);
+ this._update(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
+ */
+
+ /* eslint-disable @typescript-eslint/no-unused-vars */
+ paint(
+ _unit: Unit | 'decade',
+ _date: DateTime,
+ _classes: string[],
+ _element: HTMLElement
+ ) {
+ // 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(): void {
+ if (this.widget == undefined) {
+ this._showSetDefaultIfNeeded();
+
+ this._buildWidget();
+ this._updateTheme();
+
+ this._showSetupViewMode();
+
+ if (!this.optionsStore.options.display.inline) {
+ // If needed to change the parent container
+ const container = this.optionsStore.options?.container || document.body;
+ const placement =
+ this.optionsStore.options?.display?.placement || 'bottom';
+
+ container.appendChild(this.widget);
+ this.createPopup(this.optionsStore.element, this.widget, {
+ modifiers: [{ name: 'eventListeners', enabled: true }],
+ //#2400
+ placement:
+ document.documentElement.dir === 'rtl'
+ ? `${placement}-end`
+ : `${placement}-start`,
+ }).then();
+ } else {
+ this.optionsStore.element.appendChild(this.widget);
+ }
+
+ if (this.optionsStore.options.display.viewMode == 'clock') {
+ this._eventEmitters.action.emit({
+ e: null,
+ action: ActionTypes.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] as HTMLElement
+ ).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;
+ }
+
+ private _showSetupViewMode() {
+ // 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.showClock,
+ });
+ }
+ // otherwise return to the calendar view
+ else 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.timeContainer);
+ } else {
+ Collapse.show(this.timeContainer);
+ }
+ }
+ Collapse.show(this.dateContainer);
+ }
+
+ if (this._hasDate) {
+ this._showMode();
+ }
+ }
+
+ private _showSetDefaultIfNeeded() {
+ if (this.dates.picked.length != 0) return;
+
+ if (
+ this.optionsStore.options.useCurrent &&
+ !this.optionsStore.options.defaultDate
+ ) {
+ const date = new DateTime().setLocalization(
+ this.optionsStore.options.localization
+ );
+ 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) && tries > 31) {
+ date.manipulate(direction, Unit.date);
+ tries++;
+ }
+ }
+ this.dates.setValue(date);
+ }
+
+ if (this.optionsStore.options.defaultDate) {
+ this.dates.setValue(this.optionsStore.options.defaultDate);
+ }
+ }
+
+ async createPopup(
+ element: HTMLElement,
+ widget: HTMLElement,
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ options: any
+ ): Promise {
+ let createPopperFunction;
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if ((window as any)?.Popper) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ 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 {
+ this._popperInstance?.update();
+ }
+
+ /**
+ * Changes the calendar view mode. E.g. month <-> year
+ * @param direction -/+ number to move currentViewMode
+ * @private
+ */
+ _showMode(direction?: number): void {
+ 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: HTMLElement) => (e.style.display = 'none'));
+
+ const datePickerMode =
+ CalendarModes[this.optionsStore.currentCalendarViewMode];
+ const picker: HTMLElement = 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';
+
+ if (this.optionsStore.options.display.sideBySide)
+ ((
+ this.widget.querySelectorAll(`.${Namespace.css.clockContainer}`)[0]
+ )).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?: 'light' | 'dark' | 'auto'): void {
+ 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(): string {
+ 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() {
+ if (!this._hasDate) return;
+ 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.setAttribute(
+ showing,
+ 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(): void {
+ 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?.clone,
+ } as HideEvent);
+ 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
+ */
+ private _buildWidget(): HTMLElement {
+ 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._hasDateAndTime) {
+ this._buildWidgetSideBySide(template, dateView, timeView, toolbar);
+ return;
+ }
+
+ if (this.optionsStore.options.display.toolbarPlacement === 'top') {
+ template.appendChild(toolbar);
+ }
+
+ const setupComponentView = (hasFirst, hasSecond, element, shouldShow) => {
+ if (!hasFirst) return;
+ if (hasSecond) {
+ element.classList.add(Namespace.css.collapse);
+ if (shouldShow) element.classList.add(Namespace.css.show);
+ }
+ template.appendChild(element);
+ };
+
+ setupComponentView(
+ this._hasDate,
+ this._hasTime,
+ dateView,
+ this.optionsStore.options.display.viewMode !== 'clock'
+ );
+
+ setupComponentView(
+ this._hasTime,
+ this._hasDate,
+ timeView,
+ this.optionsStore.options.display.viewMode === 'clock'
+ );
+
+ 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;
+ }
+
+ private _buildWidgetSideBySide(
+ template: HTMLDivElement,
+ dateView: HTMLDivElement,
+ timeView: HTMLDivElement,
+ toolbar: HTMLDivElement
+ ) {
+ 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;
+ }
+
+ /**
+ * Returns true if the hours, minutes, or seconds component is turned on
+ */
+ get _hasTime(): boolean {
+ 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(): boolean {
+ 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 _hasDateAndTime(): boolean {
+ return this._hasDate && this._hasTime;
+ }
+
+ /**
+ * Get the toolbar html based on options like buttons => today
+ * @private
+ */
+ getToolbarElements(): HTMLElement[] {
+ const toolbar = [];
+
+ if (this.optionsStore.options.display.buttons.today) {
+ const div = document.createElement('div');
+ div.setAttribute('data-action', ActionTypes.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.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.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.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(): HTMLElement {
+ 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.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.changeCalendarView);
+
+ const next = document.createElement('div');
+ next.classList.add(Namespace.css.next);
+ next.setAttribute('data-action', ActionTypes.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: string): HTMLElement | SVGElement {
+ 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;
+ }
+
+ /**
+ * A document click event to hide the widget if click is outside
+ * @private
+ * @param e MouseEvent
+ */
+ private _documentClickEvent = (e: MouseEvent) => {
+ if (this.optionsStore.options.debug || (window as any).debug) return; //eslint-disable-line @typescript-eslint/no-explicit-any
+
+ 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
+ */
+ private _actionsClickEvent = (e: MouseEvent) => {
+ this._eventEmitters.action.emit({ e: e });
+ };
+
+ /**
+ * 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;
+ this._dispose();
+ if (wasVisible) this.show();
+ }
+
+ refreshCurrentView() {
+ //if the widget is not showing, just destroy it
+ if (!this._isVisible) this._dispose();
+
+ switch (this.optionsStore.currentView) {
+ case 'clock':
+ this._update('clock');
+ break;
+ case 'calendar':
+ this._update(Unit.date);
+ break;
+ case 'months':
+ this._update(Unit.month);
+ break;
+ case 'years':
+ this._update(Unit.year);
+ break;
+ case 'decades':
+ this._update('decade');
+ break;
+ }
+ }
+}
+
+export type Paint = (
+ unit: Unit | 'decade',
+ innerDate: DateTime,
+ classes: string[],
+ element: HTMLElement
+) => void;
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/time/hour-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/hour-display.ts
new file mode 100644
index 0000000..a43be5d
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/hour-display.ts
@@ -0,0 +1,68 @@
+import { Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Validation from '../../validation';
+import { serviceLocator } from '../../utilities/service-locator';
+import { Paint } from '../index';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates and updates the grid for `hours`
+ */
+export default class HourDisplay {
+ private optionsStore: OptionsStore;
+ private validation: Validation;
+
+ constructor() {
+ this.optionsStore = serviceLocator.locate(OptionsStore);
+ this.validation = serviceLocator.locate(Validation);
+ }
+ /**
+ * Build the container html for the display
+ * @private
+ */
+ getPicker(): HTMLElement {
+ const container = document.createElement('div');
+ container.classList.add(Namespace.css.hourContainer);
+
+ for (let i = 0; i < (this.optionsStore.isTwelveHour ? 12 : 24); i++) {
+ const div = document.createElement('div');
+ div.setAttribute('data-action', ActionTypes.selectHour);
+ container.appendChild(div);
+ }
+
+ return container;
+ }
+
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget: HTMLElement, paint: Paint): void {
+ const container = widget.getElementsByClassName(
+ Namespace.css.hourContainer
+ )[0];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);
+
+ container
+ .querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`)
+ .forEach((containerClone: HTMLElement) => {
+ const classes = [];
+ classes.push(Namespace.css.hour);
+
+ if (!this.validation.isValid(innerDate, Unit.hours)) {
+ classes.push(Namespace.css.disabled);
+ }
+
+ paint(Unit.hours, innerDate, classes, containerClone);
+
+ containerClone.classList.remove(...containerClone.classList);
+ containerClone.classList.add(...classes);
+ containerClone.setAttribute('data-value', `${innerDate.hours}`);
+ containerClone.innerText = innerDate.getHoursFormatted(
+ this.optionsStore.options.localization.hourCycle
+ );
+ innerDate.manipulate(1, Unit.hours);
+ });
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/time/minute-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/minute-display.ts
new file mode 100644
index 0000000..483355f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/minute-display.ts
@@ -0,0 +1,74 @@
+import { Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Validation from '../../validation';
+import { serviceLocator } from '../../utilities/service-locator';
+import { Paint } from '../index';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates and updates the grid for `minutes`
+ */
+export default class MinuteDisplay {
+ private optionsStore: OptionsStore;
+ private validation: Validation;
+
+ constructor() {
+ this.optionsStore = serviceLocator.locate(OptionsStore);
+ this.validation = serviceLocator.locate(Validation);
+ }
+ /**
+ * Build the container html for the display
+ * @private
+ */
+ getPicker(): HTMLElement {
+ const container = document.createElement('div');
+ container.classList.add(Namespace.css.minuteContainer);
+
+ const 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.selectMinute);
+ container.appendChild(div);
+ }
+
+ return container;
+ }
+
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget: HTMLElement, paint: Paint): void {
+ const container = widget.getElementsByClassName(
+ Namespace.css.minuteContainer
+ )[0];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);
+ const step =
+ this.optionsStore.options.stepping === 1
+ ? 5
+ : this.optionsStore.options.stepping;
+
+ container
+ .querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`)
+ .forEach((containerClone: HTMLElement) => {
+ const classes = [];
+ classes.push(Namespace.css.minute);
+
+ if (!this.validation.isValid(innerDate, Unit.minutes)) {
+ classes.push(Namespace.css.disabled);
+ }
+
+ paint(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, Unit.minutes);
+ });
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/time/second-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/second-display.ts
new file mode 100644
index 0000000..7702d7d
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/second-display.ts
@@ -0,0 +1,66 @@
+import { Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Validation from '../../validation';
+import { serviceLocator } from '../../utilities/service-locator';
+import { Paint } from '../index';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates and updates the grid for `seconds`
+ */
+export default class secondDisplay {
+ private optionsStore: OptionsStore;
+ private validation: Validation;
+
+ constructor() {
+ this.optionsStore = serviceLocator.locate(OptionsStore);
+ this.validation = serviceLocator.locate(Validation);
+ }
+ /**
+ * Build the container html for the display
+ * @private
+ */
+ getPicker(): HTMLElement {
+ 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.selectSecond);
+ container.appendChild(div);
+ }
+
+ return container;
+ }
+
+ /**
+ * Populates the grid and updates enabled states
+ * @private
+ */
+ _update(widget: HTMLElement, paint: Paint): void {
+ const container = widget.getElementsByClassName(
+ Namespace.css.secondContainer
+ )[0];
+ const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);
+
+ container
+ .querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`)
+ .forEach((containerClone: HTMLElement) => {
+ const classes = [];
+ classes.push(Namespace.css.second);
+
+ if (!this.validation.isValid(innerDate, Unit.seconds)) {
+ classes.push(Namespace.css.disabled);
+ }
+
+ paint(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, Unit.seconds);
+ });
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/display/time/time-display.ts b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/time-display.ts
new file mode 100644
index 0000000..d4221a0
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/display/time/time-display.ts
@@ -0,0 +1,322 @@
+import { Unit } from '../../datetime';
+import Namespace from '../../utilities/namespace';
+import Validation from '../../validation';
+import Dates from '../../dates';
+import { serviceLocator } from '../../utilities/service-locator';
+import ActionTypes from '../../utilities/action-types';
+import { OptionsStore } from '../../utilities/optionsStore';
+
+/**
+ * Creates the clock display
+ */
+export default class TimeDisplay {
+ private _gridColumns = '';
+ private optionsStore: OptionsStore;
+ private validation: Validation;
+ private dates: Dates;
+
+ constructor() {
+ 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: (iconClass: string) => HTMLElement): HTMLElement {
+ 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: HTMLElement): void {
+ const timesDiv = (
+ widget.getElementsByClassName(Namespace.css.clockContainer)[0]
+ );
+ let lastPicked = this.dates.lastPicked?.clone;
+ if (!lastPicked && this.optionsStore.options.useCurrent)
+ 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, Unit.hours),
+ Unit.hours
+ )
+ ) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes.incrementHours}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+
+ if (
+ !this.validation.isValid(
+ this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),
+ Unit.hours
+ )
+ ) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes.decrementHours}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+
+ timesDiv.querySelector(
+ `[data-time-component=${Unit.hours}]`
+ ).innerText = lastPicked
+ ? lastPicked.getHoursFormatted(
+ this.optionsStore.options.localization.hourCycle
+ )
+ : '--';
+ }
+
+ if (this.optionsStore.options.display.components.minutes) {
+ if (
+ !this.validation.isValid(
+ this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),
+ Unit.minutes
+ )
+ ) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+
+ if (
+ !this.validation.isValid(
+ this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),
+ Unit.minutes
+ )
+ ) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ timesDiv.querySelector(
+ `[data-time-component=${Unit.minutes}]`
+ ).innerText = lastPicked ? lastPicked.minutesFormatted : '--';
+ }
+
+ if (this.optionsStore.options.display.components.seconds) {
+ if (
+ !this.validation.isValid(
+ this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),
+ Unit.seconds
+ )
+ ) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+
+ if (
+ !this.validation.isValid(
+ this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),
+ Unit.seconds
+ )
+ ) {
+ timesDiv
+ .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)
+ .classList.add(Namespace.css.disabled);
+ }
+ timesDiv.querySelector(
+ `[data-time-component=${Unit.seconds}]`
+ ).innerText = lastPicked ? lastPicked.secondsFormatted : '--';
+ }
+
+ if (this.optionsStore.isTwelveHour) {
+ const toggle = timesDiv.querySelector(
+ `[data-action=${ActionTypes.toggleMeridiem}]`
+ );
+
+ const meridiemDate = (lastPicked || this.optionsStore.viewDate).clone;
+
+ toggle.innerText = meridiemDate.meridiem();
+
+ if (
+ !this.validation.isValid(
+ meridiemDate.manipulate(
+ meridiemDate.hours >= 12 ? -12 : 12,
+ 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
+ */
+ private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {
+ 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): HTMLElement => {
+ 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.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.showHours);
+ divElement.setAttribute('data-time-component', Unit.hours);
+ middle.push(divElement);
+
+ divElement = document.createElement('div');
+ divElement.setAttribute(
+ 'title',
+ this.optionsStore.options.localization.decrementHour
+ );
+ divElement.setAttribute('data-action', ActionTypes.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.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.showMinutes);
+ divElement.setAttribute('data-time-component', Unit.minutes);
+ middle.push(divElement);
+
+ divElement = document.createElement('div');
+ divElement.setAttribute(
+ 'title',
+ this.optionsStore.options.localization.decrementMinute
+ );
+ divElement.setAttribute('data-action', ActionTypes.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.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.showSeconds);
+ divElement.setAttribute('data-time-component', Unit.seconds);
+ middle.push(divElement);
+
+ divElement = document.createElement('div');
+ divElement.setAttribute(
+ 'title',
+ this.optionsStore.options.localization.decrementSecond
+ );
+ divElement.setAttribute('data-action', ActionTypes.decrementSeconds);
+ divElement.appendChild(downIcon.cloneNode(true));
+ bottom.push(divElement);
+ }
+
+ if (this.optionsStore.isTwelveHour) {
+ this._gridColumns += ' a';
+ let divElement = getSeparator();
+ top.push(divElement);
+
+ const button = document.createElement('button');
+ button.setAttribute('type', 'button');
+ button.setAttribute(
+ 'title',
+ this.optionsStore.options.localization.toggleMeridiem
+ );
+ button.setAttribute('data-action', ActionTypes.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];
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/ar-SA.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ar-SA.ts
new file mode 100644
index 0000000..419685b
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ar-SA.ts
@@ -0,0 +1,45 @@
+const name = 'ar-SA';
+
+const localization = {
+ today: 'اليوم',
+ clear: 'مسح',
+ close: 'إغلاق',
+ selectMonth: 'اختر الشهر',
+ previousMonth: 'الشهر السابق',
+ nextMonth: 'الشهر التالي',
+ selectYear: 'اختر السنة',
+ previousYear: 'العام السابق',
+ nextYear: 'العام التالي',
+ selectDecade: 'اختر العقد',
+ previousDecade: 'العقد السابق',
+ nextDecade: 'العقد التالي',
+ previousCentury: 'القرن السابق',
+ nextCentury: 'القرن التالي',
+ pickHour: 'اختر الساعة',
+ incrementHour: 'أضف ساعة',
+ decrementHour: 'أنقص ساعة',
+ pickMinute: 'اختر الدقيقة',
+ incrementMinute: 'أضف دقيقة',
+ decrementMinute: 'أنقص دقيقة',
+ pickSecond: 'اختر الثانية',
+ incrementSecond: 'أضف ثانية',
+ decrementSecond: 'أنقص ثانية',
+ toggleMeridiem: 'تبديل الفترة',
+ selectTime: 'اخر الوقت',
+ selectDate: 'اختر التاريخ',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ar-SA',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/ar.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ar.ts
new file mode 100644
index 0000000..7bb29bc
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ar.ts
@@ -0,0 +1,45 @@
+const name = 'ar';
+
+const localization = {
+ today: 'اليوم',
+ clear: 'مسح',
+ close: 'إغلاق',
+ selectMonth: 'اختر الشهر',
+ previousMonth: 'الشهر السابق',
+ nextMonth: 'الشهر التالي',
+ selectYear: 'اختر السنة',
+ previousYear: 'العام السابق',
+ nextYear: 'العام التالي',
+ selectDecade: 'اختر العقد',
+ previousDecade: 'العقد السابق',
+ nextDecade: 'العقد التالي',
+ previousCentury: 'القرن السابق',
+ nextCentury: 'القرن التالي',
+ pickHour: 'اختر الساعة',
+ incrementHour: 'أضف ساعة',
+ decrementHour: 'أنقص ساعة',
+ pickMinute: 'اختر الدقيقة',
+ incrementMinute: 'أضف دقيقة',
+ decrementMinute: 'أنقص دقيقة',
+ pickSecond: 'اختر الثانية',
+ incrementSecond: 'أضف ثانية',
+ decrementSecond: 'أنقص ثانية',
+ toggleMeridiem: 'تبديل الفترة',
+ selectTime: 'اخر الوقت',
+ selectDate: 'اختر التاريخ',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ar',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'd/M/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/ca.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ca.ts
new file mode 100644
index 0000000..a43ed25
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ca.ts
@@ -0,0 +1,45 @@
+const name = 'ca';
+
+const localization = {
+ today: 'Avui',
+ clear: 'Esborrar selecció',
+ close: 'Tancar selector',
+ selectMonth: 'Seleccionar mes',
+ previousMonth: 'Mes anterior',
+ nextMonth: 'Pròxim mes',
+ selectYear: 'Seleccionar any',
+ previousYear: 'Any anterior',
+ nextYear: 'Pròxim any',
+ selectDecade: 'Seleccionar dècada',
+ previousDecade: 'Dècada anterior',
+ nextDecade: 'Pròxima dècada',
+ previousCentury: 'Segle anterior',
+ nextCentury: 'Pròxim segle',
+ pickHour: 'Escollir hora',
+ incrementHour: 'Incrementar hora',
+ decrementHour: 'Decrementar hora',
+ pickMinute: 'Escollir minut',
+ incrementMinute: 'Incrementar minut',
+ decrementMinute: 'Decrementar minut',
+ pickSecond: 'Escollir segon',
+ incrementSecond: 'Incrementar segon',
+ decrementSecond: 'Decrementar segon',
+ toggleMeridiem: 'Canviar AM/PM',
+ selectTime: 'Seleccionar temps',
+ selectDate: 'Seleccionar data',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ startOfTheWeek: 1,
+ locale: 'ca',
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd [de] MMMM [de] yyyy',
+ LLL: 'd [de] MMMM [de] yyyy H:mm',
+ LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
+ },
+ ordinal: (n) => `${n}º`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/cs.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/cs.ts
new file mode 100644
index 0000000..ce56fea
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/cs.ts
@@ -0,0 +1,45 @@
+const name = 'cs';
+
+const localization = {
+ today: 'Dnes',
+ clear: 'Vymazat výběr',
+ close: 'Zavřít výběrové okno',
+ selectMonth: 'Vybrat měsíc',
+ previousMonth: 'Předchozí měsíc',
+ nextMonth: 'Následující měsíc',
+ selectYear: 'Vybrat rok',
+ previousYear: 'Předchozí rok',
+ nextYear: 'Následující rok',
+ selectDecade: 'Vybrat desetiletí',
+ previousDecade: 'Předchozí desetiletí',
+ nextDecade: 'Následující desetiletí',
+ previousCentury: 'Předchozí století',
+ nextCentury: 'Následující století',
+ pickHour: 'Vybrat hodinu',
+ incrementHour: 'Zvýšit hodinu',
+ decrementHour: 'Snížit hodinu',
+ pickMinute: 'Vybrat minutu',
+ incrementMinute: 'Zvýšit minutu',
+ decrementMinute: 'Snížit minutu',
+ pickSecond: 'Vybrat sekundu',
+ incrementSecond: 'Zvýšit sekundu',
+ decrementSecond: 'Snížit sekundu',
+ toggleMeridiem: 'Přepnout ráno / odpoledne',
+ selectTime: 'Vybrat čas',
+ selectDate: 'Vybrat datum',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'de',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LTS: 'HH:mm:ss',
+ LT: 'HH:mm',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM yyyy',
+ LLL: 'd. MMMM yyyy HH:mm',
+ LLLL: 'dddd, d. MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/de.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/de.ts
new file mode 100644
index 0000000..6bd9d3e
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/de.ts
@@ -0,0 +1,45 @@
+const name = 'de';
+
+const localization = {
+ today: 'Heute',
+ clear: 'Auswahl löschen',
+ close: 'Auswahlbox schließen',
+ selectMonth: 'Monat wählen',
+ previousMonth: 'Letzter Monat',
+ nextMonth: 'Nächster Monat',
+ selectYear: 'Jahr wählen',
+ previousYear: 'Letztes Jahr',
+ nextYear: 'Nächstes Jahr',
+ selectDecade: 'Jahrzehnt wählen',
+ previousDecade: 'Letztes Jahrzehnt',
+ nextDecade: 'Nächstes Jahrzehnt',
+ previousCentury: 'Letztes Jahrhundert',
+ nextCentury: 'Nächstes Jahrhundert',
+ pickHour: 'Stunde wählen',
+ incrementHour: 'Stunde erhöhen',
+ decrementHour: 'Stunde verringern',
+ pickMinute: 'Minute wählen',
+ incrementMinute: 'Minute erhöhen',
+ decrementMinute: 'Minute verringern',
+ pickSecond: 'Sekunde wählen',
+ incrementSecond: 'Sekunde erhöhen',
+ decrementSecond: 'Sekunde verringern',
+ toggleMeridiem: 'Tageszeit umschalten',
+ selectTime: 'Zeit wählen',
+ selectDate: 'Datum wählen',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'de',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LTS: 'HH:mm:ss',
+ LT: 'HH:mm',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM yyyy',
+ LLL: 'd. MMMM yyyy HH:mm',
+ LLLL: 'dddd, d. MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/es.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/es.ts
new file mode 100644
index 0000000..0c90a3e
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/es.ts
@@ -0,0 +1,45 @@
+const name = 'es';
+
+const localization = {
+ today: 'Hoy',
+ clear: 'Borrar selección',
+ close: 'Cerrar selector',
+ selectMonth: 'Seleccionar mes',
+ previousMonth: 'Mes anterior',
+ nextMonth: 'Próximo mes',
+ selectYear: 'Seleccionar año',
+ previousYear: 'Año anterior',
+ nextYear: 'Próximo año',
+ selectDecade: 'Seleccionar década',
+ previousDecade: 'Década anterior',
+ nextDecade: 'Próxima década',
+ previousCentury: 'Siglo anterior',
+ nextCentury: 'Próximo siglo',
+ pickHour: 'Elegir hora',
+ incrementHour: 'Incrementar hora',
+ decrementHour: 'Decrementar hora',
+ pickMinute: 'Elegir minuto',
+ incrementMinute: 'Incrementar minuto',
+ decrementMinute: 'Decrementar minuto',
+ pickSecond: 'Elegir segundo',
+ incrementSecond: 'Incrementar segundo',
+ decrementSecond: 'Decrementar segundo',
+ toggleMeridiem: 'Cambiar AM/PM',
+ selectTime: 'Seleccionar tiempo',
+ selectDate: 'Seleccionar fecha',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ startOfTheWeek: 1,
+ locale: 'es',
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd [de] MMMM [de] yyyy',
+ LLL: 'd [de] MMMM [de] yyyy H:mm',
+ LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
+ },
+ ordinal: (n) => `${n}º`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/fi.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/fi.ts
new file mode 100644
index 0000000..4fade3f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/fi.ts
@@ -0,0 +1,45 @@
+const name = 'fi';
+
+const localization = {
+ today: 'Tänään',
+ clear: 'Tyhjennä',
+ close: 'Sulje',
+ selectMonth: 'Valitse kuukausi',
+ previousMonth: 'Edellinen kuukausi',
+ nextMonth: 'Seuraava kuukausi',
+ selectYear: 'Valitse vuosi',
+ previousYear: 'Edellinen vuosi',
+ nextYear: 'Seuraava vuosi',
+ selectDecade: 'Valitse vuosikymmen',
+ previousDecade: 'Edellinen vuosikymmen',
+ nextDecade: 'Seuraava vuosikymmen',
+ previousCentury: 'Edellinen vuosisata',
+ nextCentury: 'Seuraava vuosisata',
+ pickHour: 'Valitse tunnit',
+ incrementHour: 'Vähennä tunteja',
+ decrementHour: 'Lisää tunteja',
+ pickMinute: 'Valitse minuutit',
+ incrementMinute: 'Vähennä minuutteja',
+ decrementMinute: 'Lisää minuutteja',
+ pickSecond: 'Valitse sekuntit',
+ incrementSecond: 'Vähennä sekunteja',
+ decrementSecond: 'Lisää sekunteja',
+ toggleMeridiem: 'Vaihda kellonaikaa',
+ selectTime: 'Valitse aika',
+ selectDate: 'Valise päivä',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'fi',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH.mm',
+ LTS: 'HH.mm.ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM[ta] yyyy',
+ LLL: 'd. MMMM[ta] yyyy, [klo] HH.mm',
+ LLLL: 'dddd, d. MMMM[ta] yyyy, [klo] HH.mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/fr.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/fr.ts
new file mode 100644
index 0000000..e691d39
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/fr.ts
@@ -0,0 +1,48 @@
+const name = 'fr';
+
+const localization = {
+ today: "Aujourd'hui",
+ clear: 'Effacer la sélection',
+ close: 'Fermer',
+ selectMonth: 'Sélectionner le mois',
+ previousMonth: 'Mois précédent',
+ nextMonth: 'Mois suivant',
+ selectYear: "Sélectionner l'année",
+ previousYear: 'Année précédente',
+ nextYear: 'Année suivante',
+ selectDecade: 'Sélectionner la décennie',
+ previousDecade: 'Décennie précédente',
+ nextDecade: 'Décennie suivante',
+ previousCentury: 'Siècle précédente',
+ nextCentury: 'Siècle suivante',
+ pickHour: "Sélectionner l'heure",
+ incrementHour: "Incrementer l'heure",
+ decrementHour: "Diminuer l'heure",
+ pickMinute: 'Sélectionner les minutes',
+ incrementMinute: 'Incrementer les minutes',
+ decrementMinute: 'Diminuer les minutes',
+ pickSecond: 'Sélectionner les secondes',
+ incrementSecond: 'Incrementer les secondes',
+ decrementSecond: 'Diminuer les secondes',
+ toggleMeridiem: 'Basculer AM-PM',
+ selectTime: "Sélectionner l'heure",
+ selectDate: 'Sélectionner une date',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'fr',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => {
+ const o = n === 1 ? 'er' : '';
+ return `${n}${o}`;
+ },
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/hy.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/hy.ts
new file mode 100644
index 0000000..93ead03
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/hy.ts
@@ -0,0 +1,45 @@
+const name = 'hy';
+
+const localization = {
+ today: 'Այսօր',
+ clear: 'Ջնջել ընտրվածը',
+ close: 'Փակել',
+ selectMonth: 'Ընտրել ամիս',
+ previousMonth: 'Նախորդ ամիս',
+ nextMonth: 'Հաջորդ ամիս',
+ selectYear: 'Ընտրել տարի',
+ previousYear: 'Նախորդ տարի',
+ nextYear: 'Հաջորդ տարի',
+ selectDecade: 'Ընտրել տասնամյակ',
+ previousDecade: 'Նախորդ տասնամյակ',
+ nextDecade: 'Հաջորդ տասնամյակ',
+ previousCentury: 'Նախորդ դար',
+ nextCentury: 'Հաջորդ դար',
+ pickHour: 'Ընտրել ժամ',
+ incrementHour: 'Ավելացնել ժամ',
+ decrementHour: 'Նվազեցնել ժամ',
+ pickMinute: 'Ընտրել րոպե',
+ incrementMinute: 'Ավելացնել րոպե',
+ decrementMinute: 'Նվազեցնել րոպե',
+ pickSecond: 'Ընտրել երկրորդը',
+ incrementSecond: 'Ավելացնել վայրկյան',
+ decrementSecond: 'Նվազեցնել վայրկյան',
+ toggleMeridiem: 'Փոփոխել Ժամանակաշրջանը',
+ selectTime: 'Ընտրել Ժամ',
+ selectDate: 'Ընտրել ամսաթիվ',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'hy',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy թ.',
+ LLL: 'd MMMM yyyy թ., H:mm',
+ LLLL: 'dddd, d MMMM yyyy թ., H:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LTS',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/it.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/it.ts
new file mode 100644
index 0000000..f51a4f4
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/it.ts
@@ -0,0 +1,45 @@
+const name = 'it';
+
+const localization = {
+ today: 'Oggi',
+ clear: 'Cancella selezione',
+ close: 'Chiudi',
+ selectMonth: 'Seleziona mese',
+ previousMonth: 'Mese precedente',
+ nextMonth: 'Mese successivo',
+ selectYear: 'Seleziona anno',
+ previousYear: 'Anno precedente',
+ nextYear: 'Anno successivo',
+ selectDecade: 'Seleziona decennio',
+ previousDecade: 'Decennio precedente',
+ nextDecade: 'Decennio successivo',
+ previousCentury: 'Secolo precedente',
+ nextCentury: 'Secolo successivo',
+ pickHour: "Seleziona l'ora",
+ incrementHour: "Incrementa l'ora",
+ decrementHour: "Decrementa l'ora",
+ pickMinute: 'Seleziona i minuti',
+ incrementMinute: 'Incrementa i minuti',
+ decrementMinute: 'Decrementa i minuti',
+ pickSecond: 'Seleziona i secondi',
+ incrementSecond: 'Incrementa i secondi',
+ decrementSecond: 'Decrementa i secondi',
+ toggleMeridiem: 'Scambia AM-PM',
+ selectTime: "Seleziona l'ora",
+ selectDate: 'Seleziona una data',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'it',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd/MM/yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}º`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/nl.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/nl.ts
new file mode 100644
index 0000000..5e2b7ac
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/nl.ts
@@ -0,0 +1,45 @@
+const name = 'nl';
+
+const localization = {
+ today: 'Vandaag',
+ clear: 'Verwijder selectie',
+ close: 'Sluit de picker',
+ selectMonth: 'Selecteer een maand',
+ previousMonth: 'Vorige maand',
+ nextMonth: 'Volgende maand',
+ selectYear: 'Selecteer een jaar',
+ previousYear: 'Vorige jaar',
+ nextYear: 'Volgende jaar',
+ selectDecade: 'Selecteer decennium',
+ previousDecade: 'Vorige decennium',
+ nextDecade: 'Volgende decennium',
+ previousCentury: 'Vorige eeuw',
+ nextCentury: 'Volgende eeuw',
+ pickHour: 'Kies een uur',
+ incrementHour: 'Verhoog uur',
+ decrementHour: 'Verlaag uur',
+ pickMinute: 'Kies een minute',
+ incrementMinute: 'Verhoog minuut',
+ decrementMinute: 'Verlaag minuut',
+ pickSecond: 'Kies een seconde',
+ incrementSecond: 'Verhoog seconde',
+ decrementSecond: 'Verlaag seconde',
+ toggleMeridiem: 'Schakel tussen AM/PM',
+ selectTime: 'Selecteer een tijd',
+ selectDate: 'Selecteer een datum',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'nl',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd-MM-yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `[${n}${n === 1 || n === 8 || n >= 20 ? 'ste' : 'de'}]`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/pl.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/pl.ts
new file mode 100644
index 0000000..31c77e9
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/pl.ts
@@ -0,0 +1,45 @@
+const name = 'pl';
+
+const localization = {
+ today: 'Dzisiaj',
+ clear: 'Wyczyść',
+ close: 'Zamknij',
+ selectMonth: 'Wybierz miesiąc',
+ previousMonth: 'Poprzedni miesiąc',
+ nextMonth: 'Następny miesiąc',
+ selectYear: 'Wybierz rok',
+ previousYear: 'Poprzedni rok',
+ nextYear: 'Następny rok',
+ selectDecade: 'Wybierz dekadę',
+ previousDecade: 'Poprzednia dekada',
+ nextDecade: 'Następna dekada',
+ previousCentury: 'Poprzednie stulecie',
+ nextCentury: 'Następne stulecie',
+ pickHour: 'Wybierz godzinę',
+ incrementHour: 'Kolejna godzina',
+ decrementHour: 'Poprzednia godzina',
+ pickMinute: 'Wybierz minutę',
+ incrementMinute: 'Kolejna minuta',
+ decrementMinute: 'Poprzednia minuta',
+ pickSecond: 'Wybierz sekundę',
+ incrementSecond: 'Kolejna sekunda',
+ decrementSecond: 'Poprzednia sekunda',
+ toggleMeridiem: 'Przełącz porę dnia',
+ selectTime: 'Ustaw godzinę',
+ selectDate: 'Ustaw datę',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'pl',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd, d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/ro.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ro.ts
new file mode 100644
index 0000000..084bb00
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ro.ts
@@ -0,0 +1,45 @@
+const name = 'ro';
+
+const localization = {
+ today: 'Mergi la ziua de astăzi',
+ clear: 'Șterge selecția',
+ close: 'Închide calendarul',
+ selectMonth: 'Selectează luna',
+ previousMonth: 'Luna precedentă',
+ nextMonth: 'Luna următoare',
+ selectYear: 'Selectează anul',
+ previousYear: 'Anul precedent',
+ nextYear: 'Anul următor',
+ selectDecade: 'Selectează deceniul',
+ previousDecade: 'Deceniul precedent',
+ nextDecade: 'Deceniul următor',
+ previousCentury: 'Secolul precedent',
+ nextCentury: 'Secolul următor',
+ pickHour: 'Alege ora',
+ incrementHour: 'Incrementează ora',
+ decrementHour: 'Decrementează ora',
+ pickMinute: 'Alege minutul',
+ incrementMinute: 'Incrementează minutul',
+ decrementMinute: 'Decrementează minutul',
+ pickSecond: 'Alege secunda',
+ incrementSecond: 'Incrementează secunda',
+ decrementSecond: 'Decrementează secunda',
+ toggleMeridiem: 'Comută modul AM/PM',
+ selectTime: 'Selectează ora',
+ selectDate: 'Selectează data',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ro',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy H:mm',
+ LLLL: 'dddd, d MMMM yyyy H:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/ru.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ru.ts
new file mode 100644
index 0000000..6931af2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/ru.ts
@@ -0,0 +1,45 @@
+const name = 'ru';
+
+const localization = {
+ today: 'Перейти сегодня',
+ clear: 'Очистить выделение',
+ close: 'Закрыть сборщик',
+ selectMonth: 'Выбрать месяц',
+ previousMonth: 'Предыдущий месяц',
+ nextMonth: 'В следующем месяце',
+ selectYear: 'Выбрать год',
+ previousYear: 'Предыдущий год',
+ nextYear: 'В следующем году',
+ selectDecade: 'Выбрать десятилетие',
+ previousDecade: 'Предыдущее десятилетие',
+ nextDecade: 'Следующее десятилетие',
+ previousCentury: 'Предыдущий век',
+ nextCentury: 'Следующий век',
+ pickHour: 'Выберите час',
+ incrementHour: 'Время увеличения',
+ decrementHour: 'Уменьшить час',
+ pickMinute: 'Выбрать минуту',
+ incrementMinute: 'Минута приращения',
+ decrementMinute: 'Уменьшить минуту',
+ pickSecond: 'Выбрать второй',
+ incrementSecond: 'Увеличение секунды',
+ decrementSecond: 'Уменьшение секунды',
+ toggleMeridiem: 'Переключить период',
+ selectTime: 'Выбрать время',
+ selectDate: 'Выбрать дату',
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ locale: 'ru',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy г.',
+ LLL: 'd MMMM yyyy г., H:mm',
+ LLLL: 'dddd, d MMMM yyyy г., H:mm',
+ },
+ ordinal: (n) => n,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/sl.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/sl.ts
new file mode 100644
index 0000000..ff1bfd2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/sl.ts
@@ -0,0 +1,45 @@
+const name = 'sl';
+
+const localization = {
+ today: 'Danes',
+ clear: 'Počisti',
+ close: 'Zapri',
+ selectMonth: 'Izberite mesec',
+ previousMonth: 'Prejšnji mesec',
+ nextMonth: 'Naslednji mesec',
+ selectYear: 'Izberite leto',
+ previousYear: 'Prejšnje Leto',
+ nextYear: 'Naslednje leto',
+ selectDecade: 'Izberite desetletje',
+ previousDecade: 'Prejšnje desetletje',
+ nextDecade: 'Naslednje desetletje',
+ previousCentury: 'Prejšnje stoletje',
+ nextCentury: 'Naslednje stoletje',
+ pickHour: 'Izberite uro',
+ incrementHour: 'Povečaj ure',
+ decrementHour: 'Zmanjšaj uro',
+ pickMinute: 'Izberite minuto',
+ incrementMinute: 'Povečaj minuto',
+ decrementMinute: 'Zmanjšaj minuto',
+ pickSecond: 'Izberite drugo',
+ incrementSecond: 'Povečaj sekundo',
+ decrementSecond: 'Zmanjšaj sekundo',
+ toggleMeridiem: 'Preklop dopoldne/popoldne',
+ selectTime: 'Izberite čas',
+ selectDate: 'Izberite Datum',
+ dayViewHeaderFormat: { month: 'long', year: 'numeric' },
+ locale: 'sl',
+ startOfTheWeek: 1,
+ dateFormats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd. MMMM yyyy',
+ LLL: 'd. MMMM yyyy H:mm',
+ LLLL: 'dddd, d. MMMM yyyy H:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/locales/tr.ts b/node_modules/@eonasdan/tempus-dominus/src/js/locales/tr.ts
new file mode 100644
index 0000000..ee4a382
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/locales/tr.ts
@@ -0,0 +1,45 @@
+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,
+ dateFormats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'dd.MM.yyyy',
+ LL: 'd MMMM yyyy',
+ LLL: 'd MMMM yyyy HH:mm',
+ LLLL: 'dddd, d MMMM yyyy HH:mm',
+ },
+ ordinal: (n) => `${n}.`,
+ format: 'L LT',
+};
+
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/plugins/bi-one/index.ts b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/bi-one/index.ts
new file mode 100644
index 0000000..543191c
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/bi-one/index.ts
@@ -0,0 +1,21 @@
+// this obviously requires the Bootstrap Icons v1 libraries to be loaded
+
+const biOneIcons = {
+ type: 'icons',
+ time: 'bi bi-clock',
+ date: 'bi bi-calendar-week',
+ up: 'bi bi-arrow-up',
+ down: 'bi bi-arrow-down',
+ previous: 'bi bi-chevron-left',
+ next: 'bi bi-chevron-right',
+ today: 'bi bi-calendar-check',
+ clear: 'bi bi-trash',
+ close: 'bi bi-x',
+};
+
+// noinspection JSUnusedGlobalSymbols
+const load = (_, __, tdFactory) => {
+ tdFactory.DefaultOptions.display.icons = biOneIcons;
+};
+
+export { biOneIcons, load };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/plugins/customDateFormat/index.ts b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/customDateFormat/index.ts
new file mode 100644
index 0000000..502040d
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/customDateFormat/index.ts
@@ -0,0 +1,5 @@
+export default () => {
+ console.warn(
+ 'This plugin has been merged with the main picker and is now longer required'
+ );
+};
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/custom-paint-job.ts b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/custom-paint-job.ts
new file mode 100644
index 0000000..bc0cae8
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/custom-paint-job.ts
@@ -0,0 +1,17 @@
+/* eslint-disable */
+// noinspection JSUnusedGlobalSymbols
+export default (option, tdClasses, tdFactory) => {
+ // noinspection JSUnusedLocalSymbols
+ tdClasses.Display.prototype.paint = (
+ unit,
+ date,
+ classes: string[],
+ element: HTMLElement
+ ) => {
+ if (unit === tdFactory.Unit.date) {
+ if (date.isSame(new tdFactory.DateTime(), unit)) {
+ classes.push('special-day');
+ }
+ }
+ };
+};
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/sample.ts b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/sample.ts
new file mode 100644
index 0000000..a283f5a
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/sample.ts
@@ -0,0 +1,28 @@
+// noinspection JSUnusedGlobalSymbols
+
+export default (option, tdClasses, tdFactory) => {
+ // extend the picker
+ // e.g. add new tempusDominus.TempusDominus(...).someFunction()
+ tdClasses.TempusDominus.prototype.someFunction = (a, logger) => {
+ logger = logger || console.log;
+ logger(a);
+ };
+
+ // extend tempusDominus
+ // e.g. add tempusDominus.example()
+ tdFactory.example = (a, logger) => {
+ logger = logger || console.log;
+ logger(a);
+ };
+
+ // overriding existing API
+ // e.g. extend new tempusDominus.TempusDominus(...).show()
+ const oldShow = tdClasses.TempusDominus.prototype.show;
+ tdClasses.TempusDominus.prototype.show = function (a, logger) {
+ logger = logger || console.log;
+ alert('from plugin');
+ logger(a);
+ oldShow.bind(this)();
+ // return modified result
+ };
+};
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/plugins/fa-five/index.ts b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/fa-five/index.ts
new file mode 100644
index 0000000..3e9e4ab
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/fa-five/index.ts
@@ -0,0 +1,21 @@
+// this obviously requires the FA 6 libraries to be loaded
+
+const faFiveIcons = {
+ type: 'icons',
+ time: 'fas fa-clock',
+ date: 'fas fa-calendar',
+ up: 'fas fa-arrow-up',
+ down: 'fas fa-arrow-down',
+ previous: 'fas fa-chevron-left',
+ next: 'fas fa-chevron-right',
+ today: 'fas fa-calendar-check',
+ clear: 'fas fa-trash',
+ close: 'fas fa-times',
+};
+
+// noinspection JSUnusedGlobalSymbols
+const load = (_, __, tdFactory) => {
+ tdFactory.DefaultOptions.display.icons = faFiveIcons;
+};
+
+export { faFiveIcons, load };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/plugins/moment-parse/index.ts b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/moment-parse/index.ts
new file mode 100644
index 0000000..d8c2c67
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/plugins/moment-parse/index.ts
@@ -0,0 +1,20 @@
+//obviously, loading moment js is required.
+declare let moment;
+export default (option, tdClasses, tdFactory) => {
+ tdClasses.Dates.prototype.setFromInput = function (value, index) {
+ const converted = moment(value, option);
+ if (converted.isValid()) {
+ const date = tdFactory.DateTime.convert(
+ converted.toDate(),
+ this.optionsStore.options.localization.locale
+ );
+ this.setValue(date, index);
+ } else {
+ console.warn('Momentjs failed to parse the input date.');
+ }
+ };
+
+ tdClasses.Dates.prototype.formatInput = function (date) {
+ return moment(date).format(option);
+ };
+};
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/tempus-dominus.ts b/node_modules/@eonasdan/tempus-dominus/src/js/tempus-dominus.ts
new file mode 100644
index 0000000..f152c5f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/tempus-dominus.ts
@@ -0,0 +1,677 @@
+import Display from './display/index';
+import Dates from './dates';
+import Actions from './actions';
+import {
+ DateTime,
+ DateTimeFormatOptions,
+ guessHourCycle,
+ Unit,
+} from './datetime';
+import Namespace from './utilities/namespace';
+import Options from './utilities/options';
+import {
+ BaseEvent,
+ ChangeEvent,
+ ViewUpdateEvent,
+} from './utilities/event-types';
+import { EventEmitters } from './utilities/event-emitter';
+import {
+ serviceLocator,
+ setupServiceLocator,
+} from './utilities/service-locator';
+import CalendarModes from './utilities/calendar-modes';
+import DefaultOptions, {
+ DefaultEnLocalization,
+} from './utilities/default-options';
+import ActionTypes from './utilities/action-types';
+import { OptionsStore } from './utilities/optionsStore';
+import { OptionConverter } from './utilities/optionConverter';
+
+/**
+ * A robust and powerful date/time picker component.
+ */
+class TempusDominus {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ _subscribers: { [key: string]: ((event: any) => Record)[] } =
+ {};
+ private _isDisabled = false;
+ private _toggle: HTMLElement;
+ private _currentPromptTimeTimeout: NodeJS.Timeout;
+ private actions: Actions;
+ private optionsStore: OptionsStore;
+ private _eventEmitters: EventEmitters;
+ display: Display;
+ dates: Dates;
+
+ constructor(element: HTMLElement, options: Options = {} as Options) {
+ 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.setLocalization(
+ this.optionsStore.options.localization
+ );
+ 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();
+ });
+
+ this._eventEmitters.updateViewDate.subscribe((dateTime) => {
+ this.viewDate = dateTime;
+ });
+ }
+
+ get viewDate() {
+ return this.optionsStore.viewDate;
+ }
+
+ set viewDate(value) {
+ this.optionsStore.viewDate = value;
+ this.optionsStore.viewDate.setLocalization(
+ this.optionsStore.options.localization
+ );
+ this.display._update(
+ this.optionsStore.currentView === 'clock' ? 'clock' : 'calendar'
+ );
+ }
+
+ // 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): void {
+ if (reset) this._initializeOptions(options, DefaultOptions);
+ else this._initializeOptions(options, this.optionsStore.options);
+
+ this.optionsStore.viewDate.setLocalization(
+ this.optionsStore.options.localization
+ );
+ this.display.refreshCurrentView();
+ }
+
+ // noinspection JSUnusedGlobalSymbols
+ /**
+ * Toggles the picker open or closed. If the picker is disabled, nothing will happen.
+ * @public
+ */
+ toggle(): void {
+ if (this._isDisabled) return;
+ this.display.toggle();
+ }
+
+ // noinspection JSUnusedGlobalSymbols
+ /**
+ * Shows the picker unless the picker is disabled.
+ * @public
+ */
+ show(): void {
+ if (this._isDisabled) return;
+ this.display.show();
+ }
+
+ // noinspection JSUnusedGlobalSymbols
+ /**
+ * Hides the picker unless the picker is disabled.
+ * @public
+ */
+ hide(): void {
+ this.display.hide();
+ }
+
+ // noinspection JSUnusedGlobalSymbols
+ /**
+ * Disables the picker and the target input field.
+ * @public
+ */
+ disable(): void {
+ 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(): void {
+ this._isDisabled = false;
+ this.optionsStore.input?.removeAttribute('disabled');
+ }
+
+ // noinspection JSUnusedGlobalSymbols
+ /**
+ * Clears all the selected dates
+ * @public
+ */
+ clear(): void {
+ 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: string | string[],
+ callbacks: (event: any) => void | ((event: any) => void)[] //eslint-disable-line @typescript-eslint/no-explicit-any
+ ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {
+ if (typeof eventTypes === 'string') {
+ eventTypes = [eventTypes];
+ }
+ let callBackArray: any[]; //eslint-disable-line @typescript-eslint/no-explicit-any
+ 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._eventEmitters.destroy();
+ this.optionsStore.input?.removeEventListener(
+ 'change',
+ this._inputChangeEvent
+ );
+ if (this.optionsStore.options.allowInputToggle) {
+ this.optionsStore.input?.removeEventListener(
+ 'click',
+ this._openClickEvent
+ );
+ this.optionsStore.input?.removeEventListener(
+ 'focus',
+ this._openClickEvent
+ );
+ }
+ 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: string) {
+ const 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
+ */
+ private _triggerEvent(event: BaseEvent) {
+ event.viewMode = this.optionsStore.currentView;
+
+ const isChangeEvent = event.type === Namespace.events.change;
+ if (isChangeEvent) {
+ const { date, oldDate, isClear } = event as ChangeEvent;
+ if (
+ (date && oldDate && date.isSame(oldDate)) ||
+ (!isClear && !date && !oldDate)
+ ) {
+ return;
+ }
+ this._handleAfterChangeEvent(event as ChangeEvent);
+
+ this.optionsStore.input?.dispatchEvent(
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ new CustomEvent('change', { detail: event as any })
+ );
+ }
+
+ this.optionsStore.element.dispatchEvent(
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ new CustomEvent(event.type, { detail: event as any })
+ );
+
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if ((window as any).jQuery) {
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const $ = (window as any).jQuery;
+
+ if (isChangeEvent && this.optionsStore.input) {
+ $(this.optionsStore.input).trigger(event);
+ } else {
+ $(this.optionsStore.element).trigger(event);
+ }
+ }
+
+ this._publish(event);
+ }
+
+ private _publish(event: BaseEvent) {
+ // 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
+ */
+ private _viewUpdate() {
+ this._triggerEvent({
+ type: Namespace.events.update,
+ viewDate: this.optionsStore.viewDate.clone,
+ } as ViewUpdateEvent);
+ }
+
+ private _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
+ */
+ private _initializeOptions(
+ config: Options,
+ mergeTo: Options,
+ includeDataset = false
+ ): void {
+ 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.setLocalization(
+ newConfig.localization
+ );
+
+ 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 &&
+ newConfig.localization.hourCycle === undefined
+ )
+ newConfig.localization.hourCycle = 'h24';
+ else if (newConfig.localization.hourCycle === undefined) {
+ newConfig.localization.hourCycle = guessHourCycle(
+ newConfig.localization.locale
+ );
+ }
+
+ this.optionsStore.options = newConfig;
+
+ if (
+ newConfig.restrictions.maxDate &&
+ this.viewDate.isAfter(newConfig.restrictions.maxDate)
+ )
+ this.viewDate = newConfig.restrictions.maxDate;
+
+ if (
+ newConfig.restrictions.minDate &&
+ this.viewDate.isBefore(newConfig.restrictions.minDate)
+ )
+ this.viewDate = newConfig.restrictions.minDate;
+ }
+
+ /**
+ * Checks if an input field is being used, attempts to locate one and sets an
+ * event listener if found.
+ * @private
+ */
+ private _initializeInput() {
+ if (this.optionsStore.element.tagName == 'INPUT') {
+ this.optionsStore.input = this.optionsStore.element as HTMLInputElement;
+ } else {
+ const 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;
+
+ if (!this.optionsStore.input.value && this.optionsStore.options.defaultDate)
+ this.optionsStore.input.value = this.dates.formatInput(
+ this.optionsStore.options.defaultDate
+ );
+
+ this.optionsStore.input.addEventListener('change', this._inputChangeEvent);
+ if (this.optionsStore.options.allowInputToggle) {
+ this.optionsStore.input.addEventListener('click', this._openClickEvent);
+ this.optionsStore.input.addEventListener('focus', this._openClickEvent);
+ }
+
+ if (this.optionsStore.input.value) {
+ this._inputChangeEvent();
+ }
+ }
+
+ /**
+ * Attempts to locate a toggle for the picker and sets an event listener
+ * @private
+ */
+ 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
+ */
+ private _handleAfterChangeEvent(e: ChangeEvent) {
+ if (
+ // options is disabled
+ !this.optionsStore.options.promptTimeOnDateChange ||
+ this.optionsStore.options.multipleDates ||
+ 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(
+ '[data-action="togglePicker"]'
+ ),
+ },
+ action: ActionTypes.togglePicker,
+ });
+ }
+ }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);
+ }
+
+ /**
+ * Event for when the input field changes. This is a class level method so there's
+ * something for the remove listener function.
+ * @private
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ private _inputChangeEvent = (event?: any) => {
+ 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 ||
+ this.optionsStore.options.dateRange
+ ) {
+ 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
+ */
+ private _toggleClickEvent = () => {
+ if (
+ (this.optionsStore.element as HTMLInputElement)?.disabled ||
+ this.optionsStore.input?.disabled ||
+ //if we just have the input and allow input toggle is enabled, then don't cause a toggle
+ (this._toggle.nodeName === 'INPUT' &&
+ (this._toggle as HTMLInputElement)?.type === 'text' &&
+ this.optionsStore.options.allowInputToggle)
+ )
+ return;
+ this.toggle();
+ };
+
+ /**
+ * Event for when the toggle is clicked. This is a class level method so there's
+ * something for the remove listener function.
+ * @private
+ */
+ private _openClickEvent = () => {
+ if (
+ (this.optionsStore.element as HTMLInputElement)?.disabled ||
+ this.optionsStore.input?.disabled
+ )
+ return;
+ if (!this.display.isVisible) this.show();
+ };
+}
+
+/**
+ * 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: string) => {
+ const 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 = undefined) {
+ if (!plugin) return tempusDominus;
+ if (!plugin.installed) {
+ // install plugin only once
+ plugin(
+ option,
+ { TempusDominus, Dates, Display, DateTime, Namespace },
+ tempusDominus
+ );
+ plugin.installed = true;
+ }
+ return tempusDominus;
+};
+
+const version = '6.7.19';
+
+const tempusDominus = {
+ TempusDominus,
+ extend,
+ loadLocale,
+ locale,
+ Namespace,
+ DefaultOptions,
+ DateTime,
+ Unit,
+ version,
+ DefaultEnLocalization,
+};
+
+export {
+ TempusDominus,
+ extend,
+ loadLocale,
+ locale,
+ Namespace,
+ DefaultOptions,
+ DateTime,
+ Unit,
+ version,
+ DateTimeFormatOptions,
+ Options,
+ DefaultEnLocalization,
+};
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/action-types.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/action-types.ts
new file mode 100644
index 0000000..e183f68
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/action-types.ts
@@ -0,0 +1,29 @@
+enum ActionTypes {
+ next = 'next',
+ previous = 'previous',
+ changeCalendarView = 'changeCalendarView',
+ selectMonth = 'selectMonth',
+ selectYear = 'selectYear',
+ selectDecade = 'selectDecade',
+ selectDay = 'selectDay',
+ selectHour = 'selectHour',
+ selectMinute = 'selectMinute',
+ selectSecond = 'selectSecond',
+ incrementHours = 'incrementHours',
+ incrementMinutes = 'incrementMinutes',
+ incrementSeconds = 'incrementSeconds',
+ decrementHours = 'decrementHours',
+ decrementMinutes = 'decrementMinutes',
+ decrementSeconds = 'decrementSeconds',
+ toggleMeridiem = 'toggleMeridiem',
+ togglePicker = 'togglePicker',
+ showClock = 'showClock',
+ showHours = 'showHours',
+ showMinutes = 'showMinutes',
+ showSeconds = 'showSeconds',
+ clear = 'clear',
+ close = 'close',
+ today = 'today',
+}
+
+export default ActionTypes;
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/calendar-modes.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/calendar-modes.ts
new file mode 100644
index 0000000..cf8eb6a
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/calendar-modes.ts
@@ -0,0 +1,37 @@
+import { Unit } from '../datetime';
+import Namespace from './namespace';
+import ViewMode from './view-mode';
+
+const CalendarModes: {
+ name: keyof ViewMode;
+ className: string;
+ unit: Unit;
+ step: number;
+}[] = [
+ {
+ name: 'calendar',
+ className: Namespace.css.daysContainer,
+ unit: Unit.month,
+ step: 1,
+ },
+ {
+ name: 'months',
+ className: Namespace.css.monthsContainer,
+ unit: Unit.year,
+ step: 1,
+ },
+ {
+ name: 'years',
+ className: Namespace.css.yearsContainer,
+ unit: Unit.year,
+ step: 10,
+ },
+ {
+ name: 'decades',
+ className: Namespace.css.decadesContainer,
+ unit: Unit.year,
+ step: 100,
+ },
+];
+
+export default CalendarModes;
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-format-localization.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-format-localization.ts
new file mode 100644
index 0000000..34c1ad7
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-format-localization.ts
@@ -0,0 +1,22 @@
+import { FormatLocalization } from './options';
+
+const DefaultFormatLocalization: FormatLocalization = {
+ 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',
+ },
+ format: 'L LT',
+ locale: 'default',
+ hourCycle: undefined,
+ ordinal: (n) => {
+ const s = ['th', 'st', 'nd', 'rd'];
+ const v = n % 100;
+ return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`;
+ },
+};
+
+export default { ...DefaultFormatLocalization };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-options.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-options.ts
new file mode 100644
index 0000000..77b31cb
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-options.ts
@@ -0,0 +1,110 @@
+import Options, { Localization } from './options';
+import { DateTime } from '../datetime';
+import DefaultFormatLocalization from './default-format-localization';
+
+const defaultEnLocalization: Localization = {
+ clear: 'Clear selection',
+ close: 'Close the picker',
+ dateFormats: DefaultFormatLocalization.dateFormats,
+ dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+ decrementHour: 'Decrement Hour',
+ decrementMinute: 'Decrement Minute',
+ decrementSecond: 'Decrement Second',
+ format: DefaultFormatLocalization.format,
+ hourCycle: DefaultFormatLocalization.hourCycle,
+ incrementHour: 'Increment Hour',
+ incrementMinute: 'Increment Minute',
+ incrementSecond: 'Increment Second',
+ locale: DefaultFormatLocalization.locale,
+ maxWeekdayLength: 0,
+ nextCentury: 'Next Century',
+ nextDecade: 'Next Decade',
+ nextMonth: 'Next Month',
+ nextYear: 'Next Year',
+ ordinal: DefaultFormatLocalization.ordinal,
+ pickHour: 'Pick Hour',
+ pickMinute: 'Pick Minute',
+ pickSecond: 'Pick Second',
+ previousCentury: 'Previous Century',
+ previousDecade: 'Previous Decade',
+ previousMonth: 'Previous Month',
+ previousYear: 'Previous Year',
+ selectDate: 'Select Date',
+ selectDecade: 'Select Decade',
+ selectMonth: 'Select Month',
+ selectTime: 'Select Time',
+ selectYear: 'Select Year',
+ startOfTheWeek: 0,
+ today: 'Go to today',
+ toggleMeridiem: 'Toggle Meridiem',
+};
+
+const DefaultOptions: Options = {
+ allowInputToggle: false,
+ container: undefined,
+ dateRange: false,
+ debug: false,
+ defaultDate: undefined,
+ 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',
+ placement: 'bottom',
+ },
+ keepInvalid: false,
+ localization: defaultEnLocalization,
+ meta: {},
+ multipleDates: false,
+ multipleDatesSeparator: '; ',
+ promptTimeOnDateChange: false,
+ promptTimeOnDateChangeTransitionDelay: 200,
+ restrictions: {
+ minDate: undefined,
+ maxDate: undefined,
+ disabledDates: [],
+ enabledDates: [],
+ daysOfWeekDisabled: [],
+ disabledTimeIntervals: [],
+ disabledHours: [],
+ enabledHours: [],
+ },
+ stepping: 1,
+ useCurrent: true,
+ viewDate: new DateTime(),
+};
+
+export default DefaultOptions;
+export const DefaultEnLocalization = { ...defaultEnLocalization };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/errors.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/errors.ts
new file mode 100644
index 0000000..d4682a1
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/errors.ts
@@ -0,0 +1,184 @@
+export class TdError extends Error {
+ code: number;
+}
+
+export class ErrorMessages {
+ private base = 'TD:';
+
+ //#region out to console
+
+ /**
+ * Throws an error indicating that a key in the options object is invalid.
+ * @param optionName
+ */
+ unexpectedOption(optionName: string) {
+ 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: string[]) {
+ 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: string,
+ badValue: string,
+ validOptions: string[]
+ ) {
+ 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: string, badType: string, expectedType: string) {
+ 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
+ */
+ numbersOutOfRange(optionName: string, lower: number, upper: number) {
+ 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.
+ */
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
+ failedToParseDate(optionName: string, date: any, 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?: string) {
+ const error = new TdError(
+ `${this.base} A configuration value conflicts with another rule. ${message}`
+ );
+ error.code = 8;
+ throw error;
+ }
+
+ /**
+ * customDateFormat errors
+ */
+ customDateFormatError(message?: string) {
+ const error = new TdError(`${this.base} Custom Date Format: ${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.`
+ );
+ }
+
+ deprecatedWarning(message: string, remediation?: string) {
+ console.warn(
+ `${this.base} Warning ${message} is deprecated and will be removed in a future version. ${remediation}`
+ );
+ }
+
+ throwError(message) {
+ const error = new TdError(`${this.base} ${message}`);
+ error.code = 9;
+ throw error;
+ }
+
+ //#endregion
+
+ //#region used with notify.error
+
+ /**
+ * Used with an Error Event type if the user selects a date that
+ * fails restriction validation.
+ */
+ 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.
+ */
+ failedToParseInput = 'Failed parse input field';
+
+ //#endregion
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-emitter.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-emitter.ts
new file mode 100644
index 0000000..ce074da
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-emitter.ts
@@ -0,0 +1,45 @@
+import { DateTime, Unit } from '../datetime';
+import ActionTypes from './action-types';
+import { BaseEvent } from './event-types';
+
+export type ViewUpdateValues = Unit | 'decade' | 'clock' | 'calendar' | 'all';
+
+class EventEmitter {
+ private subscribers: ((value?: T) => void)[] = [];
+
+ subscribe(callback: (value: T) => void) {
+ this.subscribers.push(callback);
+ return this.unsubscribe.bind(this, this.subscribers.length - 1);
+ }
+
+ unsubscribe(index: number) {
+ this.subscribers.splice(index, 1);
+ }
+
+ emit(value?: T) {
+ this.subscribers.forEach((callback) => {
+ callback(value);
+ });
+ }
+
+ destroy() {
+ this.subscribers = null;
+ this.subscribers = [];
+ }
+}
+
+export class EventEmitters {
+ triggerEvent = new EventEmitter();
+ viewUpdate = new EventEmitter();
+ updateDisplay = new EventEmitter();
+ action = new EventEmitter<{ e: any; action?: ActionTypes }>(); //eslint-disable-line @typescript-eslint/no-explicit-any
+ updateViewDate = new EventEmitter();
+
+ destroy() {
+ this.triggerEvent.destroy();
+ this.viewUpdate.destroy();
+ this.updateDisplay.destroy();
+ this.action.destroy();
+ this.updateViewDate.destroy();
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-types.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-types.ts
new file mode 100644
index 0000000..f68b7ee
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-types.ts
@@ -0,0 +1,43 @@
+import { DateTime } from '../datetime';
+import ViewMode from './view-mode';
+
+interface BaseEvent {
+ type: string;
+ viewMode?: keyof ViewMode;
+}
+
+/**
+ * Triggers when setValue fails because of validation rules etc.
+ * @event FailEvent
+ */
+interface FailEvent extends BaseEvent {
+ reason: string;
+ date: DateTime;
+ oldDate: DateTime;
+}
+
+/**
+ * Triggers when the picker is hidden.
+ */
+interface HideEvent extends BaseEvent {
+ date: DateTime;
+}
+
+/**
+ * Triggers when a change is successful.
+ */
+interface ChangeEvent extends BaseEvent {
+ date: DateTime | undefined;
+ oldDate: DateTime;
+ isClear: boolean;
+ isValid: boolean;
+}
+
+/**
+ * Triggers when the view is changed for instance from month to year.
+ */
+interface ViewUpdateEvent extends BaseEvent {
+ viewDate: DateTime;
+}
+
+export { BaseEvent, FailEvent, HideEvent, ChangeEvent, ViewUpdateEvent };
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/namespace.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/namespace.ts
new file mode 100644
index 0000000..29b2488
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/namespace.ts
@@ -0,0 +1,294 @@
+import { ErrorMessages } from './errors';
+// 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 {
+ key = `.${dataKey}`;
+
+ /**
+ * Change event. Fired when the user selects a date.
+ * See also EventTypes.ChangeEvent
+ */
+ change = `change${this.key}`;
+
+ /**
+ * Emit when the view changes for example from month view to the year view.
+ * See also EventTypes.ViewUpdateEvent
+ */
+ 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
+ */
+ error = `error${this.key}`;
+
+ /**
+ * Show event
+ * @event Events#show
+ */
+ show = `show${this.key}`;
+
+ /**
+ * Hide event
+ * @event Events#hide
+ */
+ 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
+
+ blur = `blur${this.key}`;
+ focus = `focus${this.key}`;
+ keyup = `keyup${this.key}`;
+ keydown = `keydown${this.key}`;
+}
+
+class Css {
+ /**
+ * The outer element for the widget.
+ */
+ widget = `${NAME}-widget`;
+
+ /**
+ * Hold the previous, next and switcher divs
+ */
+ calendarHeader = 'calendar-header';
+
+ /**
+ * The element for the action to change the calendar view. E.g. month -> year.
+ */
+ switch = 'picker-switch';
+
+ /**
+ * The elements for all the toolbar options
+ */
+ toolbar = 'toolbar';
+
+ /**
+ * Disables the hover and rounding affect.
+ */
+ noHighlight = 'no-highlight';
+
+ /**
+ * Applied to the widget element when the side by side option is in use.
+ */
+ sideBySide = 'timepicker-sbs';
+
+ /**
+ * The element for the action to change the calendar view, e.g. August -> July
+ */
+ previous = 'previous';
+
+ /**
+ * The element for the action to change the calendar view, e.g. August -> September
+ */
+ next = 'next';
+
+ /**
+ * Applied to any action that would violate any restriction options. ALso applied
+ * to an input field if the disabled function is called.
+ */
+ disabled = 'disabled';
+
+ /**
+ * Applied to any date that is less than requested view,
+ * e.g. the last day of the previous month.
+ */
+ old = 'old';
+
+ /**
+ * Applied to any date that is greater than of requested view,
+ * e.g. the last day of the previous month.
+ */
+ new = 'new';
+
+ /**
+ * Applied to any date that is currently selected.
+ */
+ active = 'active';
+
+ //#region date element
+
+ /**
+ * The outer element for the calendar view.
+ */
+ dateContainer = 'date-container';
+
+ /**
+ * The outer element for the decades view.
+ */
+ decadesContainer = `${this.dateContainer}-decades`;
+
+ /**
+ * Applied to elements within the decade container, e.g. 2020, 2030
+ */
+ decade = 'decade';
+
+ /**
+ * The outer element for the years view.
+ */
+ yearsContainer = `${this.dateContainer}-years`;
+
+ /**
+ * Applied to elements within the years container, e.g. 2021, 2021
+ */
+ year = 'year';
+
+ /**
+ * The outer element for the month view.
+ */
+ monthsContainer = `${this.dateContainer}-months`;
+
+ /**
+ * Applied to elements within the month container, e.g. January, February
+ */
+ month = 'month';
+
+ /**
+ * The outer element for the calendar view.
+ */
+ daysContainer = `${this.dateContainer}-days`;
+
+ /**
+ * Applied to elements within the day container, e.g. 1, 2..31
+ */
+ 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.
+ */
+ calendarWeeks = 'cw';
+
+ /**
+ * Applied to the first row of the calendar view, e.g. Sunday, Monday
+ */
+ dayOfTheWeek = 'dow';
+
+ /**
+ * Applied to the current date on the calendar view.
+ */
+ today = 'today';
+
+ /**
+ * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday
+ */
+ weekend = 'weekend';
+
+ rangeIn = 'range-in';
+ rangeStart = 'range-start';
+ rangeEnd = 'range-end';
+
+ //#endregion
+
+ //#region time element
+
+ /**
+ * The outer element for all time related elements.
+ */
+ timeContainer = 'time-container';
+
+ /**
+ * Applied the separator columns between time elements, e.g. hour *:* minute *:* second
+ */
+ separator = 'separator';
+
+ /**
+ * The outer element for the clock view.
+ */
+ clockContainer = `${this.timeContainer}-clock`;
+
+ /**
+ * The outer element for the hours selection view.
+ */
+ hourContainer = `${this.timeContainer}-hour`;
+
+ /**
+ * The outer element for the minutes selection view.
+ */
+ minuteContainer = `${this.timeContainer}-minute`;
+
+ /**
+ * The outer element for the seconds selection view.
+ */
+ secondContainer = `${this.timeContainer}-second`;
+
+ /**
+ * Applied to each element in the hours selection view.
+ */
+ hour = 'hour';
+
+ /**
+ * Applied to each element in the minutes selection view.
+ */
+ minute = 'minute';
+
+ /**
+ * Applied to each element in the seconds selection view.
+ */
+ second = 'second';
+
+ /**
+ * Applied AM/PM toggle button.
+ */
+ toggleMeridiem = 'toggleMeridiem';
+
+ //#endregion
+
+ //#region collapse
+
+ /**
+ * Applied the element of the current view mode, e.g. calendar or clock.
+ */
+ show = 'show';
+
+ /**
+ * Applied to the currently showing view mode during a transition
+ * between calendar and clock views
+ */
+ collapsing = 'td-collapsing';
+
+ /**
+ * Applied to the currently hidden view mode.
+ */
+ collapse = 'td-collapse';
+
+ //#endregion
+
+ /**
+ * Applied to the widget when the option display.inline is enabled.
+ */
+ inline = 'inline';
+
+ /**
+ * Applied to the widget when the option display.theme is light.
+ */
+ lightTheme = 'light';
+
+ /**
+ * Applied to the widget when the option display.theme is dark.
+ */
+ darkTheme = 'dark';
+
+ /**
+ * Used for detecting if the system color preference is dark mode
+ */
+ isDarkPreferredQuery = '(prefers-color-scheme: dark)';
+}
+
+export default class Namespace {
+ static NAME = NAME;
+ // noinspection JSUnusedGlobalSymbols
+ static dataKey = dataKey;
+
+ static events = new Events();
+
+ static css = new Css();
+
+ static errorMessages = new ErrorMessages();
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionConverter.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionConverter.ts
new file mode 100644
index 0000000..6fb4f53
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionConverter.ts
@@ -0,0 +1,387 @@
+import Namespace from './namespace';
+import { DateTime } from '../datetime';
+import DefaultOptions from './default-options';
+import Options, { FormatLocalization } from './options';
+import { processKey } from './optionProcessor';
+import {
+ convertToDateTime,
+ tryConvertToDateTime,
+ typeCheckDateArray,
+ typeCheckNumberArray,
+} from './typeChecker';
+
+export class OptionConverter {
+ private static ignoreProperties = [
+ 'meta',
+ 'dayViewHeaderFormat',
+ 'container',
+ 'dateForms',
+ 'ordinal',
+ ];
+
+ static deepCopy(input): Options {
+ const o = {};
+
+ Object.keys(input).forEach((key) => {
+ const inputElement = input[key];
+
+ if (inputElement instanceof DateTime) {
+ o[key] = inputElement.clone;
+ return;
+ } else if (inputElement instanceof Date) {
+ o[key] = new Date(inputElement.valueOf());
+ return;
+ }
+
+ o[key] = inputElement;
+ if (
+ typeof inputElement !== 'object' ||
+ inputElement instanceof HTMLElement ||
+ inputElement instanceof Element
+ )
+ return;
+ if (!Array.isArray(inputElement)) {
+ o[key] = OptionConverter.deepCopy(inputElement);
+ }
+ });
+
+ return o;
+ }
+
+ private static isValue = (a) => a != null; // everything except undefined + null
+
+ /**
+ * Finds value out of an object based on a string, period delimited, path
+ * @param paths
+ * @param obj
+ */
+ static objectPath(paths: string, 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 localization
+ * @param path
+ */
+ static spread(provided, copyTo, localization: FormatLocalization, path = '') {
+ 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.`;
+ const 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];
+ const providedType = typeof provided[key];
+ const defaultType = typeof defaultOptionValue;
+ const 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],
+ localization,
+ path
+ );
+ } else {
+ copyTo[key] = OptionConverter.processKey(
+ key,
+ value,
+ providedType,
+ defaultType,
+ path,
+ localization
+ );
+ }
+
+ path = path.substring(0, path.lastIndexOf(`.${key}`));
+ });
+ }
+
+ static processKey(
+ key: string,
+ value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType: string,
+ defaultType: string,
+ path: string,
+ localization: FormatLocalization
+ ) {
+ return processKey({
+ key,
+ value,
+ providedType,
+ defaultType,
+ path,
+ localization,
+ });
+ }
+
+ static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {
+ 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: Options): 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;
+ const dataOptions = {} as Options;
+
+ // 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 normalizeObject = this.normalizeObject(objectToNormalized);
+ 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] = normalizeObject(
+ split,
+ 1,
+ options[keyOption],
+ eData[`td${key}`]
+ );
+ }
+ }
+ // or key = multipleDate
+ else if (keyOption !== undefined) {
+ dataOptions[keyOption] = eData[`td${key}`];
+ }
+ });
+
+ return this._mergeOptions(dataOptions, options);
+ }
+
+ //todo clean this up
+ private static normalizeObject(objectToNormalized: (object) => object) {
+ const normalizeObject = (
+ split: string[],
+ index: number,
+ optionSubgroup: unknown,
+ value: unknown
+ ) => {
+ // 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] = normalizeObject(
+ split,
+ index,
+ optionSubgroup[keyOption],
+ value
+ );
+ } else {
+ internalObject[keyOption] = value;
+ }
+ return internalObject;
+ };
+ return normalizeObject;
+ }
+
+ /**
+ * 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: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ localization: FormatLocalization
+ ): DateTime | null {
+ return tryConvertToDateTime(d, localization);
+ }
+
+ /**
+ * 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: string,
+ value,
+ providedType: string,
+ localization: FormatLocalization
+ ) {
+ return typeCheckDateArray(optionName, value, providedType, localization);
+ }
+
+ /**
+ * 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: string,
+ value,
+ providedType: string
+ ) {
+ return typeCheckNumberArray(optionName, value, providedType);
+ }
+
+ /**
+ * 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: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ optionName: string,
+ localization: FormatLocalization
+ ): DateTime {
+ return convertToDateTime(d, optionName, localization);
+ }
+
+ private static _flattenDefaults: string[];
+
+ private static getFlattenDefaultOptions(): string[] {
+ 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: Options) {
+ 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'
+ );
+ }
+ }
+
+ if (config.multipleDates && config.dateRange) {
+ Namespace.errorMessages.conflictingConfiguration(
+ 'Cannot uss option "multipleDates" with "dateRange"'
+ );
+ }
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionProcessor.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionProcessor.ts
new file mode 100644
index 0000000..00d3dd2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionProcessor.ts
@@ -0,0 +1,184 @@
+import Namespace from './namespace';
+import type { FormatLocalization } from './options';
+import {
+ convertToDateTime,
+ typeCheckNumberArray,
+ typeCheckDateArray,
+} from './typeChecker';
+
+interface OptionProcessorFunctionArguments {
+ key: string;
+ value: any; //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType: string;
+ defaultType: string;
+ path: string;
+ localization: FormatLocalization;
+}
+
+type OptionProcessorFunction = (
+ this: void,
+ args: OptionProcessorFunctionArguments
+) => any; //eslint-disable-line @typescript-eslint/no-explicit-any
+
+function mandatoryDate(key: string): OptionProcessorFunction {
+ return ({ value, providedType, localization }) => {
+ const dateTime = convertToDateTime(value, key, localization);
+ if (dateTime !== undefined) {
+ dateTime.setLocalization(localization);
+ return dateTime;
+ }
+ };
+}
+
+function optionalDate(key: string): OptionProcessorFunction {
+ const mandatory = mandatoryDate(key);
+ return (args) => {
+ if (args.value === undefined) {
+ return args.value;
+ }
+ return mandatory(args);
+ };
+}
+
+function numbersInRange(
+ key: string,
+ lower: number,
+ upper: number
+): OptionProcessorFunction {
+ return ({ value, providedType }) => {
+ if (value === undefined) {
+ return [];
+ }
+ typeCheckNumberArray(key, value, providedType);
+ if ((value as number[]).some((x) => x < lower || x > upper))
+ Namespace.errorMessages.numbersOutOfRange(key, lower, upper);
+ return value;
+ };
+}
+
+function validHourRange(key: string): OptionProcessorFunction {
+ return numbersInRange(key, 0, 23);
+}
+
+function validDateArray(key: string): OptionProcessorFunction {
+ return ({ value, providedType, localization }) => {
+ if (value === undefined) {
+ return [];
+ }
+ typeCheckDateArray(key, value, providedType, localization);
+ return value;
+ };
+}
+
+function validKeyOption(keyOptions: string[]): OptionProcessorFunction {
+ return ({ value, path }) => {
+ if (!keyOptions.includes(value))
+ Namespace.errorMessages.unexpectedOptionValue(
+ path.substring(1),
+ value,
+ keyOptions
+ );
+ return value;
+ };
+}
+
+const optionProcessors: { [key: string]: OptionProcessorFunction } =
+ Object.freeze({
+ defaultDate: mandatoryDate('defaultDate'),
+ viewDate: mandatoryDate('viewDate'),
+ minDate: optionalDate('restrictions.minDate'),
+ maxDate: optionalDate('restrictions.maxDate'),
+ disabledHours: validHourRange('restrictions.disabledHours'),
+ enabledHours: validHourRange('restrictions.enabledHours'),
+ disabledDates: validDateArray('restrictions.disabledDates'),
+ enabledDates: validDateArray('restrictions.enabledDates'),
+ daysOfWeekDisabled: numbersInRange('restrictions.daysOfWeekDisabled', 0, 6),
+ disabledTimeIntervals: ({ key, value, providedType, localization }) => {
+ if (value === undefined) {
+ return [];
+ }
+ if (!Array.isArray(value)) {
+ Namespace.errorMessages.typeMismatch(
+ key,
+ providedType,
+ 'array of { from: DateTime|Date, to: DateTime|Date }'
+ );
+ }
+ const valueObject = value as { from: any; to: any }[]; //eslint-disable-line @typescript-eslint/no-explicit-any
+ for (let i = 0; i < valueObject.length; i++) {
+ Object.keys(valueObject[i]).forEach((vk) => {
+ const subOptionName = `${key}[${i}].${vk}`;
+ const d = valueObject[i][vk];
+ const dateTime = convertToDateTime(d, subOptionName, localization);
+ dateTime.setLocalization(localization);
+ valueObject[i][vk] = dateTime;
+ });
+ }
+ return valueObject;
+ },
+ toolbarPlacement: validKeyOption(['top', 'bottom', 'default']),
+ type: validKeyOption(['icons', 'sprites']),
+ viewMode: validKeyOption([
+ 'clock',
+ 'calendar',
+ 'months',
+ 'years',
+ 'decades',
+ ]),
+ theme: validKeyOption(['light', 'dark', 'auto']),
+ placement: validKeyOption(['top', 'bottom']),
+ meta: ({ value }) => value,
+ dayViewHeaderFormat: ({ value }) => value,
+ container: ({ value, path }) => {
+ if (
+ value &&
+ !(
+ value instanceof HTMLElement ||
+ value instanceof Element ||
+ value?.appendChild
+ )
+ ) {
+ Namespace.errorMessages.typeMismatch(
+ path.substring(1),
+ typeof value,
+ 'HTMLElement'
+ );
+ }
+ return value;
+ },
+ useTwentyfourHour: ({ value, path, providedType, defaultType }) => {
+ Namespace.errorMessages.deprecatedWarning(
+ 'useTwentyfourHour',
+ 'Please use "options.localization.hourCycle" instead'
+ );
+ if (value === undefined || providedType === 'boolean') return value;
+ Namespace.errorMessages.typeMismatch(path, providedType, defaultType);
+ },
+ hourCycle: validKeyOption(['h11', 'h12', 'h23', 'h24']),
+ });
+
+const defaultProcessor: OptionProcessorFunction = ({
+ value,
+ defaultType,
+ providedType,
+ path,
+}) => {
+ 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);
+ }
+};
+
+export function processKey(this: void, args: OptionProcessorFunctionArguments) {
+ return (optionProcessors[args.key] || defaultProcessor)(args);
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/options.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/options.ts
new file mode 100644
index 0000000..ed75931
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/options.ts
@@ -0,0 +1,112 @@
+import { DateTime, DateTimeFormatOptions } from '../datetime';
+import ViewMode from './view-mode';
+
+export default interface Options {
+ allowInputToggle?: boolean;
+ container?: HTMLElement;
+ dateRange?: boolean;
+ debug?: boolean;
+ defaultDate?: DateTime;
+ 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?: {
+ clear?: string;
+ close?: string;
+ date?: string;
+ down?: string;
+ next?: string;
+ previous?: string;
+ time?: string;
+ today?: string;
+ type?: 'icons' | 'sprites';
+ up?: string;
+ };
+ viewMode?: keyof ViewMode;
+ sideBySide?: boolean;
+ inline?: boolean;
+ keepOpen?: boolean;
+ theme?: 'light' | 'dark' | 'auto';
+ placement?: 'top' | 'bottom';
+ };
+ keepInvalid?: boolean;
+ localization?: Localization;
+ meta?: Record;
+ multipleDates?: boolean;
+ multipleDatesSeparator?: string;
+ promptTimeOnDateChange?: boolean;
+ promptTimeOnDateChangeTransitionDelay?: number;
+ restrictions?: {
+ minDate?: DateTime;
+ maxDate?: DateTime;
+ enabledDates?: DateTime[];
+ disabledDates?: DateTime[];
+ enabledHours?: number[];
+ disabledHours?: number[];
+ disabledTimeIntervals?: { from: DateTime; to: DateTime }[];
+ daysOfWeekDisabled?: number[];
+ };
+ stepping?: number;
+ useCurrent?: boolean;
+ viewDate?: DateTime;
+}
+
+export interface FormatLocalization {
+ dateFormats?: {
+ L?: string;
+ LL?: string;
+ LLL?: string;
+ LLLL?: string;
+ LT?: string;
+ LTS?: string;
+ };
+ format?: string;
+ hourCycle?: Intl.LocaleHourCycleKey;
+ locale?: string;
+ ordinal?: (n: number) => any; //eslint-disable-line @typescript-eslint/no-explicit-any
+}
+
+export interface Localization extends FormatLocalization {
+ clear?: string;
+ close?: string;
+ dayViewHeaderFormat?: DateTimeFormatOptions;
+ decrementHour?: string;
+ decrementMinute?: string;
+ decrementSecond?: string;
+ incrementHour?: string;
+ incrementMinute?: string;
+ incrementSecond?: string;
+ maxWeekdayLength?: number;
+ nextCentury?: string;
+ nextDecade?: string;
+ nextMonth?: string;
+ nextYear?: string;
+ pickHour?: string;
+ pickMinute?: string;
+ pickSecond?: string;
+ previousCentury?: string;
+ previousDecade?: string;
+ previousMonth?: string;
+ previousYear?: string;
+ selectDate?: string;
+ selectDecade?: string;
+ selectMonth?: string;
+ selectTime?: string;
+ selectYear?: string;
+ startOfTheWeek?: number;
+ today?: string;
+ toggleMeridiem?: string;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionsStore.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionsStore.ts
new file mode 100644
index 0000000..00e5627
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionsStore.ts
@@ -0,0 +1,47 @@
+import { DateTime } from '../datetime';
+import CalendarModes from './calendar-modes';
+import ViewMode from './view-mode';
+import Options from './options';
+
+export class OptionsStore {
+ options: Options;
+ element: HTMLElement;
+ input: HTMLInputElement;
+ unset: boolean;
+ private _currentCalendarViewMode = 0;
+
+ get currentCalendarViewMode() {
+ return this._currentCalendarViewMode;
+ }
+
+ set currentCalendarViewMode(value) {
+ this._currentCalendarViewMode = value;
+ this.currentView = CalendarModes[value].name;
+ }
+
+ _viewDate = new DateTime();
+
+ get viewDate() {
+ return this._viewDate;
+ }
+
+ set viewDate(v) {
+ this._viewDate = v;
+ if (this.options) this.options.viewDate = v;
+ }
+
+ /**
+ * When switching back to the calendar from the clock,
+ * this sets currentView to the correct calendar view.
+ */
+ refreshCurrentView() {
+ this.currentView = CalendarModes[this.currentCalendarViewMode].name;
+ }
+
+ minimumCalendarViewMode = 0;
+ currentView: keyof ViewMode = 'calendar';
+
+ get isTwelveHour() {
+ return ['h12', 'h11'].includes(this.options.localization.hourCycle);
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/service-locator.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/service-locator.ts
new file mode 100644
index 0000000..d534907
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/service-locator.ts
@@ -0,0 +1,19 @@
+//eslint-disable-next-line @typescript-eslint/no-explicit-any
+export declare type Constructable = new (...args: any[]) => T;
+
+class ServiceLocator {
+ private cache: Map, unknown | symbol> = new Map();
+
+ locate(identifier: Constructable): T {
+ const service = this.cache.get(identifier);
+ if (service) return service as T;
+ const value = new identifier();
+ this.cache.set(identifier, value);
+ return value;
+ }
+}
+export const setupServiceLocator = () => {
+ serviceLocator = new ServiceLocator();
+};
+
+export let serviceLocator: ServiceLocator;
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/typeChecker.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/typeChecker.ts
new file mode 100644
index 0000000..8678710
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/typeChecker.ts
@@ -0,0 +1,108 @@
+import Namespace from './namespace';
+import { DateTime } from '../datetime';
+import { FormatLocalization } from './options';
+import DefaultFormatLocalization from './default-format-localization';
+
+/**
+ * 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
+ */
+export function tryConvertToDateTime(
+ this: void,
+ d: DateTime | Date | string,
+ localization: FormatLocalization
+): DateTime | null {
+ if (!d) return null;
+ if (d.constructor.name === DateTime.name) return d as DateTime;
+ if (d.constructor.name === Date.name) {
+ return DateTime.convert(d as Date);
+ }
+ if (typeof d === typeof '') {
+ const dateTime = DateTime.fromString(d as unknown as string, localization);
+ if (JSON.stringify(dateTime) === 'null') {
+ return null;
+ }
+ return dateTime;
+ }
+ return null;
+}
+
+/**
+ * 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
+ */
+export function convertToDateTime(
+ this: void,
+ d: DateTime | Date | string,
+ optionName: string,
+ localization: FormatLocalization
+): DateTime {
+ if (typeof d === typeof '' && optionName !== 'input') {
+ Namespace.errorMessages.dateString();
+ }
+
+ const converted = tryConvertToDateTime(d, localization);
+
+ if (!converted) {
+ Namespace.errorMessages.failedToParseDate(
+ optionName,
+ d,
+ optionName === 'input'
+ );
+ }
+ return converted;
+}
+
+/**
+ * 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
+ */
+export function typeCheckDateArray(
+ this: void,
+ optionName: string,
+ value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType: string,
+ localization: FormatLocalization = DefaultFormatLocalization
+) {
+ if (!Array.isArray(value)) {
+ Namespace.errorMessages.typeMismatch(
+ optionName,
+ providedType,
+ 'array of DateTime or Date'
+ );
+ }
+ for (let i = 0; i < value.length; i++) {
+ const d = value[i];
+ const dateTime = convertToDateTime(d, optionName, localization);
+ dateTime.setLocalization(localization);
+ 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
+ */
+export function typeCheckNumberArray(
+ this: void,
+ optionName: string,
+ value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType: string
+) {
+ if (!Array.isArray(value) || value.some((x) => typeof x !== typeof 0)) {
+ Namespace.errorMessages.typeMismatch(
+ optionName,
+ providedType,
+ 'array of numbers'
+ );
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/utilities/view-mode.ts b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/view-mode.ts
new file mode 100644
index 0000000..9809036
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/utilities/view-mode.ts
@@ -0,0 +1,9 @@
+type ViewMode = {
+ clock;
+ calendar;
+ months;
+ years;
+ decades;
+};
+
+export default ViewMode;
diff --git a/node_modules/@eonasdan/tempus-dominus/src/js/validation.ts b/node_modules/@eonasdan/tempus-dominus/src/js/validation.ts
new file mode 100644
index 0000000..cebabab
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/js/validation.ts
@@ -0,0 +1,223 @@
+import { DateTime, Unit } from './datetime';
+import { serviceLocator } from './utilities/service-locator';
+import { OptionsStore } from './utilities/optionsStore';
+
+/**
+ * Main class for date validation rules based on the options provided.
+ */
+export default class Validation {
+ private optionsStore: OptionsStore;
+
+ 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: DateTime, granularity?: Unit): boolean {
+ if (!this._enabledDisabledDatesIsValid(granularity, targetDate))
+ return false;
+
+ if (
+ granularity !== Unit.month &&
+ granularity !== Unit.year &&
+ this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&
+ this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(
+ targetDate.weekDay
+ ) !== -1
+ )
+ return false;
+
+ if (!this._minMaxIsValid(granularity, targetDate)) return false;
+
+ if (
+ granularity === Unit.hours ||
+ granularity === Unit.minutes ||
+ granularity === Unit.seconds
+ ) {
+ if (!this._enabledDisabledHoursIsValid(targetDate)) return false;
+
+ if (
+ this.optionsStore.options.restrictions.disabledTimeIntervals?.filter(
+ (internal) => targetDate.isBetween(internal.from, internal.to)
+ ).length !== 0
+ )
+ return false;
+ }
+
+ return true;
+ }
+
+ private _enabledDisabledDatesIsValid(
+ granularity: Unit,
+ targetDate: DateTime
+ ): boolean {
+ if (granularity !== Unit.date) return true;
+
+ if (
+ this.optionsStore.options.restrictions.disabledDates.length > 0 &&
+ this._isInDisabledDates(targetDate)
+ ) {
+ return false;
+ }
+
+ // noinspection RedundantIfStatementJS
+ if (
+ this.optionsStore.options.restrictions.enabledDates.length > 0 &&
+ !this._isInEnabledDates(targetDate)
+ ) {
+ 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
+ */
+ private _isInDisabledDates(testDate: DateTime) {
+ if (
+ !this.optionsStore.options.restrictions.disabledDates ||
+ this.optionsStore.options.restrictions.disabledDates.length === 0
+ )
+ return false;
+
+ return !!this.optionsStore.options.restrictions.disabledDates.find((x) =>
+ x.isSame(testDate, Unit.date)
+ );
+ }
+
+ /**
+ * 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
+ */
+ private _isInEnabledDates(testDate: DateTime) {
+ if (
+ !this.optionsStore.options.restrictions.enabledDates ||
+ this.optionsStore.options.restrictions.enabledDates.length === 0
+ )
+ return true;
+
+ return !!this.optionsStore.options.restrictions.enabledDates.find((x) =>
+ x.isSame(testDate, Unit.date)
+ );
+ }
+
+ private _minMaxIsValid(granularity: Unit, targetDate: DateTime) {
+ if (
+ this.optionsStore.options.restrictions.minDate &&
+ targetDate.isBefore(
+ this.optionsStore.options.restrictions.minDate,
+ granularity
+ )
+ ) {
+ return false;
+ }
+
+ // noinspection RedundantIfStatementJS
+ if (
+ this.optionsStore.options.restrictions.maxDate &&
+ targetDate.isAfter(
+ this.optionsStore.options.restrictions.maxDate,
+ granularity
+ )
+ ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private _enabledDisabledHoursIsValid(targetDate) {
+ if (
+ this.optionsStore.options.restrictions.disabledHours.length > 0 &&
+ this._isInDisabledHours(targetDate)
+ ) {
+ return false;
+ }
+
+ // noinspection RedundantIfStatementJS
+ if (
+ this.optionsStore.options.restrictions.enabledHours.length > 0 &&
+ !this._isInEnabledHours(targetDate)
+ ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * 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
+ */
+ private _isInDisabledHours(testDate: DateTime) {
+ 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.includes(
+ 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
+ */
+ private _isInEnabledHours(testDate: DateTime) {
+ 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.includes(
+ formattedDate
+ );
+ }
+
+ dateRangeIsValid(dates: DateTime[], index: number, target: DateTime) {
+ // if we're not using the option, then return valid
+ if (!this.optionsStore.options.dateRange) return true;
+
+ // if we've only selected 0..1 dates, and we're not setting the end date
+ // then return valid. We only want to validate the range if both are selected,
+ // because the other validation on the target has already occurred.
+ if (dates.length !== 2 && index !== 1) return true;
+
+ // initialize start date
+ const start = dates[0].clone;
+ // check if start date is not the same as target date
+ if (start.isSame(target, Unit.date)) return true;
+
+ // add one day to start; start has already been validated
+ start.manipulate(1, Unit.date);
+
+ // check each date in the range to make sure it's valid
+ while (!start.isSame(target, Unit.date)) {
+ const valid = this.isValid(start, Unit.date);
+ if (!valid) return false;
+ start.manipulate(1, Unit.date);
+ }
+
+ return true;
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/src/scss/_variables.scss b/node_modules/@eonasdan/tempus-dominus/src/scss/_variables.scss
new file mode 100644
index 0000000..4b34aaa
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/scss/_variables.scss
@@ -0,0 +1,35 @@
+@use 'sass:color';
+
+$td-light: #fff !default;
+$td-widget-background: $td-light !default;
+$td-font-color: #000 !default;
+$td-timepicker-font-size: 1.2em !default;
+$td-active-bg: #0d6efd !default;
+$td-range-bg: color.scale($td-active-bg, $lightness: -40%);
+$td-active-color: $td-light !default;
+$td-active-border-color: $td-light;
+$td-border-radius: 999px !default;
+$td-btn-hover-bg: #e9ecef !default;
+$td-disabled-color: #6c757d !default;
+$td-alternate-color: rgba(0, 0, 0, 0.38) !default;
+$td-secondary-border-color: #ccc !default;
+$td-secondary-border-color-rgba: rgba(0, 0, 0, 0.2) !default;
+$td-primary-border-color: $td-light !default;
+$td-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) !default;
+$td-dow-color: rgba(0, 0, 0, 0.5);
+
+$td-dark: #1b1b1b !default;
+$td-dark-widget-background: $td-dark !default;
+$td-dark-font-color: #e3e3e3;
+$td-dark-active-bg: #4db2ff !default;
+$td-dark-range-bg: color.scale($td-dark-active-bg, $lightness: -40%);
+$td-dark-active-color: #fff !default;
+$td-dark-active-border-color: $td-dark;
+$td-dark-btn-hover-bg: rgb(35, 38, 39) !default;
+$td-dark-disabled-color: #6c757d !default;
+$td-dark-alternate-color: rgba(232, 230, 227, 0.38) !default;
+$td-dark-secondary-border-color: #ccc !default;
+$td-dark-secondary-border-color-rgba: rgba(232, 230, 227, 0.2) !default;
+$td-dark-primary-border-color: $td-dark !default;
+$td-dark-text-shadow: 0 -1px 0 rgba(232, 230, 227, 0.25) !default;
+$td-dark-dow-color: rgba(232, 230, 227, 0.5);
diff --git a/node_modules/@eonasdan/tempus-dominus/src/scss/tempus-dominus.scss b/node_modules/@eonasdan/tempus-dominus/src/scss/tempus-dominus.scss
new file mode 100644
index 0000000..f7c32de
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/src/scss/tempus-dominus.scss
@@ -0,0 +1,485 @@
+@import 'variables';
+
+.visually-hidden {
+ position: absolute !important;
+ width: 1px !important;
+ height: 1px !important;
+ padding: 0 !important;
+ margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
+ overflow: hidden !important;
+ clip: rect(0, 0, 0, 0) !important;
+ white-space: nowrap !important;
+ border: 0 !important;
+}
+
+.tempus-dominus-widget {
+ list-style: none;
+ padding: 4px;
+ width: 19rem;
+ border-radius: 4px;
+ display: none;
+ z-index: 9999;
+ box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 10px 0 rgba(0, 0, 0, 0.12);
+
+ &.calendarWeeks {
+ width: 21rem;
+
+ & .date-container-days {
+ grid-auto-columns: 12.5%;
+ grid-template-areas: 'a a a a a a a a';
+ }
+ }
+
+ [data-action] {
+ cursor: pointer;
+
+ &::after {
+ @extend .visually-hidden;
+ content: attr(title);
+ }
+
+ &.disabled,
+ &.disabled:hover {
+ background: none;
+ cursor: not-allowed;
+ }
+ }
+
+ //popper
+ .arrow {
+ display: none;
+ }
+
+ //end popper
+
+ &.show {
+ display: block;
+ &.date-container {
+ min-height: 315px;
+ }
+
+ &.time-container {
+ min-height: 217px;
+ }
+ }
+
+ .td-collapse {
+ &:not(.show) {
+ display: none;
+ }
+ }
+
+ .td-collapsing {
+ height: 0;
+ overflow: hidden;
+ transition: height 0.35s ease;
+ }
+
+ &.timepicker-sbs {
+ @media (min-width: 576px) {
+ width: 38em;
+ }
+
+ @media (min-width: 768px) {
+ width: 38em;
+ }
+
+ @media (min-width: 992px) {
+ width: 38em;
+ }
+
+ .td-row {
+ display: flex;
+
+ .td-half {
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ }
+ }
+
+ div[data-action]:active {
+ box-shadow: none;
+ }
+
+ .timepicker-hour,
+ .timepicker-minute,
+ .timepicker-second {
+ width: 54px;
+ font-weight: bold;
+ font-size: $td-timepicker-font-size;
+ margin: 0;
+ }
+
+ button[data-action] {
+ padding: 6px;
+ }
+
+ .toggleMeridiem {
+ text-align: center;
+ height: 38px;
+ }
+
+ .calendar-header {
+ display: grid;
+ grid-template-areas: 'a a a';
+ margin-bottom: 10px;
+ font-weight: bold;
+
+ & .next {
+ text-align: right;
+ padding-right: 10px;
+ }
+
+ & .previous {
+ text-align: left;
+ padding-left: 10px;
+ }
+
+ & .picker-switch {
+ text-align: center;
+ }
+ }
+
+ .toolbar {
+ display: grid;
+ grid-auto-flow: column;
+ grid-auto-rows: 40px;
+
+ & div {
+ border-radius: $td-border-radius;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ display: flex;
+ }
+ }
+
+ .date-container-days {
+ display: grid;
+ grid-template-areas: 'a a a a a a a';
+ grid-auto-rows: 40px;
+ grid-auto-columns: calc(100% / 7);
+
+ .range-in {
+ @extend .active;
+ background-color: $td-range-bg !important;
+ border: none;
+ border-radius: 0 !important;
+ box-shadow: -5px 0 0 $td-range-bg, 5px 0 0 $td-range-bg;
+ }
+
+ .range-end {
+ @extend .active;
+ border-radius: 0 50px 50px 0 !important;
+ }
+
+ .range-start {
+ @extend .active;
+ border-radius: 50px 0 0 50px !important;
+ }
+
+ & .dow {
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ }
+
+ & .cw {
+ width: 90%;
+ height: 90%;
+ align-items: center;
+ justify-content: center;
+ display: flex;
+ font-size: 0.8em;
+ line-height: 20px;
+ cursor: default;
+ }
+ }
+
+ .date-container-decades,
+ .date-container-years,
+ .date-container-months {
+ display: grid;
+ grid-template-areas: 'a a a';
+ grid-auto-rows: calc(calc(19rem - 2 * 4px) / 7);
+ }
+
+ .time-container-hour,
+ .time-container-minute,
+ .time-container-second {
+ display: grid;
+ grid-template-areas: 'a a a a';
+ grid-auto-rows: calc(calc(19rem - 2 * 4px) / 7);
+ }
+
+ .time-container-clock {
+ display: grid;
+ grid-auto-rows: calc(calc(19rem - 2 * 4px) / 7);
+
+ & .no-highlight {
+ width: 90%;
+ height: 90%;
+ align-items: center;
+ justify-content: center;
+ display: flex;
+ }
+ }
+
+ .date-container-decades,
+ .date-container-years,
+ .date-container-months,
+ .date-container-days,
+ .time-container-clock,
+ .time-container-hour,
+ .time-container-minute,
+ .time-container-second {
+ div:not(.no-highlight) {
+ width: 90%;
+ height: 90%;
+ border-radius: $td-border-radius;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ display: flex;
+
+ &.disabled,
+ &.disabled:hover {
+ background: none;
+ cursor: not-allowed;
+ }
+
+ &.today {
+ position: relative;
+
+ &:before {
+ content: '';
+ display: inline-block;
+ border: solid transparent;
+ border-width: 0 0 7px 7px;
+ position: absolute;
+ bottom: 6px;
+ right: 6px;
+ }
+ }
+ }
+ }
+
+ .time-container {
+ margin-bottom: 0.5rem;
+ }
+
+ button {
+ display: inline-block;
+ font-weight: 400;
+ line-height: 1.5;
+ text-align: center;
+ text-decoration: none;
+ vertical-align: middle;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ border-radius: 0.25rem;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
+ border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ }
+
+ &.tempus-dominus-widget-readonly {
+ table td.day,
+ table td.hour,
+ table td.minute,
+ table td.second,
+ table td [data-action='incrementHours'],
+ table td [data-action='incrementMinutes'],
+ table td [data-action='incrementSeconds'],
+ table td [data-action='decrementHours'],
+ table td [data-action='decrementMinutes'],
+ table td [data-action='decrementSeconds'],
+ table td [data-action='showHours'],
+ table td [data-action='showMinutes'],
+ table td [data-action='showSeconds'],
+ table td [data-action='togglePeriod'] {
+ pointer-events: none;
+ cursor: default;
+
+ &:hover {
+ background: none;
+ }
+ }
+ }
+
+ &.light {
+ color: $td-font-color;
+ background-color: $td-widget-background;
+
+ [data-action] {
+ &.disabled,
+ &.disabled:hover {
+ color: $td-disabled-color;
+ }
+ }
+
+ .toolbar {
+ & div {
+ &:hover {
+ background: $td-btn-hover-bg;
+ }
+ }
+ }
+
+ .date-container-days {
+ & .dow {
+ color: $td-dow-color;
+ }
+
+ & .cw {
+ color: $td-alternate-color;
+ }
+ }
+
+ .date-container-decades,
+ .date-container-years,
+ .date-container-months,
+ .date-container-days,
+ .time-container-clock,
+ .time-container-hour,
+ .time-container-minute,
+ .time-container-second {
+ div:not(.no-highlight) {
+ &:hover {
+ background: $td-btn-hover-bg;
+ }
+
+ &.active {
+ background-color: $td-active-bg;
+ color: $td-active-color;
+ text-shadow: $td-text-shadow;
+
+ &.old,
+ &.new {
+ color: $td-active-color;
+ }
+ }
+
+ &.active.today:before {
+ border-bottom-color: $td-active-border-color;
+ }
+
+ &.old,
+ &.new {
+ color: $td-alternate-color;
+ }
+
+ &.disabled,
+ &.disabled:hover {
+ color: $td-disabled-color;
+ }
+
+ &.today {
+ &:before {
+ border-bottom-color: $td-active-bg;
+ border-top-color: $td-secondary-border-color-rgba;
+ }
+ }
+ }
+ }
+
+ button {
+ color: $td-active-color;
+ background-color: $td-active-bg;
+ border-color: $td-active-bg;
+ }
+ }
+
+ &.dark {
+ color: $td-dark-font-color;
+ background-color: $td-dark-widget-background;
+
+ [data-action] {
+ &.disabled,
+ &.disabled:hover {
+ color: $td-dark-disabled-color;
+ }
+ }
+
+ .toolbar {
+ & div {
+ &:hover {
+ background: $td-dark-btn-hover-bg;
+ }
+ }
+ }
+
+ .date-container-days {
+ & .dow {
+ color: $td-dark-dow-color;
+ }
+
+ .range-in {
+ background-color: $td-dark-range-bg !important;
+ box-shadow: -5px 0 0 $td-dark-range-bg, 5px 0 0 $td-dark-range-bg;
+ }
+
+ & .cw {
+ color: $td-dark-alternate-color;
+ }
+ }
+
+ .date-container-decades,
+ .date-container-years,
+ .date-container-months,
+ .date-container-days,
+ .time-container-clock,
+ .time-container-hour,
+ .time-container-minute,
+ .time-container-second {
+ div:not(.no-highlight) {
+ &:hover {
+ background: $td-dark-btn-hover-bg;
+ }
+
+ &.active {
+ background-color: $td-dark-active-bg;
+ color: $td-dark-active-color;
+ text-shadow: $td-dark-text-shadow;
+
+ &.old,
+ &.new {
+ color: $td-dark-active-color;
+ }
+ }
+
+ &.active.today:before {
+ border-bottom-color: $td-dark-active-border-color;
+ }
+
+ &.old,
+ &.new {
+ color: $td-dark-alternate-color;
+ }
+
+ &.disabled,
+ &.disabled:hover {
+ color: $td-dark-disabled-color;
+ }
+
+ &.today {
+ &:before {
+ border-bottom-color: $td-dark-active-bg;
+ border-top-color: $td-dark-secondary-border-color-rgba;
+ }
+ }
+ }
+ }
+
+ button {
+ color: $td-dark-active-color;
+ background-color: $td-dark-active-bg;
+ border-color: $td-dark-active-bg;
+ }
+ }
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/actions.d.ts b/node_modules/@eonasdan/tempus-dominus/types/actions.d.ts
new file mode 100644
index 0000000..31ad96c
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/actions.d.ts
@@ -0,0 +1,37 @@
+import ActionTypes from './utilities/action-types';
+/**
+ * Logic for various click actions
+ */
+export default class Actions {
+ private optionsStore;
+ private validation;
+ private dates;
+ private display;
+ private _eventEmitters;
+ constructor();
+ /**
+ * 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: any, action?: ActionTypes): void;
+ private handleShowClockContainers;
+ private handleNextPrevious;
+ /**
+ * After setting the value it will either show the clock or hide the widget.
+ * @param e
+ */
+ private hideOrClock;
+ /**
+ * Common function to manipulate {@link lastPicked} by `unit`.
+ * @param lastPicked
+ * @param unit
+ * @param value Value to change by
+ */
+ private manipulateAndSet;
+ private handleSelectCalendarMode;
+ private handleToggle;
+ private handleSelectDay;
+ private handleMultiDate;
+ private handleDateRange;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/dates.d.ts b/node_modules/@eonasdan/tempus-dominus/types/dates.d.ts
new file mode 100644
index 0000000..2228546
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/dates.d.ts
@@ -0,0 +1,79 @@
+import { DateTime, Unit } from './datetime';
+export default 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];
+ updateInput(target?: DateTime): void;
+ /**
+ * 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;
+ private _setValueNull;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/datetime.d.ts b/node_modules/@eonasdan/tempus-dominus/types/datetime.d.ts
new file mode 100644
index 0000000..db62632
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/datetime.d.ts
@@ -0,0 +1,257 @@
+import { FormatLocalization } from './utilities/options';
+export declare enum Unit {
+ seconds = "seconds",
+ minutes = "minutes",
+ hours = "hours",
+ date = "date",
+ month = "month",
+ year = "year"
+}
+export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {
+ timeStyle?: 'short' | 'medium' | 'long';
+ dateStyle?: 'short' | 'medium' | 'long' | 'full';
+ numberingSystem?: string;
+}
+/**
+ * Returns an Intl format object based on the provided object
+ * @param unit
+ */
+export declare const getFormatByUnit: (unit: Unit) => object;
+/**
+ * Attempts to guess the hour cycle of the given local
+ * @param locale
+ */
+export declare const guessHourCycle: (locale: string) => Intl.LocaleHourCycleKey;
+/**
+ * For the most part this object behaves exactly the same way
+ * as the native Date object with a little extra spice.
+ */
+export declare class DateTime extends Date {
+ localization: FormatLocalization;
+ /**
+ * Chainable way to set the {@link locale}
+ * @param value
+ * @deprecated use setLocalization with a FormatLocalization object instead
+ */
+ setLocale(value: string): this;
+ /**
+ * Chainable way to set the {@link localization}
+ * @param value
+ */
+ setLocalization(value: FormatLocalization): this;
+ /**
+ * Converts a plain JS date object to a DateTime object.
+ * Doing this allows access to format, etc.
+ * @param date
+ * @param locale this parameter is deprecated. Use formatLocalization instead.
+ * @param formatLocalization
+ */
+ static convert(date: Date, locale?: string, formatLocalization?: FormatLocalization): DateTime;
+ /**
+ * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.
+ */
+ get clone(): DateTime;
+ static isValid(d: any): boolean;
+ /**
+ * 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;
+ /**
+ * Return true if {@link compare} is before this date
+ * @param compare The Date/DateTime to compare
+ * @param unit If provided, uses {@link startOf} for
+ * comparison.
+ */
+ 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
+ * comparison.
+ */
+ 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
+ * comparison.
+ */
+ 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?: Record): Record;
+ /**
+ * 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 hour, e.g. 01...10
+ * @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.
+ */
+ getHoursFormatted(hourCycle?: Intl.LocaleHourCycleKey): 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);
+ /**
+ * Gets the week of the year
+ */
+ get week(): number;
+ /**
+ * Returns the number of weeks in the year
+ */
+ weeksInWeekYear(): 53 | 52;
+ /**
+ * Returns true or false depending on if the year is a leap year or not.
+ */
+ get isLeapYear(): boolean;
+ private computeOrdinal;
+ private nonLeapLadder;
+ private leapLadder;
+ private dateTimeRegex;
+ private formattingTokens;
+ /**
+ * Returns a list of month values based on the current locale
+ */
+ private getAllMonths;
+ /**
+ * Replaces an expanded token set (e.g. LT/LTS)
+ */
+ private replaceTokens;
+ private match2;
+ private match3;
+ private match4;
+ private match1to2;
+ private matchSigned;
+ private matchOffset;
+ private matchWord;
+ private parseTwoDigitYear;
+ private offsetFromString;
+ /**
+ * z = -4, zz = -04, zzz = -0400
+ * @param date
+ * @param style
+ * @private
+ */
+ private zoneInformation;
+ private zoneExpressions;
+ private addInput;
+ private getLocaleAfternoon;
+ private meridiemMatch;
+ private expressions;
+ private correctHours;
+ private makeParser;
+ /**
+ * Attempts to create a DateTime from a string.
+ * @param input date as string
+ * @param localization provides the date template the string is in via the format property
+ */
+ static fromString(input: string, localization: FormatLocalization): DateTime;
+ /**
+ * 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 optional object. If provided, method will use Intl., otherwise the localizations format properties
+ * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.
+ */
+ format(template?: DateTimeFormatOptions | string, locale?: string): string;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/calendar/date-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/date-display.d.ts
new file mode 100644
index 0000000..daf3b68
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/date-display.d.ts
@@ -0,0 +1,30 @@
+import { Paint } from '../index';
+/**
+ * Creates and updates the grid for `date`
+ */
+export default 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;
+ private _dateToDataValue;
+ private _handleDateRange;
+ private handleMouseEvents;
+ private _updateCalendarView;
+ /***
+ * Generates a html row that contains the days of the week.
+ * @private
+ */
+ private _daysOfTheWeek;
+ private _handleCalendarWeeks;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/calendar/decade-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/decade-display.d.ts
new file mode 100644
index 0000000..11587f8
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/decade-display.d.ts
@@ -0,0 +1,22 @@
+import { Paint } from '../index';
+/**
+ * Creates and updates the grid for `seconds`
+ */
+export default 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/calendar/month-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/month-display.d.ts
new file mode 100644
index 0000000..54580a2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/month-display.d.ts
@@ -0,0 +1,20 @@
+import { Paint } from '../index';
+/**
+ * Creates and updates the grid for `month`
+ */
+export default 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/calendar/year-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/year-display.d.ts
new file mode 100644
index 0000000..35e6463
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/calendar/year-display.d.ts
@@ -0,0 +1,22 @@
+import { Paint } from '../index';
+/**
+ * Creates and updates the grid for `year`
+ */
+export default 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/collapse.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/collapse.d.ts
new file mode 100644
index 0000000..a3507f7
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/collapse.d.ts
@@ -0,0 +1,36 @@
+/**
+ * Provides a collapse functionality to the view changes
+ */
+export default class Collapse {
+ /**
+ * Flips the show/hide state of `target`
+ * @param target html element to affect.
+ */
+ static toggle(target: HTMLElement): void;
+ /**
+ * Skips any animation or timeouts and immediately set the element to show.
+ * @param target
+ */
+ static showImmediately(target: HTMLElement): void;
+ /**
+ * If `target` is not already showing, then show after the animation.
+ * @param target
+ */
+ static show(target: HTMLElement): void;
+ /**
+ * Skips any animation or timeouts and immediately set the element to hide.
+ * @param target
+ */
+ static hideImmediately(target: HTMLElement): void;
+ /**
+ * If `target` is not already hidden, then hide after the animation.
+ * @param target HTML Element
+ */
+ static hide(target: HTMLElement): void;
+ /**
+ * Gets the transition duration from the `element` by getting css properties
+ * `transition-duration` and `transition-delay`
+ * @param element HTML Element
+ */
+ private static getTransitionDurationFromElement;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/index.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/index.d.ts
new file mode 100644
index 0000000..e043854
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/index.d.ts
@@ -0,0 +1,148 @@
+import DateDisplay from './calendar/date-display';
+import MonthDisplay from './calendar/month-display';
+import YearDisplay from './calendar/year-display';
+import DecadeDisplay from './calendar/decade-display';
+import TimeDisplay from './time/time-display';
+import HourDisplay from './time/hour-display';
+import MinuteDisplay from './time/minute-display';
+import SecondDisplay from './time/second-display';
+import { DateTime, Unit } from '../datetime';
+import { ViewUpdateValues } from '../utilities/event-emitter';
+/**
+ * Main class for all things display related.
+ */
+export default 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;
+ get dateContainer(): HTMLElement | undefined;
+ get timeContainer(): 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;
+ /**
+ * 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;
+ private _showSetupViewMode;
+ private _showSetDefaultIfNeeded;
+ 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;
+ private _buildWidgetSideBySide;
+ /**
+ * 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 _hasDateAndTime(): 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;
+ refreshCurrentView(): void;
+}
+export type Paint = (unit: Unit | 'decade', innerDate: DateTime, classes: string[], element: HTMLElement) => void;
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/time/hour-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/time/hour-display.d.ts
new file mode 100644
index 0000000..740b9ed
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/time/hour-display.d.ts
@@ -0,0 +1,19 @@
+import { Paint } from '../index';
+/**
+ * Creates and updates the grid for `hours`
+ */
+export default 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/time/minute-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/time/minute-display.d.ts
new file mode 100644
index 0000000..b1eb8b2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/time/minute-display.d.ts
@@ -0,0 +1,19 @@
+import { Paint } from '../index';
+/**
+ * Creates and updates the grid for `minutes`
+ */
+export default 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/time/second-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/time/second-display.d.ts
new file mode 100644
index 0000000..2751522
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/time/second-display.d.ts
@@ -0,0 +1,19 @@
+import { Paint } from '../index';
+/**
+ * Creates and updates the grid for `seconds`
+ */
+export default 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/display/time/time-display.d.ts b/node_modules/@eonasdan/tempus-dominus/types/display/time/time-display.d.ts
new file mode 100644
index 0000000..4ae29b2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/display/time/time-display.d.ts
@@ -0,0 +1,26 @@
+/**
+ * Creates the clock display
+ */
+export default 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/ar-SA.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/ar-SA.d.ts
new file mode 100644
index 0000000..2f2e64f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/ar-SA.d.ts
@@ -0,0 +1,46 @@
+declare const name = "ar-SA";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => any;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/ar.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/ar.d.ts
new file mode 100644
index 0000000..bb84836
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/ar.d.ts
@@ -0,0 +1,46 @@
+declare const name = "ar";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => any;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/ca.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/ca.d.ts
new file mode 100644
index 0000000..304b8a2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/ca.d.ts
@@ -0,0 +1,46 @@
+declare const name = "ca";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ startOfTheWeek: number;
+ locale: string;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/cs.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/cs.d.ts
new file mode 100644
index 0000000..44030be
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/cs.d.ts
@@ -0,0 +1,46 @@
+declare const name = "cs";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LTS: string;
+ LT: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/de.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/de.d.ts
new file mode 100644
index 0000000..333ec99
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/de.d.ts
@@ -0,0 +1,46 @@
+declare const name = "de";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LTS: string;
+ LT: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/es.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/es.d.ts
new file mode 100644
index 0000000..42ed947
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/es.d.ts
@@ -0,0 +1,46 @@
+declare const name = "es";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ startOfTheWeek: number;
+ locale: string;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/fi.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/fi.d.ts
new file mode 100644
index 0000000..de01096
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/fi.d.ts
@@ -0,0 +1,46 @@
+declare const name = "fi";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/fr.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/fr.d.ts
new file mode 100644
index 0000000..d6eddc2
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/fr.d.ts
@@ -0,0 +1,46 @@
+declare const name = "fr";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/hy.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/hy.d.ts
new file mode 100644
index 0000000..5dd6791
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/hy.d.ts
@@ -0,0 +1,46 @@
+declare const name = "hy";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => any;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/it.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/it.d.ts
new file mode 100644
index 0000000..9e0d9a6
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/it.d.ts
@@ -0,0 +1,46 @@
+declare const name = "it";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/nl.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/nl.d.ts
new file mode 100644
index 0000000..80731a9
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/nl.d.ts
@@ -0,0 +1,46 @@
+declare const name = "nl";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/pl.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/pl.d.ts
new file mode 100644
index 0000000..4f7584f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/pl.d.ts
@@ -0,0 +1,46 @@
+declare const name = "pl";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/ro.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/ro.d.ts
new file mode 100644
index 0000000..6311669
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/ro.d.ts
@@ -0,0 +1,46 @@
+declare const name = "ro";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => any;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/ru.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/ru.d.ts
new file mode 100644
index 0000000..23c45d9
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/ru.d.ts
@@ -0,0 +1,46 @@
+declare const name = "ru";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => any;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/sl.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/sl.d.ts
new file mode 100644
index 0000000..b205b39
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/sl.d.ts
@@ -0,0 +1,46 @@
+declare const name = "sl";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/locales/tr.d.ts b/node_modules/@eonasdan/tempus-dominus/types/locales/tr.d.ts
new file mode 100644
index 0000000..0330754
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/locales/tr.d.ts
@@ -0,0 +1,46 @@
+declare const name = "tr";
+declare const localization: {
+ today: string;
+ clear: string;
+ close: string;
+ selectMonth: string;
+ previousMonth: string;
+ nextMonth: string;
+ selectYear: string;
+ previousYear: string;
+ nextYear: string;
+ selectDecade: string;
+ previousDecade: string;
+ nextDecade: string;
+ previousCentury: string;
+ nextCentury: string;
+ pickHour: string;
+ incrementHour: string;
+ decrementHour: string;
+ pickMinute: string;
+ incrementMinute: string;
+ decrementMinute: string;
+ pickSecond: string;
+ incrementSecond: string;
+ decrementSecond: string;
+ toggleMeridiem: string;
+ selectTime: string;
+ selectDate: string;
+ dayViewHeaderFormat: {
+ month: string;
+ year: string;
+ };
+ locale: string;
+ startOfTheWeek: number;
+ dateFormats: {
+ LT: string;
+ LTS: string;
+ L: string;
+ LL: string;
+ LLL: string;
+ LLLL: string;
+ };
+ ordinal: (n: any) => string;
+ format: string;
+};
+export { localization, name };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/plugins/bi-one.d.ts b/node_modules/@eonasdan/tempus-dominus/types/plugins/bi-one.d.ts
new file mode 100644
index 0000000..b1c9f81
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/plugins/bi-one.d.ts
@@ -0,0 +1,14 @@
+declare const biOneIcons: {
+ type: string;
+ time: string;
+ date: string;
+ up: string;
+ down: string;
+ previous: string;
+ next: string;
+ today: string;
+ clear: string;
+ close: string;
+};
+declare const load: (_: any, __: any, tdFactory: any) => void;
+export { biOneIcons, load };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/plugins/customDateFormat.d.ts b/node_modules/@eonasdan/tempus-dominus/types/plugins/customDateFormat.d.ts
new file mode 100644
index 0000000..71bcbd7
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/plugins/customDateFormat.d.ts
@@ -0,0 +1,2 @@
+declare const _default: () => void;
+export { _default as default };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/plugins/fa-five.d.ts b/node_modules/@eonasdan/tempus-dominus/types/plugins/fa-five.d.ts
new file mode 100644
index 0000000..ad75fc6
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/plugins/fa-five.d.ts
@@ -0,0 +1,14 @@
+declare const faFiveIcons: {
+ type: string;
+ time: string;
+ date: string;
+ up: string;
+ down: string;
+ previous: string;
+ next: string;
+ today: string;
+ clear: string;
+ close: string;
+};
+declare const load: (_: any, __: any, tdFactory: any) => void;
+export { faFiveIcons, load };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/plugins/moment-parse.d.ts b/node_modules/@eonasdan/tempus-dominus/types/plugins/moment-parse.d.ts
new file mode 100644
index 0000000..f7ea595
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/plugins/moment-parse.d.ts
@@ -0,0 +1,2 @@
+declare const _default: (option: any, tdClasses: any, tdFactory: any) => void;
+export { _default as default };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/tempus-dominus.d.ts b/node_modules/@eonasdan/tempus-dominus/types/tempus-dominus.d.ts
new file mode 100644
index 0000000..aaa5db0
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/tempus-dominus.d.ts
@@ -0,0 +1,212 @@
+import Display from './display/index';
+import Dates from './dates';
+import { DateTime, DateTimeFormatOptions, Unit } from './datetime';
+import Namespace from './utilities/namespace';
+import Options from './utilities/options';
+import DefaultOptions, { DefaultEnLocalization } from './utilities/default-options';
+/**
+ * A robust and powerful date/time picker component.
+ */
+declare class TempusDominus {
+ _subscribers: {
+ [key: string]: ((event: any) => Record)[];
+ };
+ private _isDisabled;
+ private _toggle;
+ private _currentPromptTimeTimeout;
+ private actions;
+ private optionsStore;
+ private _eventEmitters;
+ display: Display;
+ dates: Dates;
+ constructor(element: HTMLElement, options?: Options);
+ get viewDate(): DateTime;
+ set viewDate(value: DateTime);
+ /**
+ * 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
+ */
+ toggle(): void;
+ /**
+ * Shows the picker unless the picker is disabled.
+ * @public
+ */
+ show(): void;
+ /**
+ * Hides the picker unless the picker is disabled.
+ * @public
+ */
+ hide(): void;
+ /**
+ * Disables the picker and the target input field.
+ * @public
+ */
+ disable(): void;
+ /**
+ * Enables the picker and the target input field.
+ * @public
+ */
+ enable(): void;
+ /**
+ * 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
+ */
+ subscribe(eventTypes: string | string[], callbacks: (event: any) => void | ((event: any) => void)[]): {
+ unsubscribe: () => void;
+ } | {
+ unsubscribe: () => void;
+ }[];
+ /**
+ * 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
+ */
+ 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
+ */
+ private _triggerEvent;
+ private _publish;
+ /**
+ * 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
+ */
+ private _initializeOptions;
+ /**
+ * 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
+ */
+ private _initializeToggle;
+ /**
+ * 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;
+ /**
+ * Event for when the toggle is clicked. This is a class level method so there's
+ * something for the remove listener function.
+ * @private
+ */
+ private _openClickEvent;
+}
+/**
+ * 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;
+ DefaultEnLocalization: {
+ clear?: string;
+ close?: string;
+ dayViewHeaderFormat?: DateTimeFormatOptions;
+ decrementHour?: string;
+ decrementMinute?: string;
+ decrementSecond?: string;
+ incrementHour?: string;
+ incrementMinute?: string;
+ incrementSecond?: string;
+ maxWeekdayLength?: number;
+ nextCentury?: string;
+ nextDecade?: string;
+ nextMonth?: string;
+ nextYear?: string;
+ pickHour?: string;
+ pickMinute?: string;
+ pickSecond?: string;
+ previousCentury?: string;
+ previousDecade?: string;
+ previousMonth?: string;
+ previousYear?: string;
+ selectDate?: string;
+ selectDecade?: string;
+ selectMonth?: string;
+ selectTime?: string;
+ selectYear?: string;
+ startOfTheWeek?: number;
+ today?: string;
+ toggleMeridiem?: string;
+ dateFormats?: {
+ L?: string;
+ LL?: string;
+ LLL?: string;
+ LLLL?: string;
+ LT?: string;
+ LTS?: string;
+ };
+ format?: string;
+ hourCycle?: Intl.LocaleHourCycleKey;
+ locale?: string;
+ ordinal?: (n: number) => any;
+ };
+};
+declare const version = "6.7.19";
+export { TempusDominus, extend, loadLocale, locale, Namespace, DefaultOptions, DateTime, Unit, version, DateTimeFormatOptions, Options, DefaultEnLocalization, };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/action-types.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/action-types.d.ts
new file mode 100644
index 0000000..c54bd82
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/action-types.d.ts
@@ -0,0 +1,28 @@
+declare enum ActionTypes {
+ next = "next",
+ previous = "previous",
+ changeCalendarView = "changeCalendarView",
+ selectMonth = "selectMonth",
+ selectYear = "selectYear",
+ selectDecade = "selectDecade",
+ selectDay = "selectDay",
+ selectHour = "selectHour",
+ selectMinute = "selectMinute",
+ selectSecond = "selectSecond",
+ incrementHours = "incrementHours",
+ incrementMinutes = "incrementMinutes",
+ incrementSeconds = "incrementSeconds",
+ decrementHours = "decrementHours",
+ decrementMinutes = "decrementMinutes",
+ decrementSeconds = "decrementSeconds",
+ toggleMeridiem = "toggleMeridiem",
+ togglePicker = "togglePicker",
+ showClock = "showClock",
+ showHours = "showHours",
+ showMinutes = "showMinutes",
+ showSeconds = "showSeconds",
+ clear = "clear",
+ close = "close",
+ today = "today"
+}
+export default ActionTypes;
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/calendar-modes.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/calendar-modes.d.ts
new file mode 100644
index 0000000..1ffb0c1
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/calendar-modes.d.ts
@@ -0,0 +1,9 @@
+import { Unit } from '../datetime';
+import ViewMode from './view-mode';
+declare const CalendarModes: {
+ name: keyof ViewMode;
+ className: string;
+ unit: Unit;
+ step: number;
+}[];
+export default CalendarModes;
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/default-format-localization.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/default-format-localization.d.ts
new file mode 100644
index 0000000..9765322
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/default-format-localization.d.ts
@@ -0,0 +1,15 @@
+declare const _default: {
+ dateFormats?: {
+ L?: string;
+ LL?: string;
+ LLL?: string;
+ LLLL?: string;
+ LT?: string;
+ LTS?: string;
+ };
+ format?: string;
+ hourCycle?: Intl.LocaleHourCycleKey;
+ locale?: string;
+ ordinal?: (n: number) => any;
+};
+export default _default;
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/default-options.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/default-options.d.ts
new file mode 100644
index 0000000..14c3de9
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/default-options.d.ts
@@ -0,0 +1,46 @@
+import Options from './options';
+declare const DefaultOptions: Options;
+export default DefaultOptions;
+export declare const DefaultEnLocalization: {
+ clear?: string;
+ close?: string;
+ dayViewHeaderFormat?: import("../datetime").DateTimeFormatOptions;
+ decrementHour?: string;
+ decrementMinute?: string;
+ decrementSecond?: string;
+ incrementHour?: string;
+ incrementMinute?: string;
+ incrementSecond?: string;
+ maxWeekdayLength?: number;
+ nextCentury?: string;
+ nextDecade?: string;
+ nextMonth?: string;
+ nextYear?: string;
+ pickHour?: string;
+ pickMinute?: string;
+ pickSecond?: string;
+ previousCentury?: string;
+ previousDecade?: string;
+ previousMonth?: string;
+ previousYear?: string;
+ selectDate?: string;
+ selectDecade?: string;
+ selectMonth?: string;
+ selectTime?: string;
+ selectYear?: string;
+ startOfTheWeek?: number;
+ today?: string;
+ toggleMeridiem?: string;
+ dateFormats?: {
+ L?: string;
+ LL?: string;
+ LLL?: string;
+ LLLL?: string;
+ LT?: string;
+ LTS?: string;
+ };
+ format?: string;
+ hourCycle?: Intl.LocaleHourCycleKey;
+ locale?: string;
+ ordinal?: (n: number) => any;
+};
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/errors.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/errors.d.ts
new file mode 100644
index 0000000..2dc7b81
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/errors.d.ts
@@ -0,0 +1,84 @@
+export declare class TdError extends Error {
+ code: number;
+}
+export declare class ErrorMessages {
+ private base;
+ /**
+ * 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
+ */
+ numbersOutOfRange(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;
+ deprecatedWarning(message: string, remediation?: string): void;
+ throwError(message: any): void;
+ /**
+ * 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;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/event-emitter.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/event-emitter.d.ts
new file mode 100644
index 0000000..e2881e7
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/event-emitter.d.ts
@@ -0,0 +1,23 @@
+import { DateTime, Unit } from '../datetime';
+import ActionTypes from './action-types';
+import { BaseEvent } from './event-types';
+export type ViewUpdateValues = Unit | 'decade' | 'clock' | 'calendar' | 'all';
+declare class EventEmitter {
+ private subscribers;
+ subscribe(callback: (value: T) => void): any;
+ unsubscribe(index: number): void;
+ emit(value?: T): void;
+ destroy(): void;
+}
+export declare class EventEmitters {
+ triggerEvent: EventEmitter;
+ viewUpdate: EventEmitter;
+ updateDisplay: EventEmitter;
+ action: EventEmitter<{
+ e: any;
+ action?: ActionTypes;
+ }>;
+ updateViewDate: EventEmitter;
+ destroy(): void;
+}
+export {};
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/event-types.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/event-types.d.ts
new file mode 100644
index 0000000..bc621f7
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/event-types.d.ts
@@ -0,0 +1,37 @@
+import { DateTime } from '../datetime';
+import ViewMode from './view-mode';
+interface BaseEvent {
+ type: string;
+ viewMode?: keyof ViewMode;
+}
+/**
+ * Triggers when setValue fails because of validation rules etc.
+ * @event FailEvent
+ */
+interface FailEvent extends BaseEvent {
+ reason: string;
+ date: DateTime;
+ oldDate: DateTime;
+}
+/**
+ * Triggers when the picker is hidden.
+ */
+interface HideEvent extends BaseEvent {
+ date: DateTime;
+}
+/**
+ * Triggers when a change is successful.
+ */
+interface ChangeEvent extends BaseEvent {
+ date: DateTime | undefined;
+ oldDate: DateTime;
+ isClear: boolean;
+ isValid: boolean;
+}
+/**
+ * Triggers when the view is changed for instance from month to year.
+ */
+interface ViewUpdateEvent extends BaseEvent {
+ viewDate: DateTime;
+}
+export { BaseEvent, FailEvent, HideEvent, ChangeEvent, ViewUpdateEvent };
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/namespace.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/namespace.d.ts
new file mode 100644
index 0000000..38f2df3
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/namespace.d.ts
@@ -0,0 +1,222 @@
+import { ErrorMessages } from './errors';
+/**
+ * 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: 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;
+ /**
+ * The outer element for the calendar view.
+ */
+ dateContainer: string;
+ /**
+ * The outer element for the decades view.
+ */
+ decadesContainer: string;
+ /**
+ * Applied to elements within the decade 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;
+ rangeIn: string;
+ rangeStart: string;
+ rangeEnd: string;
+ /**
+ * 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;
+ /**
+ * 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;
+ /**
+ * 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;
+}
+export default class Namespace {
+ static NAME: string;
+ static dataKey: string;
+ static events: Events;
+ static css: Css;
+ static errorMessages: ErrorMessages;
+}
+export {};
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/optionConverter.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/optionConverter.d.ts
new file mode 100644
index 0000000..9086533
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/optionConverter.d.ts
@@ -0,0 +1,67 @@
+import { DateTime } from '../datetime';
+import Options, { FormatLocalization } from './options';
+export declare class OptionConverter {
+ private static ignoreProperties;
+ static deepCopy(input: any): Options;
+ private static isValue;
+ /**
+ * Finds value out of an object based on a string, period delimited, path
+ * @param paths
+ * @param obj
+ */
+ static objectPath(paths: string, obj: any): any;
+ /**
+ * 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 localization
+ * @param path
+ */
+ static spread(provided: any, copyTo: any, localization: FormatLocalization, path?: string): void;
+ static processKey(key: string, value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ providedType: string, defaultType: string, path: string, localization: FormatLocalization): any;
+ static _mergeOptions(providedOptions: Options, mergeTo: Options): Options;
+ static _dataToOptions(element: any, options: Options): Options;
+ private static normalizeObject;
+ /**
+ * 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: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ localization: FormatLocalization): DateTime | 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: string, value: any, providedType: string, localization: FormatLocalization): void;
+ /**
+ * 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: string, value: any, providedType: string): void;
+ /**
+ * 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: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+ optionName: string, localization: FormatLocalization): DateTime;
+ private static _flattenDefaults;
+ private static getFlattenDefaultOptions;
+ /**
+ * Some options conflict like min/max date. Verify that these kinds of options
+ * are set correctly.
+ * @param config
+ */
+ static _validateConflicts(config: Options): void;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/optionProcessor.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/optionProcessor.d.ts
new file mode 100644
index 0000000..786ef9f
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/optionProcessor.d.ts
@@ -0,0 +1,11 @@
+import type { FormatLocalization } from './options';
+interface OptionProcessorFunctionArguments {
+ key: string;
+ value: any;
+ providedType: string;
+ defaultType: string;
+ path: string;
+ localization: FormatLocalization;
+}
+export declare function processKey(this: void, args: OptionProcessorFunctionArguments): any;
+export {};
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/options.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/options.d.ts
new file mode 100644
index 0000000..3068aff
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/options.d.ts
@@ -0,0 +1,116 @@
+import { DateTime, DateTimeFormatOptions } from '../datetime';
+import ViewMode from './view-mode';
+export default interface Options {
+ allowInputToggle?: boolean;
+ container?: HTMLElement;
+ dateRange?: boolean;
+ debug?: boolean;
+ defaultDate?: DateTime;
+ 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?: {
+ clear?: string;
+ close?: string;
+ date?: string;
+ down?: string;
+ next?: string;
+ previous?: string;
+ time?: string;
+ today?: string;
+ type?: 'icons' | 'sprites';
+ up?: string;
+ };
+ viewMode?: keyof ViewMode;
+ sideBySide?: boolean;
+ inline?: boolean;
+ keepOpen?: boolean;
+ theme?: 'light' | 'dark' | 'auto';
+ placement?: 'top' | 'bottom';
+ };
+ keepInvalid?: boolean;
+ localization?: Localization;
+ meta?: Record;
+ multipleDates?: boolean;
+ multipleDatesSeparator?: string;
+ promptTimeOnDateChange?: boolean;
+ promptTimeOnDateChangeTransitionDelay?: number;
+ restrictions?: {
+ minDate?: DateTime;
+ maxDate?: DateTime;
+ enabledDates?: DateTime[];
+ disabledDates?: DateTime[];
+ enabledHours?: number[];
+ disabledHours?: number[];
+ disabledTimeIntervals?: {
+ from: DateTime;
+ to: DateTime;
+ }[];
+ daysOfWeekDisabled?: number[];
+ };
+ stepping?: number;
+ useCurrent?: boolean;
+ viewDate?: DateTime;
+}
+export interface FormatLocalization {
+ dateFormats?: {
+ L?: string;
+ LL?: string;
+ LLL?: string;
+ LLLL?: string;
+ LT?: string;
+ LTS?: string;
+ };
+ format?: string;
+ hourCycle?: Intl.LocaleHourCycleKey;
+ locale?: string;
+ ordinal?: (n: number) => any;
+}
+export interface Localization extends FormatLocalization {
+ clear?: string;
+ close?: string;
+ dayViewHeaderFormat?: DateTimeFormatOptions;
+ decrementHour?: string;
+ decrementMinute?: string;
+ decrementSecond?: string;
+ incrementHour?: string;
+ incrementMinute?: string;
+ incrementSecond?: string;
+ maxWeekdayLength?: number;
+ nextCentury?: string;
+ nextDecade?: string;
+ nextMonth?: string;
+ nextYear?: string;
+ pickHour?: string;
+ pickMinute?: string;
+ pickSecond?: string;
+ previousCentury?: string;
+ previousDecade?: string;
+ previousMonth?: string;
+ previousYear?: string;
+ selectDate?: string;
+ selectDecade?: string;
+ selectMonth?: string;
+ selectTime?: string;
+ selectYear?: string;
+ startOfTheWeek?: number;
+ today?: string;
+ toggleMeridiem?: string;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/optionsStore.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/optionsStore.d.ts
new file mode 100644
index 0000000..ea52a0d
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/optionsStore.d.ts
@@ -0,0 +1,23 @@
+import { DateTime } from '../datetime';
+import ViewMode from './view-mode';
+import Options from './options';
+export declare class OptionsStore {
+ options: Options;
+ element: HTMLElement;
+ input: HTMLInputElement;
+ unset: boolean;
+ private _currentCalendarViewMode;
+ get currentCalendarViewMode(): number;
+ set currentCalendarViewMode(value: number);
+ _viewDate: DateTime;
+ get viewDate(): DateTime;
+ set viewDate(v: DateTime);
+ /**
+ * When switching back to the calendar from the clock,
+ * this sets currentView to the correct calendar view.
+ */
+ refreshCurrentView(): void;
+ minimumCalendarViewMode: number;
+ currentView: keyof ViewMode;
+ get isTwelveHour(): boolean;
+}
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/service-locator.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/service-locator.d.ts
new file mode 100644
index 0000000..4f6b2ba
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/service-locator.d.ts
@@ -0,0 +1,8 @@
+export declare type Constructable = new (...args: any[]) => T;
+declare class ServiceLocator {
+ private cache;
+ locate(identifier: Constructable): T;
+}
+export declare const setupServiceLocator: () => void;
+export declare let serviceLocator: ServiceLocator;
+export {};
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/typeChecker.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/typeChecker.d.ts
new file mode 100644
index 0000000..e63562d
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/typeChecker.d.ts
@@ -0,0 +1,33 @@
+import { DateTime } from '../datetime';
+import { FormatLocalization } from './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
+ */
+export declare function tryConvertToDateTime(this: void, d: DateTime | Date | string, localization: FormatLocalization): DateTime | null;
+/**
+ * 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
+ */
+export declare function convertToDateTime(this: void, d: DateTime | Date | string, optionName: string, localization: FormatLocalization): DateTime;
+/**
+ * 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
+ */
+export declare function typeCheckDateArray(this: void, optionName: string, value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+providedType: string, localization?: FormatLocalization): void;
+/**
+ * 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
+ */
+export declare function typeCheckNumberArray(this: void, optionName: string, value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
+providedType: string): void;
diff --git a/node_modules/@eonasdan/tempus-dominus/types/utilities/view-mode.d.ts b/node_modules/@eonasdan/tempus-dominus/types/utilities/view-mode.d.ts
new file mode 100644
index 0000000..83bbc63
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/utilities/view-mode.d.ts
@@ -0,0 +1,8 @@
+type ViewMode = {
+ clock: any;
+ calendar: any;
+ months: any;
+ years: any;
+ decades: any;
+};
+export default ViewMode;
diff --git a/node_modules/@eonasdan/tempus-dominus/types/validation.d.ts b/node_modules/@eonasdan/tempus-dominus/types/validation.d.ts
new file mode 100644
index 0000000..e192ef8
--- /dev/null
+++ b/node_modules/@eonasdan/tempus-dominus/types/validation.d.ts
@@ -0,0 +1,47 @@
+import { DateTime, Unit } from './datetime';
+/**
+ * Main class for date validation rules based on the options provided.
+ */
+export default class Validation {
+ private optionsStore;
+ constructor();
+ /**
+ * 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: DateTime, granularity?: Unit): boolean;
+ private _enabledDisabledDatesIsValid;
+ /**
+ * 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
+ */
+ private _isInDisabledDates;
+ /**
+ * 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
+ */
+ private _isInEnabledDates;
+ private _minMaxIsValid;
+ private _enabledDisabledHoursIsValid;
+ /**
+ * 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
+ */
+ private _isInDisabledHours;
+ /**
+ * 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
+ */
+ private _isInEnabledHours;
+ dateRangeIsValid(dates: DateTime[], index: number, target: DateTime): boolean;
+}
diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md
index cb5990c..397636e 100644
--- a/node_modules/accepts/HISTORY.md
+++ b/node_modules/accepts/HISTORY.md
@@ -1,76 +1,3 @@
-1.3.8 / 2022-02-02
-==================
-
- * deps: mime-types@~2.1.34
- - deps: mime-db@~1.51.0
- * deps: negotiator@0.6.3
-
-1.3.7 / 2019-04-29
-==================
-
- * deps: negotiator@0.6.2
- - Fix sorting charset, encoding, and language with extra parameters
-
-1.3.6 / 2019-04-28
-==================
-
- * deps: mime-types@~2.1.24
- - deps: mime-db@~1.40.0
-
-1.3.5 / 2018-02-28
-==================
-
- * deps: mime-types@~2.1.18
- - deps: mime-db@~1.33.0
-
-1.3.4 / 2017-08-22
-==================
-
- * deps: mime-types@~2.1.16
- - deps: mime-db@~1.29.0
-
-1.3.3 / 2016-05-02
-==================
-
- * deps: mime-types@~2.1.11
- - deps: mime-db@~1.23.0
- * deps: negotiator@0.6.1
- - perf: improve `Accept` parsing speed
- - perf: improve `Accept-Charset` parsing speed
- - perf: improve `Accept-Encoding` parsing speed
- - perf: improve `Accept-Language` parsing speed
-
-1.3.2 / 2016-03-08
-==================
-
- * deps: mime-types@~2.1.10
- - Fix extension of `application/dash+xml`
- - Update primary extension for `audio/mp4`
- - deps: mime-db@~1.22.0
-
-1.3.1 / 2016-01-19
-==================
-
- * deps: mime-types@~2.1.9
- - deps: mime-db@~1.21.0
-
-1.3.0 / 2015-09-29
-==================
-
- * deps: mime-types@~2.1.7
- - deps: mime-db@~1.19.0
- * deps: negotiator@0.6.0
- - Fix including type extensions in parameters in `Accept` parsing
- - Fix parsing `Accept` parameters with quoted equals
- - Fix parsing `Accept` parameters with quoted semicolons
- - Lazy-load modules from main entry point
- - perf: delay type concatenation until needed
- - perf: enable strict mode
- - perf: hoist regular expressions
- - perf: remove closures getting spec properties
- - perf: remove a closure from media type parsing
- - perf: remove property delete from media type parsing
-
1.2.13 / 2015-09-06
===================
diff --git a/node_modules/accepts/README.md b/node_modules/accepts/README.md
index 82680c5..ae36676 100644
--- a/node_modules/accepts/README.md
+++ b/node_modules/accepts/README.md
@@ -1,30 +1,24 @@
# accepts
-[![NPM Version][npm-version-image]][npm-url]
-[![NPM Downloads][npm-downloads-image]][npm-url]
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
-[![Build Status][github-actions-ci-image]][github-actions-ci-url]
+[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
-Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
In addition to negotiator, it allows:
-- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
- as well as `('text/html', 'application/json')`.
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`.
- Allows type shorthands such as `json`.
- Returns `false` when no types match
- Treats non-existent headers as `*`
## Installation
-This is a [Node.js](https://nodejs.org/en/) module available through the
-[npm registry](https://www.npmjs.com/). Installation is done using the
-[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
-
```sh
-$ npm install accepts
+npm install accepts
```
## API
@@ -94,11 +88,11 @@ server.
var accepts = require('accepts')
var http = require('http')
-function app (req, res) {
+function app(req, res) {
var accept = accepts(req)
// the order of this list is significant; should be server preferred order
- switch (accept.type(['json', 'html'])) {
+ switch(accept.type(['json', 'html'])) {
case 'json':
res.setHeader('Content-Type', 'application/json')
res.write('{"hello":"world!"}')
@@ -129,12 +123,13 @@ curl -I -H'Accept: text/html' http://localhost:3000/
[MIT](LICENSE)
-[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
-[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
-[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
-[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
-[node-version-image]: https://badgen.net/npm/node/accepts
-[node-version-url]: https://nodejs.org/en/download
-[npm-downloads-image]: https://badgen.net/npm/dm/accepts
+[npm-image]: https://img.shields.io/npm/v/accepts.svg
[npm-url]: https://npmjs.org/package/accepts
-[npm-version-image]: https://badgen.net/npm/v/accepts
+[node-version-image]: https://img.shields.io/node/v/accepts.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg
+[travis-url]: https://travis-ci.org/jshttp/accepts
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts
+[downloads-image]: https://img.shields.io/npm/dm/accepts.svg
+[downloads-url]: https://npmjs.org/package/accepts
diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js
index e9b2f63..e80192a 100644
--- a/node_modules/accepts/index.js
+++ b/node_modules/accepts/index.js
@@ -29,10 +29,9 @@ module.exports = Accepts
* @public
*/
-function Accepts (req) {
- if (!(this instanceof Accepts)) {
+function Accepts(req) {
+ if (!(this instanceof Accepts))
return new Accepts(req)
- }
this.headers = req.headers
this.negotiator = new Negotiator(req)
@@ -96,18 +95,12 @@ Accepts.prototype.types = function (types_) {
return this.negotiator.mediaTypes()
}
- // no accept header, return first given type
- if (!this.headers.accept) {
- return types[0]
- }
-
- var mimes = types.map(extToMime)
- var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
- var first = accepts[0]
-
- return first
- ? types[mimes.indexOf(first)]
- : false
+ if (!this.headers.accept) return types[0];
+ var mimes = types.map(extToMime);
+ var accepts = this.negotiator.mediaTypes(mimes.filter(validMime));
+ var first = accepts[0];
+ if (!first) return false;
+ return types[mimes.indexOf(first)];
}
/**
@@ -219,7 +212,7 @@ Accepts.prototype.languages = function (languages_) {
* @private
*/
-function extToMime (type) {
+function extToMime(type) {
return type.indexOf('/') === -1
? mime.lookup(type)
: type
@@ -233,6 +226,6 @@ function extToMime (type) {
* @private
*/
-function validMime (type) {
- return typeof type === 'string'
+function validMime(type) {
+ return typeof type === 'string';
}
diff --git a/node_modules/accepts/package.json b/node_modules/accepts/package.json
index 0f2d15d..299a168 100644
--- a/node_modules/accepts/package.json
+++ b/node_modules/accepts/package.json
@@ -1,7 +1,7 @@
{
"name": "accepts",
"description": "Higher-level content negotiation",
- "version": "1.3.8",
+ "version": "1.2.13",
"contributors": [
"Douglas Christopher Wilson ",
"Jonathan Ong (http://jongleberry.com)"
@@ -9,20 +9,12 @@
"license": "MIT",
"repository": "jshttp/accepts",
"dependencies": {
- "mime-types": "~2.1.34",
- "negotiator": "0.6.3"
+ "mime-types": "~2.1.6",
+ "negotiator": "0.5.3"
},
"devDependencies": {
- "deep-equal": "1.0.1",
- "eslint": "7.32.0",
- "eslint-config-standard": "14.1.1",
- "eslint-plugin-import": "2.25.4",
- "eslint-plugin-markdown": "2.2.1",
- "eslint-plugin-node": "11.1.0",
- "eslint-plugin-promise": "4.3.1",
- "eslint-plugin-standard": "4.1.0",
- "mocha": "9.2.0",
- "nyc": "15.1.0"
+ "istanbul": "0.3.19",
+ "mocha": "~1.21.5"
},
"files": [
"LICENSE",
@@ -33,10 +25,9 @@
"node": ">= 0.6"
},
"scripts": {
- "lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
- "test-ci": "nyc --reporter=lcov --reporter=text npm test",
- "test-cov": "nyc --reporter=html --reporter=text npm test"
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
},
"keywords": [
"content",
diff --git a/node_modules/array-flatten/array-flatten.js b/node_modules/array-flatten/array-flatten.js
index 089117b..cf2fa93 100644
--- a/node_modules/array-flatten/array-flatten.js
+++ b/node_modules/array-flatten/array-flatten.js
@@ -1,10 +1,3 @@
-'use strict'
-
-/**
- * Expose `arrayFlatten`.
- */
-module.exports = arrayFlatten
-
/**
* Recursive flatten function with depth.
*
@@ -13,12 +6,12 @@ module.exports = arrayFlatten
* @param {Number} depth
* @return {Array}
*/
-function flattenWithDepth (array, result, depth) {
+function flattenDepth (array, result, depth) {
for (var i = 0; i < array.length; i++) {
var value = array[i]
if (depth > 0 && Array.isArray(value)) {
- flattenWithDepth(value, result, depth - 1)
+ flattenDepth(value, result, depth - 1)
} else {
result.push(value)
}
@@ -55,10 +48,10 @@ function flattenForever (array, result) {
* @param {Number} depth
* @return {Array}
*/
-function arrayFlatten (array, depth) {
+module.exports = function (array, depth) {
if (depth == null) {
return flattenForever(array, [])
}
- return flattenWithDepth(array, [], depth)
+ return flattenDepth(array, [], depth)
}
diff --git a/node_modules/array-flatten/package.json b/node_modules/array-flatten/package.json
index 1a24e2a..285df29 100644
--- a/node_modules/array-flatten/package.json
+++ b/node_modules/array-flatten/package.json
@@ -1,6 +1,6 @@
{
"name": "array-flatten",
- "version": "1.1.1",
+ "version": "1.1.0",
"description": "Flatten an array of nested arrays into a single flat array",
"main": "array-flatten.js",
"files": [
diff --git a/node_modules/bignumber.js/CHANGELOG.md b/node_modules/bignumber.js/CHANGELOG.md
deleted file mode 100644
index e288a93..0000000
--- a/node_modules/bignumber.js/CHANGELOG.md
+++ /dev/null
@@ -1,266 +0,0 @@
-#### 9.0.0
-* 27/05/2019
-* For compatibility with legacy browsers, remove `Symbol` references.
-
-#### 8.1.1
-* 24/02/2019
-* [BUGFIX] #222 Restore missing `var` to `export BigNumber`.
-* Allow any key in BigNumber.Instance in *bignumber.d.ts*.
-
-#### 8.1.0
-* 23/02/2019
-* [NEW FEATURE] #220 Create a BigNumber using `{s, e, c}`.
-* [NEW FEATURE] `isBigNumber`: if `BigNumber.DEBUG` is `true`, also check that the BigNumber instance is well-formed.
-* Remove `instanceof` checks; just use `_isBigNumber` to identify a BigNumber instance.
-* Add `_isBigNumber` to prototype in *bignumber.mjs*.
-* Add tests for BigNumber creation from object.
-* Update *API.html*.
-
-#### 8.0.2
-* 13/01/2019
-* #209 `toPrecision` without argument should follow `toString`.
-* Improve *Use* section of *README*.
-* Optimise `toString(10)`.
-* Add verson number to API doc.
-
-#### 8.0.1
-* 01/11/2018
-* Rest parameter must be array type in *bignumber.d.ts*.
-
-#### 8.0.0
-* 01/11/2018
-* [NEW FEATURE] Add `BigNumber.sum` method.
-* [NEW FEATURE]`toFormat`: add `prefix` and `suffix` options.
-* [NEW FEATURE] #178 Pass custom formatting to `toFormat`.
-* [BREAKING CHANGE] #184 `toFraction`: return array of BigNumbers not strings.
-* [NEW FEATURE] #185 Enable overwrite of `valueOf` to prevent accidental addition to string.
-* #183 Add Node.js `crypto` requirement to documentation.
-* [BREAKING CHANGE] #198 Disallow signs and whitespace in custom alphabet.
-* [NEW FEATURE] #188 Implement `util.inspect.custom` for Node.js REPL.
-* #170 Make `isBigNumber` a type guard in *bignumber.d.ts*.
-* [BREAKING CHANGE] `BigNumber.min` and `BigNumber.max`: don't accept an array.
-* Update *.travis.yml*.
-* Remove *bower.json*.
-
-#### 7.2.1
-* 24/05/2018
-* Add `browser` field to *package.json*.
-
-#### 7.2.0
-* 22/05/2018
-* #166 Correct *.mjs* file. Remove extension from `main` field in *package.json*.
-
-#### 7.1.0
-* 18/05/2018
-* Add `module` field to *package.json* for *bignumber.mjs*.
-
-#### 7.0.2
-* 17/05/2018
-* #165 Bugfix: upper-case letters for bases 11-36 in a custom alphabet.
-* Add note to *README* regarding creating BigNumbers from Number values.
-
-#### 7.0.1
-* 26/04/2018
-* #158 Fix global object variable name typo.
-
-#### 7.0.0
-* 26/04/2018
-* #143 Remove global BigNumber from typings.
-* #144 Enable compatibility with `Object.freeze(Object.prototype)`.
-* #148 #123 #11 Only throw on a number primitive with more than 15 significant digits if `BigNumber.DEBUG` is `true`.
-* Only throw on an invalid BigNumber value if `BigNumber.DEBUG` is `true`. Return BigNumber `NaN` instead.
-* #154 `exponentiatedBy`: allow BigNumber exponent.
-* #156 Prevent Content Security Policy *unsafe-eval* issue.
-* `toFraction`: allow `Infinity` maximum denominator.
-* Comment-out some excess tests to reduce test time.
-* Amend indentation and other spacing.
-
-#### 6.0.0
-* 26/01/2018
-* #137 Implement `APLHABET` configuration option.
-* Remove `ERRORS` configuration option.
-* Remove `toDigits` method; extend `precision` method accordingly.
-* Remove s`round` method; extend `decimalPlaces` method accordingly.
-* Remove methods: `ceil`, `floor`, and `truncated`.
-* Remove method aliases: `add`, `cmp`, `isInt`, `isNeg`, `trunc`, `mul`, `neg` and `sub`.
-* Rename methods: `shift` to `shiftedBy`, `another` to `clone`, `toPower` to `exponentiatedBy`, and `equals` to `isEqualTo`.
-* Rename methods: add `is` prefix to `greaterThan`, `greaterThanOrEqualTo`, `lessThan` and `lessThanOrEqualTo`.
-* Add methods: `multipliedBy`, `isBigNumber`, `isPositive`, `integerValue`, `maximum` and `minimum`.
-* Refactor test suite.
-* Add *CHANGELOG.md*.
-* Rewrite *bignumber.d.ts*.
-* Redo API image.
-
-#### 5.0.0
-* 27/11/2017
-* #81 Don't throw on constructor call without `new`.
-
-#### 4.1.0
-* 26/09/2017
-* Remove node 0.6 from *.travis.yml*.
-* Add *bignumber.mjs*.
-
-#### 4.0.4
-* 03/09/2017
-* Add missing aliases to *bignumber.d.ts*.
-
-#### 4.0.3
-* 30/08/2017
-* Add types: *bignumber.d.ts*.
-
-#### 4.0.2
-* 03/05/2017
-* #120 Workaround Safari/Webkit bug.
-
-#### 4.0.1
-* 05/04/2017
-* #121 BigNumber.default to BigNumber['default'].
-
-#### 4.0.0
-* 09/01/2017
-* Replace BigNumber.isBigNumber method with isBigNumber prototype property.
-
-#### 3.1.2
-* 08/01/2017
-* Minor documentation edit.
-
-#### 3.1.1
-* 08/01/2017
-* Uncomment `isBigNumber` tests.
-* Ignore dot files.
-
-#### 3.1.0
-* 08/01/2017
-* Add `isBigNumber` method.
-
-#### 3.0.2
-* 08/01/2017
-* Bugfix: Possible incorrect value of `ERRORS` after a `BigNumber.another` call (due to `parseNumeric` declaration in outer scope).
-
-#### 3.0.1
-* 23/11/2016
-* Apply fix for old ipads with `%` issue, see #57 and #102.
-* Correct error message.
-
-#### 3.0.0
-* 09/11/2016
-* Remove `require('crypto')` - leave it to the user.
-* Add `BigNumber.set` as `BigNumber.config` alias.
-* Default `POW_PRECISION` to `0`.
-
-#### 2.4.0
-* 14/07/2016
-* #97 Add exports to support ES6 imports.
-
-#### 2.3.0
-* 07/03/2016
-* #86 Add modulus parameter to `toPower`.
-
-#### 2.2.0
-* 03/03/2016
-* #91 Permit larger JS integers.
-
-#### 2.1.4
-* 15/12/2015
-* Correct UMD.
-
-#### 2.1.3
-* 13/12/2015
-* Refactor re global object and crypto availability when bundling.
-
-#### 2.1.2
-* 10/12/2015
-* Bugfix: `window.crypto` not assigned to `crypto`.
-
-#### 2.1.1
-* 09/12/2015
-* Prevent code bundler from adding `crypto` shim.
-
-#### 2.1.0
-* 26/10/2015
-* For `valueOf` and `toJSON`, include the minus sign with negative zero.
-
-#### 2.0.8
-* 2/10/2015
-* Internal round function bugfix.
-
-#### 2.0.6
-* 31/03/2015
-* Add bower.json. Tweak division after in-depth review.
-
-#### 2.0.5
-* 25/03/2015
-* Amend README. Remove bitcoin address.
-
-#### 2.0.4
-* 25/03/2015
-* Critical bugfix #58: division.
-
-#### 2.0.3
-* 18/02/2015
-* Amend README. Add source map.
-
-#### 2.0.2
-* 18/02/2015
-* Correct links.
-
-#### 2.0.1
-* 18/02/2015
-* Add `max`, `min`, `precision`, `random`, `shiftedBy`, `toDigits` and `truncated` methods.
-* Add the short-forms: `add`, `mul`, `sd`, `sub` and `trunc`.
-* Add an `another` method to enable multiple independent constructors to be created.
-* Add support for the base 2, 8 and 16 prefixes `0b`, `0o` and `0x`.
-* Enable a rounding mode to be specified as a second parameter to `toExponential`, `toFixed`, `toFormat` and `toPrecision`.
-* Add a `CRYPTO` configuration property so cryptographically-secure pseudo-random number generation can be specified.
-* Add a `MODULO_MODE` configuration property to enable the rounding mode used by the `modulo` operation to be specified.
-* Add a `POW_PRECISION` configuration property to enable the number of significant digits calculated by the power operation to be limited.
-* Improve code quality.
-* Improve documentation.
-
-#### 2.0.0
-* 29/12/2014
-* Add `dividedToIntegerBy`, `isInteger` and `toFormat` methods.
-* Remove the following short-forms: `isF`, `isZ`, `toE`, `toF`, `toFr`, `toN`, `toP`, `toS`.
-* Store a BigNumber's coefficient in base 1e14, rather than base 10.
-* Add fast path for integers to BigNumber constructor.
-* Incorporate the library into the online documentation.
-
-#### 1.5.0
-* 13/11/2014
-* Add `toJSON` and `decimalPlaces` methods.
-
-#### 1.4.1
-* 08/06/2014
-* Amend README.
-
-#### 1.4.0
-* 08/05/2014
-* Add `toNumber`.
-
-#### 1.3.0
-* 08/11/2013
-* Ensure correct rounding of `sqrt` in all, rather than almost all, cases.
-* Maximum radix to 64.
-
-#### 1.2.1
-* 17/10/2013
-* Sign of zero when x < 0 and x + (-x) = 0.
-
-#### 1.2.0
-* 19/9/2013
-* Throw Error objects for stack.
-
-#### 1.1.1
-* 22/8/2013
-* Show original value in constructor error message.
-
-#### 1.1.0
-* 1/8/2013
-* Allow numbers with trailing radix point.
-
-#### 1.0.1
-* Bugfix: error messages with incorrect method name
-
-#### 1.0.0
-* 8/11/2012
-* Initial release
diff --git a/node_modules/bignumber.js/README.md b/node_modules/bignumber.js/README.md
deleted file mode 100644
index fc3c84c..0000000
--- a/node_modules/bignumber.js/README.md
+++ /dev/null
@@ -1,268 +0,0 @@
-
-
-A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic.
-
-[](https://travis-ci.org/MikeMcl/bignumber.js)
-
-
-
-## Features
-
- - Integers and decimals
- - Simple API but full-featured
- - Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal
- - 8 KB minified and gzipped
- - Replicates the `toExponential`, `toFixed`, `toPrecision` and `toString` methods of JavaScript's Number type
- - Includes a `toFraction` and a correctly-rounded `squareRoot` method
- - Supports cryptographically-secure pseudo-random number generation
- - No dependencies
- - Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only
- - Comprehensive [documentation](http://mikemcl.github.io/bignumber.js/) and test set
-
-
-
-If a smaller and simpler library is required see [big.js](https://github.com/MikeMcl/big.js/).
-It's less than half the size but only works with decimal numbers and only has half the methods.
-It also does not allow `NaN` or `Infinity`, or have the configuration options of this library.
-
-See also [decimal.js](https://github.com/MikeMcl/decimal.js/), which among other things adds support for non-integer powers, and performs all operations to a specified number of significant digits.
-
-## Load
-
-The library is the single JavaScript file *bignumber.js* (or minified, *bignumber.min.js*).
-
-Browser:
-
-```html
-
-```
-
-[Node.js](http://nodejs.org):
-
-```bash
-$ npm install bignumber.js
-```
-
-```javascript
-const BigNumber = require('bignumber.js');
-```
-
-ES6 module:
-
-```javascript
-import BigNumber from "./bignumber.mjs"
-```
-
-AMD loader libraries such as [requireJS](http://requirejs.org/):
-
-```javascript
-require(['bignumber'], function(BigNumber) {
- // Use BigNumber here in local scope. No global BigNumber.
-});
-```
-
-## Use
-
-The library exports a single constructor function, [`BigNumber`](http://mikemcl.github.io/bignumber.js/#bignumber), which accepts a value of type Number, String or BigNumber,
-
-```javascript
-let x = new BigNumber(123.4567);
-let y = BigNumber('123456.7e-3');
-let z = new BigNumber(x);
-x.isEqualTo(y) && y.isEqualTo(z) && x.isEqualTo(z); // true
-```
-
-To get the string value of a BigNumber use [`toString()`](http://mikemcl.github.io/bignumber.js/#toS) or [`toFixed()`](http://mikemcl.github.io/bignumber.js/#toFix). Using `toFixed()` prevents exponential notation being returned, no matter how large or small the value.
-
-```javascript
-let x = new BigNumber('1111222233334444555566');
-x.toString(); // "1.111222233334444555566e+21"
-x.toFixed(); // "1111222233334444555566"
-```
-
-If the limited precision of Number values is not well understood, it is recommended to create BigNumbers from String values rather than Number values to avoid a potential loss of precision.
-
-*In all further examples below, `let`, semicolons and `toString` calls are not shown. If a commented-out value is in quotes it means `toString` has been called on the preceding expression.*
-
-```javascript
-// Precision loss from using numeric literals with more than 15 significant digits.
-new BigNumber(1.0000000000000001) // '1'
-new BigNumber(88259496234518.57) // '88259496234518.56'
-new BigNumber(99999999999999999999) // '100000000000000000000'
-
-// Precision loss from using numeric literals outside the range of Number values.
-new BigNumber(2e+308) // 'Infinity'
-new BigNumber(1e-324) // '0'
-
-// Precision loss from the unexpected result of arithmetic with Number values.
-new BigNumber(0.7 + 0.1) // '0.7999999999999999'
-```
-
-When creating a BigNumber from a Number, note that a BigNumber is created from a Number's decimal `toString()` value not from its underlying binary value. If the latter is required, then pass the Number's `toString(2)` value and specify base 2.
-
-```javascript
-new BigNumber(Number.MAX_VALUE.toString(2), 2)
-```
-
-BigNumbers can be created from values in bases from 2 to 36. See [`ALPHABET`](http://mikemcl.github.io/bignumber.js/#alphabet) to extend this range.
-
-```javascript
-a = new BigNumber(1011, 2) // "11"
-b = new BigNumber('zz.9', 36) // "1295.25"
-c = a.plus(b) // "1306.25"
-```
-
-Performance is better if base 10 is NOT specified for decimal values. Only specify base 10 when it is desired that the number of decimal places of the input value be limited to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.
-
-A BigNumber is immutable in the sense that it is not changed by its methods.
-
-```javascript
-0.3 - 0.1 // 0.19999999999999998
-x = new BigNumber(0.3)
-x.minus(0.1) // "0.2"
-x // "0.3"
-```
-
-The methods that return a BigNumber can be chained.
-
-```javascript
-x.dividedBy(y).plus(z).times(9)
-x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.111772').integerValue()
-```
-
-Some of the longer method names have a shorter alias.
-
-```javascript
-x.squareRoot().dividedBy(y).exponentiatedBy(3).isEqualTo(x.sqrt().div(y).pow(3)) // true
-x.modulo(y).multipliedBy(z).eq(x.mod(y).times(z)) // true
-```
-
-As with JavaScript's Number type, there are [`toExponential`](http://mikemcl.github.io/bignumber.js/#toE), [`toFixed`](http://mikemcl.github.io/bignumber.js/#toFix) and [`toPrecision`](http://mikemcl.github.io/bignumber.js/#toP) methods.
-
-```javascript
-x = new BigNumber(255.5)
-x.toExponential(5) // "2.55500e+2"
-x.toFixed(5) // "255.50000"
-x.toPrecision(5) // "255.50"
-x.toNumber() // 255.5
-```
-
- A base can be specified for [`toString`](http://mikemcl.github.io/bignumber.js/#toS). Performance is better if base 10 is NOT specified, i.e. use `toString()` not `toString(10)`. Only specify base 10 when it is desired that the number of decimal places be limited to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.
-
- ```javascript
- x.toString(16) // "ff.8"
- ```
-
-There is a [`toFormat`](http://mikemcl.github.io/bignumber.js/#toFor) method which may be useful for internationalisation.
-
-```javascript
-y = new BigNumber('1234567.898765')
-y.toFormat(2) // "1,234,567.90"
-```
-
-The maximum number of decimal places of the result of an operation involving division (i.e. a division, square root, base conversion or negative power operation) is set using the `set` or `config` method of the `BigNumber` constructor.
-
-The other arithmetic operations always give the exact result.
-
-```javascript
-BigNumber.set({ DECIMAL_PLACES: 10, ROUNDING_MODE: 4 })
-
-x = new BigNumber(2)
-y = new BigNumber(3)
-z = x.dividedBy(y) // "0.6666666667"
-z.squareRoot() // "0.8164965809"
-z.exponentiatedBy(-3) // "3.3749999995"
-z.toString(2) // "0.1010101011"
-z.multipliedBy(z) // "0.44444444448888888889"
-z.multipliedBy(z).decimalPlaces(10) // "0.4444444445"
-```
-
-There is a [`toFraction`](http://mikemcl.github.io/bignumber.js/#toFr) method with an optional *maximum denominator* argument
-
-```javascript
-y = new BigNumber(355)
-pi = y.dividedBy(113) // "3.1415929204"
-pi.toFraction() // [ "7853982301", "2500000000" ]
-pi.toFraction(1000) // [ "355", "113" ]
-```
-
-and [`isNaN`](http://mikemcl.github.io/bignumber.js/#isNaN) and [`isFinite`](http://mikemcl.github.io/bignumber.js/#isF) methods, as `NaN` and `Infinity` are valid `BigNumber` values.
-
-```javascript
-x = new BigNumber(NaN) // "NaN"
-y = new BigNumber(Infinity) // "Infinity"
-x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite() // true
-```
-
-The value of a BigNumber is stored in a decimal floating point format in terms of a coefficient, exponent and sign.
-
-```javascript
-x = new BigNumber(-123.456);
-x.c // [ 123, 45600000000000 ] coefficient (i.e. significand)
-x.e // 2 exponent
-x.s // -1 sign
-```
-
-For advanced usage, multiple BigNumber constructors can be created, each with their own independent configuration.
-
-```javascript
-// Set DECIMAL_PLACES for the original BigNumber constructor
-BigNumber.set({ DECIMAL_PLACES: 10 })
-
-// Create another BigNumber constructor, optionally passing in a configuration object
-BN = BigNumber.clone({ DECIMAL_PLACES: 5 })
-
-x = new BigNumber(1)
-y = new BN(1)
-
-x.div(3) // '0.3333333333'
-y.div(3) // '0.33333'
-```
-
-For further information see the [API](http://mikemcl.github.io/bignumber.js/) reference in the *doc* directory.
-
-## Test
-
-The *test/modules* directory contains the test scripts for each method.
-
-The tests can be run with Node.js or a browser. For Node.js use
-
- $ npm test
-
-or
-
- $ node test/test
-
-To test a single method, use, for example
-
- $ node test/methods/toFraction
-
-For the browser, open *test/test.html*.
-
-## Build
-
-For Node, if [uglify-js](https://github.com/mishoo/UglifyJS2) is installed
-
- npm install uglify-js -g
-
-then
-
- npm run build
-
-will create *bignumber.min.js*.
-
-A source map will also be created in the root directory.
-
-## Feedback
-
-Open an issue, or email
-
-Michael
-
-M8ch88l@gmail.com
-
-## Licence
-
-The MIT Licence.
-
-See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE).
diff --git a/node_modules/bignumber.js/bignumber.d.ts b/node_modules/bignumber.js/bignumber.d.ts
deleted file mode 100644
index ac6a3e4..0000000
--- a/node_modules/bignumber.js/bignumber.d.ts
+++ /dev/null
@@ -1,1829 +0,0 @@
-// Type definitions for bignumber.js >=8.1.0
-// Project: https://github.com/MikeMcl/bignumber.js
-// Definitions by: Michael Mclaughlin
-// Definitions: https://github.com/MikeMcl/bignumber.js
-
-// Documentation: http://mikemcl.github.io/bignumber.js/
-//
-// Exports:
-//
-// class BigNumber (default export)
-// type BigNumber.Constructor
-// type BigNumber.ModuloMode
-// type BigNumber.RoundingMOde
-// type BigNumber.Value
-// interface BigNumber.Config
-// interface BigNumber.Format
-// interface BigNumber.Instance
-//
-// Example:
-//
-// import {BigNumber} from "bignumber.js"
-// //import BigNumber from "bignumber.js"
-//
-// let rm: BigNumber.RoundingMode = BigNumber.ROUND_UP;
-// let f: BigNumber.Format = { decimalSeparator: ',' };
-// let c: BigNumber.Config = { DECIMAL_PLACES: 4, ROUNDING_MODE: rm, FORMAT: f };
-// BigNumber.config(c);
-//
-// let v: BigNumber.Value = '12345.6789';
-// let b: BigNumber = new BigNumber(v);
-//
-// The use of compiler option `--strictNullChecks` is recommended.
-
-export default BigNumber;
-
-export namespace BigNumber {
-
- /** See `BigNumber.config` (alias `BigNumber.set`) and `BigNumber.clone`. */
- interface Config {
-
- /**
- * An integer, 0 to 1e+9. Default value: 20.
- *
- * The maximum number of decimal places of the result of operations involving division, i.e.
- * division, square root and base conversion operations, and exponentiation when the exponent is
- * negative.
- *
- * ```ts
- * BigNumber.config({ DECIMAL_PLACES: 5 })
- * BigNumber.set({ DECIMAL_PLACES: 5 })
- * ```
- */
- DECIMAL_PLACES?: number;
-
- /**
- * An integer, 0 to 8. Default value: `BigNumber.ROUND_HALF_UP` (4).
- *
- * The rounding mode used in operations that involve division (see `DECIMAL_PLACES`) and the
- * default rounding mode of the `decimalPlaces`, `precision`, `toExponential`, `toFixed`,
- * `toFormat` and `toPrecision` methods.
- *
- * The modes are available as enumerated properties of the BigNumber constructor.
- *
- * ```ts
- * BigNumber.config({ ROUNDING_MODE: 0 })
- * BigNumber.set({ ROUNDING_MODE: BigNumber.ROUND_UP })
- * ```
- */
- ROUNDING_MODE?: BigNumber.RoundingMode;
-
- /**
- * An integer, 0 to 1e+9, or an array, [-1e+9 to 0, 0 to 1e+9].
- * Default value: `[-7, 20]`.
- *
- * The exponent value(s) at which `toString` returns exponential notation.
- *
- * If a single number is assigned, the value is the exponent magnitude.
- *
- * If an array of two numbers is assigned then the first number is the negative exponent value at
- * and beneath which exponential notation is used, and the second number is the positive exponent
- * value at and above which exponential notation is used.
- *
- * For example, to emulate JavaScript numbers in terms of the exponent values at which they begin
- * to use exponential notation, use `[-7, 20]`.
- *
- * ```ts
- * BigNumber.config({ EXPONENTIAL_AT: 2 })
- * new BigNumber(12.3) // '12.3' e is only 1
- * new BigNumber(123) // '1.23e+2'
- * new BigNumber(0.123) // '0.123' e is only -1
- * new BigNumber(0.0123) // '1.23e-2'
- *
- * BigNumber.config({ EXPONENTIAL_AT: [-7, 20] })
- * new BigNumber(123456789) // '123456789' e is only 8
- * new BigNumber(0.000000123) // '1.23e-7'
- *
- * // Almost never return exponential notation:
- * BigNumber.config({ EXPONENTIAL_AT: 1e+9 })
- *
- * // Always return exponential notation:
- * BigNumber.config({ EXPONENTIAL_AT: 0 })
- * ```
- *
- * Regardless of the value of `EXPONENTIAL_AT`, the `toFixed` method will always return a value in
- * normal notation and the `toExponential` method will always return a value in exponential form.
- * Calling `toString` with a base argument, e.g. `toString(10)`, will also always return normal
- * notation.
- */
- EXPONENTIAL_AT?: number | [number, number];
-
- /**
- * An integer, magnitude 1 to 1e+9, or an array, [-1e+9 to -1, 1 to 1e+9].
- * Default value: `[-1e+9, 1e+9]`.
- *
- * The exponent value(s) beyond which overflow to Infinity and underflow to zero occurs.
- *
- * If a single number is assigned, it is the maximum exponent magnitude: values wth a positive
- * exponent of greater magnitude become Infinity and those with a negative exponent of greater
- * magnitude become zero.
- *
- * If an array of two numbers is assigned then the first number is the negative exponent limit and
- * the second number is the positive exponent limit.
- *
- * For example, to emulate JavaScript numbers in terms of the exponent values at which they
- * become zero and Infinity, use [-324, 308].
- *
- * ```ts
- * BigNumber.config({ RANGE: 500 })
- * BigNumber.config().RANGE // [ -500, 500 ]
- * new BigNumber('9.999e499') // '9.999e+499'
- * new BigNumber('1e500') // 'Infinity'
- * new BigNumber('1e-499') // '1e-499'
- * new BigNumber('1e-500') // '0'
- *
- * BigNumber.config({ RANGE: [-3, 4] })
- * new BigNumber(99999) // '99999' e is only 4
- * new BigNumber(100000) // 'Infinity' e is 5
- * new BigNumber(0.001) // '0.01' e is only -3
- * new BigNumber(0.0001) // '0' e is -4
- * ```
- * The largest possible magnitude of a finite BigNumber is 9.999...e+1000000000.
- * The smallest possible magnitude of a non-zero BigNumber is 1e-1000000000.
- */
- RANGE?: number | [number, number];
-
- /**
- * A boolean: `true` or `false`. Default value: `false`.
- *
- * The value that determines whether cryptographically-secure pseudo-random number generation is
- * used. If `CRYPTO` is set to true then the random method will generate random digits using
- * `crypto.getRandomValues` in browsers that support it, or `crypto.randomBytes` if using a
- * version of Node.js that supports it.
- *
- * If neither function is supported by the host environment then attempting to set `CRYPTO` to
- * `true` will fail and an exception will be thrown.
- *
- * If `CRYPTO` is `false` then the source of randomness used will be `Math.random` (which is
- * assumed to generate at least 30 bits of randomness).
- *
- * See `BigNumber.random`.
- *
- * ```ts
- * // Node.js
- * global.crypto = require('crypto')
- *
- * BigNumber.config({ CRYPTO: true })
- * BigNumber.config().CRYPTO // true
- * BigNumber.random() // 0.54340758610486147524
- * ```
- */
- CRYPTO?: boolean;
-
- /**
- * An integer, 0, 1, 3, 6 or 9. Default value: `BigNumber.ROUND_DOWN` (1).
- *
- * The modulo mode used when calculating the modulus: `a mod n`.
- * The quotient, `q = a / n`, is calculated according to the `ROUNDING_MODE` that corresponds to
- * the chosen `MODULO_MODE`.
- * The remainder, `r`, is calculated as: `r = a - n * q`.
- *
- * The modes that are most commonly used for the modulus/remainder operation are shown in the
- * following table. Although the other rounding modes can be used, they may not give useful
- * results.
- *
- * Property | Value | Description
- * :------------------|:------|:------------------------------------------------------------------
- * `ROUND_UP` | 0 | The remainder is positive if the dividend is negative.
- * `ROUND_DOWN` | 1 | The remainder has the same sign as the dividend.
- * | | Uses 'truncating division' and matches JavaScript's `%` operator .
- * `ROUND_FLOOR` | 3 | The remainder has the same sign as the divisor.
- * | | This matches Python's `%` operator.
- * `ROUND_HALF_EVEN` | 6 | The IEEE 754 remainder function.
- * `EUCLID` | 9 | The remainder is always positive.
- * | | Euclidian division: `q = sign(n) * floor(a / abs(n))`
- *
- * The rounding/modulo modes are available as enumerated properties of the BigNumber constructor.
- *
- * See `modulo`.
- *
- * ```ts
- * BigNumber.config({ MODULO_MODE: BigNumber.EUCLID })
- * BigNumber.set({ MODULO_MODE: 9 }) // equivalent
- * ```
- */
- MODULO_MODE?: BigNumber.ModuloMode;
-
- /**
- * An integer, 0 to 1e+9. Default value: 0.
- *
- * The maximum precision, i.e. number of significant digits, of the result of the power operation
- * - unless a modulus is specified.
- *
- * If set to 0, the number of significant digits will not be limited.
- *
- * See `exponentiatedBy`.
- *
- * ```ts
- * BigNumber.config({ POW_PRECISION: 100 })
- * ```
- */
- POW_PRECISION?: number;
-
- /**
- * An object including any number of the properties shown below.
- *
- * The object configures the format of the string returned by the `toFormat` method.
- * The example below shows the properties of the object that are recognised, and
- * their default values.
- *
- * Unlike the other configuration properties, the values of the properties of the `FORMAT` object
- * will not be checked for validity - the existing object will simply be replaced by the object
- * that is passed in.
- *
- * See `toFormat`.
- *
- * ```ts
- * BigNumber.config({
- * FORMAT: {
- * // string to prepend
- * prefix: '',
- * // the decimal separator
- * decimalSeparator: '.',
- * // the grouping separator of the integer part
- * groupSeparator: ',',
- * // the primary grouping size of the integer part
- * groupSize: 3,
- * // the secondary grouping size of the integer part
- * secondaryGroupSize: 0,
- * // the grouping separator of the fraction part
- * fractionGroupSeparator: ' ',
- * // the grouping size of the fraction part
- * fractionGroupSize: 0,
- * // string to append
- * suffix: ''
- * }
- * })
- * ```
- */
- FORMAT?: BigNumber.Format;
-
- /**
- * The alphabet used for base conversion. The length of the alphabet corresponds to the maximum
- * value of the base argument that can be passed to the BigNumber constructor or `toString`.
- *
- * Default value: `'0123456789abcdefghijklmnopqrstuvwxyz'`.
- *
- * There is no maximum length for the alphabet, but it must be at least 2 characters long,
- * and it must not contain whitespace or a repeated character, or the sign indicators '+' and
- * '-', or the decimal separator '.'.
- *
- * ```ts
- * // duodecimal (base 12)
- * BigNumber.config({ ALPHABET: '0123456789TE' })
- * x = new BigNumber('T', 12)
- * x.toString() // '10'
- * x.toString(12) // 'T'
- * ```
- */
- ALPHABET?: string;
- }
-
- /** See `FORMAT` and `toFormat`. */
- interface Format {
-
- /** The string to prepend. */
- prefix?: string;
-
- /** The decimal separator. */
- decimalSeparator?: string;
-
- /** The grouping separator of the integer part. */
- groupSeparator?: string;
-
- /** The primary grouping size of the integer part. */
- groupSize?: number;
-
- /** The secondary grouping size of the integer part. */
- secondaryGroupSize?: number;
-
- /** The grouping separator of the fraction part. */
- fractionGroupSeparator?: string;
-
- /** The grouping size of the fraction part. */
- fractionGroupSize?: number;
-
- /** The string to append. */
- suffix?: string;
- }
-
- interface Instance {
-
- /** The coefficient of the value of this BigNumber, an array of base 1e14 integer numbers, or null. */
- readonly c: number[] | null;
-
- /** The exponent of the value of this BigNumber, an integer number, -1000000000 to 1000000000, or null. */
- readonly e: number | null;
-
- /** The sign of the value of this BigNumber, -1, 1, or null. */
- readonly s: number | null;
-
- [key: string]: any;
- }
-
- type Constructor = typeof BigNumber;
- type ModuloMode = 0 | 1 | 3 | 6 | 9;
- type RoundingMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
- type Value = string | number | Instance;
-}
-
-export declare class BigNumber implements BigNumber.Instance {
-
- /** Used internally to identify a BigNumber instance. */
- private readonly _isBigNumber: true;
-
- /** The coefficient of the value of this BigNumber, an array of base 1e14 integer numbers, or null. */
- readonly c: number[] | null;
-
- /** The exponent of the value of this BigNumber, an integer number, -1000000000 to 1000000000, or null. */
- readonly e: number | null;
-
- /** The sign of the value of this BigNumber, -1, 1, or null. */
- readonly s: number | null;
-
- /**
- * Returns a new instance of a BigNumber object with value `n`, where `n` is a numeric value in
- * the specified `base`, or base 10 if `base` is omitted or is `null` or `undefined`.
- *
- * ```ts
- * x = new BigNumber(123.4567) // '123.4567'
- * // 'new' is optional
- * y = BigNumber(x) // '123.4567'
- * ```
- *
- * If `n` is a base 10 value it can be in normal (fixed-point) or exponential notation.
- * Values in other bases must be in normal notation. Values in any base can have fraction digits,
- * i.e. digits after the decimal point.
- *
- * ```ts
- * new BigNumber(43210) // '43210'
- * new BigNumber('4.321e+4') // '43210'
- * new BigNumber('-735.0918e-430') // '-7.350918e-428'
- * new BigNumber('123412421.234324', 5) // '607236.557696'
- * ```
- *
- * Signed `0`, signed `Infinity` and `NaN` are supported.
- *
- * ```ts
- * new BigNumber('-Infinity') // '-Infinity'
- * new BigNumber(NaN) // 'NaN'
- * new BigNumber(-0) // '0'
- * new BigNumber('.5') // '0.5'
- * new BigNumber('+2') // '2'
- * ```
- *
- * String values in hexadecimal literal form, e.g. `'0xff'`, are valid, as are string values with
- * the octal and binary prefixs `'0o'` and `'0b'`. String values in octal literal form without the
- * prefix will be interpreted as decimals, e.g. `'011'` is interpreted as 11, not 9.
- *
- * ```ts
- * new BigNumber(-10110100.1, 2) // '-180.5'
- * new BigNumber('-0b10110100.1') // '-180.5'
- * new BigNumber('ff.8', 16) // '255.5'
- * new BigNumber('0xff.8') // '255.5'
- * ```
- *
- * If a base is specified, `n` is rounded according to the current `DECIMAL_PLACES` and
- * `ROUNDING_MODE` settings. This includes base 10, so don't include a `base` parameter for decimal
- * values unless this behaviour is desired.
- *
- * ```ts
- * BigNumber.config({ DECIMAL_PLACES: 5 })
- * new BigNumber(1.23456789) // '1.23456789'
- * new BigNumber(1.23456789, 10) // '1.23457'
- * ```
- *
- * An error is thrown if `base` is invalid.
- *
- * There is no limit to the number of digits of a value of type string (other than that of
- * JavaScript's maximum array size). See `RANGE` to set the maximum and minimum possible exponent
- * value of a BigNumber.
- *
- * ```ts
- * new BigNumber('5032485723458348569331745.33434346346912144534543')
- * new BigNumber('4.321e10000000')
- * ```
- *
- * BigNumber `NaN` is returned if `n` is invalid (unless `BigNumber.DEBUG` is `true`, see below).
- *
- * ```ts
- * new BigNumber('.1*') // 'NaN'
- * new BigNumber('blurgh') // 'NaN'
- * new BigNumber(9, 2) // 'NaN'
- * ```
- *
- * To aid in debugging, if `BigNumber.DEBUG` is `true` then an error will be thrown on an
- * invalid `n`. An error will also be thrown if `n` is of type number with more than 15
- * significant digits, as calling `toString` or `valueOf` on these numbers may not result in the
- * intended value.
- *
- * ```ts
- * console.log(823456789123456.3) // 823456789123456.2
- * new BigNumber(823456789123456.3) // '823456789123456.2'
- * BigNumber.DEBUG = true
- * // 'Error: Number has more than 15 significant digits'
- * new BigNumber(823456789123456.3)
- * // 'Error: Not a base 2 number'
- * new BigNumber(9, 2)
- * ```
- *
- * A BigNumber can also be created from an object literal.
- * Use `isBigNumber` to check that it is well-formed.
- *
- * ```ts
- * new BigNumber({ s: 1, e: 2, c: [ 777, 12300000000000 ], _isBigNumber: true }) // '777.123'
- * ```
- *
- * @param n A numeric value.
- * @param base The base of `n`, integer, 2 to 36 (or `ALPHABET.length`, see `ALPHABET`).
- */
- constructor(n: BigNumber.Value, base?: number);
-
- /**
- * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this
- * BigNumber.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * x = new BigNumber(-0.8)
- * x.absoluteValue() // '0.8'
- * ```
- */
- absoluteValue(): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this
- * BigNumber.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * x = new BigNumber(-0.8)
- * x.abs() // '0.8'
- * ```
- */
- abs(): BigNumber;
-
- /**
- * Returns | |
- * :-------:|:--------------------------------------------------------------|
- * 1 | If the value of this BigNumber is greater than the value of `n`
- * -1 | If the value of this BigNumber is less than the value of `n`
- * 0 | If this BigNumber and `n` have the same value
- * `null` | If the value of either this BigNumber or `n` is `NaN`
- *
- * ```ts
- *
- * x = new BigNumber(Infinity)
- * y = new BigNumber(5)
- * x.comparedTo(y) // 1
- * x.comparedTo(x.minus(1)) // 0
- * y.comparedTo(NaN) // null
- * y.comparedTo('110', 2) // -1
- * ```
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- comparedTo(n: BigNumber.Value, base?: number): number;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode
- * `roundingMode` to a maximum of `decimalPlaces` decimal places.
- *
- * If `decimalPlaces` is omitted, or is `null` or `undefined`, the return value is the number of
- * decimal places of the value of this BigNumber, or `null` if the value of this BigNumber is
- * ±`Infinity` or `NaN`.
- *
- * If `roundingMode` is omitted, or is `null` or `undefined`, `ROUNDING_MODE` is used.
- *
- * Throws if `decimalPlaces` or `roundingMode` is invalid.
- *
- * ```ts
- * x = new BigNumber(1234.56)
- * x.decimalPlaces() // 2
- * x.decimalPlaces(1) // '1234.6'
- * x.decimalPlaces(2) // '1234.56'
- * x.decimalPlaces(10) // '1234.56'
- * x.decimalPlaces(0, 1) // '1234'
- * x.decimalPlaces(0, 6) // '1235'
- * x.decimalPlaces(1, 1) // '1234.5'
- * x.decimalPlaces(1, BigNumber.ROUND_HALF_EVEN) // '1234.6'
- * x // '1234.56'
- * y = new BigNumber('9.9e-101')
- * y.decimalPlaces() // 102
- * ```
- *
- * @param [decimalPlaces] Decimal places, integer, 0 to 1e+9.
- * @param [roundingMode] Rounding mode, integer, 0 to 8.
- */
- decimalPlaces(): number;
- decimalPlaces(decimalPlaces: number, roundingMode?: BigNumber.RoundingMode): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode
- * `roundingMode` to a maximum of `decimalPlaces` decimal places.
- *
- * If `decimalPlaces` is omitted, or is `null` or `undefined`, the return value is the number of
- * decimal places of the value of this BigNumber, or `null` if the value of this BigNumber is
- * ±`Infinity` or `NaN`.
- *
- * If `roundingMode` is omitted, or is `null` or `undefined`, `ROUNDING_MODE` is used.
- *
- * Throws if `decimalPlaces` or `roundingMode` is invalid.
- *
- * ```ts
- * x = new BigNumber(1234.56)
- * x.dp() // 2
- * x.dp(1) // '1234.6'
- * x.dp(2) // '1234.56'
- * x.dp(10) // '1234.56'
- * x.dp(0, 1) // '1234'
- * x.dp(0, 6) // '1235'
- * x.dp(1, 1) // '1234.5'
- * x.dp(1, BigNumber.ROUND_HALF_EVEN) // '1234.6'
- * x // '1234.56'
- * y = new BigNumber('9.9e-101')
- * y.dp() // 102
- * ```
- *
- * @param [decimalPlaces] Decimal places, integer, 0 to 1e+9.
- * @param [roundingMode] Rounding mode, integer, 0 to 8.
- */
- dp(): number;
- dp(decimalPlaces: number, roundingMode?: BigNumber.RoundingMode): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber divided by `n`, rounded
- * according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` settings.
- *
- * ```ts
- * x = new BigNumber(355)
- * y = new BigNumber(113)
- * x.dividedBy(y) // '3.14159292035398230088'
- * x.dividedBy(5) // '71'
- * x.dividedBy(47, 16) // '5'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- dividedBy(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber divided by `n`, rounded
- * according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` settings.
- *
- * ```ts
- * x = new BigNumber(355)
- * y = new BigNumber(113)
- * x.div(y) // '3.14159292035398230088'
- * x.div(5) // '71'
- * x.div(47, 16) // '5'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- div(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the integer part of dividing the value of this BigNumber by
- * `n`.
- *
- * ```ts
- * x = new BigNumber(5)
- * y = new BigNumber(3)
- * x.dividedToIntegerBy(y) // '1'
- * x.dividedToIntegerBy(0.7) // '7'
- * x.dividedToIntegerBy('0.f', 16) // '5'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- dividedToIntegerBy(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the integer part of dividing the value of this BigNumber by
- * `n`.
- *
- * ```ts
- * x = new BigNumber(5)
- * y = new BigNumber(3)
- * x.idiv(y) // '1'
- * x.idiv(0.7) // '7'
- * x.idiv('0.f', 16) // '5'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- idiv(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber exponentiated by `n`, i.e.
- * raised to the power `n`, and optionally modulo a modulus `m`.
- *
- * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and
- * `ROUNDING_MODE` settings.
- *
- * As the number of digits of the result of the power operation can grow so large so quickly,
- * e.g. 123.456**10000 has over 50000 digits, the number of significant digits calculated is
- * limited to the value of the `POW_PRECISION` setting (unless a modulus `m` is specified).
- *
- * By default `POW_PRECISION` is set to 0. This means that an unlimited number of significant
- * digits will be calculated, and that the method's performance will decrease dramatically for
- * larger exponents.
- *
- * If `m` is specified and the value of `m`, `n` and this BigNumber are integers and `n` is
- * positive, then a fast modular exponentiation algorithm is used, otherwise the operation will
- * be performed as `x.exponentiatedBy(n).modulo(m)` with a `POW_PRECISION` of 0.
- *
- * Throws if `n` is not an integer.
- *
- * ```ts
- * Math.pow(0.7, 2) // 0.48999999999999994
- * x = new BigNumber(0.7)
- * x.exponentiatedBy(2) // '0.49'
- * BigNumber(3).exponentiatedBy(-2) // '0.11111111111111111111'
- * ```
- *
- * @param n The exponent, an integer.
- * @param [m] The modulus.
- */
- exponentiatedBy(n: BigNumber.Value, m?: BigNumber.Value): BigNumber;
- exponentiatedBy(n: number, m?: BigNumber.Value): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber exponentiated by `n`, i.e.
- * raised to the power `n`, and optionally modulo a modulus `m`.
- *
- * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and
- * `ROUNDING_MODE` settings.
- *
- * As the number of digits of the result of the power operation can grow so large so quickly,
- * e.g. 123.456**10000 has over 50000 digits, the number of significant digits calculated is
- * limited to the value of the `POW_PRECISION` setting (unless a modulus `m` is specified).
- *
- * By default `POW_PRECISION` is set to 0. This means that an unlimited number of significant
- * digits will be calculated, and that the method's performance will decrease dramatically for
- * larger exponents.
- *
- * If `m` is specified and the value of `m`, `n` and this BigNumber are integers and `n` is
- * positive, then a fast modular exponentiation algorithm is used, otherwise the operation will
- * be performed as `x.pow(n).modulo(m)` with a `POW_PRECISION` of 0.
- *
- * Throws if `n` is not an integer.
- *
- * ```ts
- * Math.pow(0.7, 2) // 0.48999999999999994
- * x = new BigNumber(0.7)
- * x.pow(2) // '0.49'
- * BigNumber(3).pow(-2) // '0.11111111111111111111'
- * ```
- *
- * @param n The exponent, an integer.
- * @param [m] The modulus.
- */
- pow(n: BigNumber.Value, m?: BigNumber.Value): BigNumber;
- pow(n: number, m?: BigNumber.Value): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber rounded to an integer using
- * rounding mode `rm`.
- *
- * If `rm` is omitted, or is `null` or `undefined`, `ROUNDING_MODE` is used.
- *
- * Throws if `rm` is invalid.
- *
- * ```ts
- * x = new BigNumber(123.456)
- * x.integerValue() // '123'
- * x.integerValue(BigNumber.ROUND_CEIL) // '124'
- * y = new BigNumber(-12.7)
- * y.integerValue() // '-13'
- * x.integerValue(BigNumber.ROUND_DOWN) // '-12'
- * ```
- *
- * @param {BigNumber.RoundingMode} [rm] The roundng mode, an integer, 0 to 8.
- */
- integerValue(rm?: BigNumber.RoundingMode): BigNumber;
-
- /**
- * Returns `true` if the value of this BigNumber is equal to the value of `n`, otherwise returns
- * `false`.
- *
- * As with JavaScript, `NaN` does not equal `NaN`.
- *
- * ```ts
- * 0 === 1e-324 // true
- * x = new BigNumber(0)
- * x.isEqualTo('1e-324') // false
- * BigNumber(-0).isEqualTo(x) // true ( -0 === 0 )
- * BigNumber(255).isEqualTo('ff', 16) // true
- *
- * y = new BigNumber(NaN)
- * y.isEqualTo(NaN) // false
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- isEqualTo(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is equal to the value of `n`, otherwise returns
- * `false`.
- *
- * As with JavaScript, `NaN` does not equal `NaN`.
- *
- * ```ts
- * 0 === 1e-324 // true
- * x = new BigNumber(0)
- * x.eq('1e-324') // false
- * BigNumber(-0).eq(x) // true ( -0 === 0 )
- * BigNumber(255).eq('ff', 16) // true
- *
- * y = new BigNumber(NaN)
- * y.eq(NaN) // false
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- eq(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is a finite number, otherwise returns `false`.
- *
- * The only possible non-finite values of a BigNumber are `NaN`, `Infinity` and `-Infinity`.
- *
- * ```ts
- * x = new BigNumber(1)
- * x.isFinite() // true
- * y = new BigNumber(Infinity)
- * y.isFinite() // false
- * ```
- */
- isFinite(): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is greater than the value of `n`, otherwise
- * returns `false`.
- *
- * ```ts
- * 0.1 > (0.3 - 0.2) // true
- * x = new BigNumber(0.1)
- * x.isGreaterThan(BigNumber(0.3).minus(0.2)) // false
- * BigNumber(0).isGreaterThan(x) // false
- * BigNumber(11, 3).isGreaterThan(11.1, 2) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- isGreaterThan(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is greater than the value of `n`, otherwise
- * returns `false`.
- *
- * ```ts
- * 0.1 > (0.3 - 0 // true
- * x = new BigNumber(0.1)
- * x.gt(BigNumber(0.3).minus(0.2)) // false
- * BigNumber(0).gt(x) // false
- * BigNumber(11, 3).gt(11.1, 2) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- gt(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is greater than or equal to the value of `n`,
- * otherwise returns `false`.
- *
- * ```ts
- * (0.3 - 0.2) >= 0.1 // false
- * x = new BigNumber(0.3).minus(0.2)
- * x.isGreaterThanOrEqualTo(0.1) // true
- * BigNumber(1).isGreaterThanOrEqualTo(x) // true
- * BigNumber(10, 18).isGreaterThanOrEqualTo('i', 36) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- isGreaterThanOrEqualTo(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is greater than or equal to the value of `n`,
- * otherwise returns `false`.
- *
- * ```ts
- * (0.3 - 0.2) >= 0.1 // false
- * x = new BigNumber(0.3).minus(0.2)
- * x.gte(0.1) // true
- * BigNumber(1).gte(x) // true
- * BigNumber(10, 18).gte('i', 36) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- gte(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is an integer, otherwise returns `false`.
- *
- * ```ts
- * x = new BigNumber(1)
- * x.isInteger() // true
- * y = new BigNumber(123.456)
- * y.isInteger() // false
- * ```
- */
- isInteger(): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is less than the value of `n`, otherwise returns
- * `false`.
- *
- * ```ts
- * (0.3 - 0.2) < 0.1 // true
- * x = new BigNumber(0.3).minus(0.2)
- * x.isLessThan(0.1) // false
- * BigNumber(0).isLessThan(x) // true
- * BigNumber(11.1, 2).isLessThan(11, 3) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- isLessThan(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is less than the value of `n`, otherwise returns
- * `false`.
- *
- * ```ts
- * (0.3 - 0.2) < 0.1 // true
- * x = new BigNumber(0.3).minus(0.2)
- * x.lt(0.1) // false
- * BigNumber(0).lt(x) // true
- * BigNumber(11.1, 2).lt(11, 3) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- lt(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`,
- * otherwise returns `false`.
- *
- * ```ts
- * 0.1 <= (0.3 - 0.2) // false
- * x = new BigNumber(0.1)
- * x.isLessThanOrEqualTo(BigNumber(0.3).minus(0.2)) // true
- * BigNumber(-1).isLessThanOrEqualTo(x) // true
- * BigNumber(10, 18).isLessThanOrEqualTo('i', 36) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- isLessThanOrEqualTo(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`,
- * otherwise returns `false`.
- *
- * ```ts
- * 0.1 <= (0.3 - 0.2) // false
- * x = new BigNumber(0.1)
- * x.lte(BigNumber(0.3).minus(0.2)) // true
- * BigNumber(-1).lte(x) // true
- * BigNumber(10, 18).lte('i', 36) // true
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- lte(n: BigNumber.Value, base?: number): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is `NaN`, otherwise returns `false`.
- *
- * ```ts
- * x = new BigNumber(NaN)
- * x.isNaN() // true
- * y = new BigNumber('Infinity')
- * y.isNaN() // false
- * ```
- */
- isNaN(): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is negative, otherwise returns `false`.
- *
- * ```ts
- * x = new BigNumber(-0)
- * x.isNegative() // true
- * y = new BigNumber(2)
- * y.isNegative() // false
- * ```
- */
- isNegative(): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is positive, otherwise returns `false`.
- *
- * ```ts
- * x = new BigNumber(-0)
- * x.isPositive() // false
- * y = new BigNumber(2)
- * y.isPositive() // true
- * ```
- */
- isPositive(): boolean;
-
- /**
- * Returns `true` if the value of this BigNumber is zero or minus zero, otherwise returns `false`.
- *
- * ```ts
- * x = new BigNumber(-0)
- * x.isZero() // true
- * ```
- */
- isZero(): boolean;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber minus `n`.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * 0.3 - 0.1 // 0.19999999999999998
- * x = new BigNumber(0.3)
- * x.minus(0.1) // '0.2'
- * x.minus(0.6, 20) // '0'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- minus(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer
- * remainder of dividing this BigNumber by `n`.
- *
- * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE`
- * setting of this BigNumber constructor. If it is 1 (default value), the result will have the
- * same sign as this BigNumber, and it will match that of Javascript's `%` operator (within the
- * limits of double precision) and BigDecimal's `remainder` method.
- *
- * The return value is always exact and unrounded.
- *
- * See `MODULO_MODE` for a description of the other modulo modes.
- *
- * ```ts
- * 1 % 0.9 // 0.09999999999999998
- * x = new BigNumber(1)
- * x.modulo(0.9) // '0.1'
- * y = new BigNumber(33)
- * y.modulo('a', 33) // '3'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- modulo(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer
- * remainder of dividing this BigNumber by `n`.
- *
- * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE`
- * setting of this BigNumber constructor. If it is 1 (default value), the result will have the
- * same sign as this BigNumber, and it will match that of Javascript's `%` operator (within the
- * limits of double precision) and BigDecimal's `remainder` method.
- *
- * The return value is always exact and unrounded.
- *
- * See `MODULO_MODE` for a description of the other modulo modes.
- *
- * ```ts
- * 1 % 0.9 // 0.09999999999999998
- * x = new BigNumber(1)
- * x.mod(0.9) // '0.1'
- * y = new BigNumber(33)
- * y.mod('a', 33) // '3'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- mod(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber multiplied by `n`.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * 0.6 * 3 // 1.7999999999999998
- * x = new BigNumber(0.6)
- * y = x.multipliedBy(3) // '1.8'
- * BigNumber('7e+500').multipliedBy(y) // '1.26e+501'
- * x.multipliedBy('-a', 16) // '-6'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- multipliedBy(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber multiplied by `n`.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * 0.6 * 3 // 1.7999999999999998
- * x = new BigNumber(0.6)
- * y = x.times(3) // '1.8'
- * BigNumber('7e+500').times(y) // '1.26e+501'
- * x.times('-a', 16) // '-6'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- times(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by -1.
- *
- * ```ts
- * x = new BigNumber(1.8)
- * x.negated() // '-1.8'
- * y = new BigNumber(-1.3)
- * y.negated() // '1.3'
- * ```
- */
- negated(): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber plus `n`.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * 0.1 + 0.2 // 0.30000000000000004
- * x = new BigNumber(0.1)
- * y = x.plus(0.2) // '0.3'
- * BigNumber(0.7).plus(x).plus(y) // '1'
- * x.plus('0.1', 8) // '0.225'
- * ```
- *
- * @param n A numeric value.
- * @param [base] The base of n.
- */
- plus(n: BigNumber.Value, base?: number): BigNumber;
-
- /**
- * Returns the number of significant digits of the value of this BigNumber, or `null` if the value
- * of this BigNumber is ±`Infinity` or `NaN`.
- *
- * If `includeZeros` is true then any trailing zeros of the integer part of the value of this
- * BigNumber are counted as significant digits, otherwise they are not.
- *
- * Throws if `includeZeros` is invalid.
- *
- * ```ts
- * x = new BigNumber(9876.54321)
- * x.precision() // 9
- * y = new BigNumber(987000)
- * y.precision(false) // 3
- * y.precision(true) // 6
- * ```
- *
- * @param [includeZeros] Whether to include integer trailing zeros in the significant digit count.
- */
- precision(includeZeros?: boolean): number;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber rounded to a precision of
- * `significantDigits` significant digits using rounding mode `roundingMode`.
- *
- * If `roundingMode` is omitted or is `null` or `undefined`, `ROUNDING_MODE` will be used.
- *
- * Throws if `significantDigits` or `roundingMode` is invalid.
- *
- * ```ts
- * x = new BigNumber(9876.54321)
- * x.precision(6) // '9876.54'
- * x.precision(6, BigNumber.ROUND_UP) // '9876.55'
- * x.precision(2) // '9900'
- * x.precision(2, 1) // '9800'
- * x // '9876.54321'
- * ```
- *
- * @param significantDigits Significant digits, integer, 1 to 1e+9.
- * @param [roundingMode] Rounding mode, integer, 0 to 8.
- */
- precision(significantDigits: number, roundingMode?: BigNumber.RoundingMode): BigNumber;
-
- /**
- * Returns the number of significant digits of the value of this BigNumber,
- * or `null` if the value of this BigNumber is ±`Infinity` or `NaN`.
- *
- * If `includeZeros` is true then any trailing zeros of the integer part of
- * the value of this BigNumber are counted as significant digits, otherwise
- * they are not.
- *
- * Throws if `includeZeros` is invalid.
- *
- * ```ts
- * x = new BigNumber(9876.54321)
- * x.sd() // 9
- * y = new BigNumber(987000)
- * y.sd(false) // 3
- * y.sd(true) // 6
- * ```
- *
- * @param [includeZeros] Whether to include integer trailing zeros in the significant digit count.
- */
- sd(includeZeros?: boolean): number;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber rounded to a precision of
- * `significantDigits` significant digits using rounding mode `roundingMode`.
- *
- * If `roundingMode` is omitted or is `null` or `undefined`, `ROUNDING_MODE` will be used.
- *
- * Throws if `significantDigits` or `roundingMode` is invalid.
- *
- * ```ts
- * x = new BigNumber(9876.54321)
- * x.sd(6) // '9876.54'
- * x.sd(6, BigNumber.ROUND_UP) // '9876.55'
- * x.sd(2) // '9900'
- * x.sd(2, 1) // '9800'
- * x // '9876.54321'
- * ```
- *
- * @param significantDigits Significant digits, integer, 1 to 1e+9.
- * @param [roundingMode] Rounding mode, integer, 0 to 8.
- */
- sd(significantDigits: number, roundingMode?: BigNumber.RoundingMode): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the value of this BigNumber shifted by `n` places.
- *
- * The shift is of the decimal point, i.e. of powers of ten, and is to the left if `n` is negative
- * or to the right if `n` is positive.
- *
- * The return value is always exact and unrounded.
- *
- * Throws if `n` is invalid.
- *
- * ```ts
- * x = new BigNumber(1.23)
- * x.shiftedBy(3) // '1230'
- * x.shiftedBy(-3) // '0.00123'
- * ```
- *
- * @param n The shift value, integer, -9007199254740991 to 9007199254740991.
- */
- shiftedBy(n: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded
- * according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` settings.
- *
- * The return value will be correctly rounded, i.e. rounded as if the result was first calculated
- * to an infinite number of correct digits before rounding.
- *
- * ```ts
- * x = new BigNumber(16)
- * x.squareRoot() // '4'
- * y = new BigNumber(3)
- * y.squareRoot() // '1.73205080756887729353'
- * ```
- */
- squareRoot(): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded
- * according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` settings.
- *
- * The return value will be correctly rounded, i.e. rounded as if the result was first calculated
- * to an infinite number of correct digits before rounding.
- *
- * ```ts
- * x = new BigNumber(16)
- * x.sqrt() // '4'
- * y = new BigNumber(3)
- * y.sqrt() // '1.73205080756887729353'
- * ```
- */
- sqrt(): BigNumber;
-
- /**
- * Returns a string representing the value of this BigNumber in exponential notation rounded using
- * rounding mode `roundingMode` to `decimalPlaces` decimal places, i.e with one digit before the
- * decimal point and `decimalPlaces` digits after it.
- *
- * If the value of this BigNumber in exponential notation has fewer than `decimalPlaces` fraction
- * digits, the return value will be appended with zeros accordingly.
- *
- * If `decimalPlaces` is omitted, or is `null` or `undefined`, the number of digits after the
- * decimal point defaults to the minimum number of digits necessary to represent the value
- * exactly.
- *
- * If `roundingMode` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
- *
- * Throws if `decimalPlaces` or `roundingMode` is invalid.
- *
- * ```ts
- * x = 45.6
- * y = new BigNumber(x)
- * x.toExponential() // '4.56e+1'
- * y.toExponential() // '4.56e+1'
- * x.toExponential(0) // '5e+1'
- * y.toExponential(0) // '5e+1'
- * x.toExponential(1) // '4.6e+1'
- * y.toExponential(1) // '4.6e+1'
- * y.toExponential(1, 1) // '4.5e+1' (ROUND_DOWN)
- * x.toExponential(3) // '4.560e+1'
- * y.toExponential(3) // '4.560e+1'
- * ```
- *
- * @param [decimalPlaces] Decimal places, integer, 0 to 1e+9.
- * @param [roundingMode] Rounding mode, integer, 0 to 8.
- */
- toExponential(decimalPlaces: number, roundingMode?: BigNumber.RoundingMode): string;
- toExponential(): string;
-
- /**
- * Returns a string representing the value of this BigNumber in normal (fixed-point) notation
- * rounded to `decimalPlaces` decimal places using rounding mode `roundingMode`.
- *
- * If the value of this BigNumber in normal notation has fewer than `decimalPlaces` fraction
- * digits, the return value will be appended with zeros accordingly.
- *
- * Unlike `Number.prototype.toFixed`, which returns exponential notation if a number is greater or
- * equal to 10**21, this method will always return normal notation.
- *
- * If `decimalPlaces` is omitted or is `null` or `undefined`, the return value will be unrounded
- * and in normal notation. This is also unlike `Number.prototype.toFixed`, which returns the value
- * to zero decimal places. It is useful when normal notation is required and the current
- * `EXPONENTIAL_AT` setting causes `toString` to return exponential notation.
- *
- * If `roundingMode` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
- *
- * Throws if `decimalPlaces` or `roundingMode` is invalid.
- *
- * ```ts
- * x = 3.456
- * y = new BigNumber(x)
- * x.toFixed() // '3'
- * y.toFixed() // '3.456'
- * y.toFixed(0) // '3'
- * x.toFixed(2) // '3.46'
- * y.toFixed(2) // '3.46'
- * y.toFixed(2, 1) // '3.45' (ROUND_DOWN)
- * x.toFixed(5) // '3.45600'
- * y.toFixed(5) // '3.45600'
- * ```
- *
- * @param [decimalPlaces] Decimal places, integer, 0 to 1e+9.
- * @param [roundingMode] Rounding mode, integer, 0 to 8.
- */
- toFixed(decimalPlaces: number, roundingMode?: BigNumber.RoundingMode): string;
- toFixed(): string;
-
- /**
- * Returns a string representing the value of this BigNumber in normal (fixed-point) notation
- * rounded to `decimalPlaces` decimal places using rounding mode `roundingMode`, and formatted
- * according to the properties of the `format` or `FORMAT` object.
- *
- * The formatting object may contain some or all of the properties shown in the examples below.
- *
- * If `decimalPlaces` is omitted or is `null` or `undefined`, then the return value is not
- * rounded to a fixed number of decimal places.
- *
- * If `roundingMode` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
- *
- * If `format` is omitted or is `null` or `undefined`, `FORMAT` is used.
- *
- * Throws if `decimalPlaces`, `roundingMode`, or `format` is invalid.
- *
- * ```ts
- * fmt = {
- * decimalSeparator: '.',
- * groupSeparator: ',',
- * groupSize: 3,
- * secondaryGroupSize: 0,
- * fractionGroupSeparator: ' ',
- * fractionGroupSize: 0
- * }
- *
- * x = new BigNumber('123456789.123456789')
- *
- * // Set the global formatting options
- * BigNumber.config({ FORMAT: fmt })
- *
- * x.toFormat() // '123,456,789.123456789'
- * x.toFormat(3) // '123,456,789.123'
- *
- * // If a reference to the object assigned to FORMAT has been retained,
- * // the format properties can be changed directly
- * fmt.groupSeparator = ' '
- * fmt.fractionGroupSize = 5
- * x.toFormat() // '123 456 789.12345 6789'
- *
- * // Alternatively, pass the formatting options as an argument
- * fmt = {
- * decimalSeparator: ',',
- * groupSeparator: '.',
- * groupSize: 3,
- * secondaryGroupSize: 2
- * }
- *
- * x.toFormat() // '123 456 789.12345 6789'
- * x.toFormat(fmt) // '12.34.56.789,123456789'
- * x.toFormat(2, fmt) // '12.34.56.789,12'
- * x.toFormat(3, BigNumber.ROUND_UP, fmt) // '12.34.56.789,124'
- * ```
- *
- * @param [decimalPlaces] Decimal places, integer, 0 to 1e+9.
- * @param [roundingMode] Rounding mode, integer, 0 to 8.
- * @param [format] Formatting options object. See `BigNumber.Format`.
- */
- toFormat(decimalPlaces: number, roundingMode: BigNumber.RoundingMode, format?: BigNumber.Format): string;
- toFormat(decimalPlaces: number, roundingMode?: BigNumber.RoundingMode): string;
- toFormat(decimalPlaces?: number): string;
- toFormat(decimalPlaces: number, format: BigNumber.Format): string;
- toFormat(format: BigNumber.Format): string;
-
- /**
- * Returns an array of two BigNumbers representing the value of this BigNumber as a simple
- * fraction with an integer numerator and an integer denominator.
- * The denominator will be a positive non-zero value less than or equal to `max_denominator`.
- * If a maximum denominator, `max_denominator`, is not specified, or is `null` or `undefined`, the
- * denominator will be the lowest value necessary to represent the number exactly.
- *
- * Throws if `max_denominator` is invalid.
- *
- * ```ts
- * x = new BigNumber(1.75)
- * x.toFraction() // '7, 4'
- *
- * pi = new BigNumber('3.14159265358')
- * pi.toFraction() // '157079632679,50000000000'
- * pi.toFraction(100000) // '312689, 99532'
- * pi.toFraction(10000) // '355, 113'
- * pi.toFraction(100) // '311, 99'
- * pi.toFraction(10) // '22, 7'
- * pi.toFraction(1) // '3, 1'
- * ```
- *
- * @param [max_denominator] The maximum denominator, integer > 0, or Infinity.
- */
- toFraction(max_denominator?: BigNumber.Value): [BigNumber, BigNumber];
-
- /** As `valueOf`. */
- toJSON(): string;
-
- /**
- * Returns the value of this BigNumber as a JavaScript primitive number.
- *
- * Using the unary plus operator gives the same result.
- *
- * ```ts
- * x = new BigNumber(456.789)
- * x.toNumber() // 456.789
- * +x // 456.789
- *
- * y = new BigNumber('45987349857634085409857349856430985')
- * y.toNumber() // 4.598734985763409e+34
- *
- * z = new BigNumber(-0)
- * 1 / z.toNumber() // -Infinity
- * 1 / +z // -Infinity
- * ```
- */
- toNumber(): number;
-
- /**
- * Returns a string representing the value of this BigNumber rounded to `significantDigits`
- * significant digits using rounding mode `roundingMode`.
- *
- * If `significantDigits` is less than the number of digits necessary to represent the integer
- * part of the value in normal (fixed-point) notation, then exponential notation is used.
- *
- * If `significantDigits` is omitted, or is `null` or `undefined`, then the return value is the
- * same as `n.toString()`.
- *
- * If `roundingMode` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used.
- *
- * Throws if `significantDigits` or `roundingMode` is invalid.
- *
- * ```ts
- * x = 45.6
- * y = new BigNumber(x)
- * x.toPrecision() // '45.6'
- * y.toPrecision() // '45.6'
- * x.toPrecision(1) // '5e+1'
- * y.toPrecision(1) // '5e+1'
- * y.toPrecision(2, 0) // '4.6e+1' (ROUND_UP)
- * y.toPrecision(2, 1) // '4.5e+1' (ROUND_DOWN)
- * x.toPrecision(5) // '45.600'
- * y.toPrecision(5) // '45.600'
- * ```
- *
- * @param [significantDigits] Significant digits, integer, 1 to 1e+9.
- * @param [roundingMode] Rounding mode, integer 0 to 8.
- */
- toPrecision(significantDigits: number, roundingMode?: BigNumber.RoundingMode): string;
- toPrecision(): string;
-
- /**
- * Returns a string representing the value of this BigNumber in base `base`, or base 10 if `base`
- * is omitted or is `null` or `undefined`.
- *
- * For bases above 10, and using the default base conversion alphabet (see `ALPHABET`), values
- * from 10 to 35 are represented by a-z (the same as `Number.prototype.toString`).
- *
- * If a base is specified the value is rounded according to the current `DECIMAL_PLACES` and
- * `ROUNDING_MODE` settings, otherwise it is not.
- *
- * If a base is not specified, and this BigNumber has a positive exponent that is equal to or
- * greater than the positive component of the current `EXPONENTIAL_AT` setting, or a negative
- * exponent equal to or less than the negative component of the setting, then exponential notation
- * is returned.
- *
- * If `base` is `null` or `undefined` it is ignored.
- *
- * Throws if `base` is invalid.
- *
- * ```ts
- * x = new BigNumber(750000)
- * x.toString() // '750000'
- * BigNumber.config({ EXPONENTIAL_AT: 5 })
- * x.toString() // '7.5e+5'
- *
- * y = new BigNumber(362.875)
- * y.toString(2) // '101101010.111'
- * y.toString(9) // '442.77777777777777777778'
- * y.toString(32) // 'ba.s'
- *
- * BigNumber.config({ DECIMAL_PLACES: 4 });
- * z = new BigNumber('1.23456789')
- * z.toString() // '1.23456789'
- * z.toString(10) // '1.2346'
- * ```
- *
- * @param [base] The base, integer, 2 to 36 (or `ALPHABET.length`, see `ALPHABET`).
- */
- toString(base?: number): string;
-
- /**
- * As `toString`, but does not accept a base argument and includes the minus sign for negative
- * zero.
- *
- * ``ts
- * x = new BigNumber('-0')
- * x.toString() // '0'
- * x.valueOf() // '-0'
- * y = new BigNumber('1.777e+457')
- * y.valueOf() // '1.777e+457'
- * ```
- */
- valueOf(): string;
-
- /** Helps ES6 import. */
- private static readonly default?: BigNumber.Constructor;
-
- /** Helps ES6 import. */
- private static readonly BigNumber?: BigNumber.Constructor;
-
- /** Rounds away from zero. */
- static readonly ROUND_UP: 0;
-
- /** Rounds towards zero. */
- static readonly ROUND_DOWN: 1;
-
- /** Rounds towards Infinity. */
- static readonly ROUND_CEIL: 2;
-
- /** Rounds towards -Infinity. */
- static readonly ROUND_FLOOR: 3;
-
- /** Rounds towards nearest neighbour. If equidistant, rounds away from zero . */
- static readonly ROUND_HALF_UP: 4;
-
- /** Rounds towards nearest neighbour. If equidistant, rounds towards zero. */
- static readonly ROUND_HALF_DOWN: 5;
-
- /** Rounds towards nearest neighbour. If equidistant, rounds towards even neighbour. */
- static readonly ROUND_HALF_EVEN: 6;
-
- /** Rounds towards nearest neighbour. If equidistant, rounds towards Infinity. */
- static readonly ROUND_HALF_CEIL: 7;
-
- /** Rounds towards nearest neighbour. If equidistant, rounds towards -Infinity. */
- static readonly ROUND_HALF_FLOOR: 8;
-
- /** See `MODULO_MODE`. */
- static readonly EUCLID: 9;
-
- /**
- * To aid in debugging, if a `BigNumber.DEBUG` property is `true` then an error will be thrown
- * if the BigNumber constructor receives an invalid `BigNumber.Value`, or if `BigNumber.isBigNumber`
- * receives a BigNumber instance that is malformed.
- *
- * ```ts
- * // No error, and BigNumber NaN is returned.
- * new BigNumber('blurgh') // 'NaN'
- * new BigNumber(9, 2) // 'NaN'
- * BigNumber.DEBUG = true
- * new BigNumber('blurgh') // '[BigNumber Error] Not a number'
- * new BigNumber(9, 2) // '[BigNumber Error] Not a base 2 number'
- * ```
- *
- * An error will also be thrown if a `BigNumber.Value` is of type number with more than 15
- * significant digits, as calling `toString` or `valueOf` on such numbers may not result
- * in the intended value.
- *
- * ```ts
- * console.log(823456789123456.3) // 823456789123456.2
- * // No error, and the returned BigNumber does not have the same value as the number literal.
- * new BigNumber(823456789123456.3) // '823456789123456.2'
- * BigNumber.DEBUG = true
- * new BigNumber(823456789123456.3)
- * // '[BigNumber Error] Number primitive has more than 15 significant digits'
- * ```
- *
- * Check that a BigNumber instance is well-formed:
- *
- * ```ts
- * x = new BigNumber(10)
- *
- * BigNumber.DEBUG = false
- * // Change x.c to an illegitimate value.
- * x.c = NaN
- * // No error, as BigNumber.DEBUG is false.
- * BigNumber.isBigNumber(x) // true
- *
- * BigNumber.DEBUG = true
- * BigNumber.isBigNumber(x) // '[BigNumber Error] Invalid BigNumber'
- * ```
- */
- static DEBUG?: boolean;
-
- /**
- * Returns a new independent BigNumber constructor with configuration as described by `object`, or
- * with the default configuration if object is `null` or `undefined`.
- *
- * Throws if `object` is not an object.
- *
- * ```ts
- * BigNumber.config({ DECIMAL_PLACES: 5 })
- * BN = BigNumber.clone({ DECIMAL_PLACES: 9 })
- *
- * x = new BigNumber(1)
- * y = new BN(1)
- *
- * x.div(3) // 0.33333
- * y.div(3) // 0.333333333
- *
- * // BN = BigNumber.clone({ DECIMAL_PLACES: 9 }) is equivalent to:
- * BN = BigNumber.clone()
- * BN.config({ DECIMAL_PLACES: 9 })
- * ```
- *
- * @param [object] The configuration object.
- */
- static clone(object?: BigNumber.Config): BigNumber.Constructor;
-
- /**
- * Configures the settings that apply to this BigNumber constructor.
- *
- * The configuration object, `object`, contains any number of the properties shown in the example
- * below.
- *
- * Returns an object with the above properties and their current values.
- *
- * Throws if `object` is not an object, or if an invalid value is assigned to one or more of the
- * properties.
- *
- * ```ts
- * BigNumber.config({
- * DECIMAL_PLACES: 40,
- * ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL,
- * EXPONENTIAL_AT: [-10, 20],
- * RANGE: [-500, 500],
- * CRYPTO: true,
- * MODULO_MODE: BigNumber.ROUND_FLOOR,
- * POW_PRECISION: 80,
- * FORMAT: {
- * groupSize: 3,
- * groupSeparator: ' ',
- * decimalSeparator: ','
- * },
- * ALPHABET: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
- * });
- *
- * BigNumber.config().DECIMAL_PLACES // 40
- * ```
- *
- * @param object The configuration object.
- */
- static config(object: BigNumber.Config): BigNumber.Config;
-
- /**
- * Returns `true` if `value` is a BigNumber instance, otherwise returns `false`.
- *
- * If `BigNumber.DEBUG` is `true`, throws if a BigNumber instance is not well-formed.
- *
- * ```ts
- * x = 42
- * y = new BigNumber(x)
- *
- * BigNumber.isBigNumber(x) // false
- * y instanceof BigNumber // true
- * BigNumber.isBigNumber(y) // true
- *
- * BN = BigNumber.clone();
- * z = new BN(x)
- * z instanceof BigNumber // false
- * BigNumber.isBigNumber(z) // true
- * ```
- *
- * @param value The value to test.
- */
- static isBigNumber(value: any): value is BigNumber;
-
- /**
- * Returns a BigNumber whose value is the maximum of the arguments.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * x = new BigNumber('3257869345.0378653')
- * BigNumber.maximum(4e9, x, '123456789.9') // '4000000000'
- *
- * arr = [12, '13', new BigNumber(14)]
- * BigNumber.maximum.apply(null, arr) // '14'
- * ```
- *
- * @param n A numeric value.
- */
- static maximum(...n: BigNumber.Value[]): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the maximum of the arguments.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * x = new BigNumber('3257869345.0378653')
- * BigNumber.max(4e9, x, '123456789.9') // '4000000000'
- *
- * arr = [12, '13', new BigNumber(14)]
- * BigNumber.max.apply(null, arr) // '14'
- * ```
- *
- * @param n A numeric value.
- */
- static max(...n: BigNumber.Value[]): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the minimum of the arguments.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * x = new BigNumber('3257869345.0378653')
- * BigNumber.minimum(4e9, x, '123456789.9') // '123456789.9'
- *
- * arr = [2, new BigNumber(-14), '-15.9999', -12]
- * BigNumber.minimum.apply(null, arr) // '-15.9999'
- * ```
- *
- * @param n A numeric value.
- */
- static minimum(...n: BigNumber.Value[]): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the minimum of the arguments.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * x = new BigNumber('3257869345.0378653')
- * BigNumber.min(4e9, x, '123456789.9') // '123456789.9'
- *
- * arr = [2, new BigNumber(-14), '-15.9999', -12]
- * BigNumber.min.apply(null, arr) // '-15.9999'
- * ```
- *
- * @param n A numeric value.
- */
- static min(...n: BigNumber.Value[]): BigNumber;
-
- /**
- * Returns a new BigNumber with a pseudo-random value equal to or greater than 0 and less than 1.
- *
- * The return value will have `decimalPlaces` decimal places, or less if trailing zeros are
- * produced. If `decimalPlaces` is omitted, the current `DECIMAL_PLACES` setting will be used.
- *
- * Depending on the value of this BigNumber constructor's `CRYPTO` setting and the support for the
- * `crypto` object in the host environment, the random digits of the return value are generated by
- * either `Math.random` (fastest), `crypto.getRandomValues` (Web Cryptography API in recent
- * browsers) or `crypto.randomBytes` (Node.js).
- *
- * To be able to set `CRYPTO` to true when using Node.js, the `crypto` object must be available
- * globally:
- *
- * ```ts
- * global.crypto = require('crypto')
- * ```
- *
- * If `CRYPTO` is true, i.e. one of the `crypto` methods is to be used, the value of a returned
- * BigNumber should be cryptographically secure and statistically indistinguishable from a random
- * value.
- *
- * Throws if `decimalPlaces` is invalid.
- *
- * ```ts
- * BigNumber.config({ DECIMAL_PLACES: 10 })
- * BigNumber.random() // '0.4117936847'
- * BigNumber.random(20) // '0.78193327636914089009'
- * ```
- *
- * @param [decimalPlaces] Decimal places, integer, 0 to 1e+9.
- */
- static random(decimalPlaces?: number): BigNumber;
-
- /**
- * Returns a BigNumber whose value is the sum of the arguments.
- *
- * The return value is always exact and unrounded.
- *
- * ```ts
- * x = new BigNumber('3257869345.0378653')
- * BigNumber.sum(4e9, x, '123456789.9') // '7381326134.9378653'
- *
- * arr = [2, new BigNumber(14), '15.9999', 12]
- * BigNumber.sum.apply(null, arr) // '43.9999'
- * ```
- *
- * @param n A numeric value.
- */
- static sum(...n: BigNumber.Value[]): BigNumber;
-
- /**
- * Configures the settings that apply to this BigNumber constructor.
- *
- * The configuration object, `object`, contains any number of the properties shown in the example
- * below.
- *
- * Returns an object with the above properties and their current values.
- *
- * Throws if `object` is not an object, or if an invalid value is assigned to one or more of the
- * properties.
- *
- * ```ts
- * BigNumber.set({
- * DECIMAL_PLACES: 40,
- * ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL,
- * EXPONENTIAL_AT: [-10, 20],
- * RANGE: [-500, 500],
- * CRYPTO: true,
- * MODULO_MODE: BigNumber.ROUND_FLOOR,
- * POW_PRECISION: 80,
- * FORMAT: {
- * groupSize: 3,
- * groupSeparator: ' ',
- * decimalSeparator: ','
- * },
- * ALPHABET: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
- * });
- *
- * BigNumber.set().DECIMAL_PLACES // 40
- * ```
- *
- * @param object The configuration object.
- */
- static set(object: BigNumber.Config): BigNumber.Config;
-}
diff --git a/node_modules/bignumber.js/bignumber.js b/node_modules/bignumber.js/bignumber.js
deleted file mode 100644
index f2ea883..0000000
--- a/node_modules/bignumber.js/bignumber.js
+++ /dev/null
@@ -1,2902 +0,0 @@
-;(function (globalObject) {
- 'use strict';
-
-/*
- * bignumber.js v9.0.0
- * A JavaScript library for arbitrary-precision arithmetic.
- * https://github.com/MikeMcl/bignumber.js
- * Copyright (c) 2019 Michael Mclaughlin
- * MIT Licensed.
- *
- * BigNumber.prototype methods | BigNumber methods
- * |
- * absoluteValue abs | clone
- * comparedTo | config set
- * decimalPlaces dp | DECIMAL_PLACES
- * dividedBy div | ROUNDING_MODE
- * dividedToIntegerBy idiv | EXPONENTIAL_AT
- * exponentiatedBy pow | RANGE
- * integerValue | CRYPTO
- * isEqualTo eq | MODULO_MODE
- * isFinite | POW_PRECISION
- * isGreaterThan gt | FORMAT
- * isGreaterThanOrEqualTo gte | ALPHABET
- * isInteger | isBigNumber
- * isLessThan lt | maximum max
- * isLessThanOrEqualTo lte | minimum min
- * isNaN | random
- * isNegative | sum
- * isPositive |
- * isZero |
- * minus |
- * modulo mod |
- * multipliedBy times |
- * negated |
- * plus |
- * precision sd |
- * shiftedBy |
- * squareRoot sqrt |
- * toExponential |
- * toFixed |
- * toFormat |
- * toFraction |
- * toJSON |
- * toNumber |
- * toPrecision |
- * toString |
- * valueOf |
- *
- */
-
-
- var BigNumber,
- isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,
- mathceil = Math.ceil,
- mathfloor = Math.floor,
-
- bignumberError = '[BigNumber Error] ',
- tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',
-
- BASE = 1e14,
- LOG_BASE = 14,
- MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1
- // MAX_INT32 = 0x7fffffff, // 2^31 - 1
- POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],
- SQRT_BASE = 1e7,
-
- // EDITABLE
- // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and
- // the arguments to toExponential, toFixed, toFormat, and toPrecision.
- MAX = 1E9; // 0 to MAX_INT32
-
-
- /*
- * Create and return a BigNumber constructor.
- */
- function clone(configObject) {
- var div, convertBase, parseNumeric,
- P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },
- ONE = new BigNumber(1),
-
-
- //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------
-
-
- // The default values below must be integers within the inclusive ranges stated.
- // The values can also be changed at run-time using BigNumber.set.
-
- // The maximum number of decimal places for operations involving division.
- DECIMAL_PLACES = 20, // 0 to MAX
-
- // The rounding mode used when rounding to the above decimal places, and when using
- // toExponential, toFixed, toFormat and toPrecision, and round (default value).
- // UP 0 Away from zero.
- // DOWN 1 Towards zero.
- // CEIL 2 Towards +Infinity.
- // FLOOR 3 Towards -Infinity.
- // HALF_UP 4 Towards nearest neighbour. If equidistant, up.
- // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
- // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
- // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
- // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
- ROUNDING_MODE = 4, // 0 to 8
-
- // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]
-
- // The exponent value at and beneath which toString returns exponential notation.
- // Number type: -7
- TO_EXP_NEG = -7, // 0 to -MAX
-
- // The exponent value at and above which toString returns exponential notation.
- // Number type: 21
- TO_EXP_POS = 21, // 0 to MAX
-
- // RANGE : [MIN_EXP, MAX_EXP]
-
- // The minimum exponent value, beneath which underflow to zero occurs.
- // Number type: -324 (5e-324)
- MIN_EXP = -1e7, // -1 to -MAX
-
- // The maximum exponent value, above which overflow to Infinity occurs.
- // Number type: 308 (1.7976931348623157e+308)
- // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.
- MAX_EXP = 1e7, // 1 to MAX
-
- // Whether to use cryptographically-secure random number generation, if available.
- CRYPTO = false, // true or false
-
- // The modulo mode used when calculating the modulus: a mod n.
- // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
- // The remainder (r) is calculated as: r = a - n * q.
- //
- // UP 0 The remainder is positive if the dividend is negative, else is negative.
- // DOWN 1 The remainder has the same sign as the dividend.
- // This modulo mode is commonly known as 'truncated division' and is
- // equivalent to (a % n) in JavaScript.
- // FLOOR 3 The remainder has the same sign as the divisor (Python %).
- // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.
- // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).
- // The remainder is always positive.
- //
- // The truncated division, floored division, Euclidian division and IEEE 754 remainder
- // modes are commonly used for the modulus operation.
- // Although the other rounding modes can also be used, they may not give useful results.
- MODULO_MODE = 1, // 0 to 9
-
- // The maximum number of significant digits of the result of the exponentiatedBy operation.
- // If POW_PRECISION is 0, there will be unlimited significant digits.
- POW_PRECISION = 0, // 0 to MAX
-
- // The format specification used by the BigNumber.prototype.toFormat method.
- FORMAT = {
- prefix: '',
- groupSize: 3,
- secondaryGroupSize: 0,
- groupSeparator: ',',
- decimalSeparator: '.',
- fractionGroupSize: 0,
- fractionGroupSeparator: '\xA0', // non-breaking space
- suffix: ''
- },
-
- // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',
- // '-', '.', whitespace, or repeated character.
- // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
- ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz';
-
-
- //------------------------------------------------------------------------------------------
-
-
- // CONSTRUCTOR
-
-
- /*
- * The BigNumber constructor and exported function.
- * Create and return a new instance of a BigNumber object.
- *
- * v {number|string|BigNumber} A numeric value.
- * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.
- */
- function BigNumber(v, b) {
- var alphabet, c, caseChanged, e, i, isNum, len, str,
- x = this;
-
- // Enable constructor call without `new`.
- if (!(x instanceof BigNumber)) return new BigNumber(v, b);
-
- if (b == null) {
-
- if (v && v._isBigNumber === true) {
- x.s = v.s;
-
- if (!v.c || v.e > MAX_EXP) {
- x.c = x.e = null;
- } else if (v.e < MIN_EXP) {
- x.c = [x.e = 0];
- } else {
- x.e = v.e;
- x.c = v.c.slice();
- }
-
- return;
- }
-
- if ((isNum = typeof v == 'number') && v * 0 == 0) {
-
- // Use `1 / n` to handle minus zero also.
- x.s = 1 / v < 0 ? (v = -v, -1) : 1;
-
- // Fast path for integers, where n < 2147483648 (2**31).
- if (v === ~~v) {
- for (e = 0, i = v; i >= 10; i /= 10, e++);
-
- if (e > MAX_EXP) {
- x.c = x.e = null;
- } else {
- x.e = e;
- x.c = [v];
- }
-
- return;
- }
-
- str = String(v);
- } else {
-
- if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);
-
- x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
- }
-
- // Decimal point?
- if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
-
- // Exponential form?
- if ((i = str.search(/e/i)) > 0) {
-
- // Determine exponent.
- if (e < 0) e = i;
- e += +str.slice(i + 1);
- str = str.substring(0, i);
- } else if (e < 0) {
-
- // Integer.
- e = str.length;
- }
-
- } else {
-
- // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'
- intCheck(b, 2, ALPHABET.length, 'Base');
-
- // Allow exponential notation to be used with base 10 argument, while
- // also rounding to DECIMAL_PLACES as with other bases.
- if (b == 10) {
- x = new BigNumber(v);
- return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
- }
-
- str = String(v);
-
- if (isNum = typeof v == 'number') {
-
- // Avoid potential interpretation of Infinity and NaN as base 44+ values.
- if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
-
- x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
-
- // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'
- if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) {
- throw Error
- (tooManyDigits + v);
- }
- } else {
- x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
- }
-
- alphabet = ALPHABET.slice(0, b);
- e = i = 0;
-
- // Check that str is a valid base b number.
- // Don't use RegExp, so alphabet can contain special characters.
- for (len = str.length; i < len; i++) {
- if (alphabet.indexOf(c = str.charAt(i)) < 0) {
- if (c == '.') {
-
- // If '.' is not the first character and it has not be found before.
- if (i > e) {
- e = len;
- continue;
- }
- } else if (!caseChanged) {
-
- // Allow e.g. hexadecimal 'FF' as well as 'ff'.
- if (str == str.toUpperCase() && (str = str.toLowerCase()) ||
- str == str.toLowerCase() && (str = str.toUpperCase())) {
- caseChanged = true;
- i = -1;
- e = 0;
- continue;
- }
- }
-
- return parseNumeric(x, String(v), isNum, b);
- }
- }
-
- // Prevent later check for length on converted number.
- isNum = false;
- str = convertBase(str, b, 10, x.s);
-
- // Decimal point?
- if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
- else e = str.length;
- }
-
- // Determine leading zeros.
- for (i = 0; str.charCodeAt(i) === 48; i++);
-
- // Determine trailing zeros.
- for (len = str.length; str.charCodeAt(--len) === 48;);
-
- if (str = str.slice(i, ++len)) {
- len -= i;
-
- // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'
- if (isNum && BigNumber.DEBUG &&
- len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
- throw Error
- (tooManyDigits + (x.s * v));
- }
-
- // Overflow?
- if ((e = e - i - 1) > MAX_EXP) {
-
- // Infinity.
- x.c = x.e = null;
-
- // Underflow?
- } else if (e < MIN_EXP) {
-
- // Zero.
- x.c = [x.e = 0];
- } else {
- x.e = e;
- x.c = [];
-
- // Transform base
-
- // e is the base 10 exponent.
- // i is where to slice str to get the first element of the coefficient array.
- i = (e + 1) % LOG_BASE;
- if (e < 0) i += LOG_BASE; // i < 1
-
- if (i < len) {
- if (i) x.c.push(+str.slice(0, i));
-
- for (len -= LOG_BASE; i < len;) {
- x.c.push(+str.slice(i, i += LOG_BASE));
- }
-
- i = LOG_BASE - (str = str.slice(i)).length;
- } else {
- i -= len;
- }
-
- for (; i--; str += '0');
- x.c.push(+str);
- }
- } else {
-
- // Zero.
- x.c = [x.e = 0];
- }
- }
-
-
- // CONSTRUCTOR PROPERTIES
-
-
- BigNumber.clone = clone;
-
- BigNumber.ROUND_UP = 0;
- BigNumber.ROUND_DOWN = 1;
- BigNumber.ROUND_CEIL = 2;
- BigNumber.ROUND_FLOOR = 3;
- BigNumber.ROUND_HALF_UP = 4;
- BigNumber.ROUND_HALF_DOWN = 5;
- BigNumber.ROUND_HALF_EVEN = 6;
- BigNumber.ROUND_HALF_CEIL = 7;
- BigNumber.ROUND_HALF_FLOOR = 8;
- BigNumber.EUCLID = 9;
-
-
- /*
- * Configure infrequently-changing library-wide settings.
- *
- * Accept an object with the following optional properties (if the value of a property is
- * a number, it must be an integer within the inclusive range stated):
- *
- * DECIMAL_PLACES {number} 0 to MAX
- * ROUNDING_MODE {number} 0 to 8
- * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]
- * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]
- * CRYPTO {boolean} true or false
- * MODULO_MODE {number} 0 to 9
- * POW_PRECISION {number} 0 to MAX
- * ALPHABET {string} A string of two or more unique characters which does
- * not contain '.'.
- * FORMAT {object} An object with some of the following properties:
- * prefix {string}
- * groupSize {number}
- * secondaryGroupSize {number}
- * groupSeparator {string}
- * decimalSeparator {string}
- * fractionGroupSize {number}
- * fractionGroupSeparator {string}
- * suffix {string}
- *
- * (The values assigned to the above FORMAT object properties are not checked for validity.)
- *
- * E.g.
- * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })
- *
- * Ignore properties/parameters set to null or undefined, except for ALPHABET.
- *
- * Return an object with the properties current values.
- */
- BigNumber.config = BigNumber.set = function (obj) {
- var p, v;
-
- if (obj != null) {
-
- if (typeof obj == 'object') {
-
- // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.
- // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {
- v = obj[p];
- intCheck(v, 0, MAX, p);
- DECIMAL_PLACES = v;
- }
-
- // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.
- // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {
- v = obj[p];
- intCheck(v, 0, 8, p);
- ROUNDING_MODE = v;
- }
-
- // EXPONENTIAL_AT {number|number[]}
- // Integer, -MAX to MAX inclusive or
- // [integer -MAX to 0 inclusive, 0 to MAX inclusive].
- // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {
- v = obj[p];
- if (v && v.pop) {
- intCheck(v[0], -MAX, 0, p);
- intCheck(v[1], 0, MAX, p);
- TO_EXP_NEG = v[0];
- TO_EXP_POS = v[1];
- } else {
- intCheck(v, -MAX, MAX, p);
- TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
- }
- }
-
- // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or
- // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].
- // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'
- if (obj.hasOwnProperty(p = 'RANGE')) {
- v = obj[p];
- if (v && v.pop) {
- intCheck(v[0], -MAX, -1, p);
- intCheck(v[1], 1, MAX, p);
- MIN_EXP = v[0];
- MAX_EXP = v[1];
- } else {
- intCheck(v, -MAX, MAX, p);
- if (v) {
- MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
- } else {
- throw Error
- (bignumberError + p + ' cannot be zero: ' + v);
- }
- }
- }
-
- // CRYPTO {boolean} true or false.
- // '[BigNumber Error] CRYPTO not true or false: {v}'
- // '[BigNumber Error] crypto unavailable'
- if (obj.hasOwnProperty(p = 'CRYPTO')) {
- v = obj[p];
- if (v === !!v) {
- if (v) {
- if (typeof crypto != 'undefined' && crypto &&
- (crypto.getRandomValues || crypto.randomBytes)) {
- CRYPTO = v;
- } else {
- CRYPTO = !v;
- throw Error
- (bignumberError + 'crypto unavailable');
- }
- } else {
- CRYPTO = v;
- }
- } else {
- throw Error
- (bignumberError + p + ' not true or false: ' + v);
- }
- }
-
- // MODULO_MODE {number} Integer, 0 to 9 inclusive.
- // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'MODULO_MODE')) {
- v = obj[p];
- intCheck(v, 0, 9, p);
- MODULO_MODE = v;
- }
-
- // POW_PRECISION {number} Integer, 0 to MAX inclusive.
- // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'POW_PRECISION')) {
- v = obj[p];
- intCheck(v, 0, MAX, p);
- POW_PRECISION = v;
- }
-
- // FORMAT {object}
- // '[BigNumber Error] FORMAT not an object: {v}'
- if (obj.hasOwnProperty(p = 'FORMAT')) {
- v = obj[p];
- if (typeof v == 'object') FORMAT = v;
- else throw Error
- (bignumberError + p + ' not an object: ' + v);
- }
-
- // ALPHABET {string}
- // '[BigNumber Error] ALPHABET invalid: {v}'
- if (obj.hasOwnProperty(p = 'ALPHABET')) {
- v = obj[p];
-
- // Disallow if only one character,
- // or if it contains '+', '-', '.', whitespace, or a repeated character.
- if (typeof v == 'string' && !/^.$|[+-.\s]|(.).*\1/.test(v)) {
- ALPHABET = v;
- } else {
- throw Error
- (bignumberError + p + ' invalid: ' + v);
- }
- }
-
- } else {
-
- // '[BigNumber Error] Object expected: {v}'
- throw Error
- (bignumberError + 'Object expected: ' + obj);
- }
- }
-
- return {
- DECIMAL_PLACES: DECIMAL_PLACES,
- ROUNDING_MODE: ROUNDING_MODE,
- EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],
- RANGE: [MIN_EXP, MAX_EXP],
- CRYPTO: CRYPTO,
- MODULO_MODE: MODULO_MODE,
- POW_PRECISION: POW_PRECISION,
- FORMAT: FORMAT,
- ALPHABET: ALPHABET
- };
- };
-
-
- /*
- * Return true if v is a BigNumber instance, otherwise return false.
- *
- * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.
- *
- * v {any}
- *
- * '[BigNumber Error] Invalid BigNumber: {v}'
- */
- BigNumber.isBigNumber = function (v) {
- if (!v || v._isBigNumber !== true) return false;
- if (!BigNumber.DEBUG) return true;
-
- var i, n,
- c = v.c,
- e = v.e,
- s = v.s;
-
- out: if ({}.toString.call(c) == '[object Array]') {
-
- if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
-
- // If the first element is zero, the BigNumber value must be zero.
- if (c[0] === 0) {
- if (e === 0 && c.length === 1) return true;
- break out;
- }
-
- // Calculate number of digits that c[0] should have, based on the exponent.
- i = (e + 1) % LOG_BASE;
- if (i < 1) i += LOG_BASE;
-
- // Calculate number of digits of c[0].
- //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {
- if (String(c[0]).length == i) {
-
- for (i = 0; i < c.length; i++) {
- n = c[i];
- if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;
- }
-
- // Last element cannot be zero, unless it is the only element.
- if (n !== 0) return true;
- }
- }
-
- // Infinity/NaN
- } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {
- return true;
- }
-
- throw Error
- (bignumberError + 'Invalid BigNumber: ' + v);
- };
-
-
- /*
- * Return a new BigNumber whose value is the maximum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.maximum = BigNumber.max = function () {
- return maxOrMin(arguments, P.lt);
- };
-
-
- /*
- * Return a new BigNumber whose value is the minimum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.minimum = BigNumber.min = function () {
- return maxOrMin(arguments, P.gt);
- };
-
-
- /*
- * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,
- * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing
- * zeros are produced).
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'
- * '[BigNumber Error] crypto unavailable'
- */
- BigNumber.random = (function () {
- var pow2_53 = 0x20000000000000;
-
- // Return a 53 bit integer n, where 0 <= n < 9007199254740992.
- // Check if Math.random() produces more than 32 bits of randomness.
- // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.
- // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.
- var random53bitInt = (Math.random() * pow2_53) & 0x1fffff
- ? function () { return mathfloor(Math.random() * pow2_53); }
- : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +
- (Math.random() * 0x800000 | 0); };
-
- return function (dp) {
- var a, b, e, k, v,
- i = 0,
- c = [],
- rand = new BigNumber(ONE);
-
- if (dp == null) dp = DECIMAL_PLACES;
- else intCheck(dp, 0, MAX);
-
- k = mathceil(dp / LOG_BASE);
-
- if (CRYPTO) {
-
- // Browsers supporting crypto.getRandomValues.
- if (crypto.getRandomValues) {
-
- a = crypto.getRandomValues(new Uint32Array(k *= 2));
-
- for (; i < k;) {
-
- // 53 bits:
- // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)
- // 11111 11111111 11111111 11111111 11100000 00000000 00000000
- // ((Math.pow(2, 32) - 1) >>> 11).toString(2)
- // 11111 11111111 11111111
- // 0x20000 is 2^21.
- v = a[i] * 0x20000 + (a[i + 1] >>> 11);
-
- // Rejection sampling:
- // 0 <= v < 9007199254740992
- // Probability that v >= 9e15, is
- // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251
- if (v >= 9e15) {
- b = crypto.getRandomValues(new Uint32Array(2));
- a[i] = b[0];
- a[i + 1] = b[1];
- } else {
-
- // 0 <= v <= 8999999999999999
- // 0 <= (v % 1e14) <= 99999999999999
- c.push(v % 1e14);
- i += 2;
- }
- }
- i = k / 2;
-
- // Node.js supporting crypto.randomBytes.
- } else if (crypto.randomBytes) {
-
- // buffer
- a = crypto.randomBytes(k *= 7);
-
- for (; i < k;) {
-
- // 0x1000000000000 is 2^48, 0x10000000000 is 2^40
- // 0x100000000 is 2^32, 0x1000000 is 2^24
- // 11111 11111111 11111111 11111111 11111111 11111111 11111111
- // 0 <= v < 9007199254740992
- v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +
- (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +
- (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
-
- if (v >= 9e15) {
- crypto.randomBytes(7).copy(a, i);
- } else {
-
- // 0 <= (v % 1e14) <= 99999999999999
- c.push(v % 1e14);
- i += 7;
- }
- }
- i = k / 7;
- } else {
- CRYPTO = false;
- throw Error
- (bignumberError + 'crypto unavailable');
- }
- }
-
- // Use Math.random.
- if (!CRYPTO) {
-
- for (; i < k;) {
- v = random53bitInt();
- if (v < 9e15) c[i++] = v % 1e14;
- }
- }
-
- k = c[--i];
- dp %= LOG_BASE;
-
- // Convert trailing digits to zeros according to dp.
- if (k && dp) {
- v = POWS_TEN[LOG_BASE - dp];
- c[i] = mathfloor(k / v) * v;
- }
-
- // Remove trailing elements which are zero.
- for (; c[i] === 0; c.pop(), i--);
-
- // Zero?
- if (i < 0) {
- c = [e = 0];
- } else {
-
- // Remove leading elements which are zero and adjust exponent accordingly.
- for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);
-
- // Count the digits of the first element of c to determine leading zeros, and...
- for (i = 1, v = c[0]; v >= 10; v /= 10, i++);
-
- // adjust the exponent accordingly.
- if (i < LOG_BASE) e -= LOG_BASE - i;
- }
-
- rand.e = e;
- rand.c = c;
- return rand;
- };
- })();
-
-
- /*
- * Return a BigNumber whose value is the sum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.sum = function () {
- var i = 1,
- args = arguments,
- sum = new BigNumber(args[0]);
- for (; i < args.length;) sum = sum.plus(args[i++]);
- return sum;
- };
-
-
- // PRIVATE FUNCTIONS
-
-
- // Called by BigNumber and BigNumber.prototype.toString.
- convertBase = (function () {
- var decimal = '0123456789';
-
- /*
- * Convert string of baseIn to an array of numbers of baseOut.
- * Eg. toBaseOut('255', 10, 16) returns [15, 15].
- * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].
- */
- function toBaseOut(str, baseIn, baseOut, alphabet) {
- var j,
- arr = [0],
- arrL,
- i = 0,
- len = str.length;
-
- for (; i < len;) {
- for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);
-
- arr[0] += alphabet.indexOf(str.charAt(i++));
-
- for (j = 0; j < arr.length; j++) {
-
- if (arr[j] > baseOut - 1) {
- if (arr[j + 1] == null) arr[j + 1] = 0;
- arr[j + 1] += arr[j] / baseOut | 0;
- arr[j] %= baseOut;
- }
- }
- }
-
- return arr.reverse();
- }
-
- // Convert a numeric string of baseIn to a numeric string of baseOut.
- // If the caller is toString, we are converting from base 10 to baseOut.
- // If the caller is BigNumber, we are converting from baseIn to base 10.
- return function (str, baseIn, baseOut, sign, callerIsToString) {
- var alphabet, d, e, k, r, x, xc, y,
- i = str.indexOf('.'),
- dp = DECIMAL_PLACES,
- rm = ROUNDING_MODE;
-
- // Non-integer.
- if (i >= 0) {
- k = POW_PRECISION;
-
- // Unlimited precision.
- POW_PRECISION = 0;
- str = str.replace('.', '');
- y = new BigNumber(baseIn);
- x = y.pow(str.length - i);
- POW_PRECISION = k;
-
- // Convert str as if an integer, then restore the fraction part by dividing the
- // result by its base raised to a power.
-
- y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),
- 10, baseOut, decimal);
- y.e = y.c.length;
- }
-
- // Convert the number as integer.
-
- xc = toBaseOut(str, baseIn, baseOut, callerIsToString
- ? (alphabet = ALPHABET, decimal)
- : (alphabet = decimal, ALPHABET));
-
- // xc now represents str as an integer and converted to baseOut. e is the exponent.
- e = k = xc.length;
-
- // Remove trailing zeros.
- for (; xc[--k] == 0; xc.pop());
-
- // Zero?
- if (!xc[0]) return alphabet.charAt(0);
-
- // Does str represent an integer? If so, no need for the division.
- if (i < 0) {
- --e;
- } else {
- x.c = xc;
- x.e = e;
-
- // The sign is needed for correct rounding.
- x.s = sign;
- x = div(x, y, dp, rm, baseOut);
- xc = x.c;
- r = x.r;
- e = x.e;
- }
-
- // xc now represents str converted to baseOut.
-
- // THe index of the rounding digit.
- d = e + dp + 1;
-
- // The rounding digit: the digit to the right of the digit that may be rounded up.
- i = xc[d];
-
- // Look at the rounding digits and mode to determine whether to round up.
-
- k = baseOut / 2;
- r = r || d < 0 || xc[d + 1] != null;
-
- r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
- : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||
- rm == (x.s < 0 ? 8 : 7));
-
- // If the index of the rounding digit is not greater than zero, or xc represents
- // zero, then the result of the base conversion is zero or, if rounding up, a value
- // such as 0.00001.
- if (d < 1 || !xc[0]) {
-
- // 1^-dp or 0
- str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
- } else {
-
- // Truncate xc to the required number of decimal places.
- xc.length = d;
-
- // Round up?
- if (r) {
-
- // Rounding up may mean the previous digit has to be rounded up and so on.
- for (--baseOut; ++xc[--d] > baseOut;) {
- xc[d] = 0;
-
- if (!d) {
- ++e;
- xc = [1].concat(xc);
- }
- }
- }
-
- // Determine trailing zeros.
- for (k = xc.length; !xc[--k];);
-
- // E.g. [4, 11, 15] becomes 4bf.
- for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));
-
- // Add leading zeros, decimal point and trailing zeros as required.
- str = toFixedPoint(str, e, alphabet.charAt(0));
- }
-
- // The caller will add the sign.
- return str;
- };
- })();
-
-
- // Perform division in the specified base. Called by div and convertBase.
- div = (function () {
-
- // Assume non-zero x and k.
- function multiply(x, k, base) {
- var m, temp, xlo, xhi,
- carry = 0,
- i = x.length,
- klo = k % SQRT_BASE,
- khi = k / SQRT_BASE | 0;
-
- for (x = x.slice(); i--;) {
- xlo = x[i] % SQRT_BASE;
- xhi = x[i] / SQRT_BASE | 0;
- m = khi * xlo + xhi * klo;
- temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;
- carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;
- x[i] = temp % base;
- }
-
- if (carry) x = [carry].concat(x);
-
- return x;
- }
-
- function compare(a, b, aL, bL) {
- var i, cmp;
-
- if (aL != bL) {
- cmp = aL > bL ? 1 : -1;
- } else {
-
- for (i = cmp = 0; i < aL; i++) {
-
- if (a[i] != b[i]) {
- cmp = a[i] > b[i] ? 1 : -1;
- break;
- }
- }
- }
-
- return cmp;
- }
-
- function subtract(a, b, aL, base) {
- var i = 0;
-
- // Subtract b from a.
- for (; aL--;) {
- a[aL] -= i;
- i = a[aL] < b[aL] ? 1 : 0;
- a[aL] = i * base + a[aL] - b[aL];
- }
-
- // Remove leading zeros.
- for (; !a[0] && a.length > 1; a.splice(0, 1));
- }
-
- // x: dividend, y: divisor.
- return function (x, y, dp, rm, base) {
- var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,
- yL, yz,
- s = x.s == y.s ? 1 : -1,
- xc = x.c,
- yc = y.c;
-
- // Either NaN, Infinity or 0?
- if (!xc || !xc[0] || !yc || !yc[0]) {
-
- return new BigNumber(
-
- // Return NaN if either NaN, or both Infinity or 0.
- !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :
-
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
- xc && xc[0] == 0 || !yc ? s * 0 : s / 0
- );
- }
-
- q = new BigNumber(s);
- qc = q.c = [];
- e = x.e - y.e;
- s = dp + e + 1;
-
- if (!base) {
- base = BASE;
- e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);
- s = s / LOG_BASE | 0;
- }
-
- // Result exponent may be one less then the current value of e.
- // The coefficients of the BigNumbers from convertBase may have trailing zeros.
- for (i = 0; yc[i] == (xc[i] || 0); i++);
-
- if (yc[i] > (xc[i] || 0)) e--;
-
- if (s < 0) {
- qc.push(1);
- more = true;
- } else {
- xL = xc.length;
- yL = yc.length;
- i = 0;
- s += 2;
-
- // Normalise xc and yc so highest order digit of yc is >= base / 2.
-
- n = mathfloor(base / (yc[0] + 1));
-
- // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.
- // if (n > 1 || n++ == 1 && yc[0] < base / 2) {
- if (n > 1) {
- yc = multiply(yc, n, base);
- xc = multiply(xc, n, base);
- yL = yc.length;
- xL = xc.length;
- }
-
- xi = yL;
- rem = xc.slice(0, yL);
- remL = rem.length;
-
- // Add zeros to make remainder as long as divisor.
- for (; remL < yL; rem[remL++] = 0);
- yz = yc.slice();
- yz = [0].concat(yz);
- yc0 = yc[0];
- if (yc[1] >= base / 2) yc0++;
- // Not necessary, but to prevent trial digit n > base, when using base 3.
- // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;
-
- do {
- n = 0;
-
- // Compare divisor and remainder.
- cmp = compare(yc, rem, yL, remL);
-
- // If divisor < remainder.
- if (cmp < 0) {
-
- // Calculate trial digit, n.
-
- rem0 = rem[0];
- if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
-
- // n is how many times the divisor goes into the current remainder.
- n = mathfloor(rem0 / yc0);
-
- // Algorithm:
- // product = divisor multiplied by trial digit (n).
- // Compare product and remainder.
- // If product is greater than remainder:
- // Subtract divisor from product, decrement trial digit.
- // Subtract product from remainder.
- // If product was less than remainder at the last compare:
- // Compare new remainder and divisor.
- // If remainder is greater than divisor:
- // Subtract divisor from remainder, increment trial digit.
-
- if (n > 1) {
-
- // n may be > base only when base is 3.
- if (n >= base) n = base - 1;
-
- // product = divisor * trial digit.
- prod = multiply(yc, n, base);
- prodL = prod.length;
- remL = rem.length;
-
- // Compare product and remainder.
- // If product > remainder then trial digit n too high.
- // n is 1 too high about 5% of the time, and is not known to have
- // ever been more than 1 too high.
- while (compare(prod, rem, prodL, remL) == 1) {
- n--;
-
- // Subtract divisor from product.
- subtract(prod, yL < prodL ? yz : yc, prodL, base);
- prodL = prod.length;
- cmp = 1;
- }
- } else {
-
- // n is 0 or 1, cmp is -1.
- // If n is 0, there is no need to compare yc and rem again below,
- // so change cmp to 1 to avoid it.
- // If n is 1, leave cmp as -1, so yc and rem are compared again.
- if (n == 0) {
-
- // divisor < remainder, so n must be at least 1.
- cmp = n = 1;
- }
-
- // product = divisor
- prod = yc.slice();
- prodL = prod.length;
- }
-
- if (prodL < remL) prod = [0].concat(prod);
-
- // Subtract product from remainder.
- subtract(rem, prod, remL, base);
- remL = rem.length;
-
- // If product was < remainder.
- if (cmp == -1) {
-
- // Compare divisor and new remainder.
- // If divisor < new remainder, subtract divisor from remainder.
- // Trial digit n too low.
- // n is 1 too low about 5% of the time, and very rarely 2 too low.
- while (compare(yc, rem, yL, remL) < 1) {
- n++;
-
- // Subtract divisor from remainder.
- subtract(rem, yL < remL ? yz : yc, remL, base);
- remL = rem.length;
- }
- }
- } else if (cmp === 0) {
- n++;
- rem = [0];
- } // else cmp === 1 and n will be 0
-
- // Add the next digit, n, to the result array.
- qc[i++] = n;
-
- // Update the remainder.
- if (rem[0]) {
- rem[remL++] = xc[xi] || 0;
- } else {
- rem = [xc[xi]];
- remL = 1;
- }
- } while ((xi++ < xL || rem[0] != null) && s--);
-
- more = rem[0] != null;
-
- // Leading zero?
- if (!qc[0]) qc.splice(0, 1);
- }
-
- if (base == BASE) {
-
- // To calculate q.e, first get the number of digits of qc[0].
- for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);
-
- round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);
-
- // Caller is convertBase.
- } else {
- q.e = e;
- q.r = +more;
- }
-
- return q;
- };
- })();
-
-
- /*
- * Return a string representing the value of BigNumber n in fixed-point or exponential
- * notation rounded to the specified decimal places or significant digits.
- *
- * n: a BigNumber.
- * i: the index of the last digit required (i.e. the digit that may be rounded up).
- * rm: the rounding mode.
- * id: 1 (toExponential) or 2 (toPrecision).
- */
- function format(n, i, rm, id) {
- var c0, e, ne, len, str;
-
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
-
- if (!n.c) return n.toString();
-
- c0 = n.c[0];
- ne = n.e;
-
- if (i == null) {
- str = coeffToString(n.c);
- str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)
- ? toExponential(str, ne)
- : toFixedPoint(str, ne, '0');
- } else {
- n = round(new BigNumber(n), i, rm);
-
- // n.e may have changed if the value was rounded up.
- e = n.e;
-
- str = coeffToString(n.c);
- len = str.length;
-
- // toPrecision returns exponential notation if the number of significant digits
- // specified is less than the number of digits necessary to represent the integer
- // part of the value in fixed-point notation.
-
- // Exponential notation.
- if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {
-
- // Append zeros?
- for (; len < i; str += '0', len++);
- str = toExponential(str, e);
-
- // Fixed-point notation.
- } else {
- i -= ne;
- str = toFixedPoint(str, e, '0');
-
- // Append zeros?
- if (e + 1 > len) {
- if (--i > 0) for (str += '.'; i--; str += '0');
- } else {
- i += e - len;
- if (i > 0) {
- if (e + 1 == len) str += '.';
- for (; i--; str += '0');
- }
- }
- }
- }
-
- return n.s < 0 && c0 ? '-' + str : str;
- }
-
-
- // Handle BigNumber.max and BigNumber.min.
- function maxOrMin(args, method) {
- var n,
- i = 1,
- m = new BigNumber(args[0]);
-
- for (; i < args.length; i++) {
- n = new BigNumber(args[i]);
-
- // If any number is NaN, return NaN.
- if (!n.s) {
- m = n;
- break;
- } else if (method.call(m, n)) {
- m = n;
- }
- }
-
- return m;
- }
-
-
- /*
- * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.
- * Called by minus, plus and times.
- */
- function normalise(n, c, e) {
- var i = 1,
- j = c.length;
-
- // Remove trailing zeros.
- for (; !c[--j]; c.pop());
-
- // Calculate the base 10 exponent. First get the number of digits of c[0].
- for (j = c[0]; j >= 10; j /= 10, i++);
-
- // Overflow?
- if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {
-
- // Infinity.
- n.c = n.e = null;
-
- // Underflow?
- } else if (e < MIN_EXP) {
-
- // Zero.
- n.c = [n.e = 0];
- } else {
- n.e = e;
- n.c = c;
- }
-
- return n;
- }
-
-
- // Handle values that fail the validity test in BigNumber.
- parseNumeric = (function () {
- var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i,
- dotAfter = /^([^.]+)\.$/,
- dotBefore = /^\.([^.]+)$/,
- isInfinityOrNaN = /^-?(Infinity|NaN)$/,
- whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
-
- return function (x, str, isNum, b) {
- var base,
- s = isNum ? str : str.replace(whitespaceOrPlus, '');
-
- // No exception on ±Infinity or NaN.
- if (isInfinityOrNaN.test(s)) {
- x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
- } else {
- if (!isNum) {
-
- // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i
- s = s.replace(basePrefix, function (m, p1, p2) {
- base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;
- return !b || b == base ? p1 : m;
- });
-
- if (b) {
- base = b;
-
- // E.g. '1.' to '1', '.1' to '0.1'
- s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');
- }
-
- if (str != s) return new BigNumber(s, base);
- }
-
- // '[BigNumber Error] Not a number: {n}'
- // '[BigNumber Error] Not a base {b} number: {n}'
- if (BigNumber.DEBUG) {
- throw Error
- (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);
- }
-
- // NaN
- x.s = null;
- }
-
- x.c = x.e = null;
- }
- })();
-
-
- /*
- * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.
- * If r is truthy, it is known that there are more digits after the rounding digit.
- */
- function round(x, sd, rm, r) {
- var d, i, j, k, n, ni, rd,
- xc = x.c,
- pows10 = POWS_TEN;
-
- // if x is not Infinity or NaN...
- if (xc) {
-
- // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.
- // n is a base 1e14 number, the value of the element of array x.c containing rd.
- // ni is the index of n within x.c.
- // d is the number of digits of n.
- // i is the index of rd within n including leading zeros.
- // j is the actual index of rd within n (if < 0, rd is a leading zero).
- out: {
-
- // Get the number of digits of the first element of xc.
- for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);
- i = sd - d;
-
- // If the rounding digit is in the first element of xc...
- if (i < 0) {
- i += LOG_BASE;
- j = sd;
- n = xc[ni = 0];
-
- // Get the rounding digit at index j of n.
- rd = n / pows10[d - j - 1] % 10 | 0;
- } else {
- ni = mathceil((i + 1) / LOG_BASE);
-
- if (ni >= xc.length) {
-
- if (r) {
-
- // Needed by sqrt.
- for (; xc.length <= ni; xc.push(0));
- n = rd = 0;
- d = 1;
- i %= LOG_BASE;
- j = i - LOG_BASE + 1;
- } else {
- break out;
- }
- } else {
- n = k = xc[ni];
-
- // Get the number of digits of n.
- for (d = 1; k >= 10; k /= 10, d++);
-
- // Get the index of rd within n.
- i %= LOG_BASE;
-
- // Get the index of rd within n, adjusted for leading zeros.
- // The number of leading zeros of n is given by LOG_BASE - d.
- j = i - LOG_BASE + d;
-
- // Get the rounding digit at index j of n.
- rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
- }
- }
-
- r = r || sd < 0 ||
-
- // Are there any non-zero digits after the rounding digit?
- // The expression n % pows10[d - j - 1] returns all digits of n to the right
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
- xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);
-
- r = rm < 4
- ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
- : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&
-
- // Check whether the digit to the left of the rounding digit is odd.
- ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||
- rm == (x.s < 0 ? 8 : 7));
-
- if (sd < 1 || !xc[0]) {
- xc.length = 0;
-
- if (r) {
-
- // Convert sd to decimal places.
- sd -= x.e + 1;
-
- // 1, 0.1, 0.01, 0.001, 0.0001 etc.
- xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
- x.e = -sd || 0;
- } else {
-
- // Zero.
- xc[0] = x.e = 0;
- }
-
- return x;
- }
-
- // Remove excess digits.
- if (i == 0) {
- xc.length = ni;
- k = 1;
- ni--;
- } else {
- xc.length = ni + 1;
- k = pows10[LOG_BASE - i];
-
- // E.g. 56700 becomes 56000 if 7 is the rounding digit.
- // j > 0 means i > number of leading zeros of n.
- xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;
- }
-
- // Round up?
- if (r) {
-
- for (; ;) {
-
- // If the digit to be rounded up is in the first element of xc...
- if (ni == 0) {
-
- // i will be the length of xc[0] before k is added.
- for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);
- j = xc[0] += k;
- for (k = 1; j >= 10; j /= 10, k++);
-
- // if i != k the length has increased.
- if (i != k) {
- x.e++;
- if (xc[0] == BASE) xc[0] = 1;
- }
-
- break;
- } else {
- xc[ni] += k;
- if (xc[ni] != BASE) break;
- xc[ni--] = 0;
- k = 1;
- }
- }
- }
-
- // Remove trailing zeros.
- for (i = xc.length; xc[--i] === 0; xc.pop());
- }
-
- // Overflow? Infinity.
- if (x.e > MAX_EXP) {
- x.c = x.e = null;
-
- // Underflow? Zero.
- } else if (x.e < MIN_EXP) {
- x.c = [x.e = 0];
- }
- }
-
- return x;
- }
-
-
- function valueOf(n) {
- var str,
- e = n.e;
-
- if (e === null) return n.toString();
-
- str = coeffToString(n.c);
-
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS
- ? toExponential(str, e)
- : toFixedPoint(str, e, '0');
-
- return n.s < 0 ? '-' + str : str;
- }
-
-
- // PROTOTYPE/INSTANCE METHODS
-
-
- /*
- * Return a new BigNumber whose value is the absolute value of this BigNumber.
- */
- P.absoluteValue = P.abs = function () {
- var x = new BigNumber(this);
- if (x.s < 0) x.s = 1;
- return x;
- };
-
-
- /*
- * Return
- * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),
- * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),
- * 0 if they have the same value,
- * or null if the value of either is NaN.
- */
- P.comparedTo = function (y, b) {
- return compare(this, new BigNumber(y, b));
- };
-
-
- /*
- * If dp is undefined or null or true or false, return the number of decimal places of the
- * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.
- *
- * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this
- * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or
- * ROUNDING_MODE if rm is omitted.
- *
- * [dp] {number} Decimal places: integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- */
- P.decimalPlaces = P.dp = function (dp, rm) {
- var c, n, v,
- x = this;
-
- if (dp != null) {
- intCheck(dp, 0, MAX);
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
-
- return round(new BigNumber(x), dp + x.e + 1, rm);
- }
-
- if (!(c = x.c)) return null;
- n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
-
- // Subtract the number of trailing zeros of the last number.
- if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);
- if (n < 0) n = 0;
-
- return n;
- };
-
-
- /*
- * n / 0 = I
- * n / N = N
- * n / I = 0
- * 0 / n = 0
- * 0 / 0 = N
- * 0 / N = N
- * 0 / I = 0
- * N / n = N
- * N / 0 = N
- * N / N = N
- * N / I = N
- * I / n = I
- * I / 0 = I
- * I / N = N
- * I / I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber divided by the value of
- * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.
- */
- P.dividedBy = P.div = function (y, b) {
- return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);
- };
-
-
- /*
- * Return a new BigNumber whose value is the integer part of dividing the value of this
- * BigNumber by the value of BigNumber(y, b).
- */
- P.dividedToIntegerBy = P.idiv = function (y, b) {
- return div(this, new BigNumber(y, b), 0, 1);
- };
-
-
- /*
- * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.
- *
- * If m is present, return the result modulo m.
- * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.
- * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.
- *
- * The modular power operation works efficiently when x, n, and m are integers, otherwise it
- * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.
- *
- * n {number|string|BigNumber} The exponent. An integer.
- * [m] {number|string|BigNumber} The modulus.
- *
- * '[BigNumber Error] Exponent not an integer: {n}'
- */
- P.exponentiatedBy = P.pow = function (n, m) {
- var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,
- x = this;
-
- n = new BigNumber(n);
-
- // Allow NaN and ±Infinity, but not other non-integers.
- if (n.c && !n.isInteger()) {
- throw Error
- (bignumberError + 'Exponent not an integer: ' + valueOf(n));
- }
-
- if (m != null) m = new BigNumber(m);
-
- // Exponent of MAX_SAFE_INTEGER is 15.
- nIsBig = n.e > 14;
-
- // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.
- if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
-
- // The sign of the result of pow when x is negative depends on the evenness of n.
- // If +n overflows to ±Infinity, the evenness of n would be not be known.
- y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));
- return m ? y.mod(m) : y;
- }
-
- nIsNeg = n.s < 0;
-
- if (m) {
-
- // x % m returns NaN if abs(m) is zero, or m is NaN.
- if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);
-
- isModExp = !nIsNeg && x.isInteger() && m.isInteger();
-
- if (isModExp) x = x.mod(m);
-
- // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.
- // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.
- } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0
- // [1, 240000000]
- ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7
- // [80000000000000] [99999750000000]
- : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
-
- // If x is negative and n is odd, k = -0, else k = 0.
- k = x.s < 0 && isOdd(n) ? -0 : 0;
-
- // If x >= 1, k = ±Infinity.
- if (x.e > -1) k = 1 / k;
-
- // If n is negative return ±0, else return ±Infinity.
- return new BigNumber(nIsNeg ? 1 / k : k);
-
- } else if (POW_PRECISION) {
-
- // Truncating each coefficient array to a length of k after each multiplication
- // equates to truncating significant digits to POW_PRECISION + [28, 41],
- // i.e. there will be a minimum of 28 guard digits retained.
- k = mathceil(POW_PRECISION / LOG_BASE + 2);
- }
-
- if (nIsBig) {
- half = new BigNumber(0.5);
- if (nIsNeg) n.s = 1;
- nIsOdd = isOdd(n);
- } else {
- i = Math.abs(+valueOf(n));
- nIsOdd = i % 2;
- }
-
- y = new BigNumber(ONE);
-
- // Performs 54 loop iterations for n of 9007199254740991.
- for (; ;) {
-
- if (nIsOdd) {
- y = y.times(x);
- if (!y.c) break;
-
- if (k) {
- if (y.c.length > k) y.c.length = k;
- } else if (isModExp) {
- y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));
- }
- }
-
- if (i) {
- i = mathfloor(i / 2);
- if (i === 0) break;
- nIsOdd = i % 2;
- } else {
- n = n.times(half);
- round(n, n.e + 1, 1);
-
- if (n.e > 14) {
- nIsOdd = isOdd(n);
- } else {
- i = +valueOf(n);
- if (i === 0) break;
- nIsOdd = i % 2;
- }
- }
-
- x = x.times(x);
-
- if (k) {
- if (x.c && x.c.length > k) x.c.length = k;
- } else if (isModExp) {
- x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));
- }
- }
-
- if (isModExp) return y;
- if (nIsNeg) y = ONE.div(y);
-
- return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer
- * using rounding mode rm, or ROUNDING_MODE if rm is omitted.
- *
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'
- */
- P.integerValue = function (rm) {
- var n = new BigNumber(this);
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
- return round(n, n.e + 1, rm);
- };
-
-
- /*
- * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),
- * otherwise return false.
- */
- P.isEqualTo = P.eq = function (y, b) {
- return compare(this, new BigNumber(y, b)) === 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is a finite number, otherwise return false.
- */
- P.isFinite = function () {
- return !!this.c;
- };
-
-
- /*
- * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),
- * otherwise return false.
- */
- P.isGreaterThan = P.gt = function (y, b) {
- return compare(this, new BigNumber(y, b)) > 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is greater than or equal to the value of
- * BigNumber(y, b), otherwise return false.
- */
- P.isGreaterThanOrEqualTo = P.gte = function (y, b) {
- return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;
-
- };
-
-
- /*
- * Return true if the value of this BigNumber is an integer, otherwise return false.
- */
- P.isInteger = function () {
- return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
- };
-
-
- /*
- * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),
- * otherwise return false.
- */
- P.isLessThan = P.lt = function (y, b) {
- return compare(this, new BigNumber(y, b)) < 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is less than or equal to the value of
- * BigNumber(y, b), otherwise return false.
- */
- P.isLessThanOrEqualTo = P.lte = function (y, b) {
- return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is NaN, otherwise return false.
- */
- P.isNaN = function () {
- return !this.s;
- };
-
-
- /*
- * Return true if the value of this BigNumber is negative, otherwise return false.
- */
- P.isNegative = function () {
- return this.s < 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is positive, otherwise return false.
- */
- P.isPositive = function () {
- return this.s > 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is 0 or -0, otherwise return false.
- */
- P.isZero = function () {
- return !!this.c && this.c[0] == 0;
- };
-
-
- /*
- * n - 0 = n
- * n - N = N
- * n - I = -I
- * 0 - n = -n
- * 0 - 0 = 0
- * 0 - N = N
- * 0 - I = -I
- * N - n = N
- * N - 0 = N
- * N - N = N
- * N - I = N
- * I - n = I
- * I - 0 = I
- * I - N = N
- * I - I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber minus the value of
- * BigNumber(y, b).
- */
- P.minus = function (y, b) {
- var i, j, t, xLTy,
- x = this,
- a = x.s;
-
- y = new BigNumber(y, b);
- b = y.s;
-
- // Either NaN?
- if (!a || !b) return new BigNumber(NaN);
-
- // Signs differ?
- if (a != b) {
- y.s = -b;
- return x.plus(y);
- }
-
- var xe = x.e / LOG_BASE,
- ye = y.e / LOG_BASE,
- xc = x.c,
- yc = y.c;
-
- if (!xe || !ye) {
-
- // Either Infinity?
- if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);
-
- // Either zero?
- if (!xc[0] || !yc[0]) {
-
- // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
- return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :
-
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
- ROUNDING_MODE == 3 ? -0 : 0);
- }
- }
-
- xe = bitFloor(xe);
- ye = bitFloor(ye);
- xc = xc.slice();
-
- // Determine which is the bigger number.
- if (a = xe - ye) {
-
- if (xLTy = a < 0) {
- a = -a;
- t = xc;
- } else {
- ye = xe;
- t = yc;
- }
-
- t.reverse();
-
- // Prepend zeros to equalise exponents.
- for (b = a; b--; t.push(0));
- t.reverse();
- } else {
-
- // Exponents equal. Check digit by digit.
- j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;
-
- for (a = b = 0; b < j; b++) {
-
- if (xc[b] != yc[b]) {
- xLTy = xc[b] < yc[b];
- break;
- }
- }
- }
-
- // x < y? Point xc to the array of the bigger number.
- if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
-
- b = (j = yc.length) - (i = xc.length);
-
- // Append zeros to xc if shorter.
- // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.
- if (b > 0) for (; b--; xc[i++] = 0);
- b = BASE - 1;
-
- // Subtract yc from xc.
- for (; j > a;) {
-
- if (xc[--j] < yc[j]) {
- for (i = j; i && !xc[--i]; xc[i] = b);
- --xc[i];
- xc[j] += BASE;
- }
-
- xc[j] -= yc[j];
- }
-
- // Remove leading zeros and adjust exponent accordingly.
- for (; xc[0] == 0; xc.splice(0, 1), --ye);
-
- // Zero?
- if (!xc[0]) {
-
- // Following IEEE 754 (2008) 6.3,
- // n - n = +0 but n - n = -0 when rounding towards -Infinity.
- y.s = ROUNDING_MODE == 3 ? -1 : 1;
- y.c = [y.e = 0];
- return y;
- }
-
- // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity
- // for finite x and y.
- return normalise(y, xc, ye);
- };
-
-
- /*
- * n % 0 = N
- * n % N = N
- * n % I = n
- * 0 % n = 0
- * -0 % n = -0
- * 0 % 0 = N
- * 0 % N = N
- * 0 % I = 0
- * N % n = N
- * N % 0 = N
- * N % N = N
- * N % I = N
- * I % n = N
- * I % 0 = N
- * I % N = N
- * I % I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber modulo the value of
- * BigNumber(y, b). The result depends on the value of MODULO_MODE.
- */
- P.modulo = P.mod = function (y, b) {
- var q, s,
- x = this;
-
- y = new BigNumber(y, b);
-
- // Return NaN if x is Infinity or NaN, or y is NaN or zero.
- if (!x.c || !y.s || y.c && !y.c[0]) {
- return new BigNumber(NaN);
-
- // Return x if y is Infinity or x is zero.
- } else if (!y.c || x.c && !x.c[0]) {
- return new BigNumber(x);
- }
-
- if (MODULO_MODE == 9) {
-
- // Euclidian division: q = sign(y) * floor(x / abs(y))
- // r = x - qy where 0 <= r < abs(y)
- s = y.s;
- y.s = 1;
- q = div(x, y, 0, 3);
- y.s = s;
- q.s *= s;
- } else {
- q = div(x, y, 0, MODULO_MODE);
- }
-
- y = x.minus(q.times(y));
-
- // To match JavaScript %, ensure sign of zero is sign of dividend.
- if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;
-
- return y;
- };
-
-
- /*
- * n * 0 = 0
- * n * N = N
- * n * I = I
- * 0 * n = 0
- * 0 * 0 = 0
- * 0 * N = N
- * 0 * I = N
- * N * n = N
- * N * 0 = N
- * N * N = N
- * N * I = N
- * I * n = I
- * I * 0 = N
- * I * N = N
- * I * I = I
- *
- * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value
- * of BigNumber(y, b).
- */
- P.multipliedBy = P.times = function (y, b) {
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,
- base, sqrtBase,
- x = this,
- xc = x.c,
- yc = (y = new BigNumber(y, b)).c;
-
- // Either NaN, ±Infinity or ±0?
- if (!xc || !yc || !xc[0] || !yc[0]) {
-
- // Return NaN if either is NaN, or one is 0 and the other is Infinity.
- if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
- y.c = y.e = y.s = null;
- } else {
- y.s *= x.s;
-
- // Return ±Infinity if either is ±Infinity.
- if (!xc || !yc) {
- y.c = y.e = null;
-
- // Return ±0 if either is ±0.
- } else {
- y.c = [0];
- y.e = 0;
- }
- }
-
- return y;
- }
-
- e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);
- y.s *= x.s;
- xcL = xc.length;
- ycL = yc.length;
-
- // Ensure xc points to longer array and xcL to its length.
- if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
-
- // Initialise the result array with zeros.
- for (i = xcL + ycL, zc = []; i--; zc.push(0));
-
- base = BASE;
- sqrtBase = SQRT_BASE;
-
- for (i = ycL; --i >= 0;) {
- c = 0;
- ylo = yc[i] % sqrtBase;
- yhi = yc[i] / sqrtBase | 0;
-
- for (k = xcL, j = i + k; j > i;) {
- xlo = xc[--k] % sqrtBase;
- xhi = xc[k] / sqrtBase | 0;
- m = yhi * xlo + xhi * ylo;
- xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;
- c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;
- zc[j--] = xlo % base;
- }
-
- zc[j] = c;
- }
-
- if (c) {
- ++e;
- } else {
- zc.splice(0, 1);
- }
-
- return normalise(y, zc, e);
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber negated,
- * i.e. multiplied by -1.
- */
- P.negated = function () {
- var x = new BigNumber(this);
- x.s = -x.s || null;
- return x;
- };
-
-
- /*
- * n + 0 = n
- * n + N = N
- * n + I = I
- * 0 + n = n
- * 0 + 0 = 0
- * 0 + N = N
- * 0 + I = I
- * N + n = N
- * N + 0 = N
- * N + N = N
- * N + I = N
- * I + n = I
- * I + 0 = I
- * I + N = N
- * I + I = I
- *
- * Return a new BigNumber whose value is the value of this BigNumber plus the value of
- * BigNumber(y, b).
- */
- P.plus = function (y, b) {
- var t,
- x = this,
- a = x.s;
-
- y = new BigNumber(y, b);
- b = y.s;
-
- // Either NaN?
- if (!a || !b) return new BigNumber(NaN);
-
- // Signs differ?
- if (a != b) {
- y.s = -b;
- return x.minus(y);
- }
-
- var xe = x.e / LOG_BASE,
- ye = y.e / LOG_BASE,
- xc = x.c,
- yc = y.c;
-
- if (!xe || !ye) {
-
- // Return ±Infinity if either ±Infinity.
- if (!xc || !yc) return new BigNumber(a / 0);
-
- // Either zero?
- // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
- if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);
- }
-
- xe = bitFloor(xe);
- ye = bitFloor(ye);
- xc = xc.slice();
-
- // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.
- if (a = xe - ye) {
- if (a > 0) {
- ye = xe;
- t = yc;
- } else {
- a = -a;
- t = xc;
- }
-
- t.reverse();
- for (; a--; t.push(0));
- t.reverse();
- }
-
- a = xc.length;
- b = yc.length;
-
- // Point xc to the longer array, and b to the shorter length.
- if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
-
- // Only start adding at yc.length - 1 as the further digits of xc can be ignored.
- for (a = 0; b;) {
- a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
- xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
- }
-
- if (a) {
- xc = [a].concat(xc);
- ++ye;
- }
-
- // No need to check for zero, as +x + +y != 0 && -x + -y != 0
- // ye = MAX_EXP + 1 possible
- return normalise(y, xc, ye);
- };
-
-
- /*
- * If sd is undefined or null or true or false, return the number of significant digits of
- * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.
- * If sd is true include integer-part trailing zeros in the count.
- *
- * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this
- * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or
- * ROUNDING_MODE if rm is omitted.
- *
- * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.
- * boolean: whether to count integer-part trailing zeros: true or false.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'
- */
- P.precision = P.sd = function (sd, rm) {
- var c, n, v,
- x = this;
-
- if (sd != null && sd !== !!sd) {
- intCheck(sd, 1, MAX);
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
-
- return round(new BigNumber(x), sd, rm);
- }
-
- if (!(c = x.c)) return null;
- v = c.length - 1;
- n = v * LOG_BASE + 1;
-
- if (v = c[v]) {
-
- // Subtract the number of trailing zeros of the last element.
- for (; v % 10 == 0; v /= 10, n--);
-
- // Add the number of digits of the first element.
- for (v = c[0]; v >= 10; v /= 10, n++);
- }
-
- if (sd && x.e + 1 > n) n = x.e + 1;
-
- return n;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber shifted by k places
- * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.
- *
- * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'
- */
- P.shiftedBy = function (k) {
- intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
- return this.times('1e' + k);
- };
-
-
- /*
- * sqrt(-n) = N
- * sqrt(N) = N
- * sqrt(-I) = N
- * sqrt(I) = I
- * sqrt(0) = 0
- * sqrt(-0) = -0
- *
- * Return a new BigNumber whose value is the square root of the value of this BigNumber,
- * rounded according to DECIMAL_PLACES and ROUNDING_MODE.
- */
- P.squareRoot = P.sqrt = function () {
- var m, n, r, rep, t,
- x = this,
- c = x.c,
- s = x.s,
- e = x.e,
- dp = DECIMAL_PLACES + 4,
- half = new BigNumber('0.5');
-
- // Negative/NaN/Infinity/zero?
- if (s !== 1 || !c || !c[0]) {
- return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
- }
-
- // Initial estimate.
- s = Math.sqrt(+valueOf(x));
-
- // Math.sqrt underflow/overflow?
- // Pass x to Math.sqrt as integer, then adjust the exponent of the result.
- if (s == 0 || s == 1 / 0) {
- n = coeffToString(c);
- if ((n.length + e) % 2 == 0) n += '0';
- s = Math.sqrt(+n);
- e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
-
- if (s == 1 / 0) {
- n = '1e' + e;
- } else {
- n = s.toExponential();
- n = n.slice(0, n.indexOf('e') + 1) + e;
- }
-
- r = new BigNumber(n);
- } else {
- r = new BigNumber(s + '');
- }
-
- // Check for zero.
- // r could be zero if MIN_EXP is changed after the this value was created.
- // This would cause a division by zero (x/t) and hence Infinity below, which would cause
- // coeffToString to throw.
- if (r.c[0]) {
- e = r.e;
- s = e + dp;
- if (s < 3) s = 0;
-
- // Newton-Raphson iteration.
- for (; ;) {
- t = r;
- r = half.times(t.plus(div(x, t, dp, 1)));
-
- if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {
-
- // The exponent of r may here be one less than the final result exponent,
- // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits
- // are indexed correctly.
- if (r.e < e) --s;
- n = n.slice(s - 3, s + 1);
-
- // The 4th rounding digit may be in error by -1 so if the 4 rounding digits
- // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the
- // iteration.
- if (n == '9999' || !rep && n == '4999') {
-
- // On the first iteration only, check to see if rounding up gives the
- // exact result as the nines may infinitely repeat.
- if (!rep) {
- round(t, t.e + DECIMAL_PLACES + 2, 0);
-
- if (t.times(t).eq(x)) {
- r = t;
- break;
- }
- }
-
- dp += 4;
- s += 4;
- rep = 1;
- } else {
-
- // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact
- // result. If not, then there are further digits and m will be truthy.
- if (!+n || !+n.slice(1) && n.charAt(0) == '5') {
-
- // Truncate to the first rounding digit.
- round(r, r.e + DECIMAL_PLACES + 2, 1);
- m = !r.times(r).eq(x);
- }
-
- break;
- }
- }
- }
- }
-
- return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in exponential notation and
- * rounded using ROUNDING_MODE to dp fixed decimal places.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- */
- P.toExponential = function (dp, rm) {
- if (dp != null) {
- intCheck(dp, 0, MAX);
- dp++;
- }
- return format(this, dp, rm, 1);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in fixed-point notation rounding
- * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.
- *
- * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',
- * but e.g. (-0.00001).toFixed(0) is '-0'.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- */
- P.toFixed = function (dp, rm) {
- if (dp != null) {
- intCheck(dp, 0, MAX);
- dp = dp + this.e + 1;
- }
- return format(this, dp, rm);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in fixed-point notation rounded
- * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties
- * of the format or FORMAT object (see BigNumber.set).
- *
- * The formatting object may contain some or all of the properties shown below.
- *
- * FORMAT = {
- * prefix: '',
- * groupSize: 3,
- * secondaryGroupSize: 0,
- * groupSeparator: ',',
- * decimalSeparator: '.',
- * fractionGroupSize: 0,
- * fractionGroupSeparator: '\xA0', // non-breaking space
- * suffix: ''
- * };
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- * [format] {object} Formatting options. See FORMAT pbject above.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- * '[BigNumber Error] Argument not an object: {format}'
- */
- P.toFormat = function (dp, rm, format) {
- var str,
- x = this;
-
- if (format == null) {
- if (dp != null && rm && typeof rm == 'object') {
- format = rm;
- rm = null;
- } else if (dp && typeof dp == 'object') {
- format = dp;
- dp = rm = null;
- } else {
- format = FORMAT;
- }
- } else if (typeof format != 'object') {
- throw Error
- (bignumberError + 'Argument not an object: ' + format);
- }
-
- str = x.toFixed(dp, rm);
-
- if (x.c) {
- var i,
- arr = str.split('.'),
- g1 = +format.groupSize,
- g2 = +format.secondaryGroupSize,
- groupSeparator = format.groupSeparator || '',
- intPart = arr[0],
- fractionPart = arr[1],
- isNeg = x.s < 0,
- intDigits = isNeg ? intPart.slice(1) : intPart,
- len = intDigits.length;
-
- if (g2) i = g1, g1 = g2, g2 = i, len -= i;
-
- if (g1 > 0 && len > 0) {
- i = len % g1 || g1;
- intPart = intDigits.substr(0, i);
- for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);
- if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);
- if (isNeg) intPart = '-' + intPart;
- }
-
- str = fractionPart
- ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)
- ? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'),
- '$&' + (format.fractionGroupSeparator || ''))
- : fractionPart)
- : intPart;
- }
-
- return (format.prefix || '') + str + (format.suffix || '');
- };
-
-
- /*
- * Return an array of two BigNumbers representing the value of this BigNumber as a simple
- * fraction with an integer numerator and an integer denominator.
- * The denominator will be a positive non-zero value less than or equal to the specified
- * maximum denominator. If a maximum denominator is not specified, the denominator will be
- * the lowest value necessary to represent the number exactly.
- *
- * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.
- *
- * '[BigNumber Error] Argument {not an integer|out of range} : {md}'
- */
- P.toFraction = function (md) {
- var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,
- x = this,
- xc = x.c;
-
- if (md != null) {
- n = new BigNumber(md);
-
- // Throw if md is less than one or is not an integer, unless it is Infinity.
- if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
- throw Error
- (bignumberError + 'Argument ' +
- (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));
- }
- }
-
- if (!xc) return new BigNumber(x);
-
- d = new BigNumber(ONE);
- n1 = d0 = new BigNumber(ONE);
- d1 = n0 = new BigNumber(ONE);
- s = coeffToString(xc);
-
- // Determine initial denominator.
- // d is a power of 10 and the minimum max denominator that specifies the value exactly.
- e = d.e = s.length - x.e - 1;
- d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
- md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;
-
- exp = MAX_EXP;
- MAX_EXP = 1 / 0;
- n = new BigNumber(s);
-
- // n0 = d1 = 0
- n0.c[0] = 0;
-
- for (; ;) {
- q = div(n, d, 0, 1);
- d2 = d0.plus(q.times(d1));
- if (d2.comparedTo(md) == 1) break;
- d0 = d1;
- d1 = d2;
- n1 = n0.plus(q.times(d2 = n1));
- n0 = d2;
- d = n.minus(q.times(d2 = d));
- n = d2;
- }
-
- d2 = div(md.minus(d0), d1, 0, 1);
- n0 = n0.plus(d2.times(n1));
- d0 = d0.plus(d2.times(d1));
- n0.s = n1.s = x.s;
- e = e * 2;
-
- // Determine which fraction is closer to x, n0/d0 or n1/d1
- r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(
- div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];
-
- MAX_EXP = exp;
-
- return r;
- };
-
-
- /*
- * Return the value of this BigNumber converted to a number primitive.
- */
- P.toNumber = function () {
- return +valueOf(this);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber rounded to sd significant digits
- * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits
- * necessary to represent the integer part of the value in fixed-point notation, then use
- * exponential notation.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'
- */
- P.toPrecision = function (sd, rm) {
- if (sd != null) intCheck(sd, 1, MAX);
- return format(this, sd, rm, 2);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in base b, or base 10 if b is
- * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and
- * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent
- * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than
- * TO_EXP_NEG, return exponential notation.
- *
- * [b] {number} Integer, 2 to ALPHABET.length inclusive.
- *
- * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'
- */
- P.toString = function (b) {
- var str,
- n = this,
- s = n.s,
- e = n.e;
-
- // Infinity or NaN?
- if (e === null) {
- if (s) {
- str = 'Infinity';
- if (s < 0) str = '-' + str;
- } else {
- str = 'NaN';
- }
- } else {
- if (b == null) {
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS
- ? toExponential(coeffToString(n.c), e)
- : toFixedPoint(coeffToString(n.c), e, '0');
- } else if (b === 10) {
- n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
- str = toFixedPoint(coeffToString(n.c), n.e, '0');
- } else {
- intCheck(b, 2, ALPHABET.length, 'Base');
- str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);
- }
-
- if (s < 0 && n.c[0]) str = '-' + str;
- }
-
- return str;
- };
-
-
- /*
- * Return as toString, but do not accept a base argument, and include the minus sign for
- * negative zero.
- */
- P.valueOf = P.toJSON = function () {
- return valueOf(this);
- };
-
-
- P._isBigNumber = true;
-
- if (configObject != null) BigNumber.set(configObject);
-
- return BigNumber;
- }
-
-
- // PRIVATE HELPER FUNCTIONS
-
- // These functions don't need access to variables,
- // e.g. DECIMAL_PLACES, in the scope of the `clone` function above.
-
-
- function bitFloor(n) {
- var i = n | 0;
- return n > 0 || n === i ? i : i - 1;
- }
-
-
- // Return a coefficient array as a string of base 10 digits.
- function coeffToString(a) {
- var s, z,
- i = 1,
- j = a.length,
- r = a[0] + '';
-
- for (; i < j;) {
- s = a[i++] + '';
- z = LOG_BASE - s.length;
- for (; z--; s = '0' + s);
- r += s;
- }
-
- // Determine trailing zeros.
- for (j = r.length; r.charCodeAt(--j) === 48;);
-
- return r.slice(0, j + 1 || 1);
- }
-
-
- // Compare the value of BigNumbers x and y.
- function compare(x, y) {
- var a, b,
- xc = x.c,
- yc = y.c,
- i = x.s,
- j = y.s,
- k = x.e,
- l = y.e;
-
- // Either NaN?
- if (!i || !j) return null;
-
- a = xc && !xc[0];
- b = yc && !yc[0];
-
- // Either zero?
- if (a || b) return a ? b ? 0 : -j : i;
-
- // Signs differ?
- if (i != j) return i;
-
- a = i < 0;
- b = k == l;
-
- // Either Infinity?
- if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;
-
- // Compare exponents.
- if (!b) return k > l ^ a ? 1 : -1;
-
- j = (k = xc.length) < (l = yc.length) ? k : l;
-
- // Compare digit by digit.
- for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;
-
- // Compare lengths.
- return k == l ? 0 : k > l ^ a ? 1 : -1;
- }
-
-
- /*
- * Check that n is a primitive number, an integer, and in range, otherwise throw.
- */
- function intCheck(n, min, max, name) {
- if (n < min || n > max || n !== mathfloor(n)) {
- throw Error
- (bignumberError + (name || 'Argument') + (typeof n == 'number'
- ? n < min || n > max ? ' out of range: ' : ' not an integer: '
- : ' not a primitive number: ') + String(n));
- }
- }
-
-
- // Assumes finite n.
- function isOdd(n) {
- var k = n.c.length - 1;
- return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;
- }
-
-
- function toExponential(str, e) {
- return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +
- (e < 0 ? 'e' : 'e+') + e;
- }
-
-
- function toFixedPoint(str, e, z) {
- var len, zs;
-
- // Negative exponent?
- if (e < 0) {
-
- // Prepend zeros.
- for (zs = z + '.'; ++e; zs += z);
- str = zs + str;
-
- // Positive exponent
- } else {
- len = str.length;
-
- // Append zeros.
- if (++e > len) {
- for (zs = z, e -= len; --e; zs += z);
- str += zs;
- } else if (e < len) {
- str = str.slice(0, e) + '.' + str.slice(e);
- }
- }
-
- return str;
- }
-
-
- // EXPORT
-
-
- BigNumber = clone();
- BigNumber['default'] = BigNumber.BigNumber = BigNumber;
-
- // AMD.
- if (typeof define == 'function' && define.amd) {
- define(function () { return BigNumber; });
-
- // Node.js and other environments that support module.exports.
- } else if (typeof module != 'undefined' && module.exports) {
- module.exports = BigNumber;
-
- // Browser.
- } else {
- if (!globalObject) {
- globalObject = typeof self != 'undefined' && self ? self : window;
- }
-
- globalObject.BigNumber = BigNumber;
- }
-})(this);
diff --git a/node_modules/bignumber.js/bignumber.min.js b/node_modules/bignumber.js/bignumber.min.js
deleted file mode 100644
index 2610072..0000000
--- a/node_modules/bignumber.js/bignumber.min.js
+++ /dev/null
@@ -1 +0,0 @@
-/* bignumber.js v9.0.0 https://github.com/MikeMcl/bignumber.js/LICENCE */!function(e){"use strict";var r,x=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,L=Math.ceil,U=Math.floor,I="[BigNumber Error] ",T=I+"Number primitive has more than 15 significant digits: ",C=1e14,M=14,G=9007199254740991,k=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],F=1e7,q=1e9;function j(e){var r=0|e;return 0o[s]^n?1:-1;return u==l?0:l(t=e.length)){for(i=n,r-=t;--r;i+=n);e+=i}else ry?c.c=c.e=null:e.ey)c.c=c.e=null;else if(oy?e.c=e.e=null:e.c=n=a.length){if(!t)break e;for(;a.length<=l;a.push(0));u=c=0,s=(o%=M)-M+(i=1)}else{for(u=f=a[l],i=1;10<=f;f/=10,i++);c=(s=(o%=M)-M+i)<0?0:u/h[i-s-1]%10|0}if(t=t||r<0||null!=a[l+1]||(s<0?u:u%h[i-s-1]),t=n<4?(c||t)&&(0==n||n==(e.s<0?3:2)):5y?e.c=e.e=null:e.e>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),r[s]=n[0],r[s+1]=n[1]):(f.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw b=!1,Error(I+"crypto unavailable");for(r=crypto.randomBytes(i*=7);sn-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(e,r,n,t,i){var o,s,f,u,l,c,a,h,g=e.indexOf("."),p=N,w=O;for(0<=g&&(u=E,E=0,e=e.replace(".",""),c=(h=new B(r)).pow(e.length-g),E=u,h.c=m(X($(c.c),c.e,"0"),10,n,d),h.e=h.c.length),f=u=(a=m(e,r,n,i?(o=S,d):(o=d,S))).length;0==a[--u];a.pop());if(!a[0])return o.charAt(0);if(g<0?--f:(c.c=a,c.e=f,c.s=t,a=(c=v(c,h,p,w,n)).c,l=c.r,f=c.e),g=a[s=f+p+1],u=n/2,l=l||s<0||null!=a[s+1],l=w<4?(null!=g||l)&&(0==w||w==(c.s<0?3:2)):un;)a[s]=0,s||(++f,a=[1].concat(a));for(u=a.length;!a[--u];);for(g=0,e="";g<=u;e+=o.charAt(a[g++]));e=X(e,f,o.charAt(0))}return e}}(),v=function(){function S(e,r,n){var t,i,o,s,f=0,u=e.length,l=r%F,c=r/F|0;for(e=e.slice();u--;)f=((i=l*(o=e[u]%F)+(t=c*o+(s=e[u]/F|0)*l)%F*F+f)/n|0)+(t/F|0)+c*s,e[u]=i%n;return f&&(e=[f].concat(e)),e}function R(e,r,n,t){var i,o;if(n!=t)o=tr[i]?1:-1;break}return o}function _(e,r,n,t){for(var i=0;n--;)e[n]-=i,i=e[n](E[f]||0)&&s--,b<0)g.push(1),u=!0;else{for(v=E.length,O=A.length,b+=2,1<(l=U(i/(A[f=0]+1)))&&(A=S(A,l,i),E=S(E,l,i),O=A.length,v=E.length),m=O,w=(p=E.slice(0,O)).length;w=i/2&&N++;do{if(l=0,(o=R(A,p,O,w))<0){if(d=p[0],O!=w&&(d=d*i+(p[1]||0)),1<(l=U(d/N)))for(i<=l&&(l=i-1),a=(c=S(A,l,i)).length,w=p.length;1==R(c,p,a,w);)l--,_(c,Oo&&(l.c.length=o):t&&(l=l.mod(r))}if(i){if(0===(i=U(i/2)))break;u=i%2}else if(D(e=e.times(n),e.e+1,1),14o&&(c.c.length=o):t&&(c=c.mod(r))}return t?l:(f&&(l=w.div(l)),r?l.mod(r):o?D(l,E,O,void 0):l)},t.integerValue=function(e){var r=new B(this);return null==e?e=O:H(e,0,8),D(r,r.e+1,e)},t.isEqualTo=t.eq=function(e,r){return 0===z(this,new B(e,r))},t.isFinite=function(){return!!this.c},t.isGreaterThan=t.gt=function(e,r){return 0this.c.length-2},t.isLessThan=t.lt=function(e,r){return z(this,new B(e,r))<0},t.isLessThanOrEqualTo=t.lte=function(e,r){return-1===(r=z(this,new B(e,r)))||0===r},t.isNaN=function(){return!this.s},t.isNegative=function(){return this.s<0},t.isPositive=function(){return 0t&&(t=this.e+1),t},t.shiftedBy=function(e){return H(e,-G,G),this.times("1e"+e)},t.squareRoot=t.sqrt=function(){var e,r,n,t,i,o=this,s=o.c,f=o.s,u=o.e,l=N+4,c=new B("0.5");if(1!==f||!s||!s[0])return new B(!f||f<0&&(!s||s[0])?NaN:s?o:1/0);if((n=0==(f=Math.sqrt(+P(o)))||f==1/0?(((r=$(s)).length+u)%2==0&&(r+="0"),f=Math.sqrt(+r),u=j((u+1)/2)-(u<0||u%2),new B(r=f==1/0?"1e"+u:(r=f.toExponential()).slice(0,r.indexOf("e")+1)+u)):new B(f+"")).c[0])for((f=(u=n.e)+l)<3&&(f=0);;)if(i=n,n=c.times(i.plus(v(o,i,l,1))),$(i.c).slice(0,f)===(r=$(n.c)).slice(0,f)){if(n.e
- * MIT Licensed.
- *
- * BigNumber.prototype methods | BigNumber methods
- * |
- * absoluteValue abs | clone
- * comparedTo | config set
- * decimalPlaces dp | DECIMAL_PLACES
- * dividedBy div | ROUNDING_MODE
- * dividedToIntegerBy idiv | EXPONENTIAL_AT
- * exponentiatedBy pow | RANGE
- * integerValue | CRYPTO
- * isEqualTo eq | MODULO_MODE
- * isFinite | POW_PRECISION
- * isGreaterThan gt | FORMAT
- * isGreaterThanOrEqualTo gte | ALPHABET
- * isInteger | isBigNumber
- * isLessThan lt | maximum max
- * isLessThanOrEqualTo lte | minimum min
- * isNaN | random
- * isNegative | sum
- * isPositive |
- * isZero |
- * minus |
- * modulo mod |
- * multipliedBy times |
- * negated |
- * plus |
- * precision sd |
- * shiftedBy |
- * squareRoot sqrt |
- * toExponential |
- * toFixed |
- * toFormat |
- * toFraction |
- * toJSON |
- * toNumber |
- * toPrecision |
- * toString |
- * valueOf |
- *
- */
-
-
-var
- isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,
-
- mathceil = Math.ceil,
- mathfloor = Math.floor,
-
- bignumberError = '[BigNumber Error] ',
- tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',
-
- BASE = 1e14,
- LOG_BASE = 14,
- MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1
- // MAX_INT32 = 0x7fffffff, // 2^31 - 1
- POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],
- SQRT_BASE = 1e7,
-
- // EDITABLE
- // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and
- // the arguments to toExponential, toFixed, toFormat, and toPrecision.
- MAX = 1E9; // 0 to MAX_INT32
-
-
-/*
- * Create and return a BigNumber constructor.
- */
-function clone(configObject) {
- var div, convertBase, parseNumeric,
- P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },
- ONE = new BigNumber(1),
-
-
- //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------
-
-
- // The default values below must be integers within the inclusive ranges stated.
- // The values can also be changed at run-time using BigNumber.set.
-
- // The maximum number of decimal places for operations involving division.
- DECIMAL_PLACES = 20, // 0 to MAX
-
- // The rounding mode used when rounding to the above decimal places, and when using
- // toExponential, toFixed, toFormat and toPrecision, and round (default value).
- // UP 0 Away from zero.
- // DOWN 1 Towards zero.
- // CEIL 2 Towards +Infinity.
- // FLOOR 3 Towards -Infinity.
- // HALF_UP 4 Towards nearest neighbour. If equidistant, up.
- // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
- // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
- // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
- // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
- ROUNDING_MODE = 4, // 0 to 8
-
- // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]
-
- // The exponent value at and beneath which toString returns exponential notation.
- // Number type: -7
- TO_EXP_NEG = -7, // 0 to -MAX
-
- // The exponent value at and above which toString returns exponential notation.
- // Number type: 21
- TO_EXP_POS = 21, // 0 to MAX
-
- // RANGE : [MIN_EXP, MAX_EXP]
-
- // The minimum exponent value, beneath which underflow to zero occurs.
- // Number type: -324 (5e-324)
- MIN_EXP = -1e7, // -1 to -MAX
-
- // The maximum exponent value, above which overflow to Infinity occurs.
- // Number type: 308 (1.7976931348623157e+308)
- // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.
- MAX_EXP = 1e7, // 1 to MAX
-
- // Whether to use cryptographically-secure random number generation, if available.
- CRYPTO = false, // true or false
-
- // The modulo mode used when calculating the modulus: a mod n.
- // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
- // The remainder (r) is calculated as: r = a - n * q.
- //
- // UP 0 The remainder is positive if the dividend is negative, else is negative.
- // DOWN 1 The remainder has the same sign as the dividend.
- // This modulo mode is commonly known as 'truncated division' and is
- // equivalent to (a % n) in JavaScript.
- // FLOOR 3 The remainder has the same sign as the divisor (Python %).
- // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.
- // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).
- // The remainder is always positive.
- //
- // The truncated division, floored division, Euclidian division and IEEE 754 remainder
- // modes are commonly used for the modulus operation.
- // Although the other rounding modes can also be used, they may not give useful results.
- MODULO_MODE = 1, // 0 to 9
-
- // The maximum number of significant digits of the result of the exponentiatedBy operation.
- // If POW_PRECISION is 0, there will be unlimited significant digits.
- POW_PRECISION = 0, // 0 to MAX
-
- // The format specification used by the BigNumber.prototype.toFormat method.
- FORMAT = {
- prefix: '',
- groupSize: 3,
- secondaryGroupSize: 0,
- groupSeparator: ',',
- decimalSeparator: '.',
- fractionGroupSize: 0,
- fractionGroupSeparator: '\xA0', // non-breaking space
- suffix: ''
- },
-
- // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',
- // '-', '.', whitespace, or repeated character.
- // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
- ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz';
-
-
- //------------------------------------------------------------------------------------------
-
-
- // CONSTRUCTOR
-
-
- /*
- * The BigNumber constructor and exported function.
- * Create and return a new instance of a BigNumber object.
- *
- * v {number|string|BigNumber} A numeric value.
- * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.
- */
- function BigNumber(v, b) {
- var alphabet, c, caseChanged, e, i, isNum, len, str,
- x = this;
-
- // Enable constructor call without `new`.
- if (!(x instanceof BigNumber)) return new BigNumber(v, b);
-
- if (b == null) {
-
- if (v && v._isBigNumber === true) {
- x.s = v.s;
-
- if (!v.c || v.e > MAX_EXP) {
- x.c = x.e = null;
- } else if (v.e < MIN_EXP) {
- x.c = [x.e = 0];
- } else {
- x.e = v.e;
- x.c = v.c.slice();
- }
-
- return;
- }
-
- if ((isNum = typeof v == 'number') && v * 0 == 0) {
-
- // Use `1 / n` to handle minus zero also.
- x.s = 1 / v < 0 ? (v = -v, -1) : 1;
-
- // Fast path for integers, where n < 2147483648 (2**31).
- if (v === ~~v) {
- for (e = 0, i = v; i >= 10; i /= 10, e++);
-
- if (e > MAX_EXP) {
- x.c = x.e = null;
- } else {
- x.e = e;
- x.c = [v];
- }
-
- return;
- }
-
- str = String(v);
- } else {
-
- if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);
-
- x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
- }
-
- // Decimal point?
- if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
-
- // Exponential form?
- if ((i = str.search(/e/i)) > 0) {
-
- // Determine exponent.
- if (e < 0) e = i;
- e += +str.slice(i + 1);
- str = str.substring(0, i);
- } else if (e < 0) {
-
- // Integer.
- e = str.length;
- }
-
- } else {
-
- // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'
- intCheck(b, 2, ALPHABET.length, 'Base');
-
- // Allow exponential notation to be used with base 10 argument, while
- // also rounding to DECIMAL_PLACES as with other bases.
- if (b == 10) {
- x = new BigNumber(v);
- return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
- }
-
- str = String(v);
-
- if (isNum = typeof v == 'number') {
-
- // Avoid potential interpretation of Infinity and NaN as base 44+ values.
- if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
-
- x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
-
- // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'
- if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) {
- throw Error
- (tooManyDigits + v);
- }
- } else {
- x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
- }
-
- alphabet = ALPHABET.slice(0, b);
- e = i = 0;
-
- // Check that str is a valid base b number.
- // Don't use RegExp, so alphabet can contain special characters.
- for (len = str.length; i < len; i++) {
- if (alphabet.indexOf(c = str.charAt(i)) < 0) {
- if (c == '.') {
-
- // If '.' is not the first character and it has not be found before.
- if (i > e) {
- e = len;
- continue;
- }
- } else if (!caseChanged) {
-
- // Allow e.g. hexadecimal 'FF' as well as 'ff'.
- if (str == str.toUpperCase() && (str = str.toLowerCase()) ||
- str == str.toLowerCase() && (str = str.toUpperCase())) {
- caseChanged = true;
- i = -1;
- e = 0;
- continue;
- }
- }
-
- return parseNumeric(x, String(v), isNum, b);
- }
- }
-
- // Prevent later check for length on converted number.
- isNum = false;
- str = convertBase(str, b, 10, x.s);
-
- // Decimal point?
- if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
- else e = str.length;
- }
-
- // Determine leading zeros.
- for (i = 0; str.charCodeAt(i) === 48; i++);
-
- // Determine trailing zeros.
- for (len = str.length; str.charCodeAt(--len) === 48;);
-
- if (str = str.slice(i, ++len)) {
- len -= i;
-
- // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'
- if (isNum && BigNumber.DEBUG &&
- len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
- throw Error
- (tooManyDigits + (x.s * v));
- }
-
- // Overflow?
- if ((e = e - i - 1) > MAX_EXP) {
-
- // Infinity.
- x.c = x.e = null;
-
- // Underflow?
- } else if (e < MIN_EXP) {
-
- // Zero.
- x.c = [x.e = 0];
- } else {
- x.e = e;
- x.c = [];
-
- // Transform base
-
- // e is the base 10 exponent.
- // i is where to slice str to get the first element of the coefficient array.
- i = (e + 1) % LOG_BASE;
- if (e < 0) i += LOG_BASE; // i < 1
-
- if (i < len) {
- if (i) x.c.push(+str.slice(0, i));
-
- for (len -= LOG_BASE; i < len;) {
- x.c.push(+str.slice(i, i += LOG_BASE));
- }
-
- i = LOG_BASE - (str = str.slice(i)).length;
- } else {
- i -= len;
- }
-
- for (; i--; str += '0');
- x.c.push(+str);
- }
- } else {
-
- // Zero.
- x.c = [x.e = 0];
- }
- }
-
-
- // CONSTRUCTOR PROPERTIES
-
-
- BigNumber.clone = clone;
-
- BigNumber.ROUND_UP = 0;
- BigNumber.ROUND_DOWN = 1;
- BigNumber.ROUND_CEIL = 2;
- BigNumber.ROUND_FLOOR = 3;
- BigNumber.ROUND_HALF_UP = 4;
- BigNumber.ROUND_HALF_DOWN = 5;
- BigNumber.ROUND_HALF_EVEN = 6;
- BigNumber.ROUND_HALF_CEIL = 7;
- BigNumber.ROUND_HALF_FLOOR = 8;
- BigNumber.EUCLID = 9;
-
-
- /*
- * Configure infrequently-changing library-wide settings.
- *
- * Accept an object with the following optional properties (if the value of a property is
- * a number, it must be an integer within the inclusive range stated):
- *
- * DECIMAL_PLACES {number} 0 to MAX
- * ROUNDING_MODE {number} 0 to 8
- * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]
- * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]
- * CRYPTO {boolean} true or false
- * MODULO_MODE {number} 0 to 9
- * POW_PRECISION {number} 0 to MAX
- * ALPHABET {string} A string of two or more unique characters which does
- * not contain '.'.
- * FORMAT {object} An object with some of the following properties:
- * prefix {string}
- * groupSize {number}
- * secondaryGroupSize {number}
- * groupSeparator {string}
- * decimalSeparator {string}
- * fractionGroupSize {number}
- * fractionGroupSeparator {string}
- * suffix {string}
- *
- * (The values assigned to the above FORMAT object properties are not checked for validity.)
- *
- * E.g.
- * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })
- *
- * Ignore properties/parameters set to null or undefined, except for ALPHABET.
- *
- * Return an object with the properties current values.
- */
- BigNumber.config = BigNumber.set = function (obj) {
- var p, v;
-
- if (obj != null) {
-
- if (typeof obj == 'object') {
-
- // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.
- // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {
- v = obj[p];
- intCheck(v, 0, MAX, p);
- DECIMAL_PLACES = v;
- }
-
- // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.
- // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {
- v = obj[p];
- intCheck(v, 0, 8, p);
- ROUNDING_MODE = v;
- }
-
- // EXPONENTIAL_AT {number|number[]}
- // Integer, -MAX to MAX inclusive or
- // [integer -MAX to 0 inclusive, 0 to MAX inclusive].
- // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {
- v = obj[p];
- if (v && v.pop) {
- intCheck(v[0], -MAX, 0, p);
- intCheck(v[1], 0, MAX, p);
- TO_EXP_NEG = v[0];
- TO_EXP_POS = v[1];
- } else {
- intCheck(v, -MAX, MAX, p);
- TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
- }
- }
-
- // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or
- // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].
- // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'
- if (obj.hasOwnProperty(p = 'RANGE')) {
- v = obj[p];
- if (v && v.pop) {
- intCheck(v[0], -MAX, -1, p);
- intCheck(v[1], 1, MAX, p);
- MIN_EXP = v[0];
- MAX_EXP = v[1];
- } else {
- intCheck(v, -MAX, MAX, p);
- if (v) {
- MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
- } else {
- throw Error
- (bignumberError + p + ' cannot be zero: ' + v);
- }
- }
- }
-
- // CRYPTO {boolean} true or false.
- // '[BigNumber Error] CRYPTO not true or false: {v}'
- // '[BigNumber Error] crypto unavailable'
- if (obj.hasOwnProperty(p = 'CRYPTO')) {
- v = obj[p];
- if (v === !!v) {
- if (v) {
- if (typeof crypto != 'undefined' && crypto &&
- (crypto.getRandomValues || crypto.randomBytes)) {
- CRYPTO = v;
- } else {
- CRYPTO = !v;
- throw Error
- (bignumberError + 'crypto unavailable');
- }
- } else {
- CRYPTO = v;
- }
- } else {
- throw Error
- (bignumberError + p + ' not true or false: ' + v);
- }
- }
-
- // MODULO_MODE {number} Integer, 0 to 9 inclusive.
- // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'MODULO_MODE')) {
- v = obj[p];
- intCheck(v, 0, 9, p);
- MODULO_MODE = v;
- }
-
- // POW_PRECISION {number} Integer, 0 to MAX inclusive.
- // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'
- if (obj.hasOwnProperty(p = 'POW_PRECISION')) {
- v = obj[p];
- intCheck(v, 0, MAX, p);
- POW_PRECISION = v;
- }
-
- // FORMAT {object}
- // '[BigNumber Error] FORMAT not an object: {v}'
- if (obj.hasOwnProperty(p = 'FORMAT')) {
- v = obj[p];
- if (typeof v == 'object') FORMAT = v;
- else throw Error
- (bignumberError + p + ' not an object: ' + v);
- }
-
- // ALPHABET {string}
- // '[BigNumber Error] ALPHABET invalid: {v}'
- if (obj.hasOwnProperty(p = 'ALPHABET')) {
- v = obj[p];
-
- // Disallow if only one character,
- // or if it contains '+', '-', '.', whitespace, or a repeated character.
- if (typeof v == 'string' && !/^.$|[+-.\s]|(.).*\1/.test(v)) {
- ALPHABET = v;
- } else {
- throw Error
- (bignumberError + p + ' invalid: ' + v);
- }
- }
-
- } else {
-
- // '[BigNumber Error] Object expected: {v}'
- throw Error
- (bignumberError + 'Object expected: ' + obj);
- }
- }
-
- return {
- DECIMAL_PLACES: DECIMAL_PLACES,
- ROUNDING_MODE: ROUNDING_MODE,
- EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],
- RANGE: [MIN_EXP, MAX_EXP],
- CRYPTO: CRYPTO,
- MODULO_MODE: MODULO_MODE,
- POW_PRECISION: POW_PRECISION,
- FORMAT: FORMAT,
- ALPHABET: ALPHABET
- };
- };
-
-
- /*
- * Return true if v is a BigNumber instance, otherwise return false.
- *
- * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.
- *
- * v {any}
- *
- * '[BigNumber Error] Invalid BigNumber: {v}'
- */
- BigNumber.isBigNumber = function (v) {
- if (!v || v._isBigNumber !== true) return false;
- if (!BigNumber.DEBUG) return true;
-
- var i, n,
- c = v.c,
- e = v.e,
- s = v.s;
-
- out: if ({}.toString.call(c) == '[object Array]') {
-
- if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
-
- // If the first element is zero, the BigNumber value must be zero.
- if (c[0] === 0) {
- if (e === 0 && c.length === 1) return true;
- break out;
- }
-
- // Calculate number of digits that c[0] should have, based on the exponent.
- i = (e + 1) % LOG_BASE;
- if (i < 1) i += LOG_BASE;
-
- // Calculate number of digits of c[0].
- //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {
- if (String(c[0]).length == i) {
-
- for (i = 0; i < c.length; i++) {
- n = c[i];
- if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;
- }
-
- // Last element cannot be zero, unless it is the only element.
- if (n !== 0) return true;
- }
- }
-
- // Infinity/NaN
- } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {
- return true;
- }
-
- throw Error
- (bignumberError + 'Invalid BigNumber: ' + v);
- };
-
-
- /*
- * Return a new BigNumber whose value is the maximum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.maximum = BigNumber.max = function () {
- return maxOrMin(arguments, P.lt);
- };
-
-
- /*
- * Return a new BigNumber whose value is the minimum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.minimum = BigNumber.min = function () {
- return maxOrMin(arguments, P.gt);
- };
-
-
- /*
- * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,
- * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing
- * zeros are produced).
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'
- * '[BigNumber Error] crypto unavailable'
- */
- BigNumber.random = (function () {
- var pow2_53 = 0x20000000000000;
-
- // Return a 53 bit integer n, where 0 <= n < 9007199254740992.
- // Check if Math.random() produces more than 32 bits of randomness.
- // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.
- // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.
- var random53bitInt = (Math.random() * pow2_53) & 0x1fffff
- ? function () { return mathfloor(Math.random() * pow2_53); }
- : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +
- (Math.random() * 0x800000 | 0); };
-
- return function (dp) {
- var a, b, e, k, v,
- i = 0,
- c = [],
- rand = new BigNumber(ONE);
-
- if (dp == null) dp = DECIMAL_PLACES;
- else intCheck(dp, 0, MAX);
-
- k = mathceil(dp / LOG_BASE);
-
- if (CRYPTO) {
-
- // Browsers supporting crypto.getRandomValues.
- if (crypto.getRandomValues) {
-
- a = crypto.getRandomValues(new Uint32Array(k *= 2));
-
- for (; i < k;) {
-
- // 53 bits:
- // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)
- // 11111 11111111 11111111 11111111 11100000 00000000 00000000
- // ((Math.pow(2, 32) - 1) >>> 11).toString(2)
- // 11111 11111111 11111111
- // 0x20000 is 2^21.
- v = a[i] * 0x20000 + (a[i + 1] >>> 11);
-
- // Rejection sampling:
- // 0 <= v < 9007199254740992
- // Probability that v >= 9e15, is
- // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251
- if (v >= 9e15) {
- b = crypto.getRandomValues(new Uint32Array(2));
- a[i] = b[0];
- a[i + 1] = b[1];
- } else {
-
- // 0 <= v <= 8999999999999999
- // 0 <= (v % 1e14) <= 99999999999999
- c.push(v % 1e14);
- i += 2;
- }
- }
- i = k / 2;
-
- // Node.js supporting crypto.randomBytes.
- } else if (crypto.randomBytes) {
-
- // buffer
- a = crypto.randomBytes(k *= 7);
-
- for (; i < k;) {
-
- // 0x1000000000000 is 2^48, 0x10000000000 is 2^40
- // 0x100000000 is 2^32, 0x1000000 is 2^24
- // 11111 11111111 11111111 11111111 11111111 11111111 11111111
- // 0 <= v < 9007199254740992
- v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +
- (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +
- (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
-
- if (v >= 9e15) {
- crypto.randomBytes(7).copy(a, i);
- } else {
-
- // 0 <= (v % 1e14) <= 99999999999999
- c.push(v % 1e14);
- i += 7;
- }
- }
- i = k / 7;
- } else {
- CRYPTO = false;
- throw Error
- (bignumberError + 'crypto unavailable');
- }
- }
-
- // Use Math.random.
- if (!CRYPTO) {
-
- for (; i < k;) {
- v = random53bitInt();
- if (v < 9e15) c[i++] = v % 1e14;
- }
- }
-
- k = c[--i];
- dp %= LOG_BASE;
-
- // Convert trailing digits to zeros according to dp.
- if (k && dp) {
- v = POWS_TEN[LOG_BASE - dp];
- c[i] = mathfloor(k / v) * v;
- }
-
- // Remove trailing elements which are zero.
- for (; c[i] === 0; c.pop(), i--);
-
- // Zero?
- if (i < 0) {
- c = [e = 0];
- } else {
-
- // Remove leading elements which are zero and adjust exponent accordingly.
- for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);
-
- // Count the digits of the first element of c to determine leading zeros, and...
- for (i = 1, v = c[0]; v >= 10; v /= 10, i++);
-
- // adjust the exponent accordingly.
- if (i < LOG_BASE) e -= LOG_BASE - i;
- }
-
- rand.e = e;
- rand.c = c;
- return rand;
- };
- })();
-
-
- /*
- * Return a BigNumber whose value is the sum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.sum = function () {
- var i = 1,
- args = arguments,
- sum = new BigNumber(args[0]);
- for (; i < args.length;) sum = sum.plus(args[i++]);
- return sum;
- };
-
-
- // PRIVATE FUNCTIONS
-
-
- // Called by BigNumber and BigNumber.prototype.toString.
- convertBase = (function () {
- var decimal = '0123456789';
-
- /*
- * Convert string of baseIn to an array of numbers of baseOut.
- * Eg. toBaseOut('255', 10, 16) returns [15, 15].
- * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].
- */
- function toBaseOut(str, baseIn, baseOut, alphabet) {
- var j,
- arr = [0],
- arrL,
- i = 0,
- len = str.length;
-
- for (; i < len;) {
- for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);
-
- arr[0] += alphabet.indexOf(str.charAt(i++));
-
- for (j = 0; j < arr.length; j++) {
-
- if (arr[j] > baseOut - 1) {
- if (arr[j + 1] == null) arr[j + 1] = 0;
- arr[j + 1] += arr[j] / baseOut | 0;
- arr[j] %= baseOut;
- }
- }
- }
-
- return arr.reverse();
- }
-
- // Convert a numeric string of baseIn to a numeric string of baseOut.
- // If the caller is toString, we are converting from base 10 to baseOut.
- // If the caller is BigNumber, we are converting from baseIn to base 10.
- return function (str, baseIn, baseOut, sign, callerIsToString) {
- var alphabet, d, e, k, r, x, xc, y,
- i = str.indexOf('.'),
- dp = DECIMAL_PLACES,
- rm = ROUNDING_MODE;
-
- // Non-integer.
- if (i >= 0) {
- k = POW_PRECISION;
-
- // Unlimited precision.
- POW_PRECISION = 0;
- str = str.replace('.', '');
- y = new BigNumber(baseIn);
- x = y.pow(str.length - i);
- POW_PRECISION = k;
-
- // Convert str as if an integer, then restore the fraction part by dividing the
- // result by its base raised to a power.
-
- y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),
- 10, baseOut, decimal);
- y.e = y.c.length;
- }
-
- // Convert the number as integer.
-
- xc = toBaseOut(str, baseIn, baseOut, callerIsToString
- ? (alphabet = ALPHABET, decimal)
- : (alphabet = decimal, ALPHABET));
-
- // xc now represents str as an integer and converted to baseOut. e is the exponent.
- e = k = xc.length;
-
- // Remove trailing zeros.
- for (; xc[--k] == 0; xc.pop());
-
- // Zero?
- if (!xc[0]) return alphabet.charAt(0);
-
- // Does str represent an integer? If so, no need for the division.
- if (i < 0) {
- --e;
- } else {
- x.c = xc;
- x.e = e;
-
- // The sign is needed for correct rounding.
- x.s = sign;
- x = div(x, y, dp, rm, baseOut);
- xc = x.c;
- r = x.r;
- e = x.e;
- }
-
- // xc now represents str converted to baseOut.
-
- // THe index of the rounding digit.
- d = e + dp + 1;
-
- // The rounding digit: the digit to the right of the digit that may be rounded up.
- i = xc[d];
-
- // Look at the rounding digits and mode to determine whether to round up.
-
- k = baseOut / 2;
- r = r || d < 0 || xc[d + 1] != null;
-
- r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
- : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||
- rm == (x.s < 0 ? 8 : 7));
-
- // If the index of the rounding digit is not greater than zero, or xc represents
- // zero, then the result of the base conversion is zero or, if rounding up, a value
- // such as 0.00001.
- if (d < 1 || !xc[0]) {
-
- // 1^-dp or 0
- str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
- } else {
-
- // Truncate xc to the required number of decimal places.
- xc.length = d;
-
- // Round up?
- if (r) {
-
- // Rounding up may mean the previous digit has to be rounded up and so on.
- for (--baseOut; ++xc[--d] > baseOut;) {
- xc[d] = 0;
-
- if (!d) {
- ++e;
- xc = [1].concat(xc);
- }
- }
- }
-
- // Determine trailing zeros.
- for (k = xc.length; !xc[--k];);
-
- // E.g. [4, 11, 15] becomes 4bf.
- for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));
-
- // Add leading zeros, decimal point and trailing zeros as required.
- str = toFixedPoint(str, e, alphabet.charAt(0));
- }
-
- // The caller will add the sign.
- return str;
- };
- })();
-
-
- // Perform division in the specified base. Called by div and convertBase.
- div = (function () {
-
- // Assume non-zero x and k.
- function multiply(x, k, base) {
- var m, temp, xlo, xhi,
- carry = 0,
- i = x.length,
- klo = k % SQRT_BASE,
- khi = k / SQRT_BASE | 0;
-
- for (x = x.slice(); i--;) {
- xlo = x[i] % SQRT_BASE;
- xhi = x[i] / SQRT_BASE | 0;
- m = khi * xlo + xhi * klo;
- temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;
- carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;
- x[i] = temp % base;
- }
-
- if (carry) x = [carry].concat(x);
-
- return x;
- }
-
- function compare(a, b, aL, bL) {
- var i, cmp;
-
- if (aL != bL) {
- cmp = aL > bL ? 1 : -1;
- } else {
-
- for (i = cmp = 0; i < aL; i++) {
-
- if (a[i] != b[i]) {
- cmp = a[i] > b[i] ? 1 : -1;
- break;
- }
- }
- }
-
- return cmp;
- }
-
- function subtract(a, b, aL, base) {
- var i = 0;
-
- // Subtract b from a.
- for (; aL--;) {
- a[aL] -= i;
- i = a[aL] < b[aL] ? 1 : 0;
- a[aL] = i * base + a[aL] - b[aL];
- }
-
- // Remove leading zeros.
- for (; !a[0] && a.length > 1; a.splice(0, 1));
- }
-
- // x: dividend, y: divisor.
- return function (x, y, dp, rm, base) {
- var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,
- yL, yz,
- s = x.s == y.s ? 1 : -1,
- xc = x.c,
- yc = y.c;
-
- // Either NaN, Infinity or 0?
- if (!xc || !xc[0] || !yc || !yc[0]) {
-
- return new BigNumber(
-
- // Return NaN if either NaN, or both Infinity or 0.
- !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :
-
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
- xc && xc[0] == 0 || !yc ? s * 0 : s / 0
- );
- }
-
- q = new BigNumber(s);
- qc = q.c = [];
- e = x.e - y.e;
- s = dp + e + 1;
-
- if (!base) {
- base = BASE;
- e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);
- s = s / LOG_BASE | 0;
- }
-
- // Result exponent may be one less then the current value of e.
- // The coefficients of the BigNumbers from convertBase may have trailing zeros.
- for (i = 0; yc[i] == (xc[i] || 0); i++);
-
- if (yc[i] > (xc[i] || 0)) e--;
-
- if (s < 0) {
- qc.push(1);
- more = true;
- } else {
- xL = xc.length;
- yL = yc.length;
- i = 0;
- s += 2;
-
- // Normalise xc and yc so highest order digit of yc is >= base / 2.
-
- n = mathfloor(base / (yc[0] + 1));
-
- // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.
- // if (n > 1 || n++ == 1 && yc[0] < base / 2) {
- if (n > 1) {
- yc = multiply(yc, n, base);
- xc = multiply(xc, n, base);
- yL = yc.length;
- xL = xc.length;
- }
-
- xi = yL;
- rem = xc.slice(0, yL);
- remL = rem.length;
-
- // Add zeros to make remainder as long as divisor.
- for (; remL < yL; rem[remL++] = 0);
- yz = yc.slice();
- yz = [0].concat(yz);
- yc0 = yc[0];
- if (yc[1] >= base / 2) yc0++;
- // Not necessary, but to prevent trial digit n > base, when using base 3.
- // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;
-
- do {
- n = 0;
-
- // Compare divisor and remainder.
- cmp = compare(yc, rem, yL, remL);
-
- // If divisor < remainder.
- if (cmp < 0) {
-
- // Calculate trial digit, n.
-
- rem0 = rem[0];
- if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
-
- // n is how many times the divisor goes into the current remainder.
- n = mathfloor(rem0 / yc0);
-
- // Algorithm:
- // product = divisor multiplied by trial digit (n).
- // Compare product and remainder.
- // If product is greater than remainder:
- // Subtract divisor from product, decrement trial digit.
- // Subtract product from remainder.
- // If product was less than remainder at the last compare:
- // Compare new remainder and divisor.
- // If remainder is greater than divisor:
- // Subtract divisor from remainder, increment trial digit.
-
- if (n > 1) {
-
- // n may be > base only when base is 3.
- if (n >= base) n = base - 1;
-
- // product = divisor * trial digit.
- prod = multiply(yc, n, base);
- prodL = prod.length;
- remL = rem.length;
-
- // Compare product and remainder.
- // If product > remainder then trial digit n too high.
- // n is 1 too high about 5% of the time, and is not known to have
- // ever been more than 1 too high.
- while (compare(prod, rem, prodL, remL) == 1) {
- n--;
-
- // Subtract divisor from product.
- subtract(prod, yL < prodL ? yz : yc, prodL, base);
- prodL = prod.length;
- cmp = 1;
- }
- } else {
-
- // n is 0 or 1, cmp is -1.
- // If n is 0, there is no need to compare yc and rem again below,
- // so change cmp to 1 to avoid it.
- // If n is 1, leave cmp as -1, so yc and rem are compared again.
- if (n == 0) {
-
- // divisor < remainder, so n must be at least 1.
- cmp = n = 1;
- }
-
- // product = divisor
- prod = yc.slice();
- prodL = prod.length;
- }
-
- if (prodL < remL) prod = [0].concat(prod);
-
- // Subtract product from remainder.
- subtract(rem, prod, remL, base);
- remL = rem.length;
-
- // If product was < remainder.
- if (cmp == -1) {
-
- // Compare divisor and new remainder.
- // If divisor < new remainder, subtract divisor from remainder.
- // Trial digit n too low.
- // n is 1 too low about 5% of the time, and very rarely 2 too low.
- while (compare(yc, rem, yL, remL) < 1) {
- n++;
-
- // Subtract divisor from remainder.
- subtract(rem, yL < remL ? yz : yc, remL, base);
- remL = rem.length;
- }
- }
- } else if (cmp === 0) {
- n++;
- rem = [0];
- } // else cmp === 1 and n will be 0
-
- // Add the next digit, n, to the result array.
- qc[i++] = n;
-
- // Update the remainder.
- if (rem[0]) {
- rem[remL++] = xc[xi] || 0;
- } else {
- rem = [xc[xi]];
- remL = 1;
- }
- } while ((xi++ < xL || rem[0] != null) && s--);
-
- more = rem[0] != null;
-
- // Leading zero?
- if (!qc[0]) qc.splice(0, 1);
- }
-
- if (base == BASE) {
-
- // To calculate q.e, first get the number of digits of qc[0].
- for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);
-
- round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);
-
- // Caller is convertBase.
- } else {
- q.e = e;
- q.r = +more;
- }
-
- return q;
- };
- })();
-
-
- /*
- * Return a string representing the value of BigNumber n in fixed-point or exponential
- * notation rounded to the specified decimal places or significant digits.
- *
- * n: a BigNumber.
- * i: the index of the last digit required (i.e. the digit that may be rounded up).
- * rm: the rounding mode.
- * id: 1 (toExponential) or 2 (toPrecision).
- */
- function format(n, i, rm, id) {
- var c0, e, ne, len, str;
-
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
-
- if (!n.c) return n.toString();
-
- c0 = n.c[0];
- ne = n.e;
-
- if (i == null) {
- str = coeffToString(n.c);
- str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)
- ? toExponential(str, ne)
- : toFixedPoint(str, ne, '0');
- } else {
- n = round(new BigNumber(n), i, rm);
-
- // n.e may have changed if the value was rounded up.
- e = n.e;
-
- str = coeffToString(n.c);
- len = str.length;
-
- // toPrecision returns exponential notation if the number of significant digits
- // specified is less than the number of digits necessary to represent the integer
- // part of the value in fixed-point notation.
-
- // Exponential notation.
- if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {
-
- // Append zeros?
- for (; len < i; str += '0', len++);
- str = toExponential(str, e);
-
- // Fixed-point notation.
- } else {
- i -= ne;
- str = toFixedPoint(str, e, '0');
-
- // Append zeros?
- if (e + 1 > len) {
- if (--i > 0) for (str += '.'; i--; str += '0');
- } else {
- i += e - len;
- if (i > 0) {
- if (e + 1 == len) str += '.';
- for (; i--; str += '0');
- }
- }
- }
- }
-
- return n.s < 0 && c0 ? '-' + str : str;
- }
-
-
- // Handle BigNumber.max and BigNumber.min.
- function maxOrMin(args, method) {
- var n,
- i = 1,
- m = new BigNumber(args[0]);
-
- for (; i < args.length; i++) {
- n = new BigNumber(args[i]);
-
- // If any number is NaN, return NaN.
- if (!n.s) {
- m = n;
- break;
- } else if (method.call(m, n)) {
- m = n;
- }
- }
-
- return m;
- }
-
-
- /*
- * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.
- * Called by minus, plus and times.
- */
- function normalise(n, c, e) {
- var i = 1,
- j = c.length;
-
- // Remove trailing zeros.
- for (; !c[--j]; c.pop());
-
- // Calculate the base 10 exponent. First get the number of digits of c[0].
- for (j = c[0]; j >= 10; j /= 10, i++);
-
- // Overflow?
- if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {
-
- // Infinity.
- n.c = n.e = null;
-
- // Underflow?
- } else if (e < MIN_EXP) {
-
- // Zero.
- n.c = [n.e = 0];
- } else {
- n.e = e;
- n.c = c;
- }
-
- return n;
- }
-
-
- // Handle values that fail the validity test in BigNumber.
- parseNumeric = (function () {
- var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i,
- dotAfter = /^([^.]+)\.$/,
- dotBefore = /^\.([^.]+)$/,
- isInfinityOrNaN = /^-?(Infinity|NaN)$/,
- whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
-
- return function (x, str, isNum, b) {
- var base,
- s = isNum ? str : str.replace(whitespaceOrPlus, '');
-
- // No exception on ±Infinity or NaN.
- if (isInfinityOrNaN.test(s)) {
- x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
- } else {
- if (!isNum) {
-
- // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i
- s = s.replace(basePrefix, function (m, p1, p2) {
- base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;
- return !b || b == base ? p1 : m;
- });
-
- if (b) {
- base = b;
-
- // E.g. '1.' to '1', '.1' to '0.1'
- s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');
- }
-
- if (str != s) return new BigNumber(s, base);
- }
-
- // '[BigNumber Error] Not a number: {n}'
- // '[BigNumber Error] Not a base {b} number: {n}'
- if (BigNumber.DEBUG) {
- throw Error
- (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);
- }
-
- // NaN
- x.s = null;
- }
-
- x.c = x.e = null;
- }
- })();
-
-
- /*
- * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.
- * If r is truthy, it is known that there are more digits after the rounding digit.
- */
- function round(x, sd, rm, r) {
- var d, i, j, k, n, ni, rd,
- xc = x.c,
- pows10 = POWS_TEN;
-
- // if x is not Infinity or NaN...
- if (xc) {
-
- // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.
- // n is a base 1e14 number, the value of the element of array x.c containing rd.
- // ni is the index of n within x.c.
- // d is the number of digits of n.
- // i is the index of rd within n including leading zeros.
- // j is the actual index of rd within n (if < 0, rd is a leading zero).
- out: {
-
- // Get the number of digits of the first element of xc.
- for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);
- i = sd - d;
-
- // If the rounding digit is in the first element of xc...
- if (i < 0) {
- i += LOG_BASE;
- j = sd;
- n = xc[ni = 0];
-
- // Get the rounding digit at index j of n.
- rd = n / pows10[d - j - 1] % 10 | 0;
- } else {
- ni = mathceil((i + 1) / LOG_BASE);
-
- if (ni >= xc.length) {
-
- if (r) {
-
- // Needed by sqrt.
- for (; xc.length <= ni; xc.push(0));
- n = rd = 0;
- d = 1;
- i %= LOG_BASE;
- j = i - LOG_BASE + 1;
- } else {
- break out;
- }
- } else {
- n = k = xc[ni];
-
- // Get the number of digits of n.
- for (d = 1; k >= 10; k /= 10, d++);
-
- // Get the index of rd within n.
- i %= LOG_BASE;
-
- // Get the index of rd within n, adjusted for leading zeros.
- // The number of leading zeros of n is given by LOG_BASE - d.
- j = i - LOG_BASE + d;
-
- // Get the rounding digit at index j of n.
- rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
- }
- }
-
- r = r || sd < 0 ||
-
- // Are there any non-zero digits after the rounding digit?
- // The expression n % pows10[d - j - 1] returns all digits of n to the right
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
- xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);
-
- r = rm < 4
- ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
- : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&
-
- // Check whether the digit to the left of the rounding digit is odd.
- ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||
- rm == (x.s < 0 ? 8 : 7));
-
- if (sd < 1 || !xc[0]) {
- xc.length = 0;
-
- if (r) {
-
- // Convert sd to decimal places.
- sd -= x.e + 1;
-
- // 1, 0.1, 0.01, 0.001, 0.0001 etc.
- xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
- x.e = -sd || 0;
- } else {
-
- // Zero.
- xc[0] = x.e = 0;
- }
-
- return x;
- }
-
- // Remove excess digits.
- if (i == 0) {
- xc.length = ni;
- k = 1;
- ni--;
- } else {
- xc.length = ni + 1;
- k = pows10[LOG_BASE - i];
-
- // E.g. 56700 becomes 56000 if 7 is the rounding digit.
- // j > 0 means i > number of leading zeros of n.
- xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;
- }
-
- // Round up?
- if (r) {
-
- for (; ;) {
-
- // If the digit to be rounded up is in the first element of xc...
- if (ni == 0) {
-
- // i will be the length of xc[0] before k is added.
- for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);
- j = xc[0] += k;
- for (k = 1; j >= 10; j /= 10, k++);
-
- // if i != k the length has increased.
- if (i != k) {
- x.e++;
- if (xc[0] == BASE) xc[0] = 1;
- }
-
- break;
- } else {
- xc[ni] += k;
- if (xc[ni] != BASE) break;
- xc[ni--] = 0;
- k = 1;
- }
- }
- }
-
- // Remove trailing zeros.
- for (i = xc.length; xc[--i] === 0; xc.pop());
- }
-
- // Overflow? Infinity.
- if (x.e > MAX_EXP) {
- x.c = x.e = null;
-
- // Underflow? Zero.
- } else if (x.e < MIN_EXP) {
- x.c = [x.e = 0];
- }
- }
-
- return x;
- }
-
-
- function valueOf(n) {
- var str,
- e = n.e;
-
- if (e === null) return n.toString();
-
- str = coeffToString(n.c);
-
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS
- ? toExponential(str, e)
- : toFixedPoint(str, e, '0');
-
- return n.s < 0 ? '-' + str : str;
- }
-
-
- // PROTOTYPE/INSTANCE METHODS
-
-
- /*
- * Return a new BigNumber whose value is the absolute value of this BigNumber.
- */
- P.absoluteValue = P.abs = function () {
- var x = new BigNumber(this);
- if (x.s < 0) x.s = 1;
- return x;
- };
-
-
- /*
- * Return
- * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),
- * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),
- * 0 if they have the same value,
- * or null if the value of either is NaN.
- */
- P.comparedTo = function (y, b) {
- return compare(this, new BigNumber(y, b));
- };
-
-
- /*
- * If dp is undefined or null or true or false, return the number of decimal places of the
- * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.
- *
- * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this
- * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or
- * ROUNDING_MODE if rm is omitted.
- *
- * [dp] {number} Decimal places: integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- */
- P.decimalPlaces = P.dp = function (dp, rm) {
- var c, n, v,
- x = this;
-
- if (dp != null) {
- intCheck(dp, 0, MAX);
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
-
- return round(new BigNumber(x), dp + x.e + 1, rm);
- }
-
- if (!(c = x.c)) return null;
- n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
-
- // Subtract the number of trailing zeros of the last number.
- if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);
- if (n < 0) n = 0;
-
- return n;
- };
-
-
- /*
- * n / 0 = I
- * n / N = N
- * n / I = 0
- * 0 / n = 0
- * 0 / 0 = N
- * 0 / N = N
- * 0 / I = 0
- * N / n = N
- * N / 0 = N
- * N / N = N
- * N / I = N
- * I / n = I
- * I / 0 = I
- * I / N = N
- * I / I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber divided by the value of
- * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.
- */
- P.dividedBy = P.div = function (y, b) {
- return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);
- };
-
-
- /*
- * Return a new BigNumber whose value is the integer part of dividing the value of this
- * BigNumber by the value of BigNumber(y, b).
- */
- P.dividedToIntegerBy = P.idiv = function (y, b) {
- return div(this, new BigNumber(y, b), 0, 1);
- };
-
-
- /*
- * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.
- *
- * If m is present, return the result modulo m.
- * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.
- * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.
- *
- * The modular power operation works efficiently when x, n, and m are integers, otherwise it
- * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.
- *
- * n {number|string|BigNumber} The exponent. An integer.
- * [m] {number|string|BigNumber} The modulus.
- *
- * '[BigNumber Error] Exponent not an integer: {n}'
- */
- P.exponentiatedBy = P.pow = function (n, m) {
- var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,
- x = this;
-
- n = new BigNumber(n);
-
- // Allow NaN and ±Infinity, but not other non-integers.
- if (n.c && !n.isInteger()) {
- throw Error
- (bignumberError + 'Exponent not an integer: ' + valueOf(n));
- }
-
- if (m != null) m = new BigNumber(m);
-
- // Exponent of MAX_SAFE_INTEGER is 15.
- nIsBig = n.e > 14;
-
- // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.
- if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
-
- // The sign of the result of pow when x is negative depends on the evenness of n.
- // If +n overflows to ±Infinity, the evenness of n would be not be known.
- y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));
- return m ? y.mod(m) : y;
- }
-
- nIsNeg = n.s < 0;
-
- if (m) {
-
- // x % m returns NaN if abs(m) is zero, or m is NaN.
- if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);
-
- isModExp = !nIsNeg && x.isInteger() && m.isInteger();
-
- if (isModExp) x = x.mod(m);
-
- // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.
- // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.
- } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0
- // [1, 240000000]
- ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7
- // [80000000000000] [99999750000000]
- : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
-
- // If x is negative and n is odd, k = -0, else k = 0.
- k = x.s < 0 && isOdd(n) ? -0 : 0;
-
- // If x >= 1, k = ±Infinity.
- if (x.e > -1) k = 1 / k;
-
- // If n is negative return ±0, else return ±Infinity.
- return new BigNumber(nIsNeg ? 1 / k : k);
-
- } else if (POW_PRECISION) {
-
- // Truncating each coefficient array to a length of k after each multiplication
- // equates to truncating significant digits to POW_PRECISION + [28, 41],
- // i.e. there will be a minimum of 28 guard digits retained.
- k = mathceil(POW_PRECISION / LOG_BASE + 2);
- }
-
- if (nIsBig) {
- half = new BigNumber(0.5);
- if (nIsNeg) n.s = 1;
- nIsOdd = isOdd(n);
- } else {
- i = Math.abs(+valueOf(n));
- nIsOdd = i % 2;
- }
-
- y = new BigNumber(ONE);
-
- // Performs 54 loop iterations for n of 9007199254740991.
- for (; ;) {
-
- if (nIsOdd) {
- y = y.times(x);
- if (!y.c) break;
-
- if (k) {
- if (y.c.length > k) y.c.length = k;
- } else if (isModExp) {
- y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));
- }
- }
-
- if (i) {
- i = mathfloor(i / 2);
- if (i === 0) break;
- nIsOdd = i % 2;
- } else {
- n = n.times(half);
- round(n, n.e + 1, 1);
-
- if (n.e > 14) {
- nIsOdd = isOdd(n);
- } else {
- i = +valueOf(n);
- if (i === 0) break;
- nIsOdd = i % 2;
- }
- }
-
- x = x.times(x);
-
- if (k) {
- if (x.c && x.c.length > k) x.c.length = k;
- } else if (isModExp) {
- x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));
- }
- }
-
- if (isModExp) return y;
- if (nIsNeg) y = ONE.div(y);
-
- return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer
- * using rounding mode rm, or ROUNDING_MODE if rm is omitted.
- *
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'
- */
- P.integerValue = function (rm) {
- var n = new BigNumber(this);
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
- return round(n, n.e + 1, rm);
- };
-
-
- /*
- * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),
- * otherwise return false.
- */
- P.isEqualTo = P.eq = function (y, b) {
- return compare(this, new BigNumber(y, b)) === 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is a finite number, otherwise return false.
- */
- P.isFinite = function () {
- return !!this.c;
- };
-
-
- /*
- * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),
- * otherwise return false.
- */
- P.isGreaterThan = P.gt = function (y, b) {
- return compare(this, new BigNumber(y, b)) > 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is greater than or equal to the value of
- * BigNumber(y, b), otherwise return false.
- */
- P.isGreaterThanOrEqualTo = P.gte = function (y, b) {
- return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;
-
- };
-
-
- /*
- * Return true if the value of this BigNumber is an integer, otherwise return false.
- */
- P.isInteger = function () {
- return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
- };
-
-
- /*
- * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),
- * otherwise return false.
- */
- P.isLessThan = P.lt = function (y, b) {
- return compare(this, new BigNumber(y, b)) < 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is less than or equal to the value of
- * BigNumber(y, b), otherwise return false.
- */
- P.isLessThanOrEqualTo = P.lte = function (y, b) {
- return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is NaN, otherwise return false.
- */
- P.isNaN = function () {
- return !this.s;
- };
-
-
- /*
- * Return true if the value of this BigNumber is negative, otherwise return false.
- */
- P.isNegative = function () {
- return this.s < 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is positive, otherwise return false.
- */
- P.isPositive = function () {
- return this.s > 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is 0 or -0, otherwise return false.
- */
- P.isZero = function () {
- return !!this.c && this.c[0] == 0;
- };
-
-
- /*
- * n - 0 = n
- * n - N = N
- * n - I = -I
- * 0 - n = -n
- * 0 - 0 = 0
- * 0 - N = N
- * 0 - I = -I
- * N - n = N
- * N - 0 = N
- * N - N = N
- * N - I = N
- * I - n = I
- * I - 0 = I
- * I - N = N
- * I - I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber minus the value of
- * BigNumber(y, b).
- */
- P.minus = function (y, b) {
- var i, j, t, xLTy,
- x = this,
- a = x.s;
-
- y = new BigNumber(y, b);
- b = y.s;
-
- // Either NaN?
- if (!a || !b) return new BigNumber(NaN);
-
- // Signs differ?
- if (a != b) {
- y.s = -b;
- return x.plus(y);
- }
-
- var xe = x.e / LOG_BASE,
- ye = y.e / LOG_BASE,
- xc = x.c,
- yc = y.c;
-
- if (!xe || !ye) {
-
- // Either Infinity?
- if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);
-
- // Either zero?
- if (!xc[0] || !yc[0]) {
-
- // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
- return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :
-
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
- ROUNDING_MODE == 3 ? -0 : 0);
- }
- }
-
- xe = bitFloor(xe);
- ye = bitFloor(ye);
- xc = xc.slice();
-
- // Determine which is the bigger number.
- if (a = xe - ye) {
-
- if (xLTy = a < 0) {
- a = -a;
- t = xc;
- } else {
- ye = xe;
- t = yc;
- }
-
- t.reverse();
-
- // Prepend zeros to equalise exponents.
- for (b = a; b--; t.push(0));
- t.reverse();
- } else {
-
- // Exponents equal. Check digit by digit.
- j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;
-
- for (a = b = 0; b < j; b++) {
-
- if (xc[b] != yc[b]) {
- xLTy = xc[b] < yc[b];
- break;
- }
- }
- }
-
- // x < y? Point xc to the array of the bigger number.
- if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
-
- b = (j = yc.length) - (i = xc.length);
-
- // Append zeros to xc if shorter.
- // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.
- if (b > 0) for (; b--; xc[i++] = 0);
- b = BASE - 1;
-
- // Subtract yc from xc.
- for (; j > a;) {
-
- if (xc[--j] < yc[j]) {
- for (i = j; i && !xc[--i]; xc[i] = b);
- --xc[i];
- xc[j] += BASE;
- }
-
- xc[j] -= yc[j];
- }
-
- // Remove leading zeros and adjust exponent accordingly.
- for (; xc[0] == 0; xc.splice(0, 1), --ye);
-
- // Zero?
- if (!xc[0]) {
-
- // Following IEEE 754 (2008) 6.3,
- // n - n = +0 but n - n = -0 when rounding towards -Infinity.
- y.s = ROUNDING_MODE == 3 ? -1 : 1;
- y.c = [y.e = 0];
- return y;
- }
-
- // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity
- // for finite x and y.
- return normalise(y, xc, ye);
- };
-
-
- /*
- * n % 0 = N
- * n % N = N
- * n % I = n
- * 0 % n = 0
- * -0 % n = -0
- * 0 % 0 = N
- * 0 % N = N
- * 0 % I = 0
- * N % n = N
- * N % 0 = N
- * N % N = N
- * N % I = N
- * I % n = N
- * I % 0 = N
- * I % N = N
- * I % I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber modulo the value of
- * BigNumber(y, b). The result depends on the value of MODULO_MODE.
- */
- P.modulo = P.mod = function (y, b) {
- var q, s,
- x = this;
-
- y = new BigNumber(y, b);
-
- // Return NaN if x is Infinity or NaN, or y is NaN or zero.
- if (!x.c || !y.s || y.c && !y.c[0]) {
- return new BigNumber(NaN);
-
- // Return x if y is Infinity or x is zero.
- } else if (!y.c || x.c && !x.c[0]) {
- return new BigNumber(x);
- }
-
- if (MODULO_MODE == 9) {
-
- // Euclidian division: q = sign(y) * floor(x / abs(y))
- // r = x - qy where 0 <= r < abs(y)
- s = y.s;
- y.s = 1;
- q = div(x, y, 0, 3);
- y.s = s;
- q.s *= s;
- } else {
- q = div(x, y, 0, MODULO_MODE);
- }
-
- y = x.minus(q.times(y));
-
- // To match JavaScript %, ensure sign of zero is sign of dividend.
- if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;
-
- return y;
- };
-
-
- /*
- * n * 0 = 0
- * n * N = N
- * n * I = I
- * 0 * n = 0
- * 0 * 0 = 0
- * 0 * N = N
- * 0 * I = N
- * N * n = N
- * N * 0 = N
- * N * N = N
- * N * I = N
- * I * n = I
- * I * 0 = N
- * I * N = N
- * I * I = I
- *
- * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value
- * of BigNumber(y, b).
- */
- P.multipliedBy = P.times = function (y, b) {
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,
- base, sqrtBase,
- x = this,
- xc = x.c,
- yc = (y = new BigNumber(y, b)).c;
-
- // Either NaN, ±Infinity or ±0?
- if (!xc || !yc || !xc[0] || !yc[0]) {
-
- // Return NaN if either is NaN, or one is 0 and the other is Infinity.
- if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
- y.c = y.e = y.s = null;
- } else {
- y.s *= x.s;
-
- // Return ±Infinity if either is ±Infinity.
- if (!xc || !yc) {
- y.c = y.e = null;
-
- // Return ±0 if either is ±0.
- } else {
- y.c = [0];
- y.e = 0;
- }
- }
-
- return y;
- }
-
- e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);
- y.s *= x.s;
- xcL = xc.length;
- ycL = yc.length;
-
- // Ensure xc points to longer array and xcL to its length.
- if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
-
- // Initialise the result array with zeros.
- for (i = xcL + ycL, zc = []; i--; zc.push(0));
-
- base = BASE;
- sqrtBase = SQRT_BASE;
-
- for (i = ycL; --i >= 0;) {
- c = 0;
- ylo = yc[i] % sqrtBase;
- yhi = yc[i] / sqrtBase | 0;
-
- for (k = xcL, j = i + k; j > i;) {
- xlo = xc[--k] % sqrtBase;
- xhi = xc[k] / sqrtBase | 0;
- m = yhi * xlo + xhi * ylo;
- xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;
- c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;
- zc[j--] = xlo % base;
- }
-
- zc[j] = c;
- }
-
- if (c) {
- ++e;
- } else {
- zc.splice(0, 1);
- }
-
- return normalise(y, zc, e);
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber negated,
- * i.e. multiplied by -1.
- */
- P.negated = function () {
- var x = new BigNumber(this);
- x.s = -x.s || null;
- return x;
- };
-
-
- /*
- * n + 0 = n
- * n + N = N
- * n + I = I
- * 0 + n = n
- * 0 + 0 = 0
- * 0 + N = N
- * 0 + I = I
- * N + n = N
- * N + 0 = N
- * N + N = N
- * N + I = N
- * I + n = I
- * I + 0 = I
- * I + N = N
- * I + I = I
- *
- * Return a new BigNumber whose value is the value of this BigNumber plus the value of
- * BigNumber(y, b).
- */
- P.plus = function (y, b) {
- var t,
- x = this,
- a = x.s;
-
- y = new BigNumber(y, b);
- b = y.s;
-
- // Either NaN?
- if (!a || !b) return new BigNumber(NaN);
-
- // Signs differ?
- if (a != b) {
- y.s = -b;
- return x.minus(y);
- }
-
- var xe = x.e / LOG_BASE,
- ye = y.e / LOG_BASE,
- xc = x.c,
- yc = y.c;
-
- if (!xe || !ye) {
-
- // Return ±Infinity if either ±Infinity.
- if (!xc || !yc) return new BigNumber(a / 0);
-
- // Either zero?
- // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
- if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);
- }
-
- xe = bitFloor(xe);
- ye = bitFloor(ye);
- xc = xc.slice();
-
- // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.
- if (a = xe - ye) {
- if (a > 0) {
- ye = xe;
- t = yc;
- } else {
- a = -a;
- t = xc;
- }
-
- t.reverse();
- for (; a--; t.push(0));
- t.reverse();
- }
-
- a = xc.length;
- b = yc.length;
-
- // Point xc to the longer array, and b to the shorter length.
- if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
-
- // Only start adding at yc.length - 1 as the further digits of xc can be ignored.
- for (a = 0; b;) {
- a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
- xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
- }
-
- if (a) {
- xc = [a].concat(xc);
- ++ye;
- }
-
- // No need to check for zero, as +x + +y != 0 && -x + -y != 0
- // ye = MAX_EXP + 1 possible
- return normalise(y, xc, ye);
- };
-
-
- /*
- * If sd is undefined or null or true or false, return the number of significant digits of
- * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.
- * If sd is true include integer-part trailing zeros in the count.
- *
- * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this
- * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or
- * ROUNDING_MODE if rm is omitted.
- *
- * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.
- * boolean: whether to count integer-part trailing zeros: true or false.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'
- */
- P.precision = P.sd = function (sd, rm) {
- var c, n, v,
- x = this;
-
- if (sd != null && sd !== !!sd) {
- intCheck(sd, 1, MAX);
- if (rm == null) rm = ROUNDING_MODE;
- else intCheck(rm, 0, 8);
-
- return round(new BigNumber(x), sd, rm);
- }
-
- if (!(c = x.c)) return null;
- v = c.length - 1;
- n = v * LOG_BASE + 1;
-
- if (v = c[v]) {
-
- // Subtract the number of trailing zeros of the last element.
- for (; v % 10 == 0; v /= 10, n--);
-
- // Add the number of digits of the first element.
- for (v = c[0]; v >= 10; v /= 10, n++);
- }
-
- if (sd && x.e + 1 > n) n = x.e + 1;
-
- return n;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber shifted by k places
- * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.
- *
- * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'
- */
- P.shiftedBy = function (k) {
- intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
- return this.times('1e' + k);
- };
-
-
- /*
- * sqrt(-n) = N
- * sqrt(N) = N
- * sqrt(-I) = N
- * sqrt(I) = I
- * sqrt(0) = 0
- * sqrt(-0) = -0
- *
- * Return a new BigNumber whose value is the square root of the value of this BigNumber,
- * rounded according to DECIMAL_PLACES and ROUNDING_MODE.
- */
- P.squareRoot = P.sqrt = function () {
- var m, n, r, rep, t,
- x = this,
- c = x.c,
- s = x.s,
- e = x.e,
- dp = DECIMAL_PLACES + 4,
- half = new BigNumber('0.5');
-
- // Negative/NaN/Infinity/zero?
- if (s !== 1 || !c || !c[0]) {
- return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
- }
-
- // Initial estimate.
- s = Math.sqrt(+valueOf(x));
-
- // Math.sqrt underflow/overflow?
- // Pass x to Math.sqrt as integer, then adjust the exponent of the result.
- if (s == 0 || s == 1 / 0) {
- n = coeffToString(c);
- if ((n.length + e) % 2 == 0) n += '0';
- s = Math.sqrt(+n);
- e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
-
- if (s == 1 / 0) {
- n = '1e' + e;
- } else {
- n = s.toExponential();
- n = n.slice(0, n.indexOf('e') + 1) + e;
- }
-
- r = new BigNumber(n);
- } else {
- r = new BigNumber(s + '');
- }
-
- // Check for zero.
- // r could be zero if MIN_EXP is changed after the this value was created.
- // This would cause a division by zero (x/t) and hence Infinity below, which would cause
- // coeffToString to throw.
- if (r.c[0]) {
- e = r.e;
- s = e + dp;
- if (s < 3) s = 0;
-
- // Newton-Raphson iteration.
- for (; ;) {
- t = r;
- r = half.times(t.plus(div(x, t, dp, 1)));
-
- if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {
-
- // The exponent of r may here be one less than the final result exponent,
- // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits
- // are indexed correctly.
- if (r.e < e) --s;
- n = n.slice(s - 3, s + 1);
-
- // The 4th rounding digit may be in error by -1 so if the 4 rounding digits
- // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the
- // iteration.
- if (n == '9999' || !rep && n == '4999') {
-
- // On the first iteration only, check to see if rounding up gives the
- // exact result as the nines may infinitely repeat.
- if (!rep) {
- round(t, t.e + DECIMAL_PLACES + 2, 0);
-
- if (t.times(t).eq(x)) {
- r = t;
- break;
- }
- }
-
- dp += 4;
- s += 4;
- rep = 1;
- } else {
-
- // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact
- // result. If not, then there are further digits and m will be truthy.
- if (!+n || !+n.slice(1) && n.charAt(0) == '5') {
-
- // Truncate to the first rounding digit.
- round(r, r.e + DECIMAL_PLACES + 2, 1);
- m = !r.times(r).eq(x);
- }
-
- break;
- }
- }
- }
- }
-
- return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in exponential notation and
- * rounded using ROUNDING_MODE to dp fixed decimal places.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- */
- P.toExponential = function (dp, rm) {
- if (dp != null) {
- intCheck(dp, 0, MAX);
- dp++;
- }
- return format(this, dp, rm, 1);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in fixed-point notation rounding
- * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.
- *
- * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',
- * but e.g. (-0.00001).toFixed(0) is '-0'.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- */
- P.toFixed = function (dp, rm) {
- if (dp != null) {
- intCheck(dp, 0, MAX);
- dp = dp + this.e + 1;
- }
- return format(this, dp, rm);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in fixed-point notation rounded
- * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties
- * of the format or FORMAT object (see BigNumber.set).
- *
- * The formatting object may contain some or all of the properties shown below.
- *
- * FORMAT = {
- * prefix: '',
- * groupSize: 3,
- * secondaryGroupSize: 0,
- * groupSeparator: ',',
- * decimalSeparator: '.',
- * fractionGroupSize: 0,
- * fractionGroupSeparator: '\xA0', // non-breaking space
- * suffix: ''
- * };
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- * [format] {object} Formatting options. See FORMAT pbject above.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
- * '[BigNumber Error] Argument not an object: {format}'
- */
- P.toFormat = function (dp, rm, format) {
- var str,
- x = this;
-
- if (format == null) {
- if (dp != null && rm && typeof rm == 'object') {
- format = rm;
- rm = null;
- } else if (dp && typeof dp == 'object') {
- format = dp;
- dp = rm = null;
- } else {
- format = FORMAT;
- }
- } else if (typeof format != 'object') {
- throw Error
- (bignumberError + 'Argument not an object: ' + format);
- }
-
- str = x.toFixed(dp, rm);
-
- if (x.c) {
- var i,
- arr = str.split('.'),
- g1 = +format.groupSize,
- g2 = +format.secondaryGroupSize,
- groupSeparator = format.groupSeparator || '',
- intPart = arr[0],
- fractionPart = arr[1],
- isNeg = x.s < 0,
- intDigits = isNeg ? intPart.slice(1) : intPart,
- len = intDigits.length;
-
- if (g2) i = g1, g1 = g2, g2 = i, len -= i;
-
- if (g1 > 0 && len > 0) {
- i = len % g1 || g1;
- intPart = intDigits.substr(0, i);
- for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);
- if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);
- if (isNeg) intPart = '-' + intPart;
- }
-
- str = fractionPart
- ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)
- ? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'),
- '$&' + (format.fractionGroupSeparator || ''))
- : fractionPart)
- : intPart;
- }
-
- return (format.prefix || '') + str + (format.suffix || '');
- };
-
-
- /*
- * Return an array of two BigNumbers representing the value of this BigNumber as a simple
- * fraction with an integer numerator and an integer denominator.
- * The denominator will be a positive non-zero value less than or equal to the specified
- * maximum denominator. If a maximum denominator is not specified, the denominator will be
- * the lowest value necessary to represent the number exactly.
- *
- * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.
- *
- * '[BigNumber Error] Argument {not an integer|out of range} : {md}'
- */
- P.toFraction = function (md) {
- var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,
- x = this,
- xc = x.c;
-
- if (md != null) {
- n = new BigNumber(md);
-
- // Throw if md is less than one or is not an integer, unless it is Infinity.
- if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
- throw Error
- (bignumberError + 'Argument ' +
- (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));
- }
- }
-
- if (!xc) return new BigNumber(x);
-
- d = new BigNumber(ONE);
- n1 = d0 = new BigNumber(ONE);
- d1 = n0 = new BigNumber(ONE);
- s = coeffToString(xc);
-
- // Determine initial denominator.
- // d is a power of 10 and the minimum max denominator that specifies the value exactly.
- e = d.e = s.length - x.e - 1;
- d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
- md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;
-
- exp = MAX_EXP;
- MAX_EXP = 1 / 0;
- n = new BigNumber(s);
-
- // n0 = d1 = 0
- n0.c[0] = 0;
-
- for (; ;) {
- q = div(n, d, 0, 1);
- d2 = d0.plus(q.times(d1));
- if (d2.comparedTo(md) == 1) break;
- d0 = d1;
- d1 = d2;
- n1 = n0.plus(q.times(d2 = n1));
- n0 = d2;
- d = n.minus(q.times(d2 = d));
- n = d2;
- }
-
- d2 = div(md.minus(d0), d1, 0, 1);
- n0 = n0.plus(d2.times(n1));
- d0 = d0.plus(d2.times(d1));
- n0.s = n1.s = x.s;
- e = e * 2;
-
- // Determine which fraction is closer to x, n0/d0 or n1/d1
- r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(
- div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];
-
- MAX_EXP = exp;
-
- return r;
- };
-
-
- /*
- * Return the value of this BigNumber converted to a number primitive.
- */
- P.toNumber = function () {
- return +valueOf(this);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber rounded to sd significant digits
- * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits
- * necessary to represent the integer part of the value in fixed-point notation, then use
- * exponential notation.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'
- */
- P.toPrecision = function (sd, rm) {
- if (sd != null) intCheck(sd, 1, MAX);
- return format(this, sd, rm, 2);
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in base b, or base 10 if b is
- * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and
- * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent
- * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than
- * TO_EXP_NEG, return exponential notation.
- *
- * [b] {number} Integer, 2 to ALPHABET.length inclusive.
- *
- * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'
- */
- P.toString = function (b) {
- var str,
- n = this,
- s = n.s,
- e = n.e;
-
- // Infinity or NaN?
- if (e === null) {
- if (s) {
- str = 'Infinity';
- if (s < 0) str = '-' + str;
- } else {
- str = 'NaN';
- }
- } else {
- if (b == null) {
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS
- ? toExponential(coeffToString(n.c), e)
- : toFixedPoint(coeffToString(n.c), e, '0');
- } else if (b === 10) {
- n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
- str = toFixedPoint(coeffToString(n.c), n.e, '0');
- } else {
- intCheck(b, 2, ALPHABET.length, 'Base');
- str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);
- }
-
- if (s < 0 && n.c[0]) str = '-' + str;
- }
-
- return str;
- };
-
-
- /*
- * Return as toString, but do not accept a base argument, and include the minus sign for
- * negative zero.
- */
- P.valueOf = P.toJSON = function () {
- return valueOf(this);
- };
-
-
- P._isBigNumber = true;
-
- P[Symbol.toStringTag] = 'BigNumber';
-
- // Node.js v10.12.0+
- P[Symbol.for('nodejs.util.inspect.custom')] = P.valueOf;
-
- if (configObject != null) BigNumber.set(configObject);
-
- return BigNumber;
-}
-
-
-// PRIVATE HELPER FUNCTIONS
-
-// These functions don't need access to variables,
-// e.g. DECIMAL_PLACES, in the scope of the `clone` function above.
-
-
-function bitFloor(n) {
- var i = n | 0;
- return n > 0 || n === i ? i : i - 1;
-}
-
-
-// Return a coefficient array as a string of base 10 digits.
-function coeffToString(a) {
- var s, z,
- i = 1,
- j = a.length,
- r = a[0] + '';
-
- for (; i < j;) {
- s = a[i++] + '';
- z = LOG_BASE - s.length;
- for (; z--; s = '0' + s);
- r += s;
- }
-
- // Determine trailing zeros.
- for (j = r.length; r.charCodeAt(--j) === 48;);
-
- return r.slice(0, j + 1 || 1);
-}
-
-
-// Compare the value of BigNumbers x and y.
-function compare(x, y) {
- var a, b,
- xc = x.c,
- yc = y.c,
- i = x.s,
- j = y.s,
- k = x.e,
- l = y.e;
-
- // Either NaN?
- if (!i || !j) return null;
-
- a = xc && !xc[0];
- b = yc && !yc[0];
-
- // Either zero?
- if (a || b) return a ? b ? 0 : -j : i;
-
- // Signs differ?
- if (i != j) return i;
-
- a = i < 0;
- b = k == l;
-
- // Either Infinity?
- if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;
-
- // Compare exponents.
- if (!b) return k > l ^ a ? 1 : -1;
-
- j = (k = xc.length) < (l = yc.length) ? k : l;
-
- // Compare digit by digit.
- for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;
-
- // Compare lengths.
- return k == l ? 0 : k > l ^ a ? 1 : -1;
-}
-
-
-/*
- * Check that n is a primitive number, an integer, and in range, otherwise throw.
- */
-function intCheck(n, min, max, name) {
- if (n < min || n > max || n !== mathfloor(n)) {
- throw Error
- (bignumberError + (name || 'Argument') + (typeof n == 'number'
- ? n < min || n > max ? ' out of range: ' : ' not an integer: '
- : ' not a primitive number: ') + String(n));
- }
-}
-
-
-// Assumes finite n.
-function isOdd(n) {
- var k = n.c.length - 1;
- return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;
-}
-
-
-function toExponential(str, e) {
- return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +
- (e < 0 ? 'e' : 'e+') + e;
-}
-
-
-function toFixedPoint(str, e, z) {
- var len, zs;
-
- // Negative exponent?
- if (e < 0) {
-
- // Prepend zeros.
- for (zs = z + '.'; ++e; zs += z);
- str = zs + str;
-
- // Positive exponent
- } else {
- len = str.length;
-
- // Append zeros.
- if (++e > len) {
- for (zs = z, e -= len; --e; zs += z);
- str += zs;
- } else if (e < len) {
- str = str.slice(0, e) + '.' + str.slice(e);
- }
- }
-
- return str;
-}
-
-
-// EXPORT
-
-
-export var BigNumber = clone();
-
-export default BigNumber;
diff --git a/node_modules/bignumber.js/doc/API.html b/node_modules/bignumber.js/doc/API.html
deleted file mode 100644
index 1ed4a87..0000000
--- a/node_modules/bignumber.js/doc/API.html
+++ /dev/null
@@ -1,2237 +0,0 @@
-
-
-
-
-
-
-bignumber.js API
-
-
-
-
-
-
-
-
-
bignumber.js
-
-
A JavaScript library for arbitrary-precision arithmetic.
-
Hosted on GitHub.
-
-
API
-
-
- See the README on GitHub for a
- quick-start introduction.
-
-
- In all examples below, var and semicolons are not shown, and if a commented-out
- value is in quotes it means toString has been called on the preceding expression.
-
-
-
-
CONSTRUCTOR
-
-
-
- BigNumberBigNumber(n [, base]) ⇒ BigNumber
-
-
- n: number|string|BigNumber
- base: number: integer, 2 to 36 inclusive. (See
- ALPHABET to extend this range).
-
-
- Returns a new instance of a BigNumber object with value n, where n
- is a numeric value in the specified base, or base 10 if
- base is omitted or is null or undefined.
-
-
-x = new BigNumber(123.4567) // '123.4567'
-// 'new' is optional
-y = BigNumber(x) // '123.4567'
-
- If n is a base 10 value it can be in normal (fixed-point) or
- exponential notation. Values in other bases must be in normal notation. Values in any base can
- have fraction digits, i.e. digits after the decimal point.
-
-
-new BigNumber(43210) // '43210'
-new BigNumber('4.321e+4') // '43210'
-new BigNumber('-735.0918e-430') // '-7.350918e-428'
-new BigNumber('123412421.234324', 5) // '607236.557696'
-
- Signed 0, signed Infinity and NaN are supported.
-
-
-new BigNumber('-Infinity') // '-Infinity'
-new BigNumber(NaN) // 'NaN'
-new BigNumber(-0) // '0'
-new BigNumber('.5') // '0.5'
-new BigNumber('+2') // '2'
-
- String values in hexadecimal literal form, e.g. '0xff', are valid, as are
- string values with the octal and binary prefixs '0o' and '0b'.
- String values in octal literal form without the prefix will be interpreted as
- decimals, e.g. '011' is interpreted as 11, not 9.
-
-
-new BigNumber(-10110100.1, 2) // '-180.5'
-new BigNumber('-0b10110100.1') // '-180.5'
-new BigNumber('ff.8', 16) // '255.5'
-new BigNumber('0xff.8') // '255.5'
-
- If a base is specified, n is rounded according to the current
- DECIMAL_PLACES and
- ROUNDING_MODE settings. This includes base
- 10 so don't include a base parameter for decimal values unless
- this behaviour is wanted.
-
-
BigNumber.config({ DECIMAL_PLACES: 5 })
-new BigNumber(1.23456789) // '1.23456789'
-new BigNumber(1.23456789, 10) // '1.23457'
-
An error is thrown if base is invalid. See Errors.
-
- There is no limit to the number of digits of a value of type string (other than
- that of JavaScript's maximum array size). See RANGE to set
- the maximum and minimum possible exponent value of a BigNumber.
-
-
-new BigNumber('5032485723458348569331745.33434346346912144534543')
-new BigNumber('4.321e10000000')
-
BigNumber NaN is returned if n is invalid
- (unless BigNumber.DEBUG is true, see below).
-
-new BigNumber('.1*') // 'NaN'
-new BigNumber('blurgh') // 'NaN'
-new BigNumber(9, 2) // 'NaN'
-
- To aid in debugging, if BigNumber.DEBUG is true then an error will
- be thrown on an invalid n. An error will also be thrown if n is of
- type number with more than 15 significant digits, as calling
- toString or valueOf on
- these numbers may not result in the intended value.
-
-
-console.log(823456789123456.3) // 823456789123456.2
-new BigNumber(823456789123456.3) // '823456789123456.2'
-BigNumber.DEBUG = true
-// '[BigNumber Error] Number primitive has more than 15 significant digits'
-new BigNumber(823456789123456.3)
-// '[BigNumber Error] Not a base 2 number'
-new BigNumber(9, 2)
-
- A BigNumber can also be created from an object literal.
- Use isBigNumber to check that it is well-formed.
-
-
new BigNumber({ s: 1, e: 2, c: [ 777, 12300000000000 ], _isBigNumber: true }) // '777.123'
-
-
-
-
-
Methods
-
The static methods of a BigNumber constructor.
-
-
-
-
-
clone
- .clone([object]) ⇒ BigNumber constructor
-
-
object: object
-
- Returns a new independent BigNumber constructor with configuration as described by
- object (see config), or with the default
- configuration if object is null or undefined.
-
-
- Throws if object is not an object. See Errors.
-
-
BigNumber.config({ DECIMAL_PLACES: 5 })
-BN = BigNumber.clone({ DECIMAL_PLACES: 9 })
-
-x = new BigNumber(1)
-y = new BN(1)
-
-x.div(3) // 0.33333
-y.div(3) // 0.333333333
-
-// BN = BigNumber.clone({ DECIMAL_PLACES: 9 }) is equivalent to:
-BN = BigNumber.clone()
-BN.config({ DECIMAL_PLACES: 9 })
-
-
-
-
configset([object]) ⇒ object
-
- object: object: an object that contains some or all of the following
- properties.
-
-
Configures the settings for this particular BigNumber constructor.
-
-
- DECIMAL_PLACES
- -
- number: integer,
0 to 1e+9 inclusive
- Default value: 20
-
- -
- The maximum number of decimal places of the results of operations involving
- division, i.e. division, square root and base conversion operations, and power
- operations with negative exponents.
-
- -
-
BigNumber.config({ DECIMAL_PLACES: 5 })
-BigNumber.set({ DECIMAL_PLACES: 5 }) // equivalent
-
-
-
-
- ROUNDING_MODE
- -
- number: integer,
0 to 8 inclusive
- Default value: 4 (ROUND_HALF_UP)
-
- -
- The rounding mode used in the above operations and the default rounding mode of
-
decimalPlaces,
- precision,
- toExponential,
- toFixed,
- toFormat and
- toPrecision.
-
- - The modes are available as enumerated properties of the BigNumber constructor.
- -
-
BigNumber.config({ ROUNDING_MODE: 0 })
-BigNumber.set({ ROUNDING_MODE: BigNumber.ROUND_UP }) // equivalent
-
-
-
-
- EXPONENTIAL_AT
- -
- number: integer, magnitude
0 to 1e+9 inclusive, or
-
- number[]: [ integer -1e+9 to 0 inclusive, integer
- 0 to 1e+9 inclusive ]
- Default value: [-7, 20]
-
- -
- The exponent value(s) at which
toString returns exponential notation.
-
- -
- If a single number is assigned, the value is the exponent magnitude.
- If an array of two numbers is assigned then the first number is the negative exponent
- value at and beneath which exponential notation is used, and the second number is the
- positive exponent value at and above which the same.
-
- -
- For example, to emulate JavaScript numbers in terms of the exponent values at which they
- begin to use exponential notation, use
[-7, 20].
-
- -
-
BigNumber.config({ EXPONENTIAL_AT: 2 })
-new BigNumber(12.3) // '12.3' e is only 1
-new BigNumber(123) // '1.23e+2'
-new BigNumber(0.123) // '0.123' e is only -1
-new BigNumber(0.0123) // '1.23e-2'
-
-BigNumber.config({ EXPONENTIAL_AT: [-7, 20] })
-new BigNumber(123456789) // '123456789' e is only 8
-new BigNumber(0.000000123) // '1.23e-7'
-
-// Almost never return exponential notation:
-BigNumber.config({ EXPONENTIAL_AT: 1e+9 })
-
-// Always return exponential notation:
-BigNumber.config({ EXPONENTIAL_AT: 0 })
-
- -
- Regardless of the value of
EXPONENTIAL_AT, the toFixed method
- will always return a value in normal notation and the toExponential method
- will always return a value in exponential form.
-
- -
- Calling
toString with a base argument, e.g. toString(10), will
- also always return normal notation.
-
-
-
-
- RANGE
- -
- number: integer, magnitude
1 to 1e+9 inclusive, or
-
- number[]: [ integer -1e+9 to -1 inclusive, integer
- 1 to 1e+9 inclusive ]
- Default value: [-1e+9, 1e+9]
-
- -
- The exponent value(s) beyond which overflow to
Infinity and underflow to
- zero occurs.
-
- -
- If a single number is assigned, it is the maximum exponent magnitude: values wth a
- positive exponent of greater magnitude become
Infinity and those with a
- negative exponent of greater magnitude become zero.
- -
- If an array of two numbers is assigned then the first number is the negative exponent
- limit and the second number is the positive exponent limit.
-
- -
- For example, to emulate JavaScript numbers in terms of the exponent values at which they
- become zero and
Infinity, use [-324, 308].
-
- -
-
BigNumber.config({ RANGE: 500 })
-BigNumber.config().RANGE // [ -500, 500 ]
-new BigNumber('9.999e499') // '9.999e+499'
-new BigNumber('1e500') // 'Infinity'
-new BigNumber('1e-499') // '1e-499'
-new BigNumber('1e-500') // '0'
-
-BigNumber.config({ RANGE: [-3, 4] })
-new BigNumber(99999) // '99999' e is only 4
-new BigNumber(100000) // 'Infinity' e is 5
-new BigNumber(0.001) // '0.01' e is only -3
-new BigNumber(0.0001) // '0' e is -4
-
- -
- The largest possible magnitude of a finite BigNumber is
-
9.999...e+1000000000.
- The smallest possible magnitude of a non-zero BigNumber is 1e-1000000000.
-
-
-
-
- CRYPTO
- -
- boolean:
true or false.
- Default value: false
-
- -
- The value that determines whether cryptographically-secure pseudo-random number
- generation is used.
-
- -
- If
CRYPTO is set to true then the
- random method will generate random digits using
- crypto.getRandomValues in browsers that support it, or
- crypto.randomBytes if using Node.js.
-
- -
- If neither function is supported by the host environment then attempting to set
-
CRYPTO to true will fail and an exception will be thrown.
-
- -
- If
CRYPTO is false then the source of randomness used will be
- Math.random (which is assumed to generate at least 30 bits of
- randomness).
-
- - See
random.
- -
-
-// Node.js
-global.crypto = require('crypto')
-
-BigNumber.config({ CRYPTO: true })
-BigNumber.config().CRYPTO // true
-BigNumber.random() // 0.54340758610486147524
-
-
-
-
- MODULO_MODE
- -
- number: integer,
0 to 9 inclusive
- Default value: 1 (ROUND_DOWN)
-
- - The modulo mode used when calculating the modulus:
a mod n.
- -
- The quotient,
q = a / n, is calculated according to the
- ROUNDING_MODE that corresponds to the chosen
- MODULO_MODE.
-
- - The remainder,
r, is calculated as: r = a - n * q.
- -
- The modes that are most commonly used for the modulus/remainder operation are shown in
- the following table. Although the other rounding modes can be used, they may not give
- useful results.
-
- -
-
- | Property | Value | Description |
-
- | ROUND_UP | 0 |
-
- The remainder is positive if the dividend is negative, otherwise it is negative.
- |
-
-
- | ROUND_DOWN | 1 |
-
- The remainder has the same sign as the dividend.
- This uses 'truncating division' and matches the behaviour of JavaScript's
- remainder operator %.
- |
-
-
- | ROUND_FLOOR | 3 |
-
- The remainder has the same sign as the divisor.
- This matches Python's % operator.
- |
-
-
- | ROUND_HALF_EVEN | 6 |
- The IEEE 754 remainder function. |
-
-
- | EUCLID | 9 |
-
- The remainder is always positive. Euclidian division:
- q = sign(n) * floor(a / abs(n))
- |
-
-
-
- -
- The rounding/modulo modes are available as enumerated properties of the BigNumber
- constructor.
-
- - See
modulo.
- -
-
BigNumber.config({ MODULO_MODE: BigNumber.EUCLID })
-BigNumber.config({ MODULO_MODE: 9 }) // equivalent
-
-
-
-
- POW_PRECISION
- -
- number: integer,
0 to 1e+9 inclusive.
- Default value: 0
-
- -
- The maximum precision, i.e. number of significant digits, of the result of the power
- operation (unless a modulus is specified).
-
- - If set to
0, the number of significant digits will not be limited.
- - See
exponentiatedBy.
- BigNumber.config({ POW_PRECISION: 100 })
-
-
-
- FORMAT
- - object
- -
- The
FORMAT object configures the format of the string returned by the
- toFormat method.
-
- -
- The example below shows the properties of the
FORMAT object that are
- recognised, and their default values.
-
- -
- Unlike the other configuration properties, the values of the properties of the
-
FORMAT object will not be checked for validity. The existing
- FORMAT object will simply be replaced by the object that is passed in.
- The object can include any number of the properties shown below.
-
- - See
toFormat for examples of usage.
- -
-
-BigNumber.config({
- FORMAT: {
- // string to prepend
- prefix: '',
- // decimal separator
- decimalSeparator: '.',
- // grouping separator of the integer part
- groupSeparator: ',',
- // primary grouping size of the integer part
- groupSize: 3,
- // secondary grouping size of the integer part
- secondaryGroupSize: 0,
- // grouping separator of the fraction part
- fractionGroupSeparator: ' ',
- // grouping size of the fraction part
- fractionGroupSize: 0,
- // string to append
- suffix: ''
- }
-});
-
-
-
-
- ALPHABET
- -
- string
- Default value: '0123456789abcdefghijklmnopqrstuvwxyz'
-
- -
- The alphabet used for base conversion. The length of the alphabet corresponds to the
- maximum value of the base argument that can be passed to the
-
BigNumber constructor or
- toString.
-
- -
- There is no maximum length for the alphabet, but it must be at least 2 characters long, and
- it must not contain whitespace or a repeated character, or the sign indicators
-
'+' and '-', or the decimal separator '.'.
-
- -
-
// duodecimal (base 12)
-BigNumber.config({ ALPHABET: '0123456789TE' })
-x = new BigNumber('T', 12)
-x.toString() // '10'
-x.toString(12) // 'T'
-
-
-
-
-
-
-
Returns an object with the above properties and their current values.
-
- Throws if object is not an object, or if an invalid value is assigned to
- one or more of the above properties. See Errors.
-
-
-BigNumber.config({
- DECIMAL_PLACES: 40,
- ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL,
- EXPONENTIAL_AT: [-10, 20],
- RANGE: [-500, 500],
- CRYPTO: true,
- MODULO_MODE: BigNumber.ROUND_FLOOR,
- POW_PRECISION: 80,
- FORMAT: {
- groupSize: 3,
- groupSeparator: ' ',
- decimalSeparator: ','
- },
- ALPHABET: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
-});
-
-obj = BigNumber.config();
-obj.DECIMAL_PLACES // 40
-obj.RANGE // [-500, 500]
-
-
-
-
- isBigNumber.isBigNumber(value) ⇒ boolean
-
-
value: any
-
- Returns true if value is a BigNumber instance, otherwise returns
- false.
-
-
x = 42
-y = new BigNumber(x)
-
-BigNumber.isBigNumber(x) // false
-y instanceof BigNumber // true
-BigNumber.isBigNumber(y) // true
-
-BN = BigNumber.clone();
-z = new BN(x)
-z instanceof BigNumber // false
-BigNumber.isBigNumber(z) // true
-
- If value is a BigNumber instance and BigNumber.DEBUG is true,
- then this method will also check if value is well-formed, and throw if it is not.
- See Errors.
-
-
- The check can be useful if creating a BigNumber from an object literal.
- See BigNumber.
-
-
-x = new BigNumber(10)
-
-// Change x.c to an illegitimate value.
-x.c = NaN
-
-BigNumber.DEBUG = false
-
-// No error.
-BigNumber.isBigNumber(x) // true
-
-BigNumber.DEBUG = true
-
-// Error.
-BigNumber.isBigNumber(x) // '[BigNumber Error] Invalid BigNumber'
-
-
-
-
maximum.max(n...) ⇒ BigNumber
-
- n: number|string|BigNumber
- See BigNumber for further parameter details.
-
-
- Returns a BigNumber whose value is the maximum of the arguments.
-
-
The return value is always exact and unrounded.
-
x = new BigNumber('3257869345.0378653')
-BigNumber.maximum(4e9, x, '123456789.9') // '4000000000'
-
-arr = [12, '13', new BigNumber(14)]
-BigNumber.max.apply(null, arr) // '14'
-
-
-
-
minimum.min(n...) ⇒ BigNumber
-
- n: number|string|BigNumber
- See BigNumber for further parameter details.
-
-
- Returns a BigNumber whose value is the minimum of the arguments.
-
-
The return value is always exact and unrounded.
-
x = new BigNumber('3257869345.0378653')
-BigNumber.minimum(4e9, x, '123456789.9') // '123456789.9'
-
-arr = [2, new BigNumber(-14), '-15.9999', -12]
-BigNumber.min.apply(null, arr) // '-15.9999'
-
-
-
-
- random.random([dp]) ⇒ BigNumber
-
-
dp: number: integer, 0 to 1e+9 inclusive
-
- Returns a new BigNumber with a pseudo-random value equal to or greater than 0 and
- less than 1.
-
-
- The return value will have dp decimal places (or less if trailing zeros are
- produced).
- If dp is omitted then the number of decimal places will default to the current
- DECIMAL_PLACES setting.
-
-
- Depending on the value of this BigNumber constructor's
- CRYPTO setting and the support for the
- crypto object in the host environment, the random digits of the return value are
- generated by either Math.random (fastest), crypto.getRandomValues
- (Web Cryptography API in recent browsers) or crypto.randomBytes (Node.js).
-
-
- To be able to set CRYPTO to true when using
- Node.js, the crypto object must be available globally:
-
-
global.crypto = require('crypto')
-
- If CRYPTO is true, i.e. one of the
- crypto methods is to be used, the value of a returned BigNumber should be
- cryptographically-secure and statistically indistinguishable from a random value.
-
-
- Throws if dp is invalid. See Errors.
-
-
BigNumber.config({ DECIMAL_PLACES: 10 })
-BigNumber.random() // '0.4117936847'
-BigNumber.random(20) // '0.78193327636914089009'
-
-
-
-
sum.sum(n...) ⇒ BigNumber
-
- n: number|string|BigNumber
- See BigNumber for further parameter details.
-
-
Returns a BigNumber whose value is the sum of the arguments.
-
The return value is always exact and unrounded.
-
x = new BigNumber('3257869345.0378653')
-BigNumber.sum(4e9, x, '123456789.9') // '7381326134.9378653'
-
-arr = [2, new BigNumber(14), '15.9999', 12]
-BigNumber.sum.apply(null, arr) // '43.9999'
-
-
-
-
Properties
-
- The library's enumerated rounding modes are stored as properties of the constructor.
- (They are not referenced internally by the library itself.)
-
-
- Rounding modes 0 to 6 (inclusive) are the same as those of Java's
- BigDecimal class.
-
-
-
- | Property |
- Value |
- Description |
-
-
- | ROUND_UP |
- 0 |
- Rounds away from zero |
-
-
- | ROUND_DOWN |
- 1 |
- Rounds towards zero |
-
-
- | ROUND_CEIL |
- 2 |
- Rounds towards Infinity |
-
-
- | ROUND_FLOOR |
- 3 |
- Rounds towards -Infinity |
-
-
- | ROUND_HALF_UP |
- 4 |
-
- Rounds towards nearest neighbour.
- If equidistant, rounds away from zero
- |
-
-
- | ROUND_HALF_DOWN |
- 5 |
-
- Rounds towards nearest neighbour.
- If equidistant, rounds towards zero
- |
-
-
- | ROUND_HALF_EVEN |
- 6 |
-
- Rounds towards nearest neighbour.
- If equidistant, rounds towards even neighbour
- |
-
-
- | ROUND_HALF_CEIL |
- 7 |
-
- Rounds towards nearest neighbour.
- If equidistant, rounds towards Infinity
- |
-
-
- | ROUND_HALF_FLOOR |
- 8 |
-
- Rounds towards nearest neighbour.
- If equidistant, rounds towards -Infinity
- |
-
-
-
-BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL })
-BigNumber.config({ ROUNDING_MODE: 2 }) // equivalent
-
-
DEBUG
-
undefined|false|true
-
- If BigNumber.DEBUG is set true then an error will be thrown
- if this BigNumber constructor receives an invalid value, such as
- a value of type number with more than 15 significant digits.
- See BigNumber.
-
-
- An error will also be thrown if the isBigNumber
- method receives a BigNumber that is not well-formed.
- See isBigNumber.
-
-
BigNumber.DEBUG = true
-
-
-
INSTANCE
-
-
-
Methods
-
The methods inherited by a BigNumber instance from its constructor's prototype object.
-
A BigNumber is immutable in the sense that it is not changed by its methods.
-
- The treatment of ±0, ±Infinity and NaN is
- consistent with how JavaScript treats these values.
-
-
Many method names have a shorter alias.
-
-
-
-
absoluteValue.abs() ⇒ BigNumber
-
- Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of
- this BigNumber.
-
-
The return value is always exact and unrounded.
-
-x = new BigNumber(-0.8)
-y = x.absoluteValue() // '0.8'
-z = y.abs() // '0.8'
-
-
-
-
- comparedTo.comparedTo(n [, base]) ⇒ number
-
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- | Returns | |
-
- 1 |
- If the value of this BigNumber is greater than the value of n |
-
-
- -1 |
- If the value of this BigNumber is less than the value of n |
-
-
- 0 |
- If this BigNumber and n have the same value |
-
-
- null |
- If the value of either this BigNumber or n is NaN |
-
-
-
-x = new BigNumber(Infinity)
-y = new BigNumber(5)
-x.comparedTo(y) // 1
-x.comparedTo(x.minus(1)) // 0
-y.comparedTo(NaN) // null
-y.comparedTo('110', 2) // -1
-
-
-
-
- decimalPlaces.dp([dp [, rm]]) ⇒ BigNumber|number
-
-
- dp: number: integer, 0 to 1e+9 inclusive
- rm: number: integer, 0 to 8 inclusive
-
-
- If dp is a number, returns a BigNumber whose value is the value of this BigNumber
- rounded by rounding mode rm to a maximum of dp decimal places.
-
-
- If dp is omitted, or is null or undefined, the return
- value is the number of decimal places of the value of this BigNumber, or null if
- the value of this BigNumber is ±Infinity or NaN.
-
-
- If rm is omitted, or is null or undefined,
- ROUNDING_MODE is used.
-
-
- Throws if dp or rm is invalid. See Errors.
-
-
-x = new BigNumber(1234.56)
-x.decimalPlaces(1) // '1234.6'
-x.dp() // 2
-x.decimalPlaces(2) // '1234.56'
-x.dp(10) // '1234.56'
-x.decimalPlaces(0, 1) // '1234'
-x.dp(0, 6) // '1235'
-x.decimalPlaces(1, 1) // '1234.5'
-x.dp(1, BigNumber.ROUND_HALF_EVEN) // '1234.6'
-x // '1234.56'
-y = new BigNumber('9.9e-101')
-y.dp() // 102
-
-
-
-
dividedBy.div(n [, base]) ⇒ BigNumber
-
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns a BigNumber whose value is the value of this BigNumber divided by
- n, rounded according to the current
- DECIMAL_PLACES and
- ROUNDING_MODE settings.
-
-
-x = new BigNumber(355)
-y = new BigNumber(113)
-x.dividedBy(y) // '3.14159292035398230088'
-x.div(5) // '71'
-x.div(47, 16) // '5'
-
-
-
-
- dividedToIntegerBy.idiv(n [, base]) ⇒
- BigNumber
-
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns a BigNumber whose value is the integer part of dividing the value of this BigNumber by
- n.
-
-
-x = new BigNumber(5)
-y = new BigNumber(3)
-x.dividedToIntegerBy(y) // '1'
-x.idiv(0.7) // '7'
-x.idiv('0.f', 16) // '5'
-
-
-
-
- exponentiatedBy.pow(n [, m]) ⇒ BigNumber
-
-
- n: number|string|BigNumber: integer
- m: number|string|BigNumber
-
-
- Returns a BigNumber whose value is the value of this BigNumber exponentiated by
- n, i.e. raised to the power n, and optionally modulo a modulus
- m.
-
-
- Throws if n is not an integer. See Errors.
-
-
- If n is negative the result is rounded according to the current
- DECIMAL_PLACES and
- ROUNDING_MODE settings.
-
-
- As the number of digits of the result of the power operation can grow so large so quickly,
- e.g. 123.45610000 has over 50000 digits, the number of significant
- digits calculated is limited to the value of the
- POW_PRECISION setting (unless a modulus
- m is specified).
-
-
- By default POW_PRECISION is set to 0.
- This means that an unlimited number of significant digits will be calculated, and that the
- method's performance will decrease dramatically for larger exponents.
-
-
- If m is specified and the value of m, n and this
- BigNumber are integers, and n is positive, then a fast modular exponentiation
- algorithm is used, otherwise the operation will be performed as
- x.exponentiatedBy(n).modulo(m) with a
- POW_PRECISION of 0.
-
-
-Math.pow(0.7, 2) // 0.48999999999999994
-x = new BigNumber(0.7)
-x.exponentiatedBy(2) // '0.49'
-BigNumber(3).pow(-2) // '0.11111111111111111111'
-
-
-
-
- integerValue.integerValue([rm]) ⇒ BigNumber
-
-
- rm: number: integer, 0 to 8 inclusive
-
-
- Returns a BigNumber whose value is the value of this BigNumber rounded to an integer using
- rounding mode rm.
-
-
- If rm is omitted, or is null or undefined,
- ROUNDING_MODE is used.
-
-
- Throws if rm is invalid. See Errors.
-
-
-x = new BigNumber(123.456)
-x.integerValue() // '123'
-x.integerValue(BigNumber.ROUND_CEIL) // '124'
-y = new BigNumber(-12.7)
-y.integerValue() // '-13'
-y.integerValue(BigNumber.ROUND_DOWN) // '-12'
-
- The following is an example of how to add a prototype method that emulates JavaScript's
- Math.round function. Math.ceil, Math.floor and
- Math.trunc can be emulated in the same way with
- BigNumber.ROUND_CEIL, BigNumber.ROUND_FLOOR and
- BigNumber.ROUND_DOWN respectively.
-
-
-BigNumber.prototype.round = function (n) {
- return n.integerValue(BigNumber.ROUND_HALF_CEIL);
-};
-x.round() // '123'
-
-
-
-
isEqualTo.eq(n [, base]) ⇒ boolean
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns true if the value of this BigNumber is equal to the value of
- n, otherwise returns false.
- As with JavaScript, NaN does not equal NaN.
-
-
Note: This method uses the comparedTo method internally.
-
-0 === 1e-324 // true
-x = new BigNumber(0)
-x.isEqualTo('1e-324') // false
-BigNumber(-0).eq(x) // true ( -0 === 0 )
-BigNumber(255).eq('ff', 16) // true
-
-y = new BigNumber(NaN)
-y.isEqualTo(NaN) // false
-
-
-
-
isFinite.isFinite() ⇒ boolean
-
- Returns true if the value of this BigNumber is a finite number, otherwise
- returns false.
-
-
- The only possible non-finite values of a BigNumber are NaN, Infinity
- and -Infinity.
-
-
-x = new BigNumber(1)
-x.isFinite() // true
-y = new BigNumber(Infinity)
-y.isFinite() // false
-
- Note: The native method isFinite() can be used if
- n <= Number.MAX_VALUE.
-
-
-
-
-
isGreaterThan.gt(n [, base]) ⇒ boolean
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns true if the value of this BigNumber is greater than the value of
- n, otherwise returns false.
-
-
Note: This method uses the comparedTo method internally.
-
-0.1 > (0.3 - 0.2) // true
-x = new BigNumber(0.1)
-x.isGreaterThan(BigNumber(0.3).minus(0.2)) // false
-BigNumber(0).gt(x) // false
-BigNumber(11, 3).gt(11.1, 2) // true
-
-
-
-
- isGreaterThanOrEqualTo.gte(n [, base]) ⇒ boolean
-
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns true if the value of this BigNumber is greater than or equal to the value
- of n, otherwise returns false.
-
-
Note: This method uses the comparedTo method internally.
-
-(0.3 - 0.2) >= 0.1 // false
-x = new BigNumber(0.3).minus(0.2)
-x.isGreaterThanOrEqualTo(0.1) // true
-BigNumber(1).gte(x) // true
-BigNumber(10, 18).gte('i', 36) // true
-
-
-
-
isInteger.isInteger() ⇒ boolean
-
- Returns true if the value of this BigNumber is an integer, otherwise returns
- false.
-
-
-x = new BigNumber(1)
-x.isInteger() // true
-y = new BigNumber(123.456)
-y.isInteger() // false
-
-
-
-
isLessThan.lt(n [, base]) ⇒ boolean
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns true if the value of this BigNumber is less than the value of
- n, otherwise returns false.
-
-
Note: This method uses the comparedTo method internally.
-
-(0.3 - 0.2) < 0.1 // true
-x = new BigNumber(0.3).minus(0.2)
-x.isLessThan(0.1) // false
-BigNumber(0).lt(x) // true
-BigNumber(11.1, 2).lt(11, 3) // true
-
-
-
-
- isLessThanOrEqualTo.lte(n [, base]) ⇒ boolean
-
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns true if the value of this BigNumber is less than or equal to the value of
- n, otherwise returns false.
-
-
Note: This method uses the comparedTo method internally.
-
-0.1 <= (0.3 - 0.2) // false
-x = new BigNumber(0.1)
-x.isLessThanOrEqualTo(BigNumber(0.3).minus(0.2)) // true
-BigNumber(-1).lte(x) // true
-BigNumber(10, 18).lte('i', 36) // true
-
-
-
-
isNaN.isNaN() ⇒ boolean
-
- Returns true if the value of this BigNumber is NaN, otherwise
- returns false.
-
-
-x = new BigNumber(NaN)
-x.isNaN() // true
-y = new BigNumber('Infinity')
-y.isNaN() // false
-
Note: The native method isNaN() can also be used.
-
-
-
-
isNegative.isNegative() ⇒ boolean
-
- Returns true if the sign of this BigNumber is negative, otherwise returns
- false.
-
-
-x = new BigNumber(-0)
-x.isNegative() // true
-y = new BigNumber(2)
-y.isNegative() // false
-
Note: n < 0 can be used if n <= -Number.MIN_VALUE.
-
-
-
-
isPositive.isPositive() ⇒ boolean
-
- Returns true if the sign of this BigNumber is positive, otherwise returns
- false.
-
-
-x = new BigNumber(-0)
-x.isPositive() // false
-y = new BigNumber(2)
-y.isPositive() // true
-
-
-
-
isZero.isZero() ⇒ boolean
-
- Returns true if the value of this BigNumber is zero or minus zero, otherwise
- returns false.
-
-
-x = new BigNumber(-0)
-x.isZero() && x.isNegative() // true
-y = new BigNumber(Infinity)
-y.isZero() // false
-
Note: n == 0 can be used if n >= Number.MIN_VALUE.
-
-
-
-
- minus.minus(n [, base]) ⇒ BigNumber
-
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
Returns a BigNumber whose value is the value of this BigNumber minus n.
-
The return value is always exact and unrounded.
-
-0.3 - 0.1 // 0.19999999999999998
-x = new BigNumber(0.3)
-x.minus(0.1) // '0.2'
-x.minus(0.6, 20) // '0'
-
-
-
-
modulo.mod(n [, base]) ⇒ BigNumber
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns a BigNumber whose value is the value of this BigNumber modulo n, i.e.
- the integer remainder of dividing this BigNumber by n.
-
-
- The value returned, and in particular its sign, is dependent on the value of the
- MODULO_MODE setting of this BigNumber constructor.
- If it is 1 (default value), the result will have the same sign as this BigNumber,
- and it will match that of Javascript's % operator (within the limits of double
- precision) and BigDecimal's remainder method.
-
-
The return value is always exact and unrounded.
-
- See MODULO_MODE for a description of the other
- modulo modes.
-
-
-1 % 0.9 // 0.09999999999999998
-x = new BigNumber(1)
-x.modulo(0.9) // '0.1'
-y = new BigNumber(33)
-y.mod('a', 33) // '3'
-
-
-
-
- multipliedBy.times(n [, base]) ⇒ BigNumber
-
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
- Returns a BigNumber whose value is the value of this BigNumber multiplied by n.
-
-
The return value is always exact and unrounded.
-
-0.6 * 3 // 1.7999999999999998
-x = new BigNumber(0.6)
-y = x.multipliedBy(3) // '1.8'
-BigNumber('7e+500').times(y) // '1.26e+501'
-x.multipliedBy('-a', 16) // '-6'
-
-
-
-
negated.negated() ⇒ BigNumber
-
- Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by
- -1.
-
-
-x = new BigNumber(1.8)
-x.negated() // '-1.8'
-y = new BigNumber(-1.3)
-y.negated() // '1.3'
-
-
-
-
plus.plus(n [, base]) ⇒ BigNumber
-
- n: number|string|BigNumber
- base: number
- See BigNumber for further parameter details.
-
-
Returns a BigNumber whose value is the value of this BigNumber plus n.
-
The return value is always exact and unrounded.
-
-0.1 + 0.2 // 0.30000000000000004
-x = new BigNumber(0.1)
-y = x.plus(0.2) // '0.3'
-BigNumber(0.7).plus(x).plus(y) // '1'
-x.plus('0.1', 8) // '0.225'
-
-
-
-
- precision.sd([d [, rm]]) ⇒ BigNumber|number
-
-
- d: number|boolean: integer, 1 to 1e+9
- inclusive, or true or false
- rm: number: integer, 0 to 8 inclusive.
-
-
- If d is a number, returns a BigNumber whose value is the value of this BigNumber
- rounded to a precision of d significant digits using rounding mode
- rm.
-
-
- If d is omitted or is null or undefined, the return
- value is the number of significant digits of the value of this BigNumber, or null
- if the value of this BigNumber is ±Infinity or NaN.
-
-
- If d is true then any trailing zeros of the integer
- part of a number are counted as significant digits, otherwise they are not.
-
-
- If rm is omitted or is null or undefined,
- ROUNDING_MODE will be used.
-
-
- Throws if d or rm is invalid. See Errors.
-
-
-x = new BigNumber(9876.54321)
-x.precision(6) // '9876.54'
-x.sd() // 9
-x.precision(6, BigNumber.ROUND_UP) // '9876.55'
-x.sd(2) // '9900'
-x.precision(2, 1) // '9800'
-x // '9876.54321'
-y = new BigNumber(987000)
-y.precision() // 3
-y.sd(true) // 6
-
-
-
-
shiftedBy.shiftedBy(n) ⇒ BigNumber
-
- n: number: integer,
- -9007199254740991 to 9007199254740991 inclusive
-
-
- Returns a BigNumber whose value is the value of this BigNumber shifted by n
- places.
-
- The shift is of the decimal point, i.e. of powers of ten, and is to the left if n
- is negative or to the right if n is positive.
-
-
The return value is always exact and unrounded.
-
- Throws if n is invalid. See Errors.
-
-
-x = new BigNumber(1.23)
-x.shiftedBy(3) // '1230'
-x.shiftedBy(-3) // '0.00123'
-
-
-
-
squareRoot.sqrt() ⇒ BigNumber
-
- Returns a BigNumber whose value is the square root of the value of this BigNumber,
- rounded according to the current
- DECIMAL_PLACES and
- ROUNDING_MODE settings.
-
-
- The return value will be correctly rounded, i.e. rounded as if the result was first calculated
- to an infinite number of correct digits before rounding.
-
-
-x = new BigNumber(16)
-x.squareRoot() // '4'
-y = new BigNumber(3)
-y.sqrt() // '1.73205080756887729353'
-
-
-
-
- toExponential.toExponential([dp [, rm]]) ⇒ string
-
-
- dp: number: integer, 0 to 1e+9 inclusive
- rm: number: integer, 0 to 8 inclusive
-
-
- Returns a string representing the value of this BigNumber in exponential notation rounded
- using rounding mode rm to dp decimal places, i.e with one digit
- before the decimal point and dp digits after it.
-
-
- If the value of this BigNumber in exponential notation has fewer than dp fraction
- digits, the return value will be appended with zeros accordingly.
-
-
- If dp is omitted, or is null or undefined, the number
- of digits after the decimal point defaults to the minimum number of digits necessary to
- represent the value exactly.
- If rm is omitted or is null or undefined,
- ROUNDING_MODE is used.
-
-
- Throws if dp or rm is invalid. See Errors.
-
-
-x = 45.6
-y = new BigNumber(x)
-x.toExponential() // '4.56e+1'
-y.toExponential() // '4.56e+1'
-x.toExponential(0) // '5e+1'
-y.toExponential(0) // '5e+1'
-x.toExponential(1) // '4.6e+1'
-y.toExponential(1) // '4.6e+1'
-y.toExponential(1, 1) // '4.5e+1' (ROUND_DOWN)
-x.toExponential(3) // '4.560e+1'
-y.toExponential(3) // '4.560e+1'
-
-
-
-
- toFixed.toFixed([dp [, rm]]) ⇒ string
-
-
- dp: number: integer, 0 to 1e+9 inclusive
- rm: number: integer, 0 to 8 inclusive
-
-
- Returns a string representing the value of this BigNumber in normal (fixed-point) notation
- rounded to dp decimal places using rounding mode rm.
-
-
- If the value of this BigNumber in normal notation has fewer than dp fraction
- digits, the return value will be appended with zeros accordingly.
-
-
- Unlike Number.prototype.toFixed, which returns exponential notation if a number
- is greater or equal to 1021, this method will always return normal
- notation.
-
-
- If dp is omitted or is null or undefined, the return
- value will be unrounded and in normal notation. This is also unlike
- Number.prototype.toFixed, which returns the value to zero decimal places.
- It is useful when fixed-point notation is required and the current
- EXPONENTIAL_AT setting causes
- toString to return exponential notation.
- If rm is omitted or is null or undefined,
- ROUNDING_MODE is used.
-
-
- Throws if dp or rm is invalid. See Errors.
-
-
-x = 3.456
-y = new BigNumber(x)
-x.toFixed() // '3'
-y.toFixed() // '3.456'
-y.toFixed(0) // '3'
-x.toFixed(2) // '3.46'
-y.toFixed(2) // '3.46'
-y.toFixed(2, 1) // '3.45' (ROUND_DOWN)
-x.toFixed(5) // '3.45600'
-y.toFixed(5) // '3.45600'
-
-
-
-
- toFormat.toFormat([dp [, rm[, format]]]) ⇒ string
-
-
- dp: number: integer, 0 to 1e+9 inclusive
- rm: number: integer, 0 to 8 inclusive
- format: object: see FORMAT
-
-
-
- Returns a string representing the value of this BigNumber in normal (fixed-point) notation
- rounded to dp decimal places using rounding mode rm, and formatted
- according to the properties of the format object.
-
-
- See FORMAT and the examples below for the properties of the
- format object, their types, and their usage. A formatting object may contain
- some or all of the recognised properties.
-
-
- If dp is omitted or is null or undefined, then the
- return value is not rounded to a fixed number of decimal places.
- If rm is omitted or is null or undefined,
- ROUNDING_MODE is used.
- If format is omitted or is null or undefined, the
- FORMAT object is used.
-
-
- Throws if dp, rm or format is invalid. See
- Errors.
-
-
-fmt = {
- prefix = '',
- decimalSeparator: '.',
- groupSeparator: ',',
- groupSize: 3,
- secondaryGroupSize: 0,
- fractionGroupSeparator: ' ',
- fractionGroupSize: 0,
- suffix = ''
-}
-
-x = new BigNumber('123456789.123456789')
-
-// Set the global formatting options
-BigNumber.config({ FORMAT: fmt })
-
-x.toFormat() // '123,456,789.123456789'
-x.toFormat(3) // '123,456,789.123'
-
-// If a reference to the object assigned to FORMAT has been retained,
-// the format properties can be changed directly
-fmt.groupSeparator = ' '
-fmt.fractionGroupSize = 5
-x.toFormat() // '123 456 789.12345 6789'
-
-// Alternatively, pass the formatting options as an argument
-fmt = {
- prefix: '=> ',
- decimalSeparator: ',',
- groupSeparator: '.',
- groupSize: 3,
- secondaryGroupSize: 2
-}
-
-x.toFormat() // '123 456 789.12345 6789'
-x.toFormat(fmt) // '=> 12.34.56.789,123456789'
-x.toFormat(2, fmt) // '=> 12.34.56.789,12'
-x.toFormat(3, BigNumber.ROUND_UP, fmt) // '=> 12.34.56.789,124'
-
-
-
-
- toFraction.toFraction([maximum_denominator])
- ⇒ [BigNumber, BigNumber]
-
-
- maximum_denominator:
- number|string|BigNumber: integer >= 1 and <=
- Infinity
-
-
- Returns an array of two BigNumbers representing the value of this BigNumber as a simple
- fraction with an integer numerator and an integer denominator. The denominator will be a
- positive non-zero value less than or equal to maximum_denominator.
-
-
- If a maximum_denominator is not specified, or is null or
- undefined, the denominator will be the lowest value necessary to represent the
- number exactly.
-
-
- Throws if maximum_denominator is invalid. See Errors.
-
-
-x = new BigNumber(1.75)
-x.toFraction() // '7, 4'
-
-pi = new BigNumber('3.14159265358')
-pi.toFraction() // '157079632679,50000000000'
-pi.toFraction(100000) // '312689, 99532'
-pi.toFraction(10000) // '355, 113'
-pi.toFraction(100) // '311, 99'
-pi.toFraction(10) // '22, 7'
-pi.toFraction(1) // '3, 1'
-
-
-
-
toJSON.toJSON() ⇒ string
-
As valueOf.
-
-x = new BigNumber('177.7e+457')
-y = new BigNumber(235.4325)
-z = new BigNumber('0.0098074')
-
-// Serialize an array of three BigNumbers
-str = JSON.stringify( [x, y, z] )
-// "["1.777e+459","235.4325","0.0098074"]"
-
-// Return an array of three BigNumbers
-JSON.parse(str, function (key, val) {
- return key === '' ? val : new BigNumber(val)
-})
-
-
-
-
toNumber.toNumber() ⇒ number
-
Returns the value of this BigNumber as a JavaScript number primitive.
-
- This method is identical to using type coercion with the unary plus operator.
-
-
-x = new BigNumber(456.789)
-x.toNumber() // 456.789
-+x // 456.789
-
-y = new BigNumber('45987349857634085409857349856430985')
-y.toNumber() // 4.598734985763409e+34
-
-z = new BigNumber(-0)
-1 / z.toNumber() // -Infinity
-1 / +z // -Infinity
-
-
-
-
- toPrecision.toPrecision([sd [, rm]]) ⇒ string
-
-
- sd: number: integer, 1 to 1e+9 inclusive
- rm: number: integer, 0 to 8 inclusive
-
-
- Returns a string representing the value of this BigNumber rounded to sd
- significant digits using rounding mode rm.
-
-
- If sd is less than the number of digits necessary to represent the integer part
- of the value in normal (fixed-point) notation, then exponential notation is used.
-
-
- If sd is omitted, or is null or undefined, then the
- return value is the same as n.toString().
- If rm is omitted or is null or undefined,
- ROUNDING_MODE is used.
-
-
- Throws if sd or rm is invalid. See Errors.
-
-
-x = 45.6
-y = new BigNumber(x)
-x.toPrecision() // '45.6'
-y.toPrecision() // '45.6'
-x.toPrecision(1) // '5e+1'
-y.toPrecision(1) // '5e+1'
-y.toPrecision(2, 0) // '4.6e+1' (ROUND_UP)
-y.toPrecision(2, 1) // '4.5e+1' (ROUND_DOWN)
-x.toPrecision(5) // '45.600'
-y.toPrecision(5) // '45.600'
-
-
-
-
toString.toString([base]) ⇒ string
-
- base: number: integer, 2 to ALPHABET.length
- inclusive (see ALPHABET).
-
-
- Returns a string representing the value of this BigNumber in the specified base, or base
- 10 if base is omitted or is null or
- undefined.
-
-
- For bases above 10, and using the default base conversion alphabet
- (see ALPHABET), values from 10 to
- 35 are represented by a-z
- (as with Number.prototype.toString).
-
-
- If a base is specified the value is rounded according to the current
- DECIMAL_PLACES
- and ROUNDING_MODE settings.
-
-
- If a base is not specified, and this BigNumber has a positive
- exponent that is equal to or greater than the positive component of the
- current EXPONENTIAL_AT setting,
- or a negative exponent equal to or less than the negative component of the
- setting, then exponential notation is returned.
-
-
If base is null or undefined it is ignored.
-
- Throws if base is invalid. See Errors.
-
-
-x = new BigNumber(750000)
-x.toString() // '750000'
-BigNumber.config({ EXPONENTIAL_AT: 5 })
-x.toString() // '7.5e+5'
-
-y = new BigNumber(362.875)
-y.toString(2) // '101101010.111'
-y.toString(9) // '442.77777777777777777778'
-y.toString(32) // 'ba.s'
-
-BigNumber.config({ DECIMAL_PLACES: 4 });
-z = new BigNumber('1.23456789')
-z.toString() // '1.23456789'
-z.toString(10) // '1.2346'
-
-
-
-
valueOf.valueOf() ⇒ string
-
- As toString, but does not accept a base argument and includes
- the minus sign for negative zero.
-
-
-x = new BigNumber('-0')
-x.toString() // '0'
-x.valueOf() // '-0'
-y = new BigNumber('1.777e+457')
-y.valueOf() // '1.777e+457'
-
-
-
-
Properties
-
The properties of a BigNumber instance:
-
-
- | Property |
- Description |
- Type |
- Value |
-
-
- | c |
- coefficient* |
- number[] |
- Array of base 1e14 numbers |
-
-
- | e |
- exponent |
- number |
- Integer, -1000000000 to 1000000000 inclusive |
-
-
- | s |
- sign |
- number |
- -1 or 1 |
-
-
-
*significand
-
- The value of any of the c, e and s properties may also
- be null.
-
-
- The above properties are best considered to be read-only. In early versions of this library it
- was okay to change the exponent of a BigNumber by writing to its exponent property directly,
- but this is no longer reliable as the value of the first element of the coefficient array is
- now dependent on the exponent.
-
-
- Note that, as with JavaScript numbers, the original exponent and fractional trailing zeros are
- not necessarily preserved.
-
-
x = new BigNumber(0.123) // '0.123'
-x.toExponential() // '1.23e-1'
-x.c // '1,2,3'
-x.e // -1
-x.s // 1
-
-y = new Number(-123.4567000e+2) // '-12345.67'
-y.toExponential() // '-1.234567e+4'
-z = new BigNumber('-123.4567000e+2') // '-12345.67'
-z.toExponential() // '-1.234567e+4'
-z.c // '1,2,3,4,5,6,7'
-z.e // 4
-z.s // -1
-
-
-
-
Zero, NaN and Infinity
-
- The table below shows how ±0, NaN and
- ±Infinity are stored.
-
-
-
- | |
- c |
- e |
- s |
-
-
- | ±0 |
- [0] |
- 0 |
- ±1 |
-
-
- | NaN |
- null |
- null |
- null |
-
-
- | ±Infinity |
- null |
- null |
- ±1 |
-
-
-
-x = new Number(-0) // 0
-1 / x == -Infinity // true
-
-y = new BigNumber(-0) // '0'
-y.c // '0' ( [0].toString() )
-y.e // 0
-y.s // -1
-
-
-
-
Errors
-
The table below shows the errors that are thrown.
-
- The errors are generic Error objects whose message begins
- '[BigNumber Error]'.
-
-
-
- | Method |
- Throws |
-
-
-
- BigNumber
- comparedTo
- dividedBy
- dividedToIntegerBy
- isEqualTo
- isGreaterThan
- isGreaterThanOrEqualTo
- isLessThan
- isLessThanOrEqualTo
- minus
- modulo
- plus
- multipliedBy
- |
- Base not a primitive number |
-
-
- | Base not an integer |
-
-
- | Base out of range |
-
-
- | Number primitive has more than 15 significant digits* |
-
-
- | Not a base... number* |
-
-
- | Not a number* |
-
-
- clone |
- Object expected |
-
-
- config |
- Object expected |
-
-
- DECIMAL_PLACES not a primitive number |
-
-
- DECIMAL_PLACES not an integer |
-
-
- DECIMAL_PLACES out of range |
-
-
- ROUNDING_MODE not a primitive number |
-
-
- ROUNDING_MODE not an integer |
-
-
- ROUNDING_MODE out of range |
-
-
- EXPONENTIAL_AT not a primitive number |
-
-
- EXPONENTIAL_AT not an integer |
-
-
- EXPONENTIAL_AT out of range |
-
-
- RANGE not a primitive number |
-
-
- RANGE not an integer |
-
-
- RANGE cannot be zero |
-
-
- RANGE cannot be zero |
-
-
- CRYPTO not true or false |
-
-
- crypto unavailable |
-
-
- MODULO_MODE not a primitive number |
-
-
- MODULO_MODE not an integer |
-
-
- MODULO_MODE out of range |
-
-
- POW_PRECISION not a primitive number |
-
-
- POW_PRECISION not an integer |
-
-
- POW_PRECISION out of range |
-
-
- FORMAT not an object |
-
-
- ALPHABET invalid |
-
-
-
- decimalPlaces
- precision
- random
- shiftedBy
- toExponential
- toFixed
- toFormat
- toPrecision
- |
- Argument not a primitive number |
-
-
- | Argument not an integer |
-
-
- | Argument out of range |
-
-
-
- decimalPlaces
- precision
- |
- Argument not true or false |
-
-
- exponentiatedBy |
- Argument not an integer |
-
-
- isBigNumber |
- Invalid BigNumber* |
-
-
-
- minimum
- maximum
- |
- Not a number* |
-
-
-
- random
- |
- crypto unavailable |
-
-
-
- toFormat
- |
- Argument not an object |
-
-
- toFraction |
- Argument not an integer |
-
-
- | Argument out of range |
-
-
- toString |
- Base not a primitive number |
-
-
- | Base not an integer |
-
-
- | Base out of range |
-
-
-
*Only thrown if BigNumber.DEBUG is true.
-
To determine if an exception is a BigNumber Error:
-
-try {
- // ...
-} catch (e) {
- if (e instanceof Error && e.message.indexOf('[BigNumber Error]') === 0) {
- // ...
- }
-}
-
-
-
-
Type coercion
-
- To prevent the accidental use of a BigNumber in primitive number operations, or the
- accidental addition of a BigNumber to a string, the valueOf method can be safely
- overwritten as shown below.
-
-
- The valueOf method is the same as the
- toJSON method, and both are the same as the
- toString method except they do not take a base
- argument and they include the minus sign for negative zero.
-
-
-BigNumber.prototype.valueOf = function () {
- throw Error('valueOf called!')
-}
-
-x = new BigNumber(1)
-x / 2 // '[BigNumber Error] valueOf called!'
-x + 'abc' // '[BigNumber Error] valueOf called!'
-
-
-
-
-
FAQ
-
-
Why are trailing fractional zeros removed from BigNumbers?
-
- Some arbitrary-precision libraries retain trailing fractional zeros as they can indicate the
- precision of a value. This can be useful but the results of arithmetic operations can be
- misleading.
-
-
-x = new BigDecimal("1.0")
-y = new BigDecimal("1.1000")
-z = x.add(y) // 2.1000
-
-x = new BigDecimal("1.20")
-y = new BigDecimal("3.45000")
-z = x.multiply(y) // 4.1400000
-
- To specify the precision of a value is to specify that the value lies
- within a certain range.
-
-
- In the first example, x has a value of 1.0. The trailing zero shows
- the precision of the value, implying that it is in the range 0.95 to
- 1.05. Similarly, the precision indicated by the trailing zeros of y
- indicates that the value is in the range 1.09995 to 1.10005.
-
-
- If we add the two lowest values in the ranges we have, 0.95 + 1.09995 = 2.04995,
- and if we add the two highest values we have, 1.05 + 1.10005 = 2.15005, so the
- range of the result of the addition implied by the precision of its operands is
- 2.04995 to 2.15005.
-
-
- The result given by BigDecimal of 2.1000 however, indicates that the value is in
- the range 2.09995 to 2.10005 and therefore the precision implied by
- its trailing zeros may be misleading.
-
-
- In the second example, the true range is 4.122744 to 4.157256 yet
- the BigDecimal answer of 4.1400000 indicates a range of 4.13999995
- to 4.14000005. Again, the precision implied by the trailing zeros may be
- misleading.
-
-
- This library, like binary floating point and most calculators, does not retain trailing
- fractional zeros. Instead, the toExponential, toFixed and
- toPrecision methods enable trailing zeros to be added if and when required.
-
-
-
-
-
diff --git a/node_modules/bignumber.js/package.json b/node_modules/bignumber.js/package.json
deleted file mode 100644
index 885136c..0000000
--- a/node_modules/bignumber.js/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "bignumber.js",
- "description": "A library for arbitrary-precision decimal and non-decimal arithmetic",
- "version": "9.0.0",
- "keywords": [
- "arbitrary",
- "precision",
- "arithmetic",
- "big",
- "number",
- "decimal",
- "float",
- "biginteger",
- "bigdecimal",
- "bignumber",
- "bigint",
- "bignum"
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/MikeMcl/bignumber.js.git"
- },
- "main": "bignumber",
- "module": "bignumber.mjs",
- "browser": "bignumber.js",
- "types": "bignumber.d.ts",
- "author": {
- "name": "Michael Mclaughlin",
- "email": "M8ch88l@gmail.com"
- },
- "engines": {
- "node": "*"
- },
- "license": "MIT",
- "scripts": {
- "test": "node test/test",
- "build": "uglifyjs bignumber.js --source-map -c -m -o bignumber.min.js"
- },
- "dependencies": {}
-}
diff --git a/node_modules/body-parser/HISTORY.md b/node_modules/body-parser/HISTORY.md
index fb212b3..b892491 100644
--- a/node_modules/body-parser/HISTORY.md
+++ b/node_modules/body-parser/HISTORY.md
@@ -1,3 +1,11 @@
+1.20.2 / 2023-02-21
+===================
+
+ * Fix strict json error message on Node.js 19+
+ * deps: content-type@~1.0.5
+ - perf: skip value escaping when unnecessary
+ * deps: raw-body@2.5.2
+
1.20.1 / 2022-10-06
===================
diff --git a/node_modules/body-parser/README.md b/node_modules/body-parser/README.md
index c507cbb..38553bf 100644
--- a/node_modules/body-parser/README.md
+++ b/node_modules/body-parser/README.md
@@ -1,8 +1,8 @@
# body-parser
-[![NPM Version][npm-image]][npm-url]
-[![NPM Downloads][downloads-image]][downloads-url]
-[![Build Status][github-actions-ci-image]][github-actions-ci-url]
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Node.js body parsing middleware.
@@ -454,11 +454,12 @@ app.use(bodyParser.text({ type: 'text/html' }))
[MIT](LICENSE)
-[npm-image]: https://img.shields.io/npm/v/body-parser.svg
-[npm-url]: https://npmjs.org/package/body-parser
-[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg
+[ci-image]: https://badgen.net/github/checks/expressjs/body-parser/master?label=ci
+[ci-url]: https://github.com/expressjs/body-parser/actions/workflows/ci.yml
+[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/body-parser/master
[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
-[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg
-[downloads-url]: https://npmjs.org/package/body-parser
-[github-actions-ci-image]: https://img.shields.io/github/workflow/status/expressjs/body-parser/ci/master?label=ci
-[github-actions-ci-url]: https://github.com/expressjs/body-parser/actions/workflows/ci.yml
+[node-version-image]: https://badgen.net/npm/node/body-parser
+[node-version-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/body-parser
+[npm-url]: https://npmjs.org/package/body-parser
+[npm-version-image]: https://badgen.net/npm/v/body-parser
diff --git a/node_modules/body-parser/lib/types/json.js b/node_modules/body-parser/lib/types/json.js
index c2745be..59f3f7e 100644
--- a/node_modules/body-parser/lib/types/json.js
+++ b/node_modules/body-parser/lib/types/json.js
@@ -39,6 +39,9 @@ module.exports = json
var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/ // eslint-disable-line no-control-regex
+var JSON_SYNTAX_CHAR = '#'
+var JSON_SYNTAX_REGEXP = /#+/g
+
/**
* Create a middleware to parse JSON bodies.
*
@@ -152,15 +155,23 @@ function json (options) {
function createStrictSyntaxError (str, char) {
var index = str.indexOf(char)
- var partial = index !== -1
- ? str.substring(0, index) + '#'
- : ''
+ var partial = ''
+
+ if (index !== -1) {
+ partial = str.substring(0, index) + JSON_SYNTAX_CHAR
+
+ for (var i = index + 1; i < str.length; i++) {
+ partial += JSON_SYNTAX_CHAR
+ }
+ }
try {
JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
} catch (e) {
return normalizeJsonSyntaxError(e, {
- message: e.message.replace('#', char),
+ message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) {
+ return str.substring(index, index + placeholder.length)
+ }),
stack: e.stack
})
}
diff --git a/node_modules/body-parser/package.json b/node_modules/body-parser/package.json
index 9cd2ccb..4637304 100644
--- a/node_modules/body-parser/package.json
+++ b/node_modules/body-parser/package.json
@@ -1,7 +1,7 @@
{
"name": "body-parser",
"description": "Node.js body parsing middleware",
- "version": "1.20.1",
+ "version": "1.20.2",
"contributors": [
"Douglas Christopher Wilson ",
"Jonathan Ong (http://jongleberry.com)"
@@ -10,7 +10,7 @@
"repository": "expressjs/body-parser",
"dependencies": {
"bytes": "3.1.2",
- "content-type": "~1.0.4",
+ "content-type": "~1.0.5",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
@@ -18,23 +18,23 @@
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
"qs": "6.11.0",
- "raw-body": "2.5.1",
+ "raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
},
"devDependencies": {
- "eslint": "8.24.0",
+ "eslint": "8.34.0",
"eslint-config-standard": "14.1.1",
- "eslint-plugin-import": "2.26.0",
+ "eslint-plugin-import": "2.27.5",
"eslint-plugin-markdown": "3.0.0",
"eslint-plugin-node": "11.1.0",
- "eslint-plugin-promise": "6.0.1",
+ "eslint-plugin-promise": "6.1.1",
"eslint-plugin-standard": "4.1.0",
"methods": "1.1.2",
- "mocha": "10.0.0",
+ "mocha": "10.2.0",
"nyc": "15.1.0",
"safe-buffer": "5.2.1",
- "supertest": "6.3.0"
+ "supertest": "6.3.3"
},
"files": [
"lib/",
diff --git a/node_modules/content-disposition/HISTORY.md b/node_modules/content-disposition/HISTORY.md
index 488effa..1192551 100644
--- a/node_modules/content-disposition/HISTORY.md
+++ b/node_modules/content-disposition/HISTORY.md
@@ -1,23 +1,3 @@
-0.5.4 / 2021-12-10
-==================
-
- * deps: safe-buffer@5.2.1
-
-0.5.3 / 2018-12-17
-==================
-
- * Use `safe-buffer` for improved Buffer API
-
-0.5.2 / 2016-12-08
-==================
-
- * Fix `parse` to accept any linear whitespace character
-
-0.5.1 / 2016-01-17
-==================
-
- * perf: enable strict mode
-
0.5.0 / 2014-10-11
==================
diff --git a/node_modules/content-disposition/LICENSE b/node_modules/content-disposition/LICENSE
index 84441fb..b7dce6c 100644
--- a/node_modules/content-disposition/LICENSE
+++ b/node_modules/content-disposition/LICENSE
@@ -1,6 +1,6 @@
(The MIT License)
-Copyright (c) 2014-2017 Douglas Christopher Wilson
+Copyright (c) 2014 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/node_modules/content-disposition/README.md b/node_modules/content-disposition/README.md
index 3a0bb05..d265431 100644
--- a/node_modules/content-disposition/README.md
+++ b/node_modules/content-disposition/README.md
@@ -3,7 +3,7 @@
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
-[![Build Status][github-actions-ci-image]][github-actions-ci-url]
+[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Create and parse HTTP `Content-Disposition` header
@@ -67,7 +67,7 @@ it). The type is normalized to lower-case.
### contentDisposition.parse(string)
```js
-var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt')
+var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt"');
```
Parse a `Content-Disposition` header string. This automatically handles extended
@@ -88,13 +88,12 @@ are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-
```js
var contentDisposition = require('content-disposition')
var destroy = require('destroy')
-var fs = require('fs')
var http = require('http')
var onFinished = require('on-finished')
var filePath = '/path/to/public/plans.pdf'
-http.createServer(function onRequest (req, res) {
+http.createServer(function onRequest(req, res) {
// set headers
res.setHeader('Content-Type', 'application/pdf')
res.setHeader('Content-Disposition', contentDisposition(filePath))
@@ -102,7 +101,7 @@ http.createServer(function onRequest (req, res) {
// send file
var stream = fs.createReadStream(filePath)
stream.pipe(res)
- onFinished(res, function () {
+ onFinished(res, function (err) {
destroy(stream)
})
})
@@ -130,13 +129,13 @@ $ npm test
[MIT](LICENSE)
-[npm-image]: https://img.shields.io/npm/v/content-disposition.svg
+[npm-image]: https://img.shields.io/npm/v/content-disposition.svg?style=flat
[npm-url]: https://npmjs.org/package/content-disposition
-[node-version-image]: https://img.shields.io/node/v/content-disposition.svg
-[node-version-url]: https://nodejs.org/en/download
-[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg
+[node-version-image]: https://img.shields.io/node/v/content-disposition.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/content-disposition
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg?style=flat
[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
-[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg
+[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg?style=flat
[downloads-url]: https://npmjs.org/package/content-disposition
-[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/content-disposition/ci/master?label=ci
-[github-actions-ci-url]: https://github.com/jshttp/content-disposition?query=workflow%3Aci
diff --git a/node_modules/content-disposition/index.js b/node_modules/content-disposition/index.js
index ecec899..fa3bc74 100644
--- a/node_modules/content-disposition/index.js
+++ b/node_modules/content-disposition/index.js
@@ -1,14 +1,11 @@
/*!
* content-disposition
- * Copyright(c) 2014-2017 Douglas Christopher Wilson
+ * Copyright(c) 2014 Douglas Christopher Wilson
* MIT Licensed
*/
-'use strict'
-
/**
* Module exports.
- * @public
*/
module.exports = contentDisposition
@@ -16,50 +13,43 @@ module.exports.parse = parse
/**
* Module dependencies.
- * @private
*/
var basename = require('path').basename
-var Buffer = require('safe-buffer').Buffer
/**
* RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
- * @private
*/
-var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex
+var encodeUriAttrCharRegExp = /[\x00-\x20"'\(\)*,\/:;<=>?@\[\\\]\{\}\x7f]/g
/**
* RegExp to match percent encoding escape.
- * @private
*/
-var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/
-var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g
+var hexEscapeRegExp = /%[0-9A-Fa-f]{2}/
+var hexEscapeReplaceRegExp = /%([0-9A-Fa-f]{2})/g
/**
* RegExp to match non-latin1 characters.
- * @private
*/
-var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g
+var nonLatin1RegExp = /[^\x20-\x7e\xa0-\xff]/g
/**
* RegExp to match quoted-pair in RFC 2616
*
* quoted-pair = "\" CHAR
* CHAR =
- * @private
*/
-var QESC_REGEXP = /\\([\u0000-\u007f])/g // eslint-disable-line no-control-regex
+var qescRegExp = /\\([\u0000-\u007f])/g;
/**
* RegExp to match chars that must be quoted-pair in RFC 2616
- * @private
*/
-var QUOTE_REGEXP = /([\\"])/g
+var quoteRegExp = /([\\"])/g
/**
* RegExp for various RFC 2616 grammar
@@ -83,12 +73,11 @@ var QUOTE_REGEXP = /([\\"])/g
* HT =
* CTL =
* OCTET =
- * @private
*/
-var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex
-var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/
-var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/
+var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g
+var textRegExp = /^[\x20-\x7e\x80-\xff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
/**
* RegExp for various RFC 5987 grammar
@@ -109,10 +98,9 @@ var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/
* attr-char = ALPHA / DIGIT
* / "!" / "#" / "$" / "&" / "+" / "-" / "."
* / "^" / "_" / "`" / "|" / "~"
- * @private
*/
-var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/
+var extValueRegExp = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+\-\.^_`|~])+)$/
/**
* RegExp for various RFC 6266 grammar
@@ -125,10 +113,9 @@ var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-
* disp-ext-parm = token "=" value
* | ext-token "=" ext-value
* ext-token =
- * @private
*/
-var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex
+var dispositionTypeRegExp = /^([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *(?:$|;)/
/**
* Create an attachment Content-Disposition header.
@@ -138,10 +125,10 @@ var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/
* @param {string} [options.type=attachment]
* @param {string|boolean} [options.fallback=true]
* @return {string}
- * @public
+ * @api public
*/
-function contentDisposition (filename, options) {
+function contentDisposition(filename, options) {
var opts = options || {}
// get type
@@ -160,10 +147,10 @@ function contentDisposition (filename, options) {
* @param {string} [filename]
* @param {string|boolean} [fallback=true]
* @return {object}
- * @private
+ * @api private
*/
-function createparams (filename, fallback) {
+function createparams(filename, fallback) {
if (filename === undefined) {
return
}
@@ -183,7 +170,7 @@ function createparams (filename, fallback) {
throw new TypeError('fallback must be a string or boolean')
}
- if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) {
+ if (typeof fallback === 'string' && nonLatin1RegExp.test(fallback)) {
throw new TypeError('fallback must be ISO-8859-1 string')
}
@@ -191,7 +178,7 @@ function createparams (filename, fallback) {
var name = basename(filename)
// determine if name is suitable for quoted string
- var isQuotedString = TEXT_REGEXP.test(name)
+ var isQuotedString = textRegExp.test(name)
// generate fallback name
var fallbackName = typeof fallback !== 'string'
@@ -200,7 +187,7 @@ function createparams (filename, fallback) {
var hasFallback = typeof fallbackName === 'string' && fallbackName !== name
// set extended filename parameter
- if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) {
+ if (hasFallback || !isQuotedString || hexEscapeRegExp.test(name)) {
params['filename*'] = name
}
@@ -221,14 +208,14 @@ function createparams (filename, fallback) {
* @param {string} obj.type
* @param {object} [obj.parameters]
* @return {string}
- * @private
+ * @api private
*/
-function format (obj) {
+function format(obj) {
var parameters = obj.parameters
var type = obj.type
- if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) {
+ if (!type || typeof type !== 'string' || !tokenRegExp.test(type)) {
throw new TypeError('invalid type')
}
@@ -255,15 +242,15 @@ function format (obj) {
}
/**
- * Decode a RFC 5987 field value (gracefully).
+ * Decode a RFC 6987 field value (gracefully).
*
* @param {string} str
* @return {string}
- * @private
+ * @api private
*/
-function decodefield (str) {
- var match = EXT_VALUE_REGEXP.exec(str)
+function decodefield(str) {
+ var match = extValueRegExp.exec(str)
if (!match) {
throw new TypeError('invalid extended field value')
@@ -274,14 +261,14 @@ function decodefield (str) {
var value
// to binary string
- var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode)
+ var binary = encoded.replace(hexEscapeReplaceRegExp, pdecode)
switch (charset) {
case 'iso-8859-1':
value = getlatin1(binary)
break
case 'utf-8':
- value = Buffer.from(binary, 'binary').toString('utf8')
+ value = new Buffer(binary, 'binary').toString('utf8')
break
default:
throw new TypeError('unsupported charset in extended field')
@@ -295,12 +282,12 @@ function decodefield (str) {
*
* @param {string} val
* @return {string}
- * @private
+ * @api private
*/
-function getlatin1 (val) {
+function getlatin1(val) {
// simple Unicode -> ISO-8859-1 transformation
- return String(val).replace(NON_LATIN1_REGEXP, '?')
+ return String(val).replace(nonLatin1RegExp, '?')
}
/**
@@ -308,15 +295,15 @@ function getlatin1 (val) {
*
* @param {string} string
* @return {object}
- * @public
+ * @api private
*/
-function parse (string) {
+function parse(string) {
if (!string || typeof string !== 'string') {
throw new TypeError('argument string is required')
}
- var match = DISPOSITION_TYPE_REGEXP.exec(string)
+ var match = dispositionTypeRegExp.exec(string)
if (!match) {
throw new TypeError('invalid type format')
@@ -332,12 +319,12 @@ function parse (string) {
var value
// calculate index to start at
- index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
+ index = paramRegExp.lastIndex = match[0].substr(-1) === ';'
? index - 1
: index
// match parameters
- while ((match = PARAM_REGEXP.exec(string))) {
+ while (match = paramRegExp.exec(string)) {
if (match.index !== index) {
throw new TypeError('invalid parameter format')
}
@@ -370,7 +357,7 @@ function parse (string) {
// remove quotes and escapes
value = value
.substr(1, value.length - 2)
- .replace(QESC_REGEXP, '$1')
+ .replace(qescRegExp, '$1')
}
params[key] = value
@@ -389,10 +376,10 @@ function parse (string) {
* @param {string} str
* @param {string} hex
* @return {string}
- * @private
+ * @api private
*/
-function pdecode (str, hex) {
+function pdecode(str, hex) {
return String.fromCharCode(parseInt(hex, 16))
}
@@ -401,14 +388,17 @@ function pdecode (str, hex) {
*
* @param {string} char
* @return {string}
- * @private
+ * @api private
*/
-function pencode (char) {
- return '%' + String(char)
+function pencode(char) {
+ var hex = String(char)
.charCodeAt(0)
.toString(16)
.toUpperCase()
+ return hex.length === 1
+ ? '%0' + hex
+ : '%' + hex
}
/**
@@ -416,13 +406,13 @@ function pencode (char) {
*
* @param {string} val
* @return {string}
- * @private
+ * @api private
*/
-function qstring (val) {
+function qstring(val) {
var str = String(val)
- return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
}
/**
@@ -430,29 +420,24 @@ function qstring (val) {
*
* @param {string} val
* @return {string}
- * @private
+ * @api private
*/
-function ustring (val) {
+function ustring(val) {
var str = String(val)
// percent encode as UTF-8
var encoded = encodeURIComponent(str)
- .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode)
+ .replace(encodeUriAttrCharRegExp, pencode)
return 'UTF-8\'\'' + encoded
}
/**
* Class for parsed Content-Disposition header for v8 optimization
- *
- * @public
- * @param {string} type
- * @param {object} parameters
- * @constructor
*/
-function ContentDisposition (type, parameters) {
+function ContentDisposition(type, parameters) {
this.type = type
this.parameters = parameters
}
diff --git a/node_modules/content-disposition/package.json b/node_modules/content-disposition/package.json
index 43c70ce..f1423bc 100644
--- a/node_modules/content-disposition/package.json
+++ b/node_modules/content-disposition/package.json
@@ -1,8 +1,10 @@
{
"name": "content-disposition",
"description": "Create and parse Content-Disposition header",
- "version": "0.5.4",
- "author": "Douglas Christopher Wilson ",
+ "version": "0.5.0",
+ "contributors": [
+ "Douglas Christopher Wilson "
+ ],
"license": "MIT",
"keywords": [
"content-disposition",
@@ -11,20 +13,9 @@
"res"
],
"repository": "jshttp/content-disposition",
- "dependencies": {
- "safe-buffer": "5.2.1"
- },
"devDependencies": {
- "deep-equal": "1.0.1",
- "eslint": "7.32.0",
- "eslint-config-standard": "13.0.1",
- "eslint-plugin-import": "2.25.3",
- "eslint-plugin-markdown": "2.2.1",
- "eslint-plugin-node": "11.1.0",
- "eslint-plugin-promise": "5.2.0",
- "eslint-plugin-standard": "4.1.0",
- "istanbul": "0.4.5",
- "mocha": "9.1.3"
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4"
},
"files": [
"LICENSE",
@@ -36,9 +27,8 @@
"node": ">= 0.6"
},
"scripts": {
- "lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
- "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
- "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
}
}
diff --git a/node_modules/cookie/HISTORY.md b/node_modules/cookie/HISTORY.md
deleted file mode 100644
index ae9b995..0000000
--- a/node_modules/cookie/HISTORY.md
+++ /dev/null
@@ -1,142 +0,0 @@
-0.5.0 / 2022-04-11
-==================
-
- * Add `priority` option
- * Fix `expires` option to reject invalid dates
- * pref: improve default decode speed
- * pref: remove slow string split in parse
-
-0.4.2 / 2022-02-02
-==================
-
- * pref: read value only when assigning in parse
- * pref: remove unnecessary regexp in parse
-
-0.4.1 / 2020-04-21
-==================
-
- * Fix `maxAge` option to reject invalid values
-
-0.4.0 / 2019-05-15
-==================
-
- * Add `SameSite=None` support
-
-0.3.1 / 2016-05-26
-==================
-
- * Fix `sameSite: true` to work with draft-7 clients
- - `true` now sends `SameSite=Strict` instead of `SameSite`
-
-0.3.0 / 2016-05-26
-==================
-
- * Add `sameSite` option
- - Replaces `firstPartyOnly` option, never implemented by browsers
- * Improve error message when `encode` is not a function
- * Improve error message when `expires` is not a `Date`
-
-0.2.4 / 2016-05-20
-==================
-
- * perf: enable strict mode
- * perf: use for loop in parse
- * perf: use string concatination for serialization
-
-0.2.3 / 2015-10-25
-==================
-
- * Fix cookie `Max-Age` to never be a floating point number
-
-0.2.2 / 2015-09-17
-==================
-
- * Fix regression when setting empty cookie value
- - Ease the new restriction, which is just basic header-level validation
- * Fix typo in invalid value errors
-
-0.2.1 / 2015-09-17
-==================
-
- * Throw on invalid values provided to `serialize`
- - Ensures the resulting string is a valid HTTP header value
-
-0.2.0 / 2015-08-13
-==================
-
- * Add `firstPartyOnly` option
- * Throw better error for invalid argument to parse
- * perf: hoist regular expression
-
-0.1.5 / 2015-09-17
-==================
-
- * Fix regression when setting empty cookie value
- - Ease the new restriction, which is just basic header-level validation
- * Fix typo in invalid value errors
-
-0.1.4 / 2015-09-17
-==================
-
- * Throw better error for invalid argument to parse
- * Throw on invalid values provided to `serialize`
- - Ensures the resulting string is a valid HTTP header value
-
-0.1.3 / 2015-05-19
-==================
-
- * Reduce the scope of try-catch deopt
- * Remove argument reassignments
-
-0.1.2 / 2014-04-16
-==================
-
- * Remove unnecessary files from npm package
-
-0.1.1 / 2014-02-23
-==================
-
- * Fix bad parse when cookie value contained a comma
- * Fix support for `maxAge` of `0`
-
-0.1.0 / 2013-05-01
-==================
-
- * Add `decode` option
- * Add `encode` option
-
-0.0.6 / 2013-04-08
-==================
-
- * Ignore cookie parts missing `=`
-
-0.0.5 / 2012-10-29
-==================
-
- * Return raw cookie value if value unescape errors
-
-0.0.4 / 2012-06-21
-==================
-
- * Use encode/decodeURIComponent for cookie encoding/decoding
- - Improve server/client interoperability
-
-0.0.3 / 2012-06-06
-==================
-
- * Only escape special characters per the cookie RFC
-
-0.0.2 / 2012-06-01
-==================
-
- * Fix `maxAge` option to not throw error
-
-0.0.1 / 2012-05-28
-==================
-
- * Add more tests
-
-0.0.0 / 2012-05-28
-==================
-
- * Initial release
diff --git a/node_modules/cookie/LICENSE b/node_modules/cookie/LICENSE
index 058b6b4..0855435 100644
--- a/node_modules/cookie/LICENSE
+++ b/node_modules/cookie/LICENSE
@@ -1,24 +1,23 @@
-(The MIT License)
-
-Copyright (c) 2012-2014 Roman Shtylman
-Copyright (c) 2015 Douglas Christopher Wilson
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+(The MIT License)
+
+Copyright (c) 2012-2014 Roman Shtylman
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/cookie/README.md b/node_modules/cookie/README.md
index 5449c3a..acdb5c2 100644
--- a/node_modules/cookie/README.md
+++ b/node_modules/cookie/README.md
@@ -1,302 +1,64 @@
-# cookie
-
-[![NPM Version][npm-version-image]][npm-url]
-[![NPM Downloads][npm-downloads-image]][npm-url]
-[![Node.js Version][node-version-image]][node-version-url]
-[![Build Status][github-actions-ci-image]][github-actions-ci-url]
-[![Test Coverage][coveralls-image]][coveralls-url]
-
-Basic HTTP cookie parser and serializer for HTTP servers.
-
-## Installation
-
-This is a [Node.js](https://nodejs.org/en/) module available through the
-[npm registry](https://www.npmjs.com/). Installation is done using the
-[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
-
-```sh
-$ npm install cookie
-```
-
-## API
-
-```js
-var cookie = require('cookie');
-```
-
-### cookie.parse(str, options)
-
-Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs.
-The `str` argument is the string representing a `Cookie` header value and `options` is an
-optional object containing additional parsing options.
-
-```js
-var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2');
-// { foo: 'bar', equation: 'E=mc^2' }
-```
-
-#### Options
-
-`cookie.parse` accepts these properties in the options object.
-
-##### decode
-
-Specifies a function that will be used to decode a cookie's value. Since the value of a cookie
-has a limited character set (and must be a simple string), this function can be used to decode
-a previously-encoded cookie value into a JavaScript string or other object.
-
-The default function is the global `decodeURIComponent`, which will decode any URL-encoded
-sequences into their byte representations.
-
-**note** if an error is thrown from this function, the original, non-decoded cookie value will
-be returned as the cookie's value.
-
-### cookie.serialize(name, value, options)
-
-Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the
-name for the cookie, the `value` argument is the value to set the cookie to, and the `options`
-argument is an optional object containing additional serialization options.
-
-```js
-var setCookie = cookie.serialize('foo', 'bar');
-// foo=bar
-```
-
-#### Options
-
-`cookie.serialize` accepts these properties in the options object.
-
-##### domain
-
-Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6265-5.2.3]. By default, no
-domain is set, and most clients will consider the cookie to apply to only the current domain.
-
-##### encode
-
-Specifies a function that will be used to encode a cookie's value. Since value of a cookie
-has a limited character set (and must be a simple string), this function can be used to encode
-a value into a string suited for a cookie's value.
-
-The default function is the global `encodeURIComponent`, which will encode a JavaScript string
-into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range.
-
-##### expires
-
-Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6265-5.2.1].
-By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and
-will delete it on a condition like exiting a web browser application.
-
-**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and
-`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
-so if both are set, they should point to the same date and time.
-
-##### httpOnly
-
-Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6265-5.2.6]. When truthy,
-the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set.
-
-**note** be careful when setting this to `true`, as compliant clients will not allow client-side
-JavaScript to see the cookie in `document.cookie`.
-
-##### maxAge
-
-Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6265-5.2.2].
-The given number will be converted to an integer by rounding down. By default, no maximum age is set.
-
-**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and
-`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
-so if both are set, they should point to the same date and time.
-
-##### path
-
-Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path
-is considered the ["default path"][rfc-6265-5.1.4].
-
-##### priority
-
-Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
-
- - `'low'` will set the `Priority` attribute to `Low`.
- - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
- - `'high'` will set the `Priority` attribute to `High`.
-
-More information about the different priority levels can be found in
-[the specification][rfc-west-cookie-priority-00-4.1].
-
-**note** This is an attribute that has not yet been fully standardized, and may change in the future.
-This also means many clients may ignore this attribute until they understand it.
-
-##### sameSite
-
-Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-09-5.4.7].
-
- - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
- - `false` will not set the `SameSite` attribute.
- - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
- - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.
- - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
-
-More information about the different enforcement levels can be found in
-[the specification][rfc-6265bis-09-5.4.7].
-
-**note** This is an attribute that has not yet been fully standardized, and may change in the future.
-This also means many clients may ignore this attribute until they understand it.
-
-##### secure
-
-Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6265-5.2.5]. When truthy,
-the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
-
-**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to
-the server in the future if the browser does not have an HTTPS connection.
-
-## Example
-
-The following example uses this module in conjunction with the Node.js core HTTP server
-to prompt a user for their name and display it back on future visits.
-
-```js
-var cookie = require('cookie');
-var escapeHtml = require('escape-html');
-var http = require('http');
-var url = require('url');
-
-function onRequest(req, res) {
- // Parse the query string
- var query = url.parse(req.url, true, true).query;
-
- if (query && query.name) {
- // Set a new cookie with the name
- res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), {
- httpOnly: true,
- maxAge: 60 * 60 * 24 * 7 // 1 week
- }));
-
- // Redirect back after setting cookie
- res.statusCode = 302;
- res.setHeader('Location', req.headers.referer || '/');
- res.end();
- return;
- }
-
- // Parse the cookies on the request
- var cookies = cookie.parse(req.headers.cookie || '');
-
- // Get the visitor name set in the cookie
- var name = cookies.name;
-
- res.setHeader('Content-Type', 'text/html; charset=UTF-8');
-
- if (name) {
- res.write('Welcome back, ' + escapeHtml(name) + '!
');
- } else {
- res.write('Hello, new visitor!
');
- }
-
- res.write('');
-}
-
-http.createServer(onRequest).listen(3000);
-```
-
-## Testing
-
-```sh
-$ npm test
-```
-
-## Benchmark
-
-```
-$ npm run bench
-
-> cookie@0.4.2 bench
-> node benchmark/index.js
-
- node@16.14.0
- v8@9.4.146.24-node.20
- uv@1.43.0
- zlib@1.2.11
- brotli@1.0.9
- ares@1.18.1
- modules@93
- nghttp2@1.45.1
- napi@8
- llhttp@6.0.4
- openssl@1.1.1m+quic
- cldr@40.0
- icu@70.1
- tz@2021a3
- unicode@14.0
- ngtcp2@0.1.0-DEV
- nghttp3@0.1.0-DEV
-
-> node benchmark/parse-top.js
-
- cookie.parse - top sites
-
- 15 tests completed.
-
- parse accounts.google.com x 2,421,245 ops/sec ±0.80% (188 runs sampled)
- parse apple.com x 2,684,710 ops/sec ±0.59% (189 runs sampled)
- parse cloudflare.com x 2,231,418 ops/sec ±0.76% (186 runs sampled)
- parse docs.google.com x 2,316,357 ops/sec ±1.28% (187 runs sampled)
- parse drive.google.com x 2,363,543 ops/sec ±0.49% (189 runs sampled)
- parse en.wikipedia.org x 839,414 ops/sec ±0.53% (189 runs sampled)
- parse linkedin.com x 553,797 ops/sec ±0.63% (190 runs sampled)
- parse maps.google.com x 1,314,779 ops/sec ±0.72% (189 runs sampled)
- parse microsoft.com x 153,783 ops/sec ±0.53% (190 runs sampled)
- parse play.google.com x 2,249,574 ops/sec ±0.59% (187 runs sampled)
- parse plus.google.com x 2,258,682 ops/sec ±0.60% (188 runs sampled)
- parse sites.google.com x 2,247,069 ops/sec ±0.68% (189 runs sampled)
- parse support.google.com x 1,456,840 ops/sec ±0.70% (187 runs sampled)
- parse www.google.com x 1,046,028 ops/sec ±0.58% (188 runs sampled)
- parse youtu.be x 937,428 ops/sec ±1.47% (190 runs sampled)
- parse youtube.com x 963,878 ops/sec ±0.59% (190 runs sampled)
-
-> node benchmark/parse.js
-
- cookie.parse - generic
-
- 6 tests completed.
-
- simple x 2,745,604 ops/sec ±0.77% (185 runs sampled)
- decode x 557,287 ops/sec ±0.60% (188 runs sampled)
- unquote x 2,498,475 ops/sec ±0.55% (189 runs sampled)
- duplicates x 868,591 ops/sec ±0.89% (187 runs sampled)
- 10 cookies x 306,745 ops/sec ±0.49% (190 runs sampled)
- 100 cookies x 22,414 ops/sec ±2.38% (182 runs sampled)
-```
-
-## References
-
-- [RFC 6265: HTTP State Management Mechanism][rfc-6265]
-- [Same-site Cookies][rfc-6265bis-09-5.4.7]
-
-[rfc-west-cookie-priority-00-4.1]: https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1
-[rfc-6265bis-09-5.4.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7
-[rfc-6265]: https://tools.ietf.org/html/rfc6265
-[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4
-[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1
-[rfc-6265-5.2.2]: https://tools.ietf.org/html/rfc6265#section-5.2.2
-[rfc-6265-5.2.3]: https://tools.ietf.org/html/rfc6265#section-5.2.3
-[rfc-6265-5.2.4]: https://tools.ietf.org/html/rfc6265#section-5.2.4
-[rfc-6265-5.2.5]: https://tools.ietf.org/html/rfc6265#section-5.2.5
-[rfc-6265-5.2.6]: https://tools.ietf.org/html/rfc6265#section-5.2.6
-[rfc-6265-5.3]: https://tools.ietf.org/html/rfc6265#section-5.3
-
-## License
-
-[MIT](LICENSE)
-
-[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
-[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
-[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/cookie/ci/master?label=ci
-[github-actions-ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml
-[node-version-image]: https://badgen.net/npm/node/cookie
-[node-version-url]: https://nodejs.org/en/download
-[npm-downloads-image]: https://badgen.net/npm/dm/cookie
-[npm-url]: https://npmjs.org/package/cookie
-[npm-version-image]: https://badgen.net/npm/v/cookie
+# cookie
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.
+
+See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.
+
+## how?
+
+```
+npm install cookie
+```
+
+```javascript
+var cookie = require('cookie');
+
+var hdr = cookie.serialize('foo', 'bar');
+// hdr = 'foo=bar';
+
+var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');
+// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };
+```
+
+## more
+
+The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.
+
+### path
+> cookie path
+
+### expires
+> absolute expiration date for the cookie (Date object)
+
+### maxAge
+> relative max age of the cookie from when the client receives it (seconds)
+
+### domain
+> domain for the cookie
+
+### secure
+> true or false
+
+### httpOnly
+> true or false
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/cookie.svg
+[npm-url]: https://npmjs.org/package/cookie
+[node-version-image]: https://img.shields.io/node/v/cookie.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/cookie/master.svg
+[travis-url]: https://travis-ci.org/jshttp/cookie
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/cookie/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/cookie.svg
+[downloads-url]: https://npmjs.org/package/cookie
diff --git a/node_modules/cookie/SECURITY.md b/node_modules/cookie/SECURITY.md
deleted file mode 100644
index fd4a6c5..0000000
--- a/node_modules/cookie/SECURITY.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Security Policies and Procedures
-
-## Reporting a Bug
-
-The `cookie` team and community take all security bugs seriously. Thank
-you for improving the security of the project. We appreciate your efforts and
-responsible disclosure and will make every effort to acknowledge your
-contributions.
-
-Report security bugs by emailing the current owner(s) of `cookie`. This
-information can be found in the npm registry using the command
-`npm owner ls cookie`.
-If unsure or unable to get the information from the above, open an issue
-in the [project issue tracker](https://github.com/jshttp/cookie/issues)
-asking for the current contact information.
-
-To ensure the timely response to your report, please ensure that the entirety
-of the report is contained within the email body and not solely behind a web
-link or an attachment.
-
-At least one owner will acknowledge your email within 48 hours, and will send a
-more detailed response within 48 hours indicating the next steps in handling
-your report. After the initial reply to your report, the owners will
-endeavor to keep you informed of the progress towards a fix and full
-announcement, and may ask for additional information or guidance.
diff --git a/node_modules/cookie/index.js b/node_modules/cookie/index.js
index 9c3d07d..8dea066 100644
--- a/node_modules/cookie/index.js
+++ b/node_modules/cookie/index.js
@@ -1,270 +1,116 @@
-/*!
- * cookie
- * Copyright(c) 2012-2014 Roman Shtylman
- * Copyright(c) 2015 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-'use strict';
-
-/**
- * Module exports.
- * @public
- */
-
-exports.parse = parse;
-exports.serialize = serialize;
-
-/**
- * Module variables.
- * @private
- */
-
-var __toString = Object.prototype.toString
-
-/**
- * RegExp to match field-content in RFC 7230 sec 3.2
- *
- * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
- * field-vchar = VCHAR / obs-text
- * obs-text = %x80-FF
- */
-
-var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
-
-/**
- * Parse a cookie header.
- *
- * Parse the given cookie header string into an object
- * The object has the various cookies as keys(names) => values
- *
- * @param {string} str
- * @param {object} [options]
- * @return {object}
- * @public
- */
-
-function parse(str, options) {
- if (typeof str !== 'string') {
- throw new TypeError('argument str must be a string');
- }
-
- var obj = {}
- var opt = options || {};
- var dec = opt.decode || decode;
-
- var index = 0
- while (index < str.length) {
- var eqIdx = str.indexOf('=', index)
-
- // no more cookie pairs
- if (eqIdx === -1) {
- break
- }
-
- var endIdx = str.indexOf(';', index)
-
- if (endIdx === -1) {
- endIdx = str.length
- } else if (endIdx < eqIdx) {
- // backtrack on prior semicolon
- index = str.lastIndexOf(';', eqIdx - 1) + 1
- continue
- }
-
- var key = str.slice(index, eqIdx).trim()
-
- // only assign once
- if (undefined === obj[key]) {
- var val = str.slice(eqIdx + 1, endIdx).trim()
-
- // quoted values
- if (val.charCodeAt(0) === 0x22) {
- val = val.slice(1, -1)
- }
-
- obj[key] = tryDecode(val, dec);
- }
-
- index = endIdx + 1
- }
-
- return obj;
-}
-
-/**
- * Serialize data into a cookie header.
- *
- * Serialize the a name value pair into a cookie string suitable for
- * http headers. An optional options object specified cookie parameters.
- *
- * serialize('foo', 'bar', { httpOnly: true })
- * => "foo=bar; httpOnly"
- *
- * @param {string} name
- * @param {string} val
- * @param {object} [options]
- * @return {string}
- * @public
- */
-
-function serialize(name, val, options) {
- var opt = options || {};
- var enc = opt.encode || encode;
-
- if (typeof enc !== 'function') {
- throw new TypeError('option encode is invalid');
- }
-
- if (!fieldContentRegExp.test(name)) {
- throw new TypeError('argument name is invalid');
- }
-
- var value = enc(val);
-
- if (value && !fieldContentRegExp.test(value)) {
- throw new TypeError('argument val is invalid');
- }
-
- var str = name + '=' + value;
-
- if (null != opt.maxAge) {
- var maxAge = opt.maxAge - 0;
-
- if (isNaN(maxAge) || !isFinite(maxAge)) {
- throw new TypeError('option maxAge is invalid')
- }
-
- str += '; Max-Age=' + Math.floor(maxAge);
- }
-
- if (opt.domain) {
- if (!fieldContentRegExp.test(opt.domain)) {
- throw new TypeError('option domain is invalid');
- }
-
- str += '; Domain=' + opt.domain;
- }
-
- if (opt.path) {
- if (!fieldContentRegExp.test(opt.path)) {
- throw new TypeError('option path is invalid');
- }
-
- str += '; Path=' + opt.path;
- }
-
- if (opt.expires) {
- var expires = opt.expires
-
- if (!isDate(expires) || isNaN(expires.valueOf())) {
- throw new TypeError('option expires is invalid');
- }
-
- str += '; Expires=' + expires.toUTCString()
- }
-
- if (opt.httpOnly) {
- str += '; HttpOnly';
- }
-
- if (opt.secure) {
- str += '; Secure';
- }
-
- if (opt.priority) {
- var priority = typeof opt.priority === 'string'
- ? opt.priority.toLowerCase()
- : opt.priority
-
- switch (priority) {
- case 'low':
- str += '; Priority=Low'
- break
- case 'medium':
- str += '; Priority=Medium'
- break
- case 'high':
- str += '; Priority=High'
- break
- default:
- throw new TypeError('option priority is invalid')
- }
- }
-
- if (opt.sameSite) {
- var sameSite = typeof opt.sameSite === 'string'
- ? opt.sameSite.toLowerCase() : opt.sameSite;
-
- switch (sameSite) {
- case true:
- str += '; SameSite=Strict';
- break;
- case 'lax':
- str += '; SameSite=Lax';
- break;
- case 'strict':
- str += '; SameSite=Strict';
- break;
- case 'none':
- str += '; SameSite=None';
- break;
- default:
- throw new TypeError('option sameSite is invalid');
- }
- }
-
- return str;
-}
-
-/**
- * URL-decode string value. Optimized to skip native call when no %.
- *
- * @param {string} str
- * @returns {string}
- */
-
-function decode (str) {
- return str.indexOf('%') !== -1
- ? decodeURIComponent(str)
- : str
-}
-
-/**
- * URL-encode value.
- *
- * @param {string} str
- * @returns {string}
- */
-
-function encode (val) {
- return encodeURIComponent(val)
-}
-
-/**
- * Determine if value is a Date.
- *
- * @param {*} val
- * @private
- */
-
-function isDate (val) {
- return __toString.call(val) === '[object Date]' ||
- val instanceof Date
-}
-
-/**
- * Try decoding a string using a decoding function.
- *
- * @param {string} str
- * @param {function} decode
- * @private
- */
-
-function tryDecode(str, decode) {
- try {
- return decode(str);
- } catch (e) {
- return str;
- }
-}
+/*!
+ * cookie
+ * Copyright(c) 2012-2014 Roman Shtylman
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.parse = parse;
+exports.serialize = serialize;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var decode = decodeURIComponent;
+var encode = encodeURIComponent;
+
+/**
+ * Parse a cookie header.
+ *
+ * Parse the given cookie header string into an object
+ * The object has the various cookies as keys(names) => values
+ *
+ * @param {string} str
+ * @param {object} [options]
+ * @return {string}
+ * @public
+ */
+
+function parse(str, options) {
+ var obj = {}
+ var opt = options || {};
+ var pairs = str.split(/; */);
+ var dec = opt.decode || decode;
+
+ pairs.forEach(function(pair) {
+ var eq_idx = pair.indexOf('=')
+
+ // skip things that don't look like key=value
+ if (eq_idx < 0) {
+ return;
+ }
+
+ var key = pair.substr(0, eq_idx).trim()
+ var val = pair.substr(++eq_idx, pair.length).trim();
+
+ // quoted values
+ if ('"' == val[0]) {
+ val = val.slice(1, -1);
+ }
+
+ // only assign once
+ if (undefined == obj[key]) {
+ obj[key] = tryDecode(val, dec);
+ }
+ });
+
+ return obj;
+}
+
+/**
+ * Serialize data into a cookie header.
+ *
+ * Serialize the a name value pair into a cookie string suitable for
+ * http headers. An optional options object specified cookie parameters.
+ *
+ * serialize('foo', 'bar', { httpOnly: true })
+ * => "foo=bar; httpOnly"
+ *
+ * @param {string} name
+ * @param {string} val
+ * @param {object} [options]
+ * @return {string}
+ * @public
+ */
+
+function serialize(name, val, options) {
+ var opt = options || {};
+ var enc = opt.encode || encode;
+ var pairs = [name + '=' + enc(val)];
+
+ if (null != opt.maxAge) {
+ var maxAge = opt.maxAge - 0;
+ if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
+ pairs.push('Max-Age=' + maxAge);
+ }
+
+ if (opt.domain) pairs.push('Domain=' + opt.domain);
+ if (opt.path) pairs.push('Path=' + opt.path);
+ if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString());
+ if (opt.httpOnly) pairs.push('HttpOnly');
+ if (opt.secure) pairs.push('Secure');
+
+ return pairs.join('; ');
+}
+
+/**
+ * Try decoding a string using a decoding function.
+ *
+ * @param {string} str
+ * @param {function} decode
+ * @private
+ */
+
+function tryDecode(str, decode) {
+ try {
+ return decode(str);
+ } catch (e) {
+ return str;
+ }
+}
diff --git a/node_modules/cookie/package.json b/node_modules/cookie/package.json
index ed5606a..09f305f 100644
--- a/node_modules/cookie/package.json
+++ b/node_modules/cookie/package.json
@@ -1,44 +1,29 @@
-{
- "name": "cookie",
- "description": "HTTP server cookie parsing and serialization",
- "version": "0.5.0",
- "author": "Roman Shtylman ",
- "contributors": [
- "Douglas Christopher Wilson "
- ],
- "license": "MIT",
- "keywords": [
- "cookie",
- "cookies"
- ],
- "repository": "jshttp/cookie",
- "devDependencies": {
- "beautify-benchmark": "0.2.4",
- "benchmark": "2.1.4",
- "eslint": "7.32.0",
- "eslint-plugin-markdown": "2.2.1",
- "mocha": "9.2.2",
- "nyc": "15.1.0",
- "safe-buffer": "5.2.1",
- "top-sites": "1.1.97"
- },
- "files": [
- "HISTORY.md",
- "LICENSE",
- "README.md",
- "SECURITY.md",
- "index.js"
- ],
- "engines": {
- "node": ">= 0.6"
- },
- "scripts": {
- "bench": "node benchmark/index.js",
- "lint": "eslint .",
- "test": "mocha --reporter spec --bail --check-leaks test/",
- "test-ci": "nyc --reporter=lcov --reporter=text npm test",
- "test-cov": "nyc --reporter=html --reporter=text npm test",
- "update-bench": "node scripts/update-benchmark.js",
- "version": "node scripts/version-history.js && git add HISTORY.md"
- }
-}
+{
+ "name": "cookie",
+ "description": "cookie parsing and serialization",
+ "version": "0.1.3",
+ "author": "Roman Shtylman ",
+ "license": "MIT",
+ "keywords": [
+ "cookie",
+ "cookies"
+ ],
+ "repository": "jshttp/cookie",
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "1.x.x"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": "*"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ }
+}
diff --git a/node_modules/core-util-is/LICENSE b/node_modules/core-util-is/LICENSE
deleted file mode 100644
index d8d7f94..0000000
--- a/node_modules/core-util-is/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright Node.js contributors. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/node_modules/core-util-is/README.md b/node_modules/core-util-is/README.md
deleted file mode 100644
index 5a76b41..0000000
--- a/node_modules/core-util-is/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# core-util-is
-
-The `util.is*` functions introduced in Node v0.12.
diff --git a/node_modules/core-util-is/lib/util.js b/node_modules/core-util-is/lib/util.js
deleted file mode 100644
index 6e5a20d..0000000
--- a/node_modules/core-util-is/lib/util.js
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// NOTE: These type checking functions intentionally don't use `instanceof`
-// because it is fragile and can be easily faked with `Object.create()`.
-
-function isArray(arg) {
- if (Array.isArray) {
- return Array.isArray(arg);
- }
- return objectToString(arg) === '[object Array]';
-}
-exports.isArray = isArray;
-
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
-
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
-
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
-
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
-
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
-
-function isRegExp(re) {
- return objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
-
-function isDate(d) {
- return objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
-
-function isError(e) {
- return (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
-
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
-
-exports.isBuffer = require('buffer').Buffer.isBuffer;
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json
deleted file mode 100644
index b0c51f5..0000000
--- a/node_modules/core-util-is/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "core-util-is",
- "version": "1.0.3",
- "description": "The `util.is*` functions introduced in Node v0.12.",
- "main": "lib/util.js",
- "files": [
- "lib"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/core-util-is"
- },
- "keywords": [
- "util",
- "isBuffer",
- "isArray",
- "isNumber",
- "isString",
- "isRegExp",
- "isThis",
- "isThat",
- "polyfill"
- ],
- "author": "Isaac Z. Schlueter (http://blog.izs.me/)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/isaacs/core-util-is/issues"
- },
- "scripts": {
- "test": "tap test.js",
- "preversion": "npm test",
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags"
- },
- "devDependencies": {
- "tap": "^15.0.9"
- }
-}
diff --git a/node_modules/denque/CHANGELOG.md b/node_modules/denque/CHANGELOG.md
new file mode 100644
index 0000000..391a1f5
--- /dev/null
+++ b/node_modules/denque/CHANGELOG.md
@@ -0,0 +1,29 @@
+## 2.1.0
+
+ - fix: issue where `clear()` is still keeping references to the elements (#47)
+ - refactor: performance optimizations for growth and array copy (#43)
+ - refactor: performance optimizations for toArray and fromArray (#46)
+ - test: add additional benchmarks for queue growth and `toArray` (#45)
+
+## 2.0.1
+
+ - fix(types): incorrect return type on `size()`
+
+## 2.0.0
+
+ - fix!: `push` & `unshift` now accept `undefined` values to match behaviour of `Array` (fixes #25) (#35)
+ - This is only a **BREAKING** change if you are currently expecting `push(undefined)` and `unshift(undefined)` to do
+ nothing - the new behaviour now correctly adds undefined values to the queue.
+ - **Note**: behaviour of `push()` & `unshift()` (no arguments) remains unchanged (nothing gets added to the queue).
+ - **Note**: If you need to differentiate between `undefined` values in the queue and the return value of `pop()` then
+ check the queue `.length` before popping.
+ - fix: incorrect methods in types definition file
+
+## 1.5.1
+
+ - perf: minor performance tweak when growing queue size (#29)
+
+## 1.5.0
+
+ - feat: adds capacity option for circular buffers (#27)
+
diff --git a/node_modules/denque/LICENSE b/node_modules/denque/LICENSE
new file mode 100644
index 0000000..c9cde92
--- /dev/null
+++ b/node_modules/denque/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2018-present Invertase Limited
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/denque/README.md b/node_modules/denque/README.md
new file mode 100644
index 0000000..3c645d3
--- /dev/null
+++ b/node_modules/denque/README.md
@@ -0,0 +1,77 @@
+
+
Denque
+
+
+
+
+
+
+
+
+
+
+
+Denque is a well tested, extremely fast and lightweight [double-ended queue](http://en.wikipedia.org/wiki/Double-ended_queue)
+implementation with zero dependencies and includes TypeScript types.
+
+Double-ended queues can also be used as a:
+
+- [Stack](http://en.wikipedia.org/wiki/Stack_\(abstract_data_type\))
+- [Queue](http://en.wikipedia.org/wiki/Queue_\(data_structure\))
+
+This implementation is currently the fastest available, even faster than `double-ended-queue`, see the [benchmarks](https://docs.page/invertase/denque/benchmarks).
+
+Every queue operation is done at a constant `O(1)` - including random access from `.peekAt(index)`.
+
+**Works on all node versions >= v0.10**
+
+## Quick Start
+
+Install the package:
+
+```bash
+npm install denque
+```
+
+Create and consume a queue:
+
+```js
+const Denque = require("denque");
+
+const denque = new Denque([1,2,3,4]);
+denque.shift(); // 1
+denque.pop(); // 4
+```
+
+
+See the [API reference documentation](https://docs.page/invertase/denque/api) for more examples.
+
+---
+
+## Who's using it?
+
+- [Kafka Node.js client](https://www.npmjs.com/package/kafka-node)
+- [MariaDB Node.js client](https://www.npmjs.com/package/mariadb)
+- [MongoDB Node.js client](https://www.npmjs.com/package/mongodb)
+- [MySQL Node.js client](https://www.npmjs.com/package/mysql2)
+- [Redis Node.js clients](https://www.npmjs.com/package/redis)
+
+... and [many more](https://www.npmjs.com/browse/depended/denque).
+
+
+---
+
+## License
+
+- See [LICENSE](/LICENSE)
+
+---
+
+
+
+
+
+
+ Built and maintained by Invertase.
+
+
diff --git a/node_modules/denque/index.d.ts b/node_modules/denque/index.d.ts
new file mode 100644
index 0000000..e125dd4
--- /dev/null
+++ b/node_modules/denque/index.d.ts
@@ -0,0 +1,47 @@
+declare class Denque {
+ length: number;
+
+ constructor();
+
+ constructor(array: T[]);
+
+ constructor(array: T[], options: IDenqueOptions);
+
+ push(item: T): number;
+
+ unshift(item: T): number;
+
+ pop(): T | undefined;
+
+ shift(): T | undefined;
+
+ peekBack(): T | undefined;
+
+ peekFront(): T | undefined;
+
+ peekAt(index: number): T | undefined;
+
+ get(index: number): T | undefined;
+
+ remove(index: number, count: number): T[];
+
+ removeOne(index: number): T | undefined;
+
+ splice(index: number, count: number, ...item: T[]): T[] | undefined;
+
+ isEmpty(): boolean;
+
+ clear(): void;
+
+ size(): number;
+
+ toString(): string;
+
+ toArray(): T[];
+}
+
+interface IDenqueOptions {
+ capacity?: number
+}
+
+export = Denque;
diff --git a/node_modules/denque/index.js b/node_modules/denque/index.js
new file mode 100644
index 0000000..6b2e9d8
--- /dev/null
+++ b/node_modules/denque/index.js
@@ -0,0 +1,481 @@
+'use strict';
+
+/**
+ * Custom implementation of a double ended queue.
+ */
+function Denque(array, options) {
+ var options = options || {};
+ this._capacity = options.capacity;
+
+ this._head = 0;
+ this._tail = 0;
+
+ if (Array.isArray(array)) {
+ this._fromArray(array);
+ } else {
+ this._capacityMask = 0x3;
+ this._list = new Array(4);
+ }
+}
+
+/**
+ * --------------
+ * PUBLIC API
+ * -------------
+ */
+
+/**
+ * Returns the item at the specified index from the list.
+ * 0 is the first element, 1 is the second, and so on...
+ * Elements at negative values are that many from the end: -1 is one before the end
+ * (the last element), -2 is two before the end (one before last), etc.
+ * @param index
+ * @returns {*}
+ */
+Denque.prototype.peekAt = function peekAt(index) {
+ var i = index;
+ // expect a number or return undefined
+ if ((i !== (i | 0))) {
+ return void 0;
+ }
+ var len = this.size();
+ if (i >= len || i < -len) return undefined;
+ if (i < 0) i += len;
+ i = (this._head + i) & this._capacityMask;
+ return this._list[i];
+};
+
+/**
+ * Alias for peekAt()
+ * @param i
+ * @returns {*}
+ */
+Denque.prototype.get = function get(i) {
+ return this.peekAt(i);
+};
+
+/**
+ * Returns the first item in the list without removing it.
+ * @returns {*}
+ */
+Denque.prototype.peek = function peek() {
+ if (this._head === this._tail) return undefined;
+ return this._list[this._head];
+};
+
+/**
+ * Alias for peek()
+ * @returns {*}
+ */
+Denque.prototype.peekFront = function peekFront() {
+ return this.peek();
+};
+
+/**
+ * Returns the item that is at the back of the queue without removing it.
+ * Uses peekAt(-1)
+ */
+Denque.prototype.peekBack = function peekBack() {
+ return this.peekAt(-1);
+};
+
+/**
+ * Returns the current length of the queue
+ * @return {Number}
+ */
+Object.defineProperty(Denque.prototype, 'length', {
+ get: function length() {
+ return this.size();
+ }
+});
+
+/**
+ * Return the number of items on the list, or 0 if empty.
+ * @returns {number}
+ */
+Denque.prototype.size = function size() {
+ if (this._head === this._tail) return 0;
+ if (this._head < this._tail) return this._tail - this._head;
+ else return this._capacityMask + 1 - (this._head - this._tail);
+};
+
+/**
+ * Add an item at the beginning of the list.
+ * @param item
+ */
+Denque.prototype.unshift = function unshift(item) {
+ if (arguments.length === 0) return this.size();
+ var len = this._list.length;
+ this._head = (this._head - 1 + len) & this._capacityMask;
+ this._list[this._head] = item;
+ if (this._tail === this._head) this._growArray();
+ if (this._capacity && this.size() > this._capacity) this.pop();
+ if (this._head < this._tail) return this._tail - this._head;
+ else return this._capacityMask + 1 - (this._head - this._tail);
+};
+
+/**
+ * Remove and return the first item on the list,
+ * Returns undefined if the list is empty.
+ * @returns {*}
+ */
+Denque.prototype.shift = function shift() {
+ var head = this._head;
+ if (head === this._tail) return undefined;
+ var item = this._list[head];
+ this._list[head] = undefined;
+ this._head = (head + 1) & this._capacityMask;
+ if (head < 2 && this._tail > 10000 && this._tail <= this._list.length >>> 2) this._shrinkArray();
+ return item;
+};
+
+/**
+ * Add an item to the bottom of the list.
+ * @param item
+ */
+Denque.prototype.push = function push(item) {
+ if (arguments.length === 0) return this.size();
+ var tail = this._tail;
+ this._list[tail] = item;
+ this._tail = (tail + 1) & this._capacityMask;
+ if (this._tail === this._head) {
+ this._growArray();
+ }
+ if (this._capacity && this.size() > this._capacity) {
+ this.shift();
+ }
+ if (this._head < this._tail) return this._tail - this._head;
+ else return this._capacityMask + 1 - (this._head - this._tail);
+};
+
+/**
+ * Remove and return the last item on the list.
+ * Returns undefined if the list is empty.
+ * @returns {*}
+ */
+Denque.prototype.pop = function pop() {
+ var tail = this._tail;
+ if (tail === this._head) return undefined;
+ var len = this._list.length;
+ this._tail = (tail - 1 + len) & this._capacityMask;
+ var item = this._list[this._tail];
+ this._list[this._tail] = undefined;
+ if (this._head < 2 && tail > 10000 && tail <= len >>> 2) this._shrinkArray();
+ return item;
+};
+
+/**
+ * Remove and return the item at the specified index from the list.
+ * Returns undefined if the list is empty.
+ * @param index
+ * @returns {*}
+ */
+Denque.prototype.removeOne = function removeOne(index) {
+ var i = index;
+ // expect a number or return undefined
+ if ((i !== (i | 0))) {
+ return void 0;
+ }
+ if (this._head === this._tail) return void 0;
+ var size = this.size();
+ var len = this._list.length;
+ if (i >= size || i < -size) return void 0;
+ if (i < 0) i += size;
+ i = (this._head + i) & this._capacityMask;
+ var item = this._list[i];
+ var k;
+ if (index < size / 2) {
+ for (k = index; k > 0; k--) {
+ this._list[i] = this._list[i = (i - 1 + len) & this._capacityMask];
+ }
+ this._list[i] = void 0;
+ this._head = (this._head + 1 + len) & this._capacityMask;
+ } else {
+ for (k = size - 1 - index; k > 0; k--) {
+ this._list[i] = this._list[i = (i + 1 + len) & this._capacityMask];
+ }
+ this._list[i] = void 0;
+ this._tail = (this._tail - 1 + len) & this._capacityMask;
+ }
+ return item;
+};
+
+/**
+ * Remove number of items from the specified index from the list.
+ * Returns array of removed items.
+ * Returns undefined if the list is empty.
+ * @param index
+ * @param count
+ * @returns {array}
+ */
+Denque.prototype.remove = function remove(index, count) {
+ var i = index;
+ var removed;
+ var del_count = count;
+ // expect a number or return undefined
+ if ((i !== (i | 0))) {
+ return void 0;
+ }
+ if (this._head === this._tail) return void 0;
+ var size = this.size();
+ var len = this._list.length;
+ if (i >= size || i < -size || count < 1) return void 0;
+ if (i < 0) i += size;
+ if (count === 1 || !count) {
+ removed = new Array(1);
+ removed[0] = this.removeOne(i);
+ return removed;
+ }
+ if (i === 0 && i + count >= size) {
+ removed = this.toArray();
+ this.clear();
+ return removed;
+ }
+ if (i + count > size) count = size - i;
+ var k;
+ removed = new Array(count);
+ for (k = 0; k < count; k++) {
+ removed[k] = this._list[(this._head + i + k) & this._capacityMask];
+ }
+ i = (this._head + i) & this._capacityMask;
+ if (index + count === size) {
+ this._tail = (this._tail - count + len) & this._capacityMask;
+ for (k = count; k > 0; k--) {
+ this._list[i = (i + 1 + len) & this._capacityMask] = void 0;
+ }
+ return removed;
+ }
+ if (index === 0) {
+ this._head = (this._head + count + len) & this._capacityMask;
+ for (k = count - 1; k > 0; k--) {
+ this._list[i = (i + 1 + len) & this._capacityMask] = void 0;
+ }
+ return removed;
+ }
+ if (i < size / 2) {
+ this._head = (this._head + index + count + len) & this._capacityMask;
+ for (k = index; k > 0; k--) {
+ this.unshift(this._list[i = (i - 1 + len) & this._capacityMask]);
+ }
+ i = (this._head - 1 + len) & this._capacityMask;
+ while (del_count > 0) {
+ this._list[i = (i - 1 + len) & this._capacityMask] = void 0;
+ del_count--;
+ }
+ if (index < 0) this._tail = i;
+ } else {
+ this._tail = i;
+ i = (i + count + len) & this._capacityMask;
+ for (k = size - (count + index); k > 0; k--) {
+ this.push(this._list[i++]);
+ }
+ i = this._tail;
+ while (del_count > 0) {
+ this._list[i = (i + 1 + len) & this._capacityMask] = void 0;
+ del_count--;
+ }
+ }
+ if (this._head < 2 && this._tail > 10000 && this._tail <= len >>> 2) this._shrinkArray();
+ return removed;
+};
+
+/**
+ * Native splice implementation.
+ * Remove number of items from the specified index from the list and/or add new elements.
+ * Returns array of removed items or empty array if count == 0.
+ * Returns undefined if the list is empty.
+ *
+ * @param index
+ * @param count
+ * @param {...*} [elements]
+ * @returns {array}
+ */
+Denque.prototype.splice = function splice(index, count) {
+ var i = index;
+ // expect a number or return undefined
+ if ((i !== (i | 0))) {
+ return void 0;
+ }
+ var size = this.size();
+ if (i < 0) i += size;
+ if (i > size) return void 0;
+ if (arguments.length > 2) {
+ var k;
+ var temp;
+ var removed;
+ var arg_len = arguments.length;
+ var len = this._list.length;
+ var arguments_index = 2;
+ if (!size || i < size / 2) {
+ temp = new Array(i);
+ for (k = 0; k < i; k++) {
+ temp[k] = this._list[(this._head + k) & this._capacityMask];
+ }
+ if (count === 0) {
+ removed = [];
+ if (i > 0) {
+ this._head = (this._head + i + len) & this._capacityMask;
+ }
+ } else {
+ removed = this.remove(i, count);
+ this._head = (this._head + i + len) & this._capacityMask;
+ }
+ while (arg_len > arguments_index) {
+ this.unshift(arguments[--arg_len]);
+ }
+ for (k = i; k > 0; k--) {
+ this.unshift(temp[k - 1]);
+ }
+ } else {
+ temp = new Array(size - (i + count));
+ var leng = temp.length;
+ for (k = 0; k < leng; k++) {
+ temp[k] = this._list[(this._head + i + count + k) & this._capacityMask];
+ }
+ if (count === 0) {
+ removed = [];
+ if (i != size) {
+ this._tail = (this._head + i + len) & this._capacityMask;
+ }
+ } else {
+ removed = this.remove(i, count);
+ this._tail = (this._tail - leng + len) & this._capacityMask;
+ }
+ while (arguments_index < arg_len) {
+ this.push(arguments[arguments_index++]);
+ }
+ for (k = 0; k < leng; k++) {
+ this.push(temp[k]);
+ }
+ }
+ return removed;
+ } else {
+ return this.remove(i, count);
+ }
+};
+
+/**
+ * Soft clear - does not reset capacity.
+ */
+Denque.prototype.clear = function clear() {
+ this._list = new Array(this._list.length);
+ this._head = 0;
+ this._tail = 0;
+};
+
+/**
+ * Returns true or false whether the list is empty.
+ * @returns {boolean}
+ */
+Denque.prototype.isEmpty = function isEmpty() {
+ return this._head === this._tail;
+};
+
+/**
+ * Returns an array of all queue items.
+ * @returns {Array}
+ */
+Denque.prototype.toArray = function toArray() {
+ return this._copyArray(false);
+};
+
+/**
+ * -------------
+ * INTERNALS
+ * -------------
+ */
+
+/**
+ * Fills the queue with items from an array
+ * For use in the constructor
+ * @param array
+ * @private
+ */
+Denque.prototype._fromArray = function _fromArray(array) {
+ var length = array.length;
+ var capacity = this._nextPowerOf2(length);
+
+ this._list = new Array(capacity);
+ this._capacityMask = capacity - 1;
+ this._tail = length;
+
+ for (var i = 0; i < length; i++) this._list[i] = array[i];
+};
+
+/**
+ *
+ * @param fullCopy
+ * @param size Initialize the array with a specific size. Will default to the current list size
+ * @returns {Array}
+ * @private
+ */
+Denque.prototype._copyArray = function _copyArray(fullCopy, size) {
+ var src = this._list;
+ var capacity = src.length;
+ var length = this.length;
+ size = size | length;
+
+ // No prealloc requested and the buffer is contiguous
+ if (size == length && this._head < this._tail) {
+ // Simply do a fast slice copy
+ return this._list.slice(this._head, this._tail);
+ }
+
+ var dest = new Array(size);
+
+ var k = 0;
+ var i;
+ if (fullCopy || this._head > this._tail) {
+ for (i = this._head; i < capacity; i++) dest[k++] = src[i];
+ for (i = 0; i < this._tail; i++) dest[k++] = src[i];
+ } else {
+ for (i = this._head; i < this._tail; i++) dest[k++] = src[i];
+ }
+
+ return dest;
+}
+
+/**
+ * Grows the internal list array.
+ * @private
+ */
+Denque.prototype._growArray = function _growArray() {
+ if (this._head != 0) {
+ // double array size and copy existing data, head to end, then beginning to tail.
+ var newList = this._copyArray(true, this._list.length << 1);
+
+ this._tail = this._list.length;
+ this._head = 0;
+
+ this._list = newList;
+ } else {
+ this._tail = this._list.length;
+ this._list.length <<= 1;
+ }
+
+ this._capacityMask = (this._capacityMask << 1) | 1;
+};
+
+/**
+ * Shrinks the internal list array.
+ * @private
+ */
+Denque.prototype._shrinkArray = function _shrinkArray() {
+ this._list.length >>>= 1;
+ this._capacityMask >>>= 1;
+};
+
+/**
+ * Find the next power of 2, at least 4
+ * @private
+ * @param {number} num
+ * @returns {number}
+ */
+Denque.prototype._nextPowerOf2 = function _nextPowerOf2(num) {
+ var log2 = Math.log(num) / Math.log(2);
+ var nextPow2 = 1 << (log2 + 1);
+
+ return Math.max(nextPow2, 4);
+}
+
+module.exports = Denque;
diff --git a/node_modules/denque/package.json b/node_modules/denque/package.json
new file mode 100644
index 0000000..a635910
--- /dev/null
+++ b/node_modules/denque/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "denque",
+ "version": "2.1.0",
+ "description": "The fastest javascript implementation of a double-ended queue. Used by the official Redis, MongoDB, MariaDB & MySQL libraries for Node.js and many other libraries. Maintains compatability with deque.",
+ "main": "index.js",
+ "engines": {
+ "node": ">=0.10"
+ },
+ "keywords": [
+ "data-structure",
+ "data-structures",
+ "queue",
+ "double",
+ "end",
+ "ended",
+ "deque",
+ "denque",
+ "double-ended-queue"
+ ],
+ "scripts": {
+ "test": "istanbul cover --report lcov _mocha && npm run typescript",
+ "coveralls": "cat ./coverage/lcov.info | coveralls",
+ "typescript": "tsc --project ./test/type/tsconfig.json",
+ "benchmark_thousand": "node benchmark/thousand",
+ "benchmark_2mil": "node benchmark/two_million",
+ "benchmark_splice": "node benchmark/splice",
+ "benchmark_remove": "node benchmark/remove",
+ "benchmark_removeOne": "node benchmark/removeOne",
+ "benchmark_growth": "node benchmark/growth",
+ "benchmark_toArray": "node benchmark/toArray",
+ "benchmark_fromArray": "node benchmark/fromArray"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/invertase/denque.git"
+ },
+ "license": "Apache-2.0",
+ "author": {
+ "name": "Invertase",
+ "email": "oss@invertase.io",
+ "url": "http://github.com/invertase/"
+ },
+ "contributors": [
+ "Mike Diarmid (Salakar) "
+ ],
+ "bugs": {
+ "url": "https://github.com/invertase/denque/issues"
+ },
+ "homepage": "https://docs.page/invertase/denque",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "codecov": "^3.8.3",
+ "double-ended-queue": "^2.1.0-0",
+ "istanbul": "^0.4.5",
+ "mocha": "^3.5.3",
+ "typescript": "^3.4.1"
+ }
+}
diff --git a/node_modules/encodeurl/HISTORY.md b/node_modules/encodeurl/HISTORY.md
deleted file mode 100644
index 41313b2..0000000
--- a/node_modules/encodeurl/HISTORY.md
+++ /dev/null
@@ -1,14 +0,0 @@
-1.0.2 / 2018-01-21
-==================
-
- * Fix encoding `%` as last character
-
-1.0.1 / 2016-06-09
-==================
-
- * Fix encoding unpaired surrogates at start/end of string
-
-1.0.0 / 2016-06-08
-==================
-
- * Initial release
diff --git a/node_modules/encodeurl/README.md b/node_modules/encodeurl/README.md
deleted file mode 100644
index 127c5a0..0000000
--- a/node_modules/encodeurl/README.md
+++ /dev/null
@@ -1,128 +0,0 @@
-# encodeurl
-
-[![NPM Version][npm-image]][npm-url]
-[![NPM Downloads][downloads-image]][downloads-url]
-[![Node.js Version][node-version-image]][node-version-url]
-[![Build Status][travis-image]][travis-url]
-[![Test Coverage][coveralls-image]][coveralls-url]
-
-Encode a URL to a percent-encoded form, excluding already-encoded sequences
-
-## Installation
-
-This is a [Node.js](https://nodejs.org/en/) module available through the
-[npm registry](https://www.npmjs.com/). Installation is done using the
-[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
-
-```sh
-$ npm install encodeurl
-```
-
-## API
-
-```js
-var encodeUrl = require('encodeurl')
-```
-
-### encodeUrl(url)
-
-Encode a URL to a percent-encoded form, excluding already-encoded sequences.
-
-This function will take an already-encoded URL and encode all the non-URL
-code points (as UTF-8 byte sequences). This function will not encode the
-"%" character unless it is not part of a valid sequence (`%20` will be
-left as-is, but `%foo` will be encoded as `%25foo`).
-
-This encode is meant to be "safe" and does not throw errors. It will try as
-hard as it can to properly encode the given URL, including replacing any raw,
-unpaired surrogate pairs with the Unicode replacement character prior to
-encoding.
-
-This function is _similar_ to the intrinsic function `encodeURI`, except it
-will not encode the `%` character if that is part of a valid sequence, will
-not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired
-surrogate pairs with the Unicode replacement character (instead of throwing).
-
-## Examples
-
-### Encode a URL containing user-controled data
-
-```js
-var encodeUrl = require('encodeurl')
-var escapeHtml = require('escape-html')
-
-http.createServer(function onRequest (req, res) {
- // get encoded form of inbound url
- var url = encodeUrl(req.url)
-
- // create html message
- var body = 'Location ' + escapeHtml(url) + ' not found
'
-
- // send a 404
- res.statusCode = 404
- res.setHeader('Content-Type', 'text/html; charset=UTF-8')
- res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
- res.end(body, 'utf-8')
-})
-```
-
-### Encode a URL for use in a header field
-
-```js
-var encodeUrl = require('encodeurl')
-var escapeHtml = require('escape-html')
-var url = require('url')
-
-http.createServer(function onRequest (req, res) {
- // parse inbound url
- var href = url.parse(req)
-
- // set new host for redirect
- href.host = 'localhost'
- href.protocol = 'https:'
- href.slashes = true
-
- // create location header
- var location = encodeUrl(url.format(href))
-
- // create html message
- var body = 'Redirecting to new site: ' + escapeHtml(location) + '
'
-
- // send a 301
- res.statusCode = 301
- res.setHeader('Content-Type', 'text/html; charset=UTF-8')
- res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
- res.setHeader('Location', location)
- res.end(body, 'utf-8')
-})
-```
-
-## Testing
-
-```sh
-$ npm test
-$ npm run lint
-```
-
-## References
-
-- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986]
-- [WHATWG URL Living Standard][whatwg-url]
-
-[rfc-3986]: https://tools.ietf.org/html/rfc3986
-[whatwg-url]: https://url.spec.whatwg.org/
-
-## License
-
-[MIT](LICENSE)
-
-[npm-image]: https://img.shields.io/npm/v/encodeurl.svg
-[npm-url]: https://npmjs.org/package/encodeurl
-[node-version-image]: https://img.shields.io/node/v/encodeurl.svg
-[node-version-url]: https://nodejs.org/en/download
-[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg
-[travis-url]: https://travis-ci.org/pillarjs/encodeurl
-[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg
-[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master
-[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg
-[downloads-url]: https://npmjs.org/package/encodeurl
diff --git a/node_modules/encodeurl/index.js b/node_modules/encodeurl/index.js
deleted file mode 100644
index fc4906c..0000000
--- a/node_modules/encodeurl/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*!
- * encodeurl
- * Copyright(c) 2016 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-'use strict'
-
-/**
- * Module exports.
- * @public
- */
-
-module.exports = encodeUrl
-
-/**
- * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
- * and including invalid escape sequences.
- * @private
- */
-
-var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g
-
-/**
- * RegExp to match unmatched surrogate pair.
- * @private
- */
-
-var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
-
-/**
- * String to replace unmatched surrogate pair with.
- * @private
- */
-
-var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2'
-
-/**
- * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
- *
- * This function will take an already-encoded URL and encode all the non-URL
- * code points. This function will not encode the "%" character unless it is
- * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
- * be encoded as `%25foo`).
- *
- * This encode is meant to be "safe" and does not throw errors. It will try as
- * hard as it can to properly encode the given URL, including replacing any raw,
- * unpaired surrogate pairs with the Unicode replacement character prior to
- * encoding.
- *
- * @param {string} url
- * @return {string}
- * @public
- */
-
-function encodeUrl (url) {
- return String(url)
- .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)
- .replace(ENCODE_CHARS_REGEXP, encodeURI)
-}
diff --git a/node_modules/encodeurl/package.json b/node_modules/encodeurl/package.json
deleted file mode 100644
index b9f25ef..0000000
--- a/node_modules/encodeurl/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "encodeurl",
- "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences",
- "version": "1.0.2",
- "contributors": [
- "Douglas Christopher Wilson "
- ],
- "license": "MIT",
- "keywords": [
- "encode",
- "encodeurl",
- "url"
- ],
- "repository": "pillarjs/encodeurl",
- "devDependencies": {
- "eslint": "3.19.0",
- "eslint-config-standard": "10.2.1",
- "eslint-plugin-import": "2.8.0",
- "eslint-plugin-node": "5.2.1",
- "eslint-plugin-promise": "3.6.0",
- "eslint-plugin-standard": "3.0.1",
- "istanbul": "0.4.5",
- "mocha": "2.5.3"
- },
- "files": [
- "LICENSE",
- "HISTORY.md",
- "README.md",
- "index.js"
- ],
- "engines": {
- "node": ">= 0.8"
- },
- "scripts": {
- "lint": "eslint .",
- "test": "mocha --reporter spec --bail --check-leaks test/",
- "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
- "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
- }
-}
diff --git a/node_modules/escape-html/LICENSE b/node_modules/escape-html/LICENSE
index 2e70de9..a3f0274 100644
--- a/node_modules/escape-html/LICENSE
+++ b/node_modules/escape-html/LICENSE
@@ -1,8 +1,6 @@
(The MIT License)
Copyright (c) 2012-2013 TJ Holowaychuk
-Copyright (c) 2015 Andreas Lubbe
-Copyright (c) 2015 Tiancheng "Timothy" Gu
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/node_modules/escape-html/Readme.md b/node_modules/escape-html/Readme.md
index 653d9ea..2cfcc99 100644
--- a/node_modules/escape-html/Readme.md
+++ b/node_modules/escape-html/Readme.md
@@ -1,41 +1,13 @@
# escape-html
- Escape string for use in HTML
+ Escape HTML entities
## Example
```js
var escape = require('escape-html');
-var html = escape('foo & bar');
-// -> foo & bar
-```
-
-## Benchmark
-
-```
-$ npm run-script bench
-
-> escape-html@1.0.3 bench nodejs-escape-html
-> node benchmark/index.js
-
-
- http_parser@1.0
- node@0.10.33
- v8@3.14.5.9
- ares@1.9.0-DEV
- uv@0.10.29
- zlib@1.2.3
- modules@11
- openssl@1.0.1j
-
- 1 test completed.
- 2 tests completed.
- 3 tests completed.
-
- no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled)
- single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled)
- many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled)
+escape(str);
```
## License
diff --git a/node_modules/escape-html/index.js b/node_modules/escape-html/index.js
index bf9e226..d0f9256 100644
--- a/node_modules/escape-html/index.js
+++ b/node_modules/escape-html/index.js
@@ -1,20 +1,9 @@
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
- * Copyright(c) 2015 Andreas Lubbe
- * Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/
-'use strict';
-
-/**
- * Module variables.
- * @private
- */
-
-var matchHtmlRegExp = /["'&<>]/;
-
/**
* Module exports.
* @public
@@ -25,54 +14,16 @@ module.exports = escapeHtml;
/**
* Escape special characters in the given string of html.
*
- * @param {string} string The string to escape for inserting into HTML
+ * @param {string} str The string to escape for inserting into HTML
* @return {string}
* @public
*/
-function escapeHtml(string) {
- var str = '' + string;
- var match = matchHtmlRegExp.exec(str);
-
- if (!match) {
- return str;
- }
-
- var escape;
- var html = '';
- var index = 0;
- var lastIndex = 0;
-
- for (index = match.index; index < str.length; index++) {
- switch (str.charCodeAt(index)) {
- case 34: // "
- escape = '"';
- break;
- case 38: // &
- escape = '&';
- break;
- case 39: // '
- escape = ''';
- break;
- case 60: // <
- escape = '<';
- break;
- case 62: // >
- escape = '>';
- break;
- default:
- continue;
- }
-
- if (lastIndex !== index) {
- html += str.substring(lastIndex, index);
- }
-
- lastIndex = index + 1;
- html += escape;
- }
-
- return lastIndex !== index
- ? html + str.substring(lastIndex, index)
- : html;
+function escapeHtml(html) {
+ return String(html)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(//g, '>');
}
diff --git a/node_modules/escape-html/package.json b/node_modules/escape-html/package.json
index 57ec7bd..e000755 100644
--- a/node_modules/escape-html/package.json
+++ b/node_modules/escape-html/package.json
@@ -1,7 +1,7 @@
{
"name": "escape-html",
- "description": "Escape string for use in HTML",
- "version": "1.0.3",
+ "description": "Escape HTML entities",
+ "version": "1.0.2",
"license": "MIT",
"keywords": [
"escape",
@@ -9,16 +9,9 @@
"utility"
],
"repository": "component/escape-html",
- "devDependencies": {
- "benchmark": "1.0.0",
- "beautify-benchmark": "0.2.4"
- },
"files": [
"LICENSE",
"Readme.md",
"index.js"
- ],
- "scripts": {
- "bench": "node benchmark/index.js"
- }
+ ]
}
diff --git a/node_modules/etag/HISTORY.md b/node_modules/etag/HISTORY.md
index 222b293..bd0f26d 100644
--- a/node_modules/etag/HISTORY.md
+++ b/node_modules/etag/HISTORY.md
@@ -1,15 +1,3 @@
-1.8.1 / 2017-09-12
-==================
-
- * perf: replace regular expression with substring
-
-1.8.0 / 2017-02-18
-==================
-
- * Use SHA1 instead of MD5 for ETag hashing
- - Improves performance for larger entities
- - Works with FIPS 140-2 OpenSSL configuration
-
1.7.0 / 2015-06-08
==================
diff --git a/node_modules/etag/LICENSE b/node_modules/etag/LICENSE
index cab251c..142ede3 100644
--- a/node_modules/etag/LICENSE
+++ b/node_modules/etag/LICENSE
@@ -1,6 +1,6 @@
(The MIT License)
-Copyright (c) 2014-2016 Douglas Christopher Wilson
+Copyright (c) 2014-2015 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/node_modules/etag/README.md b/node_modules/etag/README.md
index 09c2169..8da9e05 100644
--- a/node_modules/etag/README.md
+++ b/node_modules/etag/README.md
@@ -6,25 +6,16 @@
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-Create simple HTTP ETags
-
-This module generates HTTP ETags (as defined in RFC 7232) for use in
-HTTP responses.
+Create simple ETags
## Installation
-This is a [Node.js](https://nodejs.org/en/) module available through the
-[npm registry](https://www.npmjs.com/). Installation is done using the
-[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
-
```sh
$ npm install etag
```
## API
-
-
```js
var etag = require('etag')
```
@@ -36,8 +27,6 @@ body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
default, a strong ETag is generated except for `fs.Stats`, which will
generate a weak ETag (this can be overwritten by `options.weak`).
-
-
```js
res.setHeader('ETag', etag(body))
```
@@ -63,84 +52,101 @@ $ npm test
```bash
$ npm run-script bench
-> etag@1.8.1 bench nodejs-etag
+> etag@1.6.0 bench nodejs-etag
> node benchmark/index.js
- http_parser@2.7.0
- node@6.11.1
- v8@5.1.281.103
- uv@1.11.0
- zlib@1.2.11
- ares@1.10.1-DEV
- icu@58.2
- modules@48
- openssl@1.0.2k
+ http_parser@1.0
+ node@0.10.33
+ v8@3.14.5.9
+ ares@1.9.0-DEV
+ uv@0.10.29
+ zlib@1.2.3
+ modules@11
+ openssl@1.0.1j
> node benchmark/body0-100b.js
100B body
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
4 tests completed.
- buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled)
- buffer - weak x 263,812 ops/sec ±0.61% (184 runs sampled)
- string - strong x 259,955 ops/sec ±1.19% (185 runs sampled)
- string - weak x 264,356 ops/sec ±1.09% (184 runs sampled)
+* buffer - strong x 289,198 ops/sec ±1.09% (190 runs sampled)
+* buffer - weak x 287,838 ops/sec ±0.91% (189 runs sampled)
+* string - strong x 284,586 ops/sec ±1.05% (192 runs sampled)
+* string - weak x 287,439 ops/sec ±0.82% (192 runs sampled)
> node benchmark/body1-1kb.js
1KB body
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
4 tests completed.
- buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled)
- buffer - weak x 190,586 ops/sec ±0.81% (186 runs sampled)
- string - strong x 144,272 ops/sec ±0.96% (188 runs sampled)
- string - weak x 145,380 ops/sec ±1.43% (187 runs sampled)
+* buffer - strong x 212,423 ops/sec ±0.75% (193 runs sampled)
+* buffer - weak x 211,871 ops/sec ±0.74% (194 runs sampled)
+ string - strong x 205,291 ops/sec ±0.86% (194 runs sampled)
+ string - weak x 208,463 ops/sec ±0.79% (192 runs sampled)
> node benchmark/body2-5kb.js
5KB body
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
4 tests completed.
- buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled)
- buffer - weak x 92,373 ops/sec ±0.58% (189 runs sampled)
- string - strong x 48,850 ops/sec ±0.56% (186 runs sampled)
- string - weak x 49,380 ops/sec ±0.56% (190 runs sampled)
+* buffer - strong x 92,901 ops/sec ±0.58% (195 runs sampled)
+* buffer - weak x 93,045 ops/sec ±0.65% (192 runs sampled)
+ string - strong x 89,621 ops/sec ±0.68% (194 runs sampled)
+ string - weak x 90,070 ops/sec ±0.70% (196 runs sampled)
> node benchmark/body3-10kb.js
10KB body
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
4 tests completed.
- buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled)
- buffer - weak x 56,148 ops/sec ±0.55% (190 runs sampled)
- string - strong x 27,345 ops/sec ±0.43% (188 runs sampled)
- string - weak x 27,496 ops/sec ±0.45% (190 runs sampled)
+* buffer - strong x 54,220 ops/sec ±0.85% (192 runs sampled)
+* buffer - weak x 54,069 ops/sec ±0.83% (191 runs sampled)
+ string - strong x 53,078 ops/sec ±0.53% (194 runs sampled)
+ string - weak x 53,849 ops/sec ±0.47% (197 runs sampled)
> node benchmark/body4-100kb.js
100KB body
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
4 tests completed.
- buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled)
- buffer - weak x 7,115 ops/sec ±0.26% (191 runs sampled)
- string - strong x 3,068 ops/sec ±0.34% (190 runs sampled)
- string - weak x 3,096 ops/sec ±0.35% (190 runs sampled)
+* buffer - strong x 6,673 ops/sec ±0.15% (197 runs sampled)
+* buffer - weak x 6,716 ops/sec ±0.12% (198 runs sampled)
+ string - strong x 6,357 ops/sec ±0.14% (197 runs sampled)
+ string - weak x 6,344 ops/sec ±0.21% (197 runs sampled)
> node benchmark/stats.js
- stat
+ stats
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
4 tests completed.
- real - strong x 871,642 ops/sec ±0.34% (189 runs sampled)
- real - weak x 867,613 ops/sec ±0.39% (190 runs sampled)
- fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled)
- fake - weak x 400,100 ops/sec ±0.47% (188 runs sampled)
+* real - strong x 1,671,989 ops/sec ±0.13% (197 runs sampled)
+* real - weak x 1,681,297 ops/sec ±0.12% (198 runs sampled)
+ fake - strong x 927,063 ops/sec ±0.14% (198 runs sampled)
+ fake - weak x 914,461 ops/sec ±0.41% (191 runs sampled)
```
## License
@@ -150,7 +156,7 @@ $ npm run-script bench
[npm-image]: https://img.shields.io/npm/v/etag.svg
[npm-url]: https://npmjs.org/package/etag
[node-version-image]: https://img.shields.io/node/v/etag.svg
-[node-version-url]: https://nodejs.org/en/download/
+[node-version-url]: http://nodejs.org/download/
[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg
[travis-url]: https://travis-ci.org/jshttp/etag
[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg
diff --git a/node_modules/etag/index.js b/node_modules/etag/index.js
index 2a585c9..b582c84 100644
--- a/node_modules/etag/index.js
+++ b/node_modules/etag/index.js
@@ -1,6 +1,6 @@
/*!
* etag
- * Copyright(c) 2014-2016 Douglas Christopher Wilson
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
@@ -26,6 +26,7 @@ var Stats = require('fs').Stats
* @private
*/
+var base64PadCharRegExp = /=+$/
var toString = Object.prototype.toString
/**
@@ -36,18 +37,18 @@ var toString = Object.prototype.toString
* @private
*/
-function entitytag (entity) {
+function entitytag(entity) {
if (entity.length === 0) {
// fast-path empty
- return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'
+ return '"0-1B2M2Y8AsgTpgAmY7PhCfg"'
}
// compute hash of entity
var hash = crypto
- .createHash('sha1')
+ .createHash('md5')
.update(entity, 'utf8')
.digest('base64')
- .substring(0, 27)
+ .replace(base64PadCharRegExp, '')
// compute length of entity
var len = typeof entity === 'string'
@@ -67,7 +68,7 @@ function entitytag (entity) {
* @public
*/
-function etag (entity, options) {
+function etag(entity, options) {
if (entity == null) {
throw new TypeError('argument entity is required')
}
@@ -101,18 +102,18 @@ function etag (entity, options) {
* @api private
*/
-function isstats (obj) {
+function isstats(obj) {
// genuine fs.Stats
if (typeof Stats === 'function' && obj instanceof Stats) {
return true
}
// quack quack
- return obj && typeof obj === 'object' &&
- 'ctime' in obj && toString.call(obj.ctime) === '[object Date]' &&
- 'mtime' in obj && toString.call(obj.mtime) === '[object Date]' &&
- 'ino' in obj && typeof obj.ino === 'number' &&
- 'size' in obj && typeof obj.size === 'number'
+ return obj && typeof obj === 'object'
+ && 'ctime' in obj && toString.call(obj.ctime) === '[object Date]'
+ && 'mtime' in obj && toString.call(obj.mtime) === '[object Date]'
+ && 'ino' in obj && typeof obj.ino === 'number'
+ && 'size' in obj && typeof obj.size === 'number'
}
/**
@@ -123,7 +124,7 @@ function isstats (obj) {
* @private
*/
-function stattag (stat) {
+function stattag(stat) {
var mtime = stat.mtime.getTime().toString(16)
var size = stat.size.toString(16)
diff --git a/node_modules/etag/package.json b/node_modules/etag/package.json
index b06ab80..50bf248 100644
--- a/node_modules/etag/package.json
+++ b/node_modules/etag/package.json
@@ -1,7 +1,7 @@
{
"name": "etag",
- "description": "Create simple HTTP ETags",
- "version": "1.8.1",
+ "description": "Create simple ETags",
+ "version": "1.7.0",
"contributors": [
"Douglas Christopher Wilson ",
"David Björklund "
@@ -14,19 +14,11 @@
],
"repository": "jshttp/etag",
"devDependencies": {
+ "benchmark": "1.0.0",
"beautify-benchmark": "0.2.4",
- "benchmark": "2.1.4",
- "eslint": "3.19.0",
- "eslint-config-standard": "10.2.1",
- "eslint-plugin-import": "2.7.0",
- "eslint-plugin-markdown": "1.0.0-beta.6",
- "eslint-plugin-node": "5.1.1",
- "eslint-plugin-promise": "3.5.0",
- "eslint-plugin-standard": "3.0.1",
- "istanbul": "0.4.5",
- "mocha": "1.21.5",
- "safe-buffer": "5.1.1",
- "seedrandom": "2.4.3"
+ "istanbul": "0.3.14",
+ "mocha": "~1.21.4",
+ "seedrandom": "2.3.11"
},
"files": [
"LICENSE",
@@ -39,7 +31,6 @@
},
"scripts": {
"bench": "node benchmark/index.js",
- "lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
diff --git a/node_modules/express/History.md b/node_modules/express/History.md
index e49870f..21d5da3 100644
--- a/node_modules/express/History.md
+++ b/node_modules/express/History.md
@@ -1,583 +1,39 @@
-4.18.2 / 2022-10-08
-===================
+5.0.0-alpha.2 / 2015-07-06
+==========================
- * Fix regression routing a large stack in a single route
- * deps: body-parser@1.20.1
- - deps: qs@6.11.0
- - perf: remove unnecessary object clone
- * deps: qs@6.11.0
+This is the second Express 5.0 alpha release, based off 4.13.1 and includes
+changes from 5.0.0-alpha.1.
-4.18.1 / 2022-04-29
-===================
+ * remove:
+ - `app.param(fn)`
+ - `req.param()` -- use `req.params`, `req.body`, or `req.query` instead
+ * change:
+ - `res.render` callback is always async, even for sync view engines
+ - The leading `:` character in `name` for `app.param(name, fn)` is no longer removed
+ - Use `router` module for routing
+ - Use `path-is-absolute` module for absolute path detection
- * Fix hanging on large stack of sync routes
+5.0.0-alpha.1 / 2014-11-06
+==========================
-4.18.0 / 2022-04-25
-===================
+This is the first Express 5.0 alpha release, based off 4.10.1.
- * Add "root" option to `res.download`
- * Allow `options` without `filename` in `res.download`
- * Deprecate string and non-integer arguments to `res.status`
- * Fix behavior of `null`/`undefined` as `maxAge` in `res.cookie`
- * Fix handling very large stacks of sync middleware
- * Ignore `Object.prototype` values in settings through `app.set`/`app.get`
- * Invoke `default` with same arguments as types in `res.format`
- * Support proper 205 responses using `res.send`
- * Use `http-errors` for `res.format` error
- * deps: body-parser@1.20.0
- - Fix error message for json parse whitespace in `strict`
- - Fix internal error when inflated body exceeds limit
- - Prevent loss of async hooks context
- - Prevent hanging when request already read
- - deps: depd@2.0.0
- - deps: http-errors@2.0.0
- - deps: on-finished@2.4.1
- - deps: qs@6.10.3
- - deps: raw-body@2.5.1
- * deps: cookie@0.5.0
- - Add `priority` option
- - Fix `expires` option to reject invalid dates
- * deps: depd@2.0.0
- - Replace internal `eval` usage with `Function` constructor
- - Use instance methods on `process` to check for listeners
- * deps: finalhandler@1.2.0
- - Remove set content headers that break response
- - deps: on-finished@2.4.1
- - deps: statuses@2.0.1
- * deps: on-finished@2.4.1
- - Prevent loss of async hooks context
- * deps: qs@6.10.3
- * deps: send@0.18.0
- - Fix emitted 416 error missing headers property
- - Limit the headers removed for 304 response
- - deps: depd@2.0.0
- - deps: destroy@1.2.0
- - deps: http-errors@2.0.0
- - deps: on-finished@2.4.1
- - deps: statuses@2.0.1
- * deps: serve-static@1.15.0
- - deps: send@0.18.0
- * deps: statuses@2.0.1
- - Remove code 306
- - Rename `425 Unordered Collection` to standard `425 Too Early`
-
-4.17.3 / 2022-02-16
-===================
-
- * deps: accepts@~1.3.8
- - deps: mime-types@~2.1.34
- - deps: negotiator@0.6.3
- * deps: body-parser@1.19.2
- - deps: bytes@3.1.2
- - deps: qs@6.9.7
- - deps: raw-body@2.4.3
- * deps: cookie@0.4.2
- * deps: qs@6.9.7
- * Fix handling of `__proto__` keys
- * pref: remove unnecessary regexp for trust proxy
-
-4.17.2 / 2021-12-16
-===================
-
- * Fix handling of `undefined` in `res.jsonp`
- * Fix handling of `undefined` when `"json escape"` is enabled
- * Fix incorrect middleware execution with unanchored `RegExp`s
- * Fix `res.jsonp(obj, status)` deprecation message
- * Fix typo in `res.is` JSDoc
- * deps: body-parser@1.19.1
- - deps: bytes@3.1.1
- - deps: http-errors@1.8.1
- - deps: qs@6.9.6
- - deps: raw-body@2.4.2
- - deps: safe-buffer@5.2.1
- - deps: type-is@~1.6.18
- * deps: content-disposition@0.5.4
- - deps: safe-buffer@5.2.1
- * deps: cookie@0.4.1
- - Fix `maxAge` option to reject invalid values
- * deps: proxy-addr@~2.0.7
- - Use `req.socket` over deprecated `req.connection`
- - deps: forwarded@0.2.0
- - deps: ipaddr.js@1.9.1
- * deps: qs@6.9.6
- * deps: safe-buffer@5.2.1
- * deps: send@0.17.2
- - deps: http-errors@1.8.1
- - deps: ms@2.1.3
- - pref: ignore empty http tokens
- * deps: serve-static@1.14.2
- - deps: send@0.17.2
- * deps: setprototypeof@1.2.0
-
-4.17.1 / 2019-05-25
-===================
-
- * Revert "Improve error message for `null`/`undefined` to `res.status`"
-
-4.17.0 / 2019-05-16
-===================
-
- * Add `express.raw` to parse bodies into `Buffer`
- * Add `express.text` to parse bodies into string
- * Improve error message for non-strings to `res.sendFile`
- * Improve error message for `null`/`undefined` to `res.status`
- * Support multiple hosts in `X-Forwarded-Host`
- * deps: accepts@~1.3.7
- * deps: body-parser@1.19.0
- - Add encoding MIK
- - Add petabyte (`pb`) support
- - Fix parsing array brackets after index
- - deps: bytes@3.1.0
- - deps: http-errors@1.7.2
- - deps: iconv-lite@0.4.24
- - deps: qs@6.7.0
- - deps: raw-body@2.4.0
- - deps: type-is@~1.6.17
- * deps: content-disposition@0.5.3
- * deps: cookie@0.4.0
- - Add `SameSite=None` support
- * deps: finalhandler@~1.1.2
- - Set stricter `Content-Security-Policy` header
- - deps: parseurl@~1.3.3
- - deps: statuses@~1.5.0
- * deps: parseurl@~1.3.3
- * deps: proxy-addr@~2.0.5
- - deps: ipaddr.js@1.9.0
- * deps: qs@6.7.0
- - Fix parsing array brackets after index
- * deps: range-parser@~1.2.1
- * deps: send@0.17.1
- - Set stricter CSP header in redirect & error responses
- - deps: http-errors@~1.7.2
- - deps: mime@1.6.0
- - deps: ms@2.1.1
- - deps: range-parser@~1.2.1
- - deps: statuses@~1.5.0
- - perf: remove redundant `path.normalize` call
- * deps: serve-static@1.14.1
- - Set stricter CSP header in redirect response
- - deps: parseurl@~1.3.3
- - deps: send@0.17.1
- * deps: setprototypeof@1.1.1
- * deps: statuses@~1.5.0
- - Add `103 Early Hints`
- * deps: type-is@~1.6.18
- - deps: mime-types@~2.1.24
- - perf: prevent internal `throw` on invalid type
-
-4.16.4 / 2018-10-10
-===================
-
- * Fix issue where `"Request aborted"` may be logged in `res.sendfile`
- * Fix JSDoc for `Router` constructor
- * deps: body-parser@1.18.3
- - Fix deprecation warnings on Node.js 10+
- - Fix stack trace for strict json parse error
- - deps: depd@~1.1.2
- - deps: http-errors@~1.6.3
- - deps: iconv-lite@0.4.23
- - deps: qs@6.5.2
- - deps: raw-body@2.3.3
- - deps: type-is@~1.6.16
- * deps: proxy-addr@~2.0.4
- - deps: ipaddr.js@1.8.0
- * deps: qs@6.5.2
- * deps: safe-buffer@5.1.2
-
-4.16.3 / 2018-03-12
-===================
-
- * deps: accepts@~1.3.5
- - deps: mime-types@~2.1.18
- * deps: depd@~1.1.2
- - perf: remove argument reassignment
- * deps: encodeurl@~1.0.2
- - Fix encoding `%` as last character
- * deps: finalhandler@1.1.1
- - Fix 404 output for bad / missing pathnames
- - deps: encodeurl@~1.0.2
- - deps: statuses@~1.4.0
- * deps: proxy-addr@~2.0.3
- - deps: ipaddr.js@1.6.0
- * deps: send@0.16.2
- - Fix incorrect end tag in default error & redirects
- - deps: depd@~1.1.2
- - deps: encodeurl@~1.0.2
- - deps: statuses@~1.4.0
- * deps: serve-static@1.13.2
- - Fix incorrect end tag in redirects
- - deps: encodeurl@~1.0.2
- - deps: send@0.16.2
- * deps: statuses@~1.4.0
- * deps: type-is@~1.6.16
- - deps: mime-types@~2.1.18
-
-4.16.2 / 2017-10-09
-===================
-
- * Fix `TypeError` in `res.send` when given `Buffer` and `ETag` header set
- * perf: skip parsing of entire `X-Forwarded-Proto` header
-
-4.16.1 / 2017-09-29
-===================
-
- * deps: send@0.16.1
- * deps: serve-static@1.13.1
- - Fix regression when `root` is incorrectly set to a file
- - deps: send@0.16.1
-
-4.16.0 / 2017-09-28
-===================
-
- * Add `"json escape"` setting for `res.json` and `res.jsonp`
- * Add `express.json` and `express.urlencoded` to parse bodies
- * Add `options` argument to `res.download`
- * Improve error message when autoloading invalid view engine
- * Improve error messages when non-function provided as middleware
- * Skip `Buffer` encoding when not generating ETag for small response
- * Use `safe-buffer` for improved Buffer API
- * deps: accepts@~1.3.4
- - deps: mime-types@~2.1.16
- * deps: content-type@~1.0.4
- - perf: remove argument reassignment
- - perf: skip parameter parsing when no parameters
- * deps: etag@~1.8.1
- - perf: replace regular expression with substring
- * deps: finalhandler@1.1.0
- - Use `res.headersSent` when available
- * deps: parseurl@~1.3.2
- - perf: reduce overhead for full URLs
- - perf: unroll the "fast-path" `RegExp`
- * deps: proxy-addr@~2.0.2
- - Fix trimming leading / trailing OWS in `X-Forwarded-For`
- - deps: forwarded@~0.1.2
- - deps: ipaddr.js@1.5.2
- - perf: reduce overhead when no `X-Forwarded-For` header
- * deps: qs@6.5.1
- - Fix parsing & compacting very deep objects
- * deps: send@0.16.0
- - Add 70 new types for file extensions
- - Add `immutable` option
- - Fix missing `