decord/source/utils/SecondsSliderUtils.tsx

53 lines
1.7 KiB
TypeScript
Raw Normal View History

// Module ID: 17023
// Function ID: 17024
// Name: SecondsSliderUtils
// Dependencies: [1115, 4229, 2]
2026-07-20 16:05:17 +00:00
// Exports: getSecondsSliderLabel
// Module 17023 (SecondsSliderUtils)
import util from "util" /* 1115 */;
import _modDef4229 from "module_4229" /* 4229 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("utils/SecondsSliderUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getSecondsSliderLabel = function getSecondsSliderLabel(rateLimitPerUser, arg1, intl) {
let flag = arg1;
if (arg1 === undefined) {
flag = true;
}
2026-07-29 08:29:29 +00:00
let stringResult = intl;
if (intl === undefined) {
intl = util.intl;
stringResult = intl.string(util.t.Yl1D84);
2026-07-20 16:05:17 +00:00
}
const time = _modDef4229.duration(rateLimitPerUser, "seconds");
if (time.days() > 0) {
const intl6 = util.intl;
const t = { days: time.days() };
2026-07-23 10:11:24 +00:00
intl6.formatToPlainString(flag ? t.GBLpQ8 : t["k2UNz+"], t);
2026-07-29 08:29:29 +00:00
const tmp16 = flag ? t.GBLpQ8 : t["k2UNz+"];
} else if (time.hours() > 0) {
const intl5 = util.intl;
const t1 = { hours: time.hours() };
2026-07-20 16:05:17 +00:00
intl5.formatToPlainString(flag ? t1.rhY1Rs : t1.xCjYxK, t1);
2026-07-29 08:29:29 +00:00
const tmp13 = flag ? t1.rhY1Rs : t1.xCjYxK;
} else if (time.minutes() > 0) {
const intl4 = util.intl;
const t2 = { minutes: time.minutes() };
2026-07-23 10:11:24 +00:00
intl4.formatToPlainString(flag ? t2["XIGt+W"] : t2.iXLF9W, t2);
2026-07-29 08:29:29 +00:00
const tmp10 = flag ? t2["XIGt+W"] : t2.iXLF9W;
2026-07-20 16:05:17 +00:00
} else if (rateLimitPerUser > 0) {
const intl3 = util.intl;
const t3 = { seconds: time.seconds() };
2026-07-20 16:05:17 +00:00
intl3.formatToPlainString(flag ? t3.pyvjRp : t3.geSp4K, t3);
2026-07-29 08:29:29 +00:00
const tmp7 = flag ? t3.pyvjRp : t3.geSp4K;
2026-07-20 16:05:17 +00:00
} else {
if (flag) {
const intl2 = util.intl;
stringResult = intl2.string(util.t.Yl1D84);
2026-07-20 16:05:17 +00:00
}
return stringResult;
}
};