@harnessio/ui 0.5.39 → 0.5.40
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/dist/components.d.ts +4 -1
- package/dist/components.js +1 -1
- package/dist/{index-DLQPv1ZO.js → index-D0SEOfHL.js} +8525 -8498
- package/dist/{index-DLQPv1ZO.js.map → index-D0SEOfHL.js.map} +1 -1
- package/dist/{index-TEMkwCmP.js → index-F1mc0sEF.js} +54 -52
- package/dist/{index-TEMkwCmP.js.map → index-F1mc0sEF.js.map} +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/tailwind.config.js +36 -10
- package/dist/tailwind.config.js.map +1 -1
- package/dist/{textarea-utils-BABZsh7u.js → textarea-utils-CquwOLUe.js} +149 -147
- package/dist/textarea-utils-CquwOLUe.js.map +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.js +31 -29
- package/package.json +3 -3
- package/dist/textarea-utils-BABZsh7u.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea-utils-CquwOLUe.js","sources":["../src/utils/stringUtils.ts","../src/utils/typeUtils.tsx","../src/utils/mergeUtils.ts","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/toDate.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/constructFrom.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/constants.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/_lib/defaultOptions.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/compareAsc.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInCalendarMonths.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/_lib/getRoundingMethod.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInMilliseconds.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/endOfDay.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/endOfMonth.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/isLastDayOfMonth.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInMonths.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInSeconds.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/localize.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/match.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/formatDistance.mjs","../src/utils/TimeUtils.ts","../src/utils/getComponentDisplayName.ts","../src/utils/after-frames.ts","../src/utils/get-shadow-active-element.ts","../src/utils/textarea-utils.ts"],"sourcesContent":["export const TRIMMED_SHA_LENGTH = 6\n\n/**\n * Trim a git commit SHA to the standardised short-SHA display length.\n * Safely handles `undefined` and SHAs shorter than the limit (returned unchanged).\n */\nexport const getTrimmedSha = (sha?: string): string => (sha ?? '').slice(0, TRIMMED_SHA_LENGTH)\n\nexport const getInitials = (name: string, length = 2) => {\n // Split the name into an array of words, ignoring empty strings\n const words = name.split(' ').filter(Boolean)\n\n // Get the initials from the words\n const initials = words\n .map(word => word[0].toUpperCase()) // Get the first letter of each word\n .join('')\n\n // If length is provided, truncate the initials to the desired length\n return length ? initials.slice(0, length) : initials\n}\n\n/**\n * Converts comma-separated values to a structured object with metadata\n * @param inputValue The comma-separated string (e.g., \"a,b,c\" or \"a:1,a:2,a:3\")\n * @returns Object with data and metadata about key-value pairs\n */\nexport const csvToObject = (\n inputValue: string\n): { data: Record<string, string>; metadata: Record<string, boolean> } => {\n if (!inputValue?.trim()) return { data: {}, metadata: {} }\n\n // Split by comma, trim whitespace, and filter out empty strings\n const parts = inputValue\n .split(',')\n .map(part => part.trim())\n .filter(part => part.length > 0)\n\n // Early return if no valid parts\n if (parts.length === 0) return { data: {}, metadata: {} }\n\n // Key-based deduplication - last occurrence wins\n const data: Record<string, string> = {}\n const metadata: Record<string, boolean> = {}\n\n for (const part of parts) {\n if (part.includes(':')) {\n const colonIndex = part.indexOf(':')\n const key = part.substring(0, colonIndex)\n const value = part.substring(colonIndex + 1)\n if (key && key.trim()) {\n const trimmedKey = key.trim()\n data[trimmedKey] = value ? value.trim() : ''\n metadata[trimmedKey] = true // This was a key-value pair\n } else {\n // If key is empty (like \":a\"), treat as simple tag\n data[part] = part\n metadata[part] = false\n }\n } else {\n data[part] = part\n metadata[part] = false // This was a simple tag\n }\n }\n\n return { data, metadata }\n}\n\n/**\n * Pluralizes a word based on the count\n * @param count The count of the word\n * @param singular The singular form of the word\n * @param plural The plural form of the word\n * @param include Whether to include the count in the result\n * @returns The pluralized word\n */\nexport const easyPluralize = (count: number, singular: string, plural: string, include = false): string => {\n const word = count === 1 ? singular : plural\n\n return include ? `${count} ${word}` : word\n}\n","/**\n * Valid JavaScript type names that can be returned by the typeof operator\n */\ntype JavaScriptType = 'string' | 'number' | 'boolean' | 'undefined' | 'object' | 'function' | 'symbol' | 'bigint'\n\n/**\n * Maps JavaScript type names to their actual types\n */\ntype TypeMap = {\n string: string\n number: number\n boolean: boolean\n undefined: undefined\n object: object | null\n function: (...args: any[]) => any\n symbol: symbol\n bigint: bigint\n}\n\n/**\n * Creates a union type from an array of JavaScript type names\n */\ntype TypeFromArray<T extends JavaScriptType[]> = {\n [K in keyof T]: T[K] extends JavaScriptType ? TypeMap[T[K]] : never\n}[number]\n\n/**\n * Checks if a value is of one of the provided types and provides type assertion\n * @param value - The value to check\n * @param types - Array of JavaScript type names to check against\n * @returns True if the value matches any of the provided types, false otherwise\n * @example\n * const value: unknown = \"hello\";\n * if (isAnyTypeOf(value, ['string', 'number'])) {\n * TypeScript now knows that value is string | number\n * console.log(value.toString());\n * }\n */\nexport function isAnyTypeOf<T extends JavaScriptType[]>(value: unknown, types: [...T]): value is TypeFromArray<T> {\n const actualType = typeof value\n return types.includes(actualType as JavaScriptType)\n}\n\n/**\n * Splits an object into two parts: one with the specified keys and one with the remaining keys\n * @param obj - The object to split\n * @param keys - Array of keys to extract\n * @returns An object with two properties: `picked` containing the extracted properties and `rest` containing the remaining properties\n * @example\n * const { picked: { created_by, review_decision }, rest } = splitObjectProps(\n * Object.fromEntries(searchParams.entries()),\n * ['created_by', 'review_decision']\n * );\n */\nexport function splitObjectProps<T extends Record<string, any>, K extends keyof T>(\n obj: T,\n keys: K[]\n): { picked: Pick<T, K>; rest: Omit<T, K> } {\n const picked = {} as Pick<T, K>\n const rest = { ...obj }\n\n for (const key of keys) {\n if (key in obj) {\n picked[key] = obj[key]\n delete rest[key as string]\n }\n }\n\n return { picked, rest }\n}\n","import { ForwardedRef, MutableRefObject, RefCallback, useCallback } from 'react'\n\n/**\n * Helps to construct conditional objects like this: {a: b, ...(some ? c : {}), z: x}\n */\nexport const wrapConditionalObjectElement = <T>(element: T, isPassing: boolean) => {\n if (!element || !isPassing) {\n return {} as T\n }\n\n return element\n}\n\n/**\n * Helps to construct conditional arrays like this: [item1, condition && item2, item3].filter(item => !!item)\n */\nexport const wrapConditionalArrayElements = <T>(elements: T[], isPassing: boolean) => {\n if (!elements || !isPassing) {\n return []\n }\n\n return elements\n}\n\ntype PossibleRef<T> = MutableRefObject<T> | RefCallback<T> | ForwardedRef<T>\n\n/**\n * A React hook that merges multiple refs into a single ref callback.\n */\nexport function useMergeRefs<T>(refs: Array<PossibleRef<T> | null | undefined>): RefCallback<T> {\n return useCallback(\n (value: T) => {\n refs.forEach(ref => {\n if (!ref) return\n\n if (typeof ref === 'function') {\n ref(value)\n return\n }\n\n try {\n ;(ref as MutableRefObject<T>).current = value\n } catch (error) {\n console.error('Failed to set ref value:', error)\n }\n })\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [...refs]\n )\n}\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from 'date-fns'\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date(date: DateType): DateType {\n * return constructFrom(\n * date, // Use contrustor from the given date\n * date.getTime() // Use the date value to create a new date\n * )\n * }\n */\nexport function constructFrom(date, value) {\n if (date instanceof Date) {\n return new date.constructor(value);\n } else {\n return new Date(value);\n }\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { toDate } from \"../toDate.mjs\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const diff = _dateLeft.getTime() - _dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();\n const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();\n\n return yearDiff * 12 + monthDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","export function getRoundingMethod(method) {\n return (number) => {\n const round = method ? Math[method] : Math.trunc;\n const result = round(number);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n };\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(dateLeft, dateRight) {\n return +toDate(dateLeft) - +toDate(dateRight);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date) {\n const _date = toDate(date);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { endOfDay } from \"./endOfDay.mjs\";\nimport { endOfMonth } from \"./endOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date) {\n const _date = toDate(date);\n return +endOfDay(_date) === +endOfMonth(_date);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.mjs\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const sign = compareAsc(_dateLeft, _dateRight);\n const difference = Math.abs(\n differenceInCalendarMonths(_dateLeft, _dateRight),\n );\n let result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (_dateLeft.getMonth() === 1 && _dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n _dateLeft.setDate(30);\n }\n\n _dateLeft.setMonth(_dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n let isLastMonthNotFull = compareAsc(_dateLeft, _dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if (\n isLastDayOfMonth(toDate(dateLeft)) &&\n difference === 1 &&\n compareAsc(dateLeft, _dateRight) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.mjs\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.mjs\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(dateLeft, dateRight, options) {\n const diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { minutesInDay, minutesInMonth } from \"./constants.mjs\";\nimport { differenceInMonths } from \"./differenceInMonths.mjs\";\nimport { differenceInSeconds } from \"./differenceInSeconds.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date\n * @param baseDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport function formatDistance(date, baseDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(date, baseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n let dateLeft;\n let dateRight;\n if (comparison > 0) {\n dateLeft = toDate(baseDate);\n dateRight = toDate(date);\n } else {\n dateLeft = toDate(date);\n dateRight = toDate(baseDate);\n }\n\n const seconds = differenceInSeconds(dateRight, dateLeft);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(dateRight) -\n getTimezoneOffsetInMilliseconds(dateLeft)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n","import { formatDistance } from 'date-fns'\n\n/**\n * @param startTs\n * @param endTs\n * @returns duration in \"1h 2m 3s\" format\n */\nexport const getFormattedDuration = (startTs = 0, endTs = 0): string => {\n if (startTs >= endTs) return '0s'\n const totalSeconds = Math.floor((endTs - startTs) / 1000)\n const hours = Math.floor(totalSeconds / 3600)\n const minutes = Math.floor((totalSeconds % 3600) / 60)\n const seconds = totalSeconds % 60\n\n const parts = []\n\n if (hours > 0) {\n parts.push(`${hours}h`)\n }\n if (minutes > 0) {\n parts.push(`${minutes}m`)\n }\n if (seconds > 0 || parts.length === 0) {\n parts.push(`${seconds}s`)\n }\n\n return parts.join(' ')\n}\n\n/**\n * Formats duration in milliseconds or nanoseconds to human-readable duration format.\n * For 3723000 is formatted as \"1h 2m 3s\".\n * @param durationInMs\n * @param unit\n * @returns\n */\n\nexport const formatDuration = (duration: number, unit: 'ms' | 'ns' = 'ms'): string => {\n if (!duration) return '0s'\n\n let totalSeconds: number\n let remainingMs = 0\n\n if (unit === 'ms') {\n totalSeconds = Math.floor(duration / 1000)\n if (totalSeconds === 0) remainingMs = duration\n } else {\n totalSeconds = Math.floor(duration / 1e9)\n if (totalSeconds === 0) remainingMs = (duration % 1e9) / 1e6\n }\n\n if (totalSeconds === 0) {\n return remainingMs > 0 ? new Intl.NumberFormat().format(remainingMs) + 'ms' : '0s'\n }\n\n const hours = Math.floor(totalSeconds / 3600)\n const remainingMinutes = Math.floor((totalSeconds % 3600) / 60)\n const remainingSeconds = totalSeconds % 60\n\n const formatted = []\n if (hours > 0) formatted.push(new Intl.NumberFormat().format(hours) + 'h')\n if (remainingMinutes > 0) formatted.push(new Intl.NumberFormat().format(remainingMinutes) + 'm')\n if (remainingSeconds > 0) formatted.push(new Intl.NumberFormat().format(remainingSeconds) + 's')\n\n return formatted.join(' ') || '0s'\n}\n\n/**\n * Formats an epoch timestamp into a string in the format \"HH:mm:ss.SSS\".\n *\n * @param epoch - The epoch timestamp (milliseconds since January 1, 1970).\n * @returns A formatted string representing the time in \"HH:mm:ss.SSS\" format.\n */\nexport const formatTimestamp = (epoch: number): string => {\n return new Intl.DateTimeFormat('en-GB', {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n fractionalSecondDigits: 3,\n hour12: false\n }).format(new Date(epoch))\n}\n\n/**\n * Formats a Date to a 12-hour time string like \"7:15pm\".\n *\n * @param date - The Date object to format.\n * @returns A formatted string representing the time in \"h:mmam/pm\" format.\n */\nexport const formatTime = (date: Date): string => {\n return date\n .toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true\n })\n .toLowerCase()\n}\n\n// Constants\nexport const LOCALE = Intl.NumberFormat().resolvedOptions?.().locale || 'en-US'\n\n/**\n * Format a timestamp to a localized date string\n * @param timestamp - Unix timestamp in milliseconds or ISO date string\n * @param dateStyle - DateTimeFormat style: 'full' | 'long' | 'medium' | 'short'\n * @returns Formatted date string or empty string if timestamp is falsy\n * @example\n * formatDate(1642774800000) // Returns \"Jan 21, 2024\"\n * formatDate(\"2022-01-21\", \"full\") // Returns \"Friday, January 21, 2024\"\n */\nexport function formatDate(\n timestamp: number | string,\n dateStyle: Intl.DateTimeFormatOptions['dateStyle'] = 'medium'\n): string {\n if (!timestamp) return ''\n\n try {\n return new Intl.DateTimeFormat(LOCALE, { dateStyle }).format(new Date(timestamp))\n } catch (error) {\n console.error(`Failed to format date: ${error}`)\n return ''\n }\n}\n\n/**\n * Calculate human-readable time distance between two dates\n * @param date1 - First date in milliseconds\n * @param date2 - Second date in milliseconds (defaults to 0)\n * @param onlyHighestDenomination - If true, returns only the highest unit (e.g., \"2 days\" instead of \"2 days 3 hours\")\n * @returns Formatted distance string\n */\nexport const timeDistance = (date1 = 0, date2 = 0, onlyHighestDenomination = false): string => {\n if (!date1 && !date2) return '0 seconds'\n\n const fullDistance = formatDistance(date1, date2, {\n includeSeconds: true,\n addSuffix: false\n })\n\n if (onlyHighestDenomination) {\n // Take only the first part of the string (e.g., from \"2 days 3 hours\" we get \"2 days\")\n return fullDistance.split(' ').slice(0, 2).join(' ')\n }\n\n return fullDistance\n}\n\n/**\n * Format a number with current locale.\n * @param num number\n * @returns Formatted string.\n */\nexport function formatNumber(num: number | bigint): string {\n return new Intl.NumberFormat(LOCALE).format(num)\n}\n\n/**\n * This is the function that formats a timestamp to a relative time string.\n * ⭐️ It is used in TimeAgoCard component.\n *\n * @param timestamp\n * @param locale\n * @returns\n */\nexport const formatRelativeTime = (timestamp?: number | string | null, locale: string | string[] = LOCALE): string => {\n if (!timestamp) {\n return ''\n }\n try {\n const time = new Date(timestamp).getTime()\n\n if (isNaN(time) || !isFinite(time) || time === 0) {\n return ''\n }\n\n const now = Date.now()\n const diffSeconds = Math.floor((time - now) / 1000)\n\n if (!isFinite(diffSeconds)) {\n console.warn('Invalid timestamp:', time)\n return ''\n }\n\n const rtf = new Intl.RelativeTimeFormat(locale, {\n numeric: 'always',\n style: 'narrow'\n })\n\n const units: [Intl.RelativeTimeFormatUnit, number][] = [\n ['year', 3600 * 24 * 365],\n ['month', 3600 * 24 * 30],\n ['week', 3600 * 24 * 7],\n ['day', 3600 * 24],\n ['hour', 3600],\n ['minute', 60],\n ['second', 1]\n ]\n\n for (const [unit, seconds] of units) {\n if (Math.abs(diffSeconds) >= seconds || unit === 'second') {\n const value = Math.round(diffSeconds / seconds)\n return rtf.format(value, unit)\n }\n }\n\n return rtf.format(0, 'second')\n } catch (error) {\n console.warn('Intl API error:', error)\n // Fallback for any Intl API errors or locale issues\n return ''\n }\n}\n","import { isValidElement, ReactNode } from 'react'\n\nexport const getComponentDisplayName = (child: ReactNode): string | undefined => {\n if (isValidElement(child)) {\n const type = child.type\n\n if (typeof type !== 'string') {\n return (type as { displayName?: string }).displayName\n }\n }\n\n return undefined\n}\n","export const afterFrames = (cb: () => void, frames = 2) => {\n let cancelled = false\n const step = () => {\n requestAnimationFrame(() => {\n if (cancelled) return\n frames -= 1\n frames <= 0 ? cb() : step()\n })\n }\n step()\n return () => {\n cancelled = true\n }\n}\n","export const getShadowActiveElement = (rootEl: HTMLElement) => {\n const rootNode = rootEl.getRootNode()\n\n return {\n isShadowRoot: rootNode instanceof ShadowRoot,\n activeEl: rootNode instanceof ShadowRoot ? rootNode.activeElement : document.activeElement\n }\n}\n","/**\n * Textarea utilities for caret position tracking and word manipulation.\n * Based on https://github.com/component/textarea-caret-position\n */\n\n// CSS properties to copy to mirror div for accurate caret positioning\nconst MIRROR_PROPERTIES = [\n 'direction',\n 'boxSizing',\n 'width',\n 'height',\n 'overflowX',\n 'overflowY',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderStyle',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'fontStyle',\n 'fontVariant',\n 'fontWeight',\n 'fontStretch',\n 'fontSize',\n 'fontSizeAdjust',\n 'lineHeight',\n 'fontFamily',\n 'textAlign',\n 'textTransform',\n 'textIndent',\n 'textDecoration',\n 'letterSpacing',\n 'wordSpacing',\n 'tabSize',\n 'MozTabSize'\n] as const\n\nconst isFirefox = typeof window !== 'undefined' && 'mozInnerScreenX' in window\n\n/**\n * Gets the current selection/caret position in a textarea\n */\nexport function getCaretPosition(element: HTMLTextAreaElement) {\n return {\n caretStartIndex: element.selectionStart || 0,\n caretEndIndex: element.selectionEnd || 0\n }\n}\n\n/**\n * Gets the word at the current caret position\n */\nexport function getCurrentWord(element: HTMLTextAreaElement) {\n const text = element.value\n const { caretStartIndex } = getCaretPosition(element)\n\n let start = caretStartIndex\n while (start > 0 && text[start - 1].match(/\\S/)) {\n start--\n }\n\n let end = caretStartIndex\n while (end < text.length && text[end].match(/\\S/)) {\n end++\n }\n\n return text.substring(start, end)\n}\n\n/**\n * Replaces the word at the current caret position with a new value.\n * Uses execCommand for undo/redo support.\n */\nexport function replaceWord(element: HTMLTextAreaElement, value: string) {\n const text = element.value\n const caretPos = element.selectionStart\n\n const wordRegex = /[\\w@#]+/g\n let match\n let startIndex: number | undefined\n let endIndex: number | undefined\n\n while ((match = wordRegex.exec(text)) !== null) {\n startIndex = match.index\n endIndex = startIndex + match[0].length\n\n if (caretPos >= startIndex && caretPos <= endIndex) {\n break\n }\n }\n\n if (startIndex !== undefined && endIndex !== undefined) {\n const selectionStart = element.selectionStart\n const selectionEnd = element.selectionEnd\n\n element.setSelectionRange(startIndex, endIndex)\n document.execCommand('insertText', false, value)\n\n element.setSelectionRange(\n selectionStart - (endIndex - startIndex) + value.length,\n selectionEnd - (endIndex - startIndex) + value.length\n )\n }\n}\n\nexport interface CaretCoordinates {\n top: number\n left: number\n height: number\n}\n\n/**\n * Gets the pixel coordinates of the caret in a textarea.\n * Creates a mirror div to measure the exact position.\n */\nexport function getCaretCoordinates(element: HTMLTextAreaElement, position: number): CaretCoordinates {\n // Clean up any existing mirror div\n const existingDiv = document.querySelector('#input-textarea-caret-position-mirror-div')\n if (existingDiv) {\n existingDiv.parentNode?.removeChild(existingDiv)\n }\n\n const div = document.createElement('div')\n div.id = 'input-textarea-caret-position-mirror-div'\n document.body.appendChild(div)\n\n const style: CSSStyleDeclaration = div.style\n const computed = window.getComputedStyle(element)\n const isInput = element.nodeName === 'INPUT'\n\n style.whiteSpace = 'pre-wrap'\n if (!isInput) style.wordWrap = 'break-word'\n\n style.position = 'absolute'\n style.visibility = 'hidden'\n\n MIRROR_PROPERTIES.forEach(function (prop) {\n if (isInput && prop === 'lineHeight') {\n if (computed.boxSizing === 'border-box') {\n const height = parseInt(computed.height)\n const outerHeight =\n parseInt(computed.paddingTop) +\n parseInt(computed.paddingBottom) +\n parseInt(computed.borderTopWidth) +\n parseInt(computed.borderBottomWidth)\n const targetHeight = outerHeight + parseInt(computed.lineHeight)\n if (height > targetHeight) {\n style.lineHeight = height - outerHeight + 'px'\n } else if (height === targetHeight) {\n style.lineHeight = computed.lineHeight\n } else {\n style.lineHeight = '0px'\n }\n } else {\n style.lineHeight = computed.height\n }\n } else {\n // @ts-expect-error - dynamic property access\n style[prop] = computed[prop]\n }\n })\n\n if (isFirefox) {\n if (element.scrollHeight > parseInt(computed.height)) style.overflowY = 'scroll'\n } else {\n style.overflow = 'hidden'\n }\n\n div.textContent = element.value.substring(0, position)\n if (isInput) div.textContent = div.textContent.replace(/\\s/g, '\\u00a0')\n\n const span = document.createElement('span')\n span.textContent = element.value.substring(position) || ''\n div.appendChild(span)\n\n const coordinates = {\n top: span.offsetTop + parseInt(computed['borderTopWidth']),\n left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n height: parseInt(computed['lineHeight'])\n }\n\n document.body.removeChild(div)\n\n return coordinates\n}\n"],"names":["TRIMMED_SHA_LENGTH","getTrimmedSha","sha","getInitials","name","length","initials","word","csvToObject","inputValue","parts","part","data","metadata","colonIndex","key","value","trimmedKey","easyPluralize","count","singular","plural","include","isAnyTypeOf","types","actualType","splitObjectProps","obj","keys","picked","rest","wrapConditionalObjectElement","element","isPassing","wrapConditionalArrayElements","elements","useMergeRefs","refs","useCallback","ref","error","toDate","argument","argStr","constructFrom","date","millisecondsInWeek","millisecondsInDay","millisecondsInMinute","millisecondsInHour","millisecondsInSecond","minutesInMonth","minutesInDay","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","_date","utcDate","compareAsc","dateLeft","dateRight","_dateLeft","_dateRight","diff","differenceInCalendarMonths","yearDiff","monthDiff","getRoundingMethod","method","number","result","differenceInMilliseconds","endOfDay","endOfMonth","month","isLastDayOfMonth","differenceInMonths","sign","difference","isLastMonthNotFull","differenceInSeconds","options","formatDistanceLocale","formatDistance","token","tokenValue","buildFormatLongFn","args","width","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","_baseDate","_options","buildLocalizeFn","context","valuesArray","defaultWidth","index","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","quarter","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","findIndex","pattern","findKey","object","predicate","array","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","enUS","baseDate","locale","defaultLocale","minutesInAlmostTwoDays","comparison","localizeOptions","seconds","offsetInSeconds","minutes","months","hours","days","nearestMonth","monthsSinceStartOfYear","years","getFormattedDuration","startTs","endTs","totalSeconds","formatDuration","duration","unit","remainingMs","remainingMinutes","remainingSeconds","formatted","formatTimestamp","epoch","formatTime","LOCALE","_b","_a","formatDate","timestamp","dateStyle","timeDistance","date1","date2","onlyHighestDenomination","fullDistance","formatNumber","num","formatRelativeTime","time","now","diffSeconds","rtf","units","getComponentDisplayName","child","isValidElement","type","afterFrames","cb","frames","cancelled","step","getShadowActiveElement","rootEl","rootNode","MIRROR_PROPERTIES","isFirefox","getCaretPosition","getCurrentWord","text","caretStartIndex","start","end","replaceWord","caretPos","wordRegex","startIndex","endIndex","selectionStart","selectionEnd","getCaretCoordinates","position","existingDiv","div","style","computed","isInput","prop","height","outerHeight","targetHeight","span","coordinates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AAS,aAE5BD,EAAM,aAAa;AAAA,MACrB;AAEA,QAAAA,EAAM,aAAaC,EAAS;AAAA;AAIxB,MAAAD,EAAAG,CAAI,IAAIF,EAASE,CAAI;AAAA,EAC7B,CACD,GAEGrB,KACE1K,EAAQ,eAAe,SAAS6L,EAAS,MAAM,QAAS,YAAY,YAExED,EAAM,WAAW,UAGnBD,EAAI,cAAc3L,EAAQ,MAAM,UAAU,GAAGyL,CAAQ,GACjDK,MAAaH,EAAA,cAAcA,EAAI,YAAY,QAAQ,OAAO,GAAQ;AAEhE,QAAAQ,IAAO,SAAS,cAAc,MAAM;AAC1C,EAAAA,EAAK,cAAcnM,EAAQ,MAAM,UAAUyL,CAAQ,KAAK,IACxDE,EAAI,YAAYQ,CAAI;AAEpB,QAAMC,IAAc;AAAA,IAClB,KAAKD,EAAK,YAAY,SAASN,EAAS,cAAiB;AAAA,IACzD,MAAMM,EAAK,aAAa,SAASN,EAAS,eAAkB;AAAA,IAC5D,QAAQ,SAASA,EAAS,UAAa;AAAA,EACzC;AAES,kBAAA,KAAK,YAAYF,CAAG,GAEtBS;AACT;","x_google_ignoreList":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]}
|
package/dist/utils.d.ts
CHANGED
|
@@ -179,6 +179,12 @@ export declare const getShadowActiveElement: (rootEl: HTMLElement) => {
|
|
|
179
179
|
activeEl: Element | null;
|
|
180
180
|
};
|
|
181
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Trim a git commit SHA to the standardised short-SHA display length.
|
|
184
|
+
* Safely handles `undefined` and SHAs shorter than the limit (returned unchanged).
|
|
185
|
+
*/
|
|
186
|
+
export declare const getTrimmedSha: (sha?: string) => string;
|
|
187
|
+
|
|
182
188
|
export declare const hyphenRegexIdentifier: RegExp;
|
|
183
189
|
|
|
184
190
|
export declare const identifierSchema: (config?: {
|
|
@@ -274,6 +280,8 @@ declare type Task = () => void;
|
|
|
274
280
|
*/
|
|
275
281
|
export declare const timeDistance: (date1?: number, date2?: number, onlyHighestDenomination?: boolean) => string;
|
|
276
282
|
|
|
283
|
+
export declare const TRIMMED_SHA_LENGTH = 6;
|
|
284
|
+
|
|
277
285
|
/**
|
|
278
286
|
* Creates a union type from an array of JavaScript type names
|
|
279
287
|
*/
|
package/dist/utils.js
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
import { I as s, Z as t, h as
|
|
2
|
-
import { L as
|
|
3
|
-
import { c as
|
|
1
|
+
import { I as s, Z as t, h as i, e as r, c as o, i as n, d as m, j as l, k as d, f as c, g as f, a as g, b as p, l as C, s as I } from "./utils-FHJmIMTH.js";
|
|
2
|
+
import { L as T, T as h, k as u, s as L, B as D, C as P, D as b, E as k, v as y, F as N, G as O, y as A, H as R, l as _, x, I as M, n as j, j as w, p as v, i as F, z as H, J as S, K as B, u as V, o as Z, w as q } from "./textarea-utils-CquwOLUe.js";
|
|
3
|
+
import { c as G, d as U, f as W, h as J, b as K, a as Q, r as X } from "./index-F1mc0sEF.js";
|
|
4
4
|
export {
|
|
5
5
|
s as INITIAL_ZOOM_LEVEL,
|
|
6
|
-
|
|
6
|
+
T as LOCALE,
|
|
7
|
+
h as TRIMMED_SHA_LENGTH,
|
|
7
8
|
t as ZOOM_INC_DEC_LEVEL,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
u as afterFrames,
|
|
10
|
+
i as buildPaginationLink,
|
|
11
|
+
r as clamp,
|
|
11
12
|
o as cn,
|
|
12
13
|
n as createPaginationLinks,
|
|
13
|
-
|
|
14
|
+
G as createRequestAnimationFrameTaskPool,
|
|
14
15
|
U as createRequestIdleCallbackTaskPool,
|
|
15
16
|
L as csvToObject,
|
|
16
17
|
m as decodeURIComponentIfValid,
|
|
17
18
|
l as decodeURIPath,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
D as easyPluralize,
|
|
20
|
+
d as encodePath,
|
|
21
|
+
c as filterChildrenByDisplayNames,
|
|
22
|
+
P as formatDate,
|
|
22
23
|
W as formatDistanceToNow,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
b as formatDuration,
|
|
25
|
+
k as formatNumber,
|
|
26
|
+
y as formatRelativeTime,
|
|
27
|
+
N as formatTime,
|
|
28
|
+
O as formatTimestamp,
|
|
28
29
|
f as generateAlphaNumericHash,
|
|
29
30
|
A as getCaretCoordinates,
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
R as getCaretPosition,
|
|
32
|
+
_ as getComponentDisplayName,
|
|
32
33
|
g as getCssNumber,
|
|
33
34
|
x as getCurrentWord,
|
|
34
35
|
p as getErrorMessage,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
M as getFormattedDuration,
|
|
37
|
+
j as getInitials,
|
|
38
|
+
w as getShadowActiveElement,
|
|
39
|
+
v as getTrimmedSha,
|
|
40
|
+
J as hyphenRegexIdentifier,
|
|
41
|
+
K as identifierSchema,
|
|
42
|
+
Q as illegalIdentifiers,
|
|
43
|
+
F as isAnyTypeOf,
|
|
42
44
|
C as isPromise,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
X as regexIdentifier,
|
|
46
|
+
H as replaceWord,
|
|
45
47
|
I as settingsBackLink,
|
|
46
|
-
|
|
48
|
+
S as splitObjectProps,
|
|
47
49
|
B as timeDistance,
|
|
48
50
|
V as useMergeRefs,
|
|
49
51
|
Z as wrapConditionalArrayElements,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harnessio/ui",
|
|
3
3
|
"description": "Harness Canary UI component library",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.40",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
"vaul": "^1.1.2",
|
|
122
122
|
"yaml": "^2.7.0",
|
|
123
123
|
"zod": "^3.23.8",
|
|
124
|
+
"@harnessio/core-design-system": "0.0.1",
|
|
124
125
|
"@harnessio/pipeline-graph": "1.9.6",
|
|
125
|
-
"@harnessio/yaml-editor": "0.26.0"
|
|
126
|
-
"@harnessio/core-design-system": "0.0.1"
|
|
126
|
+
"@harnessio/yaml-editor": "0.26.0"
|
|
127
127
|
},
|
|
128
128
|
"peerDependencies": {
|
|
129
129
|
"react": "^17.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"textarea-utils-BABZsh7u.js","sources":["../src/utils/stringUtils.ts","../src/utils/typeUtils.tsx","../src/utils/mergeUtils.ts","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/toDate.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/constructFrom.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/constants.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/_lib/defaultOptions.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/compareAsc.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInCalendarMonths.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/_lib/getRoundingMethod.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInMilliseconds.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/endOfDay.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/endOfMonth.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/isLastDayOfMonth.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInMonths.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/differenceInSeconds.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/localize.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/match.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US.mjs","../../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/formatDistance.mjs","../src/utils/TimeUtils.ts","../src/utils/getComponentDisplayName.ts","../src/utils/after-frames.ts","../src/utils/get-shadow-active-element.ts","../src/utils/textarea-utils.ts"],"sourcesContent":["export const getInitials = (name: string, length = 2) => {\n // Split the name into an array of words, ignoring empty strings\n const words = name.split(' ').filter(Boolean)\n\n // Get the initials from the words\n const initials = words\n .map(word => word[0].toUpperCase()) // Get the first letter of each word\n .join('')\n\n // If length is provided, truncate the initials to the desired length\n return length ? initials.slice(0, length) : initials\n}\n\n/**\n * Converts comma-separated values to a structured object with metadata\n * @param inputValue The comma-separated string (e.g., \"a,b,c\" or \"a:1,a:2,a:3\")\n * @returns Object with data and metadata about key-value pairs\n */\nexport const csvToObject = (\n inputValue: string\n): { data: Record<string, string>; metadata: Record<string, boolean> } => {\n if (!inputValue?.trim()) return { data: {}, metadata: {} }\n\n // Split by comma, trim whitespace, and filter out empty strings\n const parts = inputValue\n .split(',')\n .map(part => part.trim())\n .filter(part => part.length > 0)\n\n // Early return if no valid parts\n if (parts.length === 0) return { data: {}, metadata: {} }\n\n // Key-based deduplication - last occurrence wins\n const data: Record<string, string> = {}\n const metadata: Record<string, boolean> = {}\n\n for (const part of parts) {\n if (part.includes(':')) {\n const colonIndex = part.indexOf(':')\n const key = part.substring(0, colonIndex)\n const value = part.substring(colonIndex + 1)\n if (key && key.trim()) {\n const trimmedKey = key.trim()\n data[trimmedKey] = value ? value.trim() : ''\n metadata[trimmedKey] = true // This was a key-value pair\n } else {\n // If key is empty (like \":a\"), treat as simple tag\n data[part] = part\n metadata[part] = false\n }\n } else {\n data[part] = part\n metadata[part] = false // This was a simple tag\n }\n }\n\n return { data, metadata }\n}\n\n/**\n * Pluralizes a word based on the count\n * @param count The count of the word\n * @param singular The singular form of the word\n * @param plural The plural form of the word\n * @param include Whether to include the count in the result\n * @returns The pluralized word\n */\nexport const easyPluralize = (count: number, singular: string, plural: string, include = false): string => {\n const word = count === 1 ? singular : plural\n\n return include ? `${count} ${word}` : word\n}\n","/**\n * Valid JavaScript type names that can be returned by the typeof operator\n */\ntype JavaScriptType = 'string' | 'number' | 'boolean' | 'undefined' | 'object' | 'function' | 'symbol' | 'bigint'\n\n/**\n * Maps JavaScript type names to their actual types\n */\ntype TypeMap = {\n string: string\n number: number\n boolean: boolean\n undefined: undefined\n object: object | null\n function: (...args: any[]) => any\n symbol: symbol\n bigint: bigint\n}\n\n/**\n * Creates a union type from an array of JavaScript type names\n */\ntype TypeFromArray<T extends JavaScriptType[]> = {\n [K in keyof T]: T[K] extends JavaScriptType ? TypeMap[T[K]] : never\n}[number]\n\n/**\n * Checks if a value is of one of the provided types and provides type assertion\n * @param value - The value to check\n * @param types - Array of JavaScript type names to check against\n * @returns True if the value matches any of the provided types, false otherwise\n * @example\n * const value: unknown = \"hello\";\n * if (isAnyTypeOf(value, ['string', 'number'])) {\n * TypeScript now knows that value is string | number\n * console.log(value.toString());\n * }\n */\nexport function isAnyTypeOf<T extends JavaScriptType[]>(value: unknown, types: [...T]): value is TypeFromArray<T> {\n const actualType = typeof value\n return types.includes(actualType as JavaScriptType)\n}\n\n/**\n * Splits an object into two parts: one with the specified keys and one with the remaining keys\n * @param obj - The object to split\n * @param keys - Array of keys to extract\n * @returns An object with two properties: `picked` containing the extracted properties and `rest` containing the remaining properties\n * @example\n * const { picked: { created_by, review_decision }, rest } = splitObjectProps(\n * Object.fromEntries(searchParams.entries()),\n * ['created_by', 'review_decision']\n * );\n */\nexport function splitObjectProps<T extends Record<string, any>, K extends keyof T>(\n obj: T,\n keys: K[]\n): { picked: Pick<T, K>; rest: Omit<T, K> } {\n const picked = {} as Pick<T, K>\n const rest = { ...obj }\n\n for (const key of keys) {\n if (key in obj) {\n picked[key] = obj[key]\n delete rest[key as string]\n }\n }\n\n return { picked, rest }\n}\n","import { ForwardedRef, MutableRefObject, RefCallback, useCallback } from 'react'\n\n/**\n * Helps to construct conditional objects like this: {a: b, ...(some ? c : {}), z: x}\n */\nexport const wrapConditionalObjectElement = <T>(element: T, isPassing: boolean) => {\n if (!element || !isPassing) {\n return {} as T\n }\n\n return element\n}\n\n/**\n * Helps to construct conditional arrays like this: [item1, condition && item2, item3].filter(item => !!item)\n */\nexport const wrapConditionalArrayElements = <T>(elements: T[], isPassing: boolean) => {\n if (!elements || !isPassing) {\n return []\n }\n\n return elements\n}\n\ntype PossibleRef<T> = MutableRefObject<T> | RefCallback<T> | ForwardedRef<T>\n\n/**\n * A React hook that merges multiple refs into a single ref callback.\n */\nexport function useMergeRefs<T>(refs: Array<PossibleRef<T> | null | undefined>): RefCallback<T> {\n return useCallback(\n (value: T) => {\n refs.forEach(ref => {\n if (!ref) return\n\n if (typeof ref === 'function') {\n ref(value)\n return\n }\n\n try {\n ;(ref as MutableRefObject<T>).current = value\n } catch (error) {\n console.error('Failed to set ref value:', error)\n }\n })\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [...refs]\n )\n}\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from 'date-fns'\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date(date: DateType): DateType {\n * return constructFrom(\n * date, // Use contrustor from the given date\n * date.getTime() // Use the date value to create a new date\n * )\n * }\n */\nexport function constructFrom(date, value) {\n if (date instanceof Date) {\n return new date.constructor(value);\n } else {\n return new Date(value);\n }\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { toDate } from \"../toDate.mjs\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const diff = _dateLeft.getTime() - _dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();\n const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();\n\n return yearDiff * 12 + monthDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","export function getRoundingMethod(method) {\n return (number) => {\n const round = method ? Math[method] : Math.trunc;\n const result = round(number);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n };\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(dateLeft, dateRight) {\n return +toDate(dateLeft) - +toDate(dateRight);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date) {\n const _date = toDate(date);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { endOfDay } from \"./endOfDay.mjs\";\nimport { endOfMonth } from \"./endOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date) {\n const _date = toDate(date);\n return +endOfDay(_date) === +endOfMonth(_date);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.mjs\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const sign = compareAsc(_dateLeft, _dateRight);\n const difference = Math.abs(\n differenceInCalendarMonths(_dateLeft, _dateRight),\n );\n let result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (_dateLeft.getMonth() === 1 && _dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n _dateLeft.setDate(30);\n }\n\n _dateLeft.setMonth(_dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n let isLastMonthNotFull = compareAsc(_dateLeft, _dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if (\n isLastDayOfMonth(toDate(dateLeft)) &&\n difference === 1 &&\n compareAsc(dateLeft, _dateRight) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.mjs\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.mjs\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(dateLeft, dateRight, options) {\n const diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { minutesInDay, minutesInMonth } from \"./constants.mjs\";\nimport { differenceInMonths } from \"./differenceInMonths.mjs\";\nimport { differenceInSeconds } from \"./differenceInSeconds.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date\n * @param baseDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport function formatDistance(date, baseDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(date, baseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n let dateLeft;\n let dateRight;\n if (comparison > 0) {\n dateLeft = toDate(baseDate);\n dateRight = toDate(date);\n } else {\n dateLeft = toDate(date);\n dateRight = toDate(baseDate);\n }\n\n const seconds = differenceInSeconds(dateRight, dateLeft);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(dateRight) -\n getTimezoneOffsetInMilliseconds(dateLeft)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n","import { formatDistance } from 'date-fns'\n\n/**\n * @param startTs\n * @param endTs\n * @returns duration in \"1h 2m 3s\" format\n */\nexport const getFormattedDuration = (startTs = 0, endTs = 0): string => {\n if (startTs >= endTs) return '0s'\n const totalSeconds = Math.floor((endTs - startTs) / 1000)\n const hours = Math.floor(totalSeconds / 3600)\n const minutes = Math.floor((totalSeconds % 3600) / 60)\n const seconds = totalSeconds % 60\n\n const parts = []\n\n if (hours > 0) {\n parts.push(`${hours}h`)\n }\n if (minutes > 0) {\n parts.push(`${minutes}m`)\n }\n if (seconds > 0 || parts.length === 0) {\n parts.push(`${seconds}s`)\n }\n\n return parts.join(' ')\n}\n\n/**\n * Formats duration in milliseconds or nanoseconds to human-readable duration format.\n * For 3723000 is formatted as \"1h 2m 3s\".\n * @param durationInMs\n * @param unit\n * @returns\n */\n\nexport const formatDuration = (duration: number, unit: 'ms' | 'ns' = 'ms'): string => {\n if (!duration) return '0s'\n\n let totalSeconds: number\n let remainingMs = 0\n\n if (unit === 'ms') {\n totalSeconds = Math.floor(duration / 1000)\n if (totalSeconds === 0) remainingMs = duration\n } else {\n totalSeconds = Math.floor(duration / 1e9)\n if (totalSeconds === 0) remainingMs = (duration % 1e9) / 1e6\n }\n\n if (totalSeconds === 0) {\n return remainingMs > 0 ? new Intl.NumberFormat().format(remainingMs) + 'ms' : '0s'\n }\n\n const hours = Math.floor(totalSeconds / 3600)\n const remainingMinutes = Math.floor((totalSeconds % 3600) / 60)\n const remainingSeconds = totalSeconds % 60\n\n const formatted = []\n if (hours > 0) formatted.push(new Intl.NumberFormat().format(hours) + 'h')\n if (remainingMinutes > 0) formatted.push(new Intl.NumberFormat().format(remainingMinutes) + 'm')\n if (remainingSeconds > 0) formatted.push(new Intl.NumberFormat().format(remainingSeconds) + 's')\n\n return formatted.join(' ') || '0s'\n}\n\n/**\n * Formats an epoch timestamp into a string in the format \"HH:mm:ss.SSS\".\n *\n * @param epoch - The epoch timestamp (milliseconds since January 1, 1970).\n * @returns A formatted string representing the time in \"HH:mm:ss.SSS\" format.\n */\nexport const formatTimestamp = (epoch: number): string => {\n return new Intl.DateTimeFormat('en-GB', {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n fractionalSecondDigits: 3,\n hour12: false\n }).format(new Date(epoch))\n}\n\n/**\n * Formats a Date to a 12-hour time string like \"7:15pm\".\n *\n * @param date - The Date object to format.\n * @returns A formatted string representing the time in \"h:mmam/pm\" format.\n */\nexport const formatTime = (date: Date): string => {\n return date\n .toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true\n })\n .toLowerCase()\n}\n\n// Constants\nexport const LOCALE = Intl.NumberFormat().resolvedOptions?.().locale || 'en-US'\n\n/**\n * Format a timestamp to a localized date string\n * @param timestamp - Unix timestamp in milliseconds or ISO date string\n * @param dateStyle - DateTimeFormat style: 'full' | 'long' | 'medium' | 'short'\n * @returns Formatted date string or empty string if timestamp is falsy\n * @example\n * formatDate(1642774800000) // Returns \"Jan 21, 2024\"\n * formatDate(\"2022-01-21\", \"full\") // Returns \"Friday, January 21, 2024\"\n */\nexport function formatDate(\n timestamp: number | string,\n dateStyle: Intl.DateTimeFormatOptions['dateStyle'] = 'medium'\n): string {\n if (!timestamp) return ''\n\n try {\n return new Intl.DateTimeFormat(LOCALE, { dateStyle }).format(new Date(timestamp))\n } catch (error) {\n console.error(`Failed to format date: ${error}`)\n return ''\n }\n}\n\n/**\n * Calculate human-readable time distance between two dates\n * @param date1 - First date in milliseconds\n * @param date2 - Second date in milliseconds (defaults to 0)\n * @param onlyHighestDenomination - If true, returns only the highest unit (e.g., \"2 days\" instead of \"2 days 3 hours\")\n * @returns Formatted distance string\n */\nexport const timeDistance = (date1 = 0, date2 = 0, onlyHighestDenomination = false): string => {\n if (!date1 && !date2) return '0 seconds'\n\n const fullDistance = formatDistance(date1, date2, {\n includeSeconds: true,\n addSuffix: false\n })\n\n if (onlyHighestDenomination) {\n // Take only the first part of the string (e.g., from \"2 days 3 hours\" we get \"2 days\")\n return fullDistance.split(' ').slice(0, 2).join(' ')\n }\n\n return fullDistance\n}\n\n/**\n * Format a number with current locale.\n * @param num number\n * @returns Formatted string.\n */\nexport function formatNumber(num: number | bigint): string {\n return new Intl.NumberFormat(LOCALE).format(num)\n}\n\n/**\n * This is the function that formats a timestamp to a relative time string.\n * ⭐️ It is used in TimeAgoCard component.\n *\n * @param timestamp\n * @param locale\n * @returns\n */\nexport const formatRelativeTime = (timestamp?: number | string | null, locale: string | string[] = LOCALE): string => {\n if (!timestamp) {\n return ''\n }\n try {\n const time = new Date(timestamp).getTime()\n\n if (isNaN(time) || !isFinite(time) || time === 0) {\n return ''\n }\n\n const now = Date.now()\n const diffSeconds = Math.floor((time - now) / 1000)\n\n if (!isFinite(diffSeconds)) {\n console.warn('Invalid timestamp:', time)\n return ''\n }\n\n const rtf = new Intl.RelativeTimeFormat(locale, {\n numeric: 'always',\n style: 'narrow'\n })\n\n const units: [Intl.RelativeTimeFormatUnit, number][] = [\n ['year', 3600 * 24 * 365],\n ['month', 3600 * 24 * 30],\n ['week', 3600 * 24 * 7],\n ['day', 3600 * 24],\n ['hour', 3600],\n ['minute', 60],\n ['second', 1]\n ]\n\n for (const [unit, seconds] of units) {\n if (Math.abs(diffSeconds) >= seconds || unit === 'second') {\n const value = Math.round(diffSeconds / seconds)\n return rtf.format(value, unit)\n }\n }\n\n return rtf.format(0, 'second')\n } catch (error) {\n console.warn('Intl API error:', error)\n // Fallback for any Intl API errors or locale issues\n return ''\n }\n}\n","import { isValidElement, ReactNode } from 'react'\n\nexport const getComponentDisplayName = (child: ReactNode): string | undefined => {\n if (isValidElement(child)) {\n const type = child.type\n\n if (typeof type !== 'string') {\n return (type as { displayName?: string }).displayName\n }\n }\n\n return undefined\n}\n","export const afterFrames = (cb: () => void, frames = 2) => {\n let cancelled = false\n const step = () => {\n requestAnimationFrame(() => {\n if (cancelled) return\n frames -= 1\n frames <= 0 ? cb() : step()\n })\n }\n step()\n return () => {\n cancelled = true\n }\n}\n","export const getShadowActiveElement = (rootEl: HTMLElement) => {\n const rootNode = rootEl.getRootNode()\n\n return {\n isShadowRoot: rootNode instanceof ShadowRoot,\n activeEl: rootNode instanceof ShadowRoot ? rootNode.activeElement : document.activeElement\n }\n}\n","/**\n * Textarea utilities for caret position tracking and word manipulation.\n * Based on https://github.com/component/textarea-caret-position\n */\n\n// CSS properties to copy to mirror div for accurate caret positioning\nconst MIRROR_PROPERTIES = [\n 'direction',\n 'boxSizing',\n 'width',\n 'height',\n 'overflowX',\n 'overflowY',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderStyle',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'fontStyle',\n 'fontVariant',\n 'fontWeight',\n 'fontStretch',\n 'fontSize',\n 'fontSizeAdjust',\n 'lineHeight',\n 'fontFamily',\n 'textAlign',\n 'textTransform',\n 'textIndent',\n 'textDecoration',\n 'letterSpacing',\n 'wordSpacing',\n 'tabSize',\n 'MozTabSize'\n] as const\n\nconst isFirefox = typeof window !== 'undefined' && 'mozInnerScreenX' in window\n\n/**\n * Gets the current selection/caret position in a textarea\n */\nexport function getCaretPosition(element: HTMLTextAreaElement) {\n return {\n caretStartIndex: element.selectionStart || 0,\n caretEndIndex: element.selectionEnd || 0\n }\n}\n\n/**\n * Gets the word at the current caret position\n */\nexport function getCurrentWord(element: HTMLTextAreaElement) {\n const text = element.value\n const { caretStartIndex } = getCaretPosition(element)\n\n let start = caretStartIndex\n while (start > 0 && text[start - 1].match(/\\S/)) {\n start--\n }\n\n let end = caretStartIndex\n while (end < text.length && text[end].match(/\\S/)) {\n end++\n }\n\n return text.substring(start, end)\n}\n\n/**\n * Replaces the word at the current caret position with a new value.\n * Uses execCommand for undo/redo support.\n */\nexport function replaceWord(element: HTMLTextAreaElement, value: string) {\n const text = element.value\n const caretPos = element.selectionStart\n\n const wordRegex = /[\\w@#]+/g\n let match\n let startIndex: number | undefined\n let endIndex: number | undefined\n\n while ((match = wordRegex.exec(text)) !== null) {\n startIndex = match.index\n endIndex = startIndex + match[0].length\n\n if (caretPos >= startIndex && caretPos <= endIndex) {\n break\n }\n }\n\n if (startIndex !== undefined && endIndex !== undefined) {\n const selectionStart = element.selectionStart\n const selectionEnd = element.selectionEnd\n\n element.setSelectionRange(startIndex, endIndex)\n document.execCommand('insertText', false, value)\n\n element.setSelectionRange(\n selectionStart - (endIndex - startIndex) + value.length,\n selectionEnd - (endIndex - startIndex) + value.length\n )\n }\n}\n\nexport interface CaretCoordinates {\n top: number\n left: number\n height: number\n}\n\n/**\n * Gets the pixel coordinates of the caret in a textarea.\n * Creates a mirror div to measure the exact position.\n */\nexport function getCaretCoordinates(element: HTMLTextAreaElement, position: number): CaretCoordinates {\n // Clean up any existing mirror div\n const existingDiv = document.querySelector('#input-textarea-caret-position-mirror-div')\n if (existingDiv) {\n existingDiv.parentNode?.removeChild(existingDiv)\n }\n\n const div = document.createElement('div')\n div.id = 'input-textarea-caret-position-mirror-div'\n document.body.appendChild(div)\n\n const style: CSSStyleDeclaration = div.style\n const computed = window.getComputedStyle(element)\n const isInput = element.nodeName === 'INPUT'\n\n style.whiteSpace = 'pre-wrap'\n if (!isInput) style.wordWrap = 'break-word'\n\n style.position = 'absolute'\n style.visibility = 'hidden'\n\n MIRROR_PROPERTIES.forEach(function (prop) {\n if (isInput && prop === 'lineHeight') {\n if (computed.boxSizing === 'border-box') {\n const height = parseInt(computed.height)\n const outerHeight =\n parseInt(computed.paddingTop) +\n parseInt(computed.paddingBottom) +\n parseInt(computed.borderTopWidth) +\n parseInt(computed.borderBottomWidth)\n const targetHeight = outerHeight + parseInt(computed.lineHeight)\n if (height > targetHeight) {\n style.lineHeight = height - outerHeight + 'px'\n } else if (height === targetHeight) {\n style.lineHeight = computed.lineHeight\n } else {\n style.lineHeight = '0px'\n }\n } else {\n style.lineHeight = computed.height\n }\n } else {\n // @ts-expect-error - dynamic property access\n style[prop] = computed[prop]\n }\n })\n\n if (isFirefox) {\n if (element.scrollHeight > parseInt(computed.height)) style.overflowY = 'scroll'\n } else {\n style.overflow = 'hidden'\n }\n\n div.textContent = element.value.substring(0, position)\n if (isInput) div.textContent = div.textContent.replace(/\\s/g, '\\u00a0')\n\n const span = document.createElement('span')\n span.textContent = element.value.substring(position) || ''\n div.appendChild(span)\n\n const coordinates = {\n top: span.offsetTop + parseInt(computed['borderTopWidth']),\n left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n height: parseInt(computed['lineHeight'])\n }\n\n document.body.removeChild(div)\n\n return coordinates\n}\n"],"names":["getInitials","name","length","initials","word","csvToObject","inputValue","parts","part","data","metadata","colonIndex","key","value","trimmedKey","easyPluralize","count","singular","plural","include","isAnyTypeOf","types","actualType","splitObjectProps","obj","keys","picked","rest","wrapConditionalObjectElement","element","isPassing","wrapConditionalArrayElements","elements","useMergeRefs","refs","useCallback","ref","error","toDate","argument","argStr","constructFrom","date","millisecondsInWeek","millisecondsInDay","millisecondsInMinute","millisecondsInHour","millisecondsInSecond","minutesInMonth","minutesInDay","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","_date","utcDate","compareAsc","dateLeft","dateRight","_dateLeft","_dateRight","diff","differenceInCalendarMonths","yearDiff","monthDiff","getRoundingMethod","method","number","result","differenceInMilliseconds","endOfDay","endOfMonth","month","isLastDayOfMonth","differenceInMonths","sign","difference","isLastMonthNotFull","differenceInSeconds","options","formatDistanceLocale","formatDistance","token","tokenValue","buildFormatLongFn","args","width","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","_baseDate","_options","buildLocalizeFn","context","valuesArray","defaultWidth","index","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","quarter","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","findIndex","pattern","findKey","object","predicate","array","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","enUS","baseDate","locale","defaultLocale","minutesInAlmostTwoDays","comparison","localizeOptions","seconds","offsetInSeconds","minutes","months","hours","days","nearestMonth","monthsSinceStartOfYear","years","getFormattedDuration","startTs","endTs","totalSeconds","formatDuration","duration","unit","remainingMs","remainingMinutes","remainingSeconds","formatted","formatTimestamp","epoch","formatTime","LOCALE","_b","_a","formatDate","timestamp","dateStyle","timeDistance","date1","date2","onlyHighestDenomination","fullDistance","formatNumber","num","formatRelativeTime","time","now","diffSeconds","rtf","units","getComponentDisplayName","child","isValidElement","type","afterFrames","cb","frames","cancelled","step","getShadowActiveElement","rootEl","rootNode","MIRROR_PROPERTIES","isFirefox","getCaretPosition","getCurrentWord","text","caretStartIndex","start","end","replaceWord","caretPos","wordRegex","startIndex","endIndex","selectionStart","selectionEnd","getCaretCoordinates","position","existingDiv","div","style","computed","isInput","prop","height","outerHeight","targetHeight","span","coordinates"],"mappings":";AAAO,MAAMA,KAAc,CAACC,GAAcC,IAAS,MAAM;AAKjD,QAAAC,IAHQF,EAAK,MAAM,GAAG,EAAE,OAAO,OAAO,EAIzC,IAAI,CAAQG,MAAAA,EAAK,CAAC,EAAE,YAAY,CAAC,EACjC,KAAK,EAAE;AAGV,SAAOF,IAASC,EAAS,MAAM,GAAGD,CAAM,IAAIC;AAC9C,GAOaE,KAAc,CACzBC,MACwE;AACpE,MAAA,EAACA,KAAA,QAAAA,EAAY,QAAQ,QAAO,EAAE,MAAM,CAAC,GAAG,UAAU,GAAG;AAGzD,QAAMC,IAAQD,EACX,MAAM,GAAG,EACT,IAAI,CAAAE,MAAQA,EAAK,KAAA,CAAM,EACvB,OAAO,CAAQA,MAAAA,EAAK,SAAS,CAAC;AAG7B,MAAAD,EAAM,WA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