Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
121 lines
6 KiB
TypeScript
121 lines
6 KiB
TypeScript
// Module ID: 17526
|
|
// Function ID: 17527
|
|
// Name: GuildPowerupsManager
|
|
// Dependencies: [1980, 4278, 4461, 4528, 7225, 1983, 4552, 4566, 4568, 4569, 12644, 12648, 16277, 4880, 4567, 12637, 12623, 4537, 2]
|
|
|
|
// Module 17526 (GuildPowerupsManager)
|
|
import FavoritesUtils from "FavoritesUtils" /* 1983 */;
|
|
import BoostToUnlockMobileCoachmarkExperimentDefault from "BoostToUnlockMobileCoachmarkExperiment" /* 12637 */;
|
|
import GuildStore from "GuildStore" /* 1980 */;
|
|
import PermissionStore from "PermissionStore" /* 4278 */;
|
|
import SelectedGuildStore from "SelectedGuildStore" /* 4461 */;
|
|
import GuildPowerupsStore from "GuildPowerupsStore" /* 4528 */;
|
|
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7225 */;
|
|
|
|
require = fn;
|
|
class GuildPowerupsManager extends tmp2 {
|
|
constructor() {
|
|
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
map = new Map();
|
|
applyArgumentsResult.stores = map.set(closure_5, applyArgumentsResult.handleSelectedGuildChange);
|
|
obj1 = { GUILD_POWERUP_ENTITLEMENTS_CREATE: null, GUILD_POWERUP_ENTITLEMENTS_DELETE: null, GUILD_APPLIED_BOOSTS_UPDATE: null };
|
|
handleEntitlementUpdate = applyArgumentsResult.handleEntitlementUpdate;
|
|
obj1.GUILD_POWERUP_ENTITLEMENTS_CREATE = handleEntitlementUpdate.bind(applyArgumentsResult);
|
|
handleEntitlementUpdate2 = applyArgumentsResult.handleEntitlementUpdate;
|
|
obj1.GUILD_POWERUP_ENTITLEMENTS_DELETE = handleEntitlementUpdate2.bind(applyArgumentsResult);
|
|
handleAppliedBoostUpdate = applyArgumentsResult.handleAppliedBoostUpdate;
|
|
obj1.GUILD_APPLIED_BOOSTS_UPDATE = handleAppliedBoostUpdate.bind(applyArgumentsResult);
|
|
applyArgumentsResult.actions = obj1;
|
|
return applyArgumentsResult;
|
|
}
|
|
}
|
|
const prototype = GuildPowerupsManager.prototype;
|
|
prototype["handleSelectedGuildChange"] = function handleSelectedGuildChange() {
|
|
const guildId = SelectedGuildStore.getGuildId();
|
|
if (null != guildId) {
|
|
if (!obj12.isFavoritesGuildId(guildId)) {
|
|
const guild = GuildStore.getGuild(guildId);
|
|
if (null != guild) {
|
|
const GameServerExperiment = tmp10(4552).GameServerExperiment;
|
|
const obj2 = { guildId: guild.id, location: "GuildPowerupsManager" };
|
|
GameServerExperiment.trackExposure(obj2);
|
|
const FileUpload250MbPowerupExperiment = tmp10(4566).FileUpload250MbPowerupExperiment;
|
|
const obj3 = { guildId: guild.id, location: "GuildPowerupsManager" };
|
|
FileUpload250MbPowerupExperiment.trackExposure(obj3);
|
|
const ServerThemeExperiment = tmp10(4568).ServerThemeExperiment;
|
|
const obj4 = { guildId: guild.id, location: "GuildPowerupsManager" };
|
|
ServerThemeExperiment.trackExposure(obj4);
|
|
const ServerThemeApexShadowExperiment = tmp10(4569).ServerThemeApexShadowExperiment;
|
|
const obj5 = { guildId: guild.id, location: "GuildPowerupsManager" };
|
|
const config = ServerThemeApexShadowExperiment.getConfig(obj5);
|
|
if (tmp10Result.getGameServerEnabled(guild.id, "GuildPowerupsManager")) {
|
|
const GameServerPricingExperiment = tmp10(12644).GameServerPricingExperiment;
|
|
const obj = { guildId: guild.id, location: "GuildPowerupsManager" };
|
|
GameServerPricingExperiment.trackExposure(obj);
|
|
}
|
|
tmp10Result = tmp10(4552);
|
|
if (!tmp10Result9.getHasAllocateBoostPermission(PermissionStore, guild)) {
|
|
let isCurrentUserEligibleForPowerupUpsells = tmp10(16277).getIsCurrentUserEligibleForPowerupUpsells();
|
|
let isMobile = tmp10(4880).isMobile;
|
|
if (isMobile) {
|
|
isMobile = tmp10(4568).getServerThemeEnabled(guildId, "GuildPowerupsManager");
|
|
const tmp10Result11 = tmp10(4568);
|
|
}
|
|
if (isMobile) {
|
|
isMobile = tmp10(16277).getIsCurrentUserEligibleForPowerupUpsells();
|
|
const tmp10Result12 = tmp10(16277);
|
|
}
|
|
if (isMobile) {
|
|
isMobile = tmp10(4567).getServerThemeUserEnabled("GuildPowerupsManager");
|
|
const tmp10Result13 = tmp10(4567);
|
|
}
|
|
let showCoachmark = tmp10(4880).isMobile;
|
|
if (showCoachmark) {
|
|
showCoachmark = tmp10(16277).getIsCurrentUserEligibleForPowerupUpsells();
|
|
const tmp10Result14 = tmp10(16277);
|
|
}
|
|
if (showCoachmark) {
|
|
showCoachmark = BoostToUnlockMobileCoachmarkExperimentDefault.getConfig({ location: "GuildPowerupsManager" }).showCoachmark;
|
|
}
|
|
if (tmp10(4880).isMobile) {
|
|
if (!isMobile) {
|
|
isMobile = showCoachmark;
|
|
}
|
|
isCurrentUserEligibleForPowerupUpsells = isMobile;
|
|
}
|
|
const tmp10Result10 = tmp10(16277);
|
|
}
|
|
if (GuildPowerupsStore.shouldFetchCatalogForGuild(guildId)) {
|
|
const powerupCatalogForGuild = tmp10(12623).fetchPowerupCatalogForGuild(guildId);
|
|
const tmp10Result15 = tmp10(12623);
|
|
}
|
|
if (obj9.shouldFetchPowerupsForGuild(guildId)) {
|
|
const guildBoostEntitlements = tmp10(12623).fetchGuildBoostEntitlements(guildId);
|
|
const tmp10Result16 = tmp10(12623);
|
|
}
|
|
obj9 = GuildPowerupsStore;
|
|
tmp10Result9 = tmp10(12648);
|
|
}
|
|
}
|
|
obj12 = FavoritesUtils;
|
|
}
|
|
};
|
|
prototype["handleEntitlementUpdate"] = function handleEntitlementUpdate(guildId) {
|
|
this.refreshGuildPowerups(guildId.guildId);
|
|
};
|
|
prototype["handleAppliedBoostUpdate"] = function handleAppliedBoostUpdate(guildId) {
|
|
this.refreshGuildPowerups(guildId.guildId);
|
|
};
|
|
prototype["refreshGuildPowerups"] = function refreshGuildPowerups(guildId) {
|
|
if (true === obj.getHasAllocateBoostPermission(PermissionStore, GuildStore.getGuild(guildId))) {
|
|
const guildBoostEntitlements = tmp(12623).fetchGuildBoostEntitlements(guildId);
|
|
const tmpResult = tmp(12623);
|
|
const appliedGuildBoostsForGuild = tmp(4537).fetchAppliedGuildBoostsForGuild(guildId, { includeEnded: true });
|
|
const tmpResult2 = tmp(4537);
|
|
}
|
|
};
|
|
const guildPowerupsManager = new GuildPowerupsManager();
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/premium/powerups/GuildPowerupsManager.tsx");
|
|
|
|
export default guildPowerupsManager;
|