{"ast":null,"code":"const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: {\n      standalone: \"manje od 1 sekunde\",\n      withPrepositionAgo: \"manje od 1 sekunde\",\n      withPrepositionIn: \"manje od 1 sekundu\"\n    },\n    dual: \"manje od {{count}} sekunde\",\n    other: \"manje od {{count}} sekundi\"\n  },\n  xSeconds: {\n    one: {\n      standalone: \"1 sekunda\",\n      withPrepositionAgo: \"1 sekunde\",\n      withPrepositionIn: \"1 sekundu\"\n    },\n    dual: \"{{count}} sekunde\",\n    other: \"{{count}} sekundi\"\n  },\n  halfAMinute: \"pola minute\",\n  lessThanXMinutes: {\n    one: {\n      standalone: \"manje od 1 minute\",\n      withPrepositionAgo: \"manje od 1 minute\",\n      withPrepositionIn: \"manje od 1 minutu\"\n    },\n    dual: \"manje od {{count}} minute\",\n    other: \"manje od {{count}} minuta\"\n  },\n  xMinutes: {\n    one: {\n      standalone: \"1 minuta\",\n      withPrepositionAgo: \"1 minute\",\n      withPrepositionIn: \"1 minutu\"\n    },\n    dual: \"{{count}} minute\",\n    other: \"{{count}} minuta\"\n  },\n  aboutXHours: {\n    one: {\n      standalone: \"oko 1 sat\",\n      withPrepositionAgo: \"oko 1 sat\",\n      withPrepositionIn: \"oko 1 sat\"\n    },\n    dual: \"oko {{count}} sata\",\n    other: \"oko {{count}} sati\"\n  },\n  xHours: {\n    one: {\n      standalone: \"1 sat\",\n      withPrepositionAgo: \"1 sat\",\n      withPrepositionIn: \"1 sat\"\n    },\n    dual: \"{{count}} sata\",\n    other: \"{{count}} sati\"\n  },\n  xDays: {\n    one: {\n      standalone: \"1 dan\",\n      withPrepositionAgo: \"1 dan\",\n      withPrepositionIn: \"1 dan\"\n    },\n    dual: \"{{count}} dana\",\n    other: \"{{count}} dana\"\n  },\n  aboutXWeeks: {\n    one: {\n      standalone: \"oko 1 sedmicu\",\n      withPrepositionAgo: \"oko 1 sedmicu\",\n      withPrepositionIn: \"oko 1 sedmicu\"\n    },\n    dual: \"oko {{count}} sedmice\",\n    other: \"oko {{count}} sedmice\"\n  },\n  xWeeks: {\n    one: {\n      standalone: \"1 sedmicu\",\n      withPrepositionAgo: \"1 sedmicu\",\n      withPrepositionIn: \"1 sedmicu\"\n    },\n    dual: \"{{count}} sedmice\",\n    other: \"{{count}} sedmice\"\n  },\n  aboutXMonths: {\n    one: {\n      standalone: \"oko 1 mjesec\",\n      withPrepositionAgo: \"oko 1 mjesec\",\n      withPrepositionIn: \"oko 1 mjesec\"\n    },\n    dual: \"oko {{count}} mjeseca\",\n    other: \"oko {{count}} mjeseci\"\n  },\n  xMonths: {\n    one: {\n      standalone: \"1 mjesec\",\n      withPrepositionAgo: \"1 mjesec\",\n      withPrepositionIn: \"1 mjesec\"\n    },\n    dual: \"{{count}} mjeseca\",\n    other: \"{{count}} mjeseci\"\n  },\n  aboutXYears: {\n    one: {\n      standalone: \"oko 1 godinu\",\n      withPrepositionAgo: \"oko 1 godinu\",\n      withPrepositionIn: \"oko 1 godinu\"\n    },\n    dual: \"oko {{count}} godine\",\n    other: \"oko {{count}} godina\"\n  },\n  xYears: {\n    one: {\n      standalone: \"1 godina\",\n      withPrepositionAgo: \"1 godine\",\n      withPrepositionIn: \"1 godinu\"\n    },\n    dual: \"{{count}} godine\",\n    other: \"{{count}} godina\"\n  },\n  overXYears: {\n    one: {\n      standalone: \"preko 1 godinu\",\n      withPrepositionAgo: \"preko 1 godinu\",\n      withPrepositionIn: \"preko 1 godinu\"\n    },\n    dual: \"preko {{count}} godine\",\n    other: \"preko {{count}} godina\"\n  },\n  almostXYears: {\n    one: {\n      standalone: \"gotovo 1 godinu\",\n      withPrepositionAgo: \"gotovo 1 godinu\",\n      withPrepositionIn: \"gotovo 1 godinu\"\n    },\n    dual: \"gotovo {{count}} godine\",\n    other: \"gotovo {{count}} godina\"\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    if (options?.addSuffix) {\n      if (options.comparison && options.comparison > 0) {\n        result = tokenValue.one.withPrepositionIn;\n      } else {\n        result = tokenValue.one.withPrepositionAgo;\n      }\n    } else {\n      result = tokenValue.one.standalone;\n    }\n  } else if (count % 10 > 1 && count % 10 < 5 &&\n  // if last digit is between 2 and 4\n  String(count).substr(-2, 1) !== \"1\" // unless the 2nd to last digit is \"1\"\n  ) {\n    result = tokenValue.dual.replace(\"{{count}}\", String(count));\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", String(count));\n  }\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"za \" + result;\n    } else {\n      return \"prije \" + result;\n    }\n  }\n  return result;\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}