Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
74 lines
2.5 KiB
TypeScript
74 lines
2.5 KiB
TypeScript
// Module ID: 7743
|
|
// Function ID: 7744
|
|
// Name: parseUserProfileCollectibles
|
|
// Dependencies: [1890, 2]
|
|
// Exports: default
|
|
|
|
// Module 7743 (parseUserProfileCollectibles)
|
|
import CollectiblesItemType from "CollectiblesItemType" /* 1890 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const result = size.fileFinishedImporting("modules/user_profile/utils/parseUserProfileCollectibles.tsx");
|
|
|
|
export default function parseUserProfileCollectibles(collectibles) {
|
|
let tmp;
|
|
let tmp2;
|
|
let collectibles1;
|
|
if (collectibles != null) {
|
|
collectibles1 = collectibles.collectibles;
|
|
}
|
|
if (null == collectibles1) {
|
|
return { collectibles: "Array", profileEffect: "accessible", profileFrame: "diversity" };
|
|
} else {
|
|
const items = [];
|
|
collectibles = collectibles.collectibles;
|
|
const iter = collectibles[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp7 = nextResult;
|
|
let obj = { skuId: null, type: null, expiresAt: null };
|
|
({ sku_id: obj.skuId, type: obj.type } = nextResult);
|
|
let date;
|
|
if (null != nextResult.expires_at) {
|
|
let _Date = Date;
|
|
let tmp10 = new.target;
|
|
let tmp11 = new.target;
|
|
date = new Date(tmp7.expires_at);
|
|
}
|
|
obj.expiresAt = date;
|
|
let arr = items.push(obj);
|
|
let tmp14 = require;
|
|
if (tmp7.type === CollectiblesItemType.CollectiblesItemType.PROFILE_EFFECT) {
|
|
let obj2 = { skuId: null, expiresAt: null };
|
|
obj2.skuId = tmp7.sku_id;
|
|
let rounded;
|
|
if (null != tmp7.expires_at) {
|
|
let _Math = Math;
|
|
let _Date3 = Date;
|
|
let tmp23 = new.target;
|
|
let tmp24 = new.target;
|
|
let date1 = new Date(tmp7.expires_at);
|
|
rounded = Math.floor(date1.getTime() / 1000);
|
|
}
|
|
obj2.expiresAt = rounded;
|
|
tmp = obj2;
|
|
} else if (tmp7.type === tmp14(1890).CollectiblesItemType.PROFILE_FRAME) {
|
|
let obj3 = { skuId: null, type: null, expiresAt: null };
|
|
obj3.skuId = tmp7.sku_id;
|
|
obj3.type = tmp14(1890).CollectiblesItemType.PROFILE_FRAME;
|
|
let date2;
|
|
if (null != tmp7.expires_at) {
|
|
let _Date2 = Date;
|
|
let tmp17 = new.target;
|
|
let tmp18 = new.target;
|
|
date2 = new Date(tmp7.expires_at);
|
|
}
|
|
obj3.expiresAt = date2;
|
|
tmp2 = obj3;
|
|
}
|
|
continue;
|
|
}
|
|
const obj4 = { collectibles: items, profileEffect: tmp, profileFrame: tmp2 };
|
|
return obj4;
|
|
}
|
|
};
|