decord/stable/source/modules/badges/BadgeIdResolution.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

49 lines
1.7 KiB
TypeScript

// Module ID: 8494
// Function ID: 8495
// Name: BadgeIdResolution
// Dependencies: [8495, 8484, 8496, 8485, 8497, 2]
// Exports: isLegacyBadgeId, legacyBadgeIdToBadgeId, resolveProfileBadgeId, toProfileBadgeLegacyId
// Module 8494 (BadgeIdResolution)
import Constants from "Constants" /* 8484 */;
import BadgeId from "BadgeId" /* 8485 */;
import Constants2 from "Constants" /* 8495 */;
import LegacyBadgeIdMap from "LegacyBadgeIdMap" /* 8496 */;
import types from "types" /* 8497 */;
import size from "module_2" /* 2 */;
const getBadgeName = Constants.getBadgeName;
const items = [BadgeId.BadgeId.PREMIUM_TENURE, Constants2.DEFAULT_PREMIUM_BADGE_ID];
const items1 = [items, ];
const items2 = [BadgeId.BadgeId.ORB_PROFILE, types.OrbBadges.ORB_PROFILE_BADGE];
items1[1] = items2;
const map = new Map(items1);
const set = new Set(Object.values(LegacyBadgeIdMap.LEGACY_BADGE_ID_MAP));
const result = size.fileFinishedImporting("modules/badges/BadgeIdResolution.tsx");
export const legacyBadgeIdToBadgeId = function legacyBadgeIdToBadgeId(arg0) {
return LegacyBadgeIdMap.LEGACY_BADGE_ID_MAP[arg0];
};
export const resolveProfileBadgeId = function resolveProfileBadgeId(id) {
const tmp3 = LegacyBadgeIdMap.LEGACY_BADGE_ID_MAP[id];
if (null != tmp3) {
return tmp3;
} else {
const tmp4 = BadgeId.BadgeId[id.toUpperCase(id)];
let tmp5;
if (typeof tmp4 === "number") {
tmp5 = tmp4;
}
return tmp5;
}
};
export const toProfileBadgeLegacyId = function toProfileBadgeLegacyId(badge_id) {
value = map.get(badge_id);
if (value == null) {
value = getBadgeName(badge_id);
}
return value;
};
export const isLegacyBadgeId = function isLegacyBadgeId(arg0) {
return set.has(arg0);
};