cjs β’ Lines: 119"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "1η§ζͺζΊ",
other: "{{count}}η§ζͺζΊ",
oneWithSuffix: "η΄1η§",
otherWithSuffix: "η΄{{count}}η§",
},
xSeconds: {
one: "1η§",
other: "{{count}}η§",
},
halfAMinute: "30η§",
lessThanXMinutes: {
one: "1εζͺζΊ",
other: "{{count}}εζͺζΊ",
oneWithSuffix: "η΄1ε",
otherWithSuffix: "η΄{{count}}ε",
},
xMinutes: {
one: "1ε",
other: "{{count}}ε",
},
aboutXHours: {
one: "η΄1ζι",
other: "η΄{{count}}ζι",
},
xHours: {
one: "1ζι",
other: "{{count}}ζι",
},
xDays: {
one: "1ζ₯",
other: "{{count}}ζ₯",
},
aboutXWeeks: {
one: "η΄1ι±ι",
other: "η΄{{count}}ι±ι",
},
xWeeks: {
one: "1ι±ι",
other: "{{count}}ι±ι",
},
aboutXMonths: {
one: "η΄1γζ",
other: "η΄{{count}}γζ",
},
xMonths: {
one: "1γζ",
other: "{{count}}γζ",
},
aboutXYears: {
one: "η΄1εΉ΄",
other: "η΄{{count}}εΉ΄",
},
xYears: {
one: "1εΉ΄",
other: "{{count}}εΉ΄",
},
overXYears: {
one: "1εΉ΄δ»₯δΈ",
other: "{{count}}εΉ΄δ»₯δΈ",
},
almostXYears: {
one: "1εΉ΄θΏγ",
other: "{{count}}εΉ΄θΏγ",
},
};
const formatDistance = (token, count, options) => {
options = options || {};
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
if (options.addSuffix && tokenValue.oneWithSuffix) {
result = tokenValue.oneWithSuffix;
} else {
result = tokenValue.one;
}
} else {
if (options.addSuffix && tokenValue.otherWithSuffix) {
result = tokenValue.otherWithSuffix.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
}
if (options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + "εΎ";
} else {
return result + "ε";
}
}
return result;
};
exports.formatDistance = formatDistance;