@adyen/bento-vue2 1.74.0 → 1.76.0
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/@types/index.d.ts +1693 -616
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/calendar.Fm_dfQC5.js +1871 -0
- package/dist/chunks/calendar.Fm_dfQC5.js.map +1 -0
- package/dist/chunks/{checkbox-group.DETXTJqI.js → checkbox-group.CtNVRcmP.js} +2 -2
- package/dist/chunks/{checkbox-group.DETXTJqI.js.map → checkbox-group.CtNVRcmP.js.map} +1 -1
- package/dist/chunks/{checkbox.BPtHAAEa.js → checkbox.nyUc0gLb.js} +18 -18
- package/dist/chunks/{checkbox.BPtHAAEa.js.map → checkbox.nyUc0gLb.js.map} +1 -1
- package/dist/chunks/{code-snippet.VtrsOTEC.js → code-snippet.DFf3KMSi.js} +2 -2
- package/dist/chunks/{code-snippet.VtrsOTEC.js.map → code-snippet.DFf3KMSi.js.map} +1 -1
- package/dist/chunks/constructNow.CHWWeLPc.js +8 -0
- package/dist/chunks/constructNow.CHWWeLPc.js.map +1 -0
- package/dist/chunks/{currency.DDB4G_A8.js → currency.AvvbekWO.js} +15 -14
- package/dist/chunks/{currency.DDB4G_A8.js.map → currency.AvvbekWO.js.map} +1 -1
- package/dist/chunks/{dashboard-section.jIpBvP6X.js → dashboard-section.D1l7wDX3.js} +2 -2
- package/dist/chunks/{dashboard-section.jIpBvP6X.js.map → dashboard-section.D1l7wDX3.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CozTcWQ0.js → data-grid-template.DGUDqzjj.js} +2 -2
- package/dist/chunks/{data-grid-template.CozTcWQ0.js.map → data-grid-template.DGUDqzjj.js.map} +1 -1
- package/dist/chunks/{data-grid.DN9xml8y.js → data-grid.B5aCkT0o.js} +1257 -1223
- package/dist/chunks/data-grid.B5aCkT0o.js.map +1 -0
- package/dist/chunks/{date-picker.DoYYzWcA.js → date-picker.DImAYvoM.js} +14 -14
- package/dist/chunks/date-picker.DImAYvoM.js.map +1 -0
- package/dist/chunks/date-range-picker.DgZMERzx.js +914 -0
- package/dist/chunks/date-range-picker.DgZMERzx.js.map +1 -0
- package/dist/chunks/{get-date-locale.CAyOIbcp.js → differenceInMonths.C8FyCrav.js} +580 -364
- package/dist/chunks/differenceInMonths.C8FyCrav.js.map +1 -0
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js +260 -0
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js.map +1 -0
- package/dist/chunks/{dropdown.BOvtYKXS.js → dropdown.RxD2TqnP.js} +14 -14
- package/dist/chunks/{dropdown.BOvtYKXS.js.map → dropdown.RxD2TqnP.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{filter-bar.DzHJi42d.js → filter-bar.C0S87JZD.js} +511 -486
- package/dist/chunks/filter-bar.C0S87JZD.js.map +1 -0
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js +10 -0
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -0
- package/dist/chunks/{index.BrH1t1iu.js → getTimezoneOffsetInMilliseconds.BW7U6PxE.js} +254 -177
- package/dist/chunks/getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map +1 -0
- package/dist/chunks/header-meta.D-6dL1Vg.js +170 -0
- package/dist/chunks/header-meta.D-6dL1Vg.js.map +1 -0
- package/dist/chunks/{header-with-views.t5Fr63SD.js → header-with-views.j16q5wEc.js} +4 -4
- package/dist/chunks/{header-with-views.t5Fr63SD.js.map → header-with-views.j16q5wEc.js.map} +1 -1
- package/dist/chunks/{header.DwSyDQ68.js → header.DoWKsA15.js} +2 -2
- package/dist/chunks/{header.DwSyDQ68.js.map → header.DoWKsA15.js.map} +1 -1
- package/dist/chunks/{input-field-password.Dm3HYonF.js → input-field-password.CSfXqEbT.js} +47 -38
- package/dist/chunks/input-field-password.CSfXqEbT.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.bZauIuHJ.js → input-field-phone-number.oa4hXQdK.js} +3 -3
- package/dist/chunks/{input-field-phone-number.bZauIuHJ.js.map → input-field-phone-number.oa4hXQdK.js.map} +1 -1
- package/dist/chunks/input-field.DdQu3b1-.js +161 -0
- package/dist/chunks/input-field.DdQu3b1-.js.map +1 -0
- package/dist/chunks/{pagination.CKD9FDrA.js → pagination.C0YW_A_o.js} +2 -2
- package/dist/chunks/{pagination.CKD9FDrA.js.map → pagination.C0YW_A_o.js.map} +1 -1
- package/dist/chunks/radio-group.AcYMFudv.js.map +1 -1
- package/dist/chunks/{rich-text-editor.BZgQ578S.js → rich-text-editor.eYW8X_YP.js} +354 -352
- package/dist/chunks/{rich-text-editor.BZgQ578S.js.map → rich-text-editor.eYW8X_YP.js.map} +1 -1
- package/dist/chunks/{search-bar.c-w7Uky2.js → search-bar.DJVfPz-f.js} +3 -3
- package/dist/chunks/{search-bar.c-w7Uky2.js.map → search-bar.DJVfPz-f.js.map} +1 -1
- package/dist/chunks/{secondary-nav.D69COlqF.js → secondary-nav.BFiTQaag.js} +2 -2
- package/dist/chunks/{secondary-nav.D69COlqF.js.map → secondary-nav.BFiTQaag.js.map} +1 -1
- package/dist/chunks/{selection-card-group.8UIir78G.js → selection-card-group.D4rcUyvV.js} +58 -120
- package/dist/chunks/{selection-card-group.8UIir78G.js.map → selection-card-group.D4rcUyvV.js.map} +1 -1
- package/dist/chunks/textarea.CIQuLWQ8.js.map +1 -1
- package/dist/chunks/{timeline-item.VSw9vKdO.js → timeline-item.CZBuknZ_.js} +156 -168
- package/dist/chunks/timeline-item.CZBuknZ_.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.IsfhJHxQ.js → use-cached-selected-values.BZd3CTeP.js} +334 -314
- package/dist/chunks/use-cached-selected-values.BZd3CTeP.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +221 -220
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +3 -3
- package/dist/pagination.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/styles/bento-dark.css +7 -5
- package/dist/styles/bento-light.css +7 -5
- package/dist/styles/bento.css +7 -5
- package/dist/styles/legacy.css +7 -5
- package/dist/styles/styleguide.css +7 -5
- package/dist/timeline.js +1 -1
- package/dist/web-types.json +692 -1390
- package/package.json +12 -27
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js +0 -7
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +0 -1
- package/dist/chunks/calendar.EfqJlztU.js +0 -2093
- package/dist/chunks/calendar.EfqJlztU.js.map +0 -1
- package/dist/chunks/data-grid.DN9xml8y.js.map +0 -1
- package/dist/chunks/date-picker.DoYYzWcA.js.map +0 -1
- package/dist/chunks/date-range-picker.C_pJ8yH5.js +0 -917
- package/dist/chunks/date-range-picker.C_pJ8yH5.js.map +0 -1
- package/dist/chunks/dropdown-tag.DBnurtCQ.js +0 -245
- package/dist/chunks/dropdown-tag.DBnurtCQ.js.map +0 -1
- package/dist/chunks/filter-bar.DzHJi42d.js.map +0 -1
- package/dist/chunks/get-date-locale.CAyOIbcp.js.map +0 -1
- package/dist/chunks/header-meta.uiIO1wHP.js +0 -185
- package/dist/chunks/header-meta.uiIO1wHP.js.map +0 -1
- package/dist/chunks/index.BrH1t1iu.js.map +0 -1
- package/dist/chunks/index.BxBB1rsx.js +0 -15
- package/dist/chunks/index.BxBB1rsx.js.map +0 -1
- package/dist/chunks/input-field-password.Dm3HYonF.js.map +0 -1
- package/dist/chunks/input-field.D52XYEzU.js +0 -157
- package/dist/chunks/input-field.D52XYEzU.js.map +0 -1
- package/dist/chunks/timeline-item.VSw9vKdO.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.IsfhJHxQ.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTimezoneOffsetInMilliseconds.BW7U6PxE.js","sources":["../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/compareAsc.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js"],"sourcesContent":["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","/**\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","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 : // [TODO] -- I challenge 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 ? // [TODO] -- I challenge 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 // [TODO] I challenge 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","/**\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 occurs every 4 years, except for years that are divisible by 100 and not divisible 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\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\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 * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\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 \"./constructFrom/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 constructor 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 (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { constructFrom } from \"./constructFrom.js\";\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 * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\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, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\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","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","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\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","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\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 { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\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","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\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 { toDate } from \"./toDate.js\";\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 * @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 diff = +toDate(dateLeft) - +toDate(dateRight);\n\n if (diff < 0) return -1;\n else if (diff > 0) return 1;\n\n // Return 0 if diff is 0; return NaN if diff is NaN\n return diff;\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { toDate } from \"../toDate.js\";\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"],"names":["buildFormatLongFn","args","options","width","buildLocalizeFn","value","context","valuesArray","defaultWidth","index","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","key","findIndex","pattern","findKey","rest","object","predicate","array","buildMatchPatternFn","parseResult","millisecondsInWeek","millisecondsInDay","millisecondsInMinute","minutesInYear","minutesInMonth","minutesInDay","constructFromSymbol","constructFrom","date","normalizeDates","dates","normalize","defaultOptions","getDefaultOptions","toDate","argument","formatDistanceLocale","formatDistance","token","count","result","tokenValue","formatRelativeLocale","formatRelative","_date","_baseDate","_options","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","number","rem100","localize","quarter","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","dateFormats","timeFormats","dateTimeFormats","formatLong","enUS","compareAsc","dateLeft","dateRight","diff","getTimezoneOffsetInMilliseconds","utcDate"],"mappings":"AAAO,SAASA,EAAkBC,GAAM;AACtC,SAAO,CAACC,IAAU,OAAO;AAEvB,UAAMC,IAAQD,EAAQ,QAAQ,OAAOA,EAAQ,KAAK,IAAID,EAAK;AAE3D,WADeA,EAAK,QAAQE,CAAK,KAAKF,EAAK,QAAQA,EAAK,YAAY;AAAA,EAErE;AACH;ACgCO,SAASG,EAAgBH,GAAM;AACpC,SAAO,CAACI,GAAOH,MAAY;AACzB,UAAMI,IAAUJ,KAAA,QAAAA,EAAS,UAAU,OAAOA,EAAQ,OAAO,IAAI;AAE7D,QAAIK;AACJ,QAAID,MAAY,gBAAgBL,EAAK,kBAAkB;AACrD,YAAMO,IAAeP,EAAK,0BAA0BA,EAAK,cACnDE,IAAQD,KAAA,QAAAA,EAAS,QAAQ,OAAOA,EAAQ,KAAK,IAAIM;AAEvD,MAAAD,IACEN,EAAK,iBAAiBE,CAAK,KAAKF,EAAK,iBAAiBO,CAAY;AAAA,IAC1E,OAAW;AACL,YAAMA,IAAeP,EAAK,cACpBE,IAAQD,KAAA,QAAAA,EAAS,QAAQ,OAAOA,EAAQ,KAAK,IAAID,EAAK;AAE5D,MAAAM,IAAcN,EAAK,OAAOE,CAAK,KAAKF,EAAK,OAAOO,CAAY;AAAA,IAClE;AACI,UAAMC,IAAQR,EAAK,mBAAmBA,EAAK,iBAAiBI,CAAK,IAAIA;AAGrE,WAAOE,EAAYE,CAAK;AAAA,EACzB;AACH;AC7DO,SAASC,EAAaT,GAAM;AACjC,SAAO,CAACU,GAAQT,IAAU,OAAO;AAC/B,UAAMC,IAAQD,EAAQ,OAEhBU,IACHT,KAASF,EAAK,cAAcE,CAAK,KAClCF,EAAK,cAAcA,EAAK,iBAAiB,GACrCY,IAAcF,EAAO,MAAMC,CAAY;AAE7C,QAAI,CAACC;AACH,aAAO;AAET,UAAMC,IAAgBD,EAAY,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OAAO;AACT,GAEMC,IAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAEaC,IAAa;AAAA,EACxB,MAAMjF,EAAkB;AAAA,IACtB,SAAS8E;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AAAA,EAED,MAAM9E,EAAkB;AAAA,IACtB,SAAS+E;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AAAA,EAED,UAAU/E,EAAkB;AAAA,IAC1B,SAASgF;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AACH,GCxBaE,KAAO;AAAA,EAClB,MAAM;AAAA,EACN,gBAAgBvC;AAAA,EAChB,YAAYsC;AAAA,EACZ,gBAAgBhC;AAAA,EAChB,UAAUc;AAAA,EACV,OAAOc;AAAA,EACP,SAAS;AAAA,IACP,cAAc;AAAA,IACd,uBAAuB;AAAA,EACxB;AACH;ACSO,SAASM,GAAWC,GAAUC,GAAW;AAC9C,QAAMC,IAAO,CAAC9C,EAAO4C,CAAQ,IAAI,CAAC5C,EAAO6C,CAAS;AAElD,SAAIC,IAAO,IAAU,KACZA,IAAO,IAAU,IAGnBA;AACT;AC7BO,SAASC,GAAgCrD,GAAM;AACpD,QAAMgB,IAAQV,EAAON,CAAI,GACnBsD,IAAU,IAAI;AAAA,IAClB,KAAK;AAAA,MACHtC,EAAM,YAAa;AAAA,MACnBA,EAAM,SAAU;AAAA,MAChBA,EAAM,QAAS;AAAA,MACfA,EAAM,SAAU;AAAA,MAChBA,EAAM,WAAY;AAAA,MAClBA,EAAM,WAAY;AAAA,MAClBA,EAAM,gBAAiB;AAAA,IACxB;AAAA,EACF;AACD,SAAAsC,EAAQ,eAAetC,EAAM,aAAa,GACnC,CAAChB,IAAO,CAACsD;AAClB;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { defineComponent as D, ref as p, computed as b, useSlots as P } from "vue";
|
|
2
|
+
import { h as T, a as x } from "./button-actions.B81vY51z.js";
|
|
3
|
+
import { B } from "./popover.types.DK6opPkz.js";
|
|
4
|
+
import { B as M } from "./typography.hlOAxsEn.js";
|
|
5
|
+
import { g as R } from "./generate-uid.NJ8tVoha.js";
|
|
6
|
+
import { u as S } from "./index.B6WW_F-J.js";
|
|
7
|
+
import { I as E } from "./info.CcMZ4aGg.js";
|
|
8
|
+
import { n as y } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
9
|
+
import { u as C } from "./use-has-slot.C9lQZ6nz.js";
|
|
10
|
+
import { c as L } from "./constructNow.CHWWeLPc.js";
|
|
11
|
+
import { t as I, a as U, n as X, g, b as w, e as F, m as O, d as _ } from "./getTimezoneOffsetInMilliseconds.BW7U6PxE.js";
|
|
12
|
+
import { d as N, g as Y } from "./differenceInMonths.C8FyCrav.js";
|
|
13
|
+
import { g as A } from "./getRoundingMethod.C3eaeGLR.js";
|
|
14
|
+
import { R as $ } from "./refresh.arF7jP-l.js";
|
|
15
|
+
import "../assets/header-meta.css";
|
|
16
|
+
const H = {
|
|
17
|
+
"en-US": {
|
|
18
|
+
moreInformation: "More information"
|
|
19
|
+
},
|
|
20
|
+
"ja-JP": {
|
|
21
|
+
moreInformation: "詳細情報"
|
|
22
|
+
},
|
|
23
|
+
"pt-BR": {
|
|
24
|
+
moreInformation: "Mais informações"
|
|
25
|
+
}
|
|
26
|
+
}, z = {
|
|
27
|
+
i18n: { messages: H }
|
|
28
|
+
}, j = /* @__PURE__ */ D({
|
|
29
|
+
...z,
|
|
30
|
+
__name: "info-icon-with-popover",
|
|
31
|
+
props: {
|
|
32
|
+
/**
|
|
33
|
+
* Text showed in the popover on hover
|
|
34
|
+
*/
|
|
35
|
+
popoverText: { type: String, default: null },
|
|
36
|
+
/**
|
|
37
|
+
* Position the popover should take if space is available
|
|
38
|
+
*/
|
|
39
|
+
popoverPosition: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "bottom-start",
|
|
42
|
+
validator: (r) => Object.values(B).includes(r)
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
setup(r) {
|
|
46
|
+
const { t } = S(), o = p(), s = p(null), d = R("bento-info-icon-with-popover"), i = p(), n = p(), c = () => {
|
|
47
|
+
i.value = !0, n.value && clearTimeout(n.value);
|
|
48
|
+
}, l = () => {
|
|
49
|
+
const a = setTimeout(() => {
|
|
50
|
+
i.value = !1;
|
|
51
|
+
}, 200);
|
|
52
|
+
n.value = a;
|
|
53
|
+
};
|
|
54
|
+
return { __sfc: !0, CLOSING_POPOVER_DELAY_MS: 200, t, infoIconRef: o, targetElement: s, popoverId: d, isOpen: i, closingTimeOutId: n, openPopover: c, closePopover: l, infoIconOnFocus: () => {
|
|
55
|
+
c();
|
|
56
|
+
}, infoIconOnFocusOut: (a) => {
|
|
57
|
+
(!o.value || !((a == null ? void 0 : a.relatedTarget) instanceof Element) || !o.value.contains(a.relatedTarget)) && l();
|
|
58
|
+
}, BentoPopover: T, BentoTypography: M, InfoIcon: E };
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var G = function() {
|
|
62
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
63
|
+
return t("div", { ref: "infoIconRef", staticClass: "b-info-icon-with-popover", attrs: { tabindex: "0", "data-testid": "info-icon-with-popover" }, on: { mouseenter: o.openPopover, mouseleave: o.closePopover, focus: o.infoIconOnFocus, focusout: o.infoIconOnFocusOut } }, [t(o.InfoIcon, { ref: "targetElement", staticClass: "b-info-icon-with-popover__svg", attrs: { "aria-expanded": o.isOpen, "aria-describedby": o.popoverId, "svg-title": o.t("moreInformation") } }), o.targetElement ? t(o.BentoPopover, { attrs: { open: o.isOpen, "target-element": o.targetElement, position: e.popoverPosition, role: "tooltip", "fit-content": "", "disable-focus-trap": "" } }, [t(o.BentoTypography, [e._t("default", function() {
|
|
64
|
+
return [e.popoverText ? t("div", [e._v(" " + e._s(e.popoverText) + " ")]) : e._e()];
|
|
65
|
+
})], 2)], 1) : e._e()], 1);
|
|
66
|
+
}, V = [], k = /* @__PURE__ */ y(
|
|
67
|
+
j,
|
|
68
|
+
G,
|
|
69
|
+
V,
|
|
70
|
+
!1,
|
|
71
|
+
null,
|
|
72
|
+
"d4854f91"
|
|
73
|
+
);
|
|
74
|
+
const Ie = k.exports;
|
|
75
|
+
function J(r, e) {
|
|
76
|
+
return +I(r) - +I(e);
|
|
77
|
+
}
|
|
78
|
+
function W(r, e, t) {
|
|
79
|
+
const o = J(r, e) / 1e3;
|
|
80
|
+
return A(t == null ? void 0 : t.roundingMethod)(o);
|
|
81
|
+
}
|
|
82
|
+
function q(r, e, t) {
|
|
83
|
+
const o = w(), s = (t == null ? void 0 : t.locale) ?? o.locale ?? F, d = 2520, i = U(r, e);
|
|
84
|
+
if (isNaN(i)) throw new RangeError("Invalid time value");
|
|
85
|
+
const n = Object.assign({}, t, {
|
|
86
|
+
addSuffix: t == null ? void 0 : t.addSuffix,
|
|
87
|
+
comparison: i
|
|
88
|
+
}), [c, l] = X(
|
|
89
|
+
t == null ? void 0 : t.in,
|
|
90
|
+
...i > 0 ? [e, r] : [r, e]
|
|
91
|
+
), u = W(l, c), h = (g(l) - g(c)) / 1e3, a = Math.round((u - h) / 60);
|
|
92
|
+
let m;
|
|
93
|
+
if (a < 2)
|
|
94
|
+
return t != null && t.includeSeconds ? u < 5 ? s.formatDistance("lessThanXSeconds", 5, n) : u < 10 ? s.formatDistance("lessThanXSeconds", 10, n) : u < 20 ? s.formatDistance("lessThanXSeconds", 20, n) : u < 40 ? s.formatDistance("halfAMinute", 0, n) : u < 60 ? s.formatDistance("lessThanXMinutes", 1, n) : s.formatDistance("xMinutes", 1, n) : a === 0 ? s.formatDistance("lessThanXMinutes", 1, n) : s.formatDistance("xMinutes", a, n);
|
|
95
|
+
if (a < 45)
|
|
96
|
+
return s.formatDistance("xMinutes", a, n);
|
|
97
|
+
if (a < 90)
|
|
98
|
+
return s.formatDistance("aboutXHours", 1, n);
|
|
99
|
+
if (a < O) {
|
|
100
|
+
const f = Math.round(a / 60);
|
|
101
|
+
return s.formatDistance("aboutXHours", f, n);
|
|
102
|
+
} else {
|
|
103
|
+
if (a < d)
|
|
104
|
+
return s.formatDistance("xDays", 1, n);
|
|
105
|
+
if (a < _) {
|
|
106
|
+
const f = Math.round(a / O);
|
|
107
|
+
return s.formatDistance("xDays", f, n);
|
|
108
|
+
} else if (a < _ * 2)
|
|
109
|
+
return m = Math.round(a / _), s.formatDistance("aboutXMonths", m, n);
|
|
110
|
+
}
|
|
111
|
+
if (m = N(l, c), m < 12) {
|
|
112
|
+
const f = Math.round(a / _);
|
|
113
|
+
return s.formatDistance("xMonths", f, n);
|
|
114
|
+
} else {
|
|
115
|
+
const f = m % 12, v = Math.trunc(m / 12);
|
|
116
|
+
return f < 3 ? s.formatDistance("aboutXYears", v, n) : f < 9 ? s.formatDistance("overXYears", v, n) : s.formatDistance("almostXYears", v + 1, n);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function K(r, e) {
|
|
120
|
+
return q(r, L(r), e);
|
|
121
|
+
}
|
|
122
|
+
const Q = {
|
|
123
|
+
"en-US": {
|
|
124
|
+
lastUpdated: "Last updated: {date} ago"
|
|
125
|
+
}
|
|
126
|
+
}, Z = {
|
|
127
|
+
i18n: { messages: Q }
|
|
128
|
+
}, ee = /* @__PURE__ */ D({
|
|
129
|
+
...Z,
|
|
130
|
+
__name: "header-meta",
|
|
131
|
+
props: {
|
|
132
|
+
description: { default: null },
|
|
133
|
+
lastUpdated: { default: null },
|
|
134
|
+
reloadButton: { default: null }
|
|
135
|
+
},
|
|
136
|
+
setup(r) {
|
|
137
|
+
const e = r, { t, locale: o } = S(), s = Y(), d = b(
|
|
138
|
+
() => {
|
|
139
|
+
var c;
|
|
140
|
+
return e.lastUpdated ? t("lastUpdated", {
|
|
141
|
+
date: K(e.lastUpdated, {
|
|
142
|
+
locale: s[(c = o.value) == null ? void 0 : c.substring(0, 2)] || s.enUS
|
|
143
|
+
})
|
|
144
|
+
}) : null;
|
|
145
|
+
}
|
|
146
|
+
), i = P(), n = C(i);
|
|
147
|
+
return { __sfc: !0, t, locale: o, locales: s, timestamp: d, props: e, slots: i, hasSlot: n, BentoTypography: M, BentoLoadingButton: x, ReloadIcon: $ };
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
var te = function() {
|
|
151
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
152
|
+
return t("div", { staticClass: "b-header-meta__container" }, [e.description || o.hasSlot("description") ? t(o.BentoTypography, { staticClass: "b-header-meta__description", attrs: { el: "div" } }, [e._t("description", function() {
|
|
153
|
+
return [e._v(e._s(e.description))];
|
|
154
|
+
})], 2) : e._e(), e.lastUpdated ? t("div", { staticClass: "b-header-meta__timestamp-section" }, [t(o.BentoTypography, { staticClass: "b-header-meta__timestamp", attrs: { el: "div" } }, [e._v(" " + e._s(o.timestamp) + " ")]), e.reloadButton ? t(o.BentoLoadingButton, { attrs: { variant: "tertiary", state: e.reloadButton.state }, on: { click: e.reloadButton.event }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
|
|
155
|
+
return [t(o.ReloadIcon, { attrs: { "aria-hidden": "true" } })];
|
|
156
|
+
}, proxy: !0 }], null, !1, 750518660) }, [e._v(e._s(e.reloadButton.title))]) : e._e()], 1) : e._e()], 1);
|
|
157
|
+
}, oe = [], ne = /* @__PURE__ */ y(
|
|
158
|
+
ee,
|
|
159
|
+
te,
|
|
160
|
+
oe,
|
|
161
|
+
!1,
|
|
162
|
+
null,
|
|
163
|
+
"084af0e2"
|
|
164
|
+
);
|
|
165
|
+
const ge = ne.exports;
|
|
166
|
+
export {
|
|
167
|
+
ge as H,
|
|
168
|
+
Ie as I
|
|
169
|
+
};
|
|
170
|
+
//# sourceMappingURL=header-meta.D-6dL1Vg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header-meta.D-6dL1Vg.js","sources":["../../src/components/internal/info-icon-with-popover/info-icon-with-popover.vue","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInMilliseconds.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInSeconds.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/formatDistance.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/formatDistanceToNow.js","../../src/components/internal/header-meta/header-meta.vue"],"sourcesContent":["<template>\n <div\n ref=\"infoIconRef\"\n class=\"b-info-icon-with-popover\"\n tabindex=\"0\"\n data-testid=\"info-icon-with-popover\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <info-icon\n ref=\"targetElement\"\n class=\"b-info-icon-with-popover__svg\"\n :aria-expanded=\"isOpen\"\n :aria-describedby=\"popoverId\"\n :svg-title=\"t('moreInformation')\"\n />\n <bento-popover\n v-if=\"targetElement\"\n :open=\"isOpen\"\n :target-element=\"targetElement\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <bento-typography>\n <slot>\n <div v-if=\"popoverText\">\n {{ popoverText }}\n </div>\n </slot>\n </bento-typography>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n import { type PropType, ref } from 'vue';\n import type { BentoPopoverProps } from '../../popover/popover.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n defineProps({\n /**\n * Text showed in the popover on hover\n */\n popoverText: { type: String, default: null },\n\n /**\n * Position the popover should take if space is available\n */\n popoverPosition: {\n type: String as PropType<BentoPopoverProps['position']>,\n default: 'bottom-start',\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const infoIconRef = ref<HTMLDivElement>();\n const targetElement = ref(null);\n const popoverId = generateUid('bento-info-icon-with-popover');\n const isOpen = ref();\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const infoIconOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const infoIconOnFocusOut = (e: FocusEvent) => {\n if (\n !infoIconRef.value ||\n !(e?.relatedTarget instanceof Element) ||\n !infoIconRef.value.contains(e.relatedTarget)\n ) {\n closePopover();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to be used whenever an info icon needs to be rendered with a popover instead of a tooltip.\n *\n * @example\n * import { BentoInfoIconWithPopover } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInfoIconWithPopover },\n * template: `\n * <info-icon-with-popover popover-text=\"Content can be passed as a string like\" :popover-position=\"position\">\n * Content can also be rendered as a slot\n * </info-icon-with-popover>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./info-icon-with-popover.scss\" />\n","import { toDate } from \"./toDate.js\";\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 * @param laterDate - The later date\n * @param earlierDate - 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(laterDate, earlierDate) {\n return +toDate(laterDate) - +toDate(earlierDate);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\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 * @param laterDate - The later date\n * @param earlierDate - 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(laterDate, earlierDate, options) {\n const diff = differenceInMilliseconds(laterDate, earlierDate) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { minutesInDay, minutesInMonth } from \"./constants.js\";\nimport { differenceInMonths } from \"./differenceInMonths.js\";\nimport { differenceInSeconds } from \"./differenceInSeconds.js\";\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 * @param laterDate - The date\n * @param earlierDate - 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 */\nexport function formatDistance(laterDate, earlierDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(laterDate, earlierDate);\n\n if (isNaN(comparison)) throw new RangeError(\"Invalid time value\");\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n ...(comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]),\n );\n\n const seconds = differenceInSeconds(earlierDate_, laterDate_);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(earlierDate_) -\n getTimezoneOffsetInMilliseconds(laterDate_)) /\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(earlierDate_, laterDate_);\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 { constructNow } from \"./constructNow.js\";\n\nimport { formatDistance } from \"./formatDistance.js\";\n\n/**\n * The {@link formatDistanceToNow} function options.\n */\n\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | 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 to now | 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 * @param date - The given date\n * @param options - The object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistanceToNow(date, options) {\n return formatDistance(date, constructNow(date), options);\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceToNow;\n","<template>\n <div class=\"b-header-meta__container\">\n <bento-typography v-if=\"description || hasSlot('description')\" class=\"b-header-meta__description\" el=\"div\">\n <slot name=\"description\">{{ description }}</slot>\n </bento-typography>\n <div v-if=\"lastUpdated\" class=\"b-header-meta__timestamp-section\">\n <bento-typography class=\"b-header-meta__timestamp\" el=\"div\">\n {{ timestamp }}\n </bento-typography>\n <bento-loading-button\n v-if=\"reloadButton\"\n variant=\"tertiary\"\n :state=\"reloadButton.state\"\n @click=\"reloadButton.event\"\n ><template #iconLeft><reload-icon aria-hidden=\"true\" /></template\n >{{ reloadButton.title }}</bento-loading-button\n >\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { useHasSlot } from '@/composables';\n import { formatDistanceToNow } from 'date-fns/formatDistanceToNow';\n import { BentoTypography } from '@/components/typography';\n import { BentoLoadingButton } from '@/components/button';\n import ReloadIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import type { HeaderMetaProps } from './header-meta.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t, locale } = useI18n<{ message: MessageSchema }>({ messages });\n\n // TODO to replace with dynamic import\n const locales = getDateLocale();\n\n const timestamp = computed(() =>\n props.lastUpdated\n ? t('lastUpdated', {\n date: formatDistanceToNow(props.lastUpdated, {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n }),\n })\n : null\n );\n\n const props = defineProps({\n description: { default: null },\n lastUpdated: { default: null },\n reloadButton: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * An internal component used by the BentoHeader and BentoHeaderWithViews components.\n *\n * @example\n * import { HeaderMeta } from '@/internal';\n *\n * export default {\n * components: { HeaderMeta },\n * template: `\n * <header-meta description=\"header description\" :last-updated=\"new Date()\" />\n * `\n * }\n * @slot description - The description content. Overrides the `description` prop.\n * @property description - Text showed under the title.\n * @property lastUpdated - JavaScript \"Date\" object for when the content was last updated.\n * @property reloadButton - Reload button which shows next to the header's timestamp.\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./header-meta.scss\" />\n"],"names":["__default__$1","messages$1","useI18n","infoIconRef","ref","targetElement","popoverId","generateUid","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","e","differenceInMilliseconds","laterDate","earlierDate","toDate","differenceInSeconds","options","diff","getRoundingMethod","formatDistance","defaultOptions","getDefaultOptions","locale","enUS","minutesInAlmostTwoDays","comparison","compareAsc","localizeOptions","laterDate_","earlierDate_","normalizeDates","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","months","minutesInDay","hours","minutesInMonth","days","differenceInMonths","nearestMonth","monthsSinceStartOfYear","years","formatDistanceToNow","date","constructNow","__default__","messages","locales","getDateLocale","timestamp","computed","props","_a","slots","useSlots","hasSlot","useHasSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;GA8HIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;AA5DA,UAAA,EAAA,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAC,EAAA,8BAAA,GACAC,IAAAJ,EAAA,GACAK,IAAAL,EAAA,GAEAM,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAEJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAA,GAAA;AAEnB,MAAAC,EAAA,QAAAG;AAAA,IAAyB;4LAG7B,MAAA;AACI,MAAAF,EAAA;AAAA,IAAY,uBAOhB,CAAAG,MAAA;AACI,OAAA,CAAAV,EAAA,SAAA,GAAAU,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAV,EAAA,MAAA,SAAAU,EAAA,aAAA,MAKIF,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;AClFD,SAAAG,EAAAC,GAAAC,GAAA;AACP,SAAA,CAAAC,EAAAF,CAAA,IAAA,CAAAE,EAAAD,CAAA;AACA;ACIO,SAAAE,EAAAH,GAAAC,GAAAG,GAAA;AACP,QAAAC,IAAAN,EAAAC,GAAAC,CAAA,IAAA;AACA,SAAAK,EAAAF,KAAA,gBAAAA,EAAA,cAAA,EAAAC,CAAA;AACA;AC0DO,SAAAE,EAAAP,GAAAC,GAAAG,GAAA;AACP,QAAAI,IAAAC,EAAA,GACAC,KAAAN,KAAA,gBAA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AAAA;AAAA,IAEL,GASVM,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1,2,3,4]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as o, reactive as Pe, computed as D, watch as N, nextTick as l1, defineComponent as _1, toRef as De, onMounted as pe, useSlots as Ie } from "vue";
|
|
2
2
|
import { B as f1 } from "./button.CS_kdxYh.js";
|
|
3
|
-
import { B as ge } from "./checkbox.
|
|
3
|
+
import { B as ge } from "./checkbox.nyUc0gLb.js";
|
|
4
4
|
import { u as s1, h as C1, f as he, c as p1, B as Te } from "./button-actions.B81vY51z.js";
|
|
5
5
|
import { B as Fe } from "./modal.Bp5twyjz.js";
|
|
6
6
|
import { B as we } from "./typography.hlOAxsEn.js";
|
|
@@ -15,12 +15,12 @@ import { n as d } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
|
15
15
|
import { R as Ue } from "./refresh.arF7jP-l.js";
|
|
16
16
|
import { b as me, o as Ne } from "./index.BDK4hwK_.js";
|
|
17
17
|
import { B as Ge } from "./divider.CFbtmKeQ.js";
|
|
18
|
-
import { B as ze } from "./input-field.
|
|
18
|
+
import { B as ze } from "./input-field.DdQu3b1-.js";
|
|
19
19
|
import "./index.Cl4_42j5.js";
|
|
20
20
|
import { d as Ke } from "./debounce.DUTu11PS.js";
|
|
21
21
|
import { F as Ye } from "./field-label.Auq-Pzho.js";
|
|
22
22
|
import { u as t1 } from "./on-click-outside.D9aY9g8G.js";
|
|
23
|
-
import { I as je, H as qe } from "./header-meta.
|
|
23
|
+
import { I as je, H as qe } from "./header-meta.D-6dL1Vg.js";
|
|
24
24
|
import { u as Je } from "./use-bento-toast-controller.BKHU1qBv.js";
|
|
25
25
|
import "../assets/header-with-views.css";
|
|
26
26
|
let x1 = 0;
|
|
@@ -1564,4 +1564,4 @@ const Sa = la.exports;
|
|
|
1564
1564
|
export {
|
|
1565
1565
|
Sa as h
|
|
1566
1566
|
};
|
|
1567
|
-
//# sourceMappingURL=header-with-views.
|
|
1567
|
+
//# sourceMappingURL=header-with-views.j16q5wEc.js.map
|