cjs âĸ Lines: 109"use strict";
exports.formatDistance = void 0;
var _index = require("./localize.cjs");
const formatDistanceLocale = {
lessThanXSeconds: {
one: "āĻĒā§āϰāĻžā§ ā§§ āϏā§āĻā§āύā§āĻĄ",
other: "āĻĒā§āϰāĻžā§ {{count}} āϏā§āĻā§āύā§āĻĄ",
},
xSeconds: {
one: "ā§§ āϏā§āĻā§āύā§āĻĄ",
other: "{{count}} āϏā§āĻā§āύā§āĻĄ",
},
halfAMinute: "āĻāϧ āĻŽāĻŋāύāĻŋāĻ",
lessThanXMinutes: {
one: "āĻĒā§āϰāĻžā§ ā§§ āĻŽāĻŋāύāĻŋāĻ",
other: "āĻĒā§āϰāĻžā§ {{count}} āĻŽāĻŋāύāĻŋāĻ",
},
xMinutes: {
one: "ā§§ āĻŽāĻŋāύāĻŋāĻ",
other: "{{count}} āĻŽāĻŋāύāĻŋāĻ",
},
aboutXHours: {
one: "āĻĒā§āϰāĻžā§ ā§§ āĻāύā§āĻāĻž",
other: "āĻĒā§āϰāĻžā§ {{count}} āĻāύā§āĻāĻž",
},
xHours: {
one: "ā§§ āĻāύā§āĻāĻž",
other: "{{count}} āĻāύā§āĻāĻž",
},
xDays: {
one: "ā§§ āĻĻāĻŋāύ",
other: "{{count}} āĻĻāĻŋāύ",
},
aboutXWeeks: {
one: "āĻĒā§āϰāĻžā§ ā§§ āϏāĻĒā§āϤāĻžāĻš",
other: "āĻĒā§āϰāĻžā§ {{count}} āϏāĻĒā§āϤāĻžāĻš",
},
xWeeks: {
one: "ā§§ āϏāĻĒā§āϤāĻžāĻš",
other: "{{count}} āϏāĻĒā§āϤāĻžāĻš",
},
aboutXMonths: {
one: "āĻĒā§āϰāĻžā§ ā§§ āĻŽāĻžāϏ",
other: "āĻĒā§āϰāĻžā§ {{count}} āĻŽāĻžāϏ",
},
xMonths: {
one: "ā§§ āĻŽāĻžāϏ",
other: "{{count}} āĻŽāĻžāϏ",
},
aboutXYears: {
one: "āĻĒā§āϰāĻžā§ ā§§ āĻŦāĻāϰ",
other: "āĻĒā§āϰāĻžā§ {{count}} āĻŦāĻāϰ",
},
xYears: {
one: "ā§§ āĻŦāĻāϰ",
other: "{{count}} āĻŦāĻāϰ",
},
overXYears: {
one: "ā§§ āĻŦāĻāϰā§āϰ āĻŦā§āĻļāĻŋ",
other: "{{count}} āĻŦāĻāϰā§āϰ āĻŦā§āĻļāĻŋ",
},
almostXYears: {
one: "āĻĒā§āϰāĻžā§ ā§§ āĻŦāĻāϰ",
other: "āĻĒā§āϰāĻžā§ {{count}} āĻŦāĻāϰ",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace(
"{{count}}",
(0, _index.numberToLocale)(count),
);
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " āĻāϰ āĻŽāϧā§āϝā§";
} else {
return result + " āĻāĻā§";
}
}
return result;
};
exports.formatDistance = formatDistance;