2026-10-01 06:55:13 +00:00
|
|
|
// Module ID: 5078
|
|
|
|
|
// Function ID: 5079
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: CheckpointUtils
|
2026-10-01 06:55:13 +00:00
|
|
|
// Dependencies: [4874, 5079, 1115, 5080, 5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 5089, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getCardAssetUrl, getCheckpointPowerBarUnits, getVoiceDurationString
|
|
|
|
|
|
2026-10-01 06:55:13 +00:00
|
|
|
// Module 5078 (CheckpointUtils)
|
|
|
|
|
import TimeUtils from "TimeUtils" /* 4874 */;
|
|
|
|
|
import getTimestampString from "getTimestampString" /* 5079 */;
|
|
|
|
|
import _modDef5080 from "module_5080" /* 5080 */;
|
|
|
|
|
import _modDef5081 from "module_5081" /* 5081 */;
|
|
|
|
|
import _modDef5082 from "module_5082" /* 5082 */;
|
|
|
|
|
import _modDef5083 from "module_5083" /* 5083 */;
|
|
|
|
|
import _modDef5084 from "module_5084" /* 5084 */;
|
|
|
|
|
import _modDef5085 from "module_5085" /* 5085 */;
|
|
|
|
|
import _modDef5086 from "module_5086" /* 5086 */;
|
|
|
|
|
import _modDef5087 from "module_5087" /* 5087 */;
|
|
|
|
|
import _modDef5088 from "module_5088" /* 5088 */;
|
|
|
|
|
import _modDef5089 from "module_5089" /* 5089 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const items = [TimeUtils.TimeUnits.HOURS, TimeUtils.TimeUnits.MINUTES];
|
2026-09-25 08:38:05 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/checkpoint/2025/CheckpointUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-10-01 06:55:13 +00:00
|
|
|
export const getVoiceDurationString = function getVoiceDurationString(rounded) {
|
|
|
|
|
const timeAndUnit = TimeUtils.getTimeAndUnit(rounded, items);
|
2026-07-29 08:29:29 +00:00
|
|
|
({ time, unit } = timeAndUnit);
|
2026-09-23 06:49:31 +00:00
|
|
|
const time2 = getTimestampString.getAbbreviatedFormatter();
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null == time) {
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl3 = tmp(1115).intl;
|
2026-09-10 05:38:07 +00:00
|
|
|
return intl3.formatToPlainString(time2.minutes, { minutes: 0 });
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
|
|
|
|
const _Math = Math;
|
2026-10-01 06:55:13 +00:00
|
|
|
rounded = Math.round(time);
|
|
|
|
|
if (unit === tmp(4874).TimeUnits.HOURS) {
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl2 = tmp(1115).intl;
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj3 = { hours: rounded };
|
|
|
|
|
let formatToPlainStringResult = intl2.formatToPlainString(time2.hours, obj3);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl = tmp(1115).intl;
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj4 = { minutes: rounded };
|
|
|
|
|
formatToPlainStringResult = intl.formatToPlainString(time2.minutes, obj4);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return formatToPlainStringResult;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const getCardAssetUrl = function getCardAssetUrl(cardId) {
|
|
|
|
|
if (0 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5080;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (1 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5081;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (2 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5082;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (3 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5083;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (4 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5084;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (5 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5085;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (6 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5086;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (7 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5087;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else if (8 === cardId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5088;
|
2026-09-21 06:29:48 +00:00
|
|
|
} else {
|
2026-10-01 06:55:13 +00:00
|
|
|
return _modDef5089;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
};
|
2026-10-01 06:55:13 +00:00
|
|
|
export const getCheckpointPowerBarUnits = function getCheckpointPowerBarUnits(powerLevelPercentile) {
|
|
|
|
|
return Math.min(Math.max(Math.round(powerLevelPercentile / 10), 1), 9);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|