1026 lines
65 KiB
TypeScript
1026 lines
65 KiB
TypeScript
/* Metro module 14607; source: modules/premium/powerups/hooks/useGuildPowerupsNotifications.tsx; dependencies: [57, 31, 1867, 8255, 14608, 8258, 8259, 661, 1376, 8249, 14247, 14598, 8188, 14610, 1360, 1365, 6857, 632, 8263, 4043, 8254, 14611, 1367, 14609, 14612, 14613, 14615, 14617, 14618, 12307, 2] */
|
|
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UseGuildPowerupsBoostCount from './useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
|
|
import GameServerStore from '../../game_server/GameServerStore.tsx'; /* Metro dependency 8255 */
|
|
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
|
|
import GuildPowerupsNotificationStore from '../GuildPowerupsNotificationStore.tsx'; /* Metro dependency 14608 */
|
|
import UseGuildPowerupRollbackNotificationConfig from './useGuildPowerupRollbackNotificationConfig.tsx'; /* Metro dependency 14611 */
|
|
import UseBoostToUnlockFeaturedPowerup from './useBoostToUnlockFeaturedPowerup.tsx'; /* Metro dependency 14613 */
|
|
import UseFeaturedExpiringPowerup from './useFeaturedExpiringPowerup.tsx'; /* Metro dependency 14615 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
|
|
import * as GlobalUtilsModule from '../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
|
|
import * as Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
|
|
import * as DismissibleContentUtilsModule from '../../../dismissible_content/DismissibleContentUtils.tsx'; /* Metro dependency 1367 */
|
|
import * as DismissibleContentConstantsModule from '../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as GameServerExperimentModule from '../../game_server/GameServerExperiment.tsx'; /* Metro dependency 6857 */
|
|
import * as PowerupsModule from '../../../../external/discord_common/js/shared/shared-constants/Powerups.tsx'; /* Metro dependency 8188 */
|
|
import * as GuildBoostingUtilsModule from '../../../../utils/GuildBoostingUtils.tsx'; /* Metro dependency 8249 */
|
|
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
|
|
import * as GuildPowerupsActionCreatorsModule from '../GuildPowerupsActionCreators.tsx'; /* Metro dependency 12307 */
|
|
import * as GuildDismissibleContentUtilsModule from '../../../guild_dismissible_content/GuildDismissibleContentUtils.tsx'; /* Metro dependency 14247 */
|
|
import * as GuildPowerupsNotificationModule from '../constants/GuildPowerupsNotification.tsx'; /* Metro dependency 14598 */
|
|
import * as GetExpiringGuildEntitlementsModule from '../utils/getExpiringGuildEntitlements.tsx'; /* Metro dependency 14609 */
|
|
import * as GuildPowerupsNotificationsDCFNativeModule from './GuildPowerupsNotificationsDCF.native.tsx'; /* Metro dependency 14612 */
|
|
import * as NewGamesCoachmarkExperimentModule from '../../game_server/experiments/NewGamesCoachmarkExperiment.tsx'; /* Metro dependency 14617 */
|
|
import * as GameServerPricingExperimentModule from '../../game_server/experiments/GameServerPricingExperiment.tsx'; /* Metro dependency 14618 */
|
|
|
|
function _fun110428(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:6, offset: 0x0237911c, size: 468 bytes, params: 8, frame: 26
|
|
const env0_0 = require;
|
|
const maybeGetLevelUnlockedPopoutDCF2 = maybeGetLevelUnlockedPopoutDCF;
|
|
const maybeGetPerkPurchaseablePopoutDCF2 = maybeGetPerkPurchaseablePopoutDCF;
|
|
const maybeGetGameServerHostingGuildEligiblePopoutDCF2 = maybeGetGameServerHostingGuildEligiblePopoutDCF;
|
|
const useGuildPowerupNewPerkAvailableCoachmarkVersion2 = useGuildPowerupNewPerkAvailableCoachmarkVersion;
|
|
const useGuildPowerupsNotificationIndicator2 = useGuildPowerupsNotificationIndicator;
|
|
const useGuildPowerupsChannelListPopout2 = useGuildPowerupsChannelListPopout;
|
|
const useGuildPowerupsNotifications2 = useGuildPowerupsNotifications;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = GuildPowerupsConstantsModule;
|
|
const env0_9 = value.BOOSTING_TIER_TO_LEVEL_SKU_ID;
|
|
const env0_10 = value.BOOSTING_TIER_TO_LEVEL_UNLOCKED_DC;
|
|
const env0_11 = value.GUILD_POWERUP_MIGRATION_USER_ID;
|
|
const env0_12 = value.GUILD_POWERUP_NEW_PERK_GROUPS;
|
|
const env0_13 = value.GuildPowerupNewPerkAvailableCoachmarkVersion;
|
|
const env0_14 = value.NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET;
|
|
const env0_15 = value.POWERUPS_INCLUDED_IN_LEVEL;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_16 = value.BoostedGuildTiers;
|
|
const env0_17 = value.GuildFeatures;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsNotifications.tsx');
|
|
exports.default = useGuildPowerupsNotifications2;
|
|
exports.maybeGetLevelUnlockedPopoutDCF = maybeGetLevelUnlockedPopoutDCF2;
|
|
exports.maybeGetPerkPurchaseablePopoutDCF = maybeGetPerkPurchaseablePopoutDCF2;
|
|
exports.maybeGetGameServerHostingGuildEligiblePopoutDCF = maybeGetGameServerHostingGuildEligiblePopoutDCF2;
|
|
exports.useGuildPowerupNewPerkAvailableCoachmarkVersion = useGuildPowerupNewPerkAvailableCoachmarkVersion2;
|
|
exports.useGuildPowerupsNotificationIndicator = useGuildPowerupsNotificationIndicator2;
|
|
exports.useGuildPowerupsChannelListPopout = useGuildPowerupsChannelListPopout2;
|
|
exports.useAutoDismissGuildPowerupsNotifications = useAutoDismissGuildPowerupsNotifications;
|
|
function maybeGetLevelUnlockedPopoutDCF(a0, a1) { // fn#110429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:537, offset: 0x023792f0, size: 218 bytes, params: 3, frame: 20
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value2 = undefined;
|
|
const ReverseOrderedTiers = (GuildBoostingUtilsModule).ReverseOrderedTiers;
|
|
const value3 = ReverseOrderedTiers.find(_fun110430);
|
|
if (value3 == null) {
|
|
return value2;
|
|
}
|
|
let property = BOOSTING_TIER_TO_LEVEL_UNLOCKED_DC[value3];
|
|
if (property == null) {
|
|
return value2;
|
|
}
|
|
if (GuildDismissibleContentUtilsModule.isContentDismissed(property, a0)) {
|
|
return value2;
|
|
}
|
|
property = BOOSTING_TIER_TO_LEVEL_SKU_ID[value3];
|
|
const r3 = property != null ? a1.allPowerups[property] : value2;
|
|
if (r3 == null) {
|
|
return value2;
|
|
}
|
|
const GuildPowerupNotificationPopoutType = (GuildPowerupsNotificationModule).GuildPowerupNotificationPopoutType;
|
|
const LEVEL_REACHED = GuildPowerupNotificationPopoutType.LEVEL_REACHED;
|
|
return {type: LEVEL_REACHED, powerup: r3, markAsDismissed: markAsDismissed_110431};
|
|
function _fun110430(a0) { // fn#110430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:622, offset: 0x023793ca, size: 65 bytes, params: 2, frame: 5
|
|
const value = environment.__proto__;
|
|
const property = BOOSTING_TIER_TO_LEVEL_SKU_ID[a0];
|
|
const r2 = property != null ? require.unlockedPowerups[property] : undefined;
|
|
return r2 != null && r2.user_id !== GUILD_POWERUP_MIGRATION_USER_ID;
|
|
}
|
|
|
|
function maybeGetLevelUnlockedPopoutDCFMarkAsDismissed(a0) { // fn#110431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:931, owner: maybeGetLevelUnlockedPopoutDCF.markAsDismissed, offset: 0x0237940b, size: 56 bytes, params: 2, frame: 18
|
|
let value = environment.__proto__;
|
|
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
value.markContentAsDismissed(env0_2, env0_0, true, a0);
|
|
}
|
|
|
|
}
|
|
|
|
function maybeGetPerkPurchaseablePopoutDCF(a0, a1, a2, a3) { // fn#110432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:981, offset: 0x02379443, size: 452 bytes, params: 5, frame: 21
|
|
var r1;
|
|
var moduleValue;
|
|
const DismissibleGuildContent = (Dismissible_contentModule).DismissibleGuildContent;
|
|
const GuildPowerupNotificationPopoutType = (GuildPowerupsNotificationModule).GuildPowerupNotificationPopoutType;
|
|
var moduleValue2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const guild = GuildStore.getGuild(a0);
|
|
const value3 = undefined;
|
|
let r0 = (guild == null ? value3 : guild.premiumTier) ?? BoostedGuildTiers.NONE;
|
|
const Array = global.Array;
|
|
const value5 = Array.from(GUILD_POWERUP_NEW_PERK_GROUPS.values()).flatMap(function(a0) {
|
|
return a0.length <= 0 || a0.some(_fun110434) ? [] : a0.map(_fun110435);
|
|
});
|
|
const value6 = value5.filter((GlobalUtilsModule).isNotNullish);
|
|
if (value6.length !== 0) {
|
|
if (value6.length !== 1) {
|
|
if (value6.length > 1) {
|
|
moduleValue2 = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
r1 = moduleValue2.isContentDismissed(DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK,
|
|
|
|
a0) ? value3 : {type: GuildPowerupNotificationPopoutType.PERKS_PURCHASABLE, powerups: value6,
|
|
markAsDismissed: markAsDismissed_110437};
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
moduleValue = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
if (moduleValue.isContentDismissed(DismissibleGuildContent.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK,
|
|
a0)) {
|
|
if (value6.length > 1) {
|
|
moduleValue2 = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
r1 = moduleValue2.isContentDismissed(DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK,
|
|
|
|
|
|
a0) ? value3 : {type: GuildPowerupNotificationPopoutType.PERKS_PURCHASABLE, powerups: value6,
|
|
markAsDismissed: markAsDismissed_110437};
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = {type: GuildPowerupNotificationPopoutType.PERKS_PURCHASABLE, powerups: value6,
|
|
markAsDismissed: markAsDismissed_110438};
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
return value3;
|
|
function _fun110433(a0) { // fn#110433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1141, offset: 0x02379607, size: 62 bytes, params: 2, frame: 12
|
|
return a0.length <= 0 || a0.some(_fun110434) ? [] : a0.map(_fun110435);
|
|
function _fun110434(a0) { // fn#110434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1165, offset: 0x02379645, size: 58 bytes, params: 2, frame: 4
|
|
const value = environment.__proto__;
|
|
if (require.unlockedPowerups[a0] != null) {
|
|
return true;
|
|
}
|
|
const property = POWERUPS_INCLUDED_IN_LEVEL[a0];
|
|
return property != null && env1_4 >= property;
|
|
}
|
|
|
|
function _fun110435(a0) { // fn#110435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1254, offset: 0x0237967f, size: 189 bytes, params: 2, frame: 19
|
|
var environment;
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
var property;
|
|
var value4;
|
|
var dependencies;
|
|
let value = environment.__proto__.__proto__;
|
|
const GUILD_POWERUP_GUILD_THEME_SKU_ID = (PowerupsModule).GUILD_POWERUP_GUILD_THEME_SKU_ID;
|
|
if (a0 !== GUILD_POWERUP_GUILD_THEME_SKU_ID) {
|
|
value3 = environment.__proto__;
|
|
property = require.allPowerups[a0];
|
|
value4 = null;
|
|
if (value4 == property) {
|
|
r0 = value4;
|
|
} else if (importDefault < property.cost) {
|
|
r0 = value4;
|
|
} else {
|
|
dependencies = property.dependencies;
|
|
if (dependencies.every(function(a0) {
|
|
return require.unlockedPowerups[a0] != null;
|
|
})) {
|
|
value = require(14610) /* metro dependency 14610: useGuildPowerupRollbackEnabled */;
|
|
r1 = value.isGuildPowerupRollbackEnabled(env1_0, property,
|
|
'maybeGetPerkPurchaseablePopoutDCF') ? value4 : property;
|
|
} else {
|
|
r1 = value4;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
if (importAll) {
|
|
value3 = environment.__proto__;
|
|
property = require.allPowerups[a0];
|
|
value4 = null;
|
|
if (value4 == property) {
|
|
r0 = value4;
|
|
} else if (importDefault < property.cost) {
|
|
r0 = value4;
|
|
} else {
|
|
dependencies = property.dependencies;
|
|
if (dependencies.every(function(a0) {
|
|
return require.unlockedPowerups[a0] != null;
|
|
})) {
|
|
value = require(14610) /* metro dependency 14610: useGuildPowerupRollbackEnabled */;
|
|
r1 = value.isGuildPowerupRollbackEnabled(env1_0, property,
|
|
'maybeGetPerkPurchaseablePopoutDCF') ? value4 : property;
|
|
} else {
|
|
r1 = value4;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
}
|
|
|
|
function maybeGetPerkPurchaseablePopoutDCFMarkAsDismissed(a0) { // fn#110437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1919, owner: maybeGetPerkPurchaseablePopoutDCF.markAsDismissed, offset: 0x02379758, size: 76 bytes, params: 2, frame: 18
|
|
let value = environment.__proto__;
|
|
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
const markContentAsDismissed = value.markContentAsDismissed;
|
|
const DismissibleGuildContent = (Dismissible_contentModule).DismissibleGuildContent;
|
|
const GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK;
|
|
Reflect.apply(markContentAsDismissed, value, [GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK, env0_0, true, a0]);
|
|
}
|
|
|
|
function maybeGetPerkPurchaseablePopoutDCFMarkAsDismissed_110438(a0) { // fn#110438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2144, owner: maybeGetPerkPurchaseablePopoutDCF.markAsDismissed, offset: 0x023797a4, size: 76 bytes, params: 2, frame: 18
|
|
let value = environment.__proto__;
|
|
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
const markContentAsDismissed = value.markContentAsDismissed;
|
|
const DismissibleGuildContent = (Dismissible_contentModule).DismissibleGuildContent;
|
|
const GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK;
|
|
Reflect.apply(markContentAsDismissed, value, [GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK, env0_0, true, a0]);
|
|
}
|
|
|
|
}
|
|
|
|
function maybeGetGameServerHostingGuildEligiblePopoutDCF(a0, a1, a2, a3) { // fn#110439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2267, offset: 0x023797f0, size: 196 bytes, params: 5, frame: 18
|
|
var moduleValue2;
|
|
var object;
|
|
const env0_0 = a0;
|
|
const getGameServerEnabled = GameServerExperimentModule.getGameServerEnabled;
|
|
if (Reflect.apply(getGameServerEnabled, GameServerExperimentModule, [a0,
|
|
'maybeGetGameServerHostingGuildEligiblePopoutDCF'])) {
|
|
if (a1) {
|
|
return undefined;
|
|
}
|
|
if (a3 == null) {
|
|
return undefined;
|
|
}
|
|
if (a2 >= a3) {
|
|
moduleValue2 = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
if (moduleValue2.isContentDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent.GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK,
|
|
|
|
|
|
a0)) {
|
|
return undefined;
|
|
}
|
|
object = {};
|
|
object.type = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationPopoutType.GAME_SERVER_HOSTING_GUILD_ELIGIBLE;
|
|
object.markAsDismissed = markAsDismissed_110440;
|
|
return object;
|
|
}
|
|
}
|
|
function maybeGetGameServerHostingGuildEligiblePopoutDCFMarkAsDismissed(a0) { // fn#110440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2656, owner: maybeGetGameServerHostingGuildEligiblePopoutDCF.markAsDismissed, offset: 0x023798b4, size: 76 bytes, params: 2, frame: 18
|
|
let value = environment.__proto__;
|
|
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
const markContentAsDismissed = value.markContentAsDismissed;
|
|
const DismissibleGuildContent = (Dismissible_contentModule).DismissibleGuildContent;
|
|
const GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK = DismissibleGuildContent.GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK;
|
|
Reflect.apply(markContentAsDismissed, value, [GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK, env0_0, true, a0]);
|
|
}
|
|
|
|
}
|
|
|
|
function useGuildPowerupNewPerkAvailableCoachmarkVersion(a0, a1) { // fn#110441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2780, offset: 0x02379900, size: 219 bytes, params: 3, frame: 21
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value2 = (GameServerExperimentModule).useGameServerEnabled(a0,
|
|
'GuildPowerupsChannelRow');
|
|
const value3 = (UseStateFromStoresModule).useStateFromStores([GuildStore],
|
|
_fun110442);
|
|
const r4 = (require(8263) /* metro dependency 8263: ServerThemeExperiment */).useServerThemeEnabled(a0,
|
|
'useGuildPowerupNewPerkAvailableCoachmarkVersion') && (require(4043) /* metro dependency 4043: ServerThemeUserExperiment */).useServerThemeUserEnabled('useGuildPowerupNewPerkAvailableCoachmarkVersion');
|
|
return r4.useMemo(_fun110443, [a1, value2, value3, r4]);
|
|
function _fun110442() { // fn#110442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2942, offset: 0x023799db, size: 64 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
const guild = GuildStore.getGuild(env0_0);
|
|
return guild == null ? undefined : guild.features.has(GuildFeatures.GAME_SERVERS);
|
|
}
|
|
|
|
function _fun110443() { // fn#110443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:3224, offset: 0x02379a1b, size: 513 bytes, params: 1, frame: 18
|
|
var environment;
|
|
var GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
var r2;
|
|
var r1;
|
|
const GUILD_POWERUP_GUILD_THEME_SKU_ID = (PowerupsModule).GUILD_POWERUP_GUILD_THEME_SKU_ID;
|
|
const GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID = (PowerupsModule).GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID;
|
|
var value8;
|
|
var Array;
|
|
var from;
|
|
var value11;
|
|
var value12;
|
|
var value;
|
|
const value2 = undefined;
|
|
const value4 = (require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_GUILD_THEME_SKU_ID]) != null;
|
|
let r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_GUILD_THEME_SKU_ID];
|
|
if (ReactModule) {
|
|
if (value4) {
|
|
if (r0 != null) {
|
|
r0 = require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
|
value8 = r0 != null;
|
|
r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
|
if (value8) {
|
|
if (r0 != null) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
value11 = environment.__proto__;
|
|
value12 = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
|
if (value12.some(function(a0) {
|
|
return (require == null || require.unlockedPowerups == null ? undefined : require.unlockedPowerups[a0]) != null;
|
|
})) {
|
|
if (env0_2) {
|
|
if (Module00057) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
} else {
|
|
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
value = environment.__proto__;
|
|
r0 = GuildPowerupNewPerkAvailableCoachmarkVersion.FILE_UPLOAD_250_MB;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
value11 = environment.__proto__;
|
|
value12 = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
|
if (value12.some(_fun110444)) {
|
|
if (env0_2) {
|
|
if (Module00057) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
} else {
|
|
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
value = environment.__proto__;
|
|
return GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_THEME;
|
|
}
|
|
r0 = require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
|
value8 = r0 != null;
|
|
r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
|
if (value8) {
|
|
if (r0 != null) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
value11 = environment.__proto__;
|
|
value12 = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
|
if (value12.some(_fun110444)) {
|
|
if (env0_2) {
|
|
if (Module00057) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
} else {
|
|
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
value = environment.__proto__;
|
|
r0 = GuildPowerupNewPerkAvailableCoachmarkVersion.FILE_UPLOAD_250_MB;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
value11 = environment.__proto__;
|
|
value12 = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
|
if (value12.some(_fun110444)) {
|
|
if (env0_2) {
|
|
if (Module00057) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
} else {
|
|
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
} else {
|
|
r0 = require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
|
value8 = r0 != null;
|
|
r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
|
if (value8) {
|
|
if (r0 != null) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
value11 = environment.__proto__;
|
|
value12 = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
|
if (value12.some(function(a0) {
|
|
return (require == null || require.unlockedPowerups == null ? undefined : require.unlockedPowerups[a0]) != null;
|
|
})) {
|
|
if (env0_2) {
|
|
if (Module00057) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
} else {
|
|
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
value = environment.__proto__;
|
|
r0 = GuildPowerupNewPerkAvailableCoachmarkVersion.FILE_UPLOAD_250_MB;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
value11 = environment.__proto__;
|
|
value12 = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
|
if (value12.some(_fun110444)) {
|
|
if (env0_2) {
|
|
if (Module00057) {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
} else {
|
|
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
value = Reflect.apply(from, Array,
|
|
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
|
value = value.some(_fun110445);
|
|
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
}
|
|
return r0;
|
|
function _fun110444(a0) { // fn#110444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:3774, offset: 0x02379c1c, size: 50 bytes, params: 2, frame: 5
|
|
return (require == null || require.unlockedPowerups == null ? undefined : require.unlockedPowerups[a0]) != null;
|
|
}
|
|
|
|
function _fun110445(a0) { // fn#110445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:3934, offset: 0x02379c1c, size: 50 bytes, params: 2, frame: 5
|
|
return (require == null || require.unlockedPowerups == null ? undefined : require.unlockedPowerups[a0]) != null;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useGuildPowerupsNotificationIndicator(a0, a1, a2) { // fn#110446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:4093, offset: 0x02379c4e, size: 308 bytes, params: 4, frame: 22
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const value2 = undefined;
|
|
const available = (UseGuildPowerupsBoostCount)(a0).available;
|
|
const shouldShow = (UseGuildPowerupRollbackNotificationConfig)(a0,
|
|
'useGuildPowerupsNotificationIndicator').shouldShow;
|
|
const useIsSingleUseGuildDismissibleContentDismissed = DismissibleContentUtilsModule.useIsSingleUseGuildDismissibleContentDismissed;
|
|
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
|
|
const VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION = DismissibleContent.VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION;
|
|
const r7 = shouldShow && !Reflect.apply(useIsSingleUseGuildDismissibleContentDismissed,
|
|
DismissibleContentUtilsModule, [VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION, a0]);
|
|
const env0_4 = r7;
|
|
const stateForGuild = (UseStateFromStoresModule).useStateFromStores([GameServerStore],
|
|
_fun110447);
|
|
return env0_4.useMemo(_fun110448, [available, a2 == null ? value2 : a2.lastBoostCount,
|
|
a2 == null ? value2 : a2.lastSeenWarningNotification, a1, r7,
|
|
stateForGuild == null ? value2 : stateForGuild.entitlements]);
|
|
function _fun110447() { // fn#110447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:4413, offset: 0x02379d82, size: 27 bytes, params: 1, frame: 11
|
|
return GameServerStore.getStateForGuild(env0_0);
|
|
}
|
|
|
|
function _fun110448() { // fn#110448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:4459, offset: 0x02379d9d, size: 495 bytes, params: 1, frame: 24
|
|
var r13;
|
|
var entitlements;
|
|
const GuildPowerupNotificationIndicatorType = (GuildPowerupsNotificationModule).GuildPowerupNotificationIndicatorType;
|
|
if (require == null) {
|
|
return {indicator: undefined, showUnread: false};
|
|
}
|
|
const unlockedPowerups = require.unlockedPowerups;
|
|
const value3 = undefined;
|
|
const getExpiringGuildEntitlements = GetExpiringGuildEntitlementsModule.getExpiringGuildEntitlements;
|
|
let Object = global.Object;
|
|
let values = Object.values;
|
|
const value4 = Reflect.apply(values, Object, [unlockedPowerups]);
|
|
const items2 = [];
|
|
const value5 = 0;
|
|
const value6 = arraySpread(items2, value4, value5, r13);
|
|
Object = global.Object;
|
|
values = Object.values;
|
|
const value7 = stateForGuild == null;
|
|
if (value7) {
|
|
entitlements = value3;
|
|
r13 = value7;
|
|
} else {
|
|
stateForGuildBinding = stateForGuild;
|
|
entitlements = stateForGuildBinding.entitlements;
|
|
r13 = stateForGuildBinding;
|
|
}
|
|
arraySpread(items2, Reflect.apply(values, Object, [entitlements ?? ({})]), value6, r13);
|
|
const value8 = Reflect.apply(getExpiringGuildEntitlements, GetExpiringGuildEntitlementsModule, [items2]);
|
|
const r7 = (importDefault == null ? value3 : importDefault.lastSeenWarningNotification) ?? global.Date.now();
|
|
const Date = global.Date;
|
|
const property = value8[value8.length - 1];
|
|
const ends_at = property == null ? value3 : property.ends_at;
|
|
const value10 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
const date = new Date(ends_at);
|
|
const time = (date instanceof Object ? date : value10).getTime();
|
|
const r2 = (importDefault == null ? value3 : importDefault.lastBoostCount) ?? value5;
|
|
const r6 = value8.length > value5 && r7 < time;
|
|
const value15 = available - r2;
|
|
return r6 || env0_4 ? {indicator: {type: GuildPowerupNotificationIndicatorType.WARNING},
|
|
showUnread: true} : available === r2 ? {indicator: value3,
|
|
showUnread: false} : value15 > value5 ? {indicator: {type: GuildPowerupNotificationIndicatorType.UNREAD,
|
|
count: value15}, showUnread: true} : {indicator: value3, showUnread: false};
|
|
}
|
|
|
|
}
|
|
|
|
function useGuildPowerupsChannelListPopout(a0, a1) { // fn#110449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:5239, offset: 0x02379f8c, size: 1176 bytes, params: 3, frame: 43
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value3 = Module00057((GuildPowerupsNotificationsDCFNativeModule).usePerksCoachmarkDCF(a1 != null),
|
|
2);
|
|
let property = value3[0];
|
|
const property2 = value3[1];
|
|
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
|
|
const GUILD_POWERUP_PERKS_COACHMARK = DismissibleContent.GUILD_POWERUP_PERKS_COACHMARK;
|
|
const value4 = property === GUILD_POWERUP_PERKS_COACHMARK;
|
|
const available = (UseGuildPowerupsBoostCount)(a0).available;
|
|
const available2 = available;
|
|
const value5 = (UseStateFromStoresModule).useStateFromStores([GuildStore],
|
|
_fun110450);
|
|
const lowestGameCostForGuild = (UseStateFromStoresModule).useStateFromStores([GameServerStore],
|
|
_fun110451);
|
|
const r19 = (require(8263) /* metro dependency 8263: ServerThemeExperiment */).useServerThemeEnabled(a0,
|
|
'useGuildPowerupsChannelListPopout') && (require(4043) /* metro dependency 4043: ServerThemeUserExperiment */).useServerThemeUserEnabled('useGuildPowerupsChannelListPopout');
|
|
const value8 = useGuildPowerupNewPerkAvailableCoachmarkVersion(a0, a1);
|
|
const useNewPerkAvailableCoachmarkDCF = GuildPowerupsNotificationsDCFNativeModule.useNewPerkAvailableCoachmarkDCF;
|
|
let r4 = a1 != null && !value4;
|
|
const value12 = Module00057(Reflect.apply(useNewPerkAvailableCoachmarkDCF, GuildPowerupsNotificationsDCFNativeModule,
|
|
[r4, value8]), 2);
|
|
property = value12[0];
|
|
const property3 = value12[1];
|
|
const GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK = DismissibleContent.GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK;
|
|
const value13 = property === GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK;
|
|
const value14 = (UseBoostToUnlockFeaturedPowerup)(a0);
|
|
const useBoostToUnlockCoachmarkDCF = GuildPowerupsNotificationsDCFNativeModule.useBoostToUnlockCoachmarkDCF;
|
|
const value20 = Module00057(Reflect.apply(useBoostToUnlockCoachmarkDCF, GuildPowerupsNotificationsDCFNativeModule,
|
|
[a1 != null && !value4 && !value13 && value14 != null, a0]), 2);
|
|
property = value20[0];
|
|
const property4 = value20[1];
|
|
const BOOST_TO_UNLOCK_COACHMARK = DismissibleContent.BOOST_TO_UNLOCK_COACHMARK;
|
|
const value21 = property === BOOST_TO_UNLOCK_COACHMARK;
|
|
const value22 = (UseFeaturedExpiringPowerup)(a0);
|
|
const useExpiringPowerupCoachmarkDCF = GuildPowerupsNotificationsDCFNativeModule.useExpiringPowerupCoachmarkDCF;
|
|
r4 = a1 != null && !value4 && !value13;
|
|
r4 = r4 && !value21 && value22 != null;
|
|
const value29 = Module00057(Reflect.apply(useExpiringPowerupCoachmarkDCF, GuildPowerupsNotificationsDCFNativeModule, [r4, a0]), 2);
|
|
property = value29[0];
|
|
const property5 = value29[1];
|
|
const EXPIRING_POWERUP_COACHMARK = DismissibleContent.EXPIRING_POWERUP_COACHMARK;
|
|
const value30 = property === EXPIRING_POWERUP_COACHMARK;
|
|
const gameServerEnabled = (GameServerExperimentModule).getGameServerEnabled(a0,
|
|
'useGuildPowerupsChannelListPopout');
|
|
const value32 = (NewGamesCoachmarkExperimentModule).useIsNewGamesCoachmarkEnabled('useGuildPowerupsChannelListPopout');
|
|
const useNewGamesCoachmarkDC = GuildPowerupsNotificationsDCFNativeModule.useNewGamesCoachmarkDC;
|
|
const value35 = Module00057(Reflect.apply(useNewGamesCoachmarkDC, GuildPowerupsNotificationsDCFNativeModule,
|
|
[a1 != null && gameServerEnabled && value32]), 2);
|
|
property = value35[0];
|
|
const property6 = value35[1];
|
|
const GAME_SERVER_NEW_GAMES_COACHMARK = DismissibleContent.GAME_SERVER_NEW_GAMES_COACHMARK;
|
|
const value36 = property === GAME_SERVER_NEW_GAMES_COACHMARK;
|
|
const value37 = (GameServerPricingExperimentModule).useIsGameServerPricingEnabled(a0,
|
|
'useGuildPowerupsChannelListPopout');
|
|
const useGameServerPricingCoachmarkDCF = GuildPowerupsNotificationsDCFNativeModule.useGameServerPricingCoachmarkDCF;
|
|
const value41 = Module00057(Reflect.apply(useGameServerPricingCoachmarkDCF, GuildPowerupsNotificationsDCFNativeModule,
|
|
[a1 != null && !value5 && gameServerEnabled && value37]), 2);
|
|
property = value41[0];
|
|
const property7 = value41[1];
|
|
const GAME_SERVER_PRICING_CHANGE_COACHMARK = DismissibleContent.GAME_SERVER_PRICING_CHANGE_COACHMARK;
|
|
const value42 = property === GAME_SERVER_PRICING_CHANGE_COACHMARK;
|
|
const value43 = available2.useMemo(_fun110452, [a0, a1, value4, value13, value36, value42, value21, value30,
|
|
available, value5, lowestGameCostForGuild, r19]);
|
|
const value45 = Module00057(GuildPowerupsNotificationsDCFNativeModule.useGuildPowerupNotificationDCF(value43 != null), 2);
|
|
return available2.useMemo(_fun110453, [a1, value4, property2, value43, value45[0], value45[1], value13, property3,
|
|
value8, value21, value14, property4, value30, value22, property5, value36, property6, value42, property7]);
|
|
function _fun110450() { // fn#110450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:5478, offset: 0x0237a424, size: 74 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
const guild = GuildStore.getGuild(env0_0);
|
|
const r1 = guild == null ? undefined : guild.features.has(GuildFeatures.GAME_SERVERS);
|
|
return r1 != null && r1;
|
|
}
|
|
|
|
function _fun110451() { // fn#110451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:5611, offset: 0x0237a46e, size: 27 bytes, params: 1, frame: 11
|
|
return GameServerStore.getLowestGameCostForGuild(env0_0);
|
|
}
|
|
|
|
function _fun110452() { // fn#110452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:6896, offset: 0x0237a489, size: 172 bytes, params: 1, frame: 21
|
|
if (require == null) {
|
|
return undefined;
|
|
}
|
|
if (result) {
|
|
return undefined;
|
|
}
|
|
if (result_2) {
|
|
return undefined;
|
|
}
|
|
if (result_5) {
|
|
return undefined;
|
|
}
|
|
if (result_6) {
|
|
return undefined;
|
|
}
|
|
if (result_3) {
|
|
return undefined;
|
|
}
|
|
if (result_4) {
|
|
return undefined;
|
|
}
|
|
const maybeGetLevelUnlockedPopoutDCFBinding = maybeGetLevelUnlockedPopoutDCF;
|
|
const binding = env0_0;
|
|
const value3 = undefined;
|
|
const value4 = maybeGetLevelUnlockedPopoutDCFBinding(binding, require);
|
|
if (value4 != null) {
|
|
return value4;
|
|
}
|
|
const value5 = maybeGetPerkPurchaseablePopoutDCF(env0_0, require, available, env0_7);
|
|
if (value5 != null) {
|
|
return value5;
|
|
}
|
|
return maybeGetGameServerHostingGuildEligiblePopoutDCF(env0_0, env0_5, available, lowestGameCostForGuild) ?? value3;
|
|
}
|
|
|
|
function _fun110453() { // fn#110453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:7284, offset: 0x0237a535, size: 695 bytes, params: 1, frame: 16
|
|
var environment;
|
|
var r2;
|
|
var binding;
|
|
var value2;
|
|
var value3;
|
|
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
|
|
var object;
|
|
var value4;
|
|
const GuildPowerupNotificationPopoutType = (GuildPowerupsNotificationModule).GuildPowerupNotificationPopoutType;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var Object;
|
|
var value10;
|
|
var value11;
|
|
if (require != null) {
|
|
if (result) {
|
|
value11 = environment.__proto__;
|
|
return {type: GuildPowerupNotificationPopoutType.PERKS_AVAILABLE, markAsDismissed: env0_2};
|
|
}
|
|
if (result_2) {
|
|
binding = env0_8;
|
|
value8 = environment.__proto__;
|
|
if (binding === GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING) {
|
|
return {type: GuildPowerupNotificationPopoutType.GAME_SERVER_HOSTING_AVAILABLE,
|
|
markAsDismissed: env0_9};
|
|
}
|
|
var env0_0 = NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[env0_8];
|
|
Object = global.Object;
|
|
value10 = Object.values(require.allPowerups).filter(_fun110454);
|
|
if (value10.length === 0) {
|
|
return undefined;
|
|
}
|
|
return {powerups: value10, type: GuildPowerupNotificationPopoutType.NEW_PERK_AVAILABLE,
|
|
markAsDismissed: env0_9};
|
|
}
|
|
if (result_3) {
|
|
if (env0_11 != null) {
|
|
value7 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.BOOST_TO_UNLOCK, powerup: env0_11,
|
|
markAsDismissed: env0_12};
|
|
} else if (result_4) {
|
|
if (env0_14 != null) {
|
|
value6 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.EXPIRING_PERK, featuredExpiringPowerup: env0_14,
|
|
markAsDismissed: env0_15};
|
|
} else if (result_5) {
|
|
value5 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
|
} else if (result_6) {
|
|
value4 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE,
|
|
markAsDismissed: env0_19};
|
|
} else {
|
|
binding = env0_22;
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
|
r2 = value3;
|
|
} else if (env0_21 != null) {
|
|
object = {};
|
|
copyDataProperties(object, env0_21, binding);
|
|
object['markAsDismissed'] = markAsDismissed_110455;
|
|
r2 = object;
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
}
|
|
} else if (result_5) {
|
|
value5 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
|
} else if (result_6) {
|
|
value4 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE, markAsDismissed: env0_19};
|
|
} else {
|
|
binding = env0_22;
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
|
r2 = value3;
|
|
} else if (env0_21 != null) {
|
|
object = {};
|
|
copyDataProperties(object, env0_21, binding);
|
|
object['markAsDismissed'] = markAsDismissed_110455;
|
|
r2 = object;
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
}
|
|
} else if (result_4) {
|
|
if (env0_14 != null) {
|
|
value6 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.EXPIRING_PERK, featuredExpiringPowerup: env0_14,
|
|
markAsDismissed: env0_15};
|
|
} else if (result_5) {
|
|
value5 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
|
} else if (result_6) {
|
|
value4 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE, markAsDismissed: env0_19};
|
|
} else {
|
|
binding = env0_22;
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
|
r2 = value3;
|
|
} else if (env0_21 != null) {
|
|
object = {};
|
|
copyDataProperties(object, env0_21, binding);
|
|
object['markAsDismissed'] = markAsDismissed_110455;
|
|
r2 = object;
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
}
|
|
} else if (result_5) {
|
|
value5 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
|
} else if (result_6) {
|
|
value4 = environment.__proto__;
|
|
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE, markAsDismissed: env0_19};
|
|
} else {
|
|
binding = env0_22;
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
|
r2 = value3;
|
|
} else if (env0_21 != null) {
|
|
object = {};
|
|
copyDataProperties(object, env0_21, binding);
|
|
object['markAsDismissed'] = markAsDismissed_110455;
|
|
r2 = object;
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
}
|
|
return r2;
|
|
}
|
|
function _fun110454({skuId}) { // fn#110454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:7587, offset: 0x0237a7ec, size: 27 bytes, params: 2, frame: 11
|
|
return env0_0.has(skuId);
|
|
}
|
|
|
|
function markAsDismissed_110455(a0) { // fn#110455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8254, offset: 0x0237a807, size: 34 bytes, params: 2, frame: 12
|
|
env1_23(a0);
|
|
env1_21.markAsDismissed(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useGuildPowerupsNotifications(a0) { // fn#110456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8344, offset: 0x0237a829, size: 207 bytes, params: 2, frame: 22
|
|
const env0_0 = a0;
|
|
const value2 = undefined;
|
|
const value3 = (UseStateFromStoresModule).useStateFromStores([GuildPowerupsNotificationStore],
|
|
_fun110457, [a0]);
|
|
const stateForGuild = (UseStateFromStoresModule).useStateFromStores([GuildPowerupsStore],
|
|
_fun110458);
|
|
const {indicator, showUnread} = useGuildPowerupsNotificationIndicator(a0, stateForGuild ?? value2, value3);
|
|
const value = useGuildPowerupsChannelListPopout(a0, stateForGuild ?? value2);
|
|
if (stateForGuild !== null) {
|
|
if (indicator != null) {
|
|
return {indicator: indicator, showUnread: showUnread, popout: value};
|
|
}
|
|
if (showUnread) {
|
|
return {indicator: indicator, showUnread: showUnread, popout: value};
|
|
}
|
|
if (value != null) {
|
|
return {indicator: indicator, showUnread: showUnread, popout: value};
|
|
}
|
|
}
|
|
return value2;
|
|
function _fun110457() { // fn#110457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8425, offset: 0x0237a8f8, size: 29 bytes, params: 1, frame: 11
|
|
return GuildPowerupsNotificationStore.getNotificationStateForGuild(env0_0);
|
|
}
|
|
|
|
function _fun110458() { // fn#110458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8504, offset: 0x0237a915, size: 27 bytes, params: 1, frame: 11
|
|
return GuildPowerupsStore.getStateForGuild(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function useAutoDismissGuildPowerupsNotifications(a0) { // fn#110459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9416, offset: 0x0237a930, size: 177 bytes, params: 2, frame: 19
|
|
const env0_0 = a0;
|
|
const stateForGuild = (UseStateFromStoresModule).useStateFromStores([GuildPowerupsStore],
|
|
_fun110460);
|
|
const value2 = useGuildPowerupsNotifications(a0);
|
|
ReactModule.useEffect(_fun110461, [a0]);
|
|
ReactModule.useEffect(_fun110462, [value2]);
|
|
ReactModule.useEffect(_fun110463, [a0, stateForGuild]);
|
|
function _fun110460() { // fn#110460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9508, offset: 0x0237a915, size: 27 bytes, params: 1, frame: 11
|
|
return GuildPowerupsStore.getStateForGuild(env0_0);
|
|
}
|
|
|
|
function _fun110461() { // fn#110461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9584, offset: 0x0237a9e1, size: 45 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
(GuildPowerupsActionCreatorsModule).guildPowerupsAckNotification(env0_0);
|
|
}
|
|
|
|
function _fun110462() { // fn#110462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9650, offset: 0x0237aa0e, size: 234 bytes, params: 1, frame: 16
|
|
var type;
|
|
var r3;
|
|
var popout;
|
|
const Set = global.Set;
|
|
const value2 = undefined;
|
|
const {BOOST_TO_UNLOCK,
|
|
EXPIRING_PERK} = (GuildPowerupsNotificationModule).GuildPowerupNotificationPopoutType;
|
|
const set = new Set([BOOST_TO_UNLOCK, EXPIRING_PERK]);
|
|
if (env0_2 == null) {
|
|
type = value2;
|
|
} else {
|
|
popout = env0_2.popout;
|
|
type = popout == null ? value2 : popout.type;
|
|
}
|
|
let r2 = type != null && set.has(env0_2.popout.type);
|
|
r2 = !r2 ? env0_2 == null : r2;
|
|
if (r2) {
|
|
r3 = value2;
|
|
} else {
|
|
popout = env0_2.popout;
|
|
r2 = popout == null;
|
|
r3 = popout;
|
|
}
|
|
if (!r2) {
|
|
r3.markAsDismissed(ContentDismissActionType.AUTO_DISMISS);
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function _fun110463() { // fn#110463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9950, offset: 0x0237aaf8, size: 67 bytes, params: 1, frame: 11
|
|
var environment;
|
|
if (stateForGuild != null) {
|
|
value = environment.__proto__;
|
|
(require(8249) /* metro dependency 8249: GuildBoostingUtils */).ReverseOrderedTiers.forEach(_fun110464);
|
|
}
|
|
function _fun110464(a0) { // fn#110464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:10001, offset: 0x0237ab3b, size: 111 bytes, params: 2, frame: 17
|
|
var value2;
|
|
var moduleValue;
|
|
let property = BOOSTING_TIER_TO_LEVEL_SKU_ID[a0];
|
|
if (property != null) {
|
|
value2 = environment.__proto__;
|
|
if (stateForGuild.unlockedPowerups[property] != null) {
|
|
property = BOOSTING_TIER_TO_LEVEL_UNLOCKED_DC[a0];
|
|
if (property != null) {
|
|
moduleValue = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
|
moduleValue.markContentAsDismissed(property, env1_0, false, ContentDismissActionType.AUTO_DISMISS);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110428, 14607, [57, 31, 1867, 8255, 14608, 8258, 8259, 661, 1376, 8249, 14247, 14598, 8188, 14610,
|
|
1360, 1365, 6857, 632, 8263, 4043, 8254, 14611, 1367, 14609, 14612, 14613, 14615, 14617, 14618, 12307,
|
|
2]) /* metro module 14607, dependencies: [57, 31, 1867, 8255, 14608, 8258, 8259, 661, 1376, 8249, 14247, 14598, 8188, 14610, 1360, 1365, 6857, 632, 8263, 4043, 8254, 14611, 1367, 14609, 14612, 14613, 14615, 14617, 14618, 12307, 2] */;
|