decord/source/modules/games/getGameMediaRefURL.tsx
2026-08-24 06:08:38 +00:00

52 lines
1.4 KiB
TypeScript

// Module ID: 4511
// Function ID: 4512
// Name: getGameMediaRefURL
// Dependencies: [1903, 1435, 4512, 2]
// Exports: default
// Module 4511 (getGameMediaRefURL)
import set from "set" /* 2 */;
import getAvatarURLDefault from "getAvatarURL" /* 1435 */;
import isImageProxyURL from "isImageProxyURL" /* 4512 */;
const result = set.fileFinishedImporting("modules/games/getGameMediaRefURL.tsx");
export default function getGameMediaRefURL(arg0, type, size) {
if (null == type) {
return null;
} else {
type = type.type;
if ("hash" === type) {
let tmp7 = null;
if (!obj3.isNullOrEmpty(type.value)) {
let obj = { id: null, hash: null };
obj[0] = arg0;
obj[1] = type.value;
const merged = Object.assign(size);
let gameAssetURL = getAvatarURLDefault.getGameAssetURL(obj);
if (gameAssetURL == null) {
gameAssetURL = null;
}
tmp7 = gameAssetURL;
const obj4 = getAvatarURLDefault;
}
return tmp7;
} else if ("url" === type) {
obj = isImageProxyURL;
size = undefined;
if (size != null) {
size = size.size;
}
obj = { size: null, keepAspectRatio: null };
obj[0] = size;
let keepAspectRatio;
if (size != null) {
keepAspectRatio = size.keepAspectRatio;
}
obj[1] = keepAspectRatio;
return obj.getSizedImageProxyURL(type.value, obj);
} else {
return null;
}
}
};