2026-09-11 19:12:58 +00:00
|
|
|
// Module ID: 7322
|
|
|
|
|
// Function ID: 7323
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: isAccessibleChannelOrThreadPath
|
2026-09-11 19:12:58 +00:00
|
|
|
// Dependencies: [5, 2013, 7169, 1957, 2015, 1979, 1074, 1964, 7317, 7323, 7332, 7299, 7335, 7337, 7295, 7338, 7339, 4519, 7340, 7297, 1369, 7387, 4619, 4760, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-11 19:12:58 +00:00
|
|
|
// Module 7322 (isAccessibleChannelOrThreadPath)
|
2026-09-10 05:38:07 +00:00
|
|
|
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
|
|
|
|
|
import GatedChannelStore from "GatedChannelStore" /* 2013 */;
|
2026-09-11 19:12:58 +00:00
|
|
|
import GuildOnboardingStore from "GuildOnboardingStore" /* 7169 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 1957 */;
|
|
|
|
|
import GuildRoleStore from "GuildRoleStore" /* 2015 */;
|
|
|
|
|
import GuildStore from "GuildStore" /* 1979 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const require = fn;
|
|
|
|
|
let closure_13 = async function _isAccessibleChannelOrThreadPath(arg0, value) {
|
2026-09-11 19:12:58 +00:00
|
|
|
closure_2 = tmp2;
|
|
|
|
|
({ guildId: closure_130_0, channelId: closure_130_1 } = closure_0);
|
|
|
|
|
await "PX_16";
|
|
|
|
|
if (1 === tmp5) {
|
2026-09-10 05:38:07 +00:00
|
|
|
if (arg0 === 1) {
|
2026-09-11 19:12:58 +00:00
|
|
|
c5 = 3;
|
2026-09-10 05:38:07 +00:00
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
2026-09-11 19:12:58 +00:00
|
|
|
c5 = 3;
|
|
|
|
|
return { value, done: true };
|
2026-09-10 05:38:07 +00:00
|
|
|
} else {
|
2026-09-11 19:12:58 +00:00
|
|
|
const guild = closure_131_8.getGuild(closure_130_0);
|
|
|
|
|
const unsafeMutableRoles = closure_131_7.getUnsafeMutableRoles(closure_130_0);
|
|
|
|
|
if (null == guild) {
|
|
|
|
|
if (closure_130_0 !== closure_131_10) {
|
|
|
|
|
if (closure_130_1 !== closure_131_12.GAME_SHOP) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: false, done: true };
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
}
|
|
|
|
|
if (null == closure_130_1) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: true, done: true };
|
2026-09-02 09:53:35 +00:00
|
|
|
} else {
|
2026-09-11 19:12:58 +00:00
|
|
|
if (closure_131_11(closure_130_1)) {
|
|
|
|
|
if (closure_131_12.VIBEGRATIONS === closure_130_1) {
|
|
|
|
|
let result = null != guild;
|
|
|
|
|
if (result) {
|
|
|
|
|
result = closure_131_0(closure_131_2[8]).canAccessVibegrations(guild, "isAccessibleChannelOrThreadPath");
|
|
|
|
|
closure_131_0(closure_131_2[8]);
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
c5 = 3;
|
2026-09-11 19:12:58 +00:00
|
|
|
return { value: result, done: true };
|
|
|
|
|
} else if (closure_131_12.ROLE_SUBSCRIPTIONS === tmp31) {
|
2026-09-10 05:38:07 +00:00
|
|
|
c5 = 3;
|
2026-09-11 19:12:58 +00:00
|
|
|
return { value: closure_131_0(closure_131_2[9]).areRoleSubscriptionsVisibleInGuild(closure_130_0, unsafeMutableRoles), done: true };
|
|
|
|
|
} else if (closure_131_12.SERVER_MONETIZATION_ONBOARDING === tmp31) {
|
|
|
|
|
let result1 = null != guild;
|
|
|
|
|
if (result1) {
|
|
|
|
|
result1 = closure_131_0(closure_131_2[10]).canUserSeeMonetizationOnboarding(guild);
|
|
|
|
|
closure_131_0(closure_131_2[10]);
|
2026-09-10 05:38:07 +00:00
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
c5 = 3;
|
|
|
|
|
return { value: result1, done: true };
|
|
|
|
|
} else if (closure_131_12.GAME_SHOP === tmp31) {
|
|
|
|
|
let obj14 = guild;
|
|
|
|
|
if (guild == null) {
|
|
|
|
|
obj14 = { id: closure_130_0, type: "id-only" };
|
2026-09-10 05:38:07 +00:00
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_0(closure_131_2[11]).hasSocialLayerStorefront(obj14), done: true };
|
|
|
|
|
} else if (closure_131_12.GUILD_SHOP === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_0(closure_131_2[12]).isGuildShopVisibleInGuild(guild, unsafeMutableRoles), done: true };
|
|
|
|
|
} else if (closure_131_12.MEMBER_APPLICATIONS === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_0(closure_131_2[13]).canReviewGuildMemberApplications(closure_130_0), done: true };
|
|
|
|
|
} else if (closure_131_12.GUILD_HOME === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_0(closure_131_2[14]).canSeeOnboardingHome(closure_130_0), done: true };
|
|
|
|
|
} else if (closure_131_12.CHANNEL_BROWSER === tmp31) {
|
|
|
|
|
let hasItem = null != guild;
|
|
|
|
|
if (hasItem) {
|
|
|
|
|
const features3 = guild.features;
|
|
|
|
|
hasItem = features3.has(closure_131_9.COMMUNITY);
|
|
|
|
|
}
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: hasItem, done: true };
|
|
|
|
|
} else if (closure_131_12.GUILD_ONBOARDING === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_5.shouldShowOnboarding(closure_130_0), done: true };
|
|
|
|
|
} else if (closure_131_12.CUSTOMIZE_COMMUNITY === tmp31) {
|
|
|
|
|
let hasItem1 = null != guild;
|
|
|
|
|
if (hasItem1) {
|
|
|
|
|
const features2 = guild.features;
|
|
|
|
|
hasItem1 = features2.has(closure_131_9.COMMUNITY);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
c5 = 3;
|
2026-09-11 19:12:58 +00:00
|
|
|
return { value: hasItem1, done: true };
|
|
|
|
|
} else if (closure_131_12.MEMBER_SAFETY === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_0(closure_131_2[15]).canAccessMemberSafetyPage(closure_130_0), done: true };
|
|
|
|
|
} else if (closure_131_12.GUILD_BOOSTS === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: true, done: true };
|
|
|
|
|
} else if (closure_131_12.REPORT_TO_MOD === tmp31) {
|
|
|
|
|
let tmp78 = null != guild;
|
|
|
|
|
if (tmp78) {
|
|
|
|
|
tmp78 = closure_131_1(closure_131_2[16])(guild);
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
c5 = 3;
|
2026-09-11 19:12:58 +00:00
|
|
|
return { value: tmp78, done: true };
|
|
|
|
|
} else if (closure_131_12.GAME_SERVERS === tmp31) {
|
|
|
|
|
let gameServerEnabled = closure_131_0(closure_131_2[17]).getGameServerEnabled(closure_130_0, "isAccessibleChannelOrThreadPath");
|
|
|
|
|
if (gameServerEnabled) {
|
|
|
|
|
gameServerEnabled = null != guild;
|
|
|
|
|
}
|
|
|
|
|
if (gameServerEnabled) {
|
|
|
|
|
const features = guild.features;
|
|
|
|
|
gameServerEnabled = features.has(closure_131_9.GAME_SERVERS);
|
|
|
|
|
}
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: gameServerEnabled, done: true };
|
|
|
|
|
} else if (closure_131_12.GUILD_OFFICIAL_MESSAGES === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_0(closure_131_2[18]).isGuildOfficialMessagesEnabled(guild, "isAccessibleChannelOrThreadPath"), done: true };
|
|
|
|
|
} else if (closure_131_12.GUILD_SPACE === tmp31) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value: closure_131_0(closure_131_2[19]).canUseGuildSpace(guild, "isAccessibleChannelOrThreadPath"), done: true };
|
2026-09-10 05:38:07 +00:00
|
|
|
} else {
|
2026-09-11 19:12:58 +00:00
|
|
|
closure_131_0(closure_131_2[20]).assertNever(closure_130_1);
|
|
|
|
|
closure_131_0(closure_131_2[20]);
|
2026-09-01 10:26:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
let channel2 = closure_131_6.getChannel(closure_130_1);
|
|
|
|
|
let tmp15 = null != channel2;
|
|
|
|
|
if (!tmp15) {
|
|
|
|
|
c4 = 2;
|
|
|
|
|
c5 = 1;
|
|
|
|
|
return { value: closure_131_1(closure_131_2[21]).loadThread(closure_130_1), done: false };
|
2026-09-10 05:38:07 +00:00
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (2 === tmp5) {
|
|
|
|
|
if (arg0 === 1) {
|
2026-09-10 05:38:07 +00:00
|
|
|
c5 = 3;
|
2026-09-11 19:12:58 +00:00
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value, done: true };
|
|
|
|
|
} else {
|
|
|
|
|
const channel = closure_131_6.getChannel(closure_130_1);
|
|
|
|
|
channel2 = channel;
|
|
|
|
|
let tmp11 = null == channel;
|
|
|
|
|
if (tmp11) {
|
|
|
|
|
tmp11 = closure_130_0 === closure_131_10;
|
|
|
|
|
}
|
|
|
|
|
if (tmp11) {
|
|
|
|
|
c4 = 3;
|
|
|
|
|
c5 = 1;
|
|
|
|
|
return { value: closure_131_1(closure_131_2[22]).openChannel(closure_130_1), done: false };
|
|
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
} else if (arg0 === 1) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
return { value, done: true };
|
|
|
|
|
} else {
|
|
|
|
|
channel2 = value;
|
|
|
|
|
}
|
|
|
|
|
tmp15 = null != channel2;
|
|
|
|
|
}
|
|
|
|
|
if (tmp15) {
|
|
|
|
|
let canViewChannelResult = closure_131_0(closure_131_2[23]).canViewChannel(channel2);
|
|
|
|
|
if (!canViewChannelResult) {
|
|
|
|
|
canViewChannelResult = closure_131_4.isChannelGatedAndVisible(closure_130_0, closure_130_1);
|
2026-09-10 05:38:07 +00:00
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
tmp15 = canViewChannelResult;
|
|
|
|
|
closure_131_0(closure_131_2[23]);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-11 19:12:58 +00:00
|
|
|
return tmp15;
|
2026-09-10 05:38:07 +00:00
|
|
|
};
|
|
|
|
|
const Constants = fn(1074);
|
|
|
|
|
({ GuildFeatures: closure_9, ME: c10 } = Constants);
|
|
|
|
|
const ChannelConstants = fn(1964);
|
|
|
|
|
({ isStaticChannelRoute: closure_11, StaticChannelRoute: closure_12 } = ChannelConstants);
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
let result = size.fileFinishedImporting("modules/links/isAccessibleChannelOrThreadPath.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function isAccessibleChannelOrThreadPath() {
|
2026-07-29 08:29:29 +00:00
|
|
|
const self = this;
|
2026-09-10 05:38:07 +00:00
|
|
|
const apply = closure_13.apply;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (typeof apply === "unknown") {
|
|
|
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
|
|
|
} else {
|
|
|
|
|
applyArgumentsResult = apply(self, arguments);
|
|
|
|
|
}
|
|
|
|
|
return applyArgumentsResult;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|