{"version":3,"file":"vitals-utilities.cjs","sources":["../src/constants.ts","../src/types/timeframe-keys.ts","../src/types/timeframe-options.ts","../src/types/chart-types.ts","../src/types/explore/common.ts","../src/types/explore/util.ts","../src/types/explore/basic.ts","../src/types/explore/advanced.ts","../src/types/explore/ai.ts","../src/types/explore/requests.ts","../src/types/explore/agentic.ts","../src/types/explore/all.ts","../src/types/country-codes.ts","../src/dashboardSchema.v2.ts","../src/filters.ts","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addDays.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMonths.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addQuarters.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfQuarter.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfMonth.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDaysInMonth.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDefaultOptions.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getTime.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getUnixTime.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/hoursToSeconds.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/minutesToHours.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subMonths.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subQuarters.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/format/formatters/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/toDate/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/format/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js","../../../../node_modules/.pnpm/date-fns-tz@3.2.0_date-fns@4.4.0/node_modules/date-fns-tz/dist/esm/getTimezoneOffset/index.js","../src/format.ts","../src/granularity.ts","../src/queryTime.ts","../../../../node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.js","../src/timeframes.ts","../src/utils/SeedRandom.ts","../src/utils/chartDataGenerator.ts","../src/utils/helpers.ts","../src/utils/GeoLookup.ts","../../../../node_modules/.pnpm/approximate-number@3.0.1/node_modules/approximate-number/lib/approximate-number.js","../src/utils/formatUnit.ts"],"sourcesContent":["export const REFRESH_INTERVAL_MS = 30 * 1000\n\nexport const EXPORT_RECORD_LIMIT = 1000\n\nexport const INJECT_QUERY_PROVIDER = 'analytics-query-provider'\n","\nexport enum TimeframeKeys {\n  FIFTEEN_MIN = '15m',\n  ONE_HOUR = '1h',\n  SIX_HOUR = '6h',\n  TWELVE_HOUR = '12h',\n  ONE_DAY = '24h',\n  SEVEN_DAY = '7d',\n  THIRTY_DAY = '30d',\n  NINETY_DAY = '90d',\n  ONE_HUNDRED_EIGHTY_DAY = '180d',\n  ONE_YEAR = '365d',\n  CURRENT_WEEK = 'current_week',\n  CURRENT_MONTH = 'current_month',\n  CURRENT_QUARTER = 'current_quarter',\n  CURRENT_YEAR = 'current_year',\n  PREVIOUS_WEEK = 'previous_week',\n  PREVIOUS_MONTH = 'previous_month',\n  PREVIOUS_QUARTER = 'previous_quarter',\n  PREVIOUS_YEAR = 'previous_year',\n}\n","\nexport interface TimeframeOptions {\n  key: string\n  timeframeText: string\n  display: string\n  defaultResponseGranularity: string\n  dataGranularity: string\n  isRelative: boolean\n  timeframeLength: () => number\n  allowedTiers: string[]\n  startCustom?: Date\n  endCustom?: Date\n  allowedGranularitiesOverride?: string[]\n  fineGrainedDefaultGranularity?: string\n}\n\n// Supported by time periods, but not supported in Explore APIs.\nexport const extendedRelativeTimeRangeValues = [\n  '90d',\n  '180d',\n  '365d',\n  'current_quarter',\n  'previous_quarter',\n  'current_year',\n  'previous_year',\n] as const\nexport type ExtendedRelativeTimeRangeValues = typeof extendedRelativeTimeRangeValues[number]\n","export const reportChartTypes = [\n  'horizontal_bar',\n  'vertical_bar',\n  'timeseries_line',\n  'choropleth_map',\n  'timeseries_bar',\n  'donut',\n  'single_value',\n  'top_n',\n] as const\n\nexport type ReportChartTypes = typeof reportChartTypes[number]\n","\nexport const exploreFilterTypesV2 = ['in', 'not_in', 'selector'] as const\n\nexport type ExploreFilterTypesV2 = typeof exploreFilterTypesV2[number]\n\nexport const requestFilterTypeEqualsV2 = ['=', '!='] as const\n\nexport type RequestFilterTypeEqualsV2 = typeof requestFilterTypeEqualsV2[number]\n\nexport const requestFilterTypeMetricV2 = ['=', '!=', '<', '>', '<=', '>='] as const\n\nexport type RequestFilterTypeMetricV2 = typeof requestFilterTypeMetricV2[number]\n\nexport const requestFilterTypeEmptyV2 = ['empty', 'not_empty'] as const\n\nexport type RequestFilterTypeEmptyV2 = typeof requestFilterTypeEmptyV2[number]\n\nexport const requestFilterTypeWildcardV2 = ['starts_with', 'ends_with'] as const\n\nexport type RequestFilterTypeWildcardV2 = typeof requestFilterTypeWildcardV2[number]\n\n\n// Note: time types are common to all of the datasources.\n// If a datasource doesn't support a certain time range / time spec, it returns no records\n// rather than failing.\n// If a datasource doesn't support a certain granularity, it rounds to the nearest granularity it does support.\n\nexport const timeRangeTypeV2 = ['absolute', 'relative'] as const\n\nexport type TimeRangeTypeV2 = typeof timeRangeTypeV2[number]\n\n\nexport interface AbsoluteTimeRangeV4 {\n  type: 'absolute'\n  tz?: string\n  start: Date\n  end: Date\n}\n\nexport const relativeTimeRangeValuesV4 = [\n  '15m',\n  '1h',\n  '6h',\n  '12h',\n  '24h',\n  '7d',\n  'current_week',\n  'previous_week',\n  '30d',\n  'current_month',\n  'previous_month',\n] as const\n\nexport type RelativeTimeRangeValuesV4 = typeof relativeTimeRangeValuesV4[number]\n\nexport interface RelativeTimeRangeV4 {\n  type: 'relative'\n  tz?: string\n  time_range: string\n}\n\nexport type TimeRangeV4 = AbsoluteTimeRangeV4 | RelativeTimeRangeV4\n\nexport interface TimeRangeMetaResponse {\n  start: string\n  end: string\n  min_granularity_ms: number\n}\n\nexport const granularityValues = [\n  'secondly',\n  'tenSecondly',\n  'thirtySecondly',\n  'minutely',\n  'fiveMinutely',\n  'tenMinutely',\n  'thirtyMinutely',\n  'hourly',\n  'twoHourly',\n  'twelveHourly',\n  'daily',\n  'weekly',\n  'trend',\n] as const\n\nexport type GranularityValues = typeof granularityValues[number]\n","// Utility types for `makeFilterable`.\n// In essence: recurse through the tuple type `T` and exclude elements that match `E`.\n// https://stackoverflow.com/questions/58984164/typescript-filter-tuple-type-by-an-arbitrary-type\ntype ExcludeFromTuple<T extends readonly any[], E> =\n  T extends readonly [infer F, ...infer R] ? [F] extends readonly [E] ? ExcludeFromTuple<R, E> :\n    [F, ...ExcludeFromTuple<R, E>] : []\n\n// Basically, all dimensions are filterable except for time.\ntype ExceptTime<T extends readonly any[]> = ExcludeFromTuple<T, 'time'>\n\n// Utility for deriving filterable dimensions from queryable dimensions with correct types.\nexport const makeFilterable = <T extends readonly unknown[]>(queryable: T) =>\n  queryable.filter(d => d !== 'time') as ExceptTime<T>\n","import { makeFilterable } from './util'\nimport type { ExploreFilterTypesV2, GranularityValues, RequestFilterTypeEmptyV2, TimeRangeV4 } from './common'\n\nexport const queryableBasicExploreDimensions = [\n  'api',\n  'api_package',\n  'api_product',\n  'api_product_version',\n  'control_plane',\n  'control_plane_group',\n  'data_plane_node',\n  'gateway_service',\n  'portal',\n  'route',\n  'status_code',\n  'status_code_grouped',\n  'time',\n] as const\n\nexport type QueryableBasicExploreDimensions = typeof queryableBasicExploreDimensions[number]\n\nexport const filterableBasicExploreDimensions = makeFilterable(queryableBasicExploreDimensions)\n\nexport type FilterableBasicExploreDimensions = typeof filterableBasicExploreDimensions[number]\n\nexport interface BasicExploreInFilterV2 {\n  operator: ExploreFilterTypesV2\n  field: FilterableBasicExploreDimensions\n  value: Array<string | number | null>\n}\n\nexport interface BasicExploreEmptyFilterV2 {\n  operator: RequestFilterTypeEmptyV2\n  field: FilterableBasicExploreDimensions\n}\nexport const basicExploreAggregations = [\n  'active_services',\n  'error_rate',\n  'request_count',\n  'request_per_minute',\n  'response_latency_average',\n] as const\n\nexport type BasicExploreAggregations = typeof basicExploreAggregations[number]\n\nexport type BasicExploreFilterAll = BasicExploreInFilterV2 | BasicExploreEmptyFilterV2\n\nexport interface BasicExploreQuery {\n  metrics?: BasicExploreAggregations[]\n  dimensions?: QueryableBasicExploreDimensions[]\n  filters?: BasicExploreFilterAll[]\n  granularity?: GranularityValues\n  time_range?: TimeRangeV4\n  limit?: number\n  descending?: boolean\n  short_name?: boolean\n  meta?: {\n    query_id: string\n  }\n}\n","import { makeFilterable } from './util'\nimport type { BasicExploreEmptyFilterV2, BasicExploreInFilterV2, BasicExploreQuery } from './basic'\nimport { basicExploreAggregations, queryableBasicExploreDimensions } from './basic'\n\nexport const queryableExploreDimensions = [\n  ...queryableBasicExploreDimensions,\n  'application',\n  'bot_info_action',\n  'bot_info_detection_reason',\n  'bot_info_ban_type',\n  'consumer',\n  'country_code',\n  'upstream_status_code',\n  'upstream_status_code_grouped',\n  'response_source',\n  'data_plane_node_version',\n  'realm',\n  'portal_api',\n  'principal',\n] as const\n\nexport type QueryableExploreDimensions = typeof queryableExploreDimensions[number]\n\nexport const filterableExploreDimensions = makeFilterable(queryableExploreDimensions)\n\nexport type FilterableExploreDimensions = typeof filterableExploreDimensions[number]\n\nexport interface ExploreInFilterV2 extends Omit<BasicExploreInFilterV2, 'field'> {\n  field: FilterableExploreDimensions\n}\n\nexport interface ExploreEmptyFilterV2 extends Omit<BasicExploreEmptyFilterV2, 'field'> {\n  field: FilterableExploreDimensions\n}\n\nexport const exploreAggregations = [\n  ...basicExploreAggregations,\n  'response_latency_p99',\n  'response_latency_p95',\n  'response_latency_p50',\n  'upstream_latency_p99',\n  'upstream_latency_p95',\n  'upstream_latency_p50',\n  'upstream_latency_average',\n  'kong_latency_p99',\n  'kong_latency_p95',\n  'kong_latency_p50',\n  'kong_latency_average',\n  'kong_internal_latency_p99',\n  'kong_internal_latency_p95',\n  'kong_internal_latency_p50',\n  'kong_internal_latency_average',\n  'response_size_p99',\n  'response_size_p95',\n  'response_size_p50',\n  'response_size_average',\n  'response_size_sum',\n  'request_size_p99',\n  'request_size_p95',\n  'request_size_p50',\n  'request_size_average',\n  'request_size_sum',\n] as const\n\nexport type ExploreAggregations = typeof exploreAggregations[number]\n\nexport type ExploreFilterAll = ExploreInFilterV2 | ExploreEmptyFilterV2\n\nexport interface ExploreQuery extends Omit<BasicExploreQuery, 'metrics' | 'dimensions' | 'filters'> {\n  metrics?: ExploreAggregations[]\n  dimensions?: QueryableExploreDimensions[]\n  filters?: ExploreFilterAll[]\n}\n","import { makeFilterable } from './util'\nimport type { BasicExploreEmptyFilterV2, BasicExploreInFilterV2, BasicExploreQuery } from './basic'\n\nexport const queryableAiExploreDimensions = [\n  'control_plane',\n  'control_plane_group',\n  'gateway_service',\n  'consumer',\n  'application',\n  'route',\n  'ai_provider',\n  'ai_response_model',\n  'ai_request_model',\n  'llm_cache_status',\n  'llm_embeddings_provider',\n  'llm_embeddings_model',\n  'time',\n  'realm',\n  'status_code',\n  'status_code_grouped',\n  'ai_plugin',\n  'principal',\n] as const\n\nexport type QueryableAiExploreDimensions = typeof queryableAiExploreDimensions[number]\n\nexport const filterableAiExploreDimensions = makeFilterable(queryableAiExploreDimensions)\n\nexport type FilterableAiExploreDimensions = typeof queryableAiExploreDimensions[number]\n\nexport interface AiExploreInFilterV2 extends Omit<BasicExploreInFilterV2, 'field'> {\n  field: FilterableAiExploreDimensions\n}\n\nexport interface AiExploreEmptyFilterV2 extends Omit<BasicExploreEmptyFilterV2, 'field'> {\n  field: FilterableAiExploreDimensions\n}\n\nexport const aiExploreAggregations = [\n  'total_tokens',\n  'prompt_tokens',\n  'completion_tokens',\n  'ai_request_count',\n  'error_rate',\n  'cost',\n  'llm_cache_embeddings_latency_average',\n  'llm_cache_fetch_latency_average',\n  'llm_latency_average',\n  'llm_embeddings_tokens',\n  'llm_embeddings_cost',\n] as const\n\nexport type AiExploreAggregations = typeof aiExploreAggregations[number]\n\nexport type AiExploreFilterAll = AiExploreInFilterV2 | AiExploreEmptyFilterV2\n\nexport interface AiExploreQuery extends Omit<BasicExploreQuery, 'metrics' | 'dimensions' | 'filters'> {\n  metrics?: AiExploreAggregations[]\n  dimensions?: QueryableAiExploreDimensions[]\n  filters?: AiExploreFilterAll[]\n}\n\n","import { makeFilterable } from './util'\nimport type { AbsoluteTimeRangeV4, ExploreFilterTypesV2, RequestFilterTypeEmptyV2, RequestFilterTypeEqualsV2, RequestFilterTypeMetricV2, RequestFilterTypeWildcardV2 } from './common'\n\n// status_code and upstream_status_code are treated as metric filters\nexport const queryableRequestDimensions = [\n  'a2a_context_id',\n  'a2a_error',\n  'a2a_method',\n  'a2a_task_id',\n  'api',\n  'api_package',\n  'api_product',\n  'api_product_version',\n  'application',\n  'auth_type',\n  'bot_info_action',\n  'bot_info_detection_reason',\n  'bot_info_ja4_fingerprint',\n  'bot_info_ban_type',\n  'bot_info_header_names',\n  'client_ip',\n  'consumer',\n  'consumer_group',\n  'control_plane',\n  'control_plane_group',\n  'country_code',\n  'data_plane_node',\n  'data_plane_node_version',\n  'gateway_service',\n  'header_host',\n  'header_user_agent',\n  'http_method',\n  'mcp_error',\n  'mcp_method',\n  'mcp_session_id',\n  'mcp_tool_name',\n  'portal',\n  'principal',\n  'realm',\n  'request_id',\n  'request_uri',\n  'response_header_content_type',\n  'response_source',\n  'route',\n  'service_port',\n  'service_protocol',\n  'sse',\n  'status_code_grouped',\n  'time',\n  'trace_id',\n  'upstream_uri',\n  'upstream_status_code_grouped',\n  'websocket',\n] as const\n\nexport type QueryableRequestDimensions = typeof queryableRequestDimensions[number]\n\nexport const filterableRequestDimensions = makeFilterable(queryableRequestDimensions)\n\nexport type FilterableRequestDimensions = typeof filterableRequestDimensions[number]\n\nexport const queryableRequestWildcardDimensions = [\n  'auth_type',\n  'client_ip',\n  'data_plane_node_version',\n  'header_host',\n  'header_user_agent',\n  'http_method',\n  'request_id',\n  'request_uri',\n  'response_header_content_type',\n  'response_source',\n  'service_port',\n  'service_protocol',\n  'trace_id',\n  'upstream_uri',\n] as const\n\nexport type QueryableRequestWildcardDimensions = typeof queryableRequestWildcardDimensions[number]\n\nexport const filterableRequestWildcardDimensions = queryableRequestWildcardDimensions\n\nexport type FilterableRequestWildcardDimensions = typeof filterableRequestWildcardDimensions[number]\n\nexport const queryableRequestMetrics = [\n  'ai_count',\n  'latencies_response_ms',\n  'latencies_upstream_ms',\n  'latencies_kong_gateway_ms',\n  'latencies_kong_internal_ms',\n  'request_body_size',\n  'response_body_size',\n  'response_header_content_length',\n  'status_code',\n  'upstream_status_code',\n] as const\n\nexport type QueryableRequestMetrics = typeof queryableRequestMetrics[number]\n\nexport const filterableRequestMetrics = makeFilterable(queryableRequestMetrics)\n\nexport type FilterableRequestMetrics = typeof filterableRequestMetrics[number]\n\nexport interface RequestInFilter {\n  operator: ExploreFilterTypesV2\n  field: FilterableRequestDimensions | FilterableRequestWildcardDimensions | FilterableRequestMetrics\n  value: Array<string | number>\n}\nexport interface RequestEqualsFilter {\n  operator: RequestFilterTypeEqualsV2\n  field: FilterableRequestDimensions | FilterableRequestWildcardDimensions\n  value: string\n}\nexport interface RequestMetricFilter {\n  operator: RequestFilterTypeMetricV2\n  field: FilterableRequestMetrics\n  value: number\n}\nexport interface RequestEmptyFilter {\n  operator: RequestFilterTypeEmptyV2\n  field: FilterableRequestDimensions | FilterableRequestWildcardDimensions | FilterableRequestMetrics\n}\nexport interface RequestWildcardFilter {\n  operator: RequestFilterTypeWildcardV2\n  field: FilterableRequestWildcardDimensions\n  value: string\n}\n\nexport type RequestFilter = RequestInFilter |\n  RequestEqualsFilter |\n  RequestMetricFilter |\n  RequestEmptyFilter |\n  RequestWildcardFilter\n\nexport const relativeTimeRangeValuesRequestV2 = [\n  '15M',\n  '1H',\n  '6H',\n  '12H',\n  '24H',\n  '7D',\n] as const\n\nexport type RelativeTimeRangeValuesRequestV2 = typeof relativeTimeRangeValuesRequestV2[number]\n\nexport interface RelativeTimeRangeRequestV2 {\n  type: 'relative'\n  tz?: string\n  time_range: RelativeTimeRangeValuesRequestV2\n}\n\nexport type TimeRangeRequestV2 = AbsoluteTimeRangeV4 | RelativeTimeRangeRequestV2\n\nexport interface RequestQuery {\n  filters: RequestFilter[]\n  time_range: TimeRangeRequestV2\n  order?: string\n  offset?: number\n  size?: number\n  query_id?: string\n  limit?: number\n  classified?: boolean\n  cursor?: string\n}\n","import { makeFilterable } from './util'\nimport type { BasicExploreEmptyFilterV2, BasicExploreInFilterV2, BasicExploreQuery } from './basic'\nimport { exploreAggregations, queryableExploreDimensions } from './advanced'\n\nexport const queryableAgenticExploreDimensions = [\n  ...queryableExploreDimensions,\n  'a2a_context_id',\n  'a2a_error',\n  'a2a_method',\n  'a2a_task_id',\n  'mcp_error',\n  'mcp_method',\n  'mcp_session_id',\n  'mcp_tool_name',\n] as const\n\nexport type QueryableAgenticExploreDimensions = typeof queryableAgenticExploreDimensions[number]\n\nexport const filterableAgenticExploreDimensions = makeFilterable(queryableAgenticExploreDimensions)\n\nexport type FilterableAgenticExploreDimensions = typeof queryableAgenticExploreDimensions[number]\n\nexport interface AgenticExploreInFilterV2 extends Omit<BasicExploreInFilterV2, 'field'> {\n  field: FilterableAgenticExploreDimensions\n}\n\nexport interface AgenticExploreEmptyFilterV2 extends Omit<BasicExploreEmptyFilterV2, 'field'> {\n  field: FilterableAgenticExploreDimensions\n}\n\nexport const agenticExploreAggregations = [\n  ...exploreAggregations,\n  'a2a_latency_average',\n  'a2a_response_size_sum',\n  'mcp_response_size_sum',\n] as const\n\nexport type AgenticExploreAggregations = typeof agenticExploreAggregations[number]\n\nexport type AgenticExploreFilterAll = AgenticExploreInFilterV2 | AgenticExploreEmptyFilterV2\n\nexport interface AgenticExploreQuery extends Omit<BasicExploreQuery, 'metrics' | 'dimensions' | 'filters'> {\n  metrics?: AgenticExploreAggregations[]\n  dimensions?: QueryableAgenticExploreDimensions[]\n  filters?: AgenticExploreFilterAll[]\n}\n\n","import { type BasicExploreAggregations, type BasicExploreFilterAll, type FilterableBasicExploreDimensions, filterableBasicExploreDimensions } from './basic'\nimport { type AiExploreAggregations, type AiExploreFilterAll, type FilterableAiExploreDimensions, filterableAiExploreDimensions } from './ai'\nimport { type ExploreAggregations, type ExploreFilterAll, type FilterableExploreDimensions, filterableExploreDimensions } from './advanced'\nimport { type FilterableRequestDimensions, type FilterableRequestMetrics, type FilterableRequestWildcardDimensions } from './requests'\nimport { type PlatformExploreFilterAll } from './platform'\nimport { filterableAgenticExploreDimensions, type AgenticExploreAggregations, type AgenticExploreFilterAll, type FilterableAgenticExploreDimensions } from './agentic'\n\nexport type AllAggregations = BasicExploreAggregations | AiExploreAggregations | ExploreAggregations | AgenticExploreAggregations\nexport type AllFilters = BasicExploreFilterAll | AiExploreFilterAll | ExploreFilterAll | AgenticExploreFilterAll | PlatformExploreFilterAll\nexport type AllFilterableDimensionsAndMetrics = FilterableExploreDimensions\n  | FilterableAiExploreDimensions\n  | FilterableBasicExploreDimensions\n  | FilterableAgenticExploreDimensions\n  | FilterableRequestDimensions\n  | FilterableRequestMetrics\n  | FilterableRequestWildcardDimensions\n\nexport const queryDatasources = ['basic', 'api_usage', 'llm_usage', 'agentic_usage', 'platform'] as const\n\nexport type QueryDatasource = typeof queryDatasources[number]\n\nexport type FilterDatasource = QueryDatasource | 'requests'\n\nexport interface FilterTypeMap extends Record<QueryDatasource, AllFilters> {\n  basic: BasicExploreFilterAll\n  api_usage: ExploreFilterAll\n  llm_usage: AiExploreFilterAll\n  agentic_usage: AgenticExploreFilterAll\n  platform: PlatformExploreFilterAll\n}\n\n/**\n * A collection of values that are used in the dashboard list filters\n */\nexport type DashboardListFilterValues = {\n  /**\n   * Distinct uuids of users who have created a dashboard. If not provided, none exist.\n   */\n  createdBy?: {\n    values: string[]\n    truncated: boolean\n  }\n  /**\n   * Distinct labels in use by any dashboard. If not provided, none exist.\n   */\n  labels?: {\n    values: string[]\n    truncated: boolean\n  }\n}\n\nexport const datasourceToFilterableDimensions: Record<QueryDatasource, Set<string>> = {\n  basic: new Set(filterableBasicExploreDimensions),\n  api_usage: new Set(filterableExploreDimensions),\n  llm_usage: new Set(filterableAiExploreDimensions),\n  agentic_usage: new Set(filterableAgenticExploreDimensions),\n  platform: new Set(),\n} as const\n\n/**\n * @deprecated Use `useDatasourceConfigStore().stripUnknownFilters` from `@kong-ui-public/analytics-config-store`.\n */\nexport const stripUnknownFilters = <K extends keyof typeof datasourceToFilterableDimensions>(datasource: K, filters: AllFilters[]): Array<FilterTypeMap[K]> => {\n  if (datasource.startsWith('goap')) {\n    // We currently can't determine the type for goap datasources as it could be\n    // anything so we have to just trust that valid filters were applied\n    return filters as any\n  }\n\n  if (datasource === 'platform') {\n    return filters as Array<FilterTypeMap[K]>\n  }\n\n  // Note: once we extend API request filters, this may need to look at more than just dimensions.\n  // Note the cast; we could potentially try to derive the type, but it doesn't seem worth it.\n  return filters.filter(f => datasourceToFilterableDimensions[datasource].has(f.field)) as Array<FilterTypeMap[K]>\n}\n\n// TODO: Add utility func for marking unknown filters (but not stripping them).\n","export const COUNTRIES = [\n  { code: 'AF', name: 'Afghanistan' },\n  { code: 'AX', name: 'Aland Islands' },\n  { code: 'AL', name: 'Albania' },\n  { code: 'DZ', name: 'Algeria' },\n  { code: 'AS', name: 'American Samoa' },\n  { code: 'AD', name: 'Andorra' },\n  { code: 'AO', name: 'Angola' },\n  { code: 'AI', name: 'Anguilla' },\n  { code: 'AQ', name: 'Antarctica' },\n  { code: 'AG', name: 'Antigua and Barbuda' },\n  { code: 'AR', name: 'Argentina' },\n  { code: 'AM', name: 'Armenia' },\n  { code: 'AW', name: 'Aruba' },\n  { code: 'AU', name: 'Australia' },\n  { code: 'AT', name: 'Austria' },\n  { code: 'AZ', name: 'Azerbaijan' },\n  { code: 'BS', name: 'Bahamas' },\n  { code: 'BH', name: 'Bahrain' },\n  { code: 'BD', name: 'Bangladesh' },\n  { code: 'BB', name: 'Barbados' },\n  { code: 'BY', name: 'Belarus' },\n  { code: 'BE', name: 'Belgium' },\n  { code: 'BZ', name: 'Belize' },\n  { code: 'BJ', name: 'Benin' },\n  { code: 'BM', name: 'Bermuda' },\n  { code: 'BT', name: 'Bhutan' },\n  { code: 'BO', name: 'Bolivia' },\n  { code: 'BA', name: 'Bosnia and Herzegovina' },\n  { code: 'BW', name: 'Botswana' },\n  { code: 'BV', name: 'Bouvet Island' },\n  { code: 'BR', name: 'Brazil' },\n  { code: 'IO', name: 'British Indian Ocean Territory' },\n  { code: 'BN', name: 'Brunei Darussalam' },\n  { code: 'BG', name: 'Bulgaria' },\n  { code: 'BF', name: 'Burkina Faso' },\n  { code: 'BI', name: 'Burundi' },\n  { code: 'KH', name: 'Cambodia' },\n  { code: 'CM', name: 'Cameroon' },\n  { code: 'CA', name: 'Canada' },\n  { code: 'CV', name: 'Cape Verde' },\n  { code: 'KY', name: 'Cayman Islands' },\n  { code: 'CF', name: 'Central African Republic' },\n  { code: 'TD', name: 'Chad' },\n  { code: 'CL', name: 'Chile' },\n  { code: 'CN', name: 'China' },\n  { code: 'CX', name: 'Christmas Island' },\n  { code: 'CC', name: 'Cocos (Keeling) Islands' },\n  { code: 'CO', name: 'Colombia' },\n  { code: 'KM', name: 'Comoros' },\n  { code: 'CG', name: 'Congo' },\n  { code: 'CD', name: 'Democratic Republic of the Congo' },\n  { code: 'CK', name: 'Cook Islands' },\n  { code: 'CR', name: 'Costa Rica' },\n  { code: 'CI', name: \"Cote d'Ivoire\" },\n  { code: 'HR', name: 'Croatia' },\n  { code: 'CU', name: 'Cuba' },\n  { code: 'CY', name: 'Cyprus' },\n  { code: 'CZ', name: 'Czech Republic' },\n  { code: 'DK', name: 'Denmark' },\n  { code: 'DJ', name: 'Djibouti' },\n  { code: 'DM', name: 'Dominica' },\n  { code: 'DO', name: 'Dominican Republic' },\n  { code: 'EC', name: 'Ecuador' },\n  { code: 'EG', name: 'Egypt' },\n  { code: 'SV', name: 'El Salvador' },\n  { code: 'GQ', name: 'Equatorial Guinea' },\n  { code: 'ER', name: 'Eritrea' },\n  { code: 'EE', name: 'Estonia' },\n  { code: 'ET', name: 'Ethiopia' },\n  { code: 'FK', name: 'Falkland Islands (Malvinas)' },\n  { code: 'FO', name: 'Faroe Islands' },\n  { code: 'FJ', name: 'Fiji' },\n  { code: 'FI', name: 'Finland' },\n  { code: 'FR', name: 'France' },\n  { code: 'GF', name: 'French Guiana' },\n  { code: 'PF', name: 'French Polynesia' },\n  { code: 'TF', name: 'French Southern Territories' },\n  { code: 'GA', name: 'Gabon' },\n  { code: 'GM', name: 'Gambia' },\n  { code: 'GE', name: 'Georgia' },\n  { code: 'DE', name: 'Germany' },\n  { code: 'GH', name: 'Ghana' },\n  { code: 'GI', name: 'Gibraltar' },\n  { code: 'GR', name: 'Greece' },\n  { code: 'GL', name: 'Greenland' },\n  { code: 'GD', name: 'Grenada' },\n  { code: 'GP', name: 'Guadeloupe' },\n  { code: 'GU', name: 'Guam' },\n  { code: 'GT', name: 'Guatemala' },\n  { code: 'GG', name: 'Guernsey' },\n  { code: 'GN', name: 'Guinea' },\n  { code: 'GW', name: 'Guinea-Bissau' },\n  { code: 'GY', name: 'Guyana' },\n  { code: 'HT', name: 'Haiti' },\n  { code: 'HM', name: 'Heard Island and McDonald Islands' },\n  { code: 'VA', name: 'The Vatican' },\n  { code: 'HN', name: 'Honduras' },\n  { code: 'HK', name: 'Hong Kong' },\n  { code: 'HU', name: 'Hungary' },\n  { code: 'IS', name: 'Iceland' },\n  { code: 'IN', name: 'India' },\n  { code: 'ID', name: 'Indonesia' },\n  { code: 'IR', name: 'Iran' },\n  { code: 'IQ', name: 'Iraq' },\n  { code: 'IE', name: 'Ireland' },\n  { code: 'IM', name: 'Isle of Man' },\n  { code: 'IL', name: 'Israel' },\n  { code: 'IT', name: 'Italy' },\n  { code: 'JM', name: 'Jamaica' },\n  { code: 'JP', name: 'Japan' },\n  { code: 'JE', name: 'Jersey' },\n  { code: 'JO', name: 'Jordan' },\n  { code: 'KZ', name: 'Kazakhstan' },\n  { code: 'KE', name: 'Kenya' },\n  { code: 'KI', name: 'Kiribati' },\n  { code: 'KP', name: 'North Korea' },\n  { code: 'KR', name: 'South Korea' },\n  { code: 'KW', name: 'Kuwait' },\n  { code: 'KG', name: 'Kyrgyzstan' },\n  { code: 'LA', name: 'Laos' },\n  { code: 'LV', name: 'Latvia' },\n  { code: 'LB', name: 'Lebanon' },\n  { code: 'LS', name: 'Lesotho' },\n  { code: 'LR', name: 'Liberia' },\n  { code: 'LY', name: 'Libya' },\n  { code: 'LI', name: 'Liechtenstein' },\n  { code: 'LT', name: 'Lithuania' },\n  { code: 'LU', name: 'Luxembourg' },\n  { code: 'MO', name: 'Macao' },\n  { code: 'MK', name: 'Macedonia' },\n  { code: 'MG', name: 'Madagascar' },\n  { code: 'MW', name: 'Malawi' },\n  { code: 'MY', name: 'Malaysia' },\n  { code: 'MV', name: 'Maldives' },\n  { code: 'ML', name: 'Mali' },\n  { code: 'MT', name: 'Malta' },\n  { code: 'MH', name: 'Marshall Islands' },\n  { code: 'MQ', name: 'Martinique' },\n  { code: 'MR', name: 'Mauritania' },\n  { code: 'MU', name: 'Mauritius' },\n  { code: 'YT', name: 'Mayotte' },\n  { code: 'MX', name: 'Mexico' },\n  { code: 'FM', name: 'Micronesia, ' },\n  { code: 'MD', name: 'Moldova,' },\n  { code: 'MC', name: 'Monaco' },\n  { code: 'MN', name: 'Mongolia' },\n  { code: 'ME', name: 'Montenegro' },\n  { code: 'MS', name: 'Montserrat' },\n  { code: 'MA', name: 'Morocco' },\n  { code: 'MZ', name: 'Mozambique' },\n  { code: 'MM', name: 'Myanmar' },\n  { code: 'NA', name: 'Namibia' },\n  { code: 'NR', name: 'Nauru' },\n  { code: 'NP', name: 'Nepal' },\n  { code: 'NL', name: 'Netherlands' },\n  { code: 'NC', name: 'New Caledonia' },\n  { code: 'NZ', name: 'New Zealand' },\n  { code: 'NI', name: 'Nicaragua' },\n  { code: 'NE', name: 'Niger' },\n  { code: 'NG', name: 'Nigeria' },\n  { code: 'NU', name: 'Niue' },\n  { code: 'NF', name: 'Norfolk Island' },\n  { code: 'MP', name: 'Northern Mariana Islands' },\n  { code: 'NO', name: 'Norway' },\n  { code: 'OM', name: 'Oman' },\n  { code: 'PK', name: 'Pakistan' },\n  { code: 'PW', name: 'Palau' },\n  { code: 'PA', name: 'Panama' },\n  { code: 'PG', name: 'Papua New Guinea' },\n  { code: 'PY', name: 'Paraguay' },\n  { code: 'PE', name: 'Peru' },\n  { code: 'PH', name: 'Philippines' },\n  { code: 'PN', name: 'Pitcairn' },\n  { code: 'PL', name: 'Poland' },\n  { code: 'PT', name: 'Portugal' },\n  { code: 'PR', name: 'Puerto Rico' },\n  { code: 'QA', name: 'Qatar' },\n  { code: 'RE', name: 'Reunion' },\n  { code: 'RO', name: 'Romania' },\n  { code: 'RU', name: 'Russia' },\n  { code: 'RW', name: 'Rwanda' },\n  { code: 'BL', name: 'Saint Barthelemy' },\n  { code: 'SH', name: 'Saint Helena' },\n  { code: 'KN', name: 'Saint Kitts and Nevis' },\n  { code: 'LC', name: 'Saint Lucia' },\n  { code: 'MF', name: 'Saint Martin' },\n  { code: 'PM', name: 'Saint Pierre and Miquelon' },\n  { code: 'VC', name: 'Saint Vincent and the Grenadines' },\n  { code: 'WS', name: 'Samoa' },\n  { code: 'SM', name: 'San Marino' },\n  { code: 'ST', name: 'Sao Tome and Principe' },\n  { code: 'SA', name: 'Saudi Arabia' },\n  { code: 'SN', name: 'Senegal' },\n  { code: 'RS', name: 'Serbia' },\n  { code: 'SC', name: 'Seychelles' },\n  { code: 'SL', name: 'Sierra Leone' },\n  { code: 'SG', name: 'Singapore' },\n  { code: 'SX', name: 'Sint Maarten' },\n  { code: 'SK', name: 'Slovakia' },\n  { code: 'SI', name: 'Slovenia' },\n  { code: 'SB', name: 'Solomon Islands' },\n  { code: 'SO', name: 'Somalia' },\n  { code: 'ZA', name: 'South Africa' },\n  { code: 'GS', name: 'South Georgia and the South Sandwich Islands' },\n  { code: 'SS', name: 'South Sudan' },\n  { code: 'ES', name: 'Spain' },\n  { code: 'LK', name: 'Sri Lanka' },\n  { code: 'SD', name: 'Sudan' },\n  { code: 'SR', name: 'Suriname' },\n  { code: 'SJ', name: 'Svalbard and Jan Mayen' },\n  { code: 'SZ', name: 'Swaziland' },\n  { code: 'SE', name: 'Sweden' },\n  { code: 'CH', name: 'Switzerland' },\n  { code: 'SY', name: 'Syria' },\n  { code: 'TW', name: 'Taiwan' },\n  { code: 'TJ', name: 'Tajikistan' },\n  { code: 'TZ', name: 'Tanzania' },\n  { code: 'TH', name: 'Thailand' },\n  { code: 'TL', name: 'Timor-Leste' },\n  { code: 'TG', name: 'Togo' },\n  { code: 'TK', name: 'Tokelau' },\n  { code: 'TO', name: 'Tonga' },\n  { code: 'TT', name: 'Trinidad and Tobago' },\n  { code: 'TN', name: 'Tunisia' },\n  { code: 'TR', name: 'Turkey' },\n  { code: 'TM', name: 'Turkmenistan' },\n  { code: 'TC', name: 'Turks and Caicos Islands' },\n  { code: 'TV', name: 'Tuvalu' },\n  { code: 'UG', name: 'Uganda' },\n  { code: 'UA', name: 'Ukraine' },\n  { code: 'AE', name: 'United Arab Emirates' },\n  { code: 'GB', name: 'United Kingdom' },\n  { code: 'US', name: 'United States' },\n  { code: 'UM', name: 'United States Minor Outlying Islands' },\n  { code: 'UY', name: 'Uruguay' },\n  { code: 'UZ', name: 'Uzbekistan' },\n  { code: 'VU', name: 'Vanuatu' },\n  { code: 'VE', name: 'Venezuela' },\n  { code: 'VN', name: 'Vietnam' },\n  { code: 'VG', name: 'British Virgin Islands' },\n  { code: 'VI', name: 'U.S. Virgin Islands' },\n  { code: 'WF', name: 'Wallis and Futuna' },\n  { code: 'EH', name: 'Western Sahara' },\n  { code: 'YE', name: 'Yemen' },\n  { code: 'ZM', name: 'Zambia' },\n  { code: 'ZW', name: 'Zimbabwe' },\n] as const\n\nexport type CountryISOA2 = typeof COUNTRIES[number]['code']\nexport type CountryIsoMap = { code: CountryISOA2, name: string }\n","import type { FromSchema, JSONSchema } from 'json-schema-to-ts'\nimport {\n  agenticExploreAggregations,\n  aiExploreAggregations,\n  basicExploreAggregations,\n  exploreAggregations,\n  exploreFilterTypesV2,\n  filterableAgenticExploreDimensions,\n  filterableAiExploreDimensions,\n  filterableBasicExploreDimensions,\n  filterableExploreDimensions,\n  granularityValues,\n  queryableAgenticExploreDimensions,\n  queryableAiExploreDimensions,\n  queryableBasicExploreDimensions,\n  queryableExploreDimensions,\n  requestFilterTypeEmptyV2,\n} from './types'\nimport { COUNTRIES } from './types/country-codes'\n\ntype FromSchemaWithOptions<T extends JSONSchema> = FromSchema<T, { keepDefaultedPropertiesOptional: true }>\n\n// TODO: Once we support all chart types, this could potentially be replaced with a direct reference to `chartTypes`.\n// This is partially overlapping with analytics chart types, but not strictly so.\nexport const dashboardTileTypes = [\n  'horizontal_bar',\n  'vertical_bar',\n  'gauge',\n  'donut',\n  'timeseries_line',\n  'timeseries_bar',\n  'golden_signals',\n  'top_n',\n  'slottable',\n  'single_value',\n  'choropleth_map',\n] as const\nexport type DashboardTileType = typeof dashboardTileTypes[number]\n\n// Common definition for many ChartJS tiles.\nconst syntheticsDataKey = {\n  type: 'string',\n} as const\n\nconst chartTitle = {\n  type: 'string',\n} as const\n\nconst allowCsvExport = {\n  type: 'boolean',\n} as const\n\nconst entityLinks = {\n  type: 'object',\n  additionalProperties: {\n    type: 'string',\n  },\n} as const satisfies JSONSchema\n\nconst chartDatasetColorsSchema = {\n  type: ['object', 'array'],\n  items: {\n    type: 'string',\n  },\n  additionalProperties: {\n    type: 'string',\n  },\n} as const satisfies JSONSchema\n\nexport const slottableSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['slottable'],\n    },\n    id: {\n      type: 'string',\n    },\n  },\n  required: ['type', 'id'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type SlottableOptions = FromSchemaWithOptions<typeof slottableSchema>\n\nexport const barChartSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['horizontal_bar', 'vertical_bar'],\n    },\n    stacked: {\n      type: 'boolean',\n    },\n    chart_dataset_colors: chartDatasetColorsSchema,\n    synthetics_data_key: syntheticsDataKey,\n    chart_title: chartTitle,\n    allow_csv_export: allowCsvExport,\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type BarChartOptions = FromSchemaWithOptions<typeof barChartSchema>\n\nexport const thresholdSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['warning', 'error', 'neutral'],\n    },\n    value: {\n      type: 'number',\n    },\n    label: {\n      type: 'string',\n    },\n    highlightIntersections: {\n      type: 'boolean',\n      default: false,\n    },\n  },\n  required: ['type', 'value'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const timeseriesChartSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['timeseries_line', 'timeseries_bar'],\n    },\n    stacked: {\n      type: 'boolean',\n    },\n    threshold: {\n      type: 'object',\n      additionalProperties: {\n        type: 'array',\n        items: thresholdSchema,\n      },\n    },\n    chart_dataset_colors: chartDatasetColorsSchema,\n    synthetics_data_key: syntheticsDataKey,\n    chart_title: chartTitle,\n    allow_csv_export: allowCsvExport,\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type TimeseriesChartOptions = FromSchemaWithOptions<typeof timeseriesChartSchema>\n\nexport const gaugeChartSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['gauge'],\n    },\n    metric_display: {\n      type: 'string',\n      enum: ['hidden', 'single', 'full'], // This matches the SimpleChartMetricDisplay type.\n    },\n    reverse_dataset: {\n      type: 'boolean',\n    },\n    numerator: {\n      type: 'number',\n    },\n    synthetics_data_key: syntheticsDataKey,\n    chart_title: chartTitle,\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type GaugeChartOptions = FromSchemaWithOptions<typeof gaugeChartSchema>\n\nexport const donutChartSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['donut'],\n    },\n    synthetics_data_key: syntheticsDataKey,\n    chart_title: chartTitle,\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type DonutChartOptions = FromSchemaWithOptions<typeof donutChartSchema>\n\nexport const topNTableSchema = {\n  type: 'object',\n  properties: {\n    chart_title: chartTitle,\n    synthetics_data_key: syntheticsDataKey,\n    type: {\n      type: 'string',\n      enum: ['top_n'],\n    },\n    description: {\n      type: 'string',\n    },\n    entity_link: {\n      type: 'string',\n    },\n    entity_links: entityLinks,\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type TopNTableOptions = FromSchemaWithOptions<typeof topNTableSchema>\n\nexport const tableDataGridConfigSchema = {\n  type: 'object',\n  properties: {\n    title: chartTitle,\n  },\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type TableDataGridConfigOptions = FromSchemaWithOptions<typeof tableDataGridConfigSchema>\n\nexport const metricCardSchema = {\n  type: 'object',\n  properties: {\n    chart_title: chartTitle,\n    type: {\n      type: 'string',\n      enum: ['golden_signals'],\n    },\n    long_card_titles: {\n      type: 'boolean',\n    },\n    description: {\n      type: 'string',\n    },\n    percentile_latency: {\n      type: 'boolean',\n    },\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type MetricCardOptions = FromSchemaWithOptions<typeof metricCardSchema>\n\nexport const singleValueSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['single_value'],\n    },\n    decimal_points: {\n      type: 'number',\n    },\n    chart_title: chartTitle,\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type SingleValueOptions = FromSchemaWithOptions<typeof singleValueSchema>\n\nexport const choroplethMapSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['choropleth_map'],\n    },\n    chart_title: chartTitle,\n    fit_to_country: {\n      type: 'string',\n      enum: COUNTRIES.map(c => c.code),\n    },\n    legend: {\n      type: 'boolean',\n      default: false,\n    },\n    bounds: {\n      type: 'array',\n      minItems: 2,\n      maxItems: 2,\n      items: {\n        type: 'array',\n        minItems: 2,\n        maxItems: 2,\n        items: [\n          { type: 'number', minimum: -180, maximum: 180 },\n          { type: 'number', minimum: -90, maximum: 90 },\n        ],\n      },\n    },\n  },\n  required: ['type'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type ChoroplethMapOptions = FromSchemaWithOptions<typeof choroplethMapSchema>\n\nconst exploreV4RelativeTimeSchema = {\n  type: 'object',\n  properties: {\n    tz: {\n      type: 'string',\n      default: 'Etc/UTC',\n    },\n    type: {\n      type: 'string',\n      enum: [\n        'relative',\n      ],\n    },\n    time_range: {\n      type: 'string',\n    },\n  },\n  required: [\n    'type',\n    'time_range',\n  ],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nconst exploreV4AbsoluteTimeSchema = {\n  type: 'object',\n  description: 'A duration representing an exact start and end time.',\n  properties: {\n    tz: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n      enum: [\n        'absolute',\n      ],\n    },\n    start: {\n      type: 'string',\n    },\n    end: {\n      type: 'string',\n    },\n  },\n  required: [\n    'type',\n    'start',\n    'end',\n  ],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nconst baseQueryProperties = {\n  granularity: {\n    type: 'string',\n    description: 'Force time grouping into buckets of this duration. Only has an effect if \"time\" is in the \"dimensions\" list.',\n    enum: granularityValues,\n  },\n  time_range: {\n    type: 'object',\n    description: 'The time range to query.',\n    anyOf: [\n      exploreV4RelativeTimeSchema,\n      exploreV4AbsoluteTimeSchema,\n    ],\n    default: {\n      type: 'relative',\n      time_range: '1h',\n    },\n  },\n  limit: {\n    type: 'number',\n  },\n  meta: {\n    type: 'object',\n  },\n} as const\n\nconst metricsFn = <T extends readonly string[] | undefined>(aggregations?: T) => ({\n  type: 'array',\n  description: 'List of aggregated metrics to collect across the requested time span.',\n  items: {\n    type: 'string',\n    ...(aggregations ? { enum: aggregations } : {}),\n  },\n} as const satisfies JSONSchema)\n\nconst dimensionsFn = <T extends readonly string[] | undefined>(dimensions?: T) => ({\n  type: 'array',\n  description: 'List of attributes or entity types to group by.',\n  minItems: 0,\n  maxItems: 3,\n  items: {\n    type: 'string',\n    ...(dimensions ? { enum: dimensions } : {}),\n  },\n} as const satisfies JSONSchema)\n\nconst filtersFn = <T extends readonly string[] | undefined>(filterableDimensions?: T) => ({\n  type: 'array',\n  description: 'A list of filters to apply to the query',\n  items: {\n    oneOf: [\n      {\n        type: 'object',\n        description: 'In filter',\n        properties: {\n          field: {\n            type: 'string',\n            ...(filterableDimensions ? { enum: filterableDimensions } : {}),\n          },\n          operator: {\n            type: 'string',\n            enum: exploreFilterTypesV2,\n          },\n          value: {\n            type: 'array',\n            items: {\n              type: ['string', 'number', 'null'],\n            },\n          },\n        },\n        required: [\n          'field',\n          'operator',\n          'value',\n        ],\n        additionalProperties: false,\n      },\n      {\n        type: 'object',\n        description: 'Empty filter',\n        properties: {\n          field: {\n            type: 'string',\n            ...(filterableDimensions ? { enum: filterableDimensions } : {}),\n          },\n          operator: {\n            type: 'string',\n            enum: requestFilterTypeEmptyV2,\n          },\n        },\n        required: [\n          'field',\n          'operator',\n        ],\n        additionalProperties: false,\n      },\n    ],\n  },\n} as const satisfies JSONSchema)\n\nconst platformFiltersFn = () => ({\n  type: 'array',\n  description: 'A list of filters to apply to the platform query',\n  items: {\n    oneOf: [\n      {\n        type: 'object',\n        description: 'In filter',\n        properties: {\n          field: {\n            type: 'string',\n          },\n          operator: {\n            type: 'string',\n          },\n          value: {\n            type: 'array',\n            items: {\n              type: ['string', 'number', 'null'],\n            },\n          },\n        },\n        required: [\n          'field',\n          'operator',\n          'value',\n        ],\n        additionalProperties: false,\n      },\n      {\n        type: 'object',\n        description: 'Empty filter',\n        properties: {\n          field: {\n            type: 'string',\n          },\n          operator: {\n            type: 'string',\n          },\n        },\n        required: [\n          'field',\n          'operator',\n        ],\n        additionalProperties: false,\n      },\n    ],\n  },\n} as const satisfies JSONSchema)\n\nexport const apiUsageQuerySchema = {\n  type: 'object',\n  description: 'A query to launch at the advanced explore API',\n  properties: {\n    datasource: {\n      type: 'string',\n      enum: [\n        'api_usage',\n      ],\n    },\n    metrics: metricsFn(exploreAggregations),\n    dimensions: dimensionsFn(queryableExploreDimensions),\n    filters: filtersFn(filterableExploreDimensions),\n    ...baseQueryProperties,\n  },\n  required: ['datasource'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const basicQuerySchema = {\n  type: 'object',\n  description: 'A query to launch at the basic explore API',\n  properties: {\n    datasource: {\n      type: 'string',\n      enum: [\n        'basic',\n      ],\n    },\n    metrics: metricsFn(basicExploreAggregations),\n    dimensions: dimensionsFn(queryableBasicExploreDimensions),\n    filters: filtersFn(filterableBasicExploreDimensions),\n    ...baseQueryProperties,\n  },\n  required: ['datasource'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const llmUsageSchema = {\n  type: 'object',\n  description: 'A query to launch at the AI explore API',\n  properties: {\n    datasource: {\n      type: 'string',\n      enum: [\n        'llm_usage',\n      ],\n    },\n    metrics: metricsFn(aiExploreAggregations),\n    dimensions: dimensionsFn(queryableAiExploreDimensions),\n    filters: filtersFn(filterableAiExploreDimensions),\n    ...baseQueryProperties,\n  },\n  required: ['datasource'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const agenticUsageSchema = {\n  type: 'object',\n  description: 'A query to launch at the Agentic explore API',\n  properties: {\n    datasource: {\n      type: 'string',\n      enum: [\n        'agentic_usage',\n      ],\n    },\n    metrics: metricsFn(agenticExploreAggregations),\n    dimensions: dimensionsFn(queryableAgenticExploreDimensions),\n    filters: filtersFn(filterableAgenticExploreDimensions),\n    ...baseQueryProperties,\n  },\n  required: ['datasource'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const platformQuerySchema = {\n  type: 'object',\n  description: 'A query to launch at the platform dashboard API',\n  properties: {\n    datasource: {\n      type: 'string',\n      enum: [\n        'platform',\n      ],\n    },\n    metrics: metricsFn(),\n    dimensions: dimensionsFn(),\n    filters: platformFiltersFn(),\n    ...baseQueryProperties,\n  },\n  required: ['datasource'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const platformTabularQuerySchema = {\n  type: 'object',\n  description: 'A query to launch at the platform tabular explore API',\n  properties: {\n    datasource: {\n      type: 'string',\n      enum: [\n        'platform',\n      ],\n    },\n    entity: {\n      type: 'string',\n    },\n    columns: {\n      type: 'array',\n      minItems: 1,\n      items: {\n        type: 'string',\n      },\n    },\n    filters: platformFiltersFn(),\n    cursor: {\n      type: 'string',\n    },\n    page_size: {\n      type: 'number',\n    },\n  },\n  required: ['datasource'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nconst validDashboardChartQuerySchemas = [\n  apiUsageQuerySchema,\n  basicQuerySchema,\n  llmUsageSchema,\n  agenticUsageSchema,\n  platformQuerySchema,\n] as const\n\nexport const validDashboardChartQuery = {\n  anyOf: validDashboardChartQuerySchemas,\n} as const satisfies JSONSchema\n\nexport type ValidDashboardChartQuery = FromSchemaWithOptions<typeof validDashboardChartQuery>\n\nconst validDashboardTableQuerySchemas = [\n  platformTabularQuerySchema,\n] as const\n\nexport const validDashboardTableQuery = {\n  anyOf: validDashboardTableQuerySchemas,\n} as const satisfies JSONSchema\n\nexport type ValidDashboardTableQuery = FromSchemaWithOptions<typeof validDashboardTableQuery>\n\nexport const validDashboardQuery = {\n  anyOf: [\n    ...validDashboardChartQuerySchemas,\n    ...validDashboardTableQuerySchemas,\n  ],\n} as const satisfies JSONSchema\n\nexport type ValidDashboardQuery = FromSchemaWithOptions<typeof validDashboardQuery>\n\nconst dashboardTileChartSchema = {\n  anyOf: [\n    barChartSchema,\n    gaugeChartSchema,\n    donutChartSchema,\n    timeseriesChartSchema,\n    metricCardSchema,\n    topNTableSchema,\n    slottableSchema,\n    singleValueSchema,\n    choroplethMapSchema,\n  ],\n} as const satisfies JSONSchema\n\nconst chartTileDefinitionSchema = {\n  type: 'object',\n  properties: {\n    query: validDashboardChartQuery,\n    chart: dashboardTileChartSchema,\n  },\n  required: ['query', 'chart'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type ChartTileDefinition = FromSchemaWithOptions<typeof chartTileDefinitionSchema>\n\nconst tableTileDefinitionSchema = {\n  type: 'object',\n  properties: {\n    query: validDashboardTableQuery,\n    config: tableDataGridConfigSchema,\n  },\n  required: ['query', 'config'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type TableTileDefinition = FromSchemaWithOptions<typeof tableTileDefinitionSchema>\n\nexport const tileDefinitionSchema = {\n  anyOf: [\n    chartTileDefinitionSchema,\n    tableTileDefinitionSchema,\n  ],\n} as const satisfies JSONSchema\n\nexport type TileDefinition = FromSchemaWithOptions<typeof tileDefinitionSchema>\n\nexport const tileLayoutSchema = {\n  type: 'object',\n  properties: {\n    position: {\n      type: 'object',\n      properties: {\n        col: {\n          type: 'number',\n        },\n        row: {\n          type: 'number',\n        },\n      },\n      description: 'Position of the tile in the grid.',\n      required: ['col', 'row'],\n      additionalProperties: false,\n    },\n    size: {\n      type: 'object',\n      properties: {\n        cols: {\n          type: 'number',\n        },\n        rows: {\n          type: 'number',\n        },\n        fit_to_content: {\n          type: 'boolean',\n        },\n      },\n      description: 'Number of columns and rows the tile occupies.  If fitToContent is true for every tile in a row, ' +\n        'and each tile only occupies 1 row, then the row will auto-fit to its content.',\n      required: ['cols', 'rows'],\n      additionalProperties: false,\n    },\n  },\n  required: ['position', 'size'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type TileLayout = FromSchemaWithOptions<typeof tileLayoutSchema>\n\nexport const chartTileConfigSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['chart'],\n    },\n    definition: chartTileDefinitionSchema,\n    layout: tileLayoutSchema,\n    id: {\n      type: 'string',\n      description: 'Unique identifier for the tile.  If not provided, one will be generated.',\n    },\n  },\n  required: ['type', 'definition', 'layout'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const tableTileConfigSchema = {\n  type: 'object',\n  properties: {\n    type: {\n      type: 'string',\n      enum: ['table'],\n    },\n    definition: tableTileDefinitionSchema,\n    layout: tileLayoutSchema,\n    id: {\n      type: 'string',\n      description: 'Unique identifier for the tile.  If not provided, one will be generated.',\n    },\n  },\n  required: ['type', 'definition', 'layout'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport const tileConfigSchema = {\n  anyOf: [\n    chartTileConfigSchema,\n    tableTileConfigSchema,\n  ],\n} as const satisfies JSONSchema\n\nexport type TileConfig = FromSchemaWithOptions<typeof tileConfigSchema>\n\nexport const dashboardConfigSchema = {\n  type: 'object',\n  properties: {\n    tiles: {\n      type: 'array',\n      items: tileConfigSchema,\n    },\n    tile_height: {\n      type: 'number',\n      description: 'Height of each tile in pixels.',\n    },\n    columns: {\n      type: 'number',\n      description: 'Number of columns in the dashboard grid.',\n    },\n    preset_filters: filtersFn([\n      ...new Set([\n        ...filterableExploreDimensions,\n        ...filterableBasicExploreDimensions,\n        ...filterableAiExploreDimensions,\n        ...filterableAgenticExploreDimensions,\n      ]),\n    ]),\n    template_id: {\n      type: ['string', 'null'],\n      description: 'Template id which was used to instantiate this dashboard.',\n    },\n  },\n  required: ['tiles'],\n  additionalProperties: false,\n} as const satisfies JSONSchema\n\nexport type DashboardConfig = FromSchemaWithOptions<typeof dashboardConfigSchema>\n","import type { FilterDatasource } from './types'\nimport {\n  filterableAgenticExploreDimensions,\n  filterableAiExploreDimensions,\n  filterableBasicExploreDimensions,\n  filterableExploreDimensions,\n  filterableRequestDimensions,\n  filterableRequestMetrics,\n} from './types'\n\n\n/**\n * @deprecated Use `useDatasourceConfigStore().getFieldDataSources` from `@kong-ui-public/analytics-config-store`.\n */\nexport const getFieldDataSources = (\n  dimension: string,\n): FilterDatasource[] => {\n  const datasources: FilterDatasource[] = []\n\n  if ((filterableBasicExploreDimensions as string[]).includes(dimension)) {\n    datasources.push('basic')\n  }\n  if ((filterableExploreDimensions as string[]).includes(dimension)) {\n    datasources.push('api_usage')\n  }\n  if ((filterableAiExploreDimensions as string[]).includes(dimension)) {\n    datasources.push('llm_usage')\n  }\n  if ((filterableAgenticExploreDimensions as string[]).includes(dimension)) {\n    datasources.push('agentic_usage')\n  }\n  if ((filterableRequestDimensions as string[]).includes(dimension) || (filterableRequestMetrics as string[]).includes(dimension)) {\n    datasources.push('requests')\n  }\n\n  return datasources\n}\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.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","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","/**\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.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","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","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 { 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","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\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\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","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","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","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start 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 * @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 date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const laterStartOfDay = startOfDay(laterDate_);\n  const earlierStartOfDay = startOfDay(earlierDate_);\n\n  const laterTimestamp =\n    +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n  const earlierTimestamp =\n    +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n  // Round the number of days to the nearest integer because the number of\n  // milliseconds in a day is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year 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 * @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 date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n  const date_ = toDate(date, options?.in);\n  date_.setFullYear(date_.getFullYear(), 0, 1);\n  date_.setHours(0, 0, 0, 0);\n  return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = differenceInCalendarDays(_date, startOfYear(_date));\n  const dayOfYear = diff + 1;\n  return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week 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 * @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 date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const _date = toDate(date, options?.in);\n  const day = _date.getDay();\n  const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n  _date.setDate(_date.getDate() - diff);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\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 date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n  return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n\n  const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n  fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n  const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n  fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n  fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n  if (_date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (_date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\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 date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n  const year = getISOWeekYear(date, options);\n  const fourthOfJanuary = constructFrom(options?.in || date, 0);\n  fourthOfJanuary.setFullYear(year, 0, 4);\n  fourthOfJanuary.setHours(0, 0, 0, 0);\n  return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n  firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n  firstWeekOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n  const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n  firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeekOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n  if (+_date >= +startOfNextYear) {\n    return year + 1;\n  } else if (+_date >= +startOfThisYear) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\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.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const year = getWeekYear(date, options);\n  const firstWeek = constructFrom(options?.in || date, 0);\n  firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeek.setHours(0, 0, 0, 0);\n  const _date = startOfWeek(firstWeek, options);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n  const sign = number < 0 ? \"-\" : \"\";\n  const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n  return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* |                                |\n * |  d  | Day of month                   |  D  |                                |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  m  | Minute                         |  M  | Month                          |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  y  | Year (abs)                     |  Y  |                                |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n  // Year\n  y(date, token) {\n    // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n    // | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n    // |----------|-------|----|-------|-------|-------|\n    // | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n    // | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n    // | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n    // | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n    // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n    const signedYear = date.getFullYear();\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const year = signedYear > 0 ? signedYear : 1 - signedYear;\n    return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n  },\n\n  // Month\n  M(date, token) {\n    const month = date.getMonth();\n    return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n  },\n\n  // Day of the month\n  d(date, token) {\n    return addLeadingZeros(date.getDate(), token.length);\n  },\n\n  // AM or PM\n  a(date, token) {\n    const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return dayPeriodEnumValue.toUpperCase();\n      case \"aaa\":\n        return dayPeriodEnumValue;\n      case \"aaaaa\":\n        return dayPeriodEnumValue[0];\n      case \"aaaa\":\n      default:\n        return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n    }\n  },\n\n  // Hour [1-12]\n  h(date, token) {\n    return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n  },\n\n  // Hour [0-23]\n  H(date, token) {\n    return addLeadingZeros(date.getHours(), token.length);\n  },\n\n  // Minute\n  m(date, token) {\n    return addLeadingZeros(date.getMinutes(), token.length);\n  },\n\n  // Second\n  s(date, token) {\n    return addLeadingZeros(date.getSeconds(), token.length);\n  },\n\n  // Fraction of second\n  S(date, token) {\n    const numberOfDigits = token.length;\n    const milliseconds = date.getMilliseconds();\n    const fractionalSeconds = Math.trunc(\n      milliseconds * Math.pow(10, numberOfDigits - 3),\n    );\n    return addLeadingZeros(fractionalSeconds, token.length);\n  },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\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\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |\n * |  p! | Long localized time            |  P! | Long localized date            |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n  // Era\n  G: function (date, token, localize) {\n    const era = date.getFullYear() > 0 ? 1 : 0;\n    switch (token) {\n      // AD, BC\n      case \"G\":\n      case \"GG\":\n      case \"GGG\":\n        return localize.era(era, { width: \"abbreviated\" });\n      // A, B\n      case \"GGGGG\":\n        return localize.era(era, { width: \"narrow\" });\n      // Anno Domini, Before Christ\n      case \"GGGG\":\n      default:\n        return localize.era(era, { width: \"wide\" });\n    }\n  },\n\n  // Year\n  y: function (date, token, localize) {\n    // Ordinal number\n    if (token === \"yo\") {\n      const signedYear = date.getFullYear();\n      // Returns 1 for 1 BC (which is year 0 in JavaScript)\n      const year = signedYear > 0 ? signedYear : 1 - signedYear;\n      return localize.ordinalNumber(year, { unit: \"year\" });\n    }\n\n    return lightFormatters.y(date, token);\n  },\n\n  // Local week-numbering year\n  Y: function (date, token, localize, options) {\n    const signedWeekYear = getWeekYear(date, options);\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n    // Two digit year\n    if (token === \"YY\") {\n      const twoDigitYear = weekYear % 100;\n      return addLeadingZeros(twoDigitYear, 2);\n    }\n\n    // Ordinal number\n    if (token === \"Yo\") {\n      return localize.ordinalNumber(weekYear, { unit: \"year\" });\n    }\n\n    // Padding\n    return addLeadingZeros(weekYear, token.length);\n  },\n\n  // ISO week-numbering year\n  R: function (date, token) {\n    const isoWeekYear = getISOWeekYear(date);\n\n    // Padding\n    return addLeadingZeros(isoWeekYear, token.length);\n  },\n\n  // Extended year. This is a single number designating the year of this calendar system.\n  // The main difference between `y` and `u` localizers are B.C. years:\n  // | Year | `y` | `u` |\n  // |------|-----|-----|\n  // | AC 1 |   1 |   1 |\n  // | BC 1 |   1 |   0 |\n  // | BC 2 |   2 |  -1 |\n  // Also `yy` always returns the last two digits of a year,\n  // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n  u: function (date, token) {\n    const year = date.getFullYear();\n    return addLeadingZeros(year, token.length);\n  },\n\n  // Quarter\n  Q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"Q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"QQ\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"Qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"QQQ\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"QQQQQ\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"QQQQ\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone quarter\n  q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"qq\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"qqq\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"qqqqq\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"qqqq\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // Month\n  M: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      case \"M\":\n      case \"MM\":\n        return lightFormatters.M(date, token);\n      // 1st, 2nd, ..., 12th\n      case \"Mo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"MMM\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // J, F, ..., D\n      case \"MMMMM\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // January, February, ..., December\n      case \"MMMM\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"formatting\" });\n    }\n  },\n\n  // Stand-alone month\n  L: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      // 1, 2, ..., 12\n      case \"L\":\n        return String(month + 1);\n      // 01, 02, ..., 12\n      case \"LL\":\n        return addLeadingZeros(month + 1, 2);\n      // 1st, 2nd, ..., 12th\n      case \"Lo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"LLL\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // J, F, ..., D\n      case \"LLLLL\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // January, February, ..., December\n      case \"LLLL\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"standalone\" });\n    }\n  },\n\n  // Local week of year\n  w: function (date, token, localize, options) {\n    const week = getWeek(date, options);\n\n    if (token === \"wo\") {\n      return localize.ordinalNumber(week, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(week, token.length);\n  },\n\n  // ISO week of year\n  I: function (date, token, localize) {\n    const isoWeek = getISOWeek(date);\n\n    if (token === \"Io\") {\n      return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(isoWeek, token.length);\n  },\n\n  // Day of the month\n  d: function (date, token, localize) {\n    if (token === \"do\") {\n      return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n    }\n\n    return lightFormatters.d(date, token);\n  },\n\n  // Day of year\n  D: function (date, token, localize) {\n    const dayOfYear = getDayOfYear(date);\n\n    if (token === \"Do\") {\n      return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n    }\n\n    return addLeadingZeros(dayOfYear, token.length);\n  },\n\n  // Day of week\n  E: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    switch (token) {\n      // Tue\n      case \"E\":\n      case \"EE\":\n      case \"EEE\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"EEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"EEEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"EEEE\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Local day of week\n  e: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (Nth day of week with current locale or weekStartsOn)\n      case \"e\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"ee\":\n        return addLeadingZeros(localDayOfWeek, 2);\n      // 1st, 2nd, ..., 7th\n      case \"eo\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"eee\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"eeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"eeeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"eeee\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone local day of week\n  c: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (same as in `e`)\n      case \"c\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"cc\":\n        return addLeadingZeros(localDayOfWeek, token.length);\n      // 1st, 2nd, ..., 7th\n      case \"co\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"ccc\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // T\n      case \"ccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // Tu\n      case \"cccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"standalone\",\n        });\n      // Tuesday\n      case \"cccc\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // ISO day of week\n  i: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n    switch (token) {\n      // 2\n      case \"i\":\n        return String(isoDayOfWeek);\n      // 02\n      case \"ii\":\n        return addLeadingZeros(isoDayOfWeek, token.length);\n      // 2nd\n      case \"io\":\n        return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n      // Tue\n      case \"iii\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"iiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"iiiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"iiii\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM or PM\n  a: function (date, token, localize) {\n    const hours = date.getHours();\n    const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"aaa\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"aaaaa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"aaaa\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM, PM, midnight, noon\n  b: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours === 12) {\n      dayPeriodEnumValue = dayPeriodEnum.noon;\n    } else if (hours === 0) {\n      dayPeriodEnumValue = dayPeriodEnum.midnight;\n    } else {\n      dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n    }\n\n    switch (token) {\n      case \"b\":\n      case \"bb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"bbb\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"bbbbb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"bbbb\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // in the morning, in the afternoon, in the evening, at night\n  B: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours >= 17) {\n      dayPeriodEnumValue = dayPeriodEnum.evening;\n    } else if (hours >= 12) {\n      dayPeriodEnumValue = dayPeriodEnum.afternoon;\n    } else if (hours >= 4) {\n      dayPeriodEnumValue = dayPeriodEnum.morning;\n    } else {\n      dayPeriodEnumValue = dayPeriodEnum.night;\n    }\n\n    switch (token) {\n      case \"B\":\n      case \"BB\":\n      case \"BBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"BBBBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"BBBB\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Hour [1-12]\n  h: function (date, token, localize) {\n    if (token === \"ho\") {\n      let hours = date.getHours() % 12;\n      if (hours === 0) hours = 12;\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return lightFormatters.h(date, token);\n  },\n\n  // Hour [0-23]\n  H: function (date, token, localize) {\n    if (token === \"Ho\") {\n      return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n    }\n\n    return lightFormatters.H(date, token);\n  },\n\n  // Hour [0-11]\n  K: function (date, token, localize) {\n    const hours = date.getHours() % 12;\n\n    if (token === \"Ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Hour [1-24]\n  k: function (date, token, localize) {\n    let hours = date.getHours();\n    if (hours === 0) hours = 24;\n\n    if (token === \"ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Minute\n  m: function (date, token, localize) {\n    if (token === \"mo\") {\n      return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n    }\n\n    return lightFormatters.m(date, token);\n  },\n\n  // Second\n  s: function (date, token, localize) {\n    if (token === \"so\") {\n      return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n    }\n\n    return lightFormatters.s(date, token);\n  },\n\n  // Fraction of second\n  S: function (date, token) {\n    return lightFormatters.S(date, token);\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n  X: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    if (timezoneOffset === 0) {\n      return \"Z\";\n    }\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"X\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XX`\n      case \"XXXX\":\n      case \"XX\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XXX`\n      case \"XXXXX\":\n      case \"XXX\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n  x: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"x\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xx`\n      case \"xxxx\":\n      case \"xx\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xxx`\n      case \"xxxxx\":\n      case \"xxx\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (GMT)\n  O: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"O\":\n      case \"OO\":\n      case \"OOO\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"OOOO\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (specific non-location)\n  z: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"z\":\n      case \"zz\":\n      case \"zzz\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"zzzz\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Seconds timestamp\n  t: function (date, token, _localize) {\n    const timestamp = Math.trunc(+date / 1000);\n    return addLeadingZeros(timestamp, token.length);\n  },\n\n  // Milliseconds timestamp\n  T: function (date, token, _localize) {\n    return addLeadingZeros(+date, token.length);\n  },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = Math.trunc(absOffset / 60);\n  const minutes = absOffset % 60;\n  if (minutes === 0) {\n    return sign + String(hours);\n  }\n  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n  if (offset % 60 === 0) {\n    const sign = offset > 0 ? \"-\" : \"+\";\n    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n  }\n  return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n  const minutes = addLeadingZeros(absOffset % 60, 2);\n  return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"P\":\n      return formatLong.date({ width: \"short\" });\n    case \"PP\":\n      return formatLong.date({ width: \"medium\" });\n    case \"PPP\":\n      return formatLong.date({ width: \"long\" });\n    case \"PPPP\":\n    default:\n      return formatLong.date({ width: \"full\" });\n  }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"p\":\n      return formatLong.time({ width: \"short\" });\n    case \"pp\":\n      return formatLong.time({ width: \"medium\" });\n    case \"ppp\":\n      return formatLong.time({ width: \"long\" });\n    case \"pppp\":\n    default:\n      return formatLong.time({ width: \"full\" });\n  }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n  const matchResult = pattern.match(/(P+)(p+)?/) || [];\n  const datePattern = matchResult[1];\n  const timePattern = matchResult[2];\n\n  if (!timePattern) {\n    return dateLongFormatter(pattern, formatLong);\n  }\n\n  let dateTimeFormat;\n\n  switch (datePattern) {\n    case \"P\":\n      dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n      break;\n    case \"PP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n      break;\n    case \"PPP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n      break;\n    case \"PPPP\":\n    default:\n      dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n      break;\n  }\n\n  return dateTimeFormat\n    .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n    .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n  p: timeLongFormatter,\n  P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n  return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n  return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n  const _message = message(token, format, input);\n  console.warn(_message);\n  if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n  const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n  return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n  return (\n    value instanceof Date ||\n    (typeof value === \"object\" &&\n      Object.prototype.toString.call(value) === \"[object Date]\")\n  );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n  return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n  isProtectedDayOfYearToken,\n  isProtectedWeekYearToken,\n  warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n  /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          | a..aa   | AM, PM                            |       |\n * |                                 | aaa     | am, pm                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |\n * |                                 | bbb     | am, pm, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 001, ..., 999                |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |\n * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 04/29/1453                        | 7     |\n * |                                 | PP      | Apr 29, 1453                      | 7     |\n * |                                 | PPP     | April 29th, 1453                  | 7     |\n * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |\n * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n *    and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n *    so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n  const defaultOptions = getDefaultOptions();\n  const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const originalDate = toDate(date, options?.in);\n\n  if (!isValid(originalDate)) {\n    throw new RangeError(\"Invalid time value\");\n  }\n\n  let parts = formatStr\n    .match(longFormattingTokensRegExp)\n    .map((substring) => {\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n        const longFormatter = longFormatters[firstCharacter];\n        return longFormatter(substring, locale.formatLong);\n      }\n      return substring;\n    })\n    .join(\"\")\n    .match(formattingTokensRegExp)\n    .map((substring) => {\n      // Replace two single quote characters with one single quote character\n      if (substring === \"''\") {\n        return { isToken: false, value: \"'\" };\n      }\n\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"'\") {\n        return { isToken: false, value: cleanEscapedString(substring) };\n      }\n\n      if (formatters[firstCharacter]) {\n        return { isToken: true, value: substring };\n      }\n\n      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n        throw new RangeError(\n          \"Format string contains an unescaped latin alphabet character `\" +\n            firstCharacter +\n            \"`\",\n        );\n      }\n\n      return { isToken: false, value: substring };\n    });\n\n  // invoke localize preprocessor (only for french locales at the moment)\n  if (locale.localize.preprocessor) {\n    parts = locale.localize.preprocessor(originalDate, parts);\n  }\n\n  const formatterOptions = {\n    firstWeekContainsDate,\n    weekStartsOn,\n    locale,\n  };\n\n  return parts\n    .map((part) => {\n      if (!part.isToken) return part.value;\n\n      const token = part.value;\n\n      if (\n        (!options?.useAdditionalWeekYearTokens &&\n          isProtectedWeekYearToken(token)) ||\n        (!options?.useAdditionalDayOfYearTokens &&\n          isProtectedDayOfYearToken(token))\n      ) {\n        warnOrThrowProtectedError(token, formatStr, String(date));\n      }\n\n      const formatter = formatters[token[0]];\n      return formatter(originalDate, token, locale.localize, formatterOptions);\n    })\n    .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n  const matched = input.match(escapedStringRegExp);\n\n  if (!matched) {\n    return input;\n  }\n\n  return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * **You don't need date-fns\\***:\n *\n * Temporal has a built-in `add` method on all its classes:\n *\n * - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)\n * - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)\n * - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)\n * - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)\n * - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)\n * - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)\n *\n * \\* **Not really**, see: https://date-fns.org/you-dont-need-date-fns\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 date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n *\n * @example\n * // Using Temporal:\n * // Add 10 days to 1 September 2014:\n * Temporal.PlainDate.from(\"2014-09-01\").add({ days: 10 }).toString();\n * //=> \"2014-09-11\"\n */\nexport function addDays(date, amount, options) {\n  const _date = toDate(date, options?.in);\n  if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n  // If 0 days, no-op to avoid changing times in the hour before end of DST\n  if (!amount) return _date;\n\n  _date.setDate(_date.getDate() + amount);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\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 date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n  const _date = toDate(date, options?.in);\n  if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return _date;\n  }\n  const dayOfMonth = _date.getDate();\n\n  // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n  const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n  endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n  const daysInMonth = endOfDesiredMonth.getDate();\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    _date.setFullYear(\n      endOfDesiredMonth.getFullYear(),\n      endOfDesiredMonth.getMonth(),\n      dayOfMonth,\n    );\n    return _date;\n  }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addQuarters} function options.\n */\n\n/**\n * @name addQuarters\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\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 date - The date to be changed\n * @param amount - The amount of quarters to be added.\n * @param options - An object with options\n *\n * @returns The new date with the quarters added\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * const result = addQuarters(new Date(2014, 8, 1), 1)\n * //=; Mon Dec 01 2014 00:00:00\n */\nexport function addQuarters(date, amount, options) {\n  return addMonths(date, amount * 3, options);\n}\n\n// Fallback for modularized imports:\nexport default addQuarters;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfQuarter} function options.\n */\n\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter 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 * @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 date - The original date\n * @param options - The options\n *\n * @returns The start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nexport function startOfQuarter(date, options) {\n  const _date = toDate(date, options?.in);\n  const currentMonth = _date.getMonth();\n  const month = currentMonth - (currentMonth % 3);\n  _date.setMonth(month, 1);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfQuarter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * 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,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setDate(1);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n  const monthIndex = _date.getMonth();\n  const lastDayOfMonth = constructFrom(_date, 0);\n  lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n  lastDayOfMonth.setHours(0, 0, 0, 0);\n  return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { getDefaultOptions as getInternalDefaultOptions } from \"./_lib/defaultOptions.js\";\n\n/**\n * @name getDefaultOptions\n * @category Common Helpers\n * @summary Get default options.\n * @pure false\n *\n * @description\n * Returns an object that contains defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).\n *\n * @returns The default options\n *\n * @example\n * const result = getDefaultOptions()\n * //=> {}\n *\n * @example\n * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })\n * const result = getDefaultOptions()\n * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }\n */\nexport function getDefaultOptions() {\n  return Object.assign({}, getInternalDefaultOptions());\n}\n\n// Fallback for modularized imports:\nexport default getDefaultOptions;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name getTime\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * @param date - The given date\n *\n * @returns The timestamp\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * const result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\nexport function getTime(date) {\n  return +toDate(date);\n}\n\n// Fallback for modularized imports:\nexport default getTime;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name getUnixTime\n * @category Timestamp Helpers\n * @summary Get the seconds timestamp of the given date.\n *\n * @description\n * Get the seconds timestamp of the given date.\n *\n * @param date - The given date\n *\n * @returns The timestamp\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05 CET:\n * const result = getUnixTime(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 1330512305\n */\nexport function getUnixTime(date) {\n  return Math.trunc(+toDate(date) / 1000);\n}\n\n// Fallback for modularized imports:\nexport default getUnixTime;\n","import { secondsInHour } from \"./constants.js\";\n\n/**\n * @name hoursToSeconds\n * @category Conversion Helpers\n * @summary Convert hours to seconds.\n *\n * @description\n * Convert a number of hours to a full number of seconds.\n *\n * @param hours - The number of hours to be converted\n *\n * @returns The number of hours converted in seconds\n *\n * @example\n * // Convert 2 hours to seconds:\n * const result = hoursToSeconds(2)\n * //=> 7200\n */\nexport function hoursToSeconds(hours) {\n  return Math.trunc(hours * secondsInHour);\n}\n\n// Fallback for modularized imports:\nexport default hoursToSeconds;\n","import { minutesInHour } from \"./constants.js\";\n\n/**\n * @name minutesToHours\n * @category Conversion Helpers\n * @summary Convert minutes to hours.\n *\n * @description\n * Convert a number of minutes to a full number of hours.\n *\n * @param minutes - The number of minutes to be converted\n *\n * @returns The number of minutes converted in hours\n *\n * @example\n * // Convert 140 minutes to hours:\n * const result = minutesToHours(120)\n * //=> 2\n *\n * @example\n * // It uses floor rounding:\n * const result = minutesToHours(179)\n * //=> 2\n */\nexport function minutesToHours(minutes) {\n  const hours = minutes / minutesInHour;\n  return Math.trunc(hours);\n}\n\n// Fallback for modularized imports:\nexport default minutesToHours;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\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 date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n  return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","import { addQuarters } from \"./addQuarters.js\";\n\n/**\n * The {@link subQuarters} function options.\n */\n\n/**\n * @name subQuarters\n * @category Quarter Helpers\n * @summary Subtract the specified number of year quarters from the given date.\n *\n * @description\n * Subtract the specified number of year quarters from the given date.\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 date - The date to be changed\n * @param amount - The amount of quarters to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the quarters subtracted\n *\n * @example\n * // Subtract 3 quarters from 1 September 2014:\n * const result = subQuarters(new Date(2014, 8, 1), 3)\n * //=> Sun Dec 01 2013 00:00:00\n */\nexport function subQuarters(date, amount, options) {\n  return addQuarters(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subQuarters;\n","import { getDefaultOptions } from 'date-fns';\n/**\n * Returns the formatted time zone name of the provided `timeZone` or the current\n * system time zone if omitted, accounting for DST according to the UTC value of\n * the date.\n */\nexport function tzIntlTimeZoneName(length, date, options) {\n    const defaultOptions = getDefaultOptions();\n    const dtf = getDTF(length, options.timeZone, options.locale ?? defaultOptions.locale);\n    return 'formatToParts' in dtf ? partsTimeZone(dtf, date) : hackyTimeZone(dtf, date);\n}\nfunction partsTimeZone(dtf, date) {\n    const formatted = dtf.formatToParts(date);\n    for (let i = formatted.length - 1; i >= 0; --i) {\n        if (formatted[i].type === 'timeZoneName') {\n            return formatted[i].value;\n        }\n    }\n    return undefined;\n}\nfunction hackyTimeZone(dtf, date) {\n    const formatted = dtf.format(date).replace(/\\u200E/g, '');\n    const tzNameMatch = / [\\w-+ ]+$/.exec(formatted);\n    return tzNameMatch ? tzNameMatch[0].substr(1) : '';\n}\n// If a locale has been provided `en-US` is used as a fallback in case it is an\n// invalid locale, otherwise the locale is left undefined to use the system locale.\nfunction getDTF(length, timeZone, locale) {\n    return new Intl.DateTimeFormat(locale ? [locale.code, 'en-US'] : undefined, {\n        timeZone: timeZone,\n        timeZoneName: length,\n    });\n}\n","/**\n * Returns the [year, month, day, hour, minute, seconds] tokens of the provided\n * `date` as it will be rendered in the `timeZone`.\n */\nexport function tzTokenizeDate(date, timeZone) {\n    const dtf = getDateTimeFormat(timeZone);\n    return 'formatToParts' in dtf ? partsOffset(dtf, date) : hackyOffset(dtf, date);\n}\nconst typeToPos = {\n    year: 0,\n    month: 1,\n    day: 2,\n    hour: 3,\n    minute: 4,\n    second: 5,\n};\nfunction partsOffset(dtf, date) {\n    try {\n        const formatted = dtf.formatToParts(date);\n        const filled = [];\n        for (let i = 0; i < formatted.length; i++) {\n            const pos = typeToPos[formatted[i].type];\n            if (pos !== undefined) {\n                filled[pos] = parseInt(formatted[i].value, 10);\n            }\n        }\n        return filled;\n    }\n    catch (error) {\n        if (error instanceof RangeError) {\n            return [NaN];\n        }\n        throw error;\n    }\n}\nfunction hackyOffset(dtf, date) {\n    const formatted = dtf.format(date);\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted);\n    // const [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed\n    // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]\n    return [\n        parseInt(parsed[3], 10),\n        parseInt(parsed[1], 10),\n        parseInt(parsed[2], 10),\n        parseInt(parsed[4], 10),\n        parseInt(parsed[5], 10),\n        parseInt(parsed[6], 10),\n    ];\n}\n// Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used\n// to get deterministic local date/time output according to the `en-US` locale which\n// can be used to extract local time parts as necessary.\nconst dtfCache = {};\n// New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`\nconst testDateFormatted = new Intl.DateTimeFormat('en-US', {\n    hourCycle: 'h23',\n    timeZone: 'America/New_York',\n    year: 'numeric',\n    month: '2-digit',\n    day: '2-digit',\n    hour: '2-digit',\n    minute: '2-digit',\n    second: '2-digit',\n}).format(new Date('2014-06-25T04:00:00.123Z'));\nconst hourCycleSupported = testDateFormatted === '06/25/2014, 00:00:00' ||\n    testDateFormatted === '‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00';\nfunction getDateTimeFormat(timeZone) {\n    if (!dtfCache[timeZone]) {\n        dtfCache[timeZone] = hourCycleSupported\n            ? new Intl.DateTimeFormat('en-US', {\n                hourCycle: 'h23',\n                timeZone: timeZone,\n                year: 'numeric',\n                month: 'numeric',\n                day: '2-digit',\n                hour: '2-digit',\n                minute: '2-digit',\n                second: '2-digit',\n            })\n            : new Intl.DateTimeFormat('en-US', {\n                hour12: false,\n                timeZone: timeZone,\n                year: 'numeric',\n                month: 'numeric',\n                day: '2-digit',\n                hour: '2-digit',\n                minute: '2-digit',\n                second: '2-digit',\n            });\n    }\n    return dtfCache[timeZone];\n}\n","/**\n * Use instead of `new Date(Date.UTC(...))` to support years below 100 which doesn't work\n * otherwise due to the nature of the\n * [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years.\n *\n * For `Date.UTC(...)`, use `newDateUTC(...).getTime()`.\n */\nexport function newDateUTC(fullYear, month, day, hour, minute, second, millisecond) {\n    const utcDate = new Date(0);\n    utcDate.setUTCFullYear(fullYear, month, day);\n    utcDate.setUTCHours(hour, minute, second, millisecond);\n    return utcDate;\n}\n","import { tzTokenizeDate } from '../tzTokenizeDate/index.js';\nimport { newDateUTC } from '../newDateUTC/index.js';\nconst MILLISECONDS_IN_HOUR = 3600000;\nconst MILLISECONDS_IN_MINUTE = 60000;\nconst patterns = {\n    timezone: /([Z+-].*)$/,\n    timezoneZ: /^(Z)$/,\n    timezoneHH: /^([+-]\\d{2})$/,\n    timezoneHHMM: /^([+-])(\\d{2}):?(\\d{2})$/,\n};\n// Parse constious time zone offset formats to an offset in milliseconds\nexport function tzParseTimezone(timezoneString, date, isUtcDate) {\n    // Empty string\n    if (!timezoneString) {\n        return 0;\n    }\n    // Z\n    let token = patterns.timezoneZ.exec(timezoneString);\n    if (token) {\n        return 0;\n    }\n    let hours;\n    let absoluteOffset;\n    // ±hh\n    token = patterns.timezoneHH.exec(timezoneString);\n    if (token) {\n        hours = parseInt(token[1], 10);\n        if (!validateTimezone(hours)) {\n            return NaN;\n        }\n        return -(hours * MILLISECONDS_IN_HOUR);\n    }\n    // ±hh:mm or ±hhmm\n    token = patterns.timezoneHHMM.exec(timezoneString);\n    if (token) {\n        hours = parseInt(token[2], 10);\n        const minutes = parseInt(token[3], 10);\n        if (!validateTimezone(hours, minutes)) {\n            return NaN;\n        }\n        absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n        return token[1] === '+' ? -absoluteOffset : absoluteOffset;\n    }\n    // IANA time zone\n    if (isValidTimezoneIANAString(timezoneString)) {\n        date = new Date(date || Date.now());\n        const utcDate = isUtcDate ? date : toUtcDate(date);\n        const offset = calcOffset(utcDate, timezoneString);\n        const fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString);\n        return -fixedOffset;\n    }\n    return NaN;\n}\nfunction toUtcDate(date) {\n    return newDateUTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n}\nfunction calcOffset(date, timezoneString) {\n    const tokens = tzTokenizeDate(date, timezoneString);\n    // ms dropped because it's not provided by tzTokenizeDate\n    const asUTC = newDateUTC(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();\n    let asTS = date.getTime();\n    const over = asTS % 1000;\n    asTS -= over >= 0 ? over : 1000 + over;\n    return asUTC - asTS;\n}\nfunction fixOffset(date, offset, timezoneString) {\n    const localTS = date.getTime();\n    // Our UTC time is just a guess because our offset is just a guess\n    let utcGuess = localTS - offset;\n    // Test whether the zone matches the offset for this ts\n    const o2 = calcOffset(new Date(utcGuess), timezoneString);\n    // If so, offset didn't change, and we're done\n    if (offset === o2) {\n        return offset;\n    }\n    // If not, change the ts by the difference in the offset\n    utcGuess -= o2 - offset;\n    // If that gives us the local time we want, we're done\n    const o3 = calcOffset(new Date(utcGuess), timezoneString);\n    if (o2 === o3) {\n        return o2;\n    }\n    // If it's different, we're in a hole time. The offset has changed, but we don't adjust the time\n    return Math.max(o2, o3);\n}\nfunction validateTimezone(hours, minutes) {\n    return -23 <= hours && hours <= 23 && (minutes == null || (0 <= minutes && minutes <= 59));\n}\nconst validIANATimezoneCache = {};\nfunction isValidTimezoneIANAString(timeZoneString) {\n    if (validIANATimezoneCache[timeZoneString])\n        return true;\n    try {\n        new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString });\n        validIANATimezoneCache[timeZoneString] = true;\n        return true;\n    }\n    catch (error) {\n        return false;\n    }\n}\n","import { tzIntlTimeZoneName } from '../../_lib/tzIntlTimeZoneName/index.js';\nimport { tzParseTimezone } from '../../_lib/tzParseTimezone/index.js';\nconst MILLISECONDS_IN_MINUTE = 60 * 1000;\nexport const formatters = {\n    // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n    X: function (date, token, options) {\n        const timezoneOffset = getTimeZoneOffset(options.timeZone, date);\n        if (timezoneOffset === 0) {\n            return 'Z';\n        }\n        switch (token) {\n            // Hours and optional minutes\n            case 'X':\n                return formatTimezoneWithOptionalMinutes(timezoneOffset);\n            // Hours, minutes and optional seconds without `:` delimeter\n            // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n            // so this token always has the same output as `XX`\n            case 'XXXX':\n            case 'XX': // Hours and minutes without `:` delimeter\n                return formatTimezone(timezoneOffset);\n            // Hours, minutes and optional seconds with `:` delimeter\n            // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n            // so this token always has the same output as `XXX`\n            case 'XXXXX':\n            case 'XXX': // Hours and minutes with `:` delimeter\n            default:\n                return formatTimezone(timezoneOffset, ':');\n        }\n    },\n    // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n    x: function (date, token, options) {\n        const timezoneOffset = getTimeZoneOffset(options.timeZone, date);\n        switch (token) {\n            // Hours and optional minutes\n            case 'x':\n                return formatTimezoneWithOptionalMinutes(timezoneOffset);\n            // Hours, minutes and optional seconds without `:` delimeter\n            // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n            // so this token always has the same output as `xx`\n            case 'xxxx':\n            case 'xx': // Hours and minutes without `:` delimeter\n                return formatTimezone(timezoneOffset);\n            // Hours, minutes and optional seconds with `:` delimeter\n            // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n            // so this token always has the same output as `xxx`\n            case 'xxxxx':\n            case 'xxx': // Hours and minutes with `:` delimeter\n            default:\n                return formatTimezone(timezoneOffset, ':');\n        }\n    },\n    // Timezone (GMT)\n    O: function (date, token, options) {\n        const timezoneOffset = getTimeZoneOffset(options.timeZone, date);\n        switch (token) {\n            // Short\n            case 'O':\n            case 'OO':\n            case 'OOO':\n                return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n            // Long\n            case 'OOOO':\n            default:\n                return 'GMT' + formatTimezone(timezoneOffset, ':');\n        }\n    },\n    // Timezone (specific non-location)\n    z: function (date, token, options) {\n        switch (token) {\n            // Short\n            case 'z':\n            case 'zz':\n            case 'zzz':\n                return tzIntlTimeZoneName('short', date, options);\n            // Long\n            case 'zzzz':\n            default:\n                return tzIntlTimeZoneName('long', date, options);\n        }\n    },\n};\nfunction getTimeZoneOffset(timeZone, originalDate) {\n    const timeZoneOffset = timeZone\n        ? tzParseTimezone(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE\n        : originalDate?.getTimezoneOffset() ?? 0;\n    if (Number.isNaN(timeZoneOffset)) {\n        throw new RangeError('Invalid time zone specified: ' + timeZone);\n    }\n    return timeZoneOffset;\n}\nfunction addLeadingZeros(number, targetLength) {\n    const sign = number < 0 ? '-' : '';\n    let output = Math.abs(number).toString();\n    while (output.length < targetLength) {\n        output = '0' + output;\n    }\n    return sign + output;\n}\nfunction formatTimezone(offset, delimiter = '') {\n    const sign = offset > 0 ? '-' : '+';\n    const absOffset = Math.abs(offset);\n    const hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n    const minutes = addLeadingZeros(Math.floor(absOffset % 60), 2);\n    return sign + hours + delimiter + minutes;\n}\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n    if (offset % 60 === 0) {\n        const sign = offset > 0 ? '-' : '+';\n        return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n    }\n    return formatTimezone(offset, delimiter);\n}\nfunction formatTimezoneShort(offset, delimiter = '') {\n    const sign = offset > 0 ? '-' : '+';\n    const absOffset = Math.abs(offset);\n    const hours = Math.floor(absOffset / 60);\n    const minutes = absOffset % 60;\n    if (minutes === 0) {\n        return sign + String(hours);\n    }\n    return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\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 utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n    utcDate.setUTCFullYear(date.getFullYear());\n    return +date - +utcDate;\n}\n","/** Regex to identify the presence of a time zone specifier in a date string */\nexport const tzPattern = /(Z|[+-]\\d{2}(?::?\\d{2})?| UTC| [a-zA-Z]+\\/[a-zA-Z_]+(?:\\/[a-zA-Z_]+)?)$/;\n","import { getTimezoneOffsetInMilliseconds } from '../_lib/getTimezoneOffsetInMilliseconds/index.js';\nimport { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { tzPattern } from '../_lib/tzPattern/index.js';\nconst MILLISECONDS_IN_HOUR = 3600000;\nconst MILLISECONDS_IN_MINUTE = 60000;\nconst DEFAULT_ADDITIONAL_DIGITS = 2;\nconst patterns = {\n    dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,\n    datePattern: /^([0-9W+-]+)(.*)/,\n    plainTime: /:/,\n    // year tokens\n    YY: /^(\\d{2})$/,\n    YYY: [\n        /^([+-]\\d{2})$/, // 0 additional digits\n        /^([+-]\\d{3})$/, // 1 additional digit\n        /^([+-]\\d{4})$/, // 2 additional digits\n    ],\n    YYYY: /^(\\d{4})/,\n    YYYYY: [\n        /^([+-]\\d{4})/, // 0 additional digits\n        /^([+-]\\d{5})/, // 1 additional digit\n        /^([+-]\\d{6})/, // 2 additional digits\n    ],\n    // date tokens\n    MM: /^-(\\d{2})$/,\n    DDD: /^-?(\\d{3})$/,\n    MMDD: /^-?(\\d{2})-?(\\d{2})$/,\n    Www: /^-?W(\\d{2})$/,\n    WwwD: /^-?W(\\d{2})-?(\\d{1})$/,\n    HH: /^(\\d{2}([.,]\\d*)?)$/,\n    HHMM: /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n    HHMMSS: /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n    // time zone tokens (to identify the presence of a tz)\n    timeZone: tzPattern,\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 an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n * If the function cannot parse the string or the values are invalid, it returns Invalid Date.\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 * All *date-fns* functions will throw `RangeError` if `options.additionalDigits` is not 0, 1, 2 or undefined.\n *\n * @param argument the value to convert\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @param {string} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n *\n * @returns the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = toDate('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = toDate('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport function toDate(argument, options = {}) {\n    if (arguments.length < 1) {\n        throw new TypeError('1 argument required, but only ' + arguments.length + ' present');\n    }\n    if (argument === null) {\n        return new Date(NaN);\n    }\n    const additionalDigits = options.additionalDigits == null ? DEFAULT_ADDITIONAL_DIGITS : Number(options.additionalDigits);\n    if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n        throw new RangeError('additionalDigits must be 0, 1 or 2');\n    }\n    // Clone the date\n    if (argument instanceof Date ||\n        (typeof argument === 'object' && Object.prototype.toString.call(argument) === '[object Date]')) {\n        // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n        return new Date(argument.getTime());\n    }\n    else if (typeof argument === 'number' ||\n        Object.prototype.toString.call(argument) === '[object Number]') {\n        return new Date(argument);\n    }\n    else if (!(Object.prototype.toString.call(argument) === '[object String]')) {\n        return new Date(NaN);\n    }\n    const dateStrings = splitDateString(argument);\n    const { year, restDateString } = parseYear(dateStrings.date, additionalDigits);\n    const date = parseDate(restDateString, year);\n    if (date === null || isNaN(date.getTime())) {\n        return new Date(NaN);\n    }\n    if (date) {\n        const timestamp = date.getTime();\n        let time = 0;\n        let offset;\n        if (dateStrings.time) {\n            time = parseTime(dateStrings.time);\n            if (time === null || isNaN(time)) {\n                return new Date(NaN);\n            }\n        }\n        if (dateStrings.timeZone || options.timeZone) {\n            offset = tzParseTimezone(dateStrings.timeZone || options.timeZone, new Date(timestamp + time));\n            if (isNaN(offset)) {\n                return new Date(NaN);\n            }\n        }\n        else {\n            // get offset accurate to hour in time zones that change offset\n            offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time));\n            offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time + offset));\n        }\n        return new Date(timestamp + time + offset);\n    }\n    else {\n        return new Date(NaN);\n    }\n}\nfunction splitDateString(dateString) {\n    const dateStrings = {};\n    let parts = patterns.dateTimePattern.exec(dateString);\n    let timeString;\n    if (!parts) {\n        parts = patterns.datePattern.exec(dateString);\n        if (parts) {\n            dateStrings.date = parts[1];\n            timeString = parts[2];\n        }\n        else {\n            dateStrings.date = null;\n            timeString = dateString;\n        }\n    }\n    else {\n        dateStrings.date = parts[1];\n        timeString = parts[3];\n    }\n    if (timeString) {\n        const token = patterns.timeZone.exec(timeString);\n        if (token) {\n            dateStrings.time = timeString.replace(token[1], '');\n            dateStrings.timeZone = token[1].trim();\n        }\n        else {\n            dateStrings.time = timeString;\n        }\n    }\n    return dateStrings;\n}\nfunction parseYear(dateString, additionalDigits) {\n    if (dateString) {\n        const patternYYY = patterns.YYY[additionalDigits];\n        const patternYYYYY = patterns.YYYYY[additionalDigits];\n        // YYYY or ±YYYYY\n        let token = patterns.YYYY.exec(dateString) || patternYYYYY.exec(dateString);\n        if (token) {\n            const yearString = token[1];\n            return {\n                year: parseInt(yearString, 10),\n                restDateString: dateString.slice(yearString.length),\n            };\n        }\n        // YY or ±YYY\n        token = patterns.YY.exec(dateString) || patternYYY.exec(dateString);\n        if (token) {\n            const centuryString = token[1];\n            return {\n                year: parseInt(centuryString, 10) * 100,\n                restDateString: dateString.slice(centuryString.length),\n            };\n        }\n    }\n    // Invalid ISO-formatted year\n    return {\n        year: null,\n    };\n}\nfunction parseDate(dateString, year) {\n    // Invalid ISO-formatted year\n    if (year === null) {\n        return null;\n    }\n    let date;\n    let month;\n    let week;\n    // YYYY\n    if (!dateString || !dateString.length) {\n        date = new Date(0);\n        date.setUTCFullYear(year);\n        return date;\n    }\n    // YYYY-MM\n    let token = patterns.MM.exec(dateString);\n    if (token) {\n        date = new Date(0);\n        month = parseInt(token[1], 10) - 1;\n        if (!validateDate(year, month)) {\n            return new Date(NaN);\n        }\n        date.setUTCFullYear(year, month);\n        return date;\n    }\n    // YYYY-DDD or YYYYDDD\n    token = patterns.DDD.exec(dateString);\n    if (token) {\n        date = new Date(0);\n        const dayOfYear = parseInt(token[1], 10);\n        if (!validateDayOfYearDate(year, dayOfYear)) {\n            return new Date(NaN);\n        }\n        date.setUTCFullYear(year, 0, dayOfYear);\n        return date;\n    }\n    // yyyy-MM-dd or YYYYMMDD\n    token = patterns.MMDD.exec(dateString);\n    if (token) {\n        date = new Date(0);\n        month = parseInt(token[1], 10) - 1;\n        const day = parseInt(token[2], 10);\n        if (!validateDate(year, month, day)) {\n            return new Date(NaN);\n        }\n        date.setUTCFullYear(year, month, day);\n        return date;\n    }\n    // YYYY-Www or YYYYWww\n    token = patterns.Www.exec(dateString);\n    if (token) {\n        week = parseInt(token[1], 10) - 1;\n        if (!validateWeekDate(week)) {\n            return new Date(NaN);\n        }\n        return dayOfISOWeekYear(year, week);\n    }\n    // YYYY-Www-D or YYYYWwwD\n    token = patterns.WwwD.exec(dateString);\n    if (token) {\n        week = parseInt(token[1], 10) - 1;\n        const dayOfWeek = parseInt(token[2], 10) - 1;\n        if (!validateWeekDate(week, dayOfWeek)) {\n            return new Date(NaN);\n        }\n        return dayOfISOWeekYear(year, week, dayOfWeek);\n    }\n    // Invalid ISO-formatted date\n    return null;\n}\nfunction parseTime(timeString) {\n    let hours;\n    let minutes;\n    // hh\n    let token = patterns.HH.exec(timeString);\n    if (token) {\n        hours = parseFloat(token[1].replace(',', '.'));\n        if (!validateTime(hours)) {\n            return NaN;\n        }\n        return (hours % 24) * MILLISECONDS_IN_HOUR;\n    }\n    // hh:mm or hhmm\n    token = patterns.HHMM.exec(timeString);\n    if (token) {\n        hours = parseInt(token[1], 10);\n        minutes = parseFloat(token[2].replace(',', '.'));\n        if (!validateTime(hours, minutes)) {\n            return NaN;\n        }\n        return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n    }\n    // hh:mm:ss or hhmmss\n    token = patterns.HHMMSS.exec(timeString);\n    if (token) {\n        hours = parseInt(token[1], 10);\n        minutes = parseInt(token[2], 10);\n        const seconds = parseFloat(token[3].replace(',', '.'));\n        if (!validateTime(hours, minutes, seconds)) {\n            return NaN;\n        }\n        return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000;\n    }\n    // Invalid ISO-formatted time\n    return null;\n}\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n    week = week || 0;\n    day = day || 0;\n    const date = new Date(0);\n    date.setUTCFullYear(isoWeekYear, 0, 4);\n    const fourthOfJanuaryDay = date.getUTCDay() || 7;\n    const diff = week * 7 + day + 1 - fourthOfJanuaryDay;\n    date.setUTCDate(date.getUTCDate() + diff);\n    return date;\n}\n// Validation functions\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction isLeapYearIndex(year) {\n    return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\nfunction validateDate(year, month, date) {\n    if (month < 0 || month > 11) {\n        return false;\n    }\n    if (date != null) {\n        if (date < 1) {\n            return false;\n        }\n        const isLeapYear = isLeapYearIndex(year);\n        if (isLeapYear && date > DAYS_IN_MONTH_LEAP_YEAR[month]) {\n            return false;\n        }\n        if (!isLeapYear && date > DAYS_IN_MONTH[month]) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction validateDayOfYearDate(year, dayOfYear) {\n    if (dayOfYear < 1) {\n        return false;\n    }\n    const isLeapYear = isLeapYearIndex(year);\n    if (isLeapYear && dayOfYear > 366) {\n        return false;\n    }\n    if (!isLeapYear && dayOfYear > 365) {\n        return false;\n    }\n    return true;\n}\nfunction validateWeekDate(week, day) {\n    if (week < 0 || week > 52) {\n        return false;\n    }\n    if (day != null && (day < 0 || day > 6)) {\n        return false;\n    }\n    return true;\n}\nfunction validateTime(hours, minutes, seconds) {\n    if (hours < 0 || hours >= 25) {\n        return false;\n    }\n    if (minutes != null && (minutes < 0 || minutes >= 60)) {\n        return false;\n    }\n    if (seconds != null && (seconds < 0 || seconds >= 60)) {\n        return false;\n    }\n    return true;\n}\n","import { format as dateFnsFormat } from 'date-fns/format';\nimport { formatters } from './formatters/index.js';\nimport { toDate } from '../toDate/index.js';\nconst tzFormattingTokensRegExp = /([xXOz]+)|''|'(''|[^'])+('|$)/g;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may consty by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 8     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 8     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Su            |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Su, Sa        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Su            | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Su, Sa        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Su            |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Su, Sa        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Su            |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Su, Sa        |       |\n * | AM, PM                          | a..aaa  | AM, PM                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bbb  | AM, PM, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 1, 2, ..., 11, 0                  |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 0001, ..., 999               |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | PDT, EST, CEST                    | 6     |\n * |                                 | zzzz    | Pacific Daylight Time             | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 05/29/1453                        | 7     |\n * |                                 | PP      | May 29, 1453                      | 7     |\n * |                                 | PPP     | May 29th, 1453                    | 7     |\n * |                                 | PPPP    | Sunday, May 29th, 1453            | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 05/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | May 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | May 29th, 1453 at ...             | 7     |\n * |                                 | PPPPpppp| Sunday, May 29th, 1453 at ...     | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n *    and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are created using the Intl browser API. The output is determined by the\n *    preferred standard of the current locale (en-US by default) which may not always give the expected result.\n *    For this reason it is recommended to supply a `locale` in the format options when formatting a time zone name.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. These tokens are often confused with others. See: https://git.io/fxCyr\n *\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole\n *   library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n *   ```javascript\n *   // Before v2.0.0\n *   format(new Date(2016, 0, 1))\n *\n *   // v2.0.0 onward\n *   format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n *   ```\n *\n * - New format string API for `format` function\n *   which is based on [Unicode Technical Standard\n *   #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). See [this\n *   post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param date the original date\n * @param formatStr the string of tokens\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link\n *   https://date-fns.org/docs/toDate}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See\n *   [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:\n *   - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).\n *   - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens\n *   (`yy`, `yyyy`). See: https://git.io/fxCyr\n * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n * @param {Date|Number} [options.originalDate] - can be used to pass the original unmodified date to `format` to\n *   improve correctness of the replaced timezone token close to the DST threshold.\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.awareOfUnicodeTokens` must be set to `true` to use `XX` token; see:\n *   https://git.io/fxCyr\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options = {}) {\n    formatStr = String(formatStr);\n    const matches = formatStr.match(tzFormattingTokensRegExp);\n    if (matches) {\n        const d = toDate(options.originalDate || date, options);\n        // Work through each match and replace the tz token in the format string with the quoted\n        // formatted time zone so the remaining tokens can be filled in by date-fns#format.\n        formatStr = matches.reduce(function (result, token) {\n            if (token[0] === \"'\") {\n                return result; // This is a quoted portion, matched only to ensure we don't match inside it\n            }\n            const pos = result.indexOf(token);\n            const precededByQuotedSection = result[pos - 1] === \"'\";\n            const replaced = result.replace(token, \"'\" + formatters[token[0]](d, token, options) + \"'\");\n            // If the replacement results in two adjoining quoted strings, the back to back quotes\n            // are removed, so it doesn't look like an escaped quote.\n            return precededByQuotedSection\n                ? replaced.substring(0, pos - 1) + replaced.substring(pos + 1)\n                : replaced;\n        }, formatStr);\n    }\n    return dateFnsFormat(date, formatStr, options);\n}\n","import { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { toDate } from '../toDate/index.js';\n/**\n * @name toZonedTime\n * @category Time Zone Helpers\n * @summary Get a date/time representing local time in a given time zone from the UTC date\n *\n * @description\n * Returns a date instance with values representing the local time in the time zone\n * specified of the UTC time from the date provided. In other words, when the new date\n * is formatted it will show the equivalent hours in the target time zone regardless\n * of the current system time zone.\n *\n * @param date the date with the relevant UTC time\n * @param timeZone the time zone to get local time for, can be an offset or IANA time zone\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n *\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // In June 10am UTC is 6am in New York (-04:00)\n * const result = toZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')\n * //=> Jun 25 2014 06:00:00\n */\nexport function toZonedTime(date, timeZone, options) {\n    date = toDate(date, options);\n    const offsetMilliseconds = tzParseTimezone(timeZone, date, true);\n    const d = new Date(date.getTime() - offsetMilliseconds);\n    const resultDate = new Date(0);\n    resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());\n    resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());\n    return resultDate;\n}\n","import { format } from '../format/index.js';\nimport { toZonedTime } from '../toZonedTime/index.js';\n/**\n * @name formatInTimeZone\n * @category Time Zone Helpers\n * @summary Gets the offset in milliseconds between the time zone and Universal Coordinated Time (UTC)\n *\n * @param date the date representing the local time / real UTC time\n * @param timeZone the time zone this date should be formatted for; can be an offset or IANA time zone\n * @param formatStr the string of tokens\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link\n *   https://date-fns.org/docs/toDate}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See\n *   [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:\n *   - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).\n *   - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens\n *   (`yy`, `yyyy`). See: https://git.io/fxCyr\n * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n */\nexport function formatInTimeZone(date, timeZone, formatStr, options) {\n    options = {\n        ...options,\n        timeZone,\n        originalDate: date,\n    };\n    return format(toZonedTime(date, timeZone, { timeZone: options.timeZone }), formatStr, options);\n}\n","import { toDate } from '../toDate/index.js';\nimport { tzPattern } from '../_lib/tzPattern/index.js';\nimport { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { newDateUTC } from '../_lib/newDateUTC/index.js';\n/**\n * @name fromZonedTime\n * @category Time Zone Helpers\n * @summary Get the UTC date/time from a date representing local time in a given time zone\n *\n * @description\n * Returns a date instance with the UTC time of the provided date of which the values\n * represented the local time in the time zone specified. In other words, if the input\n * date represented local time in time zone, the timestamp of the output date will\n * give the equivalent UTC of that local time regardless of the current system time zone.\n *\n * @param date the date with values representing the local time\n * @param timeZone the time zone of this local time, can be an offset or IANA time zone\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // In June 10am in Los Angeles is 5pm UTC\n * const result = fromZonedTime(new Date(2014, 5, 25, 10, 0, 0), 'America/Los_Angeles')\n * //=> 2014-06-25T17:00:00.000Z\n */\nexport function fromZonedTime(date, timeZone, options) {\n    if (typeof date === 'string' && !date.match(tzPattern)) {\n        return toDate(date, { ...options, timeZone });\n    }\n    date = toDate(date, options);\n    const utc = newDateUTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).getTime();\n    const offsetMilliseconds = tzParseTimezone(timeZone, new Date(utc));\n    return new Date(utc + offsetMilliseconds);\n}\n","import { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\n/**\n * @name getTimezoneOffset\n * @category Time Zone Helpers\n * @summary Gets the offset in milliseconds between the time zone and Universal Coordinated Time (UTC)\n *\n * @description\n * Returns the time zone offset from UTC time in milliseconds for IANA time zones as well\n * as other time zone offset string formats.\n *\n * For time zones where daylight savings time is applicable a `Date` should be passed on\n * the second parameter to ensure the offset correctly accounts for DST at that time of\n * year. When omitted, the current date is used.\n *\n * @param timeZone the time zone of this local time, can be an offset or IANA time zone\n * @param date the date with values representing the local time\n *\n * @example\n * const result = getTimezoneOffset('-07:00')\n *   //=> -18000000 (-7 * 60 * 60 * 1000)\n * const result = getTimezoneOffset('Africa/Johannesburg')\n *   //=> 7200000 (2 * 60 * 60 * 1000)\n * const result = getTimezoneOffset('America/New_York', new Date(2016, 0, 1))\n *   //=> -18000000 (-5 * 60 * 60 * 1000)\n * const result = getTimezoneOffset('America/New_York', new Date(2016, 6, 1))\n *   //=> -14400000 (-4 * 60 * 60 * 1000)\n */\nexport function getTimezoneOffset(timeZone, date) {\n    return -tzParseTimezone(timeZone, date);\n}\n","import { formatInTimeZone } from 'date-fns-tz'\n\nexport interface TimeFormatOptions {\n  includeTZ?: boolean\n  tz?: string\n  short?: boolean\n  format?: 'default' | 'short' | 'full'\n}\n\n/**\n *Formats a timestamp according to the specified options\n *\n * @param ts - timestamp as number or Date\n * @param options - formatting options\n * @param options.format - format of the timestamp representing the granularity\n * 'MMM dd, yyyy hh:mm a' (default)\n * Possible values:\n * - short:   'MMM dd, yyyy'\n * - default:  'MMM dd, yyyy hh:mm a'\n * - full:      'MMM dd, yyyy hh:mm:ss.SSS a'\n * @param options.includeTZ: whether to include the timezone abbreviation in the formatted string\n * @param options.tz: timezone to use for formatting (defaults to system timezone)\n * @returns Formatted timestamp string\n */\nexport function formatTimestamp(ts: number | Date, options: TimeFormatOptions = {}) {\n  const tz = options?.tz || Intl.DateTimeFormat().resolvedOptions().timeZone\n  let format = 'MMM dd, yyy hh:mm a'\n\n  switch (options.format) {\n    case 'short':\n      format = 'MMM dd, yyyy'\n      break\n    case 'default':\n      format = 'MMM dd, yyyy hh:mm a'\n      break\n    case 'full':\n      format = 'MMM dd, yyyy hh:mm:ss.SSS a'\n      break\n  }\n\n  if (options.includeTZ) {\n    format += ' (z)'\n  }\n\n  return formatInTimeZone(ts, tz, format)\n}\n\n/**\n * @deprecated use `formatTimestamp` instead\n */\nexport function formatTime(ts: number | string, options: TimeFormatOptions = {}) {\n  if (!ts) {\n    return ts\n  }\n\n  const tz = options.tz || Intl.DateTimeFormat().resolvedOptions().timeZone\n\n  try {\n    let timeFormat = 'MMM dd, yyy hh:mm a'\n    if (options.short) {\n      timeFormat = 'MMM dd, yyy'\n    }\n\n    if (options.includeTZ) {\n      timeFormat += ' (z)'\n    }\n\n    const date = new Date(ts)\n\n    // Note: We always need to use `formatInTimeZone` (rather than plain `format`)\n    // in order to achieve consistent results based on the tz of the current computer.\n    // Otherwise, unit tests can fail depending on the tz of the dev's computer (or in CI), etc.\n    // Even if we don't care about timezones, timezones care about us.  :/\n    return formatInTimeZone(date, tz, timeFormat)\n  } catch {\n    console.error('Invalid value passed to formatTime', ts)\n\n    return '(invalid date)'\n  }\n}\n\n/**\n * Formatted display for a start and end time range\n * @param start Date from\n * @param end Date to\n * @returns Human-readable date range string\n */\nexport function formatTimeRange(start: Date, end: Date) {\n  return `${formatTime(start.getTime())} - ${formatTime(end.getTime(), { includeTZ: true })}`\n}\n","import type { DruidGranularity, GranularityValues } from './types'\nimport { granularityValues } from './types'\nimport { getTimezoneOffset } from 'date-fns-tz'\n\n// Units are milliseconds, which are what Druid expects.\nexport const Granularities: Record<string, number> = {\n  secondly: 1000,\n  tenSecondly: 10 * 1000,\n  thirtySecondly: 30 * 1000,\n  minutely: 60 * 1000,\n  fiveMinutely: 5 * 60 * 1000,\n  tenMinutely: 10 * 60 * 1000,\n  thirtyMinutely: 30 * 60 * 1000,\n  hourly: 60 * 60 * 1000,\n  twoHourly: 2 * 60 * 60 * 1000,\n  twelveHourly: 12 * 60 * 60 * 1000,\n  daily: 60 * 60 * 24 * 1000,\n  weekly: 60 * 60 * 24 * 7 * 1000,\n  trend: 0,\n}\n\nexport function granularitiesToOptions(\n  values: GranularityValues[],\n  i18n: { t: (v: string) => string },\n) {\n  return values.map((v) => ({\n    value: v,\n    label: i18n.t(`configuration.vitals.reports.granularity.${v}`),\n  }))\n}\n\nexport function granularityMsToQuery(\n  granularity: number,\n  origin: string,\n): DruidGranularity {\n  return {\n    duration: granularity,\n    type: 'duration',\n    origin,\n  }\n}\n\nexport function msToGranularity(ms?: number): GranularityValues | null {\n  if (!ms) {\n    return null\n  }\n\n  // Note that this folds weird granularity values into known values.\n  const key = granularityValues.find((k: GranularityValues) => ms <= Granularities[k])\n\n  return key || null\n}\n\nfunction toNearestTimeGrain(\n  op: (x: number) => number,\n  date: Date,\n  granularity: string,\n  tz?: string,\n): Date {\n  // Days and weeks need special handling because naively trying to `ceil` or `floor` them results in a date ending\n  // in midnight UTC, whereas as of now we want dates ending in midnight local time.\n  // Note: right now we treat daily and weekly granularities the same way, because it's OK to request an\n  // incomplete week (i.e., if it's currently Monday at noon, it's OK to request data up to Tuesday midnight for the current week).\n  // Druid will just limit its query range accordingly.\n  const granularityMs = Granularities[granularity]\n  let tzOffsetMs = 0\n\n  if (granularityMs >= Granularities.daily) {\n    if (tz) {\n      tzOffsetMs = -getTimezoneOffset(tz, date)\n    } else {\n      tzOffsetMs = date.getTimezoneOffset() * 60 * 1000\n    }\n  }\n\n  return new Date(op((date.getTime() - tzOffsetMs) / granularityMs) * granularityMs + tzOffsetMs)\n}\n\nexport function floorToNearestTimeGrain(date: Date, granularity: string, tz?: string): Date {\n  return toNearestTimeGrain(Math.floor, date, granularity, tz)\n}\n\nexport function ceilToNearestTimeGrain(date: Date, granularity: string, tz?: string): Date {\n  return toNearestTimeGrain(Math.ceil, date, granularity, tz)\n}\n","import { getTime, getUnixTime } from 'date-fns'\n\nimport {\n  ceilToNearestTimeGrain,\n  floorToNearestTimeGrain,\n  Granularities,\n  granularityMsToQuery,\n} from './granularity'\nimport type { DruidGranularity, QueryTime } from './types'\nimport type { Timeframe } from './timeframes'\n\nabstract class BaseQueryTime implements QueryTime {\n  protected readonly timeframe: Timeframe\n  protected readonly tz?: string\n  protected readonly dataGranularity: string\n\n  constructor(timeframe: Timeframe, tz?: string, dataGranularity?: string) {\n    // This is an abstract class.\n    if (this.constructor === BaseQueryTime) {\n      throw new Error('BaseQueryTime is not meant to be used directly.')\n    }\n\n    this.timeframe = timeframe\n    this.tz = tz\n    this.dataGranularity = dataGranularity ?? timeframe.dataGranularity\n  }\n\n  abstract startDate(): Date\n\n  abstract endDate(): Date\n\n  abstract granularityMs(): number\n\n  protected calculateStartDate(isRelative: boolean, granularity: string, periods = 1) {\n    // `periods` is greater than 1 if we're doing a delta time query.\n    if (isRelative) {\n      return new Date(this.endDate().getTime() - this.timeframe.timeframeLengthMs() * periods)\n    } else {\n      // Custom timeframes need special handling since it's hard to calculate the timeframe length.\n      // For example, a custom timeframe that starts on 1/1 and ends on 1/1 has a length of 1 day, not 0.\n      const ceilEnd = this.endDate()\n      const rawStart = this.timeframe.rawStart(this.tz)\n      const floorStart = floorToNearestTimeGrain(rawStart, granularity, this.tz)\n      const timeframeLengthMs = ceilEnd.getTime() - floorStart.getTime()\n      const periodOffset = timeframeLengthMs * (periods - 1)\n\n      return new Date(floorStart.getTime() - periodOffset)\n    }\n  }\n\n  granularitySeconds(): number {\n    return Math.floor(this.granularityMs() / 1000)\n  }\n\n  granularityDruid(): DruidGranularity {\n    return granularityMsToQuery(this.granularityMs(), this.startDate().toISOString())\n  }\n\n  // Return a UNIX timestamp suitable for use in the `start` query param.\n  startSeconds(): number {\n    return getUnixTime(this.startDate())\n  }\n\n  // Return a UNIX timestamp suitable for use in the `end` query param.\n  endSeconds(): number {\n    return getUnixTime(this.endDate())\n  }\n\n  // Return epoch time in milliseconds, suitable for use in the `startMs` query param.\n  startMs(): number {\n    return getTime(this.startDate())\n  }\n\n  // Return epoch time in milliseconds, suitable for use in the `endMs` query param.\n  endMs(): number {\n    return getTime(this.endDate())\n  }\n}\n\n// We expect to get back a number of values, depending on the selected timeframe and granularity.\nexport class TimeseriesQueryTime extends BaseQueryTime {\n  private readonly granularity: string\n\n  constructor(timeframe: Timeframe, granularity?: string, tz?: string, dataGranularity?: string, fineGrain?: boolean) {\n    super(timeframe, tz, dataGranularity)\n\n    if (granularity && timeframe.allowedGranularities(fineGrain).has(granularity)) {\n      this.granularity = granularity\n    } else if (fineGrain) {\n      this.granularity = timeframe.fineGrainedDefaultGranularity ?? timeframe.defaultResponseGranularity\n    } else {\n      this.granularity = timeframe.defaultResponseGranularity\n    }\n  }\n\n  startDate(): Date {\n    return this.calculateStartDate(this.timeframe.isRelative, this.granularity)\n  }\n\n  endDate(): Date {\n    return ceilToNearestTimeGrain(this.timeframe.rawEnd(), this.granularity, this.tz)\n  }\n\n  granularityMs(): number {\n    return Granularities[this.granularity]\n  }\n}\n\n// We expect to get back 1 value, such that we can just show a big number without any trend information.\nexport class UnaryQueryTime extends BaseQueryTime {\n  startDate(): Date {\n    return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity)\n  }\n\n  endDate(): Date {\n    return ceilToNearestTimeGrain(this.timeframe.rawEnd(this.tz), this.dataGranularity, this.tz)\n  }\n\n  granularityMs(): number {\n    return this.endDate().getTime() - this.startDate().getTime()\n  }\n}\n\n// We expect to get back 2 values, such that we can make a comparison between them.\n// Note that depending on the user's tier, they might not have permission to request double their current\n// timeframe to calculate a trend.\nexport class DeltaQueryTime extends UnaryQueryTime {\n  startDate(): Date {\n    return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity, 2)\n  }\n\n  granularityMs(): number {\n    // Note the `super` call -- the granularity for a DeltaQueryTime is the same as for an\n    // equivalent UnaryQueryTime, despite the fact that the start time for a Delta query is earlier.\n    // This property must hold in order for the current period's numbers to not change between unary\n    // and delta query times.\n    return this.endDate().getTime() - super.startDate().getTime()\n  }\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n  // Don't return `map.set` because it's not chainable in IE 11.\n  map.set(pair[0], pair[1]);\n  return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n  // Don't return `set.add` because it's not chainable in IE 11.\n  set.add(value);\n  return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n    nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n    Map = getNative(root, 'Map'),\n    Promise = getNative(root, 'Promise'),\n    Set = getNative(root, 'Set'),\n    WeakMap = getNative(root, 'WeakMap'),\n    nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var cache = this.__data__;\n  if (cache instanceof ListCache) {\n    var pairs = cache.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      return this;\n    }\n    cache = this.__data__ = new MapCache(pairs);\n  }\n  cache.set(key, value);\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  // Safari 9 makes `arguments.length` enumerable in strict mode.\n  var result = (isArray(value) || isArguments(value))\n    ? baseTimes(value.length, String)\n    : [];\n\n  var length = result.length,\n      skipIndexes = !!length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    object[key] = value;\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n  var result;\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      if (isHostObject(value)) {\n        return object ? value : {};\n      }\n      result = initCloneObject(isFunc ? {} : value);\n      if (!isDeep) {\n        return copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, baseClone, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (!isArr) {\n    var props = isFull ? getAllKeys(value) : keys(value);\n  }\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n  });\n  return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n  return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var result = new buffer.constructor(buffer.length);\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n  return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n  return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    assignValue(object, key, newValue === undefined ? source[key] : newValue);\n  }\n  return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = objectToString.call(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : undefined;\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return cloneMap(object, isDeep, cloneFunc);\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return cloneSet(object, isDeep, cloneFunc);\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return !!length &&\n    (typeof value == 'number' || reIsUint.test(value)) &&\n    (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = cloneDeep;\n","import {\n  addDays,\n  getDaysInMonth,\n  hoursToSeconds,\n  minutesToHours,\n  startOfQuarter,\n  startOfDay,\n  startOfMonth,\n  startOfWeek,\n  subQuarters,\n  subMonths,\n} from 'date-fns'\n\nimport {\n  TimeframeKeys,\n} from './types'\n\nimport type {\n  DatePickerSelection,\n  TimeframeOptions,\n  TimePeriod,\n  TimeRangeV4,\n  GranularityValues,\n} from './types'\nimport { getTimezoneOffset, toZonedTime, fromZonedTime } from 'date-fns-tz'\nimport type { ITimeframe } from './types/timeframe'\nimport cloneDeep from 'lodash.clonedeep'\n\nconst adjustForTz = (d: Date, tz: string) => {\n  // Adjust the given date by the given TZ offset.\n  return new Date(d.getTime() - getTimezoneOffset(tz, d))\n}\n\n\nexport class Timeframe implements ITimeframe {\n  readonly timeframeText: string\n\n  readonly key: string\n\n  readonly display: string\n\n  readonly timeframeLength: () => number\n\n  readonly allowedTiers: string[]\n\n  // defaultResponseGranularity tracks which of the allowed granularities is picked for a given\n  // timeframe if the user does not or cannot specify a granularity.\n  readonly defaultResponseGranularity: string\n\n  // dataGranularity tracks the granularity of the available data on the server for a specific timeframe.\n  // As of writing, it's always the same as the default response granularity, but it may not always be.\n  // It controls how timeframes are rounded to ensure complete time buckets from the server.\n  readonly dataGranularity: string\n\n  // isRelative impacts whether we take the `floor` or the `ceil` of the start time.\n  // If the time range is relative, we want the ceil -- because we take the ceil of the\n  // end time to make sure we're showing all the data we can for the last time bucket.\n  // If the time range is absolute, we want the floor -- because otherwise we wouldn't be including\n  // the first time bucket.\n  readonly isRelative: boolean\n\n  readonly fineGrainedDefaultGranularity?: string\n\n  private _startCustom?: Date\n\n  private _endCustom?: Date\n\n  private _allowedGranularitiesOverride?: string[]\n\n  constructor(opts: TimeframeOptions) {\n    this.display = opts.display\n    this.timeframeText = opts.timeframeText\n    this.key = opts.key\n    this.timeframeLength = opts.timeframeLength\n    this.allowedTiers = opts.allowedTiers\n    this.defaultResponseGranularity = opts.defaultResponseGranularity\n    this.dataGranularity = opts.dataGranularity\n    this.isRelative = opts.isRelative\n    this._startCustom = opts.startCustom\n    this._endCustom = opts.endCustom\n    this._allowedGranularitiesOverride = opts.allowedGranularitiesOverride\n    this.fineGrainedDefaultGranularity = opts.fineGrainedDefaultGranularity\n  }\n\n  // rawEnd does not consider granularity and should not be used directly in queries.\n  // Use `new QueryTime(timeframe, granularity?).queryEndSeconds()` instead.\n  // eslint-disable-next-line -- `tz` is required because it's used in subclasses.\n  rawEnd(_tz?: string): Date {\n    return this._endCustom || new Date()\n  }\n\n  // rawStart does not consider granularity and should not be used directly in queries.\n  // Use `new QueryTime(timeframe, granularity?).queryStartSeconds()` instead.\n  // eslint-disable-next-line -- `tz` is required because it's used in subclasses.\n  rawStart(_tz?: string): Date {\n    return this._startCustom || new Date(this.rawEnd().getTime() - this.timeframeLengthMs())\n  }\n\n  timeframeLengthMs() {\n    return this.timeframeLength() * 1000\n  }\n\n  maximumTimeframeLength() {\n    // This is overriden in the variable-length subclasses.\n    return this.timeframeLength()\n  }\n\n  allowedGranularities(fineGrain?: boolean) {\n    if (this._allowedGranularitiesOverride && fineGrain) {\n      // Note: queryTime's granularity determination currently expects this to be sorted from fine to coarse.\n      return new Set(this._allowedGranularitiesOverride)\n    }\n\n    const allowedValues: Set<GranularityValues> = new Set()\n    const hours = this.maximumTimeframeLength() / 3600\n\n    // Minutely is allowed for under 6 hours.\n    if (hours <= 6) {\n      allowedValues.add('minutely')\n    }\n\n    // Hourly is allowed for 1 week and under, as long as it's more than just 1 hour.\n    if (hours >= 2 && hours <= 7 * 24) {\n      allowedValues.add('hourly')\n    }\n\n    // Daily is allowed for everything over 2 days.\n    if (hours >= 2 * 24) {\n      allowedValues.add('daily')\n    }\n\n    // Weekly is allowed for everything over 2 weeks.\n    if (hours >= 2 * 24 * 14) {\n      allowedValues.add('weekly')\n    }\n\n    return allowedValues\n  }\n\n  cacheKey(): string {\n    if (this.key !== 'custom') {\n      // Right now, `key === custom` is our flag for whether we're dealing with an absolute or relative timeframe.\n      return this.key\n    }\n\n    return `${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`\n  }\n\n  v4Query(tz?: string): TimeRangeV4 {\n    if (this.key === 'custom') {\n      // Right now, `key === custom` is our flag for whether we're dealing with an absolute or relative timeframe.\n      return {\n        type: 'absolute',\n        start: this.rawStart(),\n        end: this.rawEnd(),\n        tz,\n      }\n    }\n\n    return {\n      type: 'relative',\n      // Safe assertion; we just checked that key is a member of the union.\n      time_range: this.key,\n      tz,\n    }\n  }\n\n  protected tzAdjustedDate(tz?: string): Date {\n    if (!tz) {\n      return new Date()\n    }\n\n    // Take `new Date()` and adjust it so that it's within the given TZ\n    // instead of the current environment's TZ.\n    const tzNeutral = fromZonedTime(new Date(), (new Intl.DateTimeFormat()).resolvedOptions().timeZone)\n    return toZonedTime(tzNeutral, tz)\n  }\n}\n\nclass CurrentWeek extends Timeframe {\n  rawStart(tz?: string): Date {\n    // `startOfWeek` isn't aware of timezones, so the resulting \"start of month\" time is in the local timezone.\n    let thisMonday = startOfWeek(this.tzAdjustedDate(tz), { weekStartsOn: 1 })\n\n    if (tz) {\n      thisMonday = adjustForTz(thisMonday, tz)\n    }\n\n    return thisMonday\n  }\n\n  maximumTimeframeLength() {\n    return 60 * 60 * 24 * 7\n  }\n}\n\nclass CurrentMonth extends Timeframe {\n  rawStart(tz?: string): Date {\n    // `startOfMonth` isn't aware of timezones, so the resulting \"start of month\" time is in the local timezone.\n    let firstOfTheMonth = startOfMonth(this.tzAdjustedDate(tz))\n\n    if (tz) {\n      firstOfTheMonth = adjustForTz(firstOfTheMonth, tz)\n    }\n\n    return firstOfTheMonth\n  }\n\n  maximumTimeframeLength() {\n    return 60 * 60 * 24 * 31\n  }\n}\n\nclass CurrentQuarter extends Timeframe {\n  rawStart(tz?: string): Date {\n    // `startOfQuarter` isn't aware of timezones, so the resulting \"start of quarter\" time is in the local timezone.\n    let firstOfTheQuarter = startOfQuarter(this.tzAdjustedDate(tz))\n\n    if (tz) {\n      firstOfTheQuarter = adjustForTz(firstOfTheQuarter, tz)\n    }\n\n    return firstOfTheQuarter\n  }\n\n  maximumTimeframeLength() {\n    return 60 * 60 * 24 * 92\n  }\n}\n\nclass CurrentYear extends Timeframe {\n  rawStart(tz?: string): Date {\n    let firstOfTheYear = new Date(this.tzAdjustedDate(tz).getFullYear(), 0, 1)\n\n    if (tz) {\n      firstOfTheYear = adjustForTz(firstOfTheYear, tz)\n    }\n\n    return firstOfTheYear\n  }\n\n  maximumTimeframeLength() {\n    return 60 * 60 * 24 * 366\n  }\n}\n\nclass PreviousWeek extends Timeframe {\n  rawEnd(tz?: string): Date {\n    // `startOfWeek` isn't aware of timezones, so the resulting \"start of month\" time is in the local timezone.\n    let thisMonday = startOfWeek(this.tzAdjustedDate(tz), { weekStartsOn: 1 })\n\n    if (tz) {\n      thisMonday = adjustForTz(thisMonday, tz)\n    }\n\n    return thisMonday\n  }\n\n  rawStart(tz?: string): Date {\n    const date = this.tzAdjustedDate(tz)\n\n    // `startOfWeek` isn't aware of timezones, so the resulting \"start of month\" time is in the local timezone.\n    let lastMonday = startOfWeek(date.setDate(date.getDate() - 7), {\n      weekStartsOn: 1,\n    })\n\n    if (tz) {\n      lastMonday = adjustForTz(lastMonday, tz)\n    }\n\n    return lastMonday\n  }\n}\n\nclass PreviousQuarter extends Timeframe {\n  rawEnd(tz?: string): Date {\n    // `startOfQuarter` isn't aware of timezones, so the resulting \"start of quarter\" time is in the local timezone.\n    let thisQuarter = startOfQuarter(this.tzAdjustedDate(tz))\n\n    if (tz) {\n      thisQuarter = adjustForTz(thisQuarter, tz)\n    }\n\n    return thisQuarter\n  }\n\n  rawStart(tz?: string): Date {\n    // `startOfQuarter` isn't aware of timezones, so the resulting \"start of quarter\" time is in the local timezone.\n    let lastQuarter = startOfQuarter(subQuarters(this.tzAdjustedDate(tz), 1))\n\n    if (tz) {\n      lastQuarter = adjustForTz(lastQuarter, tz)\n    }\n\n    return lastQuarter\n  }\n}\n\nclass PreviousMonth extends Timeframe {\n  rawEnd(tz?: string): Date {\n    // `startOfMonth` isn't aware of timezones, so the resulting \"start of month\" time is in the local timezone.\n    let thisMonth = startOfMonth(this.tzAdjustedDate(tz))\n\n    if (tz) {\n      thisMonth = adjustForTz(thisMonth, tz)\n    }\n\n    return thisMonth\n  }\n\n  rawStart(tz?: string): Date {\n    // `startOfMonth` isn't aware of timezones, so the resulting \"start of month\" time is in the local timezone.\n    let lastMonth = startOfMonth(subMonths(this.tzAdjustedDate(tz), 1))\n\n    if (tz) {\n      lastMonth = adjustForTz(lastMonth, tz)\n    }\n\n    return lastMonth\n  }\n}\n\nclass PreviousYear extends Timeframe {\n  rawEnd(tz?: string): Date {\n    let thisYear = new Date(this.tzAdjustedDate(tz).getFullYear(), 0, 1)\n\n    if (tz) {\n      thisYear = adjustForTz(thisYear, tz)\n    }\n\n    return thisYear\n  }\n\n  rawStart(tz?: string): Date {\n    let lastYear = new Date(this.tzAdjustedDate(tz).getFullYear() - 1, 0, 1)\n\n    if (tz) {\n      lastYear = adjustForTz(lastYear, tz)\n    }\n\n    return lastYear\n  }\n}\n\n// These TimePeriod definitions request a default granularity and can be adjusted\n//\n// Using <string, any> as a temp workaround for TimePeriods.get() potentially returning `undefined` lint issue.\n// This means we opt out of safety checks; similar to this workaround:\n//   https://github.com/microsoft/TypeScript/issues/41045#issuecomment-706717682\n\nexport const TimePeriods = new Map<string, Timeframe>([\n  [\n    TimeframeKeys.FIFTEEN_MIN,\n    new Timeframe({\n      key: TimeframeKeys.FIFTEEN_MIN,\n      display: 'Last 15 minutes',\n      timeframeText: '15 minutes',\n      timeframeLength: () => 60 * 15,\n      defaultResponseGranularity: 'minutely',\n      dataGranularity: 'minutely',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'thirtySecondly',\n      allowedTiers: ['free', 'trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['tenSecondly', 'thirtySecondly', 'minutely'],\n    }),\n  ],\n  [\n    TimeframeKeys.ONE_HOUR,\n    new Timeframe({\n      key: TimeframeKeys.ONE_HOUR,\n      display: 'Last hour',\n      timeframeText: 'One hour',\n      timeframeLength: () => 60 * 60 * 1,\n      defaultResponseGranularity: 'minutely',\n      dataGranularity: 'minutely',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'minutely',\n      allowedTiers: ['free', 'trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['tenSecondly', 'thirtySecondly', 'minutely', 'fiveMinutely', 'tenMinutely'],\n    }),\n  ],\n  [\n    TimeframeKeys.SIX_HOUR,\n    new Timeframe({\n      key: TimeframeKeys.SIX_HOUR,\n      display: 'Last 6 hours',\n      timeframeText: '6 hours',\n      timeframeLength: () => 60 * 60 * 6,\n      defaultResponseGranularity: 'hourly',\n      dataGranularity: 'hourly',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'fiveMinutely',\n      allowedTiers: ['free', 'trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['thirtySecondly', 'minutely', 'fiveMinutely', 'tenMinutely', 'thirtyMinutely', 'hourly'],\n    }),\n  ],\n  [\n    TimeframeKeys.TWELVE_HOUR,\n    new Timeframe({\n      key: TimeframeKeys.TWELVE_HOUR,\n      display: 'Last 12 hours',\n      timeframeText: '12 hours',\n      timeframeLength: () => 60 * 60 * 12,\n      defaultResponseGranularity: 'hourly',\n      dataGranularity: 'hourly',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'tenMinutely',\n      allowedTiers: ['free', 'trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['minutely', 'fiveMinutely', 'tenMinutely', 'thirtyMinutely', 'hourly'],\n    }),\n  ],\n  [\n    TimeframeKeys.ONE_DAY,\n    new Timeframe({\n      key: TimeframeKeys.ONE_DAY,\n      display: 'Last 24 hours',\n      timeframeText: '24 hours',\n      timeframeLength: () => 60 * 60 * 24,\n      defaultResponseGranularity: 'hourly',\n      dataGranularity: 'hourly',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'thirtyMinutely',\n      allowedTiers: ['free', 'trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['fiveMinutely', 'tenMinutely', 'thirtyMinutely', 'hourly'],\n    }),\n  ],\n  [\n    TimeframeKeys.SEVEN_DAY,\n    new Timeframe({\n      key: TimeframeKeys.SEVEN_DAY,\n      display: 'Last 7 days',\n      timeframeText: '7 days',\n      timeframeLength: () => 60 * 60 * 24 * 7,\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'twoHourly',\n      allowedTiers: ['trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['thirtyMinutely', 'hourly', 'twoHourly', 'twelveHourly', 'daily'],\n    }),\n  ],\n  [\n    TimeframeKeys.THIRTY_DAY,\n    new Timeframe({\n      key: TimeframeKeys.THIRTY_DAY,\n      display: 'Last 30 days',\n      timeframeText: '30 days',\n      timeframeLength: () => 60 * 60 * 24 * 30,\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'twelveHourly',\n      allowedTiers: ['trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['hourly', 'twoHourly', 'twelveHourly', 'daily', 'weekly'],\n    }),\n  ],\n  [\n    TimeframeKeys.NINETY_DAY,\n    new Timeframe({\n      key: TimeframeKeys.NINETY_DAY,\n      display: 'Last 90 days',\n      timeframeText: '90 days',\n      timeframeLength: () => 60 * 60 * 24 * 90,\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'daily',\n      allowedTiers: ['trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['hourly', 'twoHourly', 'twelveHourly', 'daily', 'weekly'],\n    }),\n  ],\n  [\n    TimeframeKeys.ONE_HUNDRED_EIGHTY_DAY,\n    new Timeframe({\n      key: TimeframeKeys.ONE_HUNDRED_EIGHTY_DAY,\n      display: 'Last 180 days',\n      timeframeText: '180 days',\n      timeframeLength: () => 60 * 60 * 24 * 180,\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'daily',\n      allowedTiers: ['trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['hourly', 'twoHourly', 'twelveHourly', 'daily', 'weekly'],\n    }),\n  ],\n  [\n    TimeframeKeys.ONE_YEAR,\n    new Timeframe({\n      key: TimeframeKeys.ONE_YEAR,\n      display: 'Last 365 days',\n      timeframeText: '365 days',\n      timeframeLength: () => 60 * 60 * 24 * 365,\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: true,\n      fineGrainedDefaultGranularity: 'daily',\n      allowedTiers: ['trial', 'plus', 'enterprise'],\n      allowedGranularitiesOverride: ['hourly', 'twoHourly', 'twelveHourly', 'daily', 'weekly'],\n    }),\n  ],\n  [\n    TimeframeKeys.CURRENT_WEEK,\n    new CurrentWeek({\n      key: TimeframeKeys.CURRENT_WEEK,\n      display: 'This week',\n      timeframeText: 'Week',\n      timeframeLength: () => {\n        // Monday -> now\n        const prevMonday = startOfWeek(new Date(), { weekStartsOn: 1 })\n        const end = startOfDay(addDays(new Date(), 1))\n\n        return (end.getTime() - prevMonday.getTime()) / 1000\n      },\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      fineGrainedDefaultGranularity: 'twoHourly',\n      allowedTiers: ['plus', 'enterprise'],\n      allowedGranularitiesOverride: ['thirtyMinutely', 'hourly', 'twoHourly', 'twelveHourly', 'daily'],\n    }),\n  ],\n  [\n    TimeframeKeys.CURRENT_MONTH,\n    new CurrentMonth({\n      key: TimeframeKeys.CURRENT_MONTH,\n      display: 'This month',\n      timeframeText: 'Month',\n      timeframeLength: () => {\n        // First of the month -> now\n        const firstOfTheMonth = startOfMonth(new Date())\n        const end = startOfDay(addDays(new Date(), 1))\n\n        return (end.getTime() - firstOfTheMonth.getTime()) / 1000\n      },\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      allowedTiers: ['plus', 'enterprise'],\n    }),\n  ],\n  [\n    TimeframeKeys.CURRENT_QUARTER,\n    new CurrentQuarter({\n      key: TimeframeKeys.CURRENT_QUARTER,\n      display: 'This quarter',\n      timeframeText: 'Quarter',\n      timeframeLength: () => {\n        // First of the quarter -> now\n        const firstOfTheQuarter = startOfQuarter(new Date())\n        const end = startOfDay(addDays(new Date(), 1))\n\n        return (end.getTime() - firstOfTheQuarter.getTime()) / 1000\n      },\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      allowedTiers: ['plus', 'enterprise'],\n    }),\n  ],\n  [\n    TimeframeKeys.CURRENT_YEAR,\n    new CurrentYear({\n      key: TimeframeKeys.CURRENT_YEAR,\n      display: 'This year',\n      timeframeText: 'Year',\n      timeframeLength: () => {\n        // Jan 1 -> now\n        const firstOfTheYear = new Date(new Date().getFullYear(), 0, 1)\n        const end = startOfDay(addDays(new Date(), 1))\n\n        return (end.getTime() - firstOfTheYear.getTime()) / 1000\n      },\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      allowedTiers: ['plus', 'enterprise'],\n    }),\n  ],\n  [\n    TimeframeKeys.PREVIOUS_WEEK,\n    new PreviousWeek({\n      key: TimeframeKeys.PREVIOUS_WEEK,\n      display: 'Previous week',\n      timeframeText: 'Week',\n      timeframeLength: () => 60 * 60 * 24 * 7,\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      fineGrainedDefaultGranularity: 'twoHourly',\n      allowedTiers: ['plus', 'enterprise'],\n      allowedGranularitiesOverride: ['thirtyMinutely', 'hourly', 'twoHourly', 'twelveHourly', 'daily'],\n    }),\n  ],\n  [\n    TimeframeKeys.PREVIOUS_MONTH,\n    new PreviousMonth({\n      key: TimeframeKeys.PREVIOUS_MONTH,\n      display: 'Previous month',\n      timeframeText: 'Month',\n      timeframeLength: () => {\n        let offset = 0\n        const end = startOfMonth(new Date())\n        const start = startOfMonth(subMonths(new Date(), 1))\n        if (end.getTimezoneOffset() !== start.getTimezoneOffset()) {\n          offset = dstOffsetHours(end, start)\n        }\n\n        // Not all months have the same number of days.\n        // Current month may be observing DST while previous is not\n        // take this into account when calculating the timeframe length for previous month\n        return (\n          60 * 60 * 24 * getDaysInMonth(new Date().setMonth(new Date().getMonth() - 1)) + hoursToSeconds(offset)\n        )\n      },\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      allowedTiers: ['plus', 'enterprise'],\n    }),\n  ],\n  [\n    TimeframeKeys.PREVIOUS_QUARTER,\n    new PreviousQuarter({\n      key: TimeframeKeys.PREVIOUS_QUARTER,\n      display: 'Previous quarter',\n      timeframeText: 'Quarter',\n      timeframeLength: () => {\n        const end = startOfQuarter(new Date())\n        const start = startOfQuarter(subQuarters(new Date(), 1))\n\n        return (end.getTime() - start.getTime()) / 1000\n      },\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      allowedTiers: ['plus', 'enterprise'],\n    }),\n  ],\n  [\n    TimeframeKeys.PREVIOUS_YEAR,\n    new PreviousYear({\n      key: TimeframeKeys.PREVIOUS_YEAR,\n      display: 'Previous year',\n      timeframeText: 'Year',\n      timeframeLength: () => {\n        // Not all years have the same number of days (leap years).\n        const end = new Date(new Date().getFullYear(), 0, 1)\n        const start = new Date(new Date().getFullYear() - 1, 0, 1)\n        let offset = 0\n        if (end.getTimezoneOffset() !== start.getTimezoneOffset()) {\n          offset = dstOffsetHours(end, start)\n        }\n\n        return 60 * 60 * 24 * (365 + (start.getFullYear() % 4 === 0 ? 1 : 0)) + hoursToSeconds(offset)\n      },\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      allowedTiers: ['plus', 'enterprise'],\n    }),\n  ],\n])\n\nexport function datePickerSelectionToTimeframe(datePickerSelection: DatePickerSelection): Timeframe {\n  const start = new Date(datePickerSelection.start)\n  const end = new Date(datePickerSelection.end)\n  const timeframeLength = (end.getTime() - start.getTime()) / 1000\n\n  const selectedTimePeriod =\n    datePickerSelection.timePeriodsKey && cloneDeep(TimePeriods.get(datePickerSelection.timePeriodsKey))\n\n  // Note: for custom timeframes, the timeframeLength is approximate: due to rounding\n  // based on granularity, the actual length will be slightly greater.\n\n  return (\n    selectedTimePeriod ||\n    new Timeframe({\n      key: 'custom',\n      timeframeText: 'custom',\n      display: 'custom',\n      startCustom: start,\n      endCustom: end,\n      timeframeLength: () => timeframeLength,\n      defaultResponseGranularity: 'daily',\n      dataGranularity: 'daily',\n      isRelative: false,\n      allowedTiers: ['free', 'plus', 'enterprise'],\n    })\n  )\n}\n\nexport function timeframeToDatepickerSelection(timeframe: Timeframe): DatePickerSelection {\n  // Only set `timePeriodsKey` if a relative time frame is chosen\n  // Custom time ranges are denoted by the absence of this key\n  return {\n    ...(timeframe.key !== 'custom' && { timePeriodsKey: timeframe.key }),\n    start: timeframe.rawStart(),\n    end: timeframe.rawEnd(),\n  }\n}\n\nexport function timeframeToDatepickerTimeperiod(timeframe: Timeframe): TimePeriod {\n  // The datepicker needs `start` and `end` functions for its timeperiods.\n  return {\n    key: timeframe.key,\n    display: timeframe.display,\n    timeframeText: timeframe.timeframeText,\n    timeframeLength: () => timeframe.key, // Used to generate test IDs for the Kongponent.\n    start: () => timeframe.rawStart(),\n    end: () => timeframe.rawEnd(),\n  }\n}\n\nexport function dstOffsetHours(d1: Date, d2: Date): number {\n  return minutesToHours(d1.getTimezoneOffset() - d2.getTimezoneOffset())\n}\n\nexport const TIMEFRAME_LOOKUP: Record<string, TimeframeKeys> = {\n  '15M': TimeframeKeys.FIFTEEN_MIN,\n  '1H': TimeframeKeys.ONE_HOUR,\n  '6H': TimeframeKeys.SIX_HOUR,\n  '12H': TimeframeKeys.TWELVE_HOUR,\n  '24H': TimeframeKeys.ONE_DAY,\n  '7D': TimeframeKeys.SEVEN_DAY,\n  '15m': TimeframeKeys.FIFTEEN_MIN,\n  '1h': TimeframeKeys.ONE_HOUR,\n  '6h': TimeframeKeys.SIX_HOUR,\n  '12h': TimeframeKeys.TWELVE_HOUR,\n  '24h': TimeframeKeys.ONE_DAY,\n  '7d': TimeframeKeys.SEVEN_DAY,\n  '30d': TimeframeKeys.THIRTY_DAY,\n  '90d': TimeframeKeys.NINETY_DAY,\n  '180d': TimeframeKeys.ONE_HUNDRED_EIGHTY_DAY,\n  '365d': TimeframeKeys.ONE_YEAR,\n  current_week: TimeframeKeys.CURRENT_WEEK,\n  current_month: TimeframeKeys.CURRENT_MONTH,\n  current_quarter: TimeframeKeys.CURRENT_QUARTER,\n  current_year: TimeframeKeys.CURRENT_YEAR,\n  previous_week: TimeframeKeys.PREVIOUS_WEEK,\n  previous_month: TimeframeKeys.PREVIOUS_MONTH,\n  previous_quarter: TimeframeKeys.PREVIOUS_QUARTER,\n  previous_year: TimeframeKeys.PREVIOUS_YEAR,\n}\n","export class SeededRandom {\n\n  private _seed: number\n\n  constructor(seed: number) {\n    this._seed = seed\n  }\n\n  next(min: number, max: number) {\n    const x = Math.sin(this._seed++) * 10000\n    const res = x - Math.floor(x)\n\n    return Math.floor(res * (max - min + 1)) + min\n  }\n}\n","import type {\n  DimensionMap,\n  ExploreAggregations,\n  MetricUnit,\n  DisplayBlob,\n  RecordEvent,\n  QueryResponseMeta,\n  ExploreResultV4,\n} from '../types'\nimport { SeededRandom } from './SeedRandom'\nimport { rand } from '../utils'\n\nexport interface Metric {\n  name: string\n  unit: string\n}\n\nexport const generateData = ({\n  metrics,\n  dimensionMap,\n  metaOverrides,\n  valueRange = [50, 500],\n  timeSeries = false,\n}: {\n  metrics: Metric[]\n  dimensionMap?: DimensionMap\n  metaOverrides?: Partial<QueryResponseMeta>\n  valueRange?: [number, number]\n  timeSeries?: boolean\n}) => {\n  if (timeSeries) {\n    return metrics.length === 1\n      ? generateSingleMetricTimeSeriesData(metrics[0], dimensionMap, metaOverrides, valueRange)\n      : generateMultipleMetricTimeSeriesData(metrics, metaOverrides, valueRange)\n  }\n  return generateCrossSectionalData(metrics, dimensionMap, metaOverrides, valueRange)\n\n}\n\nexport const generateSingleMetricTimeSeriesData = (metric: Metric, dimensionMap?: DimensionMap, metaOverrides?: Partial<QueryResponseMeta>, valueRange?: [number, number]) => {\n  const seed = rand(10, 10000)\n  const rng = new SeededRandom(seed)\n  const [minValue, maxValue] = valueRange || [50, 500]\n  const start = Date.now() - 6 * 60 * 60 * 1000 // 6 hours ago\n  const end = Date.now()\n  const data = []\n  let totalRequests = 0\n\n  for (let i = start; i <= end; i += 60 * 60 * 1000) { // 1 hour apart\n    if (dimensionMap) {\n      // If dimensionMap is provided, create an event for each dimension value\n      for (const dimension in dimensionMap) {\n        dimensionMap[dimension].forEach(dimensionValue => {\n          totalRequests += rng.next(minValue, maxValue)\n\n          const event = {\n            [dimension]: dimensionValue,\n            [metric.name]: totalRequests,\n          }\n\n          const record = {\n            version: '1.0',\n            timestamp: new Date(i).toISOString(),\n            event,\n          }\n          data.push(record)\n        })\n      }\n    } else {\n      // If no dimensionMap is provided, create a single event\n      totalRequests += rng.next(minValue, maxValue)\n\n      const record = {\n        version: '1.0',\n        timestamp: new Date(i).toISOString(),\n        event: {\n          [metric.name]: totalRequests,\n        },\n      }\n      data.push(record)\n    }\n  }\n\n  // V4 display blob\n  const displayBlob: DisplayBlob = {}\n\n  if (dimensionMap) {\n    for (const dimension in dimensionMap) {\n      displayBlob[dimension] = {}\n      dimensionMap[dimension].forEach(dimensionValue => {\n        displayBlob[dimension][dimensionValue] = {\n          name: dimensionValue,\n          deleted: false,\n        }\n      })\n    }\n  }\n\n  const meta: QueryResponseMeta = {\n    start: new Date(start).toISOString(),\n    end: new Date(end).toISOString(),\n    query_id: '12345',\n    metric_names: [metric.name] as ExploreAggregations[],\n    metric_units: {\n      [metric.name]: metric.unit,\n    },\n    granularity_ms: 60 * 60 * 1000, // 1 hour in ms\n    display: displayBlob,\n    ...(metaOverrides ?? {}),\n  }\n\n  return {\n    data,\n    meta,\n  } as ExploreResultV4\n}\n\nexport const generateMultipleMetricTimeSeriesData = (metrics: Metric[], metaOverrides?: Partial<QueryResponseMeta>, valueRange?: [number, number]) => {\n  const seed = rand(10, 10000)\n  const rng = new SeededRandom(seed)\n  const [minValue, maxValue] = valueRange || [50, 500]\n  const start = Date.now() - 6 * 60 * 60 * 1000 // 6 hours ago\n  const end = Date.now()\n  const data = []\n  const metricValues: { [metric: string]: number } = {}\n\n  metrics.forEach(metric => {\n    metricValues[metric.name] = 0\n  })\n\n  for (let i = start; i <= end; i += 60 * 60 * 1000) { // 1 hour apart\n    const event: RecordEvent = {}\n\n    metrics.forEach(metric => {\n      metricValues[metric.name] += rng.next(minValue, maxValue)\n      event[metric.name] = metricValues[metric.name]\n    })\n\n    const record = {\n      version: '1.0',\n      timestamp: new Date(i).toISOString(),\n      event,\n    }\n    data.push(record)\n  }\n\n  const meta: QueryResponseMeta = {\n    start: new Date(start).toISOString(),\n    end: new Date(end).toISOString(),\n    query_id: '12345',\n    metric_names: metrics.map(metric => metric.name) as ExploreAggregations[],\n    metric_units: metrics.reduce((units: MetricUnit, metric) => {\n      units[metric.name as ExploreAggregations] = metric.unit\n      return units\n    }, {}),\n    granularity_ms: 60 * 60 * 1000, // 1 hour in ms\n    display: {},\n    ...(metaOverrides ?? {}),\n  }\n\n  return {\n    data,\n    meta,\n  } as ExploreResultV4\n}\n\nexport const generateCrossSectionalData = (metrics: Metric[], dimensionMap?: DimensionMap, metaOverrides?: Partial<QueryResponseMeta>, valueRange?: [number, number]) => {\n  const seed = Math.floor(Math.random() * (10000 - 10 + 1)) + 10\n  const rng = new SeededRandom(seed)\n  const [minValue, maxValue] = valueRange || [50, 500]\n  const start = Date.now() - 6 * 60 * 60 * 1000 // 6 hours ago\n  const end = Date.now()\n  const timestamp = new Date((start + end) / 2).toISOString()\n\n  const data = []\n\n  if (dimensionMap) {\n    const dimensions = Object.keys(dimensionMap)\n    const dimensionValues = Object.values(dimensionMap)\n\n    // Recursively create a record for each combination of dimension values\n    const createRecords = (currentEvent: RecordEvent, index: number) => {\n      if (index === dimensions.length) {\n        // All dimensions have been added to the event, add metrics and push the record\n        metrics.forEach(metric => {\n          currentEvent[metric.name] = rng.next(minValue, maxValue)\n        })\n        data.push({\n          version: '1.0',\n          timestamp: new Date().toISOString(),\n          event: { ...currentEvent },\n        })\n        return\n      }\n\n      dimensionValues[index].forEach(value => {\n        createRecords({ ...currentEvent, [dimensions[index]]: value }, index + 1)\n      })\n    }\n\n    createRecords({}, 0)\n  } else {\n    // If no dimensionMap is provided, create a single event with all metrics\n    const event: RecordEvent = {}\n    metrics.forEach(metric => {\n      event[metric.name] = rng.next(minValue, maxValue)\n    })\n\n    data.push({\n      version: '1.0',\n      timestamp,\n      event,\n    })\n  }\n\n  // V4 display blob\n  const displayBlob: DisplayBlob = {}\n\n  if (dimensionMap) {\n    for (const dimension in dimensionMap) {\n      displayBlob[dimension] = {}\n      dimensionMap[dimension].forEach(dimensionValue => {\n        displayBlob[dimension][dimensionValue] = {\n          name: dimensionValue,\n          deleted: false,\n        }\n      })\n    }\n  }\n\n  const meta: QueryResponseMeta = {\n    start: new Date(start).toISOString(),\n    end: new Date(end).toISOString(),\n    query_id: '12345',\n    metric_names: metrics.map(metric => metric.name) as ExploreAggregations[],\n    metric_units: metrics.reduce((units: MetricUnit, metric) => {\n      units[metric.name as ExploreAggregations] = metric.unit\n      return units\n    }, {}),\n    truncated: false,\n    limit: 50,\n    display: displayBlob,\n    granularity_ms: end - start,\n    ...(metaOverrides ?? {}),\n  }\n\n  return {\n    data,\n    meta,\n  } as ExploreResultV4\n}\n","export function rand(min: number, max: number): number {\n  min = Math.ceil(min)\n  max = Math.floor(max)\n  return Math.floor(Math.random() * (max - min + 1) + min)\n}\n","import type { CountryIsoMap, CountryISOA2 } from '../types'\n\nimport { COUNTRIES } from '../types'\n\nexport const countries: Map<string, CountryIsoMap> = new Map(COUNTRIES.map(country => [country.code, { code: country.code, name: country.name }]))\n\nexport const getCountryName = (country_code: CountryISOA2) => {\n  return countries.get(country_code)?.name || country_code\n}\n","/* Approximate Number - outputs numbers in human-readable format, similar to ls -lh or Stack Overflow's reputation\n *\n * https://github.com/nfriedly/approximate-number\n *\n * Copyright (c) 2014 Nathan Friedly\n * Licensed under the MIT license.\n */\n\nconst THOUSAND = 1000;\nconst TEN_THOUSAND = 10000;\nconst MILLION = 1000000;\nconst BILLION = 1000000000;\nconst TRILLION = 1000000000000;\n\nconst addCommas = (num, opts) => {\n  if (opts.separator === false) {\n    return num.toString();\n  }\n\n  if (num < 1000) {\n    return num.toString();\n  }\n\n  const separator = typeof opts.separator === 'string' ? opts.separator : ',';\n\n  const out = [];\n  const digits = Math.round(num).toString().split('');\n\n  digits.reverse().forEach((digit, i) => {\n    if (i && i % 3 === 0) {\n      out.push(separator);\n    }\n    out.push(digit);\n  });\n\n  return out.reverse().join('');\n};\n\nconst formatDec = (num, base, opts) => {\n  const workingNum = num / base;\n  const ROUND = opts.round ? 'round' : 'floor';\n\n  if (opts.decimal === false) {\n    const value = Math[ROUND](workingNum);\n    return value.toString();\n  }\n\n  let value;\n  if (opts.precision) {\n    value = workingNum;\n  } else {\n    value = workingNum < 10 ? Math[ROUND](workingNum * 10) / 10 : Math[ROUND](workingNum);\n  }\n\n  let str = value.toString();\n  if (typeof opts.decimal === 'string') {\n    str = str.replace('.', opts.decimal);\n  }\n\n  return str;\n};\n\n/**\n * Converts big numbers into human-readable forms\n * @param {Number} num\n * @param {Object} [opts]\n * @param {String|Boolean} [opts.separator=',']  Thousands separator - set to a string (e.g. '.') to use that string or false to not use any separator\n * @param {String|Boolean} [opts.decimal='.'] Decimal - set to a string (e.g. ',') to use that or set to false to avoid outputting values with a decimal\n * @param {Boolean} [opts.round=false] Round numbers off rather than flooring/truncating. When true, 105000 would become '11m', when false it becomes '10m'\n * @param {Boolean} [opts.min10k=false] Do not abbreviate numbers below 10000. E.g. 9999 would become '9,999' rather than '9k'. (Stack Overflow-style)\n * @param {String} [opts.prefix=''] Optional string to prepend to the value, e.g. '$'\n * @param {String} [opts.suffix=''] Optional string to append to the value, e.g. '%'\n * @param {Boolean} [opts.capital=false] Set to true to use capital letters, e.g. 3.9M instead of 3.9m\n * @param {Number} [opts.precision] Optional number of significant digits. Must be greater than 0.\n *\n * @returns {String}\n */\nfunction approximateNumber(num, opts = {}) {\n  let numString;\n\n  const negative = num < 0;\n  if (negative) {\n    num = Math.abs(num);\n  }\n\n  if (opts.precision) {\n    num = parseFloat(num.toPrecision(opts.precision));\n  }\n\n  const thousandsBreak = opts.min10k ? TEN_THOUSAND : THOUSAND;\n\n  if (num < thousandsBreak) {\n    numString = addCommas(formatDec(num, 1, opts), opts);\n  } else if (opts.precision && opts.precision > Math.log10(num)) {\n    numString = addCommas(formatDec(num, 1, opts), opts);\n  } else if (num < MILLION) {\n    numString = `${formatDec(num, THOUSAND, opts)}k`;\n  } else if (num < BILLION) {\n    numString = `${formatDec(num, MILLION, opts)}m`;\n  } else if (num < TRILLION) {\n    numString = `${addCommas(formatDec(num, BILLION, opts), opts)}b`;\n  } else {\n    numString = `${addCommas(formatDec(num, TRILLION, opts), opts)}t`;\n  }\n\n  if (negative) {\n    numString = `-${numString}`;\n  }\n\n  if (opts.capital) {\n    numString = numString.toUpperCase();\n  }\n\n  if (opts.prefix) {\n    numString = `${opts.prefix}${numString}`;\n  }\n\n  if (opts.suffix) {\n    numString = `${numString}${opts.suffix}`;\n  }\n\n  return numString;\n}\n\napproximateNumber.addCommas = addCommas;\n\nexport default approximateNumber;\nexport { approximateNumber, addCommas };\n\n","import type { IntlShapeEx } from '@kong-ui-public/i18n'\n// @ts-ignore - approximate-number no exported module\nimport approxNum from 'approximate-number'\n\n// Guard against SSR/non-browser contexts where `document` is undefined\nconst defaultLocale = (typeof document !== 'undefined' && document.documentElement?.lang) || 'en-US'\n\nexport const numberFormatter = new Intl.NumberFormat(defaultLocale)\n\nexport function unitFormatter<T extends Record<string, any>>({\n  i18n,\n} : {\n  i18n: IntlShapeEx<T>\n}) {\n\n  const formatBytes = (value: number, isBytes1024?: boolean): string => {\n    if (isNaN(value)) {\n      return '0 B'\n    }\n\n    const pb = isBytes1024 ? Math.pow(2, 50) : 1e15\n    const tb = isBytes1024 ? Math.pow(2, 40) : 1e12\n    const gb = isBytes1024 ? Math.pow(2, 30) : 1e9\n    const mb = isBytes1024 ? Math.pow(2, 20) : 1e6\n    const kb = isBytes1024 ? Math.pow(2, 10) : 1e3\n\n    let out\n\n    if (value >= pb) {\n      out = i18n.formatNumber(\n        Number.parseFloat((value / pb).toPrecision(3)),\n        { style: 'unit', unit: 'petabyte', unitDisplay: 'narrow' },\n      )\n    } else if (value >= tb) {\n      out = i18n.formatNumber(\n        Number.parseFloat((value / tb).toPrecision(3)),\n        { style: 'unit', unit: 'terabyte', unitDisplay: 'narrow' },\n      )\n    } else if (value >= gb) {\n      out = i18n.formatNumber(\n        Number.parseFloat((value / gb).toPrecision(3)),\n        { style: 'unit', unit: 'gigabyte', unitDisplay: 'narrow' },\n      )\n    } else if (value >= mb) {\n      out = i18n.formatNumber(\n        Number.parseFloat((value / mb).toPrecision(3)),\n        { style: 'unit', unit: 'megabyte', unitDisplay: 'narrow' },\n      )\n    } else if (value >= kb) {\n      out = i18n.formatNumber(\n        Number.parseFloat((value / kb).toPrecision(3)),\n        { style: 'unit', unit: 'kilobyte', unitDisplay: 'narrow' },\n      )\n    } else {\n      out = i18n.formatNumber(\n        Number.parseFloat((value).toPrecision(3)),\n        { style: 'unit', unit: 'byte', unitDisplay: 'narrow' },\n      )\n    }\n\n    // i18n.formatNumber formats it as `10.77kB` but we want `10.77 kB`\n    return out.replace(/([a-zA-Z]*)$/, ' $1')\n  }\n\n  const formatCost = (value: number, currency: string = 'USD'): string => {\n    if (isNaN(value)) {\n      return currency === 'USD' ? '$0.00' : `${value}`\n    }\n\n    if (value >= 0.01 || currency !== 'USD') {\n      return i18n.formatNumber(value, { style: 'currency', currency })\n    }\n\n    if (value < 0.0001) {\n      return '< $0.0001'\n    }\n\n    // when currency is USD, special case handling for 0.0001 to 0.01\n    return `$${Number.parseFloat(value.toPrecision(4))}`\n\n  }\n\n  type FormatNumberOptions = {\n    isBytes1024?: boolean\n    currency?: string\n    // not supported for bytes or currency formatting\n    approximate?: boolean\n    translateUnit?: (unit: string, value: number) => string\n  }\n\n  /*\n   * currently the units supported are those returned from\n   * https://github.com/Kong/kanalytics/blob/main/src/druid/druid.service.ts#L58-L73\n   */\n  const formatUnit = (value: number, unit: string, {\n    isBytes1024 = false,\n    currency = 'USD',\n    approximate = false,\n    translateUnit = (unit: string) => unit,\n  }: FormatNumberOptions = {}): string => {\n    const translatedUnit = translateUnit(unit, value)\n\n    switch (unit) {\n      case 'bytes':\n        return formatBytes(value, isBytes1024)\n      case 'usd':\n        return formatCost(value, currency)\n      case 'ms':\n      case 'count/minute':\n      case 'token count':\n      case 'count':\n      default:\n        if (isNaN(value)) {\n          return `${value}`\n        }\n        if (approximate) {\n          return `${approxNum(value, { capital: true })} ${translatedUnit}`\n        }\n        return value >= 0.01\n          ? `${numberFormatter.format(Number.parseFloat(value.toFixed(2)))} ${translatedUnit}`\n          : `${Number.parseFloat(value.toPrecision(4))} ${translatedUnit}`\n    }\n  }\n\n  const formatRange = (min: number, max: number, unit: string, {\n    isBytes1024 = false,\n    currency = 'USD',\n    approximate = false,\n    translateUnit = (unit: string) => unit,\n  }: FormatNumberOptions = {}): string => {\n\n    const translatedUnit = translateUnit(unit, max)\n\n    switch (unit) {\n      case 'bytes':\n        return `${formatBytes(min, isBytes1024)} - ${formatBytes(max, isBytes1024)}`\n      case 'usd':\n        return `${formatCost(min, currency)} - ${formatCost(max, currency)}`\n      case 'ms':\n      case 'count/minute':\n      case 'token count':\n      case 'count':\n      default:\n        if (isNaN(min) || isNaN(max)) {\n          return `${min} - ${max}`\n        }\n        if (approximate) {\n          return `${approxNum(min, { capital: true })} - ${approxNum(max, { capital: true })} ${translatedUnit}`\n        }\n    }\n    const minVal = min >= 0.01\n      ? `${numberFormatter.format(Number.parseFloat(min.toFixed(2)))}`\n      : `${Number.parseFloat(min.toPrecision(4))}`\n\n    const maxVal = max >= 0.01\n      ? `${numberFormatter.format(Number.parseFloat(max.toFixed(2)))}`\n      : `${Number.parseFloat(max.toPrecision(4))}`\n\n    return `${minVal} - ${maxVal} ${translatedUnit}`\n  }\n\n  return { formatUnit, formatBytes, formatCost, formatRange }\n}\n"],"names":["REFRESH_INTERVAL_MS","EXPORT_RECORD_LIMIT","INJECT_QUERY_PROVIDER","TimeframeKeys","extendedRelativeTimeRangeValues","reportChartTypes","exploreFilterTypesV2","requestFilterTypeEqualsV2","requestFilterTypeMetricV2","requestFilterTypeEmptyV2","requestFilterTypeWildcardV2","timeRangeTypeV2","relativeTimeRangeValuesV4","granularityValues","makeFilterable","queryable","d","queryableBasicExploreDimensions","filterableBasicExploreDimensions","basicExploreAggregations","queryableExploreDimensions","filterableExploreDimensions","exploreAggregations","queryableAiExploreDimensions","filterableAiExploreDimensions","aiExploreAggregations","queryableRequestDimensions","filterableRequestDimensions","queryableRequestWildcardDimensions","filterableRequestWildcardDimensions","queryableRequestMetrics","filterableRequestMetrics","relativeTimeRangeValuesRequestV2","queryableAgenticExploreDimensions","filterableAgenticExploreDimensions","agenticExploreAggregations","queryDatasources","datasourceToFilterableDimensions","stripUnknownFilters","datasource","filters","f","COUNTRIES","dashboardTileTypes","syntheticsDataKey","chartTitle","allowCsvExport","entityLinks","chartDatasetColorsSchema","slottableSchema","barChartSchema","thresholdSchema","timeseriesChartSchema","gaugeChartSchema","donutChartSchema","topNTableSchema","tableDataGridConfigSchema","metricCardSchema","singleValueSchema","choroplethMapSchema","c","exploreV4RelativeTimeSchema","exploreV4AbsoluteTimeSchema","baseQueryProperties","metricsFn","aggregations","dimensionsFn","dimensions","filtersFn","filterableDimensions","platformFiltersFn","apiUsageQuerySchema","basicQuerySchema","llmUsageSchema","agenticUsageSchema","platformQuerySchema","platformTabularQuerySchema","validDashboardChartQuerySchemas","validDashboardChartQuery","validDashboardTableQuerySchemas","validDashboardTableQuery","validDashboardQuery","dashboardTileChartSchema","chartTileDefinitionSchema","tableTileDefinitionSchema","tileDefinitionSchema","tileLayoutSchema","chartTileConfigSchema","tableTileConfigSchema","tileConfigSchema","dashboardConfigSchema","getFieldDataSources","dimension","datasources","formatDistanceLocale","formatDistance","token","count","options","result","tokenValue","buildFormatLongFn","args","width","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","_date","_baseDate","_options","buildLocalizeFn","value","context","valuesArray","defaultWidth","index","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","number","rem100","localize","quarter","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","key","findIndex","pattern","findKey","rest","object","predicate","array","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","enUS","defaultOptions","getDefaultOptions","millisecondsInWeek","millisecondsInDay","minutesInHour","secondsInHour","constructFromSymbol","constructFrom","date","toDate","argument","getTimezoneOffsetInMilliseconds","utcDate","normalizeDates","dates","normalize","startOfDay","differenceInCalendarDays","laterDate","earlierDate","laterDate_","earlierDate_","laterStartOfDay","earlierStartOfDay","laterTimestamp","earlierTimestamp","startOfYear","date_","getDayOfYear","startOfWeek","weekStartsOn","_b","_a","_d","_c","day","diff","startOfISOWeek","getISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfISOWeekYear","fourthOfJanuary","getISOWeek","getWeekYear","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfWeekYear","firstWeek","getWeek","addLeadingZeros","targetLength","sign","output","lightFormatters","signedYear","month","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","dayPeriodEnum","formatters","era","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","timestamp","offset","delimiter","absOffset","minutes","dateLongFormatter","timeLongFormatter","dateTimeLongFormatter","datePattern","timePattern","dateTimeFormat","longFormatters","dayOfYearTokenRE","weekYearTokenRE","throwTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","warnOrThrowProtectedError","format","input","_message","message","subject","isDate","isValid","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","formatStr","locale","defaultLocale","_f","_e","_h","_g","originalDate","parts","substring","firstCharacter","longFormatter","cleanEscapedString","formatterOptions","part","formatter","matched","addDays","amount","addMonths","dayOfMonth","endOfDesiredMonth","daysInMonth","addQuarters","startOfQuarter","currentMonth","startOfMonth","getDaysInMonth","monthIndex","lastDayOfMonth","getInternalDefaultOptions","getTime","getUnixTime","hoursToSeconds","minutesToHours","subMonths","subQuarters","tzIntlTimeZoneName","length","dtf","getDTF","partsTimeZone","hackyTimeZone","formatted","i","tzNameMatch","timeZone","tzTokenizeDate","getDateTimeFormat","partsOffset","hackyOffset","typeToPos","filled","pos","error","parsed","dtfCache","testDateFormatted","hourCycleSupported","newDateUTC","fullYear","hour","minute","second","millisecond","MILLISECONDS_IN_HOUR","MILLISECONDS_IN_MINUTE","patterns","tzParseTimezone","timezoneString","isUtcDate","absoluteOffset","validateTimezone","isValidTimezoneIANAString","toUtcDate","calcOffset","fixOffset","tokens","asUTC","asTS","over","utcGuess","o2","o3","validIANATimezoneCache","timeZoneString","getTimeZoneOffset","timeZoneOffset","tzPattern","DEFAULT_ADDITIONAL_DIGITS","additionalDigits","dateStrings","splitDateString","restDateString","parseYear","parseDate","time","parseTime","dateString","timeString","patternYYY","patternYYYYY","yearString","centuryString","validateDate","validateDayOfYearDate","validateWeekDate","dayOfISOWeekYear","validateTime","seconds","fourthOfJanuaryDay","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","isLeapYearIndex","isLeapYear","tzFormattingTokensRegExp","matches","precededByQuotedSection","replaced","dateFnsFormat","toZonedTime","offsetMilliseconds","resultDate","formatInTimeZone","fromZonedTime","utc","getTimezoneOffset","formatTimestamp","ts","tz","formatTime","timeFormat","formatTimeRange","start","end","Granularities","granularitiesToOptions","values","i18n","v","granularityMsToQuery","granularity","origin","msToGranularity","ms","k","toNearestTimeGrain","op","granularityMs","tzOffsetMs","floorToNearestTimeGrain","ceilToNearestTimeGrain","BaseQueryTime","timeframe","dataGranularity","__publicField","isRelative","periods","ceilEnd","rawStart","floorStart","periodOffset","TimeseriesQueryTime","fineGrain","UnaryQueryTime","DeltaQueryTime","LARGE_ARRAY_SIZE","HASH_UNDEFINED","MAX_SAFE_INTEGER","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","objectTag","promiseTag","regexpTag","setTag","stringTag","symbolTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reRegExpChar","reFlags","reIsHostCtor","reIsUint","cloneableTags","freeGlobal","global","freeSelf","root","freeExports","exports","freeModule","module","moduleExports","addMapEntry","map","pair","addSetEntry","set","arrayEach","iteratee","arrayPush","arrayReduce","accumulator","initAccum","baseTimes","n","getValue","isHostObject","mapToArray","overArg","func","transform","arg","setToArray","arrayProto","funcProto","objectProto","coreJsData","maskSrcKey","uid","funcToString","hasOwnProperty","objectToString","reIsNative","Buffer","Symbol","Uint8Array","getPrototype","objectCreate","propertyIsEnumerable","splice","nativeGetSymbols","nativeIsBuffer","nativeKeys","DataView","getNative","Map","Promise","Set","WeakMap","nativeCreate","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","Hash","entries","entry","hashClear","hashDelete","hashGet","data","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","cache","pairs","arrayLikeKeys","inherited","isArray","isArguments","skipIndexes","isIndex","assignValue","objValue","eq","baseAssign","source","copyObject","keys","baseClone","isDeep","isFull","customizer","stack","isObject","isArr","initCloneArray","copyArray","tag","getTag","isFunc","isBuffer","cloneBuffer","initCloneObject","copySymbols","initCloneByTag","stacked","props","getAllKeys","subValue","baseCreate","proto","baseGetAllKeys","keysFunc","symbolsFunc","baseGetTag","baseIsNative","isMasked","isFunction","baseKeys","isPrototype","buffer","cloneArrayBuffer","arrayBuffer","cloneDataView","dataView","cloneMap","cloneFunc","cloneRegExp","regexp","cloneSet","cloneSymbol","symbol","cloneTypedArray","typedArray","newValue","getSymbols","isKeyable","stubArray","Ctor","ctorString","type","cloneDeep","other","isArrayLikeObject","isArrayLike","isLength","isObjectLike","stubFalse","adjustForTz","Timeframe","opts","_tz","allowedValues","tzNeutral","CurrentWeek","thisMonday","CurrentMonth","firstOfTheMonth","CurrentQuarter","firstOfTheQuarter","CurrentYear","firstOfTheYear","PreviousWeek","lastMonday","PreviousQuarter","thisQuarter","lastQuarter","PreviousMonth","thisMonth","lastMonth","PreviousYear","thisYear","lastYear","TimePeriods","prevMonday","dstOffsetHours","datePickerSelectionToTimeframe","datePickerSelection","timeframeLength","timeframeToDatepickerSelection","timeframeToDatepickerTimeperiod","d1","d2","TIMEFRAME_LOOKUP","SeededRandom","seed","min","max","x","res","generateData","metrics","dimensionMap","metaOverrides","valueRange","timeSeries","generateSingleMetricTimeSeriesData","generateMultipleMetricTimeSeriesData","generateCrossSectionalData","metric","rand","rng","minValue","maxValue","totalRequests","dimensionValue","event","record","displayBlob","meta","metricValues","units","dimensionValues","createRecords","currentEvent","countries","country","getCountryName","country_code","THOUSAND","TEN_THOUSAND","MILLION","BILLION","TRILLION","addCommas","num","separator","out","digit","formatDec","base","workingNum","ROUND","str","approximateNumber","numString","negative","thousandsBreak","numberFormatter","unitFormatter","formatBytes","isBytes1024","pb","tb","gb","mb","kb","formatCost","currency","unit","approximate","translateUnit","translatedUnit","approxNum","minVal","maxVal"],"mappings":"wPAAO,MAAMA,GAAsB,GAAK,IAE3BC,GAAsB,IAEtBC,GAAwB,2BCH9B,IAAKC,GAAAA,IACVA,EAAA,YAAc,MACdA,EAAA,SAAW,KACXA,EAAA,SAAW,KACXA,EAAA,YAAc,MACdA,EAAA,QAAU,MACVA,EAAA,UAAY,KACZA,EAAA,WAAa,MACbA,EAAA,WAAa,MACbA,EAAA,uBAAyB,OACzBA,EAAA,SAAW,OACXA,EAAA,aAAe,eACfA,EAAA,cAAgB,gBAChBA,EAAA,gBAAkB,kBAClBA,EAAA,aAAe,eACfA,EAAA,cAAgB,gBAChBA,EAAA,eAAiB,iBACjBA,EAAA,iBAAmB,mBACnBA,EAAA,cAAgB,gBAlBNA,IAAAA,GAAA,CAAA,CAAA,ECgBL,MAAMC,GAAkC,CAC7C,MACA,OACA,OACA,kBACA,mBACA,eACA,eACF,ECzBaC,GAAmB,CAC9B,iBACA,eACA,kBACA,iBACA,iBACA,QACA,eACA,OACF,ECRaC,GAAuB,CAAC,KAAM,SAAU,UAAU,EAIlDC,GAA4B,CAAC,IAAK,IAAI,EAItCC,GAA4B,CAAC,IAAK,KAAM,IAAK,IAAK,KAAM,IAAI,EAI5DC,GAA2B,CAAC,QAAS,WAAW,EAIhDC,GAA8B,CAAC,cAAe,WAAW,EAUzDC,GAAkB,CAAC,WAAY,UAAU,EAYzCC,GAA4B,CACvC,MACA,KACA,KACA,MACA,MACA,KACA,eACA,gBACA,MACA,gBACA,gBACF,EAkBaC,GAAoB,CAC/B,WACA,cACA,iBACA,WACA,eACA,cACA,iBACA,SACA,YACA,eACA,QACA,SACA,OACF,ECxEaC,GAAgDC,GAC3DA,EAAU,OAAOC,GAAKA,IAAM,MAAM,ECTvBC,GAAkC,CAC7C,MACA,cACA,cACA,sBACA,gBACA,sBACA,kBACA,kBACA,SACA,QACA,cACA,sBACA,MACF,EAIaC,GAAmCJ,GAAeG,EAA+B,EAcjFE,GAA2B,CACtC,kBACA,aACA,gBACA,qBACA,0BACF,ECrCaC,GAA6B,CACxC,GAAGH,GACH,cACA,kBACA,4BACA,oBACA,WACA,eACA,uBACA,+BACA,kBACA,0BACA,QACA,aACA,WACF,EAIaI,GAA8BP,GAAeM,EAA0B,EAYvEE,GAAsB,CACjC,GAAGH,GACH,uBACA,uBACA,uBACA,uBACA,uBACA,uBACA,2BACA,mBACA,mBACA,mBACA,uBACA,4BACA,4BACA,4BACA,gCACA,oBACA,oBACA,oBACA,wBACA,oBACA,mBACA,mBACA,mBACA,uBACA,kBACF,EC3DaI,GAA+B,CAC1C,gBACA,sBACA,kBACA,WACA,cACA,QACA,cACA,oBACA,mBACA,mBACA,0BACA,uBACA,OACA,QACA,cACA,sBACA,YACA,WACF,EAIaC,GAAgCV,GAAeS,EAA4B,EAY3EE,GAAwB,CACnC,eACA,gBACA,oBACA,mBACA,aACA,OACA,uCACA,kCACA,sBACA,wBACA,qBACF,EC9CaC,GAA6B,CACxC,iBACA,YACA,aACA,cACA,MACA,cACA,cACA,sBACA,cACA,YACA,kBACA,4BACA,2BACA,oBACA,wBACA,YACA,WACA,iBACA,gBACA,sBACA,eACA,kBACA,0BACA,kBACA,cACA,oBACA,cACA,YACA,aACA,iBACA,gBACA,SACA,YACA,QACA,aACA,cACA,+BACA,kBACA,QACA,eACA,mBACA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