@sapphire/time-utilities 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,24 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright © `2020` `The Sapphire Community and its contributors`
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the “Software”), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -174,6 +174,11 @@ var SapphireTimeUtilities = (() => {
174
174
  }
175
175
  __name(arrayStrictEquals, "arrayStrictEquals");
176
176
  __name2(arrayStrictEquals, "arrayStrictEquals");
177
+ function cast(value) {
178
+ return value;
179
+ }
180
+ __name(cast, "cast");
181
+ __name2(cast, "cast");
177
182
  function chunk(array, chunkSize) {
178
183
  if (!Array.isArray(array))
179
184
  throw new TypeError("entries must be an array.");
@@ -572,15 +577,23 @@ ${expression || zws}\`\`\``;
572
577
  }
573
578
  __name(roundNumber, "roundNumber");
574
579
  __name2(roundNumber, "roundNumber");
575
- var TOTITLECASE = /[A-Za-zÀ-ÖØ-öø-ÿ]\S*/g;
576
- var titleCaseVariants = {
580
+ var TO_TITLE_CASE = /[A-Za-zÀ-ÖØ-öø-ÿ]\S*/g;
581
+ var baseVariants = {
577
582
  textchannel: "TextChannel",
578
583
  voicechannel: "VoiceChannel",
579
584
  categorychannel: "CategoryChannel",
580
585
  guildmember: "GuildMember"
581
586
  };
582
- function toTitleCase(str) {
583
- return str.replace(TOTITLECASE, (txt) => titleCaseVariants[txt] || txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
587
+ function toTitleCase(str, options = {}) {
588
+ const { additionalVariants = {}, caseSensitive } = options;
589
+ const titleCaseVariants = {
590
+ ...baseVariants,
591
+ ...caseSensitive ? additionalVariants : Object.entries(additionalVariants).reduce((variants, [key, variant]) => ({ ...variants, [key.toLowerCase()]: variant }), {})
592
+ };
593
+ return str.replace(TO_TITLE_CASE, (txt) => {
594
+ var _a;
595
+ return (_a = titleCaseVariants[caseSensitive ? txt : txt.toLowerCase()]) != null ? _a : txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase();
596
+ });
584
597
  }
585
598
  __name(toTitleCase, "toTitleCase");
586
599
  __name2(toTitleCase, "toTitleCase");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/lib/constants.ts","../../utilities/src/lib/arrayStrictEquals.ts","../../utilities/src/lib/chunk.ts","../../utilities/src/lib/classExtends.ts","../../utilities/src/lib/codeBlock.ts","../../utilities/src/lib/splitText.ts","../../utilities/src/lib/cutText.ts","../../utilities/src/lib/debounce/index.ts","../../utilities/src/lib/isPrimitive.ts","../../utilities/src/lib/deepClone.ts","../../utilities/src/lib/isNullOrUndefined.ts","../../utilities/src/lib/filterNullAndUndefined.ts","../../utilities/src/lib/isNullOrUndefinedOrEmpty.ts","../../utilities/src/lib/filterNullAndUndefinedAndEmpty.ts","../../utilities/src/lib/isNullOrUndefinedOrZero.ts","../../utilities/src/lib/filterNullAndUndefinedAndZero.ts","../../utilities/src/lib/hasAtLeastOneKeyInMap.ts","../../utilities/src/lib/inlineCodeBlock.ts","../../utilities/src/lib/isClass.ts","../../utilities/src/lib/isFunction.ts","../../utilities/src/lib/isNumber.ts","../../utilities/src/lib/isObject.ts","../../utilities/src/lib/isThenable.ts","../../utilities/src/lib/makeObject.ts","../../utilities/src/lib/mergeDefault.ts","../../utilities/src/lib/mergeObjects.ts","../../utilities/src/lib/noop.ts","../../utilities/src/lib/objectToTuples.ts","../../utilities/src/lib/parseUrl.ts","../../utilities/src/lib/partition.ts","../../utilities/src/lib/range.ts","../../utilities/src/lib/regExpEsc.ts","../../utilities/src/lib/roundNumber.ts","../../utilities/src/lib/toTitleCase.ts","../../utilities/src/lib/tryParse.ts","../src/lib/Cron.ts","../src/lib/Duration.ts","../src/lib/DurationFormatter.ts","../src/lib/TimerManager.ts","../src/lib/Timestamp.ts"],"sourcesContent":["export { Time, TimeTypes } from './lib/constants';\nexport * from './lib/Cron';\nexport * from './lib/Duration';\nexport * from './lib/DurationFormatter';\nexport * from './lib/TimerManager';\nexport * from './lib/Timestamp';\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport type { DurationFormatAssetsTime, DurationFormatSeparators } from './DurationFormatter';\n\n/**\n * The supported time types\n */\nexport const enum TimeTypes {\n\tSecond = 'second',\n\tMinute = 'minute',\n\tHour = 'hour',\n\tDay = 'day',\n\tWeek = 'week',\n\tMonth = 'month',\n\tYear = 'year'\n}\n\nexport const enum Time {\n\tMillisecond = 1,\n\tSecond = 1000,\n\tMinute = 1000 * 60,\n\tHour = 1000 * 60 * 60,\n\tDay = 1000 * 60 * 60 * 24,\n\tMonth = 1000 * 60 * 60 * 24 * (365 / 12),\n\tYear = 1000 * 60 * 60 * 24 * 365\n}\n\nexport const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\nexport const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n\nexport const tokens = new Map<string, number>([\n\t['Y', 4],\n\t['Q', 1],\n\t['M', 4],\n\t['D', 4],\n\t['d', 4],\n\t['X', 1],\n\t['x', 1],\n\t['H', 2],\n\t['h', 2],\n\t['a', 1],\n\t['A', 1],\n\t['m', 2],\n\t['s', 2],\n\t['S', 3],\n\t['Z', 2],\n\t['l', 4],\n\t['L', 4],\n\t['T', 1],\n\t['t', 1]\n]);\n\nexport const partRegex = /^(?:(\\*)|(\\d+)(?:-(\\d+))?)(?:\\/(\\d+))?$/;\n\nexport const wildcardRegex = /\\bh\\b|\\B\\?\\B/g;\n\nexport const allowedNum = [\n\t[0, 59],\n\t[0, 23],\n\t[1, 31],\n\t[1, 12],\n\t[0, 6]\n];\n\nexport const predefined = {\n\t'@annually': '0 0 1 1 *',\n\t'@yearly': '0 0 1 1 *',\n\t'@monthly': '0 0 1 * *',\n\t'@weekly': '0 0 * * 0',\n\t'@daily': '0 0 * * *',\n\t'@hourly': '0 * * * *'\n} as const;\n\nexport const cronTokens = {\n\tjan: 1,\n\tfeb: 2,\n\tmar: 3,\n\tapr: 4,\n\tmay: 5,\n\tjun: 6,\n\tjul: 7,\n\taug: 8,\n\tsep: 9,\n\toct: 10,\n\tnov: 11,\n\tdec: 12,\n\tsun: 0,\n\tmon: 1,\n\ttue: 2,\n\twed: 3,\n\tthu: 4,\n\tfri: 5,\n\tsat: 6\n} as const;\n\nexport const tokensRegex = new RegExp(Object.keys(cronTokens).join('|'), 'g');\n\nexport const DEFAULT_UNITS: DurationFormatAssetsTime = {\n\t[TimeTypes.Year]: {\n\t\t1: 'year',\n\t\tDEFAULT: 'years'\n\t},\n\t[TimeTypes.Month]: {\n\t\t1: 'month',\n\t\tDEFAULT: 'months'\n\t},\n\t[TimeTypes.Week]: {\n\t\t1: 'week',\n\t\tDEFAULT: 'weeks'\n\t},\n\t[TimeTypes.Day]: {\n\t\t1: 'day',\n\t\tDEFAULT: 'days'\n\t},\n\t[TimeTypes.Hour]: {\n\t\t1: 'hour',\n\t\tDEFAULT: 'hours'\n\t},\n\t[TimeTypes.Minute]: {\n\t\t1: 'minute',\n\t\tDEFAULT: 'minutes'\n\t},\n\t[TimeTypes.Second]: {\n\t\t1: 'second',\n\t\tDEFAULT: 'seconds'\n\t}\n};\n\nexport const DEFAULT_SEPARATORS: DurationFormatSeparators = {\n\tleft: ' ',\n\tright: ' '\n};\n","/**\n * Compare if both arrays are strictly equal\n * @param arr1 The array to compare to\n * @param arr2 The array to compare with\n */\nexport function arrayStrictEquals<T extends readonly unknown[]>(arr1: T, arr2: T): boolean {\n\tif (arr1 === arr2) return true;\n\tif (arr1.length !== arr2.length) return false;\n\n\tfor (let i = 0; i < arr1.length; i++) {\n\t\tif (arr1[i] !== arr2[i] || typeof arr1[i] !== typeof arr2[i]) return false;\n\t}\n\treturn true;\n}\n","/**\n * Splits up an array into chunks\n * @param array The array to chunk up\n * @param chunkSize The size of each individual chunk\n */\nexport function chunk<T>(array: readonly T[], chunkSize: number): T[][] {\n\tif (!Array.isArray(array)) throw new TypeError('entries must be an array.');\n\tif (!Number.isInteger(chunkSize)) throw new TypeError('chunkSize must be an integer.');\n\tif (chunkSize < 1) throw new RangeError('chunkSize must be 1 or greater.');\n\tconst clone: T[] = array.slice();\n\tconst chunks: T[][] = [];\n\twhile (clone.length) chunks.push(clone.splice(0, chunkSize));\n\treturn chunks;\n}\n","import type { Ctor } from './utilityTypes';\n\n/**\n * Checks whether or not the value class extends the base class.\n * @param value The constructor to be checked against.\n * @param base The base constructor.\n */\nexport function classExtends<T extends Ctor>(value: Ctor, base: T): value is T {\n\tlet ctor: Ctor | null = value;\n\twhile (ctor !== null) {\n\t\tif (ctor === base) return true;\n\t\tctor = Object.getPrototypeOf(ctor);\n\t}\n\n\treturn false;\n}\n","const zws = String.fromCharCode(8203);\n\n/**\n * Wraps text in a markdown codeblock with optionally a language indicator for syntax highlighting\n * @param language The codeblock language\n * @param expression The expression to be wrapped in the codeblock\n */\nexport function codeBlock<T>(language: string, expression: T): string {\n\tif (typeof expression === 'string') {\n\t\tif (expression.length === 0) return `\\`\\`\\`${zws}\\`\\`\\``;\n\t\treturn `\\`\\`\\`${language}\\n${expression.replace(/```/, `\\`${zws}\\`\\``).replace(/`$/g, `\\`${zws}`)}\\`\\`\\``;\n\t}\n\treturn `\\`\\`\\`${language}\\n${expression || zws}\\`\\`\\``;\n}\n","/**\n * Split a string by its latest space character in a range from the character 0 to the selected one.\n * @param str The text to split.\n * @param length The length of the desired string.\n * @param char The character to split with\n * @copyright 2019 Antonio Román\n * @license Apache-2.0\n */\nexport function splitText(str: string, length: number, char = ' ') {\n\tconst x = str.substring(0, length).lastIndexOf(char);\n\tconst pos = x === -1 ? length : x;\n\treturn str.substring(0, pos);\n}\n","import { splitText } from './splitText';\n\n/**\n * Split a text by its latest space character in a range from the character 0 to the selected one.\n * @param str The text to split.\n * @param length The length of the desired string.\n * @copyright 2019 Antonio Román\n * @license Apache-2.0\n */\nexport function cutText(str: string, length: number) {\n\tif (str.length < length) return str;\n\tconst cut = splitText(str, length - 3);\n\tif (cut.length < length - 3) return `${cut}...`;\n\treturn `${cut.slice(0, length - 3)}...`;\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\nexport interface DebounceSettings {\n\t/**\n\t * The number of milliseconds to delay.\n\t * @default 0\n\t */\n\twait?: number;\n\n\t/**\n\t * The maximum time `func` is allowed to be delayed before it's invoked\n\t * @default null\n\t */\n\tmaxWait?: number | null;\n}\n\nexport interface DebouncedFunc<FnArgumentsType extends any[], FnReturnType> {\n\t/**\n\t * Call the original function, but applying the debounce rules.\n\t *\n\t * If the debounced function can be run immediately, this calls it and returns its return\n\t * value.\n\t *\n\t * Otherwise, it returns the return value of the last invokation, or undefined if the debounced\n\t * function was not invoked yet.\n\t */\n\t(...args: FnArgumentsType): FnReturnType | undefined;\n\n\t/**\n\t * Throw away any pending invokation of the debounced function.\n\t */\n\tcancel(): void;\n\n\t/**\n\t * If there is a pending invokation of the debounced function, invoke it immediately and return\n\t * its return value.\n\t *\n\t * Otherwise, return the value from the last invokation, or undefined if the debounced function\n\t * was never invoked.\n\t */\n\tflush(): FnReturnType | undefined;\n}\n\n/**\n * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since\n * the last time the debounced function was invoked. The debounced function comes with a cancel method to\n * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to\n * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent\n * calls to the debounced function return the result of the last func invocation.\n *\n * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only\n * if the the debounced function is invoked more than once during the wait timeout.\n *\n * See David Corbacho’s article for details over the differences between _.debounce and _.throttle.\n *\n * @param func The function to debounce.\n * @param wait The number of milliseconds to delay.\n * @param options The options object.\n * @return Returns the new debounced function.\n */\nexport function debounce<FnArgumentsType extends any[], FnReturnType>(\n\tfunc: (...args: FnArgumentsType) => FnReturnType,\n\toptions: DebounceSettings = {}\n): DebouncedFunc<FnArgumentsType, FnReturnType> {\n\tlet lastArgs: FnArgumentsType | undefined;\n\tlet result: FnReturnType | undefined;\n\tlet timerId: NodeJS.Timeout | undefined;\n\tlet lastCallTime: number | undefined;\n\tlet lastInvokeTime = 0;\n\n\tconst wait = options.wait ?? 0;\n\tconst maxWait = typeof options.maxWait === 'number' ? Math.max(options.maxWait, wait) : null;\n\n\tfunction invokeFunc(time: number) {\n\t\tconst args = lastArgs;\n\n\t\tlastArgs = undefined;\n\t\tlastInvokeTime = time;\n\t\tresult = func(...args!);\n\t\treturn result;\n\t}\n\n\tfunction leadingEdge(time: number) {\n\t\t// Reset any `maxWait` timer.\n\t\tlastInvokeTime = time;\n\t\t// Start the timer for the trailing edge.\n\t\ttimerId = setTimeout(timerExpired, wait);\n\t\t// Invoke the leading edge.\n\t\treturn result;\n\t}\n\n\tfunction remainingWait(time: number) {\n\t\tconst timeSinceLastCall = time - lastCallTime!;\n\t\tconst timeSinceLastInvoke = time - lastInvokeTime;\n\t\tconst result = wait - timeSinceLastCall;\n\n\t\treturn maxWait === null ? result : Math.min(result, maxWait - timeSinceLastInvoke);\n\t}\n\n\tfunction shouldInvoke(time: number) {\n\t\tconst timeSinceLastCall = time - lastCallTime!;\n\t\tconst timeSinceLastInvoke = time - lastInvokeTime;\n\n\t\t// Either this is the first call, activity has stopped and we're at the\n\t\t// trailing edge, the system time has gone backwards and we're treating\n\t\t// it as the trailing edge, or we've hit the `maxWait` limit.\n\t\treturn (\n\t\t\tlastCallTime === undefined || //\n\t\t\ttimeSinceLastCall >= wait ||\n\t\t\ttimeSinceLastCall < 0 ||\n\t\t\t(maxWait !== null && timeSinceLastInvoke >= maxWait)\n\t\t);\n\t}\n\n\tfunction timerExpired() {\n\t\tconst time = Date.now();\n\t\tif (shouldInvoke(time)) {\n\t\t\ttrailingEdge(time);\n\t\t\treturn;\n\t\t}\n\t\t// Restart the timer.\n\t\ttimerId = setTimeout(timerExpired, remainingWait(time));\n\t}\n\n\tfunction trailingEdge(time: number) {\n\t\ttimerId = undefined;\n\t\treturn invokeFunc(time);\n\t}\n\n\tfunction cancel() {\n\t\tif (timerId !== undefined) {\n\t\t\tclearTimeout(timerId);\n\t\t}\n\n\t\tlastInvokeTime = 0;\n\t\tlastArgs = undefined;\n\t\tlastCallTime = undefined;\n\t\ttimerId = undefined;\n\t}\n\n\tfunction flush() {\n\t\treturn timerId === undefined ? result : trailingEdge(Date.now());\n\t}\n\n\tfunction debounced(...args: FnArgumentsType) {\n\t\tconst time = Date.now();\n\t\tconst isInvoking = shouldInvoke(time);\n\n\t\tlastArgs = args;\n\t\tlastCallTime = time;\n\n\t\tif (isInvoking) {\n\t\t\tif (timerId === undefined) {\n\t\t\t\treturn leadingEdge(lastCallTime);\n\t\t\t}\n\t\t\tif (maxWait !== null) {\n\t\t\t\t// Handle invocations in a tight loop.\n\t\t\t\ttimerId = setTimeout(timerExpired, wait);\n\t\t\t\treturn invokeFunc(lastCallTime);\n\t\t\t}\n\t\t}\n\n\t\tif (timerId === undefined) {\n\t\t\ttimerId = setTimeout(timerExpired, wait);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tdebounced.cancel = cancel;\n\tdebounced.flush = flush;\n\n\treturn debounced;\n}\n","const primitiveTypes = ['string', 'bigint', 'number', 'boolean'];\n\n/**\n * Check whether a value is a primitive\n * @param input The input to check\n */\nexport function isPrimitive(input: unknown): input is string | bigint | number | boolean {\n\treturn primitiveTypes.includes(typeof input);\n}\n","import { isPrimitive } from './isPrimitive';\n\n/**\n * Deep clone an object\n * @param source The object to clone\n */\nexport function deepClone<T>(source: T): T {\n\t// Check if it's a primitive (with exception of function and null, which is typeof object)\n\tif (source === null || isPrimitive(source)) {\n\t\treturn source;\n\t}\n\n\tif (source instanceof Date) {\n\t\tconst output = new (source.constructor as DateConstructor)(source);\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (Array.isArray(source)) {\n\t\tconst output = new (source.constructor as ArrayConstructor)(source.length) as unknown as T & T extends (infer S)[] ? S[] : never;\n\n\t\tfor (let i = 0; i < source.length; i++) {\n\t\t\toutput[i] = deepClone(source[i]);\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (source instanceof Map) {\n\t\tconst output = new (source.constructor as MapConstructor)() as unknown as T & T extends Map<infer K, infer V> ? Map<K, V> : never;\n\n\t\tfor (const [key, value] of source.entries()) {\n\t\t\toutput.set(key, deepClone(value));\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (source instanceof Set) {\n\t\tconst output = new (source.constructor as SetConstructor)() as unknown as T & T extends Set<infer K> ? Set<K> : never;\n\n\t\tfor (const value of source.values()) {\n\t\t\toutput.add(deepClone(value));\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (typeof source === 'object') {\n\t\tconst output = new ((source as T & (object | Record<PropertyKey, unknown>)).constructor as ObjectConstructor)() as unknown as Record<\n\t\t\tPropertyKey,\n\t\t\tunknown\n\t\t>;\n\n\t\tfor (const [key, value] of Object.entries(source)) {\n\t\t\tObject.defineProperty(output, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: deepClone(value),\n\t\t\t\twritable: true\n\t\t\t});\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\treturn source;\n}\n","import type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether or not a value is `null` or `undefined`\n * @param value The value to check\n */\nexport function isNullOrUndefined(value: unknown): value is Nullish {\n\treturn value === undefined || value === null;\n}\n","import { isNullOrUndefined } from './isNullOrUndefined';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether a value is not `null` nor `undefined`.\n * This can be used in {@link Array.filter} to remove `null` and `undefined` from the array type\n * @param value The value to verify that is neither `null` nor `undefined`\n * @returns A boolean that is `true` if the value is neither `null` nor `undefined`, false otherwise.\n * @example\n * ```typescript\n * // TypeScript Type: (string | undefined | null)[]\n * const someArray = ['one', 'two', undefined, null, 'five'];\n *\n * // TypeScript Type: string[]\n * const filteredArray = someArray.filter(filterNullAndUndefined);\n * // Result: ['one', 'two', 'five']\n * ```\n */\nexport function filterNullAndUndefined<TValue>(value: TValue | Nullish): value is TValue {\n\treturn !isNullOrUndefined(value);\n}\n","import { isNullOrUndefined } from './isNullOrUndefined';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether or not a value is `null`, `undefined` or `''`, `[]`\n * @param value The value to check\n */\nexport function isNullOrUndefinedOrEmpty(value: unknown): value is Nullish | '' {\n\treturn isNullOrUndefined(value) || (value as string | unknown[]).length === 0;\n}\n","import { isNullOrUndefinedOrEmpty } from './isNullOrUndefinedOrEmpty';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether a value is not `null` nor `undefined` nor `''` (empty string).\n * This can be used in {@link Array.filter} to remove `null`, `undefined` from the array type\n * @param value The value to verify that is neither `null`, `undefined` nor `''` (empty string)\n * @returns A boolean that is `true` if the value is neither `null`, `undefined` nor `''` (empty string), false otherwise.\n * @example\n * ```typescript\n * // TypeScript Type: (string | undefined | null)[]\n * const someArray = ['one', 'two', undefined, null, ''];\n *\n * // TypeScript Type: string[]\n * const filteredArray = someArray.filter(filterNullAndUndefinedAndEmpty);\n * // Result: ['one', 'two']\n * ```\n */\nexport function filterNullAndUndefinedAndEmpty<TValue>(value: TValue | Nullish | ''): value is TValue {\n\treturn !isNullOrUndefinedOrEmpty(value);\n}\n","import { isNullOrUndefined } from './isNullOrUndefined';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether or not a value is `null`, `undefined` or `0`\n * @param value The value to check\n */\nexport function isNullOrUndefinedOrZero(value: unknown): value is Nullish | 0 {\n\treturn value === 0 || isNullOrUndefined(value);\n}\n","import { isNullOrUndefinedOrZero } from './isNullOrUndefinedOrZero';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether a value is not `null` nor `undefined` nor `0`.\n * This can be used in {@link Array.filter} to remove `null`, `undefined` from the array type\n * @param value The value to verify that is neither `null`, `undefined` nor `0`\n * @returns A boolean that is `true` if the value is neither `null`, `undefined` nor `0`, false otherwise.\n * @example\n * ```typescript\n * // TypeScript Type: (string | number | undefined | null)[]\n * const someArray = ['one', 'two', undefined, null, 0, 1];\n *\n * // TypeScript Type: (string | number)[]\n * const filteredArray = someArray.filter(filterNullAndUndefinedAndZero);\n * // Result: ['one', 'two', 1]\n * ```\n */\nexport function filterNullAndUndefinedAndZero<TValue>(value: TValue | Nullish | 0): value is TValue {\n\treturn !isNullOrUndefinedOrZero(value);\n}\n","/**\n * Checks whether any of the {@link keys} are in the {@link map}\n * @param map The map to check\n * @param keys The keys to find in the map\n * @returns `true` if at least one of the {@link keys} is in the {@link map}, `false` otherwise.\n */\nexport function hasAtLeastOneKeyInMap<T>(map: ReadonlyMap<T, any>, keys: readonly T[]): boolean {\n\treturn keys.some((key) => map.has(key));\n}\n","const zws = String.fromCharCode(8203);\n\n/**\n * Wraps text in a markdown inline codeblock\n * @param expression The expression to be wrapped in the codeblock\n */\nexport function inlineCodeBlock(input: string): string {\n\treturn `\\`${input.replace(/ /g, '\\u00A0').replace(/`/g, `\\`${zws}`)}\\``;\n}\n","import type { Ctor } from './utilityTypes';\n\n/**\n * Verify if the input is a class constructor.\n * @param input The function to verify\n */\nexport function isClass(input: unknown): input is Ctor {\n\treturn typeof input === 'function' && typeof input.prototype === 'object';\n}\n","/**\n * Verify if the input is a function.\n * @param input The function to verify\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(input: unknown): input is Function {\n\treturn typeof input === 'function';\n}\n","/**\n * Verify if a number is a finite number.\n * @param input The number to verify\n */\nexport function isNumber(input: unknown): input is number {\n\treturn typeof input === 'number' && !isNaN(input) && Number.isFinite(input);\n}\n","import type { Constructor, NonNullObject } from './utilityTypes';\n\n/**\n * Verify if the input is an object literal (or class).\n * @param input The object to verify\n * @param constructorType The type of the constructor of the object. Use this if you want a `class` of your choosing to pass the check as well.\n */\nexport function isObject(input: unknown, constructorType?: ObjectConstructor): input is NonNullObject;\nexport function isObject<T extends Constructor<unknown>>(input: unknown, constructorType: T): input is InstanceType<T>;\nexport function isObject<T extends Constructor<unknown> = ObjectConstructor>(input: unknown, constructorType?: T): input is NonNullObject {\n\treturn typeof input === 'object' && input ? input.constructor === (constructorType ?? Object) : false;\n}\n","/* eslint-disable @typescript-eslint/ban-types */\nimport { isFunction } from './isFunction';\n\nexport interface Thenable {\n\tthen: Function;\n\tcatch: Function;\n}\n\nfunction hasThen(input: { then?: Function }): boolean {\n\treturn Reflect.has(input, 'then') && isFunction(input.then);\n}\n\nfunction hasCatch(input: { catch?: Function }): boolean {\n\treturn Reflect.has(input, 'catch') && isFunction(input.catch);\n}\n\n/**\n * Verify if an object is a promise.\n * @param input The promise to verify\n */\nexport function isThenable(input: unknown): input is Thenable {\n\tif (typeof input !== 'object' || input === null) return false;\n\treturn input instanceof Promise || (input !== Promise.prototype && hasThen(input) && hasCatch(input));\n}\n","/**\n * Turn a dotted path into a json object.\n * @param path The dotted path\n * @param value The value\n * @param obj The object to edit\n */\nexport function makeObject(path: string, value: unknown, obj: Record<string, unknown> = {}): Record<string, unknown> {\n\tif (path.includes('.')) {\n\t\tconst route = path.split('.');\n\t\tconst lastKey = route.pop() as string;\n\t\tlet reference = obj;\n\t\tfor (const key of route) {\n\t\t\tif (!reference[key]) reference[key] = {};\n\t\t\treference = reference[key] as Record<string, unknown>;\n\t\t}\n\t\treference[lastKey] = value;\n\t} else {\n\t\tobj[path] = value;\n\t}\n\treturn obj;\n}\n","import { deepClone } from './deepClone';\nimport { isObject } from './isObject';\nimport type { DeepRequired, NonNullObject } from './utilityTypes';\n\n/**\n * Deep merges 2 objects. Properties from the second parameter are applied to the first.\n * @remark `overwrites` is also mutated!\n * @remark If the value of a key in `overwrites` is `undefined` then the value of that same key in `base` is used instead!\n * @remark This is essentially `{ ...base, ...overwrites }` but recursively\n * @param base Base object\n * @param overwrites Overwrites to apply\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = {}; // will be { a: 0, b: 1 } after merge\n * mergeDefault(base, overwrites) // { a: 0, b: 1 }\n * ```\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = { a: 2, i: 3 };\n * mergeDefault(base, overwrites) // { a: 2, i: 3, b: 1 };\n * ```\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = { a: null };\n * mergeDefault(base, overwrites) // { a: null, b: 1 };\n * ```\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = { a: undefined };\n * mergeDefault(base, overwrites) // { a: 0, b: 1 };\n * ```\n * @example\n * ```typescript\n * const base = { a: null };\n * const overwrites = { a: { b: 5 } };\n * mergeDefault(base, overwrites) // { a: { b: 5 } };\n * ```\n */\nexport function mergeDefault<A extends NonNullObject, B extends Partial<A>>(base: A, overwrites?: B): DeepRequired<A & B> {\n\t// If no overwrites are specified then deep clone the base\n\tif (!overwrites) return deepClone(base) as DeepRequired<A & B>;\n\n\tfor (const [baseKey, baseValue] of Object.entries(base)) {\n\t\tconst overwritesValueAtBaseKey = Reflect.get(overwrites, baseKey);\n\n\t\tif (typeof overwritesValueAtBaseKey === 'undefined') {\n\t\t\tReflect.set(overwrites, baseKey, deepClone(baseValue));\n\t\t} else if (isObject(overwritesValueAtBaseKey)) {\n\t\t\tReflect.set(overwrites, baseKey, mergeDefault((baseValue ?? {}) as NonNullObject, overwritesValueAtBaseKey));\n\t\t}\n\t}\n\n\treturn overwrites as DeepRequired<A & B>;\n}\n","/* eslint-disable @typescript-eslint/ban-types */\nimport { isObject } from './isObject';\n\n/**\n * Merges two objects\n * @param objTarget The object to be merged\n * @param objSource The object to merge\n */\nexport function mergeObjects<A extends object, B extends object>(objTarget: A, objSource: Readonly<B>): A & B {\n\tfor (const [key, value] of Object.entries(objSource)) {\n\t\tconst targetValue = Reflect.get(objTarget, key);\n\t\tif (isObject(value)) {\n\t\t\tReflect.set(objTarget, key, isObject(targetValue) ? mergeObjects(targetValue, value as object) : value);\n\t\t} else if (!isObject(targetValue)) {\n\t\t\tReflect.set(objTarget, key, value);\n\t\t}\n\t}\n\n\treturn objTarget as A & B;\n}\n","// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop() {}\n","import { isObject } from './isObject';\n\n/**\n * Convert an object to a tuple\n * @param value The object to convert\n * @param prefix The prefix for the key\n */\nexport function objectToTuples(original: Record<string, unknown>, prefix = ''): [string, unknown][] {\n\tconst entries: [string, unknown][] = [];\n\tfor (const [key, value] of Object.entries(original)) {\n\t\tif (isObject(value)) {\n\t\t\tentries.push(...objectToTuples(value as Record<string, unknown>, `${prefix}${key}.`));\n\t\t} else {\n\t\t\tentries.push([`${prefix}${key}`, value]);\n\t\t}\n\t}\n\n\treturn entries;\n}\n","import type { URL } from 'node:url';\n\n/**\n * Parses an URL, returns null if invalid.\n * @param url The url to parse\n */\nexport function parseURL(url: string): URL | null {\n\ttry {\n\t\t// @ts-expect-error URL is global in NodeJS and evergreen Browsers\n\t\treturn new URL(url);\n\t} catch {\n\t\treturn null;\n\t}\n}\n","import { isFunction } from './isFunction';\n\n/**\n * Partitions `array` into a tuple of two arrays,\n * where one array contains all elements that satisfies `predicate`,\n * and the other contains all elements that do not satisfy `predicate`.\n * @param array The array to partition. This array is not mutated.\n * @param predicate The predicate function to determine in which partition the item should be placed.\n * The function should return true for items that should be placed in the first partition, and false for those that should be placed in the second partition.\n * @returns A tuple of two arrays.\n */\nexport function partition<T>(array: T[], predicate: (value: T, index: number) => boolean) {\n\tif (!Array.isArray(array)) throw new TypeError('entries must be an array.');\n\tif (!isFunction(predicate)) throw new TypeError('predicate must be an function that returns a boolean value.');\n\n\tconst partitionOne: T[] = [];\n\tconst partitionTwo: T[] = [];\n\n\tfor (let i = 0; i < array.length; i++) {\n\t\tif (predicate(array[i], i)) {\n\t\t\tpartitionOne.push(array[i]);\n\t\t} else {\n\t\t\tpartitionTwo.push(array[i]);\n\t\t}\n\t}\n\n\treturn [partitionOne, partitionTwo];\n}\n","/**\n * Get an array of numbers with the selected range\n * @param min The minimum value\n * @param max The maximum value\n * @param step The step value\n */\nexport function range(min: number, max: number, step: number): number[] {\n\treturn new Array(Math.floor((max - min) / step) + 1).fill(0).map((_val, i) => min + i * step);\n}\n","// eslint-disable-next-line @typescript-eslint/naming-convention\nconst REGEXPESC = /[-/\\\\^$*+?.()|[\\]{}]/g;\n\n/**\n * Cleans a string from regex injection\n * @param str The string to clean\n */\nexport function regExpEsc(str: string): string {\n\treturn str.replace(REGEXPESC, '\\\\$&');\n}\n","/**\n * Properly rounds up or down a number.\n * Also supports strings using an exponent to indicate large or small numbers.\n * @param num The number to round off\n * @param scale The amount of decimals to retain\n */\nexport function roundNumber(num: number | string, scale = 0) {\n\tif (!num.toString().includes('e')) {\n\t\treturn Number(`${Math.round(Number(`${num}e+${scale}`))}e-${scale}`);\n\t}\n\tconst arr = `${num}`.split('e');\n\tlet sig = '';\n\n\tif (Number(arr[1]) + scale > 0) {\n\t\tsig = '+';\n\t}\n\n\treturn Number(`${Math.round(Number(`${Number(arr[0])}e${sig}${Number(arr[1]) + scale}`))}e-${scale}`);\n}\n","// eslint-disable-next-line @typescript-eslint/naming-convention\nconst TOTITLECASE = /[A-Za-zÀ-ÖØ-öø-ÿ]\\S*/g;\nconst titleCaseVariants: Record<string, string> = {\n\ttextchannel: 'TextChannel',\n\tvoicechannel: 'VoiceChannel',\n\tcategorychannel: 'CategoryChannel',\n\tguildmember: 'GuildMember'\n};\n\n/**\n * Converts a string to Title Case\n * @description This is designed to also ensure common Discord PascalCased strings\n * \t\t\t\tare put in their TitleCase titleCaseVariants. See below for the full list.\n * @param str The string to title case\n * @terms\n * This table lists how certain terms are converted, these are case insensitive.\n * Any terms not included are converted to regular Titlecase.\n *\n * | Term | Converted To |\n * |-----------------|-----------------|\n * | textchannel | TextChannel |\n * | voicechannel | VoiceChannel |\n * | categorychannel | CategoryChannel |\n * | guildmember | GuildMember |\n */\nexport function toTitleCase(str: string): string {\n\treturn str.replace(TOTITLECASE, (txt) => titleCaseVariants[txt] || txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());\n}\n","/* eslint-disable @typescript-eslint/ban-types */\n/**\n * Try parse a stringified JSON string.\n * @param value The value to parse\n */\nexport function tryParse(value: string): object | string {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch (err) {\n\t\treturn value;\n\t}\n}\n","/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport { range } from '@sapphire/utilities';\nimport { allowedNum, cronTokens, partRegex, predefined, Time, tokensRegex, wildcardRegex } from './constants';\n\n/**\n * Handles Cron strings and generates dates based on the cron string provided.\n * @see https://en.wikipedia.org/wiki/Cron\n */\nexport class Cron {\n\tpublic cron: string;\n\tpublic normalized: string;\n\tpublic minutes: number[];\n\tpublic hours: number[];\n\tpublic days: number[];\n\tpublic months: number[];\n\tpublic dows: number[];\n\n\t/**\n\t * @param cron The cron pattern to use\n\t */\n\tpublic constructor(cron: string) {\n\t\tthis.cron = cron.toLowerCase();\n\t\tthis.normalized = Cron.normalize(this.cron);\n\t\t[this.minutes, this.hours, this.days, this.months, this.dows] = Cron.parseString(this.normalized);\n\t}\n\n\t/**\n\t * Get the next date that matches with the current pattern\n\t * @param outset The Date instance to compare with\n\t * @param origin Whether this next call is origin\n\t */\n\tpublic next(outset: Date = new Date(), origin = true): Date {\n\t\tif (!this.days.includes(outset.getUTCDate()) || !this.months.includes(outset.getUTCMonth() + 1) || !this.dows.includes(outset.getUTCDay())) {\n\t\t\treturn this.next(new Date(outset.getTime() + Time.Day), false);\n\t\t}\n\t\tif (!origin) return new Date(Date.UTC(outset.getUTCFullYear(), outset.getUTCMonth(), outset.getUTCDate(), this.hours[0], this.minutes[0]));\n\n\t\tconst now = new Date(outset.getTime() + 60000);\n\n\t\tfor (const hour of this.hours) {\n\t\t\tif (hour < now.getUTCHours()) continue;\n\t\t\tfor (const minute of this.minutes) {\n\t\t\t\tif (hour === now.getUTCHours() && minute < now.getUTCMinutes()) continue;\n\t\t\t\treturn new Date(Date.UTC(outset.getUTCFullYear(), outset.getUTCMonth(), outset.getUTCDate(), hour, minute));\n\t\t\t}\n\t\t}\n\n\t\treturn this.next(new Date(outset.getTime() + Time.Day), false);\n\t}\n\n\t/**\n\t * Normalize the pattern\n\t * @param cron The pattern to normalize\n\t */\n\tprivate static normalize(cron: string): string {\n\t\tif (Reflect.has(predefined, cron)) return Reflect.get(predefined, cron);\n\t\tconst now = new Date();\n\t\tcron = cron\n\t\t\t.split(' ')\n\t\t\t.map((val, i) =>\n\t\t\t\tval.replace(wildcardRegex, (match) => {\n\t\t\t\t\tif (match === 'h') return (Math.floor(Math.random() * allowedNum[i][1]) + allowedNum[i][0]).toString();\n\n\t\t\t\t\tif (match === '?') {\n\t\t\t\t\t\tswitch (i) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\treturn now.getUTCMinutes().toString();\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\treturn now.getUTCHours().toString();\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\treturn now.getUTCDate().toString();\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\treturn now.getUTCMonth().toString();\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\treturn now.getUTCDay().toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn match;\n\t\t\t\t})\n\t\t\t)\n\t\t\t.join(' ');\n\t\treturn cron.replace(tokensRegex, (match) => String(Reflect.get(cronTokens, match)));\n\t}\n\n\t/**\n\t * Parse the pattern\n\t * @param cron The pattern to parse\n\t */\n\tprivate static parseString(cron: string): Array<number[]> {\n\t\tconst parts = cron.split(' ');\n\t\tif (parts.length !== 5) throw new Error('Invalid Cron Provided');\n\t\treturn parts.map((part, i) => Cron.parsePart(part, i));\n\t}\n\n\t/**\n\t * Parse the current part\n\t * @param cronPart The part of the pattern to parse\n\t * @param id The id that identifies the current part\n\t */\n\tprivate static parsePart(cronPart: string, id: number): number[] {\n\t\tif (cronPart.includes(',')) {\n\t\t\tconst res: number[] = [];\n\t\t\tfor (const part of cronPart.split(',')) res.push(...Cron.parsePart(part, id));\n\t\t\treturn [...new Set(res)].sort((a, b) => a - b);\n\t\t}\n\n\t\t// eslint-disable-next-line prefer-const\n\t\tconst [, wild, minStr, maxStr, step] = partRegex.exec(cronPart)!;\n\t\tlet [min, max] = [parseInt(minStr, 10), parseInt(maxStr, 10)];\n\n\t\t// If '*', set min and max as the minimum and maximum allowed numbers:\n\t\tif (wild) [min, max] = allowedNum[id];\n\t\t// Else if a number was given, but not a maximum nor a step, return it\n\t\t// as only allowed value:\n\t\telse if (!max && !step) return [min];\n\n\t\t// Set min and max as the given numbers, defaulting max to the maximum\n\t\t// allowed, so min is never bigger than max:\n\t\t// This makes min and max be, in the following cases (considering minutes):\n\t\t// -> 1-2 | 1..2\n\t\t// -> 2-1 | 1..2\n\t\t// -> 1/7 | 1, 8, 15, 22, 29, 36, 43, 50, 57\n\t\t[min, max] = [min, max || allowedNum[id][1]].sort((a, b) => a - b);\n\n\t\t// Generate a range\n\t\treturn range(min, max, parseInt(step, 10) || 1);\n\t}\n}\n","/* eslint-disable @typescript-eslint/restrict-plus-operands */\nconst tokens = new Map([\n\t['nanosecond', 1 / 1e6],\n\t['nanoseconds', 1 / 1e6],\n\t['ns', 1 / 1e6],\n\n\t['millisecond', 1],\n\t['milliseconds', 1],\n\t['ms', 1],\n\n\t['second', 1000],\n\t['seconds', 1000],\n\t['sec', 1000],\n\t['secs', 1000],\n\t['s', 1000],\n\n\t['minute', 1000 * 60],\n\t['minutes', 1000 * 60],\n\t['min', 1000 * 60],\n\t['mins', 1000 * 60],\n\t['m', 1000 * 60],\n\n\t['hour', 1000 * 60 * 60],\n\t['hours', 1000 * 60 * 60],\n\t['hr', 1000 * 60 * 60],\n\t['hrs', 1000 * 60 * 60],\n\t['h', 1000 * 60 * 60],\n\n\t['day', 1000 * 60 * 60 * 24],\n\t['days', 1000 * 60 * 60 * 24],\n\t['d', 1000 * 60 * 60 * 24],\n\n\t['week', 1000 * 60 * 60 * 24 * 7],\n\t['weeks', 1000 * 60 * 60 * 24 * 7],\n\t['wk', 1000 * 60 * 60 * 24 * 7],\n\t['wks', 1000 * 60 * 60 * 24 * 7],\n\t['w', 1000 * 60 * 60 * 24 * 7],\n\n\t['month', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\t['months', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\t['b', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\t['mo', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\n\t['year', 1000 * 60 * 60 * 24 * 365.25],\n\t['years', 1000 * 60 * 60 * 24 * 365.25],\n\t['yr', 1000 * 60 * 60 * 24 * 365.25],\n\t['yrs', 1000 * 60 * 60 * 24 * 365.25],\n\t['y', 1000 * 60 * 60 * 24 * 365.25]\n]);\n\n/**\n * Converts duration strings into ms and future dates\n */\nexport class Duration {\n\t/**\n\t * The offset\n\t */\n\tpublic offset: number;\n\n\t/**\n\t * Create a new Duration instance\n\t * @param pattern The string to parse\n\t */\n\tpublic constructor(pattern: string) {\n\t\tthis.offset = Duration.parse(pattern.toLowerCase());\n\t}\n\n\t/**\n\t * Get the date from now\n\t */\n\tpublic get fromNow(): Date {\n\t\treturn this.dateFrom(new Date());\n\t}\n\n\t/**\n\t * Get the date from\n\t * @param date The Date instance to get the date from\n\t */\n\tpublic dateFrom(date: Date): Date {\n\t\treturn new Date(date.getTime() + this.offset);\n\t}\n\n\t/**\n\t * The RegExp used for the pattern parsing\n\t */\n\tprivate static readonly kPatternRegex = /(-?\\d*\\.?\\d+(?:e[-+]?\\d+)?)\\s*([a-zμ]*)/gi;\n\n\t/**\n\t * The RegExp used for removing commas\n\t */\n\tprivate static readonly kCommaRegex = /,/g;\n\n\t/**\n\t * The RegExp used for replacing a/an with 1\n\t */\n\tprivate static readonly kAanRegex = /\\ban?\\b/gi;\n\n\t/**\n\t * Parse the pattern\n\t * @param pattern The pattern to parse\n\t */\n\tprivate static parse(pattern: string): number {\n\t\tlet result = 0;\n\t\tlet valid = false;\n\n\t\tpattern\n\t\t\t// ignore commas\n\t\t\t.replace(Duration.kCommaRegex, '')\n\t\t\t// a / an = 1\n\t\t\t.replace(Duration.kAanRegex, '1')\n\t\t\t// do math\n\t\t\t.replace(Duration.kPatternRegex, (_, i, units) => {\n\t\t\t\tconst token = tokens.get(units);\n\t\t\t\tif (token !== undefined) {\n\t\t\t\t\tresult += Number(i) * token;\n\t\t\t\t\tvalid = true;\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t});\n\n\t\treturn valid ? result : NaN;\n\t}\n}\n","import { DEFAULT_SEPARATORS, DEFAULT_UNITS, TimeTypes } from './constants';\n\n/**\n * The duration of each time type in milliseconds\n */\nconst kTimeDurations: readonly [TimeTypes, number][] = [\n\t[TimeTypes.Year, 31536000000],\n\t// 29.53059 days is the official duration of a month: https://en.wikipedia.org/wiki/Month\n\t[TimeTypes.Month, 2628000000],\n\t[TimeTypes.Week, 1000 * 60 * 60 * 24 * 7],\n\t[TimeTypes.Day, 1000 * 60 * 60 * 24],\n\t[TimeTypes.Hour, 1000 * 60 * 60],\n\t[TimeTypes.Minute, 1000 * 60],\n\t[TimeTypes.Second, 1000]\n];\n\n/**\n * Display the duration\n * @param duration The duration in milliseconds to parse and display\n * @param assets The language assets\n */\nexport class DurationFormatter {\n\tpublic constructor(public units: DurationFormatAssetsTime = DEFAULT_UNITS) {}\n\n\tpublic format(\n\t\tduration: number,\n\t\tprecision = 7,\n\t\t{\n\t\t\tleft: leftSeparator = DEFAULT_SEPARATORS.left,\n\t\t\tright: rightSeparator = DEFAULT_SEPARATORS.right\n\t\t}: DurationFormatSeparators = DEFAULT_SEPARATORS\n\t) {\n\t\tconst output: string[] = [];\n\t\tconst negative = duration < 0;\n\t\tif (negative) duration *= -1;\n\n\t\tfor (const [type, timeDuration] of kTimeDurations) {\n\t\t\tconst substraction = duration / timeDuration;\n\t\t\tif (substraction < 1) continue;\n\n\t\t\tconst floored = Math.floor(substraction);\n\t\t\tduration -= floored * timeDuration;\n\t\t\toutput.push(addUnit(floored, this.units[type], leftSeparator!));\n\n\t\t\t// If the output has enough precision, break\n\t\t\tif (output.length >= precision) break;\n\t\t}\n\n\t\treturn `${negative ? '-' : ''}${output.join(rightSeparator) || addUnit(0, this.units.second, leftSeparator!)}`;\n\t}\n}\n\n/**\n * Adds an unit, if non zero\n * @param time The duration of said unit\n * @param unit The unit language assets\n */\nfunction addUnit(time: number, unit: DurationFormatAssetsUnit, separator: string) {\n\tif (Reflect.has(unit, time)) return `${time}${separator}${Reflect.get(unit, time)}`;\n\treturn `${time}${separator}${unit.DEFAULT}`;\n}\n\nexport interface DurationFormatSeparators {\n\tleft?: string;\n\tright?: string;\n}\n\nexport interface DurationFormatAssetsUnit extends Record<number, string> {\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tDEFAULT: string;\n}\n\nexport interface DurationFormatAssetsTime {\n\t[TimeTypes.Second]: DurationFormatAssetsUnit;\n\t[TimeTypes.Minute]: DurationFormatAssetsUnit;\n\t[TimeTypes.Hour]: DurationFormatAssetsUnit;\n\t[TimeTypes.Day]: DurationFormatAssetsUnit;\n\t[TimeTypes.Week]: DurationFormatAssetsUnit;\n\t[TimeTypes.Month]: DurationFormatAssetsUnit;\n\t[TimeTypes.Year]: DurationFormatAssetsUnit;\n}\n","/**\n * Manages timers so that this application can be cleanly exited\n */\nexport class TimerManager extends null {\n\t/**\n\t * A set of timeouts to clear on destroy\n\t */\n\tprivate static storedTimeouts = new Set<NodeJS.Timeout>();\n\n\t/**\n\t * A set of intervals to clear on destroy\n\t */\n\tprivate static storedIntervals = new Set<NodeJS.Timeout>();\n\n\t/**\n\t * Creates a timeout gets cleared when destroyed\n\t * @param fn callback function\n\t * @param delay amount of time before running the callback\n\t * @param args additional arguments to pass back to the callback\n\t */\n\tpublic static setTimeout<A = unknown>(fn: (...args: A[]) => void, delay: number, ...args: A[]): NodeJS.Timeout {\n\t\tconst timeout = setTimeout(() => {\n\t\t\tthis.storedTimeouts.delete(timeout);\n\t\t\tfn(...args);\n\t\t}, delay);\n\t\tthis.storedTimeouts.add(timeout);\n\t\treturn timeout;\n\t}\n\n\t/**\n\t * Clears a timeout created through this class\n\t * @param timeout The timeout to clear\n\t */\n\tpublic static clearTimeout(timeout: NodeJS.Timeout): void {\n\t\tclearTimeout(timeout);\n\t\tthis.storedTimeouts.delete(timeout);\n\t}\n\n\t/**\n\t * Creates an interval gets cleared when destroyed\n\t * @param fn callback function\n\t * @param delay amount of time before running the callback\n\t * @param args additional arguments to pass back to the callback\n\t */\n\tpublic static setInterval<A = unknown>(fn: (...args: A[]) => void, delay: number, ...args: A[]): NodeJS.Timeout {\n\t\tconst interval = setInterval(fn, delay, ...args);\n\t\tthis.storedIntervals.add(interval);\n\t\treturn interval;\n\t}\n\n\t/**\n\t * Clears an internal created through this class\n\t * @param interval The interval to clear\n\t */\n\tpublic static clearInterval(interval: NodeJS.Timeout): void {\n\t\tclearInterval(interval);\n\t\tthis.storedIntervals.delete(interval);\n\t}\n\n\t/**\n\t * Clears running timeouts and intervals created through this class so NodeJS can gracefully exit\n\t */\n\tpublic static destroy(): void {\n\t\tfor (const i of this.storedTimeouts) clearTimeout(i);\n\t\tfor (const i of this.storedIntervals) clearInterval(i);\n\t\tthis.storedTimeouts.clear();\n\t\tthis.storedIntervals.clear();\n\t}\n}\n","import { days, months, Time, tokens } from './constants';\n\ninterface TokenResolver {\n\t(time: Date): string;\n}\n\nconst tokenResolvers = new Map<string, TokenResolver>([\n\t// Dates\n\t['Y', (time) => String(time.getFullYear()).slice(2)],\n\t['YY', (time) => String(time.getFullYear()).slice(2)],\n\t['YYY', (time) => String(time.getFullYear())],\n\t['YYYY', (time) => String(time.getFullYear())],\n\t['Q', (time) => String((time.getMonth() + 1) / 3)],\n\t['M', (time) => String(time.getMonth() + 1)],\n\t['MM', (time) => String(time.getMonth() + 1).padStart(2, '0')],\n\t['MMM', (time) => months[time.getMonth()]],\n\t['MMMM', (time) => months[time.getMonth()]],\n\t['D', (time) => String(time.getDate())],\n\t['DD', (time) => String(time.getDate()).padStart(2, '0')],\n\t['DDD', (time) => String(Math.floor((time.getTime() - new Date(time.getFullYear(), 0, 0).getTime()) / Time.Day))],\n\t['DDDD', (time) => String(Math.floor((time.getTime() - new Date(time.getFullYear(), 0, 0).getTime()) / Time.Day))],\n\t[\n\t\t'd',\n\t\t(time) => {\n\t\t\tconst day = String(time.getDate());\n\t\t\tif (day !== '11' && day.endsWith('1')) return `${day}st`;\n\t\t\tif (day !== '12' && day.endsWith('2')) return `${day}nd`;\n\t\t\tif (day !== '13' && day.endsWith('3')) return `${day}rd`;\n\t\t\treturn `${day}th`;\n\t\t}\n\t],\n\t['dd', (time) => days[time.getDay()].slice(0, 2)],\n\t['ddd', (time) => days[time.getDay()].slice(0, 3)],\n\t['dddd', (time) => days[time.getDay()]],\n\t['X', (time) => String(time.valueOf() / Time.Second)],\n\t['x', (time) => String(time.valueOf())],\n\n\t// Locales\n\t['H', (time) => String(time.getHours())],\n\t['HH', (time) => String(time.getHours()).padStart(2, '0')],\n\t['h', (time) => String(time.getHours() % 12 || 12)],\n\t['hh', (time) => String(time.getHours() % 12 || 12).padStart(2, '0')],\n\t['a', (time) => (time.getHours() < 12 ? 'am' : 'pm')],\n\t['A', (time) => (time.getHours() < 12 ? 'AM' : 'PM')],\n\t['m', (time) => String(time.getMinutes())],\n\t['mm', (time) => String(time.getMinutes()).padStart(2, '0')],\n\t['s', (time) => String(time.getSeconds())],\n\t['ss', (time) => String(time.getSeconds()).padStart(2, '0')],\n\t['S', (time) => String(time.getMilliseconds())],\n\t['SS', (time) => String(time.getMilliseconds()).padStart(2, '0')],\n\t['SSS', (time) => String(time.getMilliseconds()).padStart(3, '0')],\n\t['T', (time) => `${String(time.getHours() % 12 || 12)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`],\n\t[\n\t\t't',\n\t\t(time) =>\n\t\t\t`${String(time.getHours() % 12 || 12)}:${String(time.getMinutes()).padStart(2, '0')}:${String(time.getSeconds()).padStart(2, '0')} ${\n\t\t\t\ttime.getHours() < 12 ? 'am' : 'pm'\n\t\t\t}`\n\t],\n\t['L', (time) => `${String(time.getMonth() + 1).padStart(2, '0')}/${String(time.getDate()).padStart(2, '0')}/${String(time.getFullYear())}`],\n\t['l', (time) => `${String(time.getMonth() + 1)}/${String(time.getDate()).padStart(2, '0')}/${String(time.getFullYear())}`],\n\t['LL', (time) => `${months[time.getMonth()]} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())}`],\n\t['ll', (time) => `${months[time.getMonth()].slice(0, 3)} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())}`],\n\t[\n\t\t'LLL',\n\t\t(time) =>\n\t\t\t`${months[time.getMonth()]} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())} ${String(\n\t\t\t\ttime.getHours() % 12 || 12\n\t\t\t)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'lll',\n\t\t(time) =>\n\t\t\t`${months[time.getMonth()].slice(0, 3)} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())} ${String(\n\t\t\t\ttime.getHours() % 12 || 12\n\t\t\t)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'LLLL',\n\t\t(time) =>\n\t\t\t`${days[time.getDay()]}, ${months[time.getMonth()]} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())} ${String(\n\t\t\t\ttime.getHours() % 12 || 12\n\t\t\t)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'llll',\n\t\t(time) =>\n\t\t\t`${days[time.getDay()].slice(0, 3)} ${months[time.getMonth()].slice(0, 3)} ${String(time.getDate()).padStart(2, '0')}, ${String(\n\t\t\t\ttime.getFullYear()\n\t\t\t)} ${String(time.getHours() % 12 || 12)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'Z',\n\t\t(time) => {\n\t\t\tconst offset = time.getTimezoneOffset();\n\t\t\tconst unsigned = offset >= 0;\n\t\t\tconst absolute = Math.abs(offset);\n\t\t\t/* istanbul ignore next: whether it's signed or unsigned, depends on where the machine is, I cannot control this. */\n\t\t\treturn `${unsigned ? '+' : '-'}${String(Math.floor(absolute / 60)).padStart(2, '0')}:${String(absolute % 60).padStart(2, '0')}`;\n\t\t}\n\t],\n\t[\n\t\t'ZZ',\n\t\t(time) => {\n\t\t\tconst offset = time.getTimezoneOffset();\n\t\t\tconst unsigned = offset >= 0;\n\t\t\tconst absolute = Math.abs(offset);\n\t\t\t/* istanbul ignore next: whether it's signed or unsigned, depends on where the machine is, I cannot control this. */\n\t\t\treturn `${unsigned ? '+' : '-'}${String(Math.floor(absolute / 60)).padStart(2, '0')}:${String(absolute % 60).padStart(2, '0')}`;\n\t\t}\n\t]\n]);\n/* eslint-enable max-len */\n\nexport type TimeResolvable = Date | number | string;\n\nexport interface TimestampTemplateEntry {\n\ttype: string;\n\tcontent: string | null;\n}\n\n/**\n * Timestamp class, parses the pattern once, displays the desired Date or UNIX timestamp with the selected pattern.\n */\nexport class Timestamp {\n\t/**\n\t * The raw pattern\n\t * @since 1.0.0\n\t */\n\tpublic pattern: string;\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tprivate template: TimestampTemplateEntry[];\n\n\t/**\n\t * Starts a new Timestamp and parses the pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t */\n\tpublic constructor(pattern: string) {\n\t\tthis.pattern = pattern;\n\t\tthis.template = Timestamp.parse(pattern);\n\t}\n\n\t/**\n\t * Display the current date with the current pattern.\n\t * @since 1.0.0\n\t * @param time The time to display\n\t */\n\tpublic display(time: TimeResolvable = new Date()): string {\n\t\treturn Timestamp.display(this.template, time);\n\t}\n\n\t/**\n\t * Display the current date utc with the current pattern.\n\t * @since 1.0.0\n\t * @param time The time to display in utc\n\t */\n\tpublic displayUTC(time?: TimeResolvable): string {\n\t\treturn Timestamp.display(this.template, Timestamp.utc(time));\n\t}\n\n\t/**\n\t * Edits the current pattern.\n\t * @since 1.0.0\n\t * @param pattern The new pattern for this instance\n\t * @chainable\n\t */\n\tpublic edit(pattern: string): this {\n\t\tthis.pattern = pattern;\n\t\tthis.template = Timestamp.parse(pattern);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Defines the toString behavior of Timestamp.\n\t */\n\tpublic toString(): string {\n\t\treturn this.display();\n\t}\n\n\t/**\n\t * Display the current date with the current pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t * @param time The time to display\n\t */\n\tpublic static displayArbitrary(pattern: string, time: TimeResolvable = new Date()): string {\n\t\treturn Timestamp.display(Timestamp.parse(pattern), time);\n\t}\n\n\t/**\n\t * Display the current date utc with the current pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t * @param time The time to display\n\t */\n\tpublic static displayUTCArbitrary(pattern: string, time: TimeResolvable = new Date()): string {\n\t\treturn Timestamp.display(Timestamp.parse(pattern), Timestamp.utc(time));\n\t}\n\n\t/**\n\t * Creates a UTC Date object to work with.\n\t * @since 1.0.0\n\t * @param time The date to convert to utc\n\t */\n\tpublic static utc(time: Date | number | string = new Date()): Date {\n\t\ttime = Timestamp.resolveDate(time);\n\t\treturn new Date(time.valueOf() + time.getTimezoneOffset() * 60000);\n\t}\n\n\t/**\n\t * Display the current date with the current pattern.\n\t * @since 1.0.0\n\t * @param template The pattern to parse\n\t * @param time The time to display\n\t */\n\tprivate static display(template: TimestampTemplateEntry[], time: Date | number | string): string {\n\t\tlet output = '';\n\t\tconst parsedTime = Timestamp.resolveDate(time);\n\t\tfor (const { content, type } of template) output += content || tokenResolvers.get(type)!(parsedTime);\n\t\treturn output;\n\t}\n\n\t/**\n\t * Parses the pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t */\n\tprivate static parse(pattern: string): TimestampTemplateEntry[] {\n\t\tconst template: TimestampTemplateEntry[] = [];\n\t\tfor (let i = 0; i < pattern.length; i++) {\n\t\t\tlet current = '';\n\t\t\tconst currentChar = pattern[i];\n\t\t\tconst tokenMax = tokens.get(currentChar);\n\t\t\tif (typeof tokenMax === 'number') {\n\t\t\t\tcurrent += currentChar;\n\t\t\t\twhile (pattern[i + 1] === currentChar && current.length < tokenMax) current += pattern[++i];\n\t\t\t\ttemplate.push({ type: current, content: null });\n\t\t\t} else if (currentChar === '[') {\n\t\t\t\twhile (i + 1 < pattern.length && pattern[i + 1] !== ']') current += pattern[++i];\n\t\t\t\ti++;\n\t\t\t\ttemplate.push({ type: 'literal', content: current || '[' });\n\t\t\t} else {\n\t\t\t\tcurrent += currentChar;\n\t\t\t\twhile (i + 1 < pattern.length && !tokens.has(pattern[i + 1]) && pattern[i + 1] !== '[') current += pattern[++i];\n\t\t\t\ttemplate.push({ type: 'literal', content: current });\n\t\t\t}\n\t\t}\n\n\t\treturn template;\n\t}\n\n\t/**\n\t * Resolves a date.\n\t * @since 1.0.0\n\t * @param time The time to parse\n\t */\n\tprivate static resolveDate(time: TimeResolvable): Date {\n\t\treturn time instanceof Date ? time : new Date(time);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,MAAW,YAAX,kBAAW,eAAX;AACN,2BAAS;AACT,2BAAS;AACT,yBAAO;AACP,wBAAM;AACN,yBAAO;AACP,0BAAQ;AACR,yBAAO;AAPU;AAAA;AAUX,MAAW,OAAX,kBAAW,UAAX;AACN,iCAAc,KAAd;AACA,4BAAS,OAAT;AACA,4BAAS,OAAT;AACA,0BAAO,QAAP;AACA,yBAAM,SAAN;AACA,2BAAQ,UAAR;AACA,0BAAO,WAAP;AAPiB;AAAA;AAUX,MAAM,OAAO,CAAC,UAAU,UAAU,WAAW,aAAa,YAAY,UAAU;AAEhF,MAAM,SAAS,CAAC,WAAW,YAAY,SAAS,SAAS,OAAO,QAAQ,QAAQ,UAAU,aAAa,WAAW,YAAY;AAE9H,MAAM,SAAS,oBAAI,IAAoB;AAAA,IAC7C,CAAC,KAAK;AAAA,IACN,CAAC,KAAK;AAAA,IACN,CAAC,KAAK;AAAA,IACN,CAAC,KAAK;AAAA,IACN,CAAC,KAAK;AAAA,IACN,CAAC,KAAK;AAAA,IACN,CAAC,KAAK;AAAA,IACN,CAAC,KAAK;AAAA,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AC7G,mBAAS,KAAK,EAAE,MAAM,WAAW,SAAS;AAAA;AAAA;AAI5C,aAAO;AAAA;AAAA,WAQO,YAAY,MAA4B;AACtD,aAAO,gBAAgB,OAAO,OAAO,IAAI,KAAK;AAAA;AAAA;AAzIzC;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/lib/constants.ts","../../utilities/src/lib/arrayStrictEquals.ts","../../utilities/src/lib/cast.ts","../../utilities/src/lib/chunk.ts","../../utilities/src/lib/classExtends.ts","../../utilities/src/lib/codeBlock.ts","../../utilities/src/lib/splitText.ts","../../utilities/src/lib/cutText.ts","../../utilities/src/lib/debounce/index.ts","../../utilities/src/lib/isPrimitive.ts","../../utilities/src/lib/deepClone.ts","../../utilities/src/lib/isNullOrUndefined.ts","../../utilities/src/lib/filterNullAndUndefined.ts","../../utilities/src/lib/isNullOrUndefinedOrEmpty.ts","../../utilities/src/lib/filterNullAndUndefinedAndEmpty.ts","../../utilities/src/lib/isNullOrUndefinedOrZero.ts","../../utilities/src/lib/filterNullAndUndefinedAndZero.ts","../../utilities/src/lib/hasAtLeastOneKeyInMap.ts","../../utilities/src/lib/inlineCodeBlock.ts","../../utilities/src/lib/isClass.ts","../../utilities/src/lib/isFunction.ts","../../utilities/src/lib/isNumber.ts","../../utilities/src/lib/isObject.ts","../../utilities/src/lib/isThenable.ts","../../utilities/src/lib/makeObject.ts","../../utilities/src/lib/mergeDefault.ts","../../utilities/src/lib/mergeObjects.ts","../../utilities/src/lib/noop.ts","../../utilities/src/lib/objectToTuples.ts","../../utilities/src/lib/parseUrl.ts","../../utilities/src/lib/partition.ts","../../utilities/src/lib/range.ts","../../utilities/src/lib/regExpEsc.ts","../../utilities/src/lib/roundNumber.ts","../../utilities/src/lib/toTitleCase.ts","../../utilities/src/lib/tryParse.ts","../src/lib/Cron.ts","../src/lib/Duration.ts","../src/lib/DurationFormatter.ts","../src/lib/TimerManager.ts","../src/lib/Timestamp.ts"],"sourcesContent":["export { Time, TimeTypes } from './lib/constants';\nexport * from './lib/Cron';\nexport * from './lib/Duration';\nexport * from './lib/DurationFormatter';\nexport * from './lib/TimerManager';\nexport * from './lib/Timestamp';\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport type { DurationFormatAssetsTime, DurationFormatSeparators } from './DurationFormatter';\n\n/**\n * The supported time types\n */\nexport const enum TimeTypes {\n\tSecond = 'second',\n\tMinute = 'minute',\n\tHour = 'hour',\n\tDay = 'day',\n\tWeek = 'week',\n\tMonth = 'month',\n\tYear = 'year'\n}\n\nexport const enum Time {\n\tMillisecond = 1,\n\tSecond = 1000,\n\tMinute = 1000 * 60,\n\tHour = 1000 * 60 * 60,\n\tDay = 1000 * 60 * 60 * 24,\n\tMonth = 1000 * 60 * 60 * 24 * (365 / 12),\n\tYear = 1000 * 60 * 60 * 24 * 365\n}\n\nexport const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\nexport const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n\nexport const tokens = new Map<string, number>([\n\t['Y', 4],\n\t['Q', 1],\n\t['M', 4],\n\t['D', 4],\n\t['d', 4],\n\t['X', 1],\n\t['x', 1],\n\t['H', 2],\n\t['h', 2],\n\t['a', 1],\n\t['A', 1],\n\t['m', 2],\n\t['s', 2],\n\t['S', 3],\n\t['Z', 2],\n\t['l', 4],\n\t['L', 4],\n\t['T', 1],\n\t['t', 1]\n]);\n\nexport const partRegex = /^(?:(\\*)|(\\d+)(?:-(\\d+))?)(?:\\/(\\d+))?$/;\n\nexport const wildcardRegex = /\\bh\\b|\\B\\?\\B/g;\n\nexport const allowedNum = [\n\t[0, 59],\n\t[0, 23],\n\t[1, 31],\n\t[1, 12],\n\t[0, 6]\n];\n\nexport const predefined = {\n\t'@annually': '0 0 1 1 *',\n\t'@yearly': '0 0 1 1 *',\n\t'@monthly': '0 0 1 * *',\n\t'@weekly': '0 0 * * 0',\n\t'@daily': '0 0 * * *',\n\t'@hourly': '0 * * * *'\n} as const;\n\nexport const cronTokens = {\n\tjan: 1,\n\tfeb: 2,\n\tmar: 3,\n\tapr: 4,\n\tmay: 5,\n\tjun: 6,\n\tjul: 7,\n\taug: 8,\n\tsep: 9,\n\toct: 10,\n\tnov: 11,\n\tdec: 12,\n\tsun: 0,\n\tmon: 1,\n\ttue: 2,\n\twed: 3,\n\tthu: 4,\n\tfri: 5,\n\tsat: 6\n} as const;\n\nexport const tokensRegex = new RegExp(Object.keys(cronTokens).join('|'), 'g');\n\nexport const DEFAULT_UNITS: DurationFormatAssetsTime = {\n\t[TimeTypes.Year]: {\n\t\t1: 'year',\n\t\tDEFAULT: 'years'\n\t},\n\t[TimeTypes.Month]: {\n\t\t1: 'month',\n\t\tDEFAULT: 'months'\n\t},\n\t[TimeTypes.Week]: {\n\t\t1: 'week',\n\t\tDEFAULT: 'weeks'\n\t},\n\t[TimeTypes.Day]: {\n\t\t1: 'day',\n\t\tDEFAULT: 'days'\n\t},\n\t[TimeTypes.Hour]: {\n\t\t1: 'hour',\n\t\tDEFAULT: 'hours'\n\t},\n\t[TimeTypes.Minute]: {\n\t\t1: 'minute',\n\t\tDEFAULT: 'minutes'\n\t},\n\t[TimeTypes.Second]: {\n\t\t1: 'second',\n\t\tDEFAULT: 'seconds'\n\t}\n};\n\nexport const DEFAULT_SEPARATORS: DurationFormatSeparators = {\n\tleft: ' ',\n\tright: ' '\n};\n","/**\n * Compare if both arrays are strictly equal\n * @param arr1 The array to compare to\n * @param arr2 The array to compare with\n */\nexport function arrayStrictEquals<T extends readonly unknown[]>(arr1: T, arr2: T): boolean {\n\tif (arr1 === arr2) return true;\n\tif (arr1.length !== arr2.length) return false;\n\n\tfor (let i = 0; i < arr1.length; i++) {\n\t\tif (arr1[i] !== arr2[i] || typeof arr1[i] !== typeof arr2[i]) return false;\n\t}\n\treturn true;\n}\n","/**\n * Casts any value from `U` to `T`\n *\n * Note that this function is not type-safe, and may cause runtime errors if used incorrectly.\n * Also note that this function is effectively useless in a JavaScript project, it only serves a purpose for TypeScript projects.\n * @param value The value to cast to another type\n * @returns The value but as type `T`\n */\nexport function cast<T, U = unknown>(value: U): T {\n\treturn value as unknown as T;\n}\n","/**\n * Splits up an array into chunks\n * @param array The array to chunk up\n * @param chunkSize The size of each individual chunk\n */\nexport function chunk<T>(array: readonly T[], chunkSize: number): T[][] {\n\tif (!Array.isArray(array)) throw new TypeError('entries must be an array.');\n\tif (!Number.isInteger(chunkSize)) throw new TypeError('chunkSize must be an integer.');\n\tif (chunkSize < 1) throw new RangeError('chunkSize must be 1 or greater.');\n\tconst clone: T[] = array.slice();\n\tconst chunks: T[][] = [];\n\twhile (clone.length) chunks.push(clone.splice(0, chunkSize));\n\treturn chunks;\n}\n","import type { Ctor } from './utilityTypes';\n\n/**\n * Checks whether or not the value class extends the base class.\n * @param value The constructor to be checked against.\n * @param base The base constructor.\n */\nexport function classExtends<T extends Ctor>(value: Ctor, base: T): value is T {\n\tlet ctor: Ctor | null = value;\n\twhile (ctor !== null) {\n\t\tif (ctor === base) return true;\n\t\tctor = Object.getPrototypeOf(ctor);\n\t}\n\n\treturn false;\n}\n","const zws = String.fromCharCode(8203);\n\n/**\n * Wraps text in a markdown codeblock with optionally a language indicator for syntax highlighting\n * @param language The codeblock language\n * @param expression The expression to be wrapped in the codeblock\n */\nexport function codeBlock<T>(language: string, expression: T): string {\n\tif (typeof expression === 'string') {\n\t\tif (expression.length === 0) return `\\`\\`\\`${zws}\\`\\`\\``;\n\t\treturn `\\`\\`\\`${language}\\n${expression.replace(/```/, `\\`${zws}\\`\\``).replace(/`$/g, `\\`${zws}`)}\\`\\`\\``;\n\t}\n\treturn `\\`\\`\\`${language}\\n${expression || zws}\\`\\`\\``;\n}\n","/**\n * Split a string by its latest space character in a range from the character 0 to the selected one.\n * @param str The text to split.\n * @param length The length of the desired string.\n * @param char The character to split with\n * @copyright 2019 Antonio Román\n * @license Apache-2.0\n */\nexport function splitText(str: string, length: number, char = ' ') {\n\tconst x = str.substring(0, length).lastIndexOf(char);\n\tconst pos = x === -1 ? length : x;\n\treturn str.substring(0, pos);\n}\n","import { splitText } from './splitText';\n\n/**\n * Split a text by its latest space character in a range from the character 0 to the selected one.\n * @param str The text to split.\n * @param length The length of the desired string.\n * @copyright 2019 Antonio Román\n * @license Apache-2.0\n */\nexport function cutText(str: string, length: number) {\n\tif (str.length < length) return str;\n\tconst cut = splitText(str, length - 3);\n\tif (cut.length < length - 3) return `${cut}...`;\n\treturn `${cut.slice(0, length - 3)}...`;\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\nexport interface DebounceSettings {\n\t/**\n\t * The number of milliseconds to delay.\n\t * @default 0\n\t */\n\twait?: number;\n\n\t/**\n\t * The maximum time `func` is allowed to be delayed before it's invoked\n\t * @default null\n\t */\n\tmaxWait?: number | null;\n}\n\nexport interface DebouncedFunc<FnArgumentsType extends any[], FnReturnType> {\n\t/**\n\t * Call the original function, but applying the debounce rules.\n\t *\n\t * If the debounced function can be run immediately, this calls it and returns its return\n\t * value.\n\t *\n\t * Otherwise, it returns the return value of the last invokation, or undefined if the debounced\n\t * function was not invoked yet.\n\t */\n\t(...args: FnArgumentsType): FnReturnType | undefined;\n\n\t/**\n\t * Throw away any pending invokation of the debounced function.\n\t */\n\tcancel(): void;\n\n\t/**\n\t * If there is a pending invokation of the debounced function, invoke it immediately and return\n\t * its return value.\n\t *\n\t * Otherwise, return the value from the last invokation, or undefined if the debounced function\n\t * was never invoked.\n\t */\n\tflush(): FnReturnType | undefined;\n}\n\n/**\n * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since\n * the last time the debounced function was invoked. The debounced function comes with a cancel method to\n * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to\n * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent\n * calls to the debounced function return the result of the last func invocation.\n *\n * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only\n * if the the debounced function is invoked more than once during the wait timeout.\n *\n * See David Corbacho’s article for details over the differences between _.debounce and _.throttle.\n *\n * @param func The function to debounce.\n * @param wait The number of milliseconds to delay.\n * @param options The options object.\n * @return Returns the new debounced function.\n */\nexport function debounce<FnArgumentsType extends any[], FnReturnType>(\n\tfunc: (...args: FnArgumentsType) => FnReturnType,\n\toptions: DebounceSettings = {}\n): DebouncedFunc<FnArgumentsType, FnReturnType> {\n\tlet lastArgs: FnArgumentsType | undefined;\n\tlet result: FnReturnType | undefined;\n\tlet timerId: NodeJS.Timeout | undefined;\n\tlet lastCallTime: number | undefined;\n\tlet lastInvokeTime = 0;\n\n\tconst wait = options.wait ?? 0;\n\tconst maxWait = typeof options.maxWait === 'number' ? Math.max(options.maxWait, wait) : null;\n\n\tfunction invokeFunc(time: number) {\n\t\tconst args = lastArgs;\n\n\t\tlastArgs = undefined;\n\t\tlastInvokeTime = time;\n\t\tresult = func(...args!);\n\t\treturn result;\n\t}\n\n\tfunction leadingEdge(time: number) {\n\t\t// Reset any `maxWait` timer.\n\t\tlastInvokeTime = time;\n\t\t// Start the timer for the trailing edge.\n\t\ttimerId = setTimeout(timerExpired, wait);\n\t\t// Invoke the leading edge.\n\t\treturn result;\n\t}\n\n\tfunction remainingWait(time: number) {\n\t\tconst timeSinceLastCall = time - lastCallTime!;\n\t\tconst timeSinceLastInvoke = time - lastInvokeTime;\n\t\tconst result = wait - timeSinceLastCall;\n\n\t\treturn maxWait === null ? result : Math.min(result, maxWait - timeSinceLastInvoke);\n\t}\n\n\tfunction shouldInvoke(time: number) {\n\t\tconst timeSinceLastCall = time - lastCallTime!;\n\t\tconst timeSinceLastInvoke = time - lastInvokeTime;\n\n\t\t// Either this is the first call, activity has stopped and we're at the\n\t\t// trailing edge, the system time has gone backwards and we're treating\n\t\t// it as the trailing edge, or we've hit the `maxWait` limit.\n\t\treturn (\n\t\t\tlastCallTime === undefined || //\n\t\t\ttimeSinceLastCall >= wait ||\n\t\t\ttimeSinceLastCall < 0 ||\n\t\t\t(maxWait !== null && timeSinceLastInvoke >= maxWait)\n\t\t);\n\t}\n\n\tfunction timerExpired() {\n\t\tconst time = Date.now();\n\t\tif (shouldInvoke(time)) {\n\t\t\ttrailingEdge(time);\n\t\t\treturn;\n\t\t}\n\t\t// Restart the timer.\n\t\ttimerId = setTimeout(timerExpired, remainingWait(time));\n\t}\n\n\tfunction trailingEdge(time: number) {\n\t\ttimerId = undefined;\n\t\treturn invokeFunc(time);\n\t}\n\n\tfunction cancel() {\n\t\tif (timerId !== undefined) {\n\t\t\tclearTimeout(timerId);\n\t\t}\n\n\t\tlastInvokeTime = 0;\n\t\tlastArgs = undefined;\n\t\tlastCallTime = undefined;\n\t\ttimerId = undefined;\n\t}\n\n\tfunction flush() {\n\t\treturn timerId === undefined ? result : trailingEdge(Date.now());\n\t}\n\n\tfunction debounced(...args: FnArgumentsType) {\n\t\tconst time = Date.now();\n\t\tconst isInvoking = shouldInvoke(time);\n\n\t\tlastArgs = args;\n\t\tlastCallTime = time;\n\n\t\tif (isInvoking) {\n\t\t\tif (timerId === undefined) {\n\t\t\t\treturn leadingEdge(lastCallTime);\n\t\t\t}\n\t\t\tif (maxWait !== null) {\n\t\t\t\t// Handle invocations in a tight loop.\n\t\t\t\ttimerId = setTimeout(timerExpired, wait);\n\t\t\t\treturn invokeFunc(lastCallTime);\n\t\t\t}\n\t\t}\n\n\t\tif (timerId === undefined) {\n\t\t\ttimerId = setTimeout(timerExpired, wait);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tdebounced.cancel = cancel;\n\tdebounced.flush = flush;\n\n\treturn debounced;\n}\n","const primitiveTypes = ['string', 'bigint', 'number', 'boolean'];\n\n/**\n * Check whether a value is a primitive\n * @param input The input to check\n */\nexport function isPrimitive(input: unknown): input is string | bigint | number | boolean {\n\treturn primitiveTypes.includes(typeof input);\n}\n","import { isPrimitive } from './isPrimitive';\n\n/**\n * Deep clone an object\n * @param source The object to clone\n */\nexport function deepClone<T>(source: T): T {\n\t// Check if it's a primitive (with exception of function and null, which is typeof object)\n\tif (source === null || isPrimitive(source)) {\n\t\treturn source;\n\t}\n\n\tif (source instanceof Date) {\n\t\tconst output = new (source.constructor as DateConstructor)(source);\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (Array.isArray(source)) {\n\t\tconst output = new (source.constructor as ArrayConstructor)(source.length) as unknown as T & T extends (infer S)[] ? S[] : never;\n\n\t\tfor (let i = 0; i < source.length; i++) {\n\t\t\toutput[i] = deepClone(source[i]);\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (source instanceof Map) {\n\t\tconst output = new (source.constructor as MapConstructor)() as unknown as T & T extends Map<infer K, infer V> ? Map<K, V> : never;\n\n\t\tfor (const [key, value] of source.entries()) {\n\t\t\toutput.set(key, deepClone(value));\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (source instanceof Set) {\n\t\tconst output = new (source.constructor as SetConstructor)() as unknown as T & T extends Set<infer K> ? Set<K> : never;\n\n\t\tfor (const value of source.values()) {\n\t\t\toutput.add(deepClone(value));\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\tif (typeof source === 'object') {\n\t\tconst output = new ((source as T & (object | Record<PropertyKey, unknown>)).constructor as ObjectConstructor)() as unknown as Record<\n\t\t\tPropertyKey,\n\t\t\tunknown\n\t\t>;\n\n\t\tfor (const [key, value] of Object.entries(source)) {\n\t\t\tObject.defineProperty(output, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: deepClone(value),\n\t\t\t\twritable: true\n\t\t\t});\n\t\t}\n\n\t\treturn output as unknown as T;\n\t}\n\n\treturn source;\n}\n","import type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether or not a value is `null` or `undefined`\n * @param value The value to check\n */\nexport function isNullOrUndefined(value: unknown): value is Nullish {\n\treturn value === undefined || value === null;\n}\n","import { isNullOrUndefined } from './isNullOrUndefined';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether a value is not `null` nor `undefined`.\n * This can be used in {@link Array.filter} to remove `null` and `undefined` from the array type\n * @param value The value to verify that is neither `null` nor `undefined`\n * @returns A boolean that is `true` if the value is neither `null` nor `undefined`, false otherwise.\n * @example\n * ```typescript\n * // TypeScript Type: (string | undefined | null)[]\n * const someArray = ['one', 'two', undefined, null, 'five'];\n *\n * // TypeScript Type: string[]\n * const filteredArray = someArray.filter(filterNullAndUndefined);\n * // Result: ['one', 'two', 'five']\n * ```\n */\nexport function filterNullAndUndefined<TValue>(value: TValue | Nullish): value is TValue {\n\treturn !isNullOrUndefined(value);\n}\n","import { isNullOrUndefined } from './isNullOrUndefined';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether or not a value is `null`, `undefined` or `''`, `[]`\n * @param value The value to check\n */\nexport function isNullOrUndefinedOrEmpty(value: unknown): value is Nullish | '' {\n\treturn isNullOrUndefined(value) || (value as string | unknown[]).length === 0;\n}\n","import { isNullOrUndefinedOrEmpty } from './isNullOrUndefinedOrEmpty';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether a value is not `null` nor `undefined` nor `''` (empty string).\n * This can be used in {@link Array.filter} to remove `null`, `undefined` from the array type\n * @param value The value to verify that is neither `null`, `undefined` nor `''` (empty string)\n * @returns A boolean that is `true` if the value is neither `null`, `undefined` nor `''` (empty string), false otherwise.\n * @example\n * ```typescript\n * // TypeScript Type: (string | undefined | null)[]\n * const someArray = ['one', 'two', undefined, null, ''];\n *\n * // TypeScript Type: string[]\n * const filteredArray = someArray.filter(filterNullAndUndefinedAndEmpty);\n * // Result: ['one', 'two']\n * ```\n */\nexport function filterNullAndUndefinedAndEmpty<TValue>(value: TValue | Nullish | ''): value is TValue {\n\treturn !isNullOrUndefinedOrEmpty(value);\n}\n","import { isNullOrUndefined } from './isNullOrUndefined';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether or not a value is `null`, `undefined` or `0`\n * @param value The value to check\n */\nexport function isNullOrUndefinedOrZero(value: unknown): value is Nullish | 0 {\n\treturn value === 0 || isNullOrUndefined(value);\n}\n","import { isNullOrUndefinedOrZero } from './isNullOrUndefinedOrZero';\nimport type { Nullish } from './utilityTypes';\n\n/**\n * Checks whether a value is not `null` nor `undefined` nor `0`.\n * This can be used in {@link Array.filter} to remove `null`, `undefined` from the array type\n * @param value The value to verify that is neither `null`, `undefined` nor `0`\n * @returns A boolean that is `true` if the value is neither `null`, `undefined` nor `0`, false otherwise.\n * @example\n * ```typescript\n * // TypeScript Type: (string | number | undefined | null)[]\n * const someArray = ['one', 'two', undefined, null, 0, 1];\n *\n * // TypeScript Type: (string | number)[]\n * const filteredArray = someArray.filter(filterNullAndUndefinedAndZero);\n * // Result: ['one', 'two', 1]\n * ```\n */\nexport function filterNullAndUndefinedAndZero<TValue>(value: TValue | Nullish | 0): value is TValue {\n\treturn !isNullOrUndefinedOrZero(value);\n}\n","/**\n * Checks whether any of the {@link keys} are in the {@link map}\n * @param map The map to check\n * @param keys The keys to find in the map\n * @returns `true` if at least one of the {@link keys} is in the {@link map}, `false` otherwise.\n */\nexport function hasAtLeastOneKeyInMap<T>(map: ReadonlyMap<T, any>, keys: readonly T[]): boolean {\n\treturn keys.some((key) => map.has(key));\n}\n","const zws = String.fromCharCode(8203);\n\n/**\n * Wraps text in a markdown inline codeblock\n * @param expression The expression to be wrapped in the codeblock\n */\nexport function inlineCodeBlock(input: string): string {\n\treturn `\\`${input.replace(/ /g, '\\u00A0').replace(/`/g, `\\`${zws}`)}\\``;\n}\n","import type { Ctor } from './utilityTypes';\n\n/**\n * Verify if the input is a class constructor.\n * @param input The function to verify\n */\nexport function isClass(input: unknown): input is Ctor {\n\treturn typeof input === 'function' && typeof input.prototype === 'object';\n}\n","/**\n * Verify if the input is a function.\n * @param input The function to verify\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(input: unknown): input is Function {\n\treturn typeof input === 'function';\n}\n","/**\n * Verify if a number is a finite number.\n * @param input The number to verify\n */\nexport function isNumber(input: unknown): input is number {\n\treturn typeof input === 'number' && !isNaN(input) && Number.isFinite(input);\n}\n","import type { Constructor, NonNullObject } from './utilityTypes';\n\n/**\n * Verify if the input is an object literal (or class).\n * @param input The object to verify\n * @param constructorType The type of the constructor of the object. Use this if you want a `class` of your choosing to pass the check as well.\n */\nexport function isObject(input: unknown, constructorType?: ObjectConstructor): input is NonNullObject;\nexport function isObject<T extends Constructor<unknown>>(input: unknown, constructorType: T): input is InstanceType<T>;\nexport function isObject<T extends Constructor<unknown> = ObjectConstructor>(input: unknown, constructorType?: T): input is NonNullObject {\n\treturn typeof input === 'object' && input ? input.constructor === (constructorType ?? Object) : false;\n}\n","/* eslint-disable @typescript-eslint/ban-types */\nimport { isFunction } from './isFunction';\n\nexport interface Thenable {\n\tthen: Function;\n\tcatch: Function;\n}\n\nfunction hasThen(input: { then?: Function }): boolean {\n\treturn Reflect.has(input, 'then') && isFunction(input.then);\n}\n\nfunction hasCatch(input: { catch?: Function }): boolean {\n\treturn Reflect.has(input, 'catch') && isFunction(input.catch);\n}\n\n/**\n * Verify if an object is a promise.\n * @param input The promise to verify\n */\nexport function isThenable(input: unknown): input is Thenable {\n\tif (typeof input !== 'object' || input === null) return false;\n\treturn input instanceof Promise || (input !== Promise.prototype && hasThen(input) && hasCatch(input));\n}\n","/**\n * Turn a dotted path into a json object.\n * @param path The dotted path\n * @param value The value\n * @param obj The object to edit\n */\nexport function makeObject(path: string, value: unknown, obj: Record<string, unknown> = {}): Record<string, unknown> {\n\tif (path.includes('.')) {\n\t\tconst route = path.split('.');\n\t\tconst lastKey = route.pop() as string;\n\t\tlet reference = obj;\n\t\tfor (const key of route) {\n\t\t\tif (!reference[key]) reference[key] = {};\n\t\t\treference = reference[key] as Record<string, unknown>;\n\t\t}\n\t\treference[lastKey] = value;\n\t} else {\n\t\tobj[path] = value;\n\t}\n\treturn obj;\n}\n","import { deepClone } from './deepClone';\nimport { isObject } from './isObject';\nimport type { DeepRequired, NonNullObject } from './utilityTypes';\n\n/**\n * Deep merges 2 objects. Properties from the second parameter are applied to the first.\n * @remark `overwrites` is also mutated!\n * @remark If the value of a key in `overwrites` is `undefined` then the value of that same key in `base` is used instead!\n * @remark This is essentially `{ ...base, ...overwrites }` but recursively\n * @param base Base object\n * @param overwrites Overwrites to apply\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = {}; // will be { a: 0, b: 1 } after merge\n * mergeDefault(base, overwrites) // { a: 0, b: 1 }\n * ```\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = { a: 2, i: 3 };\n * mergeDefault(base, overwrites) // { a: 2, i: 3, b: 1 };\n * ```\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = { a: null };\n * mergeDefault(base, overwrites) // { a: null, b: 1 };\n * ```\n * @example\n * ```typescript\n * const base = { a: 0, b: 1 };\n * const overwrites = { a: undefined };\n * mergeDefault(base, overwrites) // { a: 0, b: 1 };\n * ```\n * @example\n * ```typescript\n * const base = { a: null };\n * const overwrites = { a: { b: 5 } };\n * mergeDefault(base, overwrites) // { a: { b: 5 } };\n * ```\n */\nexport function mergeDefault<A extends NonNullObject, B extends Partial<A>>(base: A, overwrites?: B): DeepRequired<A & B> {\n\t// If no overwrites are specified then deep clone the base\n\tif (!overwrites) return deepClone(base) as DeepRequired<A & B>;\n\n\tfor (const [baseKey, baseValue] of Object.entries(base)) {\n\t\tconst overwritesValueAtBaseKey = Reflect.get(overwrites, baseKey);\n\n\t\tif (typeof overwritesValueAtBaseKey === 'undefined') {\n\t\t\tReflect.set(overwrites, baseKey, deepClone(baseValue));\n\t\t} else if (isObject(overwritesValueAtBaseKey)) {\n\t\t\tReflect.set(overwrites, baseKey, mergeDefault((baseValue ?? {}) as NonNullObject, overwritesValueAtBaseKey));\n\t\t}\n\t}\n\n\treturn overwrites as DeepRequired<A & B>;\n}\n","/* eslint-disable @typescript-eslint/ban-types */\nimport { isObject } from './isObject';\n\n/**\n * Merges two objects\n * @param objTarget The object to be merged\n * @param objSource The object to merge\n */\nexport function mergeObjects<A extends object, B extends object>(objTarget: A, objSource: Readonly<B>): A & B {\n\tfor (const [key, value] of Object.entries(objSource)) {\n\t\tconst targetValue = Reflect.get(objTarget, key);\n\t\tif (isObject(value)) {\n\t\t\tReflect.set(objTarget, key, isObject(targetValue) ? mergeObjects(targetValue, value as object) : value);\n\t\t} else if (!isObject(targetValue)) {\n\t\t\tReflect.set(objTarget, key, value);\n\t\t}\n\t}\n\n\treturn objTarget as A & B;\n}\n","// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop() {}\n","import { isObject } from './isObject';\n\n/**\n * Convert an object to a tuple\n * @param value The object to convert\n * @param prefix The prefix for the key\n */\nexport function objectToTuples(original: Record<string, unknown>, prefix = ''): [string, unknown][] {\n\tconst entries: [string, unknown][] = [];\n\tfor (const [key, value] of Object.entries(original)) {\n\t\tif (isObject(value)) {\n\t\t\tentries.push(...objectToTuples(value as Record<string, unknown>, `${prefix}${key}.`));\n\t\t} else {\n\t\t\tentries.push([`${prefix}${key}`, value]);\n\t\t}\n\t}\n\n\treturn entries;\n}\n","import type { URL } from 'node:url';\n\n/**\n * Parses an URL, returns null if invalid.\n * @param url The url to parse\n */\nexport function parseURL(url: string): URL | null {\n\ttry {\n\t\t// @ts-expect-error URL is global in NodeJS and evergreen Browsers\n\t\treturn new URL(url);\n\t} catch {\n\t\treturn null;\n\t}\n}\n","import { isFunction } from './isFunction';\n\n/**\n * Partitions `array` into a tuple of two arrays,\n * where one array contains all elements that satisfies `predicate`,\n * and the other contains all elements that do not satisfy `predicate`.\n * @param array The array to partition. This array is not mutated.\n * @param predicate The predicate function to determine in which partition the item should be placed.\n * The function should return true for items that should be placed in the first partition, and false for those that should be placed in the second partition.\n * @returns A tuple of two arrays.\n */\nexport function partition<T>(array: T[], predicate: (value: T, index: number) => boolean) {\n\tif (!Array.isArray(array)) throw new TypeError('entries must be an array.');\n\tif (!isFunction(predicate)) throw new TypeError('predicate must be an function that returns a boolean value.');\n\n\tconst partitionOne: T[] = [];\n\tconst partitionTwo: T[] = [];\n\n\tfor (let i = 0; i < array.length; i++) {\n\t\tif (predicate(array[i], i)) {\n\t\t\tpartitionOne.push(array[i]);\n\t\t} else {\n\t\t\tpartitionTwo.push(array[i]);\n\t\t}\n\t}\n\n\treturn [partitionOne, partitionTwo];\n}\n","/**\n * Get an array of numbers with the selected range\n * @param min The minimum value\n * @param max The maximum value\n * @param step The step value\n */\nexport function range(min: number, max: number, step: number): number[] {\n\treturn new Array(Math.floor((max - min) / step) + 1).fill(0).map((_val, i) => min + i * step);\n}\n","// eslint-disable-next-line @typescript-eslint/naming-convention\nconst REGEXPESC = /[-/\\\\^$*+?.()|[\\]{}]/g;\n\n/**\n * Cleans a string from regex injection\n * @param str The string to clean\n */\nexport function regExpEsc(str: string): string {\n\treturn str.replace(REGEXPESC, '\\\\$&');\n}\n","/**\n * Properly rounds up or down a number.\n * Also supports strings using an exponent to indicate large or small numbers.\n * @param num The number to round off\n * @param scale The amount of decimals to retain\n */\nexport function roundNumber(num: number | string, scale = 0) {\n\tif (!num.toString().includes('e')) {\n\t\treturn Number(`${Math.round(Number(`${num}e+${scale}`))}e-${scale}`);\n\t}\n\tconst arr = `${num}`.split('e');\n\tlet sig = '';\n\n\tif (Number(arr[1]) + scale > 0) {\n\t\tsig = '+';\n\t}\n\n\treturn Number(`${Math.round(Number(`${Number(arr[0])}e${sig}${Number(arr[1]) + scale}`))}e-${scale}`);\n}\n","const TO_TITLE_CASE = /[A-Za-zÀ-ÖØ-öø-ÿ]\\S*/g;\n\n/**\n * The variants that will not strictly follow the `toTitleCase` algorithm\n * and will instead return the value matched with the key.\n *\n * This table lists how certain terms are converted.\n * Any terms not included are converted to regular `Titlecase`.\n * | Term | Converted To |\n * |:---------------- |:---------------- |\n * | textchannel | TextChannel |\n * | voicechannel | VoiceChannel |\n * | categorychannel | CategoryChannel |\n * | guildmember | GuildMember |\n */\nexport const baseVariants: Record<string, string> = {\n\ttextchannel: 'TextChannel',\n\tvoicechannel: 'VoiceChannel',\n\tcategorychannel: 'CategoryChannel',\n\tguildmember: 'GuildMember'\n};\n\n/**\n * Converts a string to Title Case\n *\n * @description This is designed to also ensure common Discord PascalCased strings\n * are put in their TitleCase {@link baseVariants}.\n *\n * You can also provide your own variants to merge with the {@link baseVariants} for\n * your own functionality use.\n *\n * @param str The string to title case\n * @param options The options to use when converting the string\n */\nexport function toTitleCase(str: string, options: ToTitleCaseOptions = {}): string {\n\tconst { additionalVariants = {}, caseSensitive } = options;\n\tconst titleCaseVariants = {\n\t\t...baseVariants,\n\t\t...(caseSensitive\n\t\t\t? additionalVariants\n\t\t\t: Object.entries(additionalVariants).reduce<Record<string, string>>(\n\t\t\t\t\t(variants, [key, variant]) => ({ ...variants, [key.toLowerCase()]: variant }),\n\t\t\t\t\t{}\n\t\t\t ))\n\t};\n\n\treturn str.replace(\n\t\tTO_TITLE_CASE,\n\t\t(txt) => titleCaseVariants[caseSensitive ? txt : txt.toLowerCase()] ?? txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase()\n\t);\n}\n\n/**\n * The options to use when converting a string to title case\n */\nexport interface ToTitleCaseOptions {\n\t/**\n\t * The optional additional variants to use when converting the string\n\t */\n\tadditionalVariants?: Record<string, string>;\n\n\t/**\n\t * Whether to convert the string to title case in a case sensitive manner.\n\t */\n\tcaseSensitive?: boolean;\n}\n","/* eslint-disable @typescript-eslint/ban-types */\n/**\n * Try parse a stringified JSON string.\n * @param value The value to parse\n */\nexport function tryParse(value: string): object | string {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch (err) {\n\t\treturn value;\n\t}\n}\n","/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport { range } from '@sapphire/utilities';\nimport { allowedNum, cronTokens, partRegex, predefined, Time, tokensRegex, wildcardRegex } from './constants';\n\n/**\n * Handles Cron strings and generates dates based on the cron string provided.\n * @see https://en.wikipedia.org/wiki/Cron\n */\nexport class Cron {\n\tpublic cron: string;\n\tpublic normalized: string;\n\tpublic minutes: number[];\n\tpublic hours: number[];\n\tpublic days: number[];\n\tpublic months: number[];\n\tpublic dows: number[];\n\n\t/**\n\t * @param cron The cron pattern to use\n\t */\n\tpublic constructor(cron: string) {\n\t\tthis.cron = cron.toLowerCase();\n\t\tthis.normalized = Cron.normalize(this.cron);\n\t\t[this.minutes, this.hours, this.days, this.months, this.dows] = Cron.parseString(this.normalized);\n\t}\n\n\t/**\n\t * Get the next date that matches with the current pattern\n\t * @param outset The Date instance to compare with\n\t * @param origin Whether this next call is origin\n\t */\n\tpublic next(outset: Date = new Date(), origin = true): Date {\n\t\tif (!this.days.includes(outset.getUTCDate()) || !this.months.includes(outset.getUTCMonth() + 1) || !this.dows.includes(outset.getUTCDay())) {\n\t\t\treturn this.next(new Date(outset.getTime() + Time.Day), false);\n\t\t}\n\t\tif (!origin) return new Date(Date.UTC(outset.getUTCFullYear(), outset.getUTCMonth(), outset.getUTCDate(), this.hours[0], this.minutes[0]));\n\n\t\tconst now = new Date(outset.getTime() + 60000);\n\n\t\tfor (const hour of this.hours) {\n\t\t\tif (hour < now.getUTCHours()) continue;\n\t\t\tfor (const minute of this.minutes) {\n\t\t\t\tif (hour === now.getUTCHours() && minute < now.getUTCMinutes()) continue;\n\t\t\t\treturn new Date(Date.UTC(outset.getUTCFullYear(), outset.getUTCMonth(), outset.getUTCDate(), hour, minute));\n\t\t\t}\n\t\t}\n\n\t\treturn this.next(new Date(outset.getTime() + Time.Day), false);\n\t}\n\n\t/**\n\t * Normalize the pattern\n\t * @param cron The pattern to normalize\n\t */\n\tprivate static normalize(cron: string): string {\n\t\tif (Reflect.has(predefined, cron)) return Reflect.get(predefined, cron);\n\t\tconst now = new Date();\n\t\tcron = cron\n\t\t\t.split(' ')\n\t\t\t.map((val, i) =>\n\t\t\t\tval.replace(wildcardRegex, (match) => {\n\t\t\t\t\tif (match === 'h') return (Math.floor(Math.random() * allowedNum[i][1]) + allowedNum[i][0]).toString();\n\n\t\t\t\t\tif (match === '?') {\n\t\t\t\t\t\tswitch (i) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\treturn now.getUTCMinutes().toString();\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\treturn now.getUTCHours().toString();\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\treturn now.getUTCDate().toString();\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\treturn now.getUTCMonth().toString();\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\treturn now.getUTCDay().toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn match;\n\t\t\t\t})\n\t\t\t)\n\t\t\t.join(' ');\n\t\treturn cron.replace(tokensRegex, (match) => String(Reflect.get(cronTokens, match)));\n\t}\n\n\t/**\n\t * Parse the pattern\n\t * @param cron The pattern to parse\n\t */\n\tprivate static parseString(cron: string): Array<number[]> {\n\t\tconst parts = cron.split(' ');\n\t\tif (parts.length !== 5) throw new Error('Invalid Cron Provided');\n\t\treturn parts.map((part, i) => Cron.parsePart(part, i));\n\t}\n\n\t/**\n\t * Parse the current part\n\t * @param cronPart The part of the pattern to parse\n\t * @param id The id that identifies the current part\n\t */\n\tprivate static parsePart(cronPart: string, id: number): number[] {\n\t\tif (cronPart.includes(',')) {\n\t\t\tconst res: number[] = [];\n\t\t\tfor (const part of cronPart.split(',')) res.push(...Cron.parsePart(part, id));\n\t\t\treturn [...new Set(res)].sort((a, b) => a - b);\n\t\t}\n\n\t\t// eslint-disable-next-line prefer-const\n\t\tconst [, wild, minStr, maxStr, step] = partRegex.exec(cronPart)!;\n\t\tlet [min, max] = [parseInt(minStr, 10), parseInt(maxStr, 10)];\n\n\t\t// If '*', set min and max as the minimum and maximum allowed numbers:\n\t\tif (wild) [min, max] = allowedNum[id];\n\t\t// Else if a number was given, but not a maximum nor a step, return it\n\t\t// as only allowed value:\n\t\telse if (!max && !step) return [min];\n\n\t\t// Set min and max as the given numbers, defaulting max to the maximum\n\t\t// allowed, so min is never bigger than max:\n\t\t// This makes min and max be, in the following cases (considering minutes):\n\t\t// -> 1-2 | 1..2\n\t\t// -> 2-1 | 1..2\n\t\t// -> 1/7 | 1, 8, 15, 22, 29, 36, 43, 50, 57\n\t\t[min, max] = [min, max || allowedNum[id][1]].sort((a, b) => a - b);\n\n\t\t// Generate a range\n\t\treturn range(min, max, parseInt(step, 10) || 1);\n\t}\n}\n","/* eslint-disable @typescript-eslint/restrict-plus-operands */\nconst tokens = new Map([\n\t['nanosecond', 1 / 1e6],\n\t['nanoseconds', 1 / 1e6],\n\t['ns', 1 / 1e6],\n\n\t['millisecond', 1],\n\t['milliseconds', 1],\n\t['ms', 1],\n\n\t['second', 1000],\n\t['seconds', 1000],\n\t['sec', 1000],\n\t['secs', 1000],\n\t['s', 1000],\n\n\t['minute', 1000 * 60],\n\t['minutes', 1000 * 60],\n\t['min', 1000 * 60],\n\t['mins', 1000 * 60],\n\t['m', 1000 * 60],\n\n\t['hour', 1000 * 60 * 60],\n\t['hours', 1000 * 60 * 60],\n\t['hr', 1000 * 60 * 60],\n\t['hrs', 1000 * 60 * 60],\n\t['h', 1000 * 60 * 60],\n\n\t['day', 1000 * 60 * 60 * 24],\n\t['days', 1000 * 60 * 60 * 24],\n\t['d', 1000 * 60 * 60 * 24],\n\n\t['week', 1000 * 60 * 60 * 24 * 7],\n\t['weeks', 1000 * 60 * 60 * 24 * 7],\n\t['wk', 1000 * 60 * 60 * 24 * 7],\n\t['wks', 1000 * 60 * 60 * 24 * 7],\n\t['w', 1000 * 60 * 60 * 24 * 7],\n\n\t['month', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\t['months', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\t['b', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\t['mo', 1000 * 60 * 60 * 24 * (365.25 / 12)],\n\n\t['year', 1000 * 60 * 60 * 24 * 365.25],\n\t['years', 1000 * 60 * 60 * 24 * 365.25],\n\t['yr', 1000 * 60 * 60 * 24 * 365.25],\n\t['yrs', 1000 * 60 * 60 * 24 * 365.25],\n\t['y', 1000 * 60 * 60 * 24 * 365.25]\n]);\n\n/**\n * Converts duration strings into ms and future dates\n */\nexport class Duration {\n\t/**\n\t * The offset\n\t */\n\tpublic offset: number;\n\n\t/**\n\t * Create a new Duration instance\n\t * @param pattern The string to parse\n\t */\n\tpublic constructor(pattern: string) {\n\t\tthis.offset = Duration.parse(pattern.toLowerCase());\n\t}\n\n\t/**\n\t * Get the date from now\n\t */\n\tpublic get fromNow(): Date {\n\t\treturn this.dateFrom(new Date());\n\t}\n\n\t/**\n\t * Get the date from\n\t * @param date The Date instance to get the date from\n\t */\n\tpublic dateFrom(date: Date): Date {\n\t\treturn new Date(date.getTime() + this.offset);\n\t}\n\n\t/**\n\t * The RegExp used for the pattern parsing\n\t */\n\tprivate static readonly kPatternRegex = /(-?\\d*\\.?\\d+(?:e[-+]?\\d+)?)\\s*([a-zμ]*)/gi;\n\n\t/**\n\t * The RegExp used for removing commas\n\t */\n\tprivate static readonly kCommaRegex = /,/g;\n\n\t/**\n\t * The RegExp used for replacing a/an with 1\n\t */\n\tprivate static readonly kAanRegex = /\\ban?\\b/gi;\n\n\t/**\n\t * Parse the pattern\n\t * @param pattern The pattern to parse\n\t */\n\tprivate static parse(pattern: string): number {\n\t\tlet result = 0;\n\t\tlet valid = false;\n\n\t\tpattern\n\t\t\t// ignore commas\n\t\t\t.replace(Duration.kCommaRegex, '')\n\t\t\t// a / an = 1\n\t\t\t.replace(Duration.kAanRegex, '1')\n\t\t\t// do math\n\t\t\t.replace(Duration.kPatternRegex, (_, i, units) => {\n\t\t\t\tconst token = tokens.get(units);\n\t\t\t\tif (token !== undefined) {\n\t\t\t\t\tresult += Number(i) * token;\n\t\t\t\t\tvalid = true;\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t});\n\n\t\treturn valid ? result : NaN;\n\t}\n}\n","import { DEFAULT_SEPARATORS, DEFAULT_UNITS, TimeTypes } from './constants';\n\n/**\n * The duration of each time type in milliseconds\n */\nconst kTimeDurations: readonly [TimeTypes, number][] = [\n\t[TimeTypes.Year, 31536000000],\n\t// 29.53059 days is the official duration of a month: https://en.wikipedia.org/wiki/Month\n\t[TimeTypes.Month, 2628000000],\n\t[TimeTypes.Week, 1000 * 60 * 60 * 24 * 7],\n\t[TimeTypes.Day, 1000 * 60 * 60 * 24],\n\t[TimeTypes.Hour, 1000 * 60 * 60],\n\t[TimeTypes.Minute, 1000 * 60],\n\t[TimeTypes.Second, 1000]\n];\n\n/**\n * Display the duration\n * @param duration The duration in milliseconds to parse and display\n * @param assets The language assets\n */\nexport class DurationFormatter {\n\tpublic constructor(public units: DurationFormatAssetsTime = DEFAULT_UNITS) {}\n\n\tpublic format(\n\t\tduration: number,\n\t\tprecision = 7,\n\t\t{\n\t\t\tleft: leftSeparator = DEFAULT_SEPARATORS.left,\n\t\t\tright: rightSeparator = DEFAULT_SEPARATORS.right\n\t\t}: DurationFormatSeparators = DEFAULT_SEPARATORS\n\t) {\n\t\tconst output: string[] = [];\n\t\tconst negative = duration < 0;\n\t\tif (negative) duration *= -1;\n\n\t\tfor (const [type, timeDuration] of kTimeDurations) {\n\t\t\tconst substraction = duration / timeDuration;\n\t\t\tif (substraction < 1) continue;\n\n\t\t\tconst floored = Math.floor(substraction);\n\t\t\tduration -= floored * timeDuration;\n\t\t\toutput.push(addUnit(floored, this.units[type], leftSeparator!));\n\n\t\t\t// If the output has enough precision, break\n\t\t\tif (output.length >= precision) break;\n\t\t}\n\n\t\treturn `${negative ? '-' : ''}${output.join(rightSeparator) || addUnit(0, this.units.second, leftSeparator!)}`;\n\t}\n}\n\n/**\n * Adds an unit, if non zero\n * @param time The duration of said unit\n * @param unit The unit language assets\n */\nfunction addUnit(time: number, unit: DurationFormatAssetsUnit, separator: string) {\n\tif (Reflect.has(unit, time)) return `${time}${separator}${Reflect.get(unit, time)}`;\n\treturn `${time}${separator}${unit.DEFAULT}`;\n}\n\nexport interface DurationFormatSeparators {\n\tleft?: string;\n\tright?: string;\n}\n\nexport interface DurationFormatAssetsUnit extends Record<number, string> {\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tDEFAULT: string;\n}\n\nexport interface DurationFormatAssetsTime {\n\t[TimeTypes.Second]: DurationFormatAssetsUnit;\n\t[TimeTypes.Minute]: DurationFormatAssetsUnit;\n\t[TimeTypes.Hour]: DurationFormatAssetsUnit;\n\t[TimeTypes.Day]: DurationFormatAssetsUnit;\n\t[TimeTypes.Week]: DurationFormatAssetsUnit;\n\t[TimeTypes.Month]: DurationFormatAssetsUnit;\n\t[TimeTypes.Year]: DurationFormatAssetsUnit;\n}\n","/**\n * Manages timers so that this application can be cleanly exited\n */\nexport class TimerManager extends null {\n\t/**\n\t * A set of timeouts to clear on destroy\n\t */\n\tprivate static storedTimeouts = new Set<NodeJS.Timeout>();\n\n\t/**\n\t * A set of intervals to clear on destroy\n\t */\n\tprivate static storedIntervals = new Set<NodeJS.Timeout>();\n\n\t/**\n\t * Creates a timeout gets cleared when destroyed\n\t * @param fn callback function\n\t * @param delay amount of time before running the callback\n\t * @param args additional arguments to pass back to the callback\n\t */\n\tpublic static setTimeout<A = unknown>(fn: (...args: A[]) => void, delay: number, ...args: A[]): NodeJS.Timeout {\n\t\tconst timeout = setTimeout(() => {\n\t\t\tthis.storedTimeouts.delete(timeout);\n\t\t\tfn(...args);\n\t\t}, delay);\n\t\tthis.storedTimeouts.add(timeout);\n\t\treturn timeout;\n\t}\n\n\t/**\n\t * Clears a timeout created through this class\n\t * @param timeout The timeout to clear\n\t */\n\tpublic static clearTimeout(timeout: NodeJS.Timeout): void {\n\t\tclearTimeout(timeout);\n\t\tthis.storedTimeouts.delete(timeout);\n\t}\n\n\t/**\n\t * Creates an interval gets cleared when destroyed\n\t * @param fn callback function\n\t * @param delay amount of time before running the callback\n\t * @param args additional arguments to pass back to the callback\n\t */\n\tpublic static setInterval<A = unknown>(fn: (...args: A[]) => void, delay: number, ...args: A[]): NodeJS.Timeout {\n\t\tconst interval = setInterval(fn, delay, ...args);\n\t\tthis.storedIntervals.add(interval);\n\t\treturn interval;\n\t}\n\n\t/**\n\t * Clears an internal created through this class\n\t * @param interval The interval to clear\n\t */\n\tpublic static clearInterval(interval: NodeJS.Timeout): void {\n\t\tclearInterval(interval);\n\t\tthis.storedIntervals.delete(interval);\n\t}\n\n\t/**\n\t * Clears running timeouts and intervals created through this class so NodeJS can gracefully exit\n\t */\n\tpublic static destroy(): void {\n\t\tfor (const i of this.storedTimeouts) clearTimeout(i);\n\t\tfor (const i of this.storedIntervals) clearInterval(i);\n\t\tthis.storedTimeouts.clear();\n\t\tthis.storedIntervals.clear();\n\t}\n}\n","import { days, months, Time, tokens } from './constants';\n\ninterface TokenResolver {\n\t(time: Date): string;\n}\n\nconst tokenResolvers = new Map<string, TokenResolver>([\n\t// Dates\n\t['Y', (time) => String(time.getFullYear()).slice(2)],\n\t['YY', (time) => String(time.getFullYear()).slice(2)],\n\t['YYY', (time) => String(time.getFullYear())],\n\t['YYYY', (time) => String(time.getFullYear())],\n\t['Q', (time) => String((time.getMonth() + 1) / 3)],\n\t['M', (time) => String(time.getMonth() + 1)],\n\t['MM', (time) => String(time.getMonth() + 1).padStart(2, '0')],\n\t['MMM', (time) => months[time.getMonth()]],\n\t['MMMM', (time) => months[time.getMonth()]],\n\t['D', (time) => String(time.getDate())],\n\t['DD', (time) => String(time.getDate()).padStart(2, '0')],\n\t['DDD', (time) => String(Math.floor((time.getTime() - new Date(time.getFullYear(), 0, 0).getTime()) / Time.Day))],\n\t['DDDD', (time) => String(Math.floor((time.getTime() - new Date(time.getFullYear(), 0, 0).getTime()) / Time.Day))],\n\t[\n\t\t'd',\n\t\t(time) => {\n\t\t\tconst day = String(time.getDate());\n\t\t\tif (day !== '11' && day.endsWith('1')) return `${day}st`;\n\t\t\tif (day !== '12' && day.endsWith('2')) return `${day}nd`;\n\t\t\tif (day !== '13' && day.endsWith('3')) return `${day}rd`;\n\t\t\treturn `${day}th`;\n\t\t}\n\t],\n\t['dd', (time) => days[time.getDay()].slice(0, 2)],\n\t['ddd', (time) => days[time.getDay()].slice(0, 3)],\n\t['dddd', (time) => days[time.getDay()]],\n\t['X', (time) => String(time.valueOf() / Time.Second)],\n\t['x', (time) => String(time.valueOf())],\n\n\t// Locales\n\t['H', (time) => String(time.getHours())],\n\t['HH', (time) => String(time.getHours()).padStart(2, '0')],\n\t['h', (time) => String(time.getHours() % 12 || 12)],\n\t['hh', (time) => String(time.getHours() % 12 || 12).padStart(2, '0')],\n\t['a', (time) => (time.getHours() < 12 ? 'am' : 'pm')],\n\t['A', (time) => (time.getHours() < 12 ? 'AM' : 'PM')],\n\t['m', (time) => String(time.getMinutes())],\n\t['mm', (time) => String(time.getMinutes()).padStart(2, '0')],\n\t['s', (time) => String(time.getSeconds())],\n\t['ss', (time) => String(time.getSeconds()).padStart(2, '0')],\n\t['S', (time) => String(time.getMilliseconds())],\n\t['SS', (time) => String(time.getMilliseconds()).padStart(2, '0')],\n\t['SSS', (time) => String(time.getMilliseconds()).padStart(3, '0')],\n\t['T', (time) => `${String(time.getHours() % 12 || 12)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`],\n\t[\n\t\t't',\n\t\t(time) =>\n\t\t\t`${String(time.getHours() % 12 || 12)}:${String(time.getMinutes()).padStart(2, '0')}:${String(time.getSeconds()).padStart(2, '0')} ${\n\t\t\t\ttime.getHours() < 12 ? 'am' : 'pm'\n\t\t\t}`\n\t],\n\t['L', (time) => `${String(time.getMonth() + 1).padStart(2, '0')}/${String(time.getDate()).padStart(2, '0')}/${String(time.getFullYear())}`],\n\t['l', (time) => `${String(time.getMonth() + 1)}/${String(time.getDate()).padStart(2, '0')}/${String(time.getFullYear())}`],\n\t['LL', (time) => `${months[time.getMonth()]} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())}`],\n\t['ll', (time) => `${months[time.getMonth()].slice(0, 3)} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())}`],\n\t[\n\t\t'LLL',\n\t\t(time) =>\n\t\t\t`${months[time.getMonth()]} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())} ${String(\n\t\t\t\ttime.getHours() % 12 || 12\n\t\t\t)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'lll',\n\t\t(time) =>\n\t\t\t`${months[time.getMonth()].slice(0, 3)} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())} ${String(\n\t\t\t\ttime.getHours() % 12 || 12\n\t\t\t)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'LLLL',\n\t\t(time) =>\n\t\t\t`${days[time.getDay()]}, ${months[time.getMonth()]} ${String(time.getDate()).padStart(2, '0')}, ${String(time.getFullYear())} ${String(\n\t\t\t\ttime.getHours() % 12 || 12\n\t\t\t)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'llll',\n\t\t(time) =>\n\t\t\t`${days[time.getDay()].slice(0, 3)} ${months[time.getMonth()].slice(0, 3)} ${String(time.getDate()).padStart(2, '0')}, ${String(\n\t\t\t\ttime.getFullYear()\n\t\t\t)} ${String(time.getHours() % 12 || 12)}:${String(time.getMinutes()).padStart(2, '0')} ${time.getHours() < 12 ? 'AM' : 'PM'}`\n\t],\n\t[\n\t\t'Z',\n\t\t(time) => {\n\t\t\tconst offset = time.getTimezoneOffset();\n\t\t\tconst unsigned = offset >= 0;\n\t\t\tconst absolute = Math.abs(offset);\n\t\t\t/* istanbul ignore next: whether it's signed or unsigned, depends on where the machine is, I cannot control this. */\n\t\t\treturn `${unsigned ? '+' : '-'}${String(Math.floor(absolute / 60)).padStart(2, '0')}:${String(absolute % 60).padStart(2, '0')}`;\n\t\t}\n\t],\n\t[\n\t\t'ZZ',\n\t\t(time) => {\n\t\t\tconst offset = time.getTimezoneOffset();\n\t\t\tconst unsigned = offset >= 0;\n\t\t\tconst absolute = Math.abs(offset);\n\t\t\t/* istanbul ignore next: whether it's signed or unsigned, depends on where the machine is, I cannot control this. */\n\t\t\treturn `${unsigned ? '+' : '-'}${String(Math.floor(absolute / 60)).padStart(2, '0')}:${String(absolute % 60).padStart(2, '0')}`;\n\t\t}\n\t]\n]);\n/* eslint-enable max-len */\n\nexport type TimeResolvable = Date | number | string;\n\nexport interface TimestampTemplateEntry {\n\ttype: string;\n\tcontent: string | null;\n}\n\n/**\n * Timestamp class, parses the pattern once, displays the desired Date or UNIX timestamp with the selected pattern.\n */\nexport class Timestamp {\n\t/**\n\t * The raw pattern\n\t * @since 1.0.0\n\t */\n\tpublic pattern: string;\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tprivate template: TimestampTemplateEntry[];\n\n\t/**\n\t * Starts a new Timestamp and parses the pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t */\n\tpublic constructor(pattern: string) {\n\t\tthis.pattern = pattern;\n\t\tthis.template = Timestamp.parse(pattern);\n\t}\n\n\t/**\n\t * Display the current date with the current pattern.\n\t * @since 1.0.0\n\t * @param time The time to display\n\t */\n\tpublic display(time: TimeResolvable = new Date()): string {\n\t\treturn Timestamp.display(this.template, time);\n\t}\n\n\t/**\n\t * Display the current date utc with the current pattern.\n\t * @since 1.0.0\n\t * @param time The time to display in utc\n\t */\n\tpublic displayUTC(time?: TimeResolvable): string {\n\t\treturn Timestamp.display(this.template, Timestamp.utc(time));\n\t}\n\n\t/**\n\t * Edits the current pattern.\n\t * @since 1.0.0\n\t * @param pattern The new pattern for this instance\n\t * @chainable\n\t */\n\tpublic edit(pattern: string): this {\n\t\tthis.pattern = pattern;\n\t\tthis.template = Timestamp.parse(pattern);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Defines the toString behavior of Timestamp.\n\t */\n\tpublic toString(): string {\n\t\treturn this.display();\n\t}\n\n\t/**\n\t * Display the current date with the current pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t * @param time The time to display\n\t */\n\tpublic static displayArbitrary(pattern: string, time: TimeResolvable = new Date()): string {\n\t\treturn Timestamp.display(Timestamp.parse(pattern), time);\n\t}\n\n\t/**\n\t * Display the current date utc with the current pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t * @param time The time to display\n\t */\n\tpublic static displayUTCArbitrary(pattern: string, time: TimeResolvable = new Date()): string {\n\t\treturn Timestamp.display(Timestamp.parse(pattern), Timestamp.utc(time));\n\t}\n\n\t/**\n\t * Creates a UTC Date object to work with.\n\t * @since 1.0.0\n\t * @param time The date to convert to utc\n\t */\n\tpublic static utc(time: Date | number | string = new Date()): Date {\n\t\ttime = Timestamp.resolveDate(time);\n\t\treturn new Date(time.valueOf() + time.getTimezoneOffset() * 60000);\n\t}\n\n\t/**\n\t * Display the current date with the current pattern.\n\t * @since 1.0.0\n\t * @param template The pattern to parse\n\t * @param time The time to display\n\t */\n\tprivate static display(template: TimestampTemplateEntry[], time: Date | number | string): string {\n\t\tlet output = '';\n\t\tconst parsedTime = Timestamp.resolveDate(time);\n\t\tfor (const { content, type } of template) output += content || tokenResolvers.get(type)!(parsedTime);\n\t\treturn output;\n\t}\n\n\t/**\n\t * Parses the pattern.\n\t * @since 1.0.0\n\t * @param pattern The pattern to parse\n\t */\n\tprivate static parse(pattern: string): TimestampTemplateEntry[] {\n\t\tconst template: TimestampTemplateEntry[] = [];\n\t\tfor (let i = 0; i < pattern.length; i++) {\n\t\t\tlet current = '';\n\t\t\tconst currentChar = pattern[i];\n\t\t\tconst tokenMax = tokens.get(currentChar);\n\t\t\tif (typeof tokenMax === 'number') {\n\t\t\t\tcurrent += currentChar;\n\t\t\t\twhile (pattern[i + 1] === currentChar && current.length < tokenMax) current += pattern[++i];\n\t\t\t\ttemplate.push({ type: current, content: null });\n\t\t\t} else if (currentChar === '[') {\n\t\t\t\twhile (i + 1 < pattern.length && pattern[i + 1] !== ']') current += pattern[++i];\n\t\t\t\ti++;\n\t\t\t\ttemplate.push({ type: 'literal', content: current || '[' });\n\t\t\t} else {\n\t\t\t\tcurrent += currentChar;\n\t\t\t\twhile (i + 1 < pattern.length && !tokens.has(pattern[i + 1]) && pattern[i + 1] !== '[') current += pattern[++i];\n\t\t\t\ttemplate.push({ type: 'literal', content: current });\n\t\t\t}\n\t\t}\n\n\t\treturn template;\n\t}\n\n\t/**\n\t * Resolves a date.\n\t * @since 1.0.0\n\t * @param time The time to parse\n\t */\n\tprivate static resolveDate(time: TimeResolvable): Date {\n\t\treturn time instanceof Date ? time : new Date(time);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,MAAW,YAAX,kBAAW,eAAX;AACN,2BAAS;AACT,2BAAS;AACT,yBAAO;AACP,wBAAM;AACN,yBAAO;AACP,0BAAQ;AACR,yBAAO;AAPU;AAAA;AAUX,MAAW,OAAX,kBAAW,UAAX;AACN,iCAAc,KAAd;AACA,4BAAS,OAAT;AACA,4BAAS,OAAT;AACA,0BAAO,QAAP;AACA,yBAAM,SAAN;AACA,2BAAQ,UAAR;AACA,0BAAO,WAAP;AAPiB;AAAA;AAUX,MAAM,OAAO,CAAC,UAAU,UAAU,WAAW,aAAa,YAAY,UAAU;AAEhF,MAAM,SAAS,CAAC,WAAW,YAAY,SAAS,SAAS,OAAO,QAAQ,QAAQ,UAAU,aAAa,WAAW,YAAY;AAE9H,MAAM,SAAS,oBAAI,IAAoB;AAAA,IAC7C,CAAC,KAAK;AAAA,IAC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AAO,aAAa,UAAU;AACjC,qBAAW;AACX,iBAAO,QAAQ,IAAI,OAAO,eAAe,QAAQ,SAAS;AAAU,uBAAW,QAAQ,EAAE;AACzF,mBAAS,KAAK,EAAE,MAAM,SAAS,SAAS;AAAA,mBAC9B,gBAAgB,KAAK;AAC/B,iBAAO,IAAI,IAAI,QAAQ,UAAU,QAAQ,IAAI,OAAO;AAAK,uBAAW,QAAQ,EAAE;AAC9E;AACA,mBAAS,KAAK,EAAE,MAAM,WAAW,SAAS,WAAW;AAAA,eAC/C;AACN,qBAAW;AACX,iBAAO,IAAI,IAAI,QAAQ,UAAU,CAAC,OAAO,IAAI,QAAQ,IAAI,OAAO,QAAQ,IAAI,OAAO;AAAK,uBAAW,QAAQ,EAAE;AAC7G,mBAAS,KAAK,EAAE,MAAM,WAAW,SAAS;AAAA;AAAA;AAI5C,aAAO;AAAA;AAAA,WAQO,YAAY,MAA4B;AACtD,aAAO,gBAAgB,OAAO,OAAO,IAAI,KAAK;AAAA;AAAA;AAzIzC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/time-utilities",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "A time utility library for JavaScript.",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
@@ -53,6 +53,7 @@
53
53
  "access": "public"
54
54
  },
55
55
  "dependencies": {
56
- "@sapphire/utilities": "^3.4.0"
57
- }
56
+ "@sapphire/utilities": "^3.6.0"
57
+ },
58
+ "gitHead": "13089b8d03777d244afdc90017b864a00ac57be0"
58
59
  }