decord/source/modules/messages/getEmojiPopoutMessage.tsx

175 lines
6.5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 9446
// Function ID: 9447
2026-07-20 16:05:17 +00:00
// Name: EmojiPopoutType
2026-08-24 06:08:38 +00:00
// Dependencies: [7227, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: getEmojiPopoutData
2026-08-24 06:08:38 +00:00
// Module 9446 (EmojiPopoutType)
import set from "set" /* 2 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import getEmojiSourceData from "getEmojiSourceData" /* 7227 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const EmojiSourceDataTypes = getEmojiSourceData.EmojiSourceDataTypes;
2026-07-20 16:05:17 +00:00
let closure_3 = { DEFAULT: "Custom Emoji Popout", CROSS_SERVER: "Custom Emoji Popout (Cross-Server)", UPSELL_CURRENT_SERVER_JOINED: "Custom Emoji Popout (Upsell Joined Current-Server)", UPSELL_CROSS_SERVER_JOINED: "Custom Emoji Popout (Upsell Joined Cross-Server)", UPSELL_CROSS_SERVER_JOINABLE: "Custom Emoji Popout (Upsell Not-Joined Cross-Server)", UPSELL_CROSS_SERVER_UNJOINABLE: "Custom Emoji Popout (Soft Upsell)" };
2026-07-23 10:11:24 +00:00
let obj = { GET_PREMIUM: "GET_PREMIUM", JOIN_GUILD: "JOIN_GUILD", UNAVAILABLE: "UNAVAILABLE" };
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/messages/getEmojiPopoutMessage.tsx");
2026-07-20 16:05:17 +00:00
export const EmojiPopoutType = obj;
export const getEmojiPopoutData = function getEmojiPopoutData(sourceType) {
({ expressionSourceApplication, hasJoinedEmojiSourceGuild, isUnusableRoleSubscriptionEmoji, isDiscoverable, emojiComesFromCurrentGuild, userIsRoleSubscriber, shouldHideRoleSubscriptionCTA } = sourceType);
({ isPremium, isRoleSubscriptionEmoji, onOpenPremiumSettings } = sourceType);
if (sourceType.sourceType === EmojiSourceDataTypes.APPLICATION) {
if (null != expressionSourceApplication) {
2026-08-24 06:08:38 +00:00
const intl8 = getSystemLocale.intl;
obj = { appName: null };
2026-07-29 08:29:29 +00:00
obj[0] = expressionSourceApplication.name;
2026-08-24 06:08:38 +00:00
let formatToPlainStringResult = intl8.formatToPlainString(getSystemLocale.t.uERlTd, obj);
2026-07-29 08:29:29 +00:00
let tmp6 = require;
2026-07-20 16:05:17 +00:00
}
({ isPremium: isPremium2, hasJoinedEmojiSourceGuild: hasJoinedEmojiSourceGuild2, isDiscoverable: isDiscoverable2 } = sourceType);
({ isUnusableRoleSubscriptionEmoji: isUnusableRoleSubscriptionEmoji2, emojiComesFromCurrentGuild: emojiComesFromCurrentGuild2 } = sourceType);
if (isPremium2) {
if (!hasJoinedEmojiSourceGuild2) {
if (isDiscoverable2) {
2026-07-29 08:29:29 +00:00
let DEFAULT = tmp57.CROSS_SERVER;
2026-07-20 16:05:17 +00:00
}
({ isPremium: isPremium3, hasJoinedEmojiSourceGuild: hasJoinedEmojiSourceGuild3 } = sourceType);
let isDiscoverable3 = !hasJoinedEmojiSourceGuild3;
2026-07-29 08:29:29 +00:00
if (!hasJoinedEmojiSourceGuild3) {
2026-07-20 16:05:17 +00:00
isDiscoverable3 = sourceType.isDiscoverable;
}
if (isPremium3) {
if (isDiscoverable3) {
2026-07-29 08:29:29 +00:00
obj = { type: null, text: null, description: null };
obj[0] = obj.JOIN_GUILD;
const intl10 = tmp6(1236).intl;
obj[1] = intl10.string(tmp6(1236).t.riu2R5);
let obj2 = obj;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj1 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj2);
2026-07-29 08:29:29 +00:00
obj1.emojiDescription = formatToPlainStringResult;
obj1.analyticsType = DEFAULT;
return obj1;
2026-07-20 16:05:17 +00:00
}
if (!isPremium3) {
2026-07-29 08:29:29 +00:00
obj2 = { type: null, text: null, description: null };
obj2[0] = obj.GET_PREMIUM;
const intl9 = tmp6(1236).intl;
obj2[1] = intl9.string(tmp6(1236).t["gl/XHJ"]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj3 = { type: null, text: null, description: null };
obj3[0] = obj.UNAVAILABLE;
2026-07-20 16:05:17 +00:00
obj2 = obj3;
}
}
if (!isPremium2) {
if (hasJoinedEmojiSourceGuild2) {
if (!isUnusableRoleSubscriptionEmoji2) {
2026-07-29 08:29:29 +00:00
DEFAULT = emojiComesFromCurrentGuild2 ? tmp57.UPSELL_CURRENT_SERVER_JOINED : tmp57.UPSELL_CROSS_SERVER_JOINED;
2026-07-20 16:05:17 +00:00
}
}
}
if (!isPremium2) {
isPremium2 = hasJoinedEmojiSourceGuild2;
}
DEFAULT = constants.DEFAULT;
}
if (isPremium) {
if (!hasJoinedEmojiSourceGuild) {
2026-08-24 06:08:38 +00:00
const intl4 = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const string2 = intl4.string;
2026-08-24 06:08:38 +00:00
const t = getSystemLocale.t;
2026-07-20 16:05:17 +00:00
if (isDiscoverable) {
let string2Result = string2(t.xE9WGt);
2026-07-29 08:29:29 +00:00
let tmp26 = tmp24;
let tmp27 = tmp23;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
string2Result = string2(t["0LMpW+"]);
2026-07-29 08:29:29 +00:00
tmp26 = tmp24;
tmp27 = tmp23;
2026-07-20 16:05:17 +00:00
}
}
if (!isRoleSubscriptionEmoji) {
2026-08-24 06:08:38 +00:00
const intl5 = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const string3 = intl5.string;
2026-08-24 06:08:38 +00:00
const t2 = getSystemLocale.t;
2026-07-20 16:05:17 +00:00
if (emojiComesFromCurrentGuild) {
let string3Result = string3(t2.hU4kIe);
2026-07-29 08:29:29 +00:00
let tmp31 = tmp29;
let tmp32 = tmp28;
2026-07-20 16:05:17 +00:00
} else {
string3Result = string3(t2.GM0xaX);
2026-07-29 08:29:29 +00:00
tmp31 = tmp29;
tmp32 = tmp28;
2026-07-20 16:05:17 +00:00
}
}
if (!shouldHideRoleSubscriptionCTA) {
2026-08-24 06:08:38 +00:00
const intl6 = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const string4 = intl6.string;
2026-08-24 06:08:38 +00:00
let vLklfF2 = getSystemLocale.t;
2026-07-20 16:05:17 +00:00
if (isUnusableRoleSubscriptionEmoji) {
if (userIsRoleSubscriber) {
vLklfF2 = vLklfF2.vLklfF;
let string4Result = string4(vLklfF2);
2026-07-29 08:29:29 +00:00
let tmp39 = tmp34;
let tmp40 = tmp33;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
string4Result = string4(vLklfF2["g8i/bf"]);
2026-07-29 08:29:29 +00:00
tmp39 = tmp34;
tmp40 = tmp33;
2026-07-20 16:05:17 +00:00
}
} else {
let string4Result1 = string4(vLklfF2.Eoynp0);
2026-07-29 08:29:29 +00:00
let tmp36 = tmp34;
let tmp37 = tmp33;
2026-07-20 16:05:17 +00:00
}
}
2026-08-24 06:08:38 +00:00
const intl7 = getSystemLocale.intl;
string4Result1 = intl7.string(getSystemLocale.t.xFb68j);
2026-07-29 08:29:29 +00:00
tmp36 = dependencyMap;
tmp37 = require;
2026-07-20 16:05:17 +00:00
} else if (hasJoinedEmojiSourceGuild) {
if (!shouldHideRoleSubscriptionCTA) {
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const string = intl2.string;
2026-08-24 06:08:38 +00:00
let vLklfF = getSystemLocale.t;
2026-07-20 16:05:17 +00:00
if (isUnusableRoleSubscriptionEmoji) {
if (userIsRoleSubscriber) {
vLklfF = vLklfF.vLklfF;
let stringResult = string(vLklfF);
2026-07-29 08:29:29 +00:00
let tmp13 = tmp8;
let tmp14 = tmp7;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
stringResult = string(vLklfF["g8i/bf"]);
2026-07-29 08:29:29 +00:00
tmp13 = tmp8;
tmp14 = tmp7;
2026-07-20 16:05:17 +00:00
}
} else if (emojiComesFromCurrentGuild) {
let stringResult1 = string(vLklfF.ICPhqa);
2026-07-29 08:29:29 +00:00
let tmp10 = tmp8;
let tmp11 = tmp7;
2026-07-20 16:05:17 +00:00
} else {
stringResult1 = string(vLklfF.jQy3aM);
2026-07-29 08:29:29 +00:00
tmp10 = tmp8;
tmp11 = tmp7;
2026-07-20 16:05:17 +00:00
}
}
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
stringResult1 = intl3.string(getSystemLocale.t.xFb68j);
2026-07-29 08:29:29 +00:00
tmp10 = dependencyMap;
tmp11 = require;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
if (isDiscoverable) {
2026-07-29 08:29:29 +00:00
formatToPlainStringResult = intl.string(tmp2(1236).t.FJ6Z01);
tmp6 = tmp2;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { openPremiumSettings: null };
obj[0] = onOpenPremiumSettings;
formatToPlainStringResult = intl.format(tmp2(1236).t.U6vLcA, obj);
tmp6 = tmp2;
2026-07-20 16:05:17 +00:00
}
}
};