cjs тАв Lines: 111"use strict";
exports.formatDistance = void 0;
var _index = require("./localize.cjs");
// Source: https://www.unicode.org/cldr/charts/32/summary/hi.html
const formatDistanceLocale = {
lessThanXSeconds: {
one: "рез рд╕реЗрдХрдВрдб рд╕реЗ рдХрдо", // CLDR #1310
other: "{{count}} рд╕реЗрдХрдВрдб рд╕реЗ рдХрдо",
},
xSeconds: {
one: "рез рд╕реЗрдХрдВрдб",
other: "{{count}} рд╕реЗрдХрдВрдб",
},
halfAMinute: "рдЖрдзрд╛ рдорд┐рдирдЯ",
lessThanXMinutes: {
one: "рез рдорд┐рдирдЯ рд╕реЗ рдХрдо",
other: "{{count}} рдорд┐рдирдЯ рд╕реЗ рдХрдо",
},
xMinutes: {
one: "рез рдорд┐рдирдЯ", // CLDR #1307
other: "{{count}} рдорд┐рдирдЯ",
},
aboutXHours: {
one: "рд▓рдЧрднрдЧ рез рдШрдВрдЯрд╛",
other: "рд▓рдЧрднрдЧ {{count}} рдШрдВрдЯреЗ",
},
xHours: {
one: "рез рдШрдВрдЯрд╛", // CLDR #1304
other: "{{count}} рдШрдВрдЯреЗ", // CLDR #4467
},
xDays: {
one: "рез рджрд┐рди", // CLDR #1286
other: "{{count}} рджрд┐рди",
},
aboutXWeeks: {
one: "рд▓рдЧрднрдЧ рез рд╕рдкреНрддрд╛рд╣",
other: "рд▓рдЧрднрдЧ {{count}} рд╕рдкреНрддрд╛рд╣",
},
xWeeks: {
one: "рез рд╕рдкреНрддрд╛рд╣",
other: "{{count}} рд╕рдкреНрддрд╛рд╣",
},
aboutXMonths: {
one: "рд▓рдЧрднрдЧ рез рдорд╣реАрдирд╛",
other: "рд▓рдЧрднрдЧ {{count}} рдорд╣реАрдиреЗ",
},
xMonths: {
one: "рез рдорд╣реАрдирд╛",
other: "{{count}} рдорд╣реАрдиреЗ",
},
aboutXYears: {
one: "рд▓рдЧрднрдЧ рез рд╡рд░реНрд╖",
other: "рд▓рдЧрднрдЧ {{count}} рд╡рд░реНрд╖", // CLDR #4823
},
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;