{"ast":null,"code":"const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"nas lugha na diog\",\n    other: \"nas lugha na {{count}} diogan\"\n  },\n  xSeconds: {\n    one: \"1 diog\",\n    two: \"2 dhiog\",\n    twenty: \"20 diog\",\n    other: \"{{count}} diogan\"\n  },\n  halfAMinute: \"leth mhionaid\",\n  lessThanXMinutes: {\n    one: \"nas lugha na mionaid\",\n    other: \"nas lugha na {{count}} mionaidean\"\n  },\n  xMinutes: {\n    one: \"1 mionaid\",\n    two: \"2 mhionaid\",\n    twenty: \"20 mionaid\",\n    other: \"{{count}} mionaidean\"\n  },\n  aboutXHours: {\n    one: \"mu uair de thìde\",\n    other: \"mu {{count}} uairean de thìde\"\n  },\n  xHours: {\n    one: \"1 uair de thìde\",\n    two: \"2 uair de thìde\",\n    twenty: \"20 uair de thìde\",\n    other: \"{{count}} uairean de thìde\"\n  },\n  xDays: {\n    one: \"1 là\",\n    other: \"{{count}} là\"\n  },\n  aboutXWeeks: {\n    one: \"mu 1 seachdain\",\n    other: \"mu {{count}} seachdainean\"\n  },\n  xWeeks: {\n    one: \"1 seachdain\",\n    other: \"{{count}} seachdainean\"\n  },\n  aboutXMonths: {\n    one: \"mu mhìos\",\n    other: \"mu {{count}} mìosan\"\n  },\n  xMonths: {\n    one: \"1 mìos\",\n    other: \"{{count}} mìosan\"\n  },\n  aboutXYears: {\n    one: \"mu bhliadhna\",\n    other: \"mu {{count}} bliadhnaichean\"\n  },\n  xYears: {\n    one: \"1 bhliadhna\",\n    other: \"{{count}} bliadhna\"\n  },\n  overXYears: {\n    one: \"còrr is bliadhna\",\n    other: \"còrr is {{count}} bliadhnaichean\"\n  },\n  almostXYears: {\n    one: \"cha mhòr bliadhna\",\n    other: \"cha mhòr {{count}} bliadhnaichean\"\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 if (count === 2 && !!tokenValue.two) {\n    result = tokenValue.two;\n  } else if (count === 20 && !!tokenValue.twenty) {\n    result = tokenValue.twenty;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", String(count));\n  }\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"ann an \" + result;\n    } else {\n      return \"o chionn \" + result;\n    }\n  }\n  return result;\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}