Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
932 lines
34 KiB
TypeScript
932 lines
34 KiB
TypeScript
// Module ID: 5109
|
|
// Function ID: 5110
|
|
// Name: utils/ChannelUtils
|
|
// Dependencies: [1957, 2021, 1979, 1371, 1074, 5110, 5111, 5112, 5113, 5114, 5115, 5116, 5117, 5118, 5119, 5120, 5121, 5122, 5123, 5124, 5125, 5126, 5127, 5128, 5129, 5130, 5131, 5132, 5133, 5134, 5135, 5136, 5137, 5138, 5141, 5142, 5143, 5144, 5145, 5146, 5147, 5148, 5149, 5150, 5151, 5152, 5153, 5154, 5155, 5156, 5157, 5158, 5159, 5160, 5161, 5162, 5163, 5164, 5165, 5166, 5167, 5168, 5169, 5170, 5171, 5172, 5173, 5174, 5175, 5176, 5177, 5178, 5179, 5180, 5181, 5182, 5183, 5184, 5185, 5186, 5187, 2]
|
|
// Exports: getChannelIconComponentWithGuild, getChannelIconWithGuild, getChannelMentionIcon, getSimpleChannelIcon, getSimpleChannelIconComponent, getThreadChannelIcon
|
|
|
|
// Module 5109 (utils/ChannelUtils)
|
|
import _modDef5110 from "module_5110" /* 5110 */;
|
|
import _modDef5111 from "module_5111" /* 5111 */;
|
|
import _modDef5112 from "module_5112" /* 5112 */;
|
|
import _modDef5113 from "module_5113" /* 5113 */;
|
|
import _modDef5114 from "module_5114" /* 5114 */;
|
|
import _modDef5115 from "module_5115" /* 5115 */;
|
|
import _modDef5116 from "module_5116" /* 5116 */;
|
|
import _modDef5117 from "module_5117" /* 5117 */;
|
|
import _modDef5118 from "module_5118" /* 5118 */;
|
|
import _modDef5119 from "module_5119" /* 5119 */;
|
|
import _modDef5120 from "module_5120" /* 5120 */;
|
|
import _modDef5121 from "module_5121" /* 5121 */;
|
|
import _modDef5122 from "module_5122" /* 5122 */;
|
|
import _modDef5123 from "module_5123" /* 5123 */;
|
|
import _modDef5124 from "module_5124" /* 5124 */;
|
|
import _modDef5125 from "module_5125" /* 5125 */;
|
|
import _modDef5126 from "module_5126" /* 5126 */;
|
|
import _modDef5127 from "module_5127" /* 5127 */;
|
|
import _modDef5128 from "module_5128" /* 5128 */;
|
|
import _modDef5129 from "module_5129" /* 5129 */;
|
|
import _modDef5130 from "module_5130" /* 5130 */;
|
|
import _modDef5131 from "module_5131" /* 5131 */;
|
|
import _modDef5132 from "module_5132" /* 5132 */;
|
|
import _modDef5133 from "module_5133" /* 5133 */;
|
|
import _modDef5134 from "module_5134" /* 5134 */;
|
|
import _modDef5135 from "module_5135" /* 5135 */;
|
|
import _modDef5136 from "module_5136" /* 5136 */;
|
|
import _modDef5137 from "module_5137" /* 5137 */;
|
|
import useShowMemberVerificationGate from "useShowMemberVerificationGate" /* 5138 */;
|
|
import _modDef5141 from "module_5141" /* 5141 */;
|
|
import _modDef5142 from "module_5142" /* 5142 */;
|
|
import isRoleRequiredDefault from "isRoleRequired" /* 5143 */;
|
|
import _modDef5149 from "module_5149" /* 5149 */;
|
|
import ChannelStore from "ChannelStore" /* 1957 */;
|
|
import GuildMemberStore from "GuildMemberStore" /* 2021 */;
|
|
import GuildStore from "GuildStore" /* 1979 */;
|
|
import UserStore from "UserStore" /* 1371 */;
|
|
|
|
const ExperimentalLfgIcon = tmp(5151);
|
|
const ChatIcon2 = tmp(5152);
|
|
const ThreadLockIcon = tmp(5153);
|
|
const ThreadIcon2 = tmp(5154);
|
|
const FolderIcon = tmp(5155);
|
|
const BookCheckIcon = tmp(5156);
|
|
const TextWarningIcon2 = tmp(5157);
|
|
const TextSpoilerIcon2 = tmp(5158);
|
|
const TextLockIcon2 = tmp(5159);
|
|
const TextControllerIcon = tmp(5160);
|
|
const TextIcon2 = tmp(5161);
|
|
const ImageWarningIcon2 = tmp(5162);
|
|
const ForumWarningIcon2 = tmp(5163);
|
|
const ForumSpoilerIcon3 = tmp(5164);
|
|
const ExperimentalLfgLockIcon = tmp(5165);
|
|
const ImageLockIcon = tmp(5166);
|
|
const ForumLockIcon2 = tmp(5167);
|
|
const ImageIcon2 = tmp(5168);
|
|
const ForumIcon2 = tmp(5169);
|
|
const GroupIcon = tmp(5170);
|
|
const AtIcon = tmp(5171);
|
|
const AnnouncementsWarningIcon2 = tmp(5172);
|
|
const AnnouncementsSpoilerIcon2 = tmp(5173);
|
|
const AnnouncementsLockIcon = tmp(5174);
|
|
const AnnouncementsIcon2 = tmp(5175);
|
|
const LockIcon3 = tmp(5176);
|
|
const StageLockIcon2 = tmp(5177);
|
|
const StageIcon2 = tmp(5178);
|
|
const VoiceLockIcon3 = tmp(5179);
|
|
const VoiceWarningIcon2 = tmp(5180);
|
|
const VoiceNormalSpoilerIcon = tmp(5181);
|
|
const VoiceNormalIcon2 = tmp(5182);
|
|
const HubIcon = tmp(5183);
|
|
const AppsWarningIcon = tmp(5184);
|
|
const AppsSpoilerIcon2 = tmp(5185);
|
|
const AppsLockIcon = tmp(5186);
|
|
const AppsIcon2 = tmp(5187);
|
|
require = fn;
|
|
function getChannelIcon(channel, ignoreTraits) {
|
|
let obj = ignoreTraits;
|
|
if (ignoreTraits == null) {
|
|
obj = {};
|
|
}
|
|
({ isRulesChannel, locked } = obj);
|
|
const items = [GuildStore, UserStore, GuildMemberStore];
|
|
const result = useShowMemberVerificationGate.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
channel = null;
|
|
if (null != channel.parent_id) {
|
|
channel = ChannelStore.getChannel(channel.parent_id);
|
|
}
|
|
let isGameInvitesChannelResult;
|
|
if (channel != null) {
|
|
isGameInvitesChannelResult = channel.isGameInvitesChannel();
|
|
}
|
|
if (true === isGameInvitesChannelResult) {
|
|
let tmp97 = _modDef5141;
|
|
} else {
|
|
tmp97 = _modDef5129;
|
|
}
|
|
return tmp97;
|
|
} else {
|
|
const isMediaChannelResult = channel.isMediaChannel();
|
|
const isNSFWResult = channel.isNSFW();
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD !== type) {
|
|
if (tmp5.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp5.PUBLIC_THREAD !== type) {
|
|
if (tmp5.MEDIA_THREAD !== type) {
|
|
if (tmp5.GUILD_CATEGORY === type) {
|
|
return _modDef5112;
|
|
} else if (tmp5.GUILD_TEXT === type) {
|
|
if (isRulesChannel) {
|
|
let tmp79 = _modDef5142;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
tmp79 = _modDef5125;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
_modDef5126;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
tmp82(5135);
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
let tmp82Result2 = tmp82(5144);
|
|
} else {
|
|
tmp82Result2 = tmp82(5113);
|
|
}
|
|
}
|
|
return tmp79;
|
|
} else if (tmp5.GUILD_FORUM === type) {
|
|
if (isRulesChannel) {
|
|
let tmp66 = _modDef5142;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
tmp66 = importDefault(isMediaChannelResult ? 5134 : 5131);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
_modDef5132;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
if (channel.isGameInvitesChannel()) {
|
|
let tmp69Result = tmp69(5145);
|
|
} else {
|
|
tmp69Result = tmp69(isMediaChannelResult ? 5146 : 5147);
|
|
}
|
|
}
|
|
}
|
|
if (channel.isGameInvitesChannel()) {
|
|
let tmp69Result2 = tmp69(5141);
|
|
} else {
|
|
tmp69Result2 = tmp69(isMediaChannelResult ? 5133 : 5130);
|
|
}
|
|
}
|
|
return tmp66;
|
|
} else if (tmp5.GUILD_MEDIA === type) {
|
|
if (isRulesChannel) {
|
|
let tmp56 = _modDef5142;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
tmp56 = _modDef5134;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
_modDef5132;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let tmp59Result = tmp59(5146);
|
|
}
|
|
}
|
|
tmp59Result = tmp59(5133);
|
|
}
|
|
return tmp56;
|
|
} else if (tmp5.GROUP_DM === type) {
|
|
return _modDef5115;
|
|
} else if (tmp5.DM === type) {
|
|
return _modDef5116;
|
|
} else if (tmp5.GUILD_ANNOUNCEMENT === type) {
|
|
if (isRulesChannel) {
|
|
let tmp43 = _modDef5142;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
tmp43 = _modDef5127;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
_modDef5128;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let tmp46Result = tmp46(5148);
|
|
}
|
|
}
|
|
tmp46Result = tmp46(5117);
|
|
}
|
|
return tmp43;
|
|
} else if (tmp5.GUILD_STAGE_VOICE === type) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let tmp32Result = tmp32(5149);
|
|
} else {
|
|
tmp32Result = tmp32(5124);
|
|
}
|
|
return tmp32Result;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
_modDef5149;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let tmp36Result = tmp36(5124);
|
|
}
|
|
}
|
|
tmp36Result = tmp36(5118);
|
|
} else if (tmp5.GUILD_VOICE === type) {
|
|
if (obj.textFocused) {
|
|
let tmp17Result = _modDef5129;
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
tmp17Result = tmp17(5149);
|
|
} else {
|
|
tmp17Result = tmp17(5121);
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
_modDef5149;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
tmp21(5121);
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
tmp21(5122);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let tmp21Result4 = tmp21(5123);
|
|
}
|
|
}
|
|
tmp21Result4 = tmp21(5119);
|
|
}
|
|
return tmp17Result;
|
|
} else if (tmp5.GUILD_DIRECTORY === type) {
|
|
return _modDef5120;
|
|
} else if (tmp5.GUILD_APP === type) {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits20;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits20 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits20) {
|
|
return _modDef5136;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits21;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits21 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits21) {
|
|
_modDef5137;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits22;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits22 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits22) {
|
|
let tmp10Result = tmp10(5150);
|
|
}
|
|
}
|
|
tmp10Result = tmp10(5114);
|
|
} else {
|
|
if (tmp5.GUILD_STORE !== type) {
|
|
if (tmp5.GUILD_SPACE !== type) {
|
|
const UNKNOWN = tmp5.UNKNOWN;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type2 = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type2) {
|
|
let tmp90 = _modDef5110;
|
|
} else {
|
|
if (tmp5.ANNOUNCEMENT_THREAD !== type2) {
|
|
if (tmp5.PUBLIC_THREAD !== type2) {
|
|
tmp90 = null;
|
|
}
|
|
}
|
|
tmp90 = _modDef5111;
|
|
}
|
|
return tmp90;
|
|
}
|
|
}
|
|
function getChannelIconComponent(channel, ignoreTraits) {
|
|
let obj = ignoreTraits;
|
|
if (ignoreTraits == null) {
|
|
obj = {};
|
|
}
|
|
({ isRulesChannel, locked } = obj);
|
|
const items = [GuildStore, UserStore, GuildMemberStore];
|
|
const result = useShowMemberVerificationGate.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
channel = null;
|
|
if (null != channel.parent_id) {
|
|
channel = ChannelStore.getChannel(channel.parent_id);
|
|
}
|
|
let isGameInvitesChannelResult;
|
|
if (channel != null) {
|
|
isGameInvitesChannelResult = channel.isGameInvitesChannel();
|
|
}
|
|
if (true === isGameInvitesChannelResult) {
|
|
let ChatIcon = ExperimentalLfgIcon.ExperimentalLfgIcon;
|
|
} else {
|
|
ChatIcon = ChatIcon2.ChatIcon;
|
|
}
|
|
return ChatIcon;
|
|
} else {
|
|
const isMediaChannelResult = channel.isMediaChannel();
|
|
const isNSFWResult = channel.isNSFW();
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
return ThreadLockIcon.ThreadLockIcon;
|
|
} else {
|
|
if (tmp6.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp6.PUBLIC_THREAD !== type) {
|
|
if (tmp6.MEDIA_THREAD !== type) {
|
|
if (tmp6.GUILD_CATEGORY === type) {
|
|
return FolderIcon.FolderIcon;
|
|
} else if (tmp6.GUILD_TEXT === type) {
|
|
if (isRulesChannel) {
|
|
let TextWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
TextWarningIcon = TextWarningIcon2.TextWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
const TextSpoilerIcon = TextSpoilerIcon2.TextSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
const TextLockIcon = TextLockIcon2.TextLockIcon;
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
let TextIcon = TextControllerIcon.TextControllerIcon;
|
|
} else {
|
|
TextIcon = TextIcon2.TextIcon;
|
|
}
|
|
}
|
|
return TextWarningIcon;
|
|
} else if (tmp6.GUILD_FORUM === type) {
|
|
if (isRulesChannel) {
|
|
let ForumWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
if (isMediaChannelResult) {
|
|
ForumWarningIcon = ImageWarningIcon2.ImageWarningIcon;
|
|
} else {
|
|
ForumWarningIcon = ForumWarningIcon2.ForumWarningIcon;
|
|
}
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
const ForumSpoilerIcon2 = ForumSpoilerIcon3.ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
if (channel.isGameInvitesChannel()) {
|
|
let ForumLockIcon = ExperimentalLfgLockIcon.ExperimentalLfgLockIcon;
|
|
} else if (isMediaChannelResult) {
|
|
ForumLockIcon = ImageLockIcon.ImageLockIcon;
|
|
} else {
|
|
ForumLockIcon = ForumLockIcon2.ForumLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (channel.isGameInvitesChannel()) {
|
|
let ForumIcon = ExperimentalLfgIcon.ExperimentalLfgIcon;
|
|
} else if (isMediaChannelResult) {
|
|
ForumIcon = ImageIcon2.ImageIcon;
|
|
} else {
|
|
ForumIcon = ForumIcon2.ForumIcon;
|
|
}
|
|
}
|
|
return ForumWarningIcon;
|
|
} else if (tmp6.GUILD_MEDIA === type) {
|
|
if (isRulesChannel) {
|
|
let ImageWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
ImageWarningIcon = ImageWarningIcon2.ImageWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
const ForumSpoilerIcon = ForumSpoilerIcon3.ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let ImageIcon = ImageLockIcon.ImageLockIcon;
|
|
}
|
|
}
|
|
ImageIcon = ImageIcon2.ImageIcon;
|
|
}
|
|
return ImageWarningIcon;
|
|
} else if (tmp6.GROUP_DM === type) {
|
|
return GroupIcon.GroupIcon;
|
|
} else if (tmp6.DM === type) {
|
|
return AtIcon.AtIcon;
|
|
} else if (tmp6.GUILD_ANNOUNCEMENT === type) {
|
|
if (isRulesChannel) {
|
|
let AnnouncementsWarningIcon = BookCheckIcon.BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
AnnouncementsWarningIcon = AnnouncementsWarningIcon2.AnnouncementsWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
const AnnouncementsSpoilerIcon = AnnouncementsSpoilerIcon2.AnnouncementsSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let AnnouncementsIcon = AnnouncementsLockIcon.AnnouncementsLockIcon;
|
|
}
|
|
}
|
|
AnnouncementsIcon = AnnouncementsIcon2.AnnouncementsIcon;
|
|
}
|
|
return AnnouncementsWarningIcon;
|
|
} else if (tmp6.GUILD_STAGE_VOICE === type) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let StageLockIcon = LockIcon3.LockIcon;
|
|
} else {
|
|
StageLockIcon = StageLockIcon2.StageLockIcon;
|
|
}
|
|
return StageLockIcon;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
const LockIcon2 = LockIcon3.LockIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let StageIcon = StageLockIcon2.StageLockIcon;
|
|
}
|
|
}
|
|
StageIcon = StageIcon2.StageIcon;
|
|
} else if (tmp6.GUILD_VOICE === type) {
|
|
if (obj.textFocused) {
|
|
let VoiceLockIcon = ChatIcon2.ChatIcon;
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (isRoleRequiredDefault(channel)) {
|
|
VoiceLockIcon = LockIcon3.LockIcon;
|
|
} else {
|
|
VoiceLockIcon = VoiceLockIcon3.VoiceLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
const LockIcon = LockIcon3.LockIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
const VoiceLockIcon2 = VoiceLockIcon3.VoiceLockIcon;
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
const VoiceWarningIcon = VoiceWarningIcon2.VoiceWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let VoiceNormalIcon = VoiceNormalSpoilerIcon.VoiceNormalSpoilerIcon;
|
|
}
|
|
}
|
|
VoiceNormalIcon = VoiceNormalIcon2.VoiceNormalIcon;
|
|
}
|
|
return VoiceLockIcon;
|
|
} else if (tmp6.GUILD_DIRECTORY === type) {
|
|
return HubIcon.HubIcon;
|
|
} else if (tmp6.GUILD_APP === type) {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits20;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits20 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits20) {
|
|
return AppsWarningIcon.AppsWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits21;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits21 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits21) {
|
|
const AppsSpoilerIcon = AppsSpoilerIcon2.AppsSpoilerIcon;
|
|
}
|
|
}
|
|
if (isRoleRequiredDefault(channel)) {
|
|
let ignoreTraits22;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits22 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits22) {
|
|
let AppsIcon = AppsLockIcon.AppsLockIcon;
|
|
}
|
|
}
|
|
AppsIcon = AppsIcon2.AppsIcon;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return ThreadIcon2.ThreadIcon;
|
|
}
|
|
}
|
|
}
|
|
const ChannelTypes = fn(1074).ChannelTypes;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("utils/native/ChannelUtils.tsx");
|
|
|
|
export const getThreadChannelIcon = function getThreadChannelIcon(arg0) {
|
|
if (ChannelTypes.PRIVATE_THREAD === arg0) {
|
|
return _modDef5110;
|
|
} else {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== arg0) {
|
|
if (tmp.PUBLIC_THREAD !== arg0) {
|
|
if (tmp.MEDIA_THREAD !== arg0) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
return _modDef5111;
|
|
}
|
|
};
|
|
export const getSimpleChannelIcon = function getSimpleChannelIcon(channel) {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD !== type) {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp.PUBLIC_THREAD !== type) {
|
|
if (tmp.MEDIA_THREAD !== type) {
|
|
if (tmp.GUILD_CATEGORY === type) {
|
|
return _modDef5112;
|
|
} else {
|
|
if (tmp.GUILD_TEXT !== type) {
|
|
if (tmp.GUILD_FORUM !== type) {
|
|
if (tmp.GUILD_MEDIA !== type) {
|
|
if (tmp.GUILD_APP === type) {
|
|
return _modDef5114;
|
|
} else if (tmp.GROUP_DM === type) {
|
|
return _modDef5115;
|
|
} else if (tmp.DM === type) {
|
|
return _modDef5116;
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type) {
|
|
return _modDef5117;
|
|
} else if (tmp.GUILD_STAGE_VOICE === type) {
|
|
return _modDef5118;
|
|
} else if (tmp.GUILD_VOICE === type) {
|
|
return _modDef5119;
|
|
} else if (tmp.GUILD_DIRECTORY === type) {
|
|
return _modDef5120;
|
|
} else {
|
|
if (tmp.GUILD_STORE !== type) {
|
|
if (tmp.GUILD_SPACE !== type) {
|
|
const UNKNOWN = tmp.UNKNOWN;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return _modDef5113;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type2 = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type2) {
|
|
let tmp21 = _modDef5110;
|
|
} else {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type2) {
|
|
if (tmp.PUBLIC_THREAD !== type2) {
|
|
tmp21 = null;
|
|
}
|
|
}
|
|
tmp21 = _modDef5111;
|
|
}
|
|
return tmp21;
|
|
};
|
|
export const getChannelIconWithGuild = function getChannelIconWithGuild(channel, guild) {
|
|
let rulesChannelId;
|
|
if (guild != null) {
|
|
rulesChannelId = guild.rulesChannelId;
|
|
}
|
|
return getChannelIcon(channel, { isRulesChannel: rulesChannelId === channel.id });
|
|
};
|
|
export const getChannelMentionIcon = function getChannelMentionIcon(iconType) {
|
|
switch (iconType) {
|
|
case "voice":
|
|
return _modDef5119;
|
|
case "voice-locked":
|
|
return _modDef5121;
|
|
case "voice-nsfw":
|
|
return _modDef5122;
|
|
case "voice-spoiler":
|
|
return _modDef5123;
|
|
case "stage":
|
|
return _modDef5118;
|
|
case "stage-locked":
|
|
return _modDef5124;
|
|
case "text":
|
|
return _modDef5113;
|
|
case "text-nsfw":
|
|
return _modDef5125;
|
|
case "text-spoiler":
|
|
return _modDef5126;
|
|
case "announcement":
|
|
return _modDef5117;
|
|
case "announcement-nsfw":
|
|
return _modDef5127;
|
|
case "announcement-spoiler":
|
|
return _modDef5128;
|
|
case "thread":
|
|
return _modDef5111;
|
|
case "post":
|
|
let tmp21 = _modDef5129;
|
|
return tmp21;
|
|
case "message":
|
|
tmp21 = _modDef5129;
|
|
return tmp21;
|
|
case "forum":
|
|
return _modDef5130;
|
|
case "forum-nsfw":
|
|
return _modDef5131;
|
|
case "forum-spoiler":
|
|
return _modDef5132;
|
|
case "media":
|
|
return _modDef5133;
|
|
case "media-nsfw":
|
|
return _modDef5134;
|
|
case "locked":
|
|
return _modDef5135;
|
|
case "app":
|
|
return _modDef5114;
|
|
case "app-nsfw":
|
|
return _modDef5136;
|
|
case "app-spoiler":
|
|
return _modDef5137;
|
|
default:
|
|
return null;
|
|
}
|
|
};
|
|
export { getChannelIcon };
|
|
export const getChannelIconComponentWithGuild = function getChannelIconComponentWithGuild(channel, guild) {
|
|
let rulesChannelId;
|
|
if (guild != null) {
|
|
rulesChannelId = guild.rulesChannelId;
|
|
}
|
|
return getChannelIconComponent(channel, { isRulesChannel: rulesChannelId === channel.id });
|
|
};
|
|
export { getChannelIconComponent };
|
|
export const getSimpleChannelIconComponent = function getSimpleChannelIconComponent(channel) {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD !== type) {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp.PUBLIC_THREAD !== type) {
|
|
if (tmp.MEDIA_THREAD !== type) {
|
|
if (tmp.GUILD_CATEGORY === type) {
|
|
return FolderIcon.FolderIcon;
|
|
} else if (tmp.GUILD_TEXT === type) {
|
|
return TextIcon2.TextIcon;
|
|
} else if (tmp.GUILD_FORUM === type) {
|
|
return ForumIcon2.ForumIcon;
|
|
} else if (tmp.GUILD_MEDIA === type) {
|
|
return ImageIcon2.ImageIcon;
|
|
} else if (tmp.GROUP_DM === type) {
|
|
return GroupIcon.GroupIcon;
|
|
} else if (tmp.DM === type) {
|
|
return AtIcon.AtIcon;
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type) {
|
|
return AnnouncementsIcon2.AnnouncementsIcon;
|
|
} else if (tmp.GUILD_STAGE_VOICE === type) {
|
|
return StageIcon2.StageIcon;
|
|
} else if (tmp.GUILD_VOICE === type) {
|
|
return VoiceNormalIcon2.VoiceNormalIcon;
|
|
} else if (tmp.GUILD_DIRECTORY === type) {
|
|
return HubIcon.HubIcon;
|
|
} else if (tmp.GUILD_APP === type) {
|
|
return AppsIcon2.AppsIcon;
|
|
} else {
|
|
if (tmp.GUILD_STORE !== type) {
|
|
if (tmp.GUILD_SPACE !== type) {
|
|
const UNKNOWN = tmp.UNKNOWN;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (channel.isForumPost()) {
|
|
let ThreadIcon = tmp25(5152).ChatIcon;
|
|
} else {
|
|
ThreadIcon = tmp25(5154).ThreadIcon;
|
|
}
|
|
return ThreadIcon;
|
|
};
|