This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,28 +1,31 @@
/* Metro module 1859; source: modules/collectibles/utils/CollectiblesAssetUtils.tsx; dependencies: [1360, 2, 1858] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun20032(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1986:6, offset: 0x00ebcfab, size: 156 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/CollectiblesAssetUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/CollectiblesAssetUtils.tsx');
exports.parseSkuIdFromServerData = (require(1858) /* metro dependency 1858: mappers */).parseSkuIdFromServerData;
exports.CollectiblesItemAssetFormat = {ANIMATED: 'animated', STATIC: 'static', VIDEO: 'video'};
exports.getCollectiblesItemAssetUrl = getCollectiblesItemAssetUrl;
}
function getCollectiblesItemAssetUrl({skuId, assetFormat, assetId}) { // fn#20033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1986:420, offset: 0x00ebd047, size: 239 bytes, params: 2, frame: 25
var r0;
var value2;
var value3;
let value = null;
if (value == skuId) {
r0 = value;
} else {
value = require(1360) /* metro dependency 1360: GlobalUtils */;
value = value.isDiscordBackendDevelopment();
value2 = global.Boolean(assetId);
value3 = '';
r0 = value ? 'http://localhost:3000/_storage/' + 'media/v1/collectibles-shop' + '/' + skuId + '/' + (value2 ? value3 + assetId + '/' : value3) + assetFormat : 'https://cdn.discordapp.com/' + 'media/v1/collectibles-shop' + '/' + skuId + '/' + (value2 ? value3 + assetId + '/' : value3) + assetFormat;
function getCollectiblesItemAssetUrl({skuId, assetFormat, assetId}) { // fn#20033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1986:420, offset: 0x00ebd047, size: 239 bytes, params: 2, frame: 25
var r0;
var value2;
var value3;
let value = null;
if (value == skuId) {
r0 = value;
} else {
value = require(1360) /* metro dependency 1360: GlobalUtils */;
value = value.isDiscordBackendDevelopment();
value2 = global.Boolean(assetId);
value3 = '';
r0 = value ? 'http://localhost:3000/_storage/' + 'media/v1/collectibles-shop' + '/' + skuId + '/' + (value2 ? value3 + assetId + '/' : value3) + assetFormat : 'https://cdn.discordapp.com/' + 'media/v1/collectibles-shop' + '/' + skuId + '/' + (value2 ? value3 + assetId + '/' : value3) + assetFormat;
}
return r0;
}
return r0;
}
global.__d(_fun20032, 1859, [1360, 2, 1858]) /* metro module 1859, dependencies: [1360, 2, 1858] */;
@@ -1,9 +1,11 @@
/* Metro module 5183; source: modules/collectibles/utils/CollectiblesPerfLogging.tsx; dependencies: [661, 683, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun45675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5361:6, offset: 0x01194d81, size: 198 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/CollectiblesPerfLogging.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/CollectiblesPerfLogging.tsx');
exports.CollectiblesShopPerfCheckpoint = {SHOP_MOUNTED: 'shop_mounted',
CATEGORIES_FETCH_STARTED: 'categories_fetch_started', CATEGORIES_FETCH_COMPLETED: 'categories_fetch_completed',
SHOP_HOME_FETCH_STARTED: 'shop_home_fetch_started', SHOP_HOME_FETCH_COMPLETED: 'shop_home_fetch_completed',
@@ -17,3 +19,4 @@ function _fun45675(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun45675, 5183, [661, 683, 2]) /* metro module 5183, dependencies: [661, 683, 2] */;
@@ -1,113 +1,115 @@
/* Metro module 5133; source: modules/collectibles/utils/CollectiblesProductUtils.tsx; dependencies: [57, 661, 1904, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
function _fun45178(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:6, offset: 0x01183c11, size: 271 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.CurrencyCodes;
const env0_4 = constantsModule.PriceSetAssignmentPurchaseTypes;
const closure = getProductOrbPrice;
const closure2 = getProductFiatPrice;
const closure3 = getHasOrbPrice;
const closure4 = getHasNonOrbPrice;
const closure5 = getIsVariantProduct;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/CollectiblesProductUtils.tsx');
exports.getProductOrbPrice = closure;
exports.getProductFiatPrice = closure2;
exports.getHasOrbPrice = closure3;
exports.getHasNonOrbPrice = closure4;
const getProductOrbPrice2 = getProductOrbPrice;
const getProductFiatPrice2 = getProductFiatPrice;
const getHasOrbPrice2 = getHasOrbPrice;
const getHasNonOrbPrice2 = getHasNonOrbPrice;
const getIsVariantProduct2 = getIsVariantProduct;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/CollectiblesProductUtils.tsx');
exports.getProductOrbPrice = getProductOrbPrice2;
exports.getProductFiatPrice = getProductFiatPrice2;
exports.getHasOrbPrice = getHasOrbPrice2;
exports.getHasNonOrbPrice = getHasNonOrbPrice2;
exports.isOrbsExclusiveProduct = isOrbsExclusiveProduct;
exports.getProductsWithOrbsPrice = function(a0) {
return a0.filter(_fun45188);
};
exports.getIsVariantProduct = closure5;
exports.getIsVariantProduct = getIsVariantProduct2;
exports.getProductSkuIds = getProductSkuIds;
exports.getSelectedProduct = function(a0, a1) {
var value = a0;
return getIsVariantProduct(value) ? a1 == null || value.variants[a1] == null ? value : value.variants[a1] : value;
};
exports.getProductType = getProductType;
}
function getProductOrbPrice({product, hasShopDiscount}) { // fn#45179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:189, offset: 0x01183d20, size: 146 bytes, params: 2, frame: 15
const property = product.prices[hasShopDiscount ? PriceSetAssignmentPurchaseTypes.PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.DEFAULT];
let r3 = property == null || property.countryPrices == null ? undefined : property.countryPrices.prices?.slice(0, 2);
r3 = r3 ?? [];
return r3.find(function({currency}) {
return currency === CurrencyCodes.DISCORD_ORB;
}) ?? null;
}
function getProductFiatPrice({product, hasShopDiscount}) { // fn#45181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:449, offset: 0x01183dce, size: 146 bytes, params: 2, frame: 15
const property = product.prices[hasShopDiscount ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE];
let r3 = property == null || property.countryPrices == null ? undefined : property.countryPrices.prices?.slice(0, 2);
r3 = r3 ?? [];
return r3.find(function({currency}) {
return currency !== CurrencyCodes.DISCORD_ORB;
}) ?? null;
}
function getHasOrbPrice(a0) { // fn#45183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:710, offset: 0x01183e7c, size: 39 bytes, params: 2, frame: 11
return getProductOrbPrice({product: a0, hasShopDiscount: false}) != null;
}
function getHasNonOrbPrice(a0) { // fn#45184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:788, offset: 0x01183ea3, size: 39 bytes, params: 2, frame: 11
return getProductFiatPrice({product: a0, hasShopDiscount: false}) != null;
}
function getIsVariantProduct(a0) { // fn#45185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:869, offset: 0x01183eca, size: 86 bytes, params: 2, frame: 13
const type = a0.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const VARIANTS_GROUP = CollectiblesItemType.VARIANTS_GROUP;
return type === VARIANTS_GROUP && a0.variants != null && a0.variants.length !== 0;
}
function isOrbsExclusiveProduct(a0) { // fn#45186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1232, offset: 0x01183f20, size: 44 bytes, params: 2, frame: 12
if (a0 == null) {
return false;
function getProductOrbPrice({product, hasShopDiscount}) { // fn#45179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:189, offset: 0x01183d20, size: 146 bytes, params: 2, frame: 15
const property = product.prices[hasShopDiscount ? PriceSetAssignmentPurchaseTypes.PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.DEFAULT];
let r3 = property == null || property.countryPrices == null ? undefined : property.countryPrices.prices?.slice(0, 2);
r3 = r3 ?? [];
return r3.find(function({currency}) {
return currency === CurrencyCodes.DISCORD_ORB;
}) ?? null;
}
return getHasOrbPrice(a0) && !getHasNonOrbPrice(a0);
}
function getProductsWithOrbsPrice(a0) { // fn#45187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1344, offset: 0x01183f4c, size: 22 bytes, params: 2, frame: 11
return a0.filter(_fun45188);
}
function getProductSkuIds(a0) { // fn#45189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1484, offset: 0x01183f84, size: 60 bytes, params: 2, frame: 12
return getIsVariantProduct(a0) ? a0.variants.map(function(a0) {
return a0.skuId;
}) : [a0.skuId];
}
function getProductType(a0) { // fn#45192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1670, offset: 0x01183ff9, size: 145 bytes, params: 2, frame: 16
var variants;
var property;
const value = null;
if (value == a0) {
return value;
function getProductFiatPrice({product, hasShopDiscount}) { // fn#45181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:449, offset: 0x01183dce, size: 146 bytes, params: 2, frame: 15
const property = product.prices[hasShopDiscount ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE];
let r3 = property == null || property.countryPrices == null ? undefined : property.countryPrices.prices?.slice(0, 2);
r3 = r3 ?? [];
return r3.find(function({currency}) {
return currency !== CurrencyCodes.DISCORD_ORB;
}) ?? null;
}
const type = a0.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const VARIANTS_GROUP = CollectiblesItemType.VARIANTS_GROUP;
if (type === VARIANTS_GROUP) {
variants = a0.variants;
if (value == variants) {
function getHasOrbPrice(a0) { // fn#45183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:710, offset: 0x01183e7c, size: 39 bytes, params: 2, frame: 11
return getProductOrbPrice({product: a0, hasShopDiscount: false}) != null;
}
function getHasNonOrbPrice(a0) { // fn#45184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:788, offset: 0x01183ea3, size: 39 bytes, params: 2, frame: 11
return getProductFiatPrice({product: a0, hasShopDiscount: false}) != null;
}
function getIsVariantProduct(a0) { // fn#45185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:869, offset: 0x01183eca, size: 86 bytes, params: 2, frame: 13
const type = a0.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const VARIANTS_GROUP = CollectiblesItemType.VARIANTS_GROUP;
return type === VARIANTS_GROUP && a0.variants != null && a0.variants.length !== 0;
}
function isOrbsExclusiveProduct(a0) { // fn#45186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1232, offset: 0x01183f20, size: 44 bytes, params: 2, frame: 12
if (a0 == null) {
return false;
}
return getHasOrbPrice(a0) && !getHasNonOrbPrice(a0);
}
function getProductsWithOrbsPrice(a0) { // fn#45187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1344, offset: 0x01183f4c, size: 22 bytes, params: 2, frame: 11
return a0.filter(_fun45188);
function _fun45188(a0) { // fn#45188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1357, offset: 0x01183f62, size: 34 bytes, params: 2, frame: 12
const value = environment.__proto__;
return getHasOrbPrice(a0) && getHasNonOrbPrice(a0);
}
}
function getProductSkuIds(a0) { // fn#45189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1484, offset: 0x01183f84, size: 60 bytes, params: 2, frame: 12
return getIsVariantProduct(a0) ? a0.variants.map(function(a0) {
return a0.skuId;
}) : [a0.skuId];
}
function getProductType(a0) { // fn#45192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1670, offset: 0x01183ff9, size: 145 bytes, params: 2, frame: 16
var variants;
var property;
const value = null;
if (value == a0) {
return value;
}
variants = a0.variants;
if (variants.length === 0) {
return value;
const type = a0.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const VARIANTS_GROUP = CollectiblesItemType.VARIANTS_GROUP;
if (type === VARIANTS_GROUP) {
variants = a0.variants;
if (value == variants) {
return value;
}
variants = a0.variants;
if (variants.length === 0) {
return value;
}
variants = a0.variants;
property = variants[0];
return value == property ? value : Module00057(property.items, 1)[0].type;
}
variants = a0.variants;
property = variants[0];
return value == property ? value : env0_2(property.items, 1)[0].type;
return a0.type;
}
return a0.type;
}
function _fun45188(a0) { // fn#45188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5311:1357, offset: 0x01183f62, size: 34 bytes, params: 2, frame: 12
const value = environment.__proto__;
return getHasOrbPrice(a0) && getHasNonOrbPrice(a0);
}
global.__d(_fun45178, 5133, [57, 661, 1904, 2]) /* metro module 5133, dependencies: [57, 661, 1904, 2] */;
@@ -1,10 +1,15 @@
/* Metro module 5178; source: modules/collectibles/utils/CollectiblesUtils.tsx; dependencies: [4282, 4406, 5179, 5180, 3826, 2] */
import UseFractionalPremiumInfo from '../../billing/hooks/useFractionalPremiumInfo.tsx'; /* Metro dependency 5180 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StreamSettingsConstantsModule from '../../go_live/StreamSettingsConstants.tsx'; /* Metro dependency 4282 */
import * as MediaEngineModule from '../../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
import * as ShopVariantsReturnStyleModule from '../../../external/discord_common/js/shared/shared-constants/ShopVariantsReturnStyle.tsx'; /* Metro dependency 5179 */
function _fun45595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:6, offset: 0x01192c10, size: 159 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4282) /* metro dependency 4282: StreamSettingsConstants */).ApplicationStreamPresets;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/CollectiblesUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/CollectiblesUtils.tsx');
exports.constructGoLiveSource = constructGoLiveSource;
exports.buildFetchCollectiblesOptionsQuery = buildFetchCollectiblesOptionsQuery;
exports.getOptimizedProfileEffectThumbnailUrl = function(a0) {
@@ -13,77 +18,79 @@ function _fun45595(global, require, importDefault, importAll, module, exports, d
}
};
exports.useFetchFractionalPremiumInfo = useFetchFractionalPremiumInfo;
}
function constructGoLiveSource(a0, a1, a2) { // fn#45596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:237, offset: 0x01192caf, size: 185 bytes, params: 4, frame: 13
var cameraSource;
var object2;
const object3 = {};
const PRESET_CUSTOM = ApplicationStreamPresets.PRESET_CUSTOM;
object3.qualityOptions = {preset: PRESET_CUSTOM, resolution: a0, frameRate: a1};
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
const STREAM = MediaEngineContextTypes.STREAM;
object3.context = STREAM;
if (a2 != null) {
if (a2.desktopSource != null) {
object3.desktopSettings = {sourceId: a2.desktopSource.id, sound: true};
}
cameraSource = a2.cameraSource;
if (cameraSource != null) {
object2 = {};
function constructGoLiveSource(a0, a1, a2) { // fn#45596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:237, offset: 0x01192caf, size: 185 bytes, params: 4, frame: 13
var cameraSource;
var object;
const object4 = {};
const PRESET_CUSTOM = ApplicationStreamPresets.PRESET_CUSTOM;
object4.qualityOptions = {preset: PRESET_CUSTOM, resolution: a0, frameRate: a1};
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
const STREAM = MediaEngineContextTypes.STREAM;
object4.context = STREAM;
if (a2 != null) {
if (a2.desktopSource != null) {
object4.desktopSettings = {sourceId: a2.desktopSource.id, sound: true};
}
cameraSource = a2.cameraSource;
object2.videoDeviceGuid = cameraSource.videoDeviceGuid;
cameraSource = a2.cameraSource;
object2.audioDeviceGuid = cameraSource.audioDeviceGuid;
object3.cameraSettings = object2;
if (cameraSource != null) {
object = {};
cameraSource = a2.cameraSource;
object.videoDeviceGuid = cameraSource.videoDeviceGuid;
cameraSource = a2.cameraSource;
object.audioDeviceGuid = cameraSource.audioDeviceGuid;
object4.cameraSettings = object;
}
}
return object4;
}
return object3;
}
function buildFetchCollectiblesOptionsQuery(a0, a1) { // fn#45597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:644, offset: 0x01192d68, size: 295 bytes, params: 3, frame: 17
const ShopVariantsReturnStyle = (require(5179) /* metro dependency 5179: ShopVariantsReturnStyle */).ShopVariantsReturnStyle;
const object2 = {};
if (a1 != null) {
object2.tab = a1;
function buildFetchCollectiblesOptionsQuery(a0, a1) { // fn#45597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:644, offset: 0x01192d68, size: 295 bytes, params: 3, frame: 17
const ShopVariantsReturnStyle = (ShopVariantsReturnStyleModule).ShopVariantsReturnStyle;
const object = {};
if (a1 != null) {
object.tab = a1;
}
if (a0 != null) {
if (a0.noCache === true) {
object.no_cache = true;
}
if (a0.includeUnpublished === true) {
object.include_unpublished = true;
}
if (a0.includeBundles === true) {
object.include_bundles = true;
}
if (a0.includeDynamicBlocks === true) {
object.include_dynamic_blocks = true;
}
if (a0.countryCode != null && a0.countryCode !== '') {
object.country_code = a0.countryCode;
}
if (a0.paymentGateway !== null) {
object.payment_gateway = a0.paymentGateway;
}
if (a0.variantsReturnStyle === ShopVariantsReturnStyle.VARIANTS_GROUP) {
object.variants_return_style = ShopVariantsReturnStyle.VARIANTS_GROUP;
}
if (a0.shopHomeConfig != null) {
object.shop_home_config = a0.shopHomeConfig;
}
if (a0.skipNumCategories != null) {
object.skip_num_categories = a0.skipNumCategories;
}
}
return object;
}
if (a0 != null) {
if (a0.noCache === true) {
object2.no_cache = true;
}
if (a0.includeUnpublished === true) {
object2.include_unpublished = true;
}
if (a0.includeBundles === true) {
object2.include_bundles = true;
}
if (a0.includeDynamicBlocks === true) {
object2.include_dynamic_blocks = true;
}
if (a0.countryCode != null && a0.countryCode !== '') {
object2.country_code = a0.countryCode;
}
if (a0.paymentGateway !== null) {
object2.payment_gateway = a0.paymentGateway;
}
if (a0.variantsReturnStyle === ShopVariantsReturnStyle.VARIANTS_GROUP) {
object2.variants_return_style = ShopVariantsReturnStyle.VARIANTS_GROUP;
}
if (a0.shopHomeConfig != null) {
object2.shop_home_config = a0.shopHomeConfig;
}
if (a0.skipNumCategories != null) {
object2.skip_num_categories = a0.skipNumCategories;
}
function useFetchFractionalPremiumInfo() { // fn#45599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:1426, offset: 0x01192ebb, size: 111 bytes, params: 1, frame: 15
var value;
const value2 = (UseFractionalPremiumInfo)({forceFetch: true});
value = Reflect.apply((require(3826) /* metro dependency 3826: DateUtils */).dateFormat, value, [value2.endsAt,
'L']);
return {isLoading: !value2.fetched, isFractionalPremiumActive: value2.isFractionalPremiumActive, expiresAt: value};
}
return object2;
}
function useFetchFractionalPremiumInfo() { // fn#45599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:1426, offset: 0x01192ebb, size: 111 bytes, params: 1, frame: 15
var value;
const value2 = (importDefault(5180) /* metro dependency 5180: useFractionalPremiumInfo */)({forceFetch: true});
value = Reflect.apply((require(3826) /* metro dependency 3826: DateUtils */).dateFormat, value, [value2.endsAt,
'L']);
return {isLoading: !value2.fetched, isFractionalPremiumActive: value2.isFractionalPremiumActive, expiresAt: value};
}
global.__d(_fun45595, 5178, [4282, 4406, 5179, 5180, 3826,
2]) /* metro module 5178, dependencies: [4282, 4406, 5179, 5180, 3826, 2] */;
@@ -1,81 +1,85 @@
/* Metro module 5184; source: modules/collectibles/utils/ErrorHandlingUtils.tsx; dependencies: [661, 1216, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun45677(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5362:6, offset: 0x01194eb7, size: 232 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const AbortCodes = (require(661) /* metro dependency 661: Constants */).AbortCodes;
const AbortCodes = (ConstantsModule).AbortCodes;
const UNAUTHORIZED = AbortCodes.UNAUTHORIZED;
items = [UNAUTHORIZED];
items2 = [UNAUTHORIZED];
const EMAIL_VERIFICATION_REQUIRED = AbortCodes.EMAIL_VERIFICATION_REQUIRED;
items[1] = EMAIL_VERIFICATION_REQUIRED;
items2[1] = EMAIL_VERIFICATION_REQUIRED;
const USER_BANNED = AbortCodes.USER_BANNED;
items[2] = USER_BANNED;
items2[2] = USER_BANNED;
let Set = global.Set;
let set = new Set([500, 502, 503, 504]);
Set = global.Set;
set = new Set([401, 403, 405, 409, 429]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/ErrorHandlingUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/ErrorHandlingUtils.tsx');
exports.captureOrIgnoreApiError = captureOrIgnoreApiError;
}
function captureOrIgnoreApiError(a0) { // fn#45678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5362:351, offset: 0x01194f9f, size: 420 bytes, params: 2, frame: 20
var cause;
var r5;
var r4;
var r6;
var r3;
var r1;
var r0;
var value2;
var value3;
var value12;
let value = a0 == null;
if (value) {
r0 = value;
} else {
value = false;
if (a0 == null) {
r1 = value;
function captureOrIgnoreApiError(a0) { // fn#45678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5362:351, offset: 0x01194f9f, size: 420 bytes, params: 2, frame: 20
var cause;
var r5;
var r4;
var r6;
var r3;
var r1;
var r0;
var value2;
var value3;
var value12;
let value = a0 == null;
if (value) {
r0 = value;
} else {
value = undefined;
cause = a0 == null ? value : a0.cause;
value2 = (cause == null ? value : cause.crossDomain) === true;
if (value2) {
r3 = value2;
value = false;
if (a0 == null) {
r1 = value;
} else {
value3 = 'status' in a0;
r5 = value3 ? typeof a0.status !== 'number' : !value3;
if (!r5) {
r4 = a0.status !== 0 && !env0_3.has(a0.status);
r4 = r4 && !env0_4.has(a0.status);
r5 = r4;
}
if (r5) {
value12 = 'code' in a0;
r6 = value12 ? typeof a0.code !== 'number' : !value12;
r6 = !r6 ? !env0_2.includes(a0.code) : r6;
if (r6) {
r6 = 'body' in a0 && a0.body != null;
r6 = r6 && typeof a0.body === 'object';
r6 = r6 && 'code' in a0.body;
r6 = r6 && typeof (a0.body == null ? value : a0.body.code) === 'number';
r6 = r6 && env0_2.includes(a0.body.code);
value = !!r6;
r5 = value;
} else {
r5 = !r6;
}
r4 = r5;
value = undefined;
cause = a0 == null ? value : a0.cause;
value2 = (cause == null ? value : cause.crossDomain) === true;
if (value2) {
r3 = value2;
} else {
r4 = !r5;
value3 = 'status' in a0;
r5 = value3 ? typeof a0.status !== 'number' : !value3;
if (!r5) {
r4 = a0.status !== 0 && !env0_3.has(a0.status);
r4 = r4 && !env0_4.has(a0.status);
r5 = r4;
}
if (r5) {
value12 = 'code' in a0;
r6 = value12 ? typeof a0.code !== 'number' : !value12;
r6 = !r6 ? !env0_2.includes(a0.code) : r6;
if (r6) {
r6 = 'body' in a0 && a0.body != null;
r6 = r6 && typeof a0.body === 'object';
r6 = r6 && 'code' in a0.body;
r6 = r6 && typeof (a0.body == null ? value : a0.body.code) === 'number';
r6 = r6 && env0_2.includes(a0.body.code);
value = !!r6;
r5 = value;
} else {
r5 = !r6;
}
r4 = r5;
} else {
r4 = !r5;
}
r3 = r4;
}
r3 = r4;
r1 = r3;
}
r1 = r3;
r0 = r1;
}
if (!r0) {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(a0);
}
r0 = r1;
}
if (!r0) {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(a0);
}
}
global.__d(_fun45677, 5184, [661, 1216, 2]) /* metro module 5184, dependencies: [661, 1216, 2] */;
@@ -1,52 +1,55 @@
/* Metro module 12714; source: modules/collectibles/utils/WideBannerDismissibleContentVersion.tsx; dependencies: [5175, 663, 5161, 2] */
import CollectiblesShopHomeStore from '../CollectiblesShopHomeStore.tsx'; /* Metro dependency 5175 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
function _fun97372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12904:6, offset: 0x0217e235, size: 136 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const collectiblesShopHomeStore = importDefault(5175) /* metro dependency 5175: CollectiblesShopHomeStore */;
const env0_3 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectibleShopTab;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/WideBannerDismissibleContentVersion.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/WideBannerDismissibleContentVersion.tsx');
exports.getWideBannerDismissibleContentVersion = getWideBannerDismissibleContentVersion;
}
function getWideBannerDismissibleContentVersion() { // fn#97373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12904:276, offset: 0x0217e2bd, size: 139 bytes, params: 1, frame: 18
var r3;
var dismissibleContentVersion;
var property;
var shopBlocks;
var value4;
var value5;
var value6;
const HOME = CollectibleShopTab.HOME;
const items2 = [HOME];
const ORBS = CollectibleShopTab.ORBS;
items2[1] = ORBS;
const CATALOG = CollectibleShopTab.CATALOG;
items2[2] = CATALOG;
let length = items2.length;
const value2 = 0;
if (value2 < length) {
r3 = value2;
while (true) {
property = items2[r3];
shopBlocks = CollectiblesShopHomeStore.getShopBlocks(property);
value4 = shopBlocks.find(function({type}) {
return type === require(dependencyMap[2]).ShopBlockType.WIDE_BANNER;
});
value5 = undefined;
dismissibleContentVersion = value4 == null ? value5 : value4.dismissibleContentVersion;
if (dismissibleContentVersion != null) {
return value4.dismissibleContentVersion;
function getWideBannerDismissibleContentVersion() { // fn#97373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12904:276, offset: 0x0217e2bd, size: 139 bytes, params: 1, frame: 18
var r3;
var dismissibleContentVersion;
var property;
var shopBlocks;
var value4;
var value5;
var value6;
const HOME = CollectibleShopTab.HOME;
const items2 = [HOME];
const ORBS = CollectibleShopTab.ORBS;
items2[1] = ORBS;
const CATALOG = CollectibleShopTab.CATALOG;
items2[2] = CATALOG;
let length = items2.length;
const value2 = 0;
if (value2 < length) {
r3 = value2;
while (true) {
property = items2[r3];
shopBlocks = CollectiblesShopHomeStore.getShopBlocks(property);
value4 = shopBlocks.find(function({type}) {
return type === require(dependencyMap[2]).ShopBlockType.WIDE_BANNER;
});
value5 = undefined;
dismissibleContentVersion = value4 == null ? value5 : value4.dismissibleContentVersion;
if (dismissibleContentVersion != null) {
return value4.dismissibleContentVersion;
}
value6 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = items2.length;
if (value6 < length) {
r3 = value6;
continue;
}
break;
}
value6 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = items2.length;
if (value6 < length) {
r3 = value6;
continue;
}
break;
}
return value2;
}
return value2;
}
global.__d(_fun97372, 12714, [5175, 663, 5161, 2]) /* metro module 12714, dependencies: [5175, 663, 5161, 2] */;
@@ -1,4 +1,8 @@
/* Metro module 10030; source: modules/collectibles/utils/bundleUtils.tsx; dependencies: [7609, 5134, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
function _fun78341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10216:6, offset: 0x01e2666e, size: 157 bytes, params: 8, frame: 18
const env0_0 = require;
const extractBundleItems = function(a0) {
@@ -17,7 +21,7 @@ function _fun78341(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/bundleUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/bundleUtils.tsx');
exports.isValidCollectiblesBundle = function(a0) {
return isValidBundleItems(extractBundleItems(a0));
};
@@ -25,17 +29,18 @@ function _fun78341(global, require, importDefault, importAll, module, exports, d
return isValidBundleItems(extractBundleItemsFromArray(a0));
};
exports.bundleContainsNameplates = bundleContainsNameplates;
function extractBundleItemsFromArray(a0) { // fn#78342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10216:43, offset: 0x01e2670b, size: 90 bytes, params: 2, frame: 11
const ItemsSortingHat = (UseShopProductItemsModule).ItemsSortingHat;
const itemsSortingHat = new ItemsSortingHat(a0);
return {firstProfileEffect: itemsSortingHat.firstProfileEffect,
firstAvatarDecoration: itemsSortingHat.firstAvatarDecoration, firstNameplate: itemsSortingHat.firstNameplate};
}
function bundleContainsNameplates(a0) { // fn#78347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10216:878, offset: 0x01e267f9, size: 71 bytes, params: 2, frame: 13
const isBundleProduct2 = (CollectiblesUtilsModule).isBundleProduct(a0);
return isBundleProduct2 ? extractBundleItems(a0).firstNameplate != null : !!isBundleProduct2;
}
}
function extractBundleItemsFromArray(a0) { // fn#78342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10216:43, offset: 0x01e2670b, size: 90 bytes, params: 2, frame: 11
const ItemsSortingHat = (require(7609) /* metro dependency 7609: useShopProductItems */).ItemsSortingHat;
const itemsSortingHat = new ItemsSortingHat(a0);
return {firstProfileEffect: itemsSortingHat.firstProfileEffect,
firstAvatarDecoration: itemsSortingHat.firstAvatarDecoration, firstNameplate: itemsSortingHat.firstNameplate};
}
function bundleContainsNameplates(a0) { // fn#78347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10216:878, offset: 0x01e267f9, size: 71 bytes, params: 2, frame: 13
const isBundleProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isBundleProduct(a0);
return isBundleProduct2 ? extractBundleItems(a0).firstNameplate != null : !!isBundleProduct2;
}
global.__d(_fun78341, 10030, [7609, 5134, 2]) /* metro module 10030, dependencies: [7609, 5134, 2] */;
@@ -1,61 +1,67 @@
/* Metro module 10080; source: modules/collectibles/utils/getProductName.tsx; dependencies: [1244, 5133, 1904, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as CollectiblesProductUtilsModule from './CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
function _fun78771(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10266:6, offset: 0x01e33ad6, size: 128 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const closure = getProductName;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/getProductName.tsx');
exports.getProductName = closure;
const getProductName2 = getProductName;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/getProductName.tsx');
exports.getProductName = getProductName2;
exports.getPurchasedProductName = getPurchasedProductName;
exports.getProductNameAndTypeLabel = getProductNameAndTypeLabel;
function getProductName(a0) { // fn#78772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10266:111, offset: 0x01e33b56, size: 194 bytes, params: 2, frame: 18
if (a0 == null) {
return '';
}
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return 'baseVariantName' in a0 ? a0.baseVariantName == null ? a0.name : a0.variantLabel !== Reflect.apply(string,
intl, [t.z7y5vF]) ? intl.formatToPlainString(t.BZN5k2, {baseVariantName: a0.baseVariantName,
variantLabel: a0.variantLabel}) : a0.name : a0.name;
}
function getPurchasedProductName(a0) { // fn#78773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10266:512, offset: 0x01e33c18, size: 183 bytes, params: 2, frame: 18
if (a0 == null) {
return '';
}
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return a0.baseVariantName == null ? a0.name : a0.variantLabel !== Reflect.apply(string, intl,
[t.z7y5vF]) ? intl.formatToPlainString(t.BZN5k2, {baseVariantName: a0.baseVariantName,
variantLabel: a0.variantLabel}) : a0.name;
}
function getProductNameAndTypeLabel(a0) { // fn#78774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10266:783, offset: 0x01e33ccf, size: 441 bytes, params: 2, frame: 17
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const productName = getProductName(a0);
const productType = (CollectiblesProductUtilsModule).getProductType(a0);
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === productType) {
return intl.formatToPlainString(t.lvBzLi, {product: productName});
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === productType) {
return intl.formatToPlainString(t.eR7moP, {product: productName});
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === productType) {
return intl.formatToPlainString(t.YFOwHj, {product: productName});
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === productType) {
return intl.formatToPlainString(t.vov8LX, {product: productName});
}
return productName;
}
}
function getProductName(a0) { // fn#78772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10266:111, offset: 0x01e33b56, size: 194 bytes, params: 2, frame: 18
if (a0 == null) {
return '';
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return 'baseVariantName' in a0 ? a0.baseVariantName == null ? a0.name : a0.variantLabel !== Reflect.apply(string,
intl, [t.z7y5vF]) ? intl.formatToPlainString(t.BZN5k2, {baseVariantName: a0.baseVariantName,
variantLabel: a0.variantLabel}) : a0.name : a0.name;
}
function getPurchasedProductName(a0) { // fn#78773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10266:512, offset: 0x01e33c18, size: 183 bytes, params: 2, frame: 18
if (a0 == null) {
return '';
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return a0.baseVariantName == null ? a0.name : a0.variantLabel !== Reflect.apply(string, intl,
[t.z7y5vF]) ? intl.formatToPlainString(t.BZN5k2, {baseVariantName: a0.baseVariantName,
variantLabel: a0.variantLabel}) : a0.name;
}
function getProductNameAndTypeLabel(a0) { // fn#78774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10266:783, offset: 0x01e33ccf, size: 441 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const productName = getProductName(a0);
const productType = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(a0);
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === productType) {
return intl.formatToPlainString(t.lvBzLi, {product: productName});
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === productType) {
return intl.formatToPlainString(t.eR7moP, {product: productName});
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === productType) {
return intl.formatToPlainString(t.YFOwHj, {product: productName});
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === productType) {
return intl.formatToPlainString(t.vov8LX, {product: productName});
}
return productName;
}
global.__d(_fun78771, 10080, [1244, 5133, 1904, 2]) /* metro module 10080, dependencies: [1244, 5133, 1904, 2] */;
+67 -64
View File
@@ -1,87 +1,90 @@
/* Metro module 1858; source: modules/collectibles/utils/mappers.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun20028(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1985:6, offset: 0x00ebcd67, size: 109 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const closure = function(a0) {
return typeof a0.skuId === 'string' || typeof a0.skuId === 'number' ? global.String(a0.skuId) : typeof a0.sku_id === 'string' ? global.String(a0.sku_id) : typeof a0.sku_id !== 'number' ? null : global.String(a0.sku_id);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/utils/mappers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/mappers.tsx');
exports.parseSkuIdFromServerData = closure;
exports.parseServerUserCollectibles = parseServerUserCollectibles;
}
function parseServerUserNameplate(a0) { // fn#20029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1985:266, offset: 0x00ebcdd4, size: 273 bytes, params: 2, frame: 14
var r3;
var palette;
var object2;
if (typeof a0 === 'object') {
if (a0 == null) {
return null;
}
var value;
value = parseSkuIdFromServerData(a0);
if (value == null) {
return null;
}
if ('label' in a0) {
if (typeof a0.label !== 'string') {
function parseServerUserNameplate(a0) { // fn#20029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1985:266, offset: 0x00ebcdd4, size: 273 bytes, params: 2, frame: 14
var r3;
var palette;
var object;
if (typeof a0 === 'object') {
if (a0 == null) {
return null;
}
if ('palette' in a0) {
palette = a0.palette;
if (typeof palette !== 'string') {
var value;
value = parseSkuIdFromServerData(a0);
if (value == null) {
return null;
}
if ('label' in a0) {
if (typeof a0.label !== 'string') {
return null;
}
object2 = {skuId: value};
object2.label = a0.label;
palette = a0.palette;
object2.palette = palette;
value = 'asset' in a0;
r3 = value && typeof a0.asset === 'string';
if (r3) {
object2.asset = a0.asset;
if ('palette' in a0) {
palette = a0.palette;
if (typeof palette !== 'string') {
return null;
}
object = {skuId: value};
object.label = a0.label;
palette = a0.palette;
object.palette = palette;
value = 'asset' in a0;
r3 = value && typeof a0.asset === 'string';
if (r3) {
object.asset = a0.asset;
}
value = 'expiresAt' in a0;
r3 = value && typeof a0.expiresAt === 'number';
if (r3) {
object.expiresAt = a0.expiresAt;
}
value = 'expires_at' in a0;
r3 = value && typeof a0.expires_at === 'number';
if (r3) {
object.expiresAt = a0.expires_at;
}
return object;
}
value = 'expiresAt' in a0;
r3 = value && typeof a0.expiresAt === 'number';
if (r3) {
object2.expiresAt = a0.expiresAt;
}
value = 'expires_at' in a0;
r3 = value && typeof a0.expires_at === 'number';
if (r3) {
object2.expiresAt = a0.expires_at;
}
return object2;
return null;
}
return null;
}
return null;
}
return null;
}
function parseServerUserCollectibles(a0) { // fn#20031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1985:935, offset: 0x00ebcf51, size: 90 bytes, params: 2, frame: 14
var r1;
var r0;
var object2;
const value = null;
if (typeof a0 !== 'object') {
r0 = value;
} else if (value == a0) {
r0 = value;
} else {
if ('nameplate' in a0) {
if (typeof a0.nameplate !== 'object') {
r1 = value;
} else {
object2 = {};
object2.nameplate = parseServerUserNameplate(a0.nameplate);
r1 = object2;
}
function parseServerUserCollectibles(a0) { // fn#20031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1985:935, offset: 0x00ebcf51, size: 90 bytes, params: 2, frame: 14
var r1;
var r0;
var object;
const value = null;
if (typeof a0 !== 'object') {
r0 = value;
} else if (value == a0) {
r0 = value;
} else {
r1 = value;
if ('nameplate' in a0) {
if (typeof a0.nameplate !== 'object') {
r1 = value;
} else {
object = {};
object.nameplate = parseServerUserNameplate(a0.nameplate);
r1 = object;
}
} else {
r1 = value;
}
r0 = r1;
}
r0 = r1;
return r0;
}
return r0;
}
global.__d(_fun20028, 1858, [2]) /* metro module 1858, dependencies: [2] */;