{"ast":null,"code":"const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"less than a second\",\n    other: \"less than {{count}} seconds\"\n  },\n  xSeconds: {\n    one: \"1 second\",\n    other: \"{{count}} seconds\"\n  },\n  halfAMinute: \"half a minute\",\n  lessThanXMinutes: {\n    one: \"less than a minute\",\n    other: \"less than {{count}} minutes\"\n  },\n  xMinutes: {\n    one: \"1 minute\",\n    other: \"{{count}} minutes\"\n  },\n  aboutXHours: {\n    one: \"about 1 hour\",\n    other: \"about {{count}} hours\"\n  },\n  xHours: {\n    one: \"1 hour\",\n    other: \"{{count}} hours\"\n  },\n  xDays: {\n    one: \"1 day\",\n    other: \"{{count}} days\"\n  },\n  aboutXWeeks: {\n    one: \"about 1 week\",\n    other: \"about {{count}} weeks\"\n  },\n  xWeeks: {\n    one: \"1 week\",\n    other: \"{{count}} weeks\"\n  },\n  aboutXMonths: {\n    one: \"about 1 month\",\n    other: \"about {{count}} months\"\n  },\n  xMonths: {\n    one: \"1 month\",\n    other: \"{{count}} months\"\n  },\n  aboutXYears: {\n    one: \"about 1 year\",\n    other: \"about {{count}} years\"\n  },\n  xYears: {\n    one: \"1 year\",\n    other: \"{{count}} years\"\n  },\n  overXYears: {\n    one: \"over 1 year\",\n    other: \"over {{count}} years\"\n  },\n  almostXYears: {\n    one: \"almost 1 year\",\n    other: \"almost {{count}} years\"\n  }\n};\nexport const formatDistance = (token, count, options) => {\n  let result;\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  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"in \" + result;\n    } else {\n      return result + \" ago\";\n    }\n  }\n  return result;\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}