Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
/* Metro module 4274; source: modules/skus/SKUConstants.tsx; dependencies: [2] */
function _fun36248(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4446:6, offset: 0x0108696f, size: 114 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
const set = new Set(['500428425362931713', '451550535720501248', '471376328319303681', '466696214818193408']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/skus/SKUConstants.tsx');
exports.THE_GAME_AWARD_WINNER_SKUS = set;
}
+320
View File
@@ -0,0 +1,320 @@
/* Metro module 4273; source: modules/skus/SKURecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4235, 4274, 661, 1391, 3738, 4275, 4276, 2] */
function _fun36226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:6, offset: 0x01085bc4, size: 296 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
const env0_9 = (require(4274) /* metro dependency 4274: SKUConstants */).THE_GAME_AWARD_WINNER_SKUS;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.GIFTABLE_CURRENCIES;
const env0_11 = constantsModule.OperatingSystems;
const env0_12 = constantsModule.SKUFlags;
const env0_13 = constantsModule.SKUTypes;
value = _fun36230(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/skus/SKURecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_36227() { // fn#36227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:286, offset: 0x01085cec, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_36227_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun36230(a0) { // fn#36230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:485, offset: 0x01085d4a, size: 390 bytes, params: 2, frame: 17
const closure = SKURecord;
env0_7(closure, a0);
return env0_4(closure, [{key: 'supportedOperatingSystems', get: function() {
var r0;
r0 = this.systemRequirements != null ? global.Object.keys(this.systemRequirements) : [];
r0 = !(r0.length > 0) ? [OperatingSystems.WINDOWS] : r0;
return r0;
}}, {key: 'isOnSale', get: function() {
return this.price != null && this.price.saleAmount != null;
}}, {key: 'isGiftable', value: value_36234}, {key: 'getPrice', value: value_36235},
{key: 'getDisplaySalePercentage', value: function() {
var value = null;
return value == this.price || value == this.price.salePercentage ? value : '-' + this.price.salePercentage + '%';
}}, {key: 'requiresPayment', get: function() {
var value = this.getPrice();
return !this.premium && value != null && value.amount > 0;
}}, {key: 'isTheGameAwardsWinner', get: function() {
return THE_GAME_AWARD_WINNER_SKUS.has(this.id);
}}, {key: 'available', get: get_36239}, {key: 'isAvailableForDistribution', value: value_36240},
{key: 'isAvailable', value: function() {
return require(dependencyMap[9]).hasFlag(this.flags, SKUFlags.AVAILABLE);
}}, {key: 'isPremiumPerk', value: function() {
return this.premium && (require(dependencyMap[9]).hasFlag(this.flags,
SKUFlags.PREMIUM_PURCHASE) || require(dependencyMap[9]).hasFlag(this.flags,
SKUFlags.PREMIUM_AND_DISTRIBUTION));
}}, {key: 'hasFeature', value: function(a0) {
return this.features.has(a0);
}}, {key: 'isPreorder', value: function() {
return this.preorderReleaseAt != null || this.preorderApproximateReleaseDate != null;
}}], [{key: 'createFromServer', value: value_36245}]);
}
function SKURecord({id, type, applicationId, application, eligiblePaymentGateways, googleSkuIds, productLine, name, preorderReleaseAt, preorderApproximateReleaseDate, releaseDate, summary, features, genres, dependentSkuId, manifests, availableRegions, accessType, systemRequirements, contentRating, contentRatingAgency, legalNotice, price, prices, premium, showAgeGate, restricted, slug, exclusive, locales, flags, externalPurchaseUrl, deleted, bundledSkuIds, bundledSkus, tenantMetadata, selectedOptions, productId, thumbnailAssetId, description, orbsReward, eligibleOffers, previewAssetPaths}) { // fn#36231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:497, offset: 0x01085ed0, size: 625 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_3(this, SKURecord);
const value3 = env1_6(SKURecord);
value = env1_5(this, _isNativeReflectConstruct_36227() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.type = type;
value.applicationId = applicationId;
value.application = application;
value.eligiblePaymentGateways = eligiblePaymentGateways;
value.googleSkuIds = googleSkuIds;
value.productLine = productLine;
value.name = name;
value.preorderReleaseAt = preorderReleaseAt;
value.preorderApproximateReleaseDate = preorderApproximateReleaseDate;
value.releaseDate = releaseDate;
value.summary = summary;
value.features = features;
value.genres = genres;
value.dependentSkuId = dependentSkuId;
value.manifests = manifests;
value.availableRegions = availableRegions;
value.accessType = accessType;
value.systemRequirements = systemRequirements;
value.contentRating = contentRating;
value.contentRatingAgency = contentRatingAgency;
value.legalNotice = legalNotice;
value.price = price;
value.prices = prices;
value.premium = premium;
value.showAgeGate = showAgeGate;
value.restricted = restricted;
value.slug = slug;
value.exclusive = exclusive;
value.locales = locales;
value.flags = flags;
externalPurchaseUrl = !externalPurchaseUrl ? null : externalPurchaseUrl;
value.externalPurchaseUrl = externalPurchaseUrl;
value.deleted = deleted;
value.bundledSkuIds = bundledSkuIds;
value.bundledSkus = bundledSkus;
value.tenantMetadata = tenantMetadata;
value.selectedOptions = selectedOptions;
value.productId = productId;
value.thumbnailAssetId = thumbnailAssetId;
value.description = description;
value.orbsReward = orbsReward;
value.eligibleOffers = eligibleOffers;
value.previewAssetPaths = previewAssetPaths;
return value;
}
function value_36234() { // fn#36234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:2247, offset: 0x010861b7, size: 109 bytes, params: 1, frame: 13
let value = a0;
const r2 = value !== undefined ? value : this.price;
const type = this.type;
value = environment.__proto__;
const DURABLE_PRIMARY = SKUTypes.DURABLE_PRIMARY;
let r0 = type === DURABLE_PRIMARY && this.available && this.requiresPayment;
r0 = r0 && r2 != null && GIFTABLE_CURRENCIES.has(r2.currency) && this.externalPurchaseUrl == null;
return r0;
}
function value_36235() { // fn#36235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:2429, offset: 0x01086224, size: 161 bytes, params: 1, frame: 7
const value = a0;
const value2 = a1;
const value3 = undefined;
const r5 = value !== value3 ? value : null;
let r1 = !(value2 !== value3) || value2;
const price = this.price;
if (price == null) {
return null;
}
if (r5 != null) {
var premium = price.premium;
var r3 = premium == null ? value3 : premium[r5];
if (r3 != null) {
return {amount: r3.amount, currency: price.currency};
}
}
r1 = r1 && price.saleAmount != null ? {amount: price.saleAmount, currency: price.currency} : {amount: price.amount,
currency: price.currency};
return r1;
}
function get_36239() { // fn#36239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:3047, offset: 0x01086362, size: 72 bytes, params: 1, frame: 14
const value = environment.__proto__;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = this.flags;
const AVAILABLE = SKUFlags.AVAILABLE;
return Reflect.apply(hasFlag, flagUtilsModule, [flags, AVAILABLE]) || this.externalPurchaseUrl != null;
}
function value_36240() { // fn#36240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:3179, offset: 0x010863aa, size: 115 bytes, params: 1, frame: 16
var r0;
var r1;
var value;
var premium;
var moduleValue;
const available = this.available;
if (available) {
value = this.getPrice();
value = value != null;
r0 = value;
} else {
r0 = available;
}
r0 = r0 && this.externalPurchaseUrl == null;
if (r0) {
premium = this.premium;
value = !premium;
if (premium) {
value = environment.__proto__;
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
value = moduleValue.hasFlag(this.flags, SKUFlags.PREMIUM_AND_DISTRIBUTION);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
}
return r0;
}
function value_36245(a0) { // fn#36245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4445:3807, offset: 0x01086500, size: 1081 bytes, params: 2, frame: 19
var r1;
var object2;
const price = a0.price;
const object4 = {};
object4.id = a0.id;
object4.type = a0.type;
object4.applicationId = a0.application_id;
const application = a0.application;
let value = null;
let r3 = value != application ? ApplicationRecord.createFromServer(a0.application) : value;
object4.application = r3;
const eligible_payment_gateways = a0.eligible_payment_gateways;
object4.eligiblePaymentGateways = value != eligible_payment_gateways ? eligible_payment_gateways : value;
const google_sku_ids = a0.google_sku_ids;
object4.googleSkuIds = value != google_sku_ids ? google_sku_ids : value;
object4.productLine = a0.product_line;
const name = a0.name;
const value3 = '';
object4.name = value != name ? name : value3;
object4.releaseDate = value != a0.release_date ? (importDefault(3738) /* metro dependency 3738 */)(a0.release_date) : value;
object4.preorderReleaseAt = value != a0.preorder_release_at ? (importDefault(3738) /* metro dependency 3738 */)(a0.preorder_release_at) : value;
object4.preorderApproximateReleaseDate = a0.preorder_approximate_release_date;
object4.summary = a0.summary;
let Set = global.Set;
const features = a0.features;
const value8 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set(features);
object4.features = set instanceof Object ? set : value8;
Set = global.Set;
const genres = a0.genres;
const value10 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set(genres);
object4.genres = set instanceof Object ? set : value10;
object4.dependentSkuId = a0.dependent_sku_id;
object4.manifests = a0.manifests;
object4.availableRegions = a0.available_regions;
object4.accessType = a0.access_type;
object4.systemRequirements = a0.system_requirements;
object4.contentRating = a0.content_rating;
object4.contentRatingAgency = a0.content_rating_agency;
object4.legalNotice = a0.legal_notice;
object4.price = value != price ? {amount: price.amount, currency: price.currency, saleAmount: price.sale_amount,
salePercentage: price.sale_percentage, premium: price.premium} : value;
const value13 = undefined;
object4.prices = (importDefault(4275) /* metro dependency 4275: getPricesFromServer */)(a0.prices);
const premium = a0.premium;
object4.premium = value != premium && premium;
let show_age_gate = a0.show_age_gate;
show_age_gate = !!show_age_gate && show_age_gate;
object4.showAgeGate = show_age_gate;
let restricted = a0.restricted;
restricted = !!restricted && restricted;
object4.restricted = restricted;
const slug = a0.slug;
let r7 = value != slug ? slug : value3;
object4.slug = r7;
let exclusive = a0.exclusive;
exclusive = !!exclusive && exclusive;
object4.exclusive = exclusive;
const locales = a0.locales;
object4.locales = value != locales ? locales : ['en-US'];
object4.flags = a0.flags;
object4.externalPurchaseUrl = a0.external_purchase_url;
const deleted = a0.deleted;
object4.deleted = value != deleted && deleted;
const bundled_sku_ids = a0.bundled_sku_ids;
object4.bundledSkuIds = value != bundled_sku_ids ? bundled_sku_ids : [];
const bundled_skus = a0.bundled_skus;
r7 = value == bundled_skus ? value13 : bundled_skus.map(function(a0) {
return SKURecord.createFromServer(a0);
});
r7 = value == r7 ? [] : r7;
object4.bundledSkus = r7;
object4.tenantMetadata = (importDefault(4276) /* metro dependency 4276: transformSKUTenantMetadata */)(a0.tenant_metadata);
const selected_options = a0.selected_options;
r3 = value == selected_options ? value13 : selected_options.map(function({option_name, option_value}) {
return {optionName: option_name, optionValue: option_value};
});
r3 = value == r3 ? [] : r3;
object4.selectedOptions = r3;
object4.productId = a0.product_id;
object4.thumbnailAssetId = a0.thumbnail_asset_id;
object4.description = a0.description;
object4.orbsReward = a0.orbs_reward;
const eligible_offers = a0.eligible_offers;
object4.eligibleOffers = value != eligible_offers ? eligible_offers : [];
let preview_asset_paths = a0.preview_asset_paths;
if (value != preview_asset_paths) {
object2 = {};
preview_asset_paths = a0.preview_asset_paths;
object2.fgStatic = preview_asset_paths.fg_static;
preview_asset_paths = a0.preview_asset_paths;
object2.fgAnimated = preview_asset_paths.fg_animated;
preview_asset_paths = a0.preview_asset_paths;
object2.bgStatic = preview_asset_paths.bg_static;
preview_asset_paths = a0.preview_asset_paths;
object2.bgAnimated = preview_asset_paths.bg_animated;
r1 = object2;
} else {
r1 = value;
}
object4.previewAssetPaths = r1;
value = Object.create(SKURecord.prototype, {constructor: {value: SKURecord}});
const sKURecord = new SKURecord(object4);
return sKURecord instanceof Object ? sKURecord : value;
}
+168
View File
@@ -0,0 +1,168 @@
/* Metro module 10029; source: modules/skus/native/SKUPreview.tsx; dependencies: [31, 27, 5125, 661, 33, 4501, 697, 10030, 7609, 8470, 1904, 7596, 8472, 10031, 10033, 10050, 8354, 8467, 3860, 3868, 1360, 2] */
function _fun78334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10215:6, offset: 0x01e25f70, size: 403 bytes, params: 8, frame: 24
const env0_0 = require;
const closure = CollectiblesPreview;
const closure2 = SocialLayerStorefrontSKUPreview;
const closure3 = PremiumSKUPreview;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(5125) /* metro dependency 5125: CollectiblesItemRecord */).transformSKUToCollectiblesItem;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{container: {'width': '100%', 'height': '100%',
'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'}, bundleContainer: {paddingTop: 20},
socialLayerStorefrontContainer: {'width': 170, 'height': 170}, profileFrameContainer: {padding: PX_8},
premiumRiveContainer: {'width': 170, 'height': 170}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/skus/native/SKUPreview.tsx');
exports.default = SKUPreview;
exports.CollectiblesPreview = closure;
exports.SocialLayerStorefrontSKUPreview = closure2;
exports.PremiumSKUPreview = closure3;
}
function CollectiblesPreview({collectiblesItemData}) { // fn#78335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10215:507, offset: 0x01e26103, size: 803 bytes, params: 2, frame: 25
var ProfileFrameSamplePreview;
const DEFAULT_ITEM_SIZE = (require(10033) /* metro dependency 10033: WishlistItemCardBase */).DEFAULT_ITEM_SIZE;
var moduleValue;
var isValidCollectiblesBundleItems;
var items2;
var ItemsSortingHat;
var itemsSortingHat;
const styles = useStyles();
let type = collectiblesItemData.type;
if (type === 'bundle') {
moduleValue = require(10030) /* metro dependency 10030: bundleUtils */;
isValidCollectiblesBundleItems = moduleValue.isValidCollectiblesBundleItems;
items2 = collectiblesItemData.items;
if (Reflect.apply(isValidCollectiblesBundleItems, moduleValue, [items2])) {
ItemsSortingHat = (require(7609) /* metro dependency 7609: useShopProductItems */).ItemsSortingHat;
items2 = collectiblesItemData.items;
itemsSortingHat = new ItemsSortingHat();
return (
<View style={[styles.container, styles.bundleContainer]}>
{((Component) => <Component deco={itemsSortingHat.firstAvatarDecoration} pfx={itemsSortingHat.firstProfileEffect} nameplate={itemsSortingHat.firstNameplate} size="small" previewAssets={collectiblesItemData.previewAssets} disableStaticBackground />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */)}
</View>
);
}
} else {
type = collectiblesItemData.item.type;
var CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return (
<View style={styles.container}>
{((Component) => <Component item={collectiblesItemData.item} size={100} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
</View>
);
}
CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return (
<View style={styles.container}>
{((Component) => <Component item={collectiblesItemData.item} hideBackground />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}
</View>
);
}
CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
var viewBindingProps = {style: styles.profileFrameContainer};
ProfileFrameSamplePreview = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
return (
<View {...viewBindingProps}>
<ProfileFrameSamplePreview
profileFrame={collectiblesItemData.item}
previewWidth={DEFAULT_ITEM_SIZE - (importDefault(697) /* metro dependency 697: native */).space.PX_48}
previewHeight={DEFAULT_ITEM_SIZE}
/>
</View>
);
}
CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return (
<View style={styles.container}>
{((Component) => <Component item={collectiblesItemData.item} />)(importDefault(10050) /* metro dependency 10050: NameplateCardPreview */)}
</View>
);
}
}
return null;
}
function CollectiblesSKUPreview({sku}) { // fn#78336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10215:1581, offset: 0x01e26426, size: 82 bytes, params: 2, frame: 15
const value2 = env0_3.useMemo(function() {
return transformSKUToCollectiblesItem(sku);
}, [sku]);
return value2 == null ? null : <CollectiblesPreview collectiblesItemData={value2} />;
}
function SocialLayerStorefrontSKUPreview({sku}) { // fn#78338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10215:1722, offset: 0x01e26478, size: 120 bytes, params: 2, frame: 17
var r0;
var value;
const styles = useStyles();
if ((require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'sku_preview'})) {
value = importDefault(8467) /* metro dependency 8467: SlayerStorefrontItemCard */;
value = ((Component) => <Component sku={sku} containerStyle={styles.socialLayerStorefrontContainer} />)(value);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function PremiumSKUPreview() { // fn#78339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10215:1951, offset: 0x01e264f0, size: 145 bytes, params: 1, frame: 18
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
const value2 = Reflect.apply(useToken, useTokenModule, [TEXT_DEFAULT]);
const ThemeAwareNitroWishlistingWumpusRive = (require(3868) /* metro dependency 3868: native */).ThemeAwareNitroWishlistingWumpusRive;
return (
<View style={styles.premiumRiveContainer}>
<ThemeAwareNitroWishlistingWumpusRive dataBinding={{logoColor: value2}} />
</View>
);
}
function SKUPreview({sku}) { // fn#78340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10215:2247, offset: 0x01e26581, size: 237 bytes, params: 2, frame: 15
const productLine = sku.productLine;
const COLLECTIBLES = SKUProductLines.COLLECTIBLES;
if (COLLECTIBLES === productLine) {
return <CollectiblesSKUPreview sku={sku} />;
}
const SOCIAL_LAYER_GAME_ITEM = SKUProductLines.SOCIAL_LAYER_GAME_ITEM;
if (SOCIAL_LAYER_GAME_ITEM === productLine) {
return <SocialLayerStorefrontSKUPreview sku={sku} />;
}
const PREMIUM = SKUProductLines.PREMIUM;
if (PREMIUM === productLine) {
return <PremiumSKUPreview />;
}
const APPLICATION = SKUProductLines.APPLICATION;
if (APPLICATION === productLine) {
return null;
}
const BOOST = SKUProductLines.BOOST;
if (BOOST === productLine) {
return null;
}
const GUILD_ROLE = SKUProductLines.GUILD_ROLE;
if (GUILD_ROLE === productLine) {
return null;
}
const GUILD_PRODUCT = SKUProductLines.GUILD_PRODUCT;
if (GUILD_PRODUCT === productLine) {
return null;
}
const globalUtilsModule = require(1360) /* metro dependency 1360: GlobalUtils */;
globalUtilsModule.assertNever(sku.productLine);
}
@@ -0,0 +1,78 @@
/* Metro module 4275; source: modules/skus/utils/getPricesFromServer.tsx; dependencies: [3803, 2] */
function _fun36249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4447:6, offset: 0x010869e1, size: 107 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(3803) /* metro dependency 3803: SubscriptionPlanRecord */).getPriceFromServer;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/skus/utils/getPricesFromServer.tsx');
exports.default = function(a0) {
var r0;
var value;
if (a0 == null) {
r0 = {};
} else {
value = global.Object.entries(a0);
value = value.reduce(_fun36251, {});
r0 = value;
}
return r0;
};
}
function getPricesFromServer(a0) { // fn#36250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4447:211, offset: 0x01086a4c, size: 55 bytes, params: 2, frame: 13
var r0;
var value;
if (a0 == null) {
r0 = {};
} else {
value = global.Object.entries(a0);
value = value.reduce(_fun36251, {});
r0 = value;
}
return r0;
}
function _fun36251(a0, a1) { // fn#36251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4447:287, offset: 0x01086a83, size: 139 bytes, params: 3, frame: 16
var r1;
var r3;
var r4;
var item3;
var value3;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
if (value2) {
r1 = item2;
r3 = value2;
r4 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r3 = value3;
r4 = value;
} else {
r1 = item3;
r3 = value3;
r4 = item;
}
}
if (!r3) {
r1.return();
}
const object = {};
object.countryCode = r4.country_prices.country_code;
object.prices = r4.country_prices.prices.map(function(a0) {
return getPriceFromServer(a0, true);
});
a0[r2] = {countryPrices: object, paymentSourcePrices: {}};
return a0;
}
@@ -0,0 +1,156 @@
/* Metro module 4276; source: modules/skus/utils/transformSKUTenantMetadata.tsx; dependencies: [1904, 2] */
function _fun36253(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4448:6, offset: 0x01086b24, size: 148 bytes, params: 8, frame: 18
const env0_0 = require;
const transformCollectiblesItemAssetsFromServer = function(a0) {
if (a0 != null) {
return {staticImagePath: a0.static_image_path, animatedImagePath: a0.animated_image_path,
videoPath: a0.video_path};
}
};
const transformCollectiblesVariantMetadataFromServer = function(a0) {
if (a0 != null) {
return {role: a0.role, baseVariantSkuId: a0.base_variant_sku_id, baseVariantName: a0.base_variant_name,
value: a0.value, label: a0.label, collapseUnder: a0.collapse_under};
}
};
const transformSlayerSKUTenantMetadataFromServer = function(a0) {
var object;
if (a0 != null) {
object = {};
object.carouselItems = a0.carousel_items.map(_fun36260);
object.expiresAt = a0.expires_at != null ? new global.Date() : undefined;
object.cardImageAssetId = a0.card_image_asset_id;
object.cardBackgroundImageAssetId = a0.card_background_image_asset_id;
return object;
}
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/skus/utils/transformSKUTenantMetadata.tsx');
exports.default = transformSKUTenantMetadata;
}
function transformProfileEffectKeyFrameFromServer({src, loop, height, width, duration, start, loopDelay, position, zIndex, randomizedSources}) { // fn#36255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4448:215, offset: 0x01086bf6, size: 159 bytes, params: 2, frame: 15
const object2 = {};
object2.src = src;
object2.loop = loop;
object2.height = height;
object2.width = width;
const value = 0;
object2.duration = duration ?? value;
object2.start = start ?? value;
object2.loopDelay = loopDelay;
object2.position = position;
object2.zIndex = zIndex;
object2.randomizedSources = randomizedSources?.map(function({src}) {
return {src: src};
});
return object2;
}
function transformCollectiblesItemFromServer(a0) { // fn#36257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4448:543, offset: 0x01086ca7, size: 516 bytes, params: 2, frame: 16
var type;
var value2;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var object2;
var effects;
if (a0 != null) {
type = a0.type;
value2 = undefined;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
object2 = {};
object2.id = a0.id;
object2.type = a0.type;
object2.asset = a0.asset;
object2.assets = transformCollectiblesItemAssetsFromServer(a0.assets);
object2.label = a0.label;
return object2;
}
if (CollectiblesItemType.NAMEPLATE === type) {
object2 = {};
object2.id = a0.id;
object2.type = a0.type;
object2.asset = a0.asset;
object2.assets = transformCollectiblesItemAssetsFromServer(a0.assets);
object2.label = a0.label;
object2.palette = a0.palette;
return object2;
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
effects = a0.effects;
return {id: a0.id, type: a0.type, title: a0.title, description: a0.description,
accessibilityLabel: a0.accessibilityLabel, animationType: a0.animationType,
staticFrameSrc: a0.staticFrameSrc,
thumbnailPreviewSrc: a0.thumbnailPreviewSrc, reducedMotionSrc: a0.reducedMotionSrc,
effects: effects == null ? value2 : effects.map(transformProfileEffectKeyFrameFromServer)};
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return {id: a0.id, type: a0.type, label: a0.label, layers: a0.layers, innerWidth: a0.inner_width,
overflowTop: a0.overflow_top, overflowBottom: a0.overflow_bottom,
overflowHorizontal: a0.overflow_horizontal};
}
return value2;
}
}
function transformSlayerSKUTenantMetadataFromServer(a0) { // fn#36259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4448:1819, offset: 0x01086efe, size: 125 bytes, params: 2, frame: 14
var object2;
if (a0 != null) {
object2 = {};
object2.carouselItems = a0.carousel_items.map(function(a0) {
return {thumbnailAssetId: a0.thumbnail_asset_id, assetId: a0.asset_id,
backgroundAssetId: a0.background_asset_id,
youtubeVideoId: a0.youtube_video_id, label: a0.label, labelIconAssetId: a0.label_icon_asset_id,
title: a0.title,
description: a0.description};
});
object2.expiresAt = a0.expires_at != null ? new global.Date() : undefined;
object2.cardImageAssetId = a0.card_image_asset_id;
object2.cardBackgroundImageAssetId = a0.card_background_image_asset_id;
return object2;
}
}
function transformCollectiblesSKUTenantMetadataFromServer(a0) { // fn#36261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4448:2320, offset: 0x01086fd8, size: 181 bytes, params: 2, frame: 16
var r3;
var object2;
var transformCollectiblesItemFromServerBinding;
var item;
var value2;
var Date;
var value3;
var date;
if (a0 != null) {
object2 = {};
object2.type = a0.type;
transformCollectiblesItemFromServerBinding = transformCollectiblesItemFromServer;
item = a0.item;
value2 = undefined;
object2.item = transformCollectiblesItemFromServerBinding(item);
object2.categorySkuId = a0.category_sku_id;
object2.premiumType = a0.premium_type;
object2.expiresSecondsAfterClaim = a0.expires_seconds_after_claim;
if (a0.expires_at != null) {
Date = global.Date;
value3 = 1000 * a0.expires_at;
date = new Date();
} else {
r3 = value2;
}
object2.expiresAt = r3;
object2.variant = transformCollectiblesVariantMetadataFromServer(a0.variant);
object2.optionSelectorDisplayValue = a0.option_selector_display_value;
return object2;
}
}
function transformSKUTenantMetadata(a0) { // fn#36262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4448:2905, offset: 0x0108708d, size: 64 bytes, params: 2, frame: 14
var object2;
if (a0 != null) {
object2 = {};
object2.socialLayer = transformSlayerSKUTenantMetadataFromServer(a0.social_layer);
object2.collectibles = transformCollectiblesSKUTenantMetadataFromServer(a0.collectibles);
return object2;
}
}