This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,10 +1,13 @@
/* Metro module 10922; source: modules/in_app_notifications/InAppNotificationConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun83700(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11108:6, offset: 0x01f253d6, size: 114 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
const set = new Set([10, 25]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/InAppNotificationConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/InAppNotificationConstants.tsx');
exports.REACTION_MILESTONE_COUNTS = set;
}
global.__d(_fun83700, 10922, [2]) /* metro module 10922, dependencies: [2] */;
@@ -1,9 +1,12 @@
/* Metro module 10999; source: modules/in_app_notifications/InAppNotificationTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun84174(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11185:6, offset: 0x01f3d1b5, size: 120 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/InAppNotificationTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/InAppNotificationTypes.tsx');
exports.InAppNotificationAccessoryTypes = {REPLY_TOGGLE: 'REPLY_TOGGLE', SEND_MESSAGE_BUTTON: 'SEND_MESSAGE_BUTTON',
REACTION_BUTTON: 'REACTION_BUTTON', REACTION_PICKER_BUTTON: 'REACTION_PICKER_BUTTON'};
}
global.__d(_fun84174, 10999, [2]) /* metro module 10999, dependencies: [2] */;
@@ -1,20 +1,20 @@
/* Metro module 10921; source: modules/in_app_notifications/InAppNotificationUtils.tsx; dependencies: [31, 3793, 1878, 10922, 661, 4805, 1244, 22, 491, 4845, 4863, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
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 Module00491Module from '../../by-id/module-00491.js'; /* Metro dependency 491 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseChannelNameModule from '../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as InAppNotificationConstantsModule from './InAppNotificationConstants.tsx'; /* Metro dependency 10922 */
function _fun83687(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:6, offset: 0x01f24bb2, size: 330 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = extractGuildAndChannelAndMessageIdFromNotification;
const extractGuildAndChannelAndMessageIdFromNotification2 = extractGuildAndChannelAndMessageIdFromNotification;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(10922) /* metro dependency 10922: InAppNotificationConstants */).REACTION_MILESTONE_COUNTS;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.AnalyticEvents;
const env0_8 = constantsModule.ChannelTypes;
const env0_9 = constantsModule.InAppNotificationTypes;
const env0_10 = constantsModule.MessageEmbedTypes;
const env0_11 = constantsModule.MessageFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/InAppNotificationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/InAppNotificationUtils.tsx');
exports.getNotificationTitle = getNotificationTitle;
exports.getNotificationBodyText = getNotificationBodyText;
exports.isReactionMilestoneNotification = function(a0, a1) {
@@ -28,7 +28,7 @@ function _fun83687(global, require, importDefault, importAll, module, exports, d
};
exports.generateInAppNotificationId = generateInAppNotificationId;
exports.useHasPreviewableMedia = useHasPreviewableMedia;
exports.extractGuildAndChannelAndMessageIdFromNotification = closure;
exports.extractGuildAndChannelAndMessageIdFromNotification = extractGuildAndChannelAndMessageIdFromNotification2;
exports.trackInAppNotificationAccessoryClicked = function(a0, a1) {
var {guildId, channelId, messageId} = extractGuildAndChannelAndMessageIdFromNotification(a0);
var defaultImport = importDefault(dependencyMap[10]);
@@ -37,171 +37,182 @@ function _fun83687(global, require, importDefault, importAll, module, exports, d
in_app_notification_id: a0.inAppNotificationId, notif_guild_id: guildId, notif_channel_id: channelId,
message_id: messageId, accessory: a1});
};
}
function hasMedia(a0) { // fn#83688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:274, offset: 0x01f24cfc, size: 121 bytes, params: 2, frame: 14
const hasFlag = a0.hasFlag;
const IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
let r0 = Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE]) || a0.attachments.length > 0;
r0 = !r0 ? a0.embeds.length > 0 && a0.embeds.every(function({type}) {
return type === MessageEmbedTypes.GIFV;
}) : r0;
r0 = !r0 ? a0.stickerItems.length > 0 : r0;
return r0;
}
function hasMedia(a0) { // fn#83688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:274, offset: 0x01f24cfc, size: 121 bytes, params: 2, frame: 14
const hasFlag = a0.hasFlag;
const IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
let r0 = Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE]) || a0.attachments.length > 0;
r0 = !r0 ? a0.embeds.length > 0 && a0.embeds.every(function({type}) {
return type === MessageEmbedTypes.GIFV;
}) : r0;
r0 = !r0 ? a0.stickerItems.length > 0 : r0;
return r0;
}
function extractGuildAndChannelAndMessageIdFromNotification(a0) { // fn#83690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:438, offset: 0x01f24d90, size: 421 bytes, params: 2, frame: 10
var guild_id;
var id;
var r5;
var r1;
var r2;
var r3;
var MESSAGE_REMINDER;
var channel;
var channelId;
var thread;
var guild;
var message;
const type = a0.type;
var value;
const MESSAGE = InAppNotificationTypes.MESSAGE;
if (MESSAGE === type) {
guild = a0.guild;
value = undefined;
id = guild == null ? value : guild.id;
r5 = id ?? (a0.channel == null ? value : a0.channel.guild_id);
channel = a0.channel;
id = channel == null ? value : channel.id;
message = a0.message;
r1 = message == null ? value : message.id;
r2 = id;
r3 = r5;
} else if (InAppNotificationTypes.REACTION === type) {
guild = a0.guild;
value = undefined;
id = guild == null ? value : guild.id;
r5 = id ?? (a0.channel == null ? value : a0.channel.guild_id);
channel = a0.channel;
id = channel == null ? value : channel.id;
message = a0.message;
r1 = message == null ? value : message.id;
r2 = id;
r3 = r5;
} else if (InAppNotificationTypes.ALERT === type) {
guild = a0.guild;
value = undefined;
id = guild == null ? value : guild.id;
r5 = id ?? (a0.channel == null ? value : a0.channel.guild_id);
channel = a0.channel;
id = channel == null ? value : channel.id;
r1 = value;
r2 = id;
r3 = r5;
} else if (InAppNotificationTypes.FORUM_THREAD_CREATED === type) {
thread = a0.thread;
value = undefined;
guild_id = thread == null ? value : thread.guild_id;
thread = a0.thread;
id = thread == null ? value : thread.id;
r1 = value;
r2 = id;
r3 = guild_id;
} else if (InAppNotificationTypes.MESSAGE_FAILED_TO_SEND === type) {
channelId = a0.channelId;
value = undefined;
r1 = value;
r2 = channelId;
r3 = value;
} else {
MESSAGE_REMINDER = InAppNotificationTypes.MESSAGE_REMINDER;
value = undefined;
if (MESSAGE_REMINDER !== type) {
r1 = value;
r2 = value;
r3 = value;
} else {
function extractGuildAndChannelAndMessageIdFromNotification(a0) { // fn#83690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:438, offset: 0x01f24d90, size: 421 bytes, params: 2, frame: 10
var guild_id;
var id;
var r5;
var r1;
var r2;
var r3;
var MESSAGE_REMINDER;
var channel;
var channelId;
var thread;
var guild;
var message;
const type = a0.type;
var value;
const MESSAGE = InAppNotificationTypes.MESSAGE;
if (MESSAGE === type) {
guild = a0.guild;
value = undefined;
id = guild == null ? value : guild.id;
r5 = id ?? (a0.channel == null ? value : a0.channel.guild_id);
channel = a0.channel;
guild_id = channel == null ? value : channel.guild_id;
id = channel == null ? value : channel.id;
message = a0.message;
r1 = message == null ? value : message.id;
r2 = id;
r3 = r5;
} else if (InAppNotificationTypes.REACTION === type) {
guild = a0.guild;
value = undefined;
id = guild == null ? value : guild.id;
r5 = id ?? (a0.channel == null ? value : a0.channel.guild_id);
channel = a0.channel;
id = channel == null ? value : channel.id;
message = a0.message;
r1 = message == null ? value : message.id;
r2 = id;
r3 = r5;
} else if (InAppNotificationTypes.ALERT === type) {
guild = a0.guild;
value = undefined;
id = guild == null ? value : guild.id;
r5 = id ?? (a0.channel == null ? value : a0.channel.guild_id);
channel = a0.channel;
id = channel == null ? value : channel.id;
r1 = value;
r2 = id;
r3 = r5;
} else if (InAppNotificationTypes.FORUM_THREAD_CREATED === type) {
thread = a0.thread;
value = undefined;
guild_id = thread == null ? value : thread.guild_id;
thread = a0.thread;
id = thread == null ? value : thread.id;
r1 = value;
r2 = id;
r3 = guild_id;
} else if (InAppNotificationTypes.MESSAGE_FAILED_TO_SEND === type) {
channelId = a0.channelId;
value = undefined;
r1 = value;
r2 = channelId;
r3 = value;
} else {
MESSAGE_REMINDER = InAppNotificationTypes.MESSAGE_REMINDER;
value = undefined;
if (MESSAGE_REMINDER !== type) {
r1 = value;
r2 = value;
r3 = value;
} else {
channel = a0.channel;
guild_id = channel == null ? value : channel.guild_id;
channel = a0.channel;
id = channel == null ? value : channel.id;
r1 = value;
r2 = id;
r3 = guild_id;
}
}
return {guildId: r3, channelId: r2, messageId: r1};
}
return {guildId: r3, channelId: r2, messageId: r1};
}
function getNotificationTitle(a0, {nick}, a2, a3) { // fn#83691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:1283, offset: 0x01f24f35, size: 476 bytes, params: 5, frame: 26
const channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(a0, UserStore,
RelationshipStore, true);
const r11 = a2 != null ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(a2,
UserStore, RelationshipStore) : null;
const type = a0.type;
const GROUP_DM = ChannelTypes.GROUP_DM;
return GROUP_DM === type ? '' + nick + ' (' + channelName + ')' : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_ANNOUNCEMENT === type ? a3 == null ? nick : '' + nick + ' (' + channelName + ', ' + a3.name + ')' : ChannelTypes.ANNOUNCEMENT_THREAD === type || ChannelTypes.PUBLIC_THREAD === type ? a2 != null ? '' + nick + ' (' + channelName + ', ' + r11 + ')' : a3 != null ? '' + nick + ' (' + channelName + ', ' + a3.name + ')' : '' + nick + ' (' + channelName + ')' : ChannelTypes.PRIVATE_THREAD !== type ? nick : a2 != null ? '' + nick + ' (' + channelName + ', ' + r11 + ')' : a3 != null ? '' + nick + ' (' + channelName + ', ' + a3.name + ')' : '' + nick + ' (' + channelName + ')';
}
function getNotificationBodyText({notificationMessageContent, isGdmAllReactionNotification, messageAuthor, emojiHook}) { // fn#83692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:1747, offset: 0x01f25111, size: 229 bytes, params: 2, frame: 19
var r1;
let value = notificationMessageContent != null;
if (value) {
value = notificationMessageContent.trim();
value = value !== '';
r1 = value;
} else {
r1 = value;
function getNotificationTitle(a0, {nick}, a2, a3) { // fn#83691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:1283, offset: 0x01f24f35, size: 476 bytes, params: 5, frame: 26
var r11;
var moduleValue2;
const channelName = UseChannelNameModule.computeChannelName(a0, UserStore, RelationshipStore, true);
if (a2 != null) {
moduleValue2 = UseChannelNameModule;
r11 = moduleValue2.computeChannelName(a2, UserStore, RelationshipStore);
} else {
r11 = null;
}
const type = a0.type;
const GROUP_DM = ChannelTypes.GROUP_DM;
return GROUP_DM === type ? '' + nick + ' (' + channelName + ')' : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_ANNOUNCEMENT === type ? a3 == null ? nick : '' + nick + ' (' + channelName + ', ' + a3.name + ')' : ChannelTypes.ANNOUNCEMENT_THREAD === type || ChannelTypes.PUBLIC_THREAD === type ? a2 != null ? '' + nick + ' (' + channelName + ', ' + r11 + ')' : a3 != null ? '' + nick + ' (' + channelName + ', ' + a3.name + ')' : '' + nick + ' (' + channelName + ')' : ChannelTypes.PRIVATE_THREAD !== type ? nick : a2 != null ? '' + nick + ' (' + channelName + ', ' + r11 + ')' : a3 != null ? '' + nick + ' (' + channelName + ', ' + a3.name + ')' : '' + nick + ' (' + channelName + ')';
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return isGdmAllReactionNotification ? r1 ? Reflect.apply(format, intl, [t.MJPwfg, {emojiHook: emojiHook,
username: messageAuthor.nick}]) : Reflect.apply(format, intl, [t.FpJqb0, {emojiHook: emojiHook,
username: messageAuthor.nick}]) : r1 ? Reflect.apply(format, intl, [t.sHV43G,
{emojiHook: emojiHook}]) : Reflect.apply(format, intl, [t.ZOzpKt, {emojiHook: emojiHook}]);
}
function isReactionMilestoneNotification(a0, a1) { // fn#83693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2188, offset: 0x01f251f6, size: 92 bytes, params: 3, frame: 14
if (a1 == null) {
return false;
function getNotificationBodyText({notificationMessageContent, isGdmAllReactionNotification, messageAuthor, emojiHook}) { // fn#83692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:1747, offset: 0x01f25111, size: 229 bytes, params: 2, frame: 19
var r1;
let value = notificationMessageContent != null;
if (value) {
value = notificationMessageContent.trim();
value = value !== '';
r1 = value;
} else {
r1 = value;
}
const intl = (IndexNativeModule).intl;
const format = intl.format;
const t = (IndexNativeModule).t;
return isGdmAllReactionNotification ? r1 ? Reflect.apply(format, intl, [t.MJPwfg, {emojiHook: emojiHook,
username: messageAuthor.nick}]) : Reflect.apply(format, intl, [t.FpJqb0, {emojiHook: emojiHook,
username: messageAuthor.nick}]) : r1 ? Reflect.apply(format, intl, [t.sHV43G,
{emojiHook: emojiHook}]) : Reflect.apply(format, intl, [t.ZOzpKt, {emojiHook: emojiHook}]);
}
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
if (a1 === GUILD_ANNOUNCEMENT) {
return false;
function isReactionMilestoneNotification(a0, a1) { // fn#83693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2188, offset: 0x01f251f6, size: 92 bytes, params: 3, frame: 14
if (a1 == null) {
return false;
}
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
if (a1 === GUILD_ANNOUNCEMENT) {
return false;
}
return REACTION_MILESTONE_COUNTS.has((require(22) /* metro dependency 22 */).sumBy(a0, function({count_details}) {
var r5;
var value = undefined;
r5 = count_details == null ? value : count_details.burst;
var value2 = 0;
return (r5 ?? value2) + ((count_details == null ? value : count_details.normal) ?? value2);
}));
}
return REACTION_MILESTONE_COUNTS.has((require(22) /* metro dependency 22 */).sumBy(a0, function({count_details}) {
var r5;
var value = undefined;
r5 = count_details == null ? value : count_details.burst;
var value2 = 0;
return (r5 ?? value2) + ((count_details == null ? value : count_details.normal) ?? value2);
}));
}
function generateInAppNotificationId() { // fn#83695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2468, offset: 0x01f25299, size: 37 bytes, params: 1, frame: 11
return (require(491) /* metro dependency 491 */).v4();
}
function useHasPreviewableMedia(a0) { // fn#83696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2553, offset: 0x01f252be, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_3.useMemo(_fun83697, [a0]);
}
function _fun83697() { // fn#83697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2606, offset: 0x01f252ea, size: 91 bytes, params: 1, frame: 14
var environment;
var r0;
let value = environment.__proto__;
const hasMedia2 = hasMedia(env0_0);
if (hasMedia2) {
r0 = hasMedia2;
} else {
value = importDefault(4845) /* metro dependency 4845: isForwardMessage */;
value = value(env0_0);
r0 = value && env0_0.messageSnapshots.some(function(a0) {
return hasMedia(a0.message);
});
function generateInAppNotificationId() { // fn#83695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2468, offset: 0x01f25299, size: 37 bytes, params: 1, frame: 11
return (Module00491Module).v4();
}
return r0;
function useHasPreviewableMedia(a0) { // fn#83696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2553, offset: 0x01f252be, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun83697, [a0]);
function _fun83697() { // fn#83697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2606, offset: 0x01f252ea, size: 91 bytes, params: 1, frame: 14
var environment;
var r0;
let value = environment.__proto__;
const hasMedia2 = hasMedia(env0_0);
if (hasMedia2) {
r0 = hasMedia2;
} else {
value = importDefault(4845) /* metro dependency 4845: isForwardMessage */;
value = value(env0_0);
r0 = value && env0_0.messageSnapshots.some(function(a0) {
return hasMedia(a0.message);
});
}
return r0;
}
}
}
function _fun83694({count_details}) { // fn#83694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11107:2303, offset: 0x01f25252, size: 71 bytes, params: 2, frame: 7
return (count_details?.burst ?? 0) + (count_details?.normal ?? 0);
}
global.__d(_fun83687, 10921, [31, 3793, 1878, 10922, 661, 4805, 1244, 22, 491, 4845, 4863,
2]) /* metro module 10921, dependencies: [31, 3793, 1878, 10922, 661, 4805, 1244, 22, 491, 4845, 4863, 2] */;
@@ -1,95 +1,105 @@
/* Metro module 11228; source: modules/in_app_notifications/native/AlertNotification.tsx; dependencies: [31, 27, 1867, 33, 6819, 7599, 697, 4501, 632, 10923, 1244, 10973, 10994, 8129, 10992, 2] */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as GuildIconModule from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as ClipViewModule from '../../../design/components/Icon/native/ClipView.tsx'; /* Metro dependency 7599 */
import * as GuildAntiRaidHooksModule from '../../guild_antiraid/GuildAntiRaidHooks.tsx'; /* Metro dependency 10923 */
import * as InAppNotificationRedesignExperimentModule from './InAppNotificationRedesignExperiment.tsx'; /* Metro dependency 10973 */
function _fun85828(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:6, offset: 0x01f7cf2d, size: 406 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.Fragment;
const env0_8 = value.jsxs;
const ImageSizes = (require(6819) /* metro dependency 6819: GuildIcon */).ImageSizes;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const ImageSizes = (GuildIconModule).ImageSizes;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const NORMAL = GuildIconSizes.NORMAL;
const property = ImageSizes[NORMAL];
object2 = {'shape': null, 'x': null, 'y': -6, 'width': 24, 'height': 24};
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
object = {'shape': null, 'x': null, 'y': -6, 'width': 24, 'height': 24};
const CutoutShape = (ClipViewModule).CutoutShape;
const RoundedRect = CutoutShape.RoundedRect;
object2.shape = RoundedRect;
object2.x = property - -6 - 24;
object2.cornerRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({warningBadge: {'position': 'absolute',
object.shape = RoundedRect;
object.x = property - -6 - 24;
object.cornerRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_10 = (CreateStylesModule).createStyles({warningBadge: {'position': 'absolute',
'top': -6, 'right': -6, 'width': 24, 'height': 24, 'alignItems': 'center', 'justifyContent': 'center'},
warningIcon: {'width': 16, 'height': 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/AlertNotification.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/AlertNotification.tsx');
exports.default = AlertNotification;
}
function AlertNotification({notification}) { // fn#85829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:605, offset: 0x01f7d0c3, size: 766 bytes, params: 2, frame: 30
var r1;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var Notification;
const key = notification.key;
const styles = useStyles();
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [GuildStore];
const guild = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
return GuildStore.getGuild(key);
}]);
const guildAntiRaidHooksModule = require(10923) /* metro dependency 10923: GuildAntiRaidHooks */;
const useGuildIncidentsState = guildAntiRaidHooksModule.useGuildIncidentsState;
const r9 = Reflect.apply(useGuildIncidentsState, guildAntiRaidHooksModule,
[key]).incidentData?.raidDetectedAt != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Mn3elp) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.evRhwg);
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
['AlertNotification']).redesignEnabled;
const value6 = env0_3.useMemo(_fun85831, [redesignEnabled, guild]);
if (guild == null) {
r0 = null;
} else {
Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
if (redesignEnabled) {
object = {};
object.icon = <>{((Component) => <Component cutouts={[env0_9]}>{((Component) => <Component guild={guild} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}<View style={styles.warningBadge}>{((WarningIcon) => <WarningIcon style={styles.warningIcon} color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon)}</View></>;
object.header = value6;
object.children = ((SystemMessageText) => <SystemMessageText text={r9} />)((require(10992) /* metro dependency 10992: MessagePreviewText */).SystemMessageText);
r1 = object;
function AlertNotification({notification}) { // fn#85829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:605, offset: 0x01f7d0c3, size: 766 bytes, params: 2, frame: 30
var r1;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var Notification;
const key = notification.key;
const styles = useStyles();
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let object = [GuildStore];
const guild = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [object, function() {
return GuildStore.getGuild(key);
}]);
const useGuildIncidentsState = GuildAntiRaidHooksModule.useGuildIncidentsState;
const r9 = Reflect.apply(useGuildIncidentsState, GuildAntiRaidHooksModule,
[key]).incidentData?.raidDetectedAt != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Mn3elp) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.evRhwg);
const useInAppNotificationRedesign = InAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, InAppNotificationRedesignExperimentModule,
['AlertNotification']).redesignEnabled;
const value6 = ReactModule.useMemo(_fun85831, [redesignEnabled, guild]);
if (guild == null) {
r0 = null;
} else {
object = {};
object.alertLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2IY4YN']);
object.icon = ((Component) => <Component guild={guild} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
object.textChildren = r9;
object.header = value6;
r1 = object;
Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
if (redesignEnabled) {
object = {};
object.icon = (
<>
{((Component) => <Component cutouts={[env0_9]}>{((Component) => <Component guild={guild} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}
<View style={styles.warningBadge}>
{((WarningIcon) => <WarningIcon style={styles.warningIcon} color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon)}
</View>
</>
);
object.header = value6;
object.children = ((SystemMessageText) => <SystemMessageText text={r9} />)((require(10992) /* metro dependency 10992: MessagePreviewText */).SystemMessageText);
r1 = object;
} else {
object = {};
object.alertLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2IY4YN']);
object.icon = ((Component) => <Component guild={guild} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
object.textChildren = r9;
object.header = value6;
r1 = object;
}
r0 = <Notification {...r1} />;
}
r0 = <Notification {...r1} />;
return r0;
function _fun85831() { // fn#85831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:983, offset: 0x01f7d3c1, size: 174 bytes, params: 1, frame: 17
var r0;
var object;
var value3;
var value4;
var intl;
if (redesignEnabled) {
object = {type: 'simple'};
value3 = environment.__proto__;
value4 = undefined;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2IY4YN']);
object.secondaryText = guild == null ? value4 : guild.name;
r0 = object;
} else {
r0 = {type: 'simple', text: guild?.name ?? ''};
}
return r0;
}
}
return r0;
}
function _fun85831() { // fn#85831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:983, offset: 0x01f7d3c1, size: 174 bytes, params: 1, frame: 17
var r0;
var object2;
var value3;
var value4;
var intl;
if (redesignEnabled) {
object2 = {type: 'simple'};
value3 = environment.__proto__;
value4 = undefined;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2IY4YN']);
object2.secondaryText = guild == null ? value4 : guild.name;
r0 = object2;
} else {
r0 = {type: 'simple', text: guild?.name ?? ''};
}
return r0;
}
global.__d(_fun85828, 11228, [31, 27, 1867, 33, 6819, 7599, 697, 4501, 632, 10923, 1244, 10973, 10994, 8129, 10992,
2]) /* metro module 11228, dependencies: [31, 27, 1867, 33, 6819, 7599, 697, 4501, 632, 10923, 1244, 10973, 10994, 8129, 10992, 2] */;
@@ -1,104 +1,114 @@
/* Metro module 11258; source: modules/in_app_notifications/native/ConfirmationToast.tsx; dependencies: [31, 27, 1881, 33, 4501, 697, 4017, 4595, 4504, 6739, 1423, 4073, 4573, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseMountEffect from '../../../external/discord_common/js/shared/hooks/useMountEffect.tsx'; /* Metro dependency 4595 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as EmojiConstantsModule from '../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun86031(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:6, offset: 0x01f84c7d, size: 530 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.container = {'alignItems': 'center', 'justifyContent': 'center', marginTop: PX_12};
const object4 = {};
object.container = {'alignItems': 'center', 'justifyContent': 'center', marginTop: PX_12};
const object3 = {};
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object4, SHADOW_HIGH, undefined);
object4['flexDirection'] = 'row';
object4['alignItems'] = 'center';
object4['justifyContent'] = 'center';
copyDataProperties(object3, SHADOW_HIGH, undefined);
object3['flexDirection'] = 'row';
object3['alignItems'] = 'center';
object3['justifyContent'] = 'center';
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4['gap'] = PX_8;
object3['gap'] = PX_8;
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
object4['backgroundColor'] = MOBILE_ALERT_BACKGROUND_DEFAULT;
object3['backgroundColor'] = MOBILE_ALERT_BACKGROUND_DEFAULT;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4['paddingHorizontal'] = PX_12;
object3['paddingHorizontal'] = PX_12;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4['paddingVertical'] = PX_8;
object4['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4['overflow'] = 'hidden';
object2.notificationRow = object4;
object2.textEmoji = {fontSize: 20};
object2.imageEmoji = {'width': 20, 'height': 20};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function ConfirmationToastTsx1(){const{animatedValue,interpolate}=this.__closure;const value=animatedValue.get();const scale=interpolate(value,[0,1],[0.8,1]);const translateY=interpolate(value,[0,1],[-20,0]);return{transform:[{translateY:translateY},{scale:scale}],opacity:value};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/ConfirmationToast.tsx');
object3['paddingVertical'] = PX_8;
object3['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3['overflow'] = 'hidden';
object.notificationRow = object3;
object.textEmoji = {fontSize: 20};
object.imageEmoji = {'width': 20, 'height': 20};
const env0_7 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function ConfirmationToastTsx1(){const{animatedValue,interpolate}=this.__closure;const value=animatedValue.get();const scale=interpolate(value,[0,1],[0.8,1]);const translateY=interpolate(value,[0,1],[-20,0]);return{transform:[{translateY:translateY},{scale:scale}],opacity:value};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/ConfirmationToast.tsx');
exports.ConfirmationToast = ConfirmationToast;
}
function ConfirmationToast({message, reaction}) { // fn#86032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1072, offset: 0x01f84e8f, size: 577 bytes, params: 2, frame: 28
var r9;
var Emoji;
var id;
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0);
(UseMountEffect)(_fun86033);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ConfirmationToastH2 = ConfirmationToastH;
const object = {animatedValue: value2};
object.interpolate = ReanimatedRexportModule.interpolate;
ConfirmationToastH2.__closure = object;
ConfirmationToastH2.__workletHash = 16852763369496;
ConfirmationToastH2.__initData = env0_8;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ConfirmationToastH2]);
const View2 = (ReanimatedRexport).View;
const items2 = [styles.container, value3];
if (reaction != null) {
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
var defaultImport2Props = {textEmojiStyle: styles.textEmoji, fastImageStyle: styles.imageEmoji};
id = reaction.id;
defaultImport2Props.name = id == null ? reaction.surrogates : '';
id = reaction.id;
defaultImport2Props.src = id != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: reaction.id,
animated: reaction.animated, size: EMOJI_URL_BASE_SIZE}) : reaction.url;
r9 = <Emoji {...defaultImport2Props} />;
} else {
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
r9 = (
<CircleCheckIcon size="md" color={(importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE} />
);
}
const Text = (TextModule).Text;
return (
<View2 style={items2}>
<View style={styles.notificationRow}>
{r9}
<Text variant="text-sm/semibold" color="text-default">
{message}
</Text>
</View>
</View2>
);
function _fun86033() { // fn#86033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1170, offset: 0x01f850d0, size: 67 bytes, params: 1, frame: 16
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [value.withTiming(1, {duration: 200})]);
}
function ConfirmationToastH() { // fn#86034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1259, owner: ConfirmationToast.h, offset: 0x01f85113, size: 164 bytes, params: 1, frame: 19
const value = env0_0.get();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate(value, [0, 1], [0.8, 1]);
const object2 = {};
object2.translateY = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate(value, [0, 1], [-20,
0]);
return {transform: [object2, {scale: value3}], opacity: value};
}
function ConfirmationToast({message, reaction}) { // fn#86032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1072, offset: 0x01f84e8f, size: 577 bytes, params: 2, frame: 28
var r9;
var Emoji;
var id;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
(importDefault(4595) /* metro dependency 4595: useMountEffect */)(_fun86033);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ConfirmationToastH;
const object2 = {animatedValue: value2};
object2.interpolate = reanimatedRexportModule.interpolate;
closure.__closure = object2;
closure.__workletHash = 16852763369496;
closure.__initData = env0_8;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container, value3];
if (reaction != null) {
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
var defaultImport2Props = {textEmojiStyle: styles.textEmoji, fastImageStyle: styles.imageEmoji};
id = reaction.id;
defaultImport2Props.name = id == null ? reaction.surrogates : '';
id = reaction.id;
defaultImport2Props.src = id != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: reaction.id,
animated: reaction.animated, size: EMOJI_URL_BASE_SIZE}) : reaction.url;
r9 = <Emoji {...defaultImport2Props} />;
} else {
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
r9 = <CircleCheckIcon size="md" color={(importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE} />;
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View2 style={items2}>
<View style={styles.notificationRow}>
{r9}
<Text variant="text-sm/semibold" color="text-default">
{message}
</Text>
</View>
</View2>
);
}
function _fun86033() { // fn#86033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1170, offset: 0x01f850d0, size: 67 bytes, params: 1, frame: 16
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [value.withTiming(1, {duration: 200})]);
}
function ConfirmationToastH() { // fn#86034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1259, owner: ConfirmationToast.h, offset: 0x01f85113, size: 164 bytes, params: 1, frame: 19
const value = env0_0.get();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate(value, [0, 1], [0.8, 1]);
const object = {};
object.translateY = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate(value, [0, 1], [-20,
0]);
return {transform: [object, {scale: value3}], opacity: value};
}
global.__d(_fun86031, 11258, [31, 27, 1881, 33, 4501, 697, 4017, 4595, 4504, 6739, 1423, 4073, 4573,
2]) /* metro module 11258, dependencies: [31, 27, 1881, 33, 4501, 697, 4017, 4595, 4504, 6739, 1423, 4073, 4573, 2] */;
@@ -1,61 +1,72 @@
/* Metro module 11212; source: modules/in_app_notifications/native/ForumThreadCreatedNotification.tsx; dependencies: [31, 33, 4805, 1244, 10973, 4634, 10994, 1305, 2] */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseMessageAuthorModule from '../../messages/useMessageAuthor.tsx'; /* Metro dependency 4634 */
import * as InAppNotificationRedesignExperimentModule from './InAppNotificationRedesignExperiment.tsx'; /* Metro dependency 10973 */
import * as NotificationModule from './Notification.tsx'; /* Metro dependency 10994 */
function _fun85662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:6, offset: 0x01f77123, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/ForumThreadCreatedNotification.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/ForumThreadCreatedNotification.tsx');
exports.default = ForumThreadCreatedNotification;
}
function ForumThreadCreatedNotification({notification}) { // fn#85663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:126, offset: 0x01f771b1, size: 639 bytes, params: 2, frame: 25
var r5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jPhTvT;
const thread = notification.thread;
const threadCreator = notification.threadCreator;
const parentChannel = notification.parentChannel;
const guild = notification.guild;
const r15 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(parentChannel) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/YzI63']);
const r11 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(thread) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/YzI63']);
let formatToPlainString = intl.formatToPlainString;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['2IGVl5'];
let object = {channelName: r15};
object.guildName = guild.name;
const value6 = Reflect.apply(formatToPlainString, intl, [property, object]);
const useInAppNotificationRedesign = InAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, InAppNotificationRedesignExperimentModule,
['ForumThreadCreatedNotification']).redesignEnabled;
const redesignEnabled2 = redesignEnabled;
formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (redesignEnabled) {
r5 = Reflect.apply(formatToPlainString, intl, [t.WUIDu9, {threadName: r11}]);
} else {
jPhTvT = t.jPhTvT;
object = {channelName: r11};
object.userUsername = threadCreator.toString();
r5 = Reflect.apply(formatToPlainString, intl, [jPhTvT, object]);
}
const value10 = redesignEnabled2.useMemo(_fun85664, [redesignEnabled, parentChannel, guild,
(UseMessageAuthorModule).getUserAuthor(threadCreator, thread), value6]);
const Notification = (NotificationModule).Notification;
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
return (
<Notification
icon={<Avatar
size={NORMAL}
user={threadCreator}
guildId={thread.guild_id}
/>}
textChildren={r5}
header={value10}
/>
);
function _fun85664() { // fn#85664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:764, offset: 0x01f77430, size: 78 bytes, params: 1, frame: 4
return redesignEnabled ? {'type': 'message', 'channel': null, 'parentChannel': null, channel: parentChannel,
guild: guild, author: JsxRuntimeModule.jsx} : {type: 'simple', text: env0_2};
}
function ForumThreadCreatedNotification({notification}) { // fn#85663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:126, offset: 0x01f771b1, size: 639 bytes, params: 2, frame: 25
var r5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jPhTvT;
const thread = notification.thread;
const threadCreator = notification.threadCreator;
const parentChannel = notification.parentChannel;
const guild = notification.guild;
const r15 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(parentChannel) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/YzI63']);
const r11 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(thread) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/YzI63']);
let formatToPlainString = intl.formatToPlainString;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['2IGVl5'];
let object2 = {channelName: r15};
object2.guildName = guild.name;
const value6 = Reflect.apply(formatToPlainString, intl, [property, object2]);
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
['ForumThreadCreatedNotification']).redesignEnabled;
const env0_3 = redesignEnabled;
formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (redesignEnabled) {
r5 = Reflect.apply(formatToPlainString, intl, [t.WUIDu9, {threadName: r11}]);
} else {
jPhTvT = t.jPhTvT;
object2 = {channelName: r11};
object2.userUsername = threadCreator.toString();
r5 = Reflect.apply(formatToPlainString, intl, [jPhTvT, object2]);
}
const value10 = env0_3.useMemo(_fun85664, [redesignEnabled, parentChannel, guild,
(require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(threadCreator, thread), value6]);
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
return (
<Notification
icon={<Avatar size={NORMAL} user={threadCreator} guildId={thread.guild_id} />}
textChildren={r5}
header={value10}
/>
);
}
function _fun85664() { // fn#85664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:764, offset: 0x01f77430, size: 78 bytes, params: 1, frame: 4
return redesignEnabled ? {'type': 'message', 'channel': null, 'parentChannel': null, channel: parentChannel,
guild: guild, author: env0_4} : {type: 'simple', text: env0_2};
}
global.__d(_fun85662, 11212, [31, 33, 4805, 1244, 10973, 4634, 10994, 1305,
2]) /* metro module 11212, dependencies: [31, 33, 4805, 1244, 10973, 4634, 10994, 1305, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 10963; source: modules/in_app_notifications/native/InAppNotificationConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun83997(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11149:6, offset: 0x01f32e01, size: 81 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationConstants.tsx');
exports.IN_APP_NOTIFICATION_MAX_HEIGHT = 96;
}
global.__d(_fun83997, 10963, [2]) /* metro module 10963, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
@@ -1,11 +1,19 @@
/* Metro module 10974; source: modules/in_app_notifications/native/InAppNotificationExpandExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun84030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11160:6, offset: 0x01f34f19, size: 190 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-05-in-app-notification-expand',
const env0_0 = (ApexModule).createApexExperiment({'name': '2026-05-in-app-notification-expand',
'kind': 'user', defaultConfig: {'canExpand': false, 'canReact': false}, variations: {[1]: {'canExpand': true,
'canReact': true}, [2]: {'canExpand': true, 'canReact': false}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationExpandExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationExpandExperiment.tsx');
exports.useCanExpandInAppNotification = useCanExpandInAppNotification;
function useCanExpandInAppNotification(a0) { // fn#84031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11160:435, offset: 0x01373b1d, size: 29 bytes, params: 2, frame: 12
return env0_0.useConfig({location: a0});
}
}
global.__d(_fun84030, 10974, [1854, 2]) /* metro module 10974, dependencies: [1854, 2] */;
@@ -1,42 +1,46 @@
/* Metro module 10995; source: modules/in_app_notifications/native/InAppNotificationExpandNux.tsx; dependencies: [587, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun84153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:6, offset: 0x01f3bfa7, size: 216 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = getExpandNUXState;
const getExpandNUXState2 = getExpandNUXState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = {'lastShownAtMs': 0, 'numTimesShown': 0};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationExpandNux.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationExpandNux.tsx');
exports.MAX_TIMES_SHOWN = 7;
exports.ONE_DAY_MS = 86400000;
exports.NUX_REVEAL_DELAY_MS = 1000;
exports.NUX_REVEAL_DURATION_MS = 300;
exports.DRAG_HANDLE_BOUNCE_DISTANCE = 4;
exports.DRAG_HANDLE_BOUNCE_DURATION_MS = 650;
exports.getExpandNUXState = closure;
exports.getExpandNUXState = getExpandNUXState2;
exports.markExpandNUXStateAsShown = markExpandNUXStateAsShown;
exports.resetExpandNUXState = resetExpandNUXState;
function getExpandNUXState() { // fn#84154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:163, offset: 0x01f3c07f, size: 56 bytes, params: 1, frame: 12
const Storage = (StorageModule).Storage;
return Storage.get(env0_2) ?? env0_3;
}
function markExpandNUXStateAsShown() { // fn#84155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:571, offset: 0x01f3c0b7, size: 115 bytes, params: 1, frame: 16
const expandNUXState = getExpandNUXState();
const Storage = (StorageModule).Storage;
const set = Storage.set;
const binding = env0_2;
const object = {};
copyDataProperties(object, expandNUXState, undefined);
object['numTimesShown'] = expandNUXState.numTimesShown + 1;
const Date = global.Date;
object['lastShownAtMs'] = Date.now();
Reflect.apply(set, Storage, [binding, object]);
}
function resetExpandNUXState() { // fn#84156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:744, offset: 0x01f3c12a, size: 51 bytes, params: 1, frame: 14
const Storage = (StorageModule).Storage;
Storage.set(env0_2, env0_3);
}
}
function getExpandNUXState() { // fn#84154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:163, offset: 0x01f3c07f, size: 56 bytes, params: 1, frame: 12
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
return Storage.get(env0_2) ?? env0_3;
}
function markExpandNUXStateAsShown() { // fn#84155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:571, offset: 0x01f3c0b7, size: 115 bytes, params: 1, frame: 16
const expandNUXState = getExpandNUXState();
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const set = Storage.set;
const binding = env0_2;
const object2 = {};
copyDataProperties(object2, expandNUXState, undefined);
object2['numTimesShown'] = expandNUXState.numTimesShown + 1;
const Date = global.Date;
object2['lastShownAtMs'] = Date.now();
Reflect.apply(set, Storage, [binding, object2]);
}
function resetExpandNUXState() { // fn#84156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:744, offset: 0x01f3c12a, size: 51 bytes, params: 1, frame: 14
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_2, env0_3);
}
global.__d(_fun84153, 10995, [587, 2]) /* metro module 10995, dependencies: [587, 2] */;
@@ -1,24 +1,28 @@
/* Metro module 10973; source: modules/in_app_notifications/native/InAppNotificationRedesignExperiment.tsx; dependencies: [1854, 10974, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
import * as InAppNotificationExpandExperimentModule from './InAppNotificationExpandExperiment.tsx'; /* Metro dependency 10974 */
function _fun84028(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11159:6, offset: 0x01f34dcb, size: 206 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-in-app-notification-redesign', 'kind': 'user',
defaultConfig: {'moveTimerBar': false, 'redesignEnabled': false}, variations: {[1]: {'moveTimerBar': true,
'redesignEnabled': false}, [2]: {'moveTimerBar': false, 'redesignEnabled': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationRedesignExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationRedesignExperiment.tsx');
exports.InAppNotificationRedesignExperiment = value;
exports.useInAppNotificationRedesign = useInAppNotificationRedesign;
function useInAppNotificationRedesign(a0) { // fn#84029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11159:508, offset: 0x01f34e99, size: 128 bytes, params: 2, frame: 16
let value = a0;
const useCanExpandInAppNotification = InAppNotificationExpandExperimentModule.useCanExpandInAppNotification;
const canExpand = Reflect.apply(useCanExpandInAppNotification, InAppNotificationExpandExperimentModule,
[value]).canExpand;
value = env0_2.useConfig({location: canExpand ? 'Ineligible - ' + value : value});
return {redesignEnabled: canExpand || value.redesignEnabled, moveTimerBar: value.moveTimerBar};
}
}
function useInAppNotificationRedesign(a0) { // fn#84029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11159:508, offset: 0x01f34e99, size: 128 bytes, params: 2, frame: 16
let value = a0;
const inAppNotificationExpandExperimentModule = require(10974) /* metro dependency 10974: InAppNotificationExpandExperiment */;
const useCanExpandInAppNotification = inAppNotificationExpandExperimentModule.useCanExpandInAppNotification;
const canExpand = Reflect.apply(useCanExpandInAppNotification, inAppNotificationExpandExperimentModule,
[value]).canExpand;
value = env0_2.useConfig({location: canExpand ? 'Ineligible - ' + value : value});
return {redesignEnabled: canExpand || value.redesignEnabled, moveTimerBar: value.moveTimerBar};
}
global.__d(_fun84028, 10973, [1854, 10974, 2]) /* metro module 10973, dependencies: [1854, 10974, 2] */;
@@ -1,381 +1,467 @@
/* Metro module 10964; source: modules/in_app_notifications/native/MediaPreviewRightAccessory.tsx; dependencies: [31, 27, 4502, 4503, 33, 4501, 697, 9376, 4573, 3860, 477, 4564, 6692, 8999, 632, 4821, 9796, 9564, 10965, 8367, 9546, 1477, 5475, 4838, 4841, 9543, 10970, 1305, 7599, 10973, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import ClipView from '../../../design/components/Icon/native/ClipView.tsx'; /* Metro dependency 7599 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as MessageConstantsModule from '../../messages/MessageConstants.tsx'; /* Metro dependency 4503 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ExplicitMediaRedactionUtilsModule from '../../explicit_media_redaction/ExplicitMediaRedactionUtils.tsx'; /* Metro dependency 4821 */
import * as ClipViewModule from '../../../design/components/Icon/native/ClipView.tsx'; /* Metro dependency 7599 */
import * as PlayIconModule from '../../../design/components/Icon/native/redesign/generated/PlayIcon.tsx'; /* Metro dependency 9376 */
import * as AndroidRNVHttpEngineExperimentModule from '../../media_uploads/experiments/AndroidRNVHttpEngineExperiment.tsx'; /* Metro dependency 9564 */
import * as UseContentHarmTypesModule from '../../explicit_media_redaction/hooks/useContentHarmTypes.tsx'; /* Metro dependency 9796 */
import * as UsePreviewableMediaModule from './hooks/usePreviewableMedia.tsx'; /* Metro dependency 10965 */
import * as InAppNotificationRedesignExperimentModule from './InAppNotificationRedesignExperiment.tsx'; /* Metro dependency 10973 */
function _fun83998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:6, offset: 0x01f32e52, size: 895 bytes, params: 8, frame: 26
var object9;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.PixelRatio;
const StyleSheet = value.StyleSheet;
const env0_6 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_8 = (require(4503) /* metro dependency 4503: MessageConstants */).SPOILER_ATTACHMENT_PREFIX;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.Fragment;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const object10 = {'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'borderRadius': null,
const object2 = {'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'borderRadius': null,
'width': 16, 'height': 16, 'position': 'absolute', 'bottom': 4, 'left': 4};
let CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object10.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_12 = Reflect.apply(createStyles, value, [{badge: object10, icon: {'width': 10, 'height': 10}}]);
object2.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_12 = Reflect.apply(createStyles, value, [{badge: object2, icon: {'width': 10, 'height': 10}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object11 = {'width': 20, 'height': 20, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
const object3 = {'width': 20, 'height': 20, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center', 'position': 'absolute', 'right': -5, 'top': -5};
let BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object11.backgroundColor = BACKGROUND_MOD_SUBTLE;
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_13 = Reflect.apply(createStyles, value, [{badge: object11}]);
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_13 = Reflect.apply(createStyles, value, [{badge: object3}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object9 = {};
const object12 = {};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object12.overflow = 'hidden';
object9.mediaThumbnailContainer = object12;
object9.mediaThumbnail = {'width': '100%', 'height': '100%'};
const object13 = {'alignItems': 'center', 'justifyContent': 'center'};
object = {};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.overflow = 'hidden';
object.mediaThumbnailContainer = object4;
object.mediaThumbnail = {'width': '100%', 'height': '100%'};
const object5 = {'alignItems': 'center', 'justifyContent': 'center'};
BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object13.backgroundColor = BACKGROUND_MOD_SUBTLE;
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object9.iconContainer = object13;
const object14 = {};
copyDataProperties(object14, StyleSheet.absoluteFillObject, undefined);
object5.backgroundColor = BACKGROUND_MOD_SUBTLE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.iconContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
const PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
object14['backgroundColor'] = PRIMARY_500;
object9.obscureBackground = object14;
const object15 = {};
copyDataProperties(object15, StyleSheet.absoluteFillObject, undefined);
object15['justifyContent'] = 'center';
object15['alignItems'] = 'center';
object9.spoilerIconContainer = object15;
const object16 = {};
object6['backgroundColor'] = PRIMARY_500;
object.obscureBackground = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['justifyContent'] = 'center';
object7['alignItems'] = 'center';
object.spoilerIconContainer = object7;
const object8 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object16.padding = PX_4;
object16.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object8.padding = PX_4;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object16.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object16.justifyContent = 'center';
object16.alignItems = 'center';
object9.spoilerPill = object16;
const env0_14 = Reflect.apply(createStyles, value, [object9]);
object8.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object8.justifyContent = 'center';
object8.alignItems = 'center';
object.spoilerPill = object8;
const env0_14 = Reflect.apply(createStyles, value, [object]);
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {overflow: 'visible'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MediaPreviewRightAccessory.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/MediaPreviewRightAccessory.tsx');
exports.PREVIEW_SIZE = 64;
exports.MediaPreviewRightAccessory = MediaPreviewRightAccessory;
}
function VideoBadge() { // fn#83999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1448, offset: 0x01f331d1, size: 106 bytes, params: 1, frame: 18
const styles = useStyles();
const PlayIcon = (require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon;
return (
<View style={styles.badge}>
<PlayIcon
style={styles.icon}
size="custom"
color="white"
/>
</View>
);
}
function CountBadge({total}) { // fn#84000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1580, offset: 0x01f3323b, size: 107 bytes, params: 2, frame: 18
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.badge}>
<Text variant="text-xs/semibold" color="text-default">
{total}
</Text>
</View>
);
}
function ObscuredMediaOverlay({isObscured, isSpoiler, children}) { // fn#84001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1735, offset: 0x01f332a6, size: 437 bytes, params: 2, frame: 25
var r13;
var r5;
var jsxRuntimeEnv0_10Binding;
var items2;
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const SPOILER_HIDDEN_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.SPOILER_HIDDEN_BACKGROUND;
const value2 = Reflect.apply(useToken, useTokenModule, [SPOILER_HIDDEN_BACKGROUND]);
if (isObscured) {
r13 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'dark' : 'light';
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
items2 = [children];
r5 = isObscured && <View style={styles.obscureBackground} />;
items2[1] = r5;
r5 = !isObscured && ((Component) => <Component blurTheme={r13} android_fallbackColor={value2} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
items2[2] = r5;
items2[3] = <View style={styles.spoilerIconContainer}>{isObscured ? ((ImageWarningIcon) => <ImageWarningIcon size="sm" color="white" />)((require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon) : <View style={styles.spoilerPill}>{((EyeIcon) => <EyeIcon size="sm" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}</View>}</View>;
function VideoBadge() { // fn#83999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1448, offset: 0x01f331d1, size: 106 bytes, params: 1, frame: 18
const styles = useStyles();
const PlayIcon = (PlayIconModule).PlayIcon;
return (
<>
{items2}
</>
);
}
if (isSpoiler) {
r13 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'dark' : 'light';
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
items2 = [children];
r5 = isObscured && <View style={styles.obscureBackground} />;
items2[1] = r5;
r5 = !isObscured && ((Component) => <Component blurTheme={r13} android_fallbackColor={value2} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
items2[2] = r5;
items2[3] = <View style={styles.spoilerIconContainer}>{isObscured ? ((ImageWarningIcon) => <ImageWarningIcon size="sm" color="white" />)((require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon) : <View style={styles.spoilerPill}>{((EyeIcon) => <EyeIcon size="sm" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}</View>}</View>;
return (
<>
{items2}
</>
);
}
return children;
}
function SinglePreviewableMedia({previewableMedia, size, message}) { // fn#84002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:2258, offset: 0x01f3345b, size: 1559 bytes, params: 2, frame: 34
var url;
var r5;
var r10;
var r22;
var r13;
var VIDEO;
var thumbnail;
var moduleValue5;
var value6;
var moduleValue6;
var getMediaObscuredReasonFromBitmask;
var value7;
var url2;
var value10;
var value11;
var object2;
var width;
var height;
var value12;
var attachmentObscurityProps;
var attachmentUrl;
var moduleValue9;
var getSrcWithWidthAndHeight;
var value16;
var items4;
var value;
const styles = useStyles();
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [AccessibilityStore];
const useReducedMotion = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
return AccessibilityStore.useReducedMotion;
}]);
const type = previewableMedia.type;
const media = previewableMedia.media;
const icon = previewableMedia.icon;
const value3 = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).useShouldAgeVerifyForExplicitMedia();
const value4 = (require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForMessage(message);
const value5 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
const PreviewableMediaTypes = (require(10965) /* metro dependency 10965: usePreviewableMedia */).PreviewableMediaTypes;
const VOICE_MESSAGE = PreviewableMediaTypes.VOICE_MESSAGE;
if (VOICE_MESSAGE === type) {
return (
<View style={{width: size, height: size}}>
{icon}
<View style={styles.badge}>
<PlayIcon
style={styles.icon}
size="custom"
color="white"
/>
</View>
);
}
const AUDIO = PreviewableMediaTypes.AUDIO;
if (AUDIO === type) {
function CountBadge({total}) { // fn#84000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1580, offset: 0x01f3323b, size: 107 bytes, params: 2, frame: 18
const styles = useStyles();
const Text = (TextModule).Text;
return (
<View style={[styles.iconContainer, {width: size, height: size}]}>
{icon}
<View style={styles.badge}>
<Text variant="text-xs/semibold" color="text-default">
{total}
</Text>
</View>
);
}
const FILE = PreviewableMediaTypes.FILE;
if (FILE === type) {
return (
<View style={[styles.iconContainer, {width: size, height: size}]}>
{icon}
</View>
);
function ObscuredMediaOverlay({isObscured, isSpoiler, children}) { // fn#84001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1735, offset: 0x01f332a6, size: 437 bytes, params: 2, frame: 25
var r13;
var r5;
var jsxRuntimeEnv0_10Binding;
var items2;
const styles = useStyles();
const useToken = UseTokenModule.useToken;
const SPOILER_HIDDEN_BACKGROUND = (Native).colors.SPOILER_HIDDEN_BACKGROUND;
const value2 = Reflect.apply(useToken, UseTokenModule, [SPOILER_HIDDEN_BACKGROUND]);
if (isObscured) {
r13 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'dark' : 'light';
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
items2 = [children];
r5 = isObscured && <View style={styles.obscureBackground} />;
items2[1] = r5;
r5 = !isObscured && ((Component) => <Component blurTheme={r13} android_fallbackColor={value2} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
items2[2] = r5;
items2[3] = (
<View style={styles.spoilerIconContainer}>
{
isObscured
? ((ImageWarningIcon) => <ImageWarningIcon size="sm" color="white" />)((require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon)
: (
<View style={styles.spoilerPill}>
{((EyeIcon) => <EyeIcon size="sm" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}
</View>
)
}
</View>
);
return (
<>
{items2}
</>
);
}
if (isSpoiler) {
r13 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'dark' : 'light';
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
items2 = [children];
r5 = isObscured && <View style={styles.obscureBackground} />;
items2[1] = r5;
r5 = !isObscured && ((Component) => <Component blurTheme={r13} android_fallbackColor={value2} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
items2[2] = r5;
items2[3] = (
<View style={styles.spoilerIconContainer}>
{
isObscured
? ((ImageWarningIcon) => <ImageWarningIcon size="sm" color="white" />)((require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon)
: (
<View style={styles.spoilerPill}>
{((EyeIcon) => <EyeIcon size="sm" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}
</View>
)
}
</View>
);
return (
<>
{items2}
</>
);
}
return children;
}
const IMAGE = PreviewableMediaTypes.IMAGE;
if (IMAGE === type) {
width = media.width;
height = media.height;
value12 = null;
if (value12 == width) {
return value12;
function SinglePreviewableMedia({previewableMedia, size, message}) { // fn#84002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:2258, offset: 0x01f3345b, size: 1559 bytes, params: 2, frame: 34
var url;
var r5;
var r10;
var r22;
var r13;
var VIDEO;
var thumbnail;
var moduleValue5;
var value6;
var moduleValue6;
var getMediaObscuredReasonFromBitmask;
var value7;
var url2;
var value10;
var value11;
var object3;
var width;
var height;
var value12;
var attachmentObscurityProps;
var attachmentUrl;
var moduleValue9;
var getSrcWithWidthAndHeight;
var value16;
var items4;
var value;
const styles = useStyles();
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let object = [AccessibilityStore];
const useReducedMotion = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [object, function() {
return AccessibilityStore.useReducedMotion;
}]);
const type = previewableMedia.type;
const media = previewableMedia.media;
const icon = previewableMedia.icon;
const value3 = (ExplicitMediaRedactionUtilsModule).useShouldAgeVerifyForExplicitMedia();
const value4 = (UseContentHarmTypesModule).useEnabledHarmTypesBitmaskForMessage(message);
const value5 = (AndroidRNVHttpEngineExperimentModule).useRnvHttpEngine();
const PreviewableMediaTypes = (UsePreviewableMediaModule).PreviewableMediaTypes;
const VOICE_MESSAGE = PreviewableMediaTypes.VOICE_MESSAGE;
if (VOICE_MESSAGE === type) {
return (
<View style={{width: size, height: size}}>
{icon}
</View>
);
}
if (width <= 0) {
return value12;
const AUDIO = PreviewableMediaTypes.AUDIO;
if (AUDIO === type) {
return (
<View style={[styles.iconContainer, {width: size, height: size}]}>
{icon}
</View>
);
}
if (value12 == height) {
return value12;
const FILE = PreviewableMediaTypes.FILE;
if (FILE === type) {
return (
<View style={[styles.iconContainer, {width: size, height: size}]}>
{icon}
</View>
);
}
if (height <= 0) {
return value12;
const IMAGE = PreviewableMediaTypes.IMAGE;
if (IMAGE === type) {
width = media.width;
height = media.height;
value12 = null;
if (value12 == width) {
return value12;
}
if (width <= 0) {
return value12;
}
if (value12 == height) {
return value12;
}
if (height <= 0) {
return value12;
}
attachmentObscurityProps = (require(8367) /* metro dependency 8367: ExplicitMediaUtils */).getAttachmentObscurityProps({attachment: media,
shouldObscureSpoiler: true, enabledContentHarmTypeFlags: value4, shouldAgeVerify: value3});
attachmentUrl = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(media);
moduleValue9 = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue9.getSrcWithWidthAndHeight;
VIDEO = PreviewableMediaTypes.VIDEO;
value16 = Reflect.apply(getSrcWithWidthAndHeight, moduleValue9, [{src: attachmentUrl, sourceWidth: width,
sourceHeight: height, targetWidth: 2 * size, targetHeight: 2 * size, animated: false,
format: type !== VIDEO ? undefined : 'png'}]);
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
var obscuredMediaOverlayBindingProps = {isObscured: attachmentObscurityProps.obscure,
isSpoiler: attachmentObscurityProps.isSpoiler};
items4 = [
((Component) => <Component source={{uri: value16}} style={styles.mediaThumbnail} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
VIDEO = PreviewableMediaTypes.VIDEO;
items4[1] = (
type !== VIDEO
? value12
: (
<VideoBadge />
)
);
return (
<View {...viewProps}>
<ObscuredMediaOverlay {...obscuredMediaOverlayBindingProps}>
{items4}
</ObscuredMediaOverlay>
</View>
);
}
attachmentObscurityProps = (require(8367) /* metro dependency 8367: ExplicitMediaUtils */).getAttachmentObscurityProps({attachment: media,
shouldObscureSpoiler: true, enabledContentHarmTypeFlags: value4, shouldAgeVerify: value3});
attachmentUrl = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(media);
moduleValue9 = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue9.getSrcWithWidthAndHeight;
VIDEO = PreviewableMediaTypes.VIDEO;
value16 = Reflect.apply(getSrcWithWidthAndHeight, moduleValue9, [{src: attachmentUrl, sourceWidth: width,
sourceHeight: height, targetWidth: 2 * size, targetHeight: 2 * size, animated: false,
format: type !== VIDEO ? undefined : 'png'}]);
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
var obscuredMediaOverlayBindingProps = {isObscured: attachmentObscurityProps.obscure,
isSpoiler: attachmentObscurityProps.isSpoiler};
items4 = [((Component) => <Component source={{uri: value16}} style={styles.mediaThumbnail} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
VIDEO = PreviewableMediaTypes.VIDEO;
items4[1] = type !== VIDEO ? value12 : <VideoBadge />;
if (VIDEO === type) {
width = media.width;
height = media.height;
value12 = null;
if (value12 == width) {
return value12;
}
if (width <= 0) {
return value12;
}
if (value12 == height) {
return value12;
}
if (height <= 0) {
return value12;
}
attachmentObscurityProps = (require(8367) /* metro dependency 8367: ExplicitMediaUtils */).getAttachmentObscurityProps({attachment: media,
shouldObscureSpoiler: true, enabledContentHarmTypeFlags: value4, shouldAgeVerify: value3});
attachmentUrl = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(media);
moduleValue9 = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue9.getSrcWithWidthAndHeight;
VIDEO = PreviewableMediaTypes.VIDEO;
value16 = Reflect.apply(getSrcWithWidthAndHeight, moduleValue9, [{src: attachmentUrl, sourceWidth: width,
sourceHeight: height, targetWidth: 2 * size, targetHeight: 2 * size, animated: false,
format: type !== VIDEO ? undefined : 'png'}]);
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
var obscuredMediaOverlayBindingProps = {isObscured: attachmentObscurityProps.obscure,
isSpoiler: attachmentObscurityProps.isSpoiler};
items4 = [
((Component) => <Component source={{uri: value16}} style={styles.mediaThumbnail} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
VIDEO = PreviewableMediaTypes.VIDEO;
items4[1] = (
type !== VIDEO
? value12
: (
<VideoBadge />
)
);
return (
<View {...viewProps}>
<ObscuredMediaOverlay {...obscuredMediaOverlayBindingProps}>
{items4}
</ObscuredMediaOverlay>
</View>
);
}
const GIF = PreviewableMediaTypes.GIF;
if (GIF === type) {
url = media.video?.url;
thumbnail = media.thumbnail;
if (thumbnail == null) {
return null;
}
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
value6 = moduleValue5.getEnabledHarmTypesForChannelAndAuthorId(message.channel_id, message.author?.id);
moduleValue6 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
getMediaObscuredReasonFromBitmask = moduleValue6.getMediaObscuredReasonFromBitmask;
object = {};
object.type = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes.Embed;
object.media = media;
value7 = Reflect.apply(getMediaObscuredReasonFromBitmask, moduleValue6, [object, value6]).length > 0;
url2 = media.url;
r5 = url2 == null ? undefined : url2.split('/').pop();
value10 = '';
r10 = r5 ?? value10;
value11 = r10.startsWith(SPOILER_ATTACHMENT_PREFIX);
r22 = thumbnail.proxyURL == null ? thumbnail.url : value10 !== thumbnail.proxyURL ? thumbnail.proxyURL : thumbnail.url;
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
object3 = {isObscured: value7, isSpoiler: value11};
if (url == null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
r13 = value;
} else if (value10 === url) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
r13 = value;
} else if (useReducedMotion) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
r13 = value;
} else {
value = importDefault(9543) /* metro dependency 9543: Video */;
value = ((Component) => <Component resizeMode="cover" width={size} height={size} paused={false} src={{videoURI: url}} poster={r22} postponeRender={false} httpEngine={value5} />)(value);
r13 = value;
}
return (
<View {...viewProps}>
<ObscuredMediaOverlay {...object3}>
{r13}
</ObscuredMediaOverlay>
</View>
);
}
const STICKER = PreviewableMediaTypes.STICKER;
if (STICKER === type) {
return (
<View style={[styles.mediaThumbnailContainer, {width: size, height: size}]}>
{((Component) => <Component sticker={media} size={size} animated={!useReducedMotion} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}
</View>
);
}
return null;
}
function MultiplePreviewableMedia({previewableMedia, totalMediaCount, message}) { // fn#84004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:4586, offset: 0x01f33a72, size: 206 bytes, params: 2, frame: 23
const styles = useStyles();
return (
<View {...viewProps}>
<ObscuredMediaOverlay {...obscuredMediaOverlayBindingProps}>
{items4}
</ObscuredMediaOverlay>
<View style={styles.container}>
{((Component) => <Component cutouts={[ReactModule.useMemo(_fun84005,
[])]}><SinglePreviewableMedia previewableMedia={previewableMedia} size={56} message={message} /></Component>)(ClipView)}
<CountBadge total={totalMediaCount} />
</View>
);
function _fun84005() { // fn#84005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:4693, offset: 0x01f33b40, size: 154 bytes, params: 1, frame: 18
let value = environment.__proto__;
const BADGE_PADDING = (NativeModule).BADGE_PADDING;
const value2 = BADGE_PADDING + 5;
const value3 = PixelRatio.roundToNearestPixel(20 + 2 * BADGE_PADDING);
value = PixelRatio.roundToNearestPixel(value3 / 2);
const CutoutShape = (ClipViewModule).CutoutShape;
const RoundedRect = CutoutShape.RoundedRect;
return {shape: RoundedRect, x: 56 - value3 + value2, y: -value2, width: value3, height: value3, cornerRadius: value};
}
}
VIDEO = PreviewableMediaTypes.VIDEO;
if (VIDEO === type) {
width = media.width;
height = media.height;
value12 = null;
if (value12 == width) {
return value12;
}
if (width <= 0) {
return value12;
}
if (value12 == height) {
return value12;
}
if (height <= 0) {
return value12;
}
attachmentObscurityProps = (require(8367) /* metro dependency 8367: ExplicitMediaUtils */).getAttachmentObscurityProps({attachment: media,
shouldObscureSpoiler: true, enabledContentHarmTypeFlags: value4, shouldAgeVerify: value3});
attachmentUrl = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(media);
moduleValue9 = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue9.getSrcWithWidthAndHeight;
VIDEO = PreviewableMediaTypes.VIDEO;
value16 = Reflect.apply(getSrcWithWidthAndHeight, moduleValue9, [{src: attachmentUrl, sourceWidth: width,
sourceHeight: height, targetWidth: 2 * size, targetHeight: 2 * size, animated: false,
format: type !== VIDEO ? undefined : 'png'}]);
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
var obscuredMediaOverlayBindingProps = {isObscured: attachmentObscurityProps.obscure,
isSpoiler: attachmentObscurityProps.isSpoiler};
items4 = [((Component) => <Component source={{uri: value16}} style={styles.mediaThumbnail} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
VIDEO = PreviewableMediaTypes.VIDEO;
items4[1] = type !== VIDEO ? value12 : <VideoBadge />;
function MediaPreviewRightAccessoryContent({previewableMedia, totalMediaCount, message}) { // fn#84006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:5060, offset: 0x01f33bda, size: 139 bytes, params: 2, frame: 18
(InAppNotificationRedesignExperimentModule).useInAppNotificationRedesign('MediaPreviewRightAccessory');
const property = previewableMedia[0];
return (
<View {...viewProps}>
<ObscuredMediaOverlay {...obscuredMediaOverlayBindingProps}>
{items4}
</ObscuredMediaOverlay>
</View>
totalMediaCount === 1
? (
<SinglePreviewableMedia
previewableMedia={property}
size={64}
message={message}
/>
)
: (
<MultiplePreviewableMedia
previewableMedia={property}
totalMediaCount={totalMediaCount}
message={message}
/>
)
);
}
const GIF = PreviewableMediaTypes.GIF;
if (GIF === type) {
url = media.video?.url;
thumbnail = media.thumbnail;
if (thumbnail == null) {
return null;
}
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
value6 = moduleValue5.getEnabledHarmTypesForChannelAndAuthorId(message.channel_id, message.author?.id);
moduleValue6 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
getMediaObscuredReasonFromBitmask = moduleValue6.getMediaObscuredReasonFromBitmask;
object = {};
object.type = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes.Embed;
object.media = media;
value7 = Reflect.apply(getMediaObscuredReasonFromBitmask, moduleValue6, [object, value6]).length > 0;
url2 = media.url;
r5 = url2 == null ? undefined : url2.split('/').pop();
value10 = '';
r10 = r5 ?? value10;
value11 = r10.startsWith(SPOILER_ATTACHMENT_PREFIX);
r22 = thumbnail.proxyURL == null ? thumbnail.url : value10 !== thumbnail.proxyURL ? thumbnail.proxyURL : thumbnail.url;
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
object2 = {isObscured: value7, isSpoiler: value11};
if (url == null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
r13 = value;
} else if (value10 === url) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
r13 = value;
} else if (useReducedMotion) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
r13 = value;
} else {
value = importDefault(9543) /* metro dependency 9543: Video */;
value = ((Component) => <Component resizeMode="cover" width={size} height={size} paused={false} src={{videoURI: url}} poster={r22} postponeRender={false} httpEngine={value5} />)(value);
r13 = value;
}
function MediaPreviewRightAccessory({message}) { // fn#84007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:5535, offset: 0x01f33c65, size: 89 bytes, params: 2, frame: 17
const value2 = (UsePreviewableMediaModule).usePreviewableMedia(message);
const length = value2.length;
return (
<View {...viewProps}>
<ObscuredMediaOverlay {...object2}>
{r13}
</ObscuredMediaOverlay>
</View>
length === 0
? null
: (
<MediaPreviewRightAccessoryContent
previewableMedia={value2}
totalMediaCount={length}
message={message}
/>
)
);
}
const STICKER = PreviewableMediaTypes.STICKER;
if (STICKER === type) {
return (
<View style={[styles.mediaThumbnailContainer, {width: size, height: size}]}>
{((Component) => <Component sticker={media} size={size} animated={!useReducedMotion} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}
</View>
);
}
return null;
}
function MultiplePreviewableMedia({previewableMedia, totalMediaCount, message}) { // fn#84004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:4586, offset: 0x01f33a72, size: 206 bytes, params: 2, frame: 23
const styles = useStyles();
return (
<View style={styles.container}>
{((Component) => <Component cutouts={[env0_3.useMemo(_fun84005,
[])]}><SinglePreviewableMedia previewableMedia={previewableMedia} size={56} message={message} /></Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}
<CountBadge total={totalMediaCount} />
</View>
);
}
function MediaPreviewRightAccessoryContent({previewableMedia, totalMediaCount, message}) { // fn#84006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:5060, offset: 0x01f33bda, size: 139 bytes, params: 2, frame: 18
(require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */).useInAppNotificationRedesign('MediaPreviewRightAccessory');
const property = previewableMedia[0];
return totalMediaCount === 1 ? <SinglePreviewableMedia previewableMedia={property} size={64} message={message} /> : <MultiplePreviewableMedia previewableMedia={property} totalMediaCount={totalMediaCount} message={message} />;
}
function MediaPreviewRightAccessory({message}) { // fn#84007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:5535, offset: 0x01f33c65, size: 89 bytes, params: 2, frame: 17
const value2 = (require(10965) /* metro dependency 10965: usePreviewableMedia */).usePreviewableMedia(message);
const length = value2.length;
return length === 0 ? null : <MediaPreviewRightAccessoryContent previewableMedia={value2} totalMediaCount={length} message={message} />;
}
function _fun84005() { // fn#84005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:4693, offset: 0x01f33b40, size: 154 bytes, params: 1, frame: 18
let value = environment.__proto__;
const BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
const value2 = BADGE_PADDING + 5;
const value3 = PixelRatio.roundToNearestPixel(20 + 2 * BADGE_PADDING);
value = PixelRatio.roundToNearestPixel(value3 / 2);
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const RoundedRect = CutoutShape.RoundedRect;
return {shape: RoundedRect, x: 56 - value3 + value2, y: -value2, width: value3, height: value3, cornerRadius: value};
}
global.__d(_fun83998, 10964, [31, 27, 4502, 4503, 33, 4501, 697, 9376, 4573, 3860, 477, 4564, 6692, 8999, 632, 4821,
9796, 9564, 10965, 8367, 9546, 1477, 5475, 4838, 4841, 9543, 10970, 1305, 7599, 10973,
2]) /* metro module 10964, dependencies: [31, 27, 4502, 4503, 33, 4501, 697, 9376, 4573, 3860, 477, 4564, 6692, 8999, 632, 4821, 9796, 9564, 10965, 8367, 9546, 1477, 5475, 4838, 4841, 9543, 10970, 1305, 7599, 10973, 2] */;
@@ -1,45 +1,53 @@
/* Metro module 11211; source: modules/in_app_notifications/native/MessageFailedToSendNotification.tsx; dependencies: [31, 33, 10973, 1244, 10994, 5475, 9149, 10992, 2] */
import FastImage from '../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module09149Module from '../../../by-id/module-09149.js'; /* Metro dependency 9149 */
import * as InAppNotificationRedesignExperimentModule from './InAppNotificationRedesignExperiment.tsx'; /* Metro dependency 10973 */
import * as NotificationModule from './Notification.tsx'; /* Metro dependency 10994 */
function _fun85659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11397:6, offset: 0x01f76eb3, size: 170 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const env0_5 = {'width': 24, 'height': 24};
value = value.memo(MessageFailedToSendNotification);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageFailedToSendNotification.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/MessageFailedToSendNotification.tsx');
exports.default = value;
}
function MessageFailedToSendNotification(a0) { // fn#85660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11397:157, offset: 0x01f76f5d, size: 341 bytes, params: 2, frame: 23
let intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
a0.notification;
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
['MessageFailedToSendNotification']).redesignEnabled;
const value2 = env0_3.useMemo(function() {
var redesignEnabledBinding = redesignEnabled;
var object = {type: 'simple'};
var intl = require(dependencyMap[3]).intl;
var string = intl.string;
var t = require(dependencyMap[3]).t;
if (redesignEnabledBinding) {
object.text = Reflect.apply(string, intl, [t.Q0x94X]);
function MessageFailedToSendNotification(a0) { // fn#85660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11397:157, offset: 0x01f76f5d, size: 341 bytes, params: 2, frame: 23
let intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
a0.notification;
const useInAppNotificationRedesign = InAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, InAppNotificationRedesignExperimentModule,
['MessageFailedToSendNotification']).redesignEnabled;
const value2 = env0_3.useMemo(function() {
var redesignEnabledBinding = redesignEnabled;
var object = {type: 'simple'};
var intl = require(dependencyMap[3]).intl;
var string = intl.string;
var t = require(dependencyMap[3]).t;
if (redesignEnabledBinding) {
object.text = Reflect.apply(string, intl, [t.Q0x94X]);
} else {
object.text = Reflect.apply(string, intl, [t.LdlH2M]);
}
return object;
}, [redesignEnabled]);
const Notification = (NotificationModule).Notification;
const notificationProps = {icon: ((Component) => <Component source={Module09149Module} style={env0_5} />)(FastImage)};
if (redesignEnabled) {
notificationProps.children = ((SystemMessageText) => <SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xxRPOT)} />)((require(10992) /* metro dependency 10992: MessagePreviewText */).SystemMessageText);
notificationProps.header = value2;
} else {
object.text = Reflect.apply(string, intl, [t.LdlH2M]);
notificationProps.textChildren = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xxRPOT);
notificationProps.header = value2;
}
return object;
}, [redesignEnabled]);
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
const notificationProps = {icon: ((Component) => <Component source={require(9149) /* metro dependency 9149 */} style={env0_5} />)(importDefault(5475) /* metro dependency 5475: FastImage */)};
if (redesignEnabled) {
notificationProps.children = ((SystemMessageText) => <SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xxRPOT)} />)((require(10992) /* metro dependency 10992: MessagePreviewText */).SystemMessageText);
notificationProps.header = value2;
} else {
notificationProps.textChildren = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xxRPOT);
notificationProps.header = value2;
return <Notification {...notificationProps} />;
}
return <Notification {...notificationProps} />;
}
global.__d(_fun85659, 11211, [31, 33, 10973, 1244, 10994, 5475, 9149, 10992,
2]) /* metro module 11211, dependencies: [31, 33, 10973, 1244, 10994, 5475, 9149, 10992, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,164 +1,216 @@
/* Metro module 10996; source: modules/in_app_notifications/native/MessageNotificationHeader.tsx; dependencies: [31, 27, 4502, 3793, 1878, 33, 4501, 4573, 4805, 677, 6682, 6684, 6647, 566, 5278, 1244, 5312, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ChannelTypesModule from '../../../external/discord_common/js/shared/shared-constants/ChannelTypes.tsx'; /* Metro dependency 677 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ThreadIconModule from '../../../design/components/Icon/native/redesign/generated/ThreadIcon.tsx'; /* Metro dependency 6684 */
function _fun84157(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:6, offset: 0x01f3c15d, size: 443 bytes, params: 8, frame: 22
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
Object = global.Object;
const env0_9 = Object.freeze({radius: 12});
Object = global.Object;
const env0_10 = Object.freeze({'top': 8, 'right': 8, 'bottom': 8, 'left': 8});
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexDirection': 'row',
const env0_11 = (CreateStylesModule).createStyles({container: {'flexDirection': 'row',
'alignItems': 'center'}, headerContent: {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'},
primaryText: {flexShrink: 1}, secondaryTextContainer: {'flexDirection': 'row', 'alignItems': 'center',
'marginLeft': 2, 'gap': 2, 'flex': 1, 'overflow': 'hidden'}, separator: {marginHorizontal: 2},
icon: {'width': 16, 'height': 16}, secondaryText: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageNotificationHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/MessageNotificationHeader.tsx');
exports.default = MessageNotificationHeader;
exports.SimpleNotificationHeader = SimpleNotificationHeader;
}
function LocationText({channel, parentChannel, author, location}) { // fn#84158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:613, offset: 0x01f3c318, size: 319 bytes, params: 2, frame: 23
const Text = (TextModule).Text;
const styles = useStyles();
const styles2 = styles;
const r10 = author != null ? 'text-muted' : 'mobile-text-heading-primary';
return (
<View style={styles.secondaryTextContainer}>
{author != null && <Text variant="text-md/bold" color={r10} maxFontSizeMultiplier={1.75} style={styles.separator}>{'·'}</Text>}
{styles2.useMemo(_fun84159, [channel, parentChannel, styles.icon, r10])}
<Text
variant="text-md/semibold"
color={r10}
lineClamp={1}
style={styles.secondaryText}
>
{location}
</Text>
</View>
);
function _fun84159() { // fn#84159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:760, offset: 0x01f3c457, size: 296 bytes, params: 1, frame: 19
const ChannelTypes = (ChannelTypesModule).ChannelTypes;
const ThreadIcon = (ThreadIconModule).ThreadIcon;
const channelBinding = channel;
const parentChannelBinding = parentChannel;
const value3 = undefined;
const ChannelTypesSets = (ChannelTypesModule).ChannelTypesSets;
const PRIVATE_CHANNEL = ChannelTypesSets.PRIVATE_CHANNEL;
const r4 = PRIVATE_CHANNEL.has(channelBinding.type) ? value3 : channelBinding.type === ChannelTypes.PUBLIC_THREAD ? parentChannelBinding == null ? ThreadIcon : parentChannelBinding.type === ChannelTypes.GUILD_FORUM ? (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon : ThreadIcon : (require(6647) /* metro dependency 6647: ChannelUtils */).getSimpleChannelIconComponent(channelBinding);
const value5 = null;
return value5 != r4 ? env1_2.createElement(r4, {color: ReactNativeModule.View, style: styles.icon}) : value5;
}
function LocationText({channel, parentChannel, author, location}) { // fn#84158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:613, offset: 0x01f3c318, size: 319 bytes, params: 2, frame: 23
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
const env0_2 = styles;
const r10 = author != null ? 'text-muted' : 'mobile-text-heading-primary';
return (
<View style={styles.secondaryTextContainer}>
{author != null && <Text variant="text-md/bold" color={r10} maxFontSizeMultiplier={1.75} style={styles.separator}>{'·'}</Text>}
{env0_2.useMemo(_fun84159, [channel, parentChannel, styles.icon, r10])}
}
function MessageNotificationHeader({channel, parentChannel, guild, author, expanded, onDismiss}) { // fn#84160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:1404, offset: 0x01f3c57f, size: 1067 bytes, params: 2, frame: 33
var r12;
var r20;
var moduleValue3;
var PressableOpacity;
var intl;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const r2 = Reflect.apply(useStateFromStores, FluxModule, [[AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
}]) !== 'username' || author == null ? undefined : author.colorString;
const r21 = r2 != null ? {color: r2} : undefined;
object = {channel: channel, parentChannel: parentChannel, guild: guild};
const channel2 = object.channel;
const parentChannel2 = object.parentChannel;
guild = object.guild;
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const channelName = useChannelNameModule.computeChannelName(channel2, UserStore, RelationshipStore);
const type = channel2.type;
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
const GROUP_DM = ChannelTypes.GROUP_DM;
if (GROUP_DM === type) {
r20 = channelName;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_FORUM === type) {
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_TEXT === type) {
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_ANNOUNCEMENT === type) {
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.ANNOUNCEMENT_THREAD === type) {
if (parentChannel2 != null) {
moduleValue3 = useChannelNameModule;
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
} else {
r12 = null;
}
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.PUBLIC_THREAD === type) {
if (parentChannel2 != null) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
} else {
r12 = null;
}
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.PRIVATE_THREAD !== type) {
r20 = null;
} else {
if (parentChannel2 != null) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
} else {
r12 = null;
}
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
}
const items2 = [
author != null && ((Text) => <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1} style={[styles.primaryText,
r21]}>{author.nick}</Text>)((require(4573) /* metro dependency 4573: Text */).Text),
];
items2[1] = r20 != null && <LocationText location={r20} channel={channel} parentChannel={parentChannel} author={author} />;
const view = (
<View style={styles.headerContent}>
{items2}
</View>
);
let r5 = expanded && onDismiss != null;
if (r5) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LnEgqX)}
hitSlop={env0_10}
androidRippleConfig={env0_9}
onPress={function() {
return onDismiss('close_from_expanded');
}}
>
{((XSmallIcon) => <XSmallIcon color="icon-subtle" style={{'height': 20,
'width': 20}} />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}
</PressableOpacity>
);
}
return (
<View style={styles.container}>
{view}
{r5}
</View>
);
}
function SimpleNotificationHeader({text, secondaryText, labelStyle}) { // fn#84163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:2989, offset: 0x01f3c9c0, size: 315 bytes, params: 2, frame: 28
var r5;
var items3;
const styles = useStyles();
const Text = (TextModule).Text;
const text2 = (
<Text
variant="text-md/semibold"
color={r10}
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.secondaryText}
style={[styles.primaryText, labelStyle]}
>
{location}
{text}
</Text>
</View>
);
}
function MessageNotificationHeader({channel, parentChannel, guild, author, expanded, onDismiss}) { // fn#84160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:1404, offset: 0x01f3c57f, size: 1067 bytes, params: 2, frame: 33
var object2;
var r12;
var r20;
var moduleValue3;
var PressableOpacity;
var intl;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const r2 = Reflect.apply(useStateFromStores, fluxModule, [[AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
}]) !== 'username' || author == null ? undefined : author.colorString;
const r21 = r2 != null ? {color: r2} : undefined;
object2 = {channel: channel, parentChannel: parentChannel, guild: guild};
const channel2 = object2.channel;
const parentChannel2 = object2.parentChannel;
guild = object2.guild;
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const channelName = useChannelNameModule.computeChannelName(channel2, UserStore, RelationshipStore);
const type = channel2.type;
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
const GROUP_DM = ChannelTypes.GROUP_DM;
if (GROUP_DM === type) {
r20 = channelName;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_FORUM === type) {
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_TEXT === type) {
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_ANNOUNCEMENT === type) {
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.ANNOUNCEMENT_THREAD === type) {
if (parentChannel2 != null) {
moduleValue3 = useChannelNameModule;
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
);
const value3 = secondaryText != null;
if (value3) {
var viewBinding2Props = {style: styles.secondaryTextContainer};
items3 = [
<Text
variant="text-md/bold"
color="text-muted"
maxFontSizeMultiplier={1.75}
style={styles.separator}
>
{'·'}
</Text>,
];
items3[1] = (
<Text
variant="text-md/semibold"
color="text-muted"
lineClamp={1}
style={styles.secondaryText}
>
{secondaryText}
</Text>
);
r5 = (
<View {...viewBinding2Props}>
{items3}
</View>
);
} else {
r12 = null;
r5 = value3;
}
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.PUBLIC_THREAD === type) {
if (parentChannel2 != null) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
} else {
r12 = null;
}
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.PRIVATE_THREAD !== type) {
r20 = null;
} else {
if (parentChannel2 != null) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
} else {
r12 = null;
}
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
return (
<View style={styles.container}>
{text2}
{r5}
</View>
);
}
const items2 = [author != null && ((Text) => <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1} style={[styles.primaryText,
r21]}>{author.nick}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
items2[1] = r20 != null && <LocationText location={r20} channel={channel} parentChannel={parentChannel} author={author} />;
const view = <View style={styles.headerContent}>{items2}</View>;
let r5 = expanded && onDismiss != null;
if (r5) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LnEgqX)} hitSlop={env0_10} androidRippleConfig={env0_9} onPress={function() {
return onDismiss('close_from_expanded');
}}>{((XSmallIcon) => <XSmallIcon color="icon-subtle" style={{'height': 20,
'width': 20}} />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>;
}
return (
<View style={styles.container}>
{view}
{r5}
</View>
);
}
function SimpleNotificationHeader({text, secondaryText, labelStyle}) { // fn#84163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:2989, offset: 0x01f3c9c0, size: 315 bytes, params: 2, frame: 28
var r5;
var items3;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text2 = <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1} style={[styles.primaryText,
labelStyle]}>{text}</Text>;
const value3 = secondaryText != null;
if (value3) {
var viewBinding2Props = {style: styles.secondaryTextContainer};
items3 = [<Text variant="text-md/bold" color="text-muted" maxFontSizeMultiplier={1.75} style={styles.separator}>{'·'}</Text>];
items3[1] = <Text variant="text-md/semibold" color="text-muted" lineClamp={1} style={styles.secondaryText}>{secondaryText}</Text>;
r5 = <View {...viewBinding2Props}>{items3}</View>;
} else {
r5 = value3;
}
return (
<View style={styles.container}>
{text2}
{r5}
</View>
);
}
function _fun84159() { // fn#84159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:760, offset: 0x01f3c457, size: 296 bytes, params: 1, frame: 19
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
const ThreadIcon = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
const channelBinding = channel;
const parentChannelBinding = parentChannel;
const value3 = undefined;
const ChannelTypesSets = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypesSets;
const PRIVATE_CHANNEL = ChannelTypesSets.PRIVATE_CHANNEL;
const r4 = PRIVATE_CHANNEL.has(channelBinding.type) ? value3 : channelBinding.type === ChannelTypes.PUBLIC_THREAD ? parentChannelBinding == null ? ThreadIcon : parentChannelBinding.type === ChannelTypes.GUILD_FORUM ? (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon : ThreadIcon : (require(6647) /* metro dependency 6647: ChannelUtils */).getSimpleChannelIconComponent(channelBinding);
const value5 = null;
return value5 != r4 ? env1_2.createElement(r4, {color: env0_3, style: styles.icon}) : value5;
}
global.__d(_fun84157, 10996, [31, 27, 4502, 3793, 1878, 33, 4501, 4573, 4805, 677, 6682, 6684, 6647, 566, 5278,
1244, 5312,
2]) /* metro module 10996, dependencies: [31, 27, 4502, 3793, 1878, 33, 4501, 4573, 4805, 677, 6682, 6684, 6647, 566, 5278, 1244, 5312, 2] */;
@@ -1,111 +1,140 @@
/* Metro module 10997; source: modules/in_app_notifications/native/MessageNotificationReactBar.tsx; dependencies: [31, 27, 8532, 1881, 33, 4501, 697, 1478, 10994, 10998, 10921, 10999, 8529, 7152, 7151, 4017, 11000, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as EmojiConstantsModule from '../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as ReactionActionCreatorsModule from '../../reactions/ReactionActionCreators.tsx'; /* Metro dependency 7151 */
import * as MessageReactionsTypesModule from '../../messages/MessageReactionsTypes.tsx'; /* Metro dependency 7152 */
import * as OpenEmojiPickerActionSheetModule from '../../emoji_picker/native/openEmojiPickerActionSheet.tsx'; /* Metro dependency 8529 */
import * as EmojiPickerListConstantsModule from '../../emoji_picker/native/components/EmojiPickerListConstants.tsx'; /* Metro dependency 8532 */
import * as InAppNotificationUtilsModule from '../InAppNotificationUtils.tsx'; /* Metro dependency 10921 */
import * as NotificationModule from './Notification.tsx'; /* Metro dependency 10994 */
import * as UseEmojisForReactionRowModule from '../../reactions/native/useEmojisForReactionRow.tsx'; /* Metro dependency 10998 */
import * as InAppNotificationTypesModule from '../InAppNotificationTypes.tsx'; /* Metro dependency 10999 */
import * as EmojiReactionRowButtonModule from '../../reactions/native/EmojiReactionRowButton.tsx'; /* Metro dependency 11000 */
function _fun84164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:6, offset: 0x01f3cafb, size: 350 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Keyboard;
const env0_5 = value.View;
const env0_6 = (require(8532) /* metro dependency 8532: EmojiPickerListConstants */).EmojiPickerSource;
const env0_7 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'alignSelf': 'center', 'flexDirection': 'row', 'gap': 8, 'alignItems': 'center',
object = {container: {'alignSelf': 'center', 'flexDirection': 'row', 'gap': 8, 'alignItems': 'center',
'justifyContent': 'space-between', 'paddingHorizontal': 12, 'paddingVertical': 10, 'width': '100%'}};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.divider = {'height': 1, 'backgroundColor': null, 'margin': 0, 'padding': 0, backgroundColor: BORDER_SUBTLE};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.roundButton = object4;
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageNotificationReactBar.tsx');
object.divider = {'height': 1, 'backgroundColor': null, 'margin': 0, 'padding': 0, backgroundColor: BORDER_SUBTLE};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.roundButton = object3;
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/MessageNotificationReactBar.tsx');
exports.MessageNotificationReactBar = MessageNotificationReactBar;
}
function MessageNotificationReactBar({notification, onReactionPress, animationStyle}) { // fn#84165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:667, offset: 0x01f3cc59, size: 435 bytes, params: 2, frame: 26
const styles = useStyles();
const width = (UseWindowDimensionsNative)().width;
const Math = global.Math;
const min = Math.min;
const NOTIFICATION_MAX_WIDTH = (NotificationModule).NOTIFICATION_MAX_WIDTH;
const PX_24 = (Native).space.PX_24;
const value3 = (UseEmojisForReactionRowModule).useEmojisForReactionRow(notification.channel,
Reflect.apply(min, Math, [NOTIFICATION_MAX_WIDTH, width - 2 * PX_24]), 48);
const binding = env0_3;
const value4 = binding.useCallback(_fun84166, [onReactionPress, notification]);
var env0_3 = binding.useCallback(_fun84167, [notification, onReactionPress]);
const View2 = (ReanimatedRexport).View;
const items2 = [
<View style={styles.divider} />,
];
const value = value3.map(_fun84168);
const EmojiPickerRowButton = (EmojiReactionRowButtonModule).EmojiPickerRowButton;
items2[1] = (
<View style={styles.container}>
{value}
<EmojiPickerRowButton
emojiContainerSize={40}
onPress={value4}
iconSize="sm"
styles={styles.roundButton}
/>
</View>
);
return (
<View2 style={animationStyle}>
{items2}
</View2>
);
function _fun84166() { // fn#84166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:919, offset: 0x01f3ce0c, size: 221 bytes, params: 1, frame: 18
Keyboard.dismiss();
const trackInAppNotificationAccessoryClicked = InAppNotificationUtilsModule.trackInAppNotificationAccessoryClicked;
const notificationBinding = notification;
const InAppNotificationAccessoryTypes = (InAppNotificationTypesModule).InAppNotificationAccessoryTypes;
const REACTION_PICKER_BUTTON = InAppNotificationAccessoryTypes.REACTION_PICKER_BUTTON;
Reflect.apply(trackInAppNotificationAccessoryClicked, InAppNotificationUtilsModule, [notificationBinding,
REACTION_PICKER_BUTTON]);
const openEmojiPickerActionSheet = OpenEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const object = {};
object.onPressEmoji = onReactionPress;
object.channel = notificationBinding.channel;
const REACTION = EmojiIntention.REACTION;
object.pickerIntention = REACTION;
const ReactionTypes = (MessageReactionsTypesModule).ReactionTypes;
const NORMAL = ReactionTypes.NORMAL;
object.reactionType = NORMAL;
const ReactionLocations = (ReactionActionCreatorsModule).ReactionLocations;
const IN_APP_NOTIFICATION = ReactionLocations.IN_APP_NOTIFICATION;
object.analyticsObject = IN_APP_NOTIFICATION;
object.startExpanded = false;
const NOTIFICATION = EmojiPickerSource.NOTIFICATION;
object.source = NOTIFICATION;
Reflect.apply(openEmojiPickerActionSheet, OpenEmojiPickerActionSheetModule, [object]);
}
function MessageNotificationReactBar({notification, onReactionPress, animationStyle}) { // fn#84165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:667, offset: 0x01f3cc59, size: 435 bytes, params: 2, frame: 26
const styles = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const Math = global.Math;
const min = Math.min;
const NOTIFICATION_MAX_WIDTH = (require(10994) /* metro dependency 10994: Notification */).NOTIFICATION_MAX_WIDTH;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const value3 = (require(10998) /* metro dependency 10998: useEmojisForReactionRow */).useEmojisForReactionRow(notification.channel,
Reflect.apply(min, Math, [NOTIFICATION_MAX_WIDTH, width - 2 * PX_24]), 48);
const binding = env0_3;
const value4 = binding.useCallback(_fun84166, [onReactionPress, notification]);
var env0_3 = binding.useCallback(_fun84167, [notification, onReactionPress]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [<View style={styles.divider} />];
const value = value3.map(_fun84168);
const EmojiPickerRowButton = (require(11000) /* metro dependency 11000: EmojiReactionRowButton */).EmojiPickerRowButton;
items2[1] = <View style={styles.container}>{value}<EmojiPickerRowButton emojiContainerSize={40} onPress={value4} iconSize="sm" styles={styles.roundButton} /></View>;
return (
<View2 style={animationStyle}>
{items2}
</View2>
);
}
function _fun84167(a0) { // fn#84167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:1321, offset: 0x01f3cee9, size: 88 bytes, params: 2, frame: 18
let value = environment.__proto__;
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
const trackInAppNotificationAccessoryClicked = value.trackInAppNotificationAccessoryClicked;
const notificationBinding = notification;
const InAppNotificationAccessoryTypes = (InAppNotificationTypesModule).InAppNotificationAccessoryTypes;
const REACTION_BUTTON = InAppNotificationAccessoryTypes.REACTION_BUTTON;
Reflect.apply(trackInAppNotificationAccessoryClicked, value, [notificationBinding, REACTION_BUTTON]);
if (a0 != null) {
onReactionPress(a0);
}
}
function _fun84166() { // fn#84166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:919, offset: 0x01f3ce0c, size: 221 bytes, params: 1, frame: 18
Keyboard.dismiss();
const inAppNotificationUtilsModule = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
const trackInAppNotificationAccessoryClicked = inAppNotificationUtilsModule.trackInAppNotificationAccessoryClicked;
const notificationBinding = notification;
const InAppNotificationAccessoryTypes = (require(10999) /* metro dependency 10999: InAppNotificationTypes */).InAppNotificationAccessoryTypes;
const REACTION_PICKER_BUTTON = InAppNotificationAccessoryTypes.REACTION_PICKER_BUTTON;
Reflect.apply(trackInAppNotificationAccessoryClicked, inAppNotificationUtilsModule, [notificationBinding,
REACTION_PICKER_BUTTON]);
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const object2 = {};
object2.onPressEmoji = onReactionPress;
object2.channel = notificationBinding.channel;
const REACTION = EmojiIntention.REACTION;
object2.pickerIntention = REACTION;
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
const NORMAL = ReactionTypes.NORMAL;
object2.reactionType = NORMAL;
const ReactionLocations = (require(7151) /* metro dependency 7151: ReactionActionCreators */).ReactionLocations;
const IN_APP_NOTIFICATION = ReactionLocations.IN_APP_NOTIFICATION;
object2.analyticsObject = IN_APP_NOTIFICATION;
object2.startExpanded = false;
const NOTIFICATION = EmojiPickerSource.NOTIFICATION;
object2.source = NOTIFICATION;
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [object2]);
}
function _fun84168(a0, a1) { // fn#84168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:1561, offset: 0x01f3cf41, size: 148 bytes, params: 3, frame: 20
const value = a0;
const EmojiReactionRowButton = (EmojiReactionRowButtonModule).EmojiReactionRowButton;
const object = {'emoji': null, 'onPress': null, 'emojiSize': 20, 'emojiFontSize': 16, 'emojiContainerSize': 40,
'emojiLineHeight': 22};
const value3 = null;
object.emoji = value3 != value ? value : value3;
object.onPress = onPress_84169;
object.styles = styles.roundButton;
const getEmojiKey = EmojiReactionRowButtonModule.getEmojiKey;
return (
<EmojiReactionRowButton {...object} key={Reflect.apply(getEmojiKey, EmojiReactionRowButtonModule, [value,
a1])} />
);
function onPress_84169() { // fn#84169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:1632, offset: 0x00e6dcc9, size: 23 bytes, params: 1, frame: 11
return env1_3(env0_0);
}
}
function _fun84167(a0) { // fn#84167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:1321, offset: 0x01f3cee9, size: 88 bytes, params: 2, frame: 18
let value = environment.__proto__;
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
const trackInAppNotificationAccessoryClicked = value.trackInAppNotificationAccessoryClicked;
const notificationBinding = notification;
const InAppNotificationAccessoryTypes = (require(10999) /* metro dependency 10999: InAppNotificationTypes */).InAppNotificationAccessoryTypes;
const REACTION_BUTTON = InAppNotificationAccessoryTypes.REACTION_BUTTON;
Reflect.apply(trackInAppNotificationAccessoryClicked, value, [notificationBinding, REACTION_BUTTON]);
if (a0 != null) {
onReactionPress(a0);
}
}
function _fun84168(a0, a1) { // fn#84168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:1561, offset: 0x01f3cf41, size: 148 bytes, params: 3, frame: 20
const value = a0;
const EmojiReactionRowButton = (require(11000) /* metro dependency 11000: EmojiReactionRowButton */).EmojiReactionRowButton;
const object2 = {'emoji': null, 'onPress': null, 'emojiSize': 20, 'emojiFontSize': 16, 'emojiContainerSize': 40,
'emojiLineHeight': 22};
const value3 = null;
object2.emoji = value3 != value ? value : value3;
object2.onPress = onPress_84169;
object2.styles = styles.roundButton;
const emojiReactionRowButtonModule = require(11000) /* metro dependency 11000: EmojiReactionRowButton */;
const getEmojiKey = emojiReactionRowButtonModule.getEmojiKey;
return (
<EmojiReactionRowButton {...object2} key={Reflect.apply(getEmojiKey, emojiReactionRowButtonModule, [value,
a1])} />
);
}
global.__d(_fun84164, 10997, [31, 27, 8532, 1881, 33, 4501, 697, 1478, 10994, 10998, 10921, 10999, 8529, 7152, 7151,
4017, 11000,
2]) /* metro module 10997, dependencies: [31, 27, 8532, 1881, 33, 4501, 697, 1478, 10994, 10998, 10921, 10999, 8529, 7152, 7151, 4017, 11000, 2] */;
@@ -1,230 +1,313 @@
/* Metro module 10992; source: modules/in_app_notifications/native/MessagePreviewText.tsx; dependencies: [31, 27, 3794, 10963, 33, 4501, 478, 697, 4845, 10975, 4573, 5475, 10965, 10993, 678, 1244, 2] */
import MessageRecord from '../../../records/MessageRecord.tsx'; /* Metro dependency 3794 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as MessageRecordModule from '../../../records/MessageRecord.tsx'; /* Metro dependency 3794 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as InAppNotificationConstantsModule from './InAppNotificationConstants.tsx'; /* Metro dependency 10963 */
import * as ChannelRowPreviewModule from '../../main_tabs_v2/native/shared_components/ChannelRowPreview.tsx'; /* Metro dependency 10975 */
import * as UsePreviewableMediaTextModule from './hooks/usePreviewableMediaText.tsx'; /* Metro dependency 10993 */
function _fun84116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:6, offset: 0x01f39a27, size: 760 bytes, params: 8, frame: 26
var object7;
const env0_0 = require;
const closure = SystemMessageText;
const SystemMessageText2 = SystemMessageText;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const messageRecord = importDefault(3794) /* metro dependency 3794: MessageRecord */;
const env0_6 = (require(3794) /* metro dependency 3794: MessageRecord */).MessageSnapshotRecord;
const env0_7 = (require(10963) /* metro dependency 10963: InAppNotificationConstants */).IN_APP_NOTIFICATION_MAX_HEIGHT;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const object8 = {fontStyle: 'italic'};
object8.fontFamily = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'ggsans-NormalItalic, NotoSans-NormalItalic' : 'ggsans-MediumItalic, NotoSans-MediumItalic';
const env0_10 = Reflect.apply(createStyles, value, [{italic: object8}]);
const object2 = {fontStyle: 'italic'};
object2.fontFamily = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'ggsans-NormalItalic, NotoSans-NormalItalic' : 'ggsans-MediumItalic, NotoSans-MediumItalic';
const env0_10 = Reflect.apply(createStyles, value, [{italic: object2}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object7 = {};
const object9 = {};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object = {};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.paddingTop = PX_8;
object3.paddingTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.paddingBottom = PX_8;
object3.paddingBottom = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.paddingRight = PX_8;
object3.paddingRight = PX_8;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
object9.flexDirection = 'row';
object9.overflow = 'hidden';
object7.embedContainer = object9;
const object10 = {width: 4};
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object3.flexDirection = 'row';
object3.overflow = 'hidden';
object.embedContainer = object3;
const object4 = {width: 4};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.marginTop = -PX_8;
object4.marginTop = -PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.marginBottom = -PX_8;
object10.alignSelf = 'stretch';
object7.embedAccentBar = object10;
const object11 = {flex: 1};
object4.marginBottom = -PX_8;
object4.alignSelf = 'stretch';
object.embedAccentBar = object4;
const object5 = {flex: 1};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object11.gap = PX_4;
object5.gap = PX_4;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object11.paddingVertical = PX_4;
object5.paddingVertical = PX_4;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object11.paddingHorizontal = PX_8;
object7.embedTextContainer = object11;
const object12 = {'borderRadius': null, 'overflow': 'hidden', 'height': 60};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object12.width = undefined;
object7.embedMediaContainer = object12;
object7.embedMedia = {'width': '100%', 'height': '100%'};
const env0_11 = Reflect.apply(createStyles, value, [object7]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessagePreviewText.tsx');
object5.paddingHorizontal = PX_8;
object.embedTextContainer = object5;
const object6 = {'borderRadius': null, 'overflow': 'hidden', 'height': 60};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.width = undefined;
object.embedMediaContainer = object6;
object.embedMedia = {'width': '100%', 'height': '100%'};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/MessagePreviewText.tsx');
exports.default = MessagePreviewText;
exports.SystemMessageText = closure;
}
exports.SystemMessageText = SystemMessageText2;
function NativeMessagePreviewContent({message, lineClamp, maxHeight}) { // fn#84117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1025, offset: 0x01f39d1f, size: 95 bytes, params: 2, frame: 18
const NativeChannelRowPreview = (ChannelRowPreviewModule).NativeChannelRowPreview;
return (
<View>
<NativeChannelRowPreview
message={message}
lineClamp={lineClamp}
maxHeight={maxHeight}
/>
</View>
);
}
function NativeMessagePreviewContent({message, lineClamp, maxHeight}) { // fn#84117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1025, offset: 0x01f39d1f, size: 95 bytes, params: 2, frame: 18
const NativeChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeChannelRowPreview;
return (
<View>
<NativeChannelRowPreview
function SystemMessageText({text}) { // fn#84118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1193, offset: 0x01f39d7e, size: 139 bytes, params: 2, frame: 17
const styles = useStyles();
const r6 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'text-md/normal' : 'text-md/medium';
const Text = (TextModule).Text;
return (
<Text
variant={r6}
color="text-subtle"
style={styles.italic}
lineClamp={2}
>
{text}
</Text>
);
}
function EmbedMediaThumbnail({media}) { // fn#84119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1386, offset: 0x01f39e09, size: 204 bytes, params: 2, frame: 19
const styles = useStyles();
const r9 = media.proxyURL ?? media.url;
const value2 = media.width / media.height;
const Number = global.Number;
return (
<View style={[styles.embedMediaContainer, {aspectRatio: Number.isFinite(value2) && value2 > 0 ? value2 : 1}]}>
{((Component) => <Component source={{uri: r9}} style={styles.embedMedia} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
}
function EmbedCard({embed}) { // fn#84120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1656, offset: 0x01f39ed5, size: 592 bytes, params: 2, frame: 31
const styles = useStyles();
const name = embed.provider?.name;
const name2 = embed.author?.name;
const rawTitle = embed.rawTitle;
const r9 = embed.thumbnail ?? embed.image;
let color = embed.color;
if (color != null) {
color = embed.color;
color = color.toLowerCase() === '#ffffff' ? undefined : embed.color;
} else {
color = undefined;
}
const items2 = [
color != null && <View style={[styles.embedAccentBar, {backgroundColor: color}]} />,
];
const items3 = [
name != null && ((Text) => <Text variant="text-xxs/normal" color="text-subtle" lineClamp={1}>{name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text),
];
items3[1] = name2 != null && ((Text) => <Text variant="text-xs/medium" color="text-default" lineClamp={1}>{name2}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[2] = rawTitle != null && ((Text) => <Text variant="text-xs/medium" color="text-link" lineClamp={name == null && name2 == null ? 3 : 1}>{rawTitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[3] = embed.rawDescription != null && ((Text) => <Text variant="text-xs/medium" color="text-default" lineClamp={3}>{embed.rawDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items2[1] = (
<View style={styles.embedTextContainer}>
{items3}
</View>
);
items2[2] = r9 != null && <EmbedMediaThumbnail media={r9} />;
return (
<View style={styles.embedContainer}>
{items2}
</View>
);
}
function MessagePreviewText({message, lineClamp, maxHeight}) { // fn#84121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2523, offset: 0x01f3a125, size: 990 bytes, params: 2, frame: 34
var r6;
var r3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var property;
const value2 = (require(10965) /* metro dependency 10965: usePreviewableMedia */).usePreviewableMedia(message);
const {text,
secondaryText} = (UsePreviewableMediaTextModule).usePreviewableMediaText({previewableMedia: value2});
const value4 = useGetInitialMessagePreview({message: message});
const value5 = ReactModule.useMemo(function() {
return message.embeds.filter(_fun84127);
}, [message.embeds]);
let length = value5.length;
if (length > 0) {
property = value5[0];
return (
property.type !== (require(678) /* metro dependency 678: MessageEmbedTypes */).MessageEmbedTypes.GIFV
? (
<View>
<NativeMessagePreviewContent
message={value4}
lineClamp={2}
maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT}
/>
<EmbedCard embed={property} />
</View>
)
: (
text != null
? (
<SystemMessageText text={text} />
)
: (
<View>
<NativeMessagePreviewContent
message={value4}
lineClamp={2}
maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT}
/>
<EmbedCard embed={property} />
</View>
)
)
);
}
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(message)) {
length = message.messageSnapshots.length;
r6 = length > 0 && message.messageSnapshots[0].message.content.length > 0;
length = value2.length;
r3 = length > 0 && value2[0].type === (require(10965) /* metro dependency 10965: usePreviewableMedia */).PreviewableMediaTypes.GIF;
length = value2.length;
r3 = (
length > 0
? (
r6
? (
r3
? (
<SystemMessageText
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9ddYKt'])}
/>
)
: (
<NativeMessagePreviewContent
message={value4}
lineClamp={lineClamp}
maxHeight={maxHeight}
/>
)
)
: (
<SystemMessageText
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9ddYKt'])}
/>
)
)
: (
<NativeMessagePreviewContent
message={value4}
lineClamp={lineClamp}
maxHeight={maxHeight}
/>
)
);
return r3;
}
if (message.content.length > 0) {
return (
<NativeMessagePreviewContent
message={value4}
lineClamp={lineClamp}
maxHeight={maxHeight}
/>
);
}
if (value2.length > 0) {
if (text !== null) {
items2 = [
<SystemMessageText text={text} />,
];
items2[1] = secondaryText !== null && ((Text) => <Text variant="redesign/message-preview/medium" color="text-link" lineClamp={2}>{secondaryText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
return (
<View>
{items2}
</View>
);
}
}
if (message.poll != null) {
return (
<View>
<SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n3shVJ)} />
{((Text) => <Text variant="redesign/message-preview/medium" color="text-default" lineClamp={2}>{message.poll.question.text}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
}
return (
<NativeMessagePreviewContent
message={message}
lineClamp={lineClamp}
maxHeight={maxHeight}
/>
</View>
);
}
function SystemMessageText({text}) { // fn#84118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1193, offset: 0x01f39d7e, size: 139 bytes, params: 2, frame: 17
const styles = useStyles();
const r6 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'text-md/normal' : 'text-md/medium';
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={r6}
color="text-subtle"
style={styles.italic}
lineClamp={2}
>
{text}
</Text>
);
}
function EmbedMediaThumbnail({media}) { // fn#84119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1386, offset: 0x01f39e09, size: 204 bytes, params: 2, frame: 19
const styles = useStyles();
const r9 = media.proxyURL ?? media.url;
const value2 = media.width / media.height;
const Number = global.Number;
return (
<View style={[styles.embedMediaContainer, {aspectRatio: Number.isFinite(value2) && value2 > 0 ? value2 : 1}]}>
{((Component) => <Component source={{uri: r9}} style={styles.embedMedia} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
}
function EmbedCard({embed}) { // fn#84120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1656, offset: 0x01f39ed5, size: 592 bytes, params: 2, frame: 31
const styles = useStyles();
const name = embed.provider?.name;
const name2 = embed.author?.name;
const rawTitle = embed.rawTitle;
const r9 = embed.thumbnail ?? embed.image;
let color = embed.color;
if (color != null) {
color = embed.color;
color = color.toLowerCase() === '#ffffff' ? undefined : embed.color;
} else {
color = undefined;
}
const items2 = [color != null && <View style={[styles.embedAccentBar, {backgroundColor: color}]} />];
const items3 = [name != null && ((Text) => <Text variant="text-xxs/normal" color="text-subtle" lineClamp={1}>{name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
items3[1] = name2 != null && ((Text) => <Text variant="text-xs/medium" color="text-default" lineClamp={1}>{name2}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[2] = rawTitle != null && ((Text) => <Text variant="text-xs/medium" color="text-link" lineClamp={name == null && name2 == null ? 3 : 1}>{rawTitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[3] = embed.rawDescription != null && ((Text) => <Text variant="text-xs/medium" color="text-default" lineClamp={3}>{embed.rawDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items2[1] = <View style={styles.embedTextContainer}>{items3}</View>;
items2[2] = r9 != null && <EmbedMediaThumbnail media={r9} />;
return (
<View style={styles.embedContainer}>
{items2}
</View>
);
}
function MessagePreviewText({message, lineClamp, maxHeight}) { // fn#84121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2523, offset: 0x01f3a125, size: 990 bytes, params: 2, frame: 34
var r6;
var r3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var property;
const value2 = (require(10965) /* metro dependency 10965: usePreviewableMedia */).usePreviewableMedia(message);
const {text,
secondaryText} = (require(10993) /* metro dependency 10993: usePreviewableMediaText */).usePreviewableMediaText({previewableMedia: value2});
const value4 = useGetInitialMessagePreview({message: message});
const value5 = env0_3.useMemo(function() {
return message.embeds.filter(_fun84127);
}, [message.embeds]);
let length = value5.length;
if (length > 0) {
property = value5[0];
return property.type !== (require(678) /* metro dependency 678: MessageEmbedTypes */).MessageEmbedTypes.GIFV ? <View><NativeMessagePreviewContent message={value4} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} /><EmbedCard embed={property} /></View> : text != null ? <SystemMessageText text={text} /> : <View><NativeMessagePreviewContent message={value4} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} /><EmbedCard embed={property} /></View>;
}
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(message)) {
length = message.messageSnapshots.length;
r6 = length > 0 && message.messageSnapshots[0].message.content.length > 0;
length = value2.length;
r3 = length > 0 && value2[0].type === (require(10965) /* metro dependency 10965: usePreviewableMedia */).PreviewableMediaTypes.GIF;
length = value2.length;
r3 = length > 0 ? r6 ? r3 ? <SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9ddYKt'])} /> : <NativeMessagePreviewContent message={value4} lineClamp={lineClamp} maxHeight={maxHeight} /> : <SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9ddYKt'])} /> : <NativeMessagePreviewContent message={value4} lineClamp={lineClamp} maxHeight={maxHeight} />;
return r3;
}
if (message.content.length > 0) {
return (
<NativeMessagePreviewContent
message={value4}
lineClamp={lineClamp}
maxHeight={maxHeight}
/>
);
}
if (value2.length > 0) {
if (text !== null) {
items2 = [<SystemMessageText text={text} />];
items2[1] = secondaryText !== null && ((Text) => <Text variant="redesign/message-preview/medium" color="text-link" lineClamp={2}>{secondaryText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
return (
<View>
{items2}
</View>
);
function useGetInitialMessagePreview({message}) { // fn#84122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2712, owner: MessagePreviewText.useGetInitialMessagePreview, offset: 0x01f3a503, size: 49 bytes, params: 2, frame: 14
return env1_3.useMemo(_fun84123, [message]);
function _fun84123() { // fn#84123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2780, offset: 0x01f3a534, size: 167 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__.__proto__;
const messageRecord2 = new MessageRecord(message);
messageRecord2.attachments = [];
messageRecord2.stickerItems = [];
if (messageRecord2.embeds.length > 0) {
messageRecord2.embeds = messageRecord2.embeds.filter(function(a0) {
return a0.image == null && a0.thumbnail == null;
});
}
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(message)) {
messageRecord2.messageSnapshots = messageRecord2.messageSnapshots.map(_fun84125);
}
return messageRecord2;
function _fun84125({message}) { // fn#84125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2974, offset: 0x01f3a5f9, size: 86 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__.__proto__;
const object = {};
object.message = message.merge({attachments: [], embeds: [], stickerItems: []});
value = Object.create(MessageSnapshotRecord.prototype, {constructor: {value: MessageSnapshotRecord}});
const messageSnapshotRecord = new MessageSnapshotRecord(object);
return messageSnapshotRecord instanceof Object ? messageSnapshotRecord : value;
}
}
}
function _fun84126() { // fn#84126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:3120, offset: 0x01f3a64f, size: 34 bytes, params: 1, frame: 11
return message.embeds.filter(function(a0) {
return a0.image != null || a0.thumbnail != null;
});
}
}
if (message.poll != null) {
return (
<View>
<SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n3shVJ)} />
{((Text) => <Text variant="redesign/message-preview/medium" color="text-default" lineClamp={2}>{message.poll.question.text}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
}
return (
<NativeMessagePreviewContent
message={message}
lineClamp={lineClamp}
maxHeight={maxHeight}
/>
);
}
function useGetInitialMessagePreview({message}) { // fn#84122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2712, owner: MessagePreviewText.useGetInitialMessagePreview, offset: 0x01f3a503, size: 49 bytes, params: 2, frame: 14
return env1_3.useMemo(_fun84123, [message]);
}
function _fun84126() { // fn#84126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:3120, offset: 0x01f3a64f, size: 34 bytes, params: 1, frame: 11
return message.embeds.filter(function(a0) {
return a0.image != null || a0.thumbnail != null;
});
}
function _fun84123() { // fn#84123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2780, offset: 0x01f3a534, size: 167 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__.__proto__;
const messageRecord = new MessageRecord(message);
messageRecord.attachments = [];
messageRecord.stickerItems = [];
if (messageRecord.embeds.length > 0) {
messageRecord.embeds = messageRecord.embeds.filter(function(a0) {
return a0.image == null && a0.thumbnail == null;
});
}
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(message)) {
messageRecord.messageSnapshots = messageRecord.messageSnapshots.map(_fun84125);
}
return messageRecord;
}
function _fun84125({message}) { // fn#84125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2974, offset: 0x01f3a5f9, size: 86 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__.__proto__;
const object2 = {};
object2.message = message.merge({attachments: [], embeds: [], stickerItems: []});
value = Object.create(MessageSnapshotRecord.prototype, {constructor: {value: MessageSnapshotRecord}});
const messageSnapshotRecord = new MessageSnapshotRecord(object2);
return messageSnapshotRecord instanceof Object ? messageSnapshotRecord : value;
function _fun84127(a0) { // fn#84127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:3141, offset: 0x01d8f819, size: 30 bytes, params: 2, frame: 4
return a0.image != null || a0.thumbnail != null;
}
global.__d(_fun84116, 10992, [31, 27, 3794, 10963, 33, 4501, 478, 697, 4845, 10975, 4573, 5475, 10965, 10993, 678,
1244,
2]) /* metro module 10992, dependencies: [31, 27, 3794, 10963, 33, 4501, 478, 697, 4845, 10975, 4573, 5475, 10965, 10993, 678, 1244, 2] */;
@@ -1,313 +1,372 @@
/* Metro module 11001; source: modules/in_app_notifications/native/MessageReplyInput.tsx; dependencies: [5, 57, 31, 27, 1379, 1881, 33, 4501, 697, 1357, 4017, 4504, 11002, 5463, 4634, 4805, 6992, 10921, 10999, 4081, 7076, 7067, 8529, 11208, 8341, 11209, 1244, 6995, 7950, 4058, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseChannelName from '../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import GetEmojiText from '../../emojis/utils/getEmojiText.tsx'; /* Metro dependency 11208 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as MobileVisualRefreshExperimentModule from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as EmojiConstantsModule from '../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SendMessageIconModule from '../../../design/components/Icon/native/redesign/generated/SendMessageIcon.tsx'; /* Metro dependency 4058 */
import * as UseMessageAuthorModule from '../../messages/useMessageAuthor.tsx'; /* Metro dependency 4634 */
import * as InputFieldContainerNativeModule from '../../../design/components/Input/native/InputFieldContainer.native.tsx'; /* Metro dependency 6992 */
import * as NativeTextInputNativeModule from '../../../design/components/Input/native/NativeTextInput.native.tsx'; /* Metro dependency 6995 */
import * as ReactionIconModule from '../../../design/components/Icon/native/redesign/generated/ReactionIcon.tsx'; /* Metro dependency 7950 */
import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as OpenEmojiPickerActionSheetModule from '../../emoji_picker/native/openEmojiPickerActionSheet.tsx'; /* Metro dependency 8529 */
import * as InAppNotificationTypesModule from '../InAppNotificationTypes.tsx'; /* Metro dependency 10999 */
import * as ChatInputContextBarModule from '../../chat_input/native/ChatInputContextBar.tsx'; /* Metro dependency 11002 */
import * as ArrowAngleLeftUpIconModule from '../../../design/components/Icon/native/redesign/generated/ArrowAngleLeftUpIcon.tsx'; /* Metro dependency 11209 */
function _fun84182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:6, offset: 0x01f3d798, size: 802 bytes, params: 8, frame: 24
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.Keyboard;
const env0_7 = value.View;
const StyleSheet = value.StyleSheet;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_9 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object8 = {'flexDirection': 'column', 'gap': 0, 'backgroundColor': null, 'padding': 0};
object = {};
const object2 = {'flexDirection': 'column', 'gap': 0, 'backgroundColor': null, 'padding': 0};
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
object8.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
object2.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.marginHorizontal = PX_12;
object2.marginHorizontal = PX_12;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.marginBottom = PX_4;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object8.overflow = 'hidden';
object5.inputContainer = object8;
object5.iconsContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
const object9 = {'flex': 1, 'borderRadius': null, 'border': 0};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object2.marginBottom = PX_4;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.overflow = 'hidden';
object.inputContainer = object2;
object.iconsContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
const object3 = {'flex': 1, 'borderRadius': null, 'border': 0};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object9.color = TEXT_DEFAULT;
object5.input = object9;
const object10 = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
object3.color = TEXT_DEFAULT;
object.input = object3;
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingHorizontal = PX_12;
object4.paddingHorizontal = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingVertical = PX_12;
object5.inputRow = object10;
object4.paddingVertical = PX_12;
object.inputRow = object4;
const INPUT_PLACEHOLDER_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_PLACEHOLDER_TEXT_DEFAULT;
object5.placeholderText = {color: INPUT_PLACEHOLDER_TEXT_DEFAULT};
const object11 = {'justifyContent': 'center', 'alignContent': 'center'};
object.placeholderText = {color: INPUT_PLACEHOLDER_TEXT_DEFAULT};
const object6 = {'justifyContent': 'center', 'alignContent': 'center'};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object11.backgroundColor = BACKGROUND_MOD_STRONG;
object11.borderBottomWidth = StyleSheet.hairlineWidth;
object6.backgroundColor = BACKGROUND_MOD_STRONG;
object6.borderBottomWidth = StyleSheet.hairlineWidth;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object11.borderBottomColor = BORDER_MUTED;
object11.overflow = 'hidden';
object5.replyBarContainer = object11;
const object12 = {};
object6.borderBottomColor = BORDER_MUTED;
object6.overflow = 'hidden';
object.replyBarContainer = object6;
const object7 = {};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object12.paddingLeft = PX_12;
object7.paddingLeft = PX_12;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object12.paddingRight = PX_8;
object5.replyBarNoRedesign = object12;
object7.paddingRight = PX_8;
object.replyBarNoRedesign = object7;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.replyBarRedesign = {paddingLeft: PX_4};
const env0_12 = Reflect.apply(createStyles, value, [object5]);
object5 = {code: 'function MessageReplyInputTsx1(){const{interpolate,sv,REPLY_BAR_HEIGHT}=this.__closure;return{height:interpolate(sv.get(),[0,1],[0,REPLY_BAR_HEIGHT]),opacity:sv.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageReplyInput.tsx');
object.replyBarRedesign = {paddingLeft: PX_4};
const env0_12 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function MessageReplyInputTsx1(){const{interpolate,sv,REPLY_BAR_HEIGHT}=this.__closure;return{height:interpolate(sv.get(),[0,1],[0,REPLY_BAR_HEIGHT]),opacity:sv.get()};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/MessageReplyInput.tsx');
exports.MessageReplyInput = MessageReplyInput;
}
function AnimatedChatInputReplyBar({replying, pendingReply, pendingReplyAuthor, onToggleReplyMention}) { // fn#84183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1384, offset: 0x01f3daba, size: 391 bytes, params: 2, frame: 25
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'MessageReplyInput'}]).chatInputFloating;
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0);
ReactModule.useEffect(_fun84184, [replying, value2]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const AnimatedChatInputReplyBarY2 = AnimatedChatInputReplyBarY;
AnimatedChatInputReplyBarY2.__closure = {interpolate: ReanimatedRexportModule.interpolate, sv: value2,
REPLY_BAR_HEIGHT: 40};
AnimatedChatInputReplyBarY2.__workletHash = 878601267127;
AnimatedChatInputReplyBarY2.__initData = env0_13;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [AnimatedChatInputReplyBarY2]);
const View = (ReanimatedRexport).View;
const items2 = [styles.replyBarContainer];
items2[1] = chatInputFloating ? styles.replyBarRedesign : styles.replyBarNoRedesign;
items2[2] = value3;
const ChatInputReplyBar = (ChatInputContextBarModule).ChatInputReplyBar;
return (
<View style={items2}>
<ChatInputReplyBar
pendingReply={pendingReply}
pendingReplyAuthor={pendingReplyAuthor}
onToggleReplyMention={onToggleReplyMention}
chatInputFloatingOverride
/>
</View>
);
function _fun84184() { // fn#84184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1633, offset: 0x01f3dc41, size: 89 bytes, params: 1, frame: 17
const replyingBinding = replying;
const binding = env0_1;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const object = {duration: 150};
if (replyingBinding) {
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, object])]);
} else {
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, object])]);
}
}
function AnimatedChatInputReplyBar({replying, pendingReply, pendingReplyAuthor, onToggleReplyMention}) { // fn#84183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1384, offset: 0x01f3daba, size: 391 bytes, params: 2, frame: 25
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'MessageReplyInput'}]).chatInputFloating;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
env0_5.useEffect(_fun84184, [replying, value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = AnimatedChatInputReplyBarY;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, sv: value2, REPLY_BAR_HEIGHT: 40};
closure.__workletHash = 878601267127;
closure.__initData = env0_13;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.replyBarContainer];
items2[1] = chatInputFloating ? styles.replyBarRedesign : styles.replyBarNoRedesign;
items2[2] = value3;
const ChatInputReplyBar = (require(11002) /* metro dependency 11002: ChatInputContextBar */).ChatInputReplyBar;
return (
<View style={items2}>
<ChatInputReplyBar
pendingReply={pendingReply}
pendingReplyAuthor={pendingReplyAuthor}
function AnimatedChatInputReplyBarY() { // fn#84185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1777, owner: AnimatedChatInputReplyBar.y, offset: 0x01f3dc9a, size: 95 bytes, params: 1, frame: 17
const object = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const binding = env0_1;
object.height = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 40]]);
object.opacity = binding.get();
return object;
}
}
function MessageReplyInput({notification, onMessageSent}) { // fn#84186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2309, offset: 0x01f3dcf9, size: 1395 bytes, params: 2, frame: 41
let binding = property32;
const value2 = binding.useRef(null);
binding = property32;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
binding = Module00057;
const value5 = binding(value3, 2);
const property = value5[0];
const property2 = value5[1];
const binding2 = property32;
useState = binding2.useState;
const value6 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property3 = value6[0];
var property32 = property3;
const env0_6 = value6[1];
const binding3 = property32;
useState = binding3.useState;
const value7 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property4 = value7[0];
const env0_8 = value7[1];
const binding4 = property32;
useState = binding4.useState;
const value8 = binding(Reflect.apply(useState, binding4, [true]), 2);
const property5 = value8[0];
const env0_10 = value8[1];
const styles = useStyles();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const message = notification.message;
const channel = notification.channel;
const value9 = (UseMessageAuthorModule).useNullableMessageAuthor(message);
const value10 = (UseChannelName)(channel, true);
const value11 = (InputFieldContainerNativeModule).useInputStyles({});
const value12 = property32.useMemo(_fun84187, [property5, channel, message]);
property32.useLayoutEffect(_fun84188, []);
const env0_14 = property32.useCallback(_fun84189(), [property, onMessageSent, value12, property4, property3]);
const value14 = property32.useCallback(_fun84193, [notification.channel, notification.guild?.id]);
const object2 = {};
object2.paddingBottom = insets.bottom;
const animatedChatInputReplyBar = (
<AnimatedChatInputReplyBar
replying={property4}
pendingReply={value12}
pendingReplyAuthor={value9}
onToggleReplyMention={onToggleReplyMention}
chatInputFloatingOverride
/>
</View>
);
}
function MessageReplyInput({notification, onMessageSent}) { // fn#84186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2309, offset: 0x01f3dcf9, size: 1395 bytes, params: 2, frame: 41
let binding = env0_5;
const value2 = binding.useRef(null);
binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
binding = env0_4;
const value5 = binding(value3, 2);
const property = value5[0];
const property2 = value5[1];
const binding2 = env0_5;
useState = binding2.useState;
const value6 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property3 = value6[0];
var env0_5 = property3;
const env0_6 = value6[1];
const binding3 = env0_5;
useState = binding3.useState;
const value7 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property4 = value7[0];
const env0_8 = value7[1];
const binding4 = env0_5;
useState = binding4.useState;
const value8 = binding(Reflect.apply(useState, binding4, [true]), 2);
const property5 = value8[0];
const env0_10 = value8[1];
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const message = notification.message;
const channel = notification.channel;
const value9 = (require(4634) /* metro dependency 4634: useMessageAuthor */).useNullableMessageAuthor(message);
const value10 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
const value11 = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).useInputStyles({});
const value12 = env0_5.useMemo(_fun84187, [property5, channel, message]);
env0_5.useLayoutEffect(_fun84188, []);
const env0_14 = env0_5.useCallback(_fun84189(), [property, onMessageSent, value12, property4, property3]);
const value14 = env0_5.useCallback(_fun84193, [notification.channel, notification.guild?.id]);
const object = {};
object.paddingBottom = insets.bottom;
const animatedChatInputReplyBar = <AnimatedChatInputReplyBar replying={property4} pendingReply={value12} pendingReplyAuthor={value9} onToggleReplyMention={onToggleReplyMention} />;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {variant: property4 ? 'secondary' : 'icon-only', size: 'sm'};
const ArrowAngleLeftUpIcon = (require(11209) /* metro dependency 11209: ArrowAngleLeftUpIcon */).ArrowAngleLeftUpIcon;
let CHAT_INPUT_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ICON_DEFAULT_TINT;
iconButtonProps.icon = <ArrowAngleLeftUpIcon size="sm" color={CHAT_INPUT_ICON_DEFAULT_TINT} />;
iconButtonProps.onPress = onPress_84197;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
iconButtonProps.accessibilityLabel = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['5IEsGx']]);
const items2 = [<IconButton {...iconButtonProps} />];
const NativeTextInput = (require(6995) /* metro dependency 6995: NativeTextInputNative */).NativeTextInput;
items2[1] = <NativeTextInput ref={value2} style={[styles.input,
value11.text]} placeholderTextColor={styles.placeholderText.color} placeholder={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8lzR/R'],
{channel: value10})} autoFocus value={property} onChangeText={property2} />;
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
CHAT_INPUT_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ICON_DEFAULT_TINT;
const iconButton = <IconButton variant="icon-only" size="sm" icon={<ReactionIcon size="sm" color={CHAT_INPUT_ICON_DEFAULT_TINT} />} onPress={value14} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sMOuuS)} />;
string = intl.string;
const TXNS7S = (require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S;
const SendMessageIcon = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
items2[2] = <View style={styles.iconsContainer}>{iconButton}<IconButton variant="primary" size="sm" accessibilityLabel={Reflect.apply(string,
intl,
[TXNS7S])} icon={<SendMessageIcon size="sm" color={WHITE} />} onPress={onPress_84198} loading={property3} /></View>;
return (
<View style={object}>
<View style={styles.inputContainer}>
{animatedChatInputReplyBar}
<View style={styles.inputRow}>
{items2}
);
const IconButton = (IconButtonNativeModule).IconButton;
const iconButtonProps = {variant: property4 ? 'secondary' : 'icon-only', size: 'sm'};
const ArrowAngleLeftUpIcon = (ArrowAngleLeftUpIconModule).ArrowAngleLeftUpIcon;
let CHAT_INPUT_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ICON_DEFAULT_TINT;
iconButtonProps.icon = <ArrowAngleLeftUpIcon size="sm" color={CHAT_INPUT_ICON_DEFAULT_TINT} />;
iconButtonProps.onPress = onPress_84197;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
iconButtonProps.accessibilityLabel = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['5IEsGx']]);
const items2 = [
<IconButton {...iconButtonProps} />,
];
const NativeTextInput = (NativeTextInputNativeModule).NativeTextInput;
items2[1] = (
<NativeTextInput
ref={value2}
style={[styles.input, value11.text]}
placeholderTextColor={styles.placeholderText.color}
placeholder={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8lzR/R'],
{channel: value10})}
autoFocus
value={property}
onChangeText={property2}
/>
);
const ReactionIcon = (ReactionIconModule).ReactionIcon;
CHAT_INPUT_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ICON_DEFAULT_TINT;
const iconButton = (
<IconButton
variant="icon-only"
size="sm"
icon={<ReactionIcon size="sm" color={CHAT_INPUT_ICON_DEFAULT_TINT} />}
onPress={value14}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sMOuuS)}
/>
);
string = intl.string;
const TXNS7S = (require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S;
const SendMessageIcon = (SendMessageIconModule).SendMessageIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
items2[2] = (
<View style={styles.iconsContainer}>
{iconButton}
<IconButton
variant="primary"
size="sm"
accessibilityLabel={Reflect.apply(string, intl, [TXNS7S])}
icon={<SendMessageIcon size="sm" color={WHITE} />}
onPress={onPress_84198}
loading={property3}
/>
</View>
);
return (
<View style={object2}>
<View style={styles.inputContainer}>
{animatedChatInputReplyBar}
<View style={styles.inputRow}>
{items2}
</View>
</View>
</View>
</View>
);
}
function _fun84184() { // fn#84184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1633, offset: 0x01f3dc41, size: 89 bytes, params: 1, frame: 17
const replyingBinding = replying;
const binding = env0_1;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const object2 = {duration: 150};
if (replyingBinding) {
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, object2])]);
} else {
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, object2])]);
}
}
function AnimatedChatInputReplyBarY() { // fn#84185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1777, owner: AnimatedChatInputReplyBar.y, offset: 0x01f3dc9a, size: 95 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const binding = env0_1;
object2.height = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 40]]);
object2.opacity = binding.get();
return object2;
}
function _fun84187() { // fn#84187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2728, offset: 0x01f3e26c, size: 50 bytes, params: 1, frame: 11
const channelBinding = channel;
return {shouldMention: env0_9, showMentionToggle: !channelBinding.isPrivate(), channel: channelBinding,
message: message};
}
function _fun84188() { // fn#84188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2834, offset: 0x01f3e29e, size: 32 bytes, params: 1, frame: 9
const current = env0_2.current;
if (current != null) {
current.focus();
}
}
function _fun84189() { // fn#84189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2902, offset: 0x01f3e2be, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun84191);
return _fun84192;
}
function _fun84193() { // fn#84193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3444, offset: 0x01f3e46e, size: 159 bytes, params: 1, frame: 17
Keyboard.dismiss();
const value2 = undefined;
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const CHAT = EmojiIntention.CHAT;
const channel = notification.channel;
const guild = notification.guild;
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [{onPressEmoji: onPressEmoji_84194,
pickerIntention: CHAT, channel: channel ?? value2, guildId: (guild == null ? value2 : guild.id) ?? value2,
startExpanded: false}]);
return value2;
}
function onToggleReplyMention() { // fn#84196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3965, owner: MessageReplyInput.onToggleReplyMention, offset: 0x01f3e58c, size: 23 bytes, params: 1, frame: 11
return env0_10(!env0_9);
}
function MessageReplyInputOnPress() { // fn#84197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:4184, owner: MessageReplyInput.onPress, offset: 0x01f3e5a3, size: 86 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
const trackInAppNotificationAccessoryClicked = value.trackInAppNotificationAccessoryClicked;
const notificationBinding = notification;
const InAppNotificationAccessoryTypes = (require(10999) /* metro dependency 10999: InAppNotificationTypes */).InAppNotificationAccessoryTypes;
const REPLY_TOGGLE = InAppNotificationAccessoryTypes.REPLY_TOGGLE;
Reflect.apply(trackInAppNotificationAccessoryClicked, value, [notificationBinding, REPLY_TOGGLE]);
env0_8(!env0_7);
}
function MessageReplyInputOnPress_84198() { // fn#84198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:5029, owner: MessageReplyInput.onPress, offset: 0x01f3e5f9, size: 20 bytes, params: 1, frame: 11
return env0_14(notification);
}
function* _fun84191(a0) { // fn#84191, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2922, offset: 0x01f3e2ed, size: 385 bytes, params: 2, frame: 23
if (true) {
value = environment.__proto__.__proto__;
if (env2_5 !== true) {
var id = a0.channel.id;
if (env2_3.length === 0) {
return undefined;
}
if (id == null) {
return undefined;
}
var binding = env3_0;
var binding2 = env3_2;
var value4 = binding(binding2[17]);
var trackInAppNotificationAccessoryClicked = value4.trackInAppNotificationAccessoryClicked;
var InAppNotificationAccessoryTypes = binding(binding2[18]).InAppNotificationAccessoryTypes;
var SEND_MESSAGE_BUTTON = InAppNotificationAccessoryTypes.SEND_MESSAGE_BUTTON;
Reflect.apply(trackInAppNotificationAccessoryClicked, value4, [a0, SEND_MESSAGE_BUTTON]);
Keyboard(true);
var value5 = binding(binding2[19]);
var triggerHapticFeedback = value5.triggerHapticFeedback;
var HapticFeedbackTypes = binding(binding2[19]).HapticFeedbackTypes;
var IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value5, [IMPACT_MEDIUM]);
binding = env3_1;
var value6 = binding(binding2[20]);
var value8 = value6.parse(env3_8.getChannel(id), env2_3);
var value9 = binding(binding2[21]);
var sendMessage = value9.sendMessage;
var object2 = {};
copyDataProperties(object2, View ? env3_1(env3_2[21]).getSendMessageOptionsForReply(env2_13) : {},
undefined);
object2['location'] = 'InAppNotification';
yield Reflect.apply(sendMessage, value9, [id, value8, false, object2]);
if (false) {
return undefined;
}
importDefault();
Keyboard(false);
env2_4('');
);
function _fun84187() { // fn#84187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2728, offset: 0x01f3e26c, size: 50 bytes, params: 1, frame: 11
const channelBinding = channel;
return {shouldMention: EmojiConstantsModule.EmojiIntention, showMentionToggle: !channelBinding.isPrivate(), channel: channelBinding,
message: message};
}
function _fun84188() { // fn#84188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2834, offset: 0x01f3e29e, size: 32 bytes, params: 1, frame: 9
const current = env0_2.current;
if (current != null) {
current.focus();
}
}
function _fun84189() { // fn#84189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2902, offset: 0x01f3e2be, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun84191);
return _fun84192;
function* _fun84191(a0) { // fn#84191, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2922, offset: 0x01f3e2ed, size: 385 bytes, params: 2, frame: 23
if (true) {
value = environment.__proto__.__proto__;
if (env2_5 !== true) {
var id = a0.channel.id;
if (env2_3.length === 0) {
return undefined;
}
if (id == null) {
return undefined;
}
var binding = env3_0;
var binding2 = env3_2;
var value4 = binding(binding2[17]);
var trackInAppNotificationAccessoryClicked = value4.trackInAppNotificationAccessoryClicked;
var InAppNotificationAccessoryTypes = binding(binding2[18]).InAppNotificationAccessoryTypes;
var SEND_MESSAGE_BUTTON = InAppNotificationAccessoryTypes.SEND_MESSAGE_BUTTON;
Reflect.apply(trackInAppNotificationAccessoryClicked, value4, [a0, SEND_MESSAGE_BUTTON]);
Keyboard(true);
var value5 = binding(binding2[19]);
var triggerHapticFeedback = value5.triggerHapticFeedback;
var HapticFeedbackTypes = binding(binding2[19]).HapticFeedbackTypes;
var IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value5, [IMPACT_MEDIUM]);
binding = env3_1;
var value6 = binding(binding2[20]);
var value8 = value6.parse(env3_8.getChannel(id), env2_3);
var value9 = binding(binding2[21]);
var sendMessage = value9.sendMessage;
var object = {};
copyDataProperties(object, View ? env3_1(env3_2[21]).getSendMessageOptionsForReply(env2_13) : {},
undefined);
object['location'] = 'InAppNotification';
yield Reflect.apply(sendMessage, value9, [id, value8, false, object]);
if (false) {
return undefined;
}
importDefault();
Keyboard(false);
env2_4('');
}
}
}
function _fun84192() { // fn#84192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3368, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun84193() { // fn#84193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3444, offset: 0x01f3e46e, size: 159 bytes, params: 1, frame: 17
Keyboard.dismiss();
const value2 = undefined;
const openEmojiPickerActionSheet = OpenEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const CHAT = EmojiIntention.CHAT;
const channel = notification.channel;
const guild = notification.guild;
Reflect.apply(openEmojiPickerActionSheet, OpenEmojiPickerActionSheetModule, [{onPressEmoji: onPressEmoji_84194,
pickerIntention: CHAT, channel: channel ?? value2, guildId: (guild == null ? value2 : guild.id) ?? value2,
startExpanded: false}]);
return value2;
function onPressEmoji_84194(a0) { // fn#84194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3521, offset: 0x01f3e50d, size: 85 bytes, params: 2, frame: 12
var environment;
let value = environment.__proto__.__proto__;
const env0_0 = (GetEmojiText)(a0);
value = environment.__proto__;
env1_4(_fun84195);
const current = env1_2.current;
if (current != null) {
current.focus();
}
function _fun84195(a0) { // fn#84195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3548, offset: 0x01f3e562, size: 42 bytes, params: 2, frame: 15
return '' + a0 + ' ' + env0_0;
}
}
}
function onToggleReplyMention() { // fn#84196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3965, owner: MessageReplyInput.onToggleReplyMention, offset: 0x01f3e58c, size: 23 bytes, params: 1, frame: 11
return env0_10(!EmojiConstantsModule.EmojiIntention);
}
function MessageReplyInputOnPress() { // fn#84197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:4184, owner: MessageReplyInput.onPress, offset: 0x01f3e5a3, size: 86 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
const trackInAppNotificationAccessoryClicked = value.trackInAppNotificationAccessoryClicked;
const notificationBinding = notification;
const InAppNotificationAccessoryTypes = (InAppNotificationTypesModule).InAppNotificationAccessoryTypes;
const REPLY_TOGGLE = InAppNotificationAccessoryTypes.REPLY_TOGGLE;
Reflect.apply(trackInAppNotificationAccessoryClicked, value, [notificationBinding, REPLY_TOGGLE]);
env0_8(!env0_7);
}
function MessageReplyInputOnPress_84198() { // fn#84198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:5029, owner: MessageReplyInput.onPress, offset: 0x01f3e5f9, size: 20 bytes, params: 1, frame: 11
return env0_14(notification);
}
}
}
function onPressEmoji_84194(a0) { // fn#84194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3521, offset: 0x01f3e50d, size: 85 bytes, params: 2, frame: 12
var environment;
let value = environment.__proto__.__proto__;
const env0_0 = (importDefault(11208) /* metro dependency 11208: getEmojiText */)(a0);
value = environment.__proto__;
env1_4(_fun84195);
const current = env1_2.current;
if (current != null) {
current.focus();
}
}
function _fun84195(a0) { // fn#84195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3548, offset: 0x01f3e562, size: 42 bytes, params: 2, frame: 15
return '' + a0 + ' ' + env0_0;
}
global.__d(_fun84182, 11001, [5, 57, 31, 27, 1379, 1881, 33, 4501, 697, 1357, 4017, 4504, 11002, 5463, 4634, 4805,
6992, 10921, 10999, 4081, 7076, 7067, 8529, 11208, 8341, 11209, 1244, 6995, 7950, 4058,
2]) /* metro module 11001, dependencies: [5, 57, 31, 27, 1379, 1881, 33, 4501, 697, 1357, 4017, 4504, 11002, 5463, 4634, 4805, 6992, 10921, 10999, 4081, 7076, 7067, 8529, 11208, 8341, 11209, 1244, 6995, 7950, 4058, 2] */;
@@ -1,12 +1,22 @@
/* Metro module 10994; source: modules/in_app_notifications/native/Notification.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4559, 4017, 10995, 7013, 1365, 4504, 4573, 1244, 7684, 10996, 4577, 10974, 5278, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as UseIsScreenReaderEnabledNativeModule from '../../a11y/native/useIsScreenReaderEnabled.native.tsx'; /* Metro dependency 4559 */
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as InAppNotificationExpandExperimentModule from './InAppNotificationExpandExperiment.tsx'; /* Metro dependency 10974 */
import * as InAppNotificationExpandNuxModule from './InAppNotificationExpandNux.tsx'; /* Metro dependency 10995 */
function _fun84132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:6, offset: 0x01f3ab67, size: 1289 bytes, params: 8, frame: 28
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.Pressable;
const env0_6 = value.View;
value = require(33) /* metro dependency 33 */;
@@ -15,394 +25,450 @@ function _fun84132(global, require, importDefault, importAll, module, exports, d
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
object = {};
const object2 = {};
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object5, SHADOW_HIGH, undefined);
copyDataProperties(object2, SHADOW_HIGH, undefined);
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
object5['backgroundColor'] = MOBILE_ALERT_BACKGROUND_DEFAULT;
object5['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5['maxWidth'] = 480;
object5['width'] = '100%';
object5['alignSelf'] = 'center';
object4.shadow = object5;
const object7 = {};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object7.borderWidth = 1;
object2['backgroundColor'] = MOBILE_ALERT_BACKGROUND_DEFAULT;
object2['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2['maxWidth'] = 480;
object2['width'] = '100%';
object2['alignSelf'] = 'center';
object.shadow = object2;
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.borderWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.borderColor = BORDER_SUBTLE;
object7.overflow = 'hidden';
object4.container = object7;
object4.body = {flex: 1};
object3.borderColor = BORDER_SUBTLE;
object3.overflow = 'hidden';
object.container = object3;
object.body = {flex: 1};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.iconContainer = {marginRight: PX_12};
const object8 = {};
object.iconContainer = {marginRight: PX_12};
const object6 = {};
let YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object8.backgroundColor = YELLOW_300;
object6.backgroundColor = YELLOW_300;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
object6.paddingHorizontal = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingVertical = PX_8;
object8.flexDirection = 'row';
object8.alignItems = 'center';
object4.alertContainer = object8;
object6.paddingVertical = PX_8;
object6.flexDirection = 'row';
object6.alignItems = 'center';
object.alertContainer = object6;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.contentContainer = {padding: PX_12, flexDirection: 'row'};
object.contentContainer = {padding: PX_12, flexDirection: 'row'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.contentContainerExpanded = {'padding': null, 'paddingBottom': 0, 'flexDirection': 'row', padding: PX_12};
object4.headerContainer = {flex: 1};
object4.labelContainer = {'flexDirection': 'row', 'alignItems': 'center'};
object.contentContainerExpanded = {'padding': null, 'paddingBottom': 0, 'flexDirection': 'row', padding: PX_12};
object.headerContainer = {flex: 1};
object.labelContainer = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.warningIcon = {'width': 12, 'height': 12, marginRight: PX_4};
const object9 = {};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.warningIcon = {'width': 12, 'height': 12, marginRight: PX_4};
const object11 = {};
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object9.backgroundColor = BACKGROUND_BRAND;
object9.height = 4;
object4.progress = object9;
const object10 = {};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object10.height = 8;
object4.progressRedesign = object10;
object11.backgroundColor = BACKGROUND_BRAND;
object11.height = 4;
object.progress = object11;
const object12 = {};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object12.height = 8;
object.progressRedesign = object12;
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.progressBarBrand = {backgroundColor: BACKGROUND_BRAND};
object.progressBarBrand = {backgroundColor: BACKGROUND_BRAND};
YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object4.progressBarWarning = {backgroundColor: YELLOW_300};
const object13 = {'width': '100%', 'borderRadius': null, 'backgroundColor': null, 'height': 8, 'overflow': 'hidden'};
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.progressBarWarning = {backgroundColor: YELLOW_300};
const object15 = {'width': '100%', 'borderRadius': null, 'backgroundColor': null, 'height': 8, 'overflow': 'hidden'};
object15.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object13.backgroundColor = BACKGROUND_MOD_SUBTLE;
object4.progressTrack = object13;
object4.progressContainerTop = {'position': 'absolute', 'top': -5, 'left': 16, 'right': 16};
object4.progressContainerBottom = {'width': '100%', 'position': 'absolute', 'bottom': -1};
object4.dragHandleTextContainer = {overflow: 'hidden'};
object15.backgroundColor = BACKGROUND_MOD_SUBTLE;
object.progressTrack = object15;
object.progressContainerTop = {'position': 'absolute', 'top': -5, 'left': 16, 'right': 16};
object.progressContainerBottom = {'width': '100%', 'position': 'absolute', 'bottom': -1};
object.dragHandleTextContainer = {overflow: 'hidden'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.dragHandleText = {'position': 'absolute', 'left': 0, 'right': 0, 'textAlign': 'center', paddingBottom: PX_4};
const object14 = {'width': 32, 'height': 4, 'alignSelf': 'center'};
object.dragHandleText = {'position': 'absolute', 'left': 0, 'right': 0, 'textAlign': 'center', paddingBottom: PX_4};
const object16 = {'width': 32, 'height': 4, 'alignSelf': 'center'};
const BACKGROUND_ACCENT = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_ACCENT;
object14.backgroundColor = BACKGROUND_ACCENT;
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object16.backgroundColor = BACKGROUND_ACCENT;
object16.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object14.marginBottom = PX_8;
object4.dragHandle = object14;
const env0_10 = Reflect.apply(createStyles, value, [object4]);
object4 = {code: 'function NotificationTsx1(){const{textRevealProgress,interpolate,textHeight}=this.__closure;return{opacity:textRevealProgress.get(),height:interpolate(textRevealProgress.get(),[0,1],[0,textHeight])};}'};
object4 = {code: 'function NotificationTsx2(){const{dragHandleBounceProgress}=this.__closure;return{transform:[{translateY:dragHandleBounceProgress.get()}]};}'};
object4 = {code: "function NotificationTsx3(){const{percent,width}=this.__closure;const percentRemaining=(typeof percent==='number'?percent:percent.get())/100;return{transform:[{translateX:-width+width*percentRemaining}]};}"};
object16.marginBottom = PX_8;
object.dragHandle = object16;
const env0_10 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function NotificationTsx1(){const{textRevealProgress,interpolate,textHeight}=this.__closure;return{opacity:textRevealProgress.get(),height:interpolate(textRevealProgress.get(),[0,1],[0,textHeight])};}'};
object = {code: 'function NotificationTsx2(){const{dragHandleBounceProgress}=this.__closure;return{transform:[{translateY:dragHandleBounceProgress.get()}]};}'};
object = {code: "function NotificationTsx3(){const{percent,width}=this.__closure;const percentRemaining=(typeof percent==='number'?percent:percent.get())/100;return{transform:[{translateX:-width+width*percentRemaining}]};}"};
const env0_14 = {'mass': 1, 'overshootClamping': true, 'damping': 27, 'stiffness': 300};
object4 = {code: 'function NotificationTsx4(){const{withSpring,scale,ON_PRESS_SPRING_CONFIG}=this.__closure;return{transform:[{scale:withSpring(scale.get(),ON_PRESS_SPRING_CONFIG)}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/Notification.tsx');
object = {code: 'function NotificationTsx4(){const{withSpring,scale,ON_PRESS_SPRING_CONFIG}=this.__closure;return{transform:[{scale:withSpring(scale.get(),ON_PRESS_SPRING_CONFIG)}]};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/Notification.tsx');
exports.NOTIFICATION_MAX_WIDTH = 480;
exports.Notification = Notification;
exports.NotificationPressable = NotificationPressable;
}
function DragHandle({onAccessibilityExpand}) { // fn#84133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2300, offset: 0x01f3b070, size: 982 bytes, params: 2, frame: 33
var object2;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
let binding = env0_4;
const [property, env0_3] = env0_3Binding(binding.useState(0), 2);
const property2 = env0_3Binding(env0_4.useState(function() {
var Date = global.Date;
return Date.now();
}), 1)[0];
var env0_4 = property2;
const value8 = env0_4.useMemo(_fun84135, [property2]);
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
const property3 = env0_3Binding(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
[value8 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX] : [],
undefined, true]), 1)[0];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const IN_APP_NOTIFICATION_EXPAND_NUX = DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX;
const value10 = property3 === IN_APP_NOTIFICATION_EXPAND_NUX;
binding = env0_4;
let closure = _fun84136;
const value11 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = DragHandleC;
object2 = {textRevealProgress: value4};
object2.interpolate = reanimatedRexportModule.interpolate;
object2.textHeight = property;
closure.__closure = object2;
closure.__workletHash = 10231400867129;
closure.__initData = env0_11;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = DragHandleN;
closure.__closure = {dragHandleBounceProgress: value3};
closure.__workletHash = 6749008409731;
closure.__initData = env0_12;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
env0_4.useEffect(_fun84140, [value10, value4, value3]);
const r5 = value10 ? <>{((View) => <View style={[styles.dragHandleTextContainer,
value12]}>{((Text) => <Text onLayout={value11} variant="text-xs/normal" color="text-subtle" style={styles.dragHandleText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['vos6/N'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}{((View) => <View style={[styles.dragHandle,
value13]} />)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</> : <View style={styles.dragHandle} />;
if (value2) {
if (onAccessibilityExpand == null) {
r0 = r5;
function DragHandle({onAccessibilityExpand}) { // fn#84133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2300, offset: 0x01f3b070, size: 982 bytes, params: 2, frame: 33
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (UseIsScreenReaderEnabledNativeModule).useIsScreenReaderEnabled();
const value3 = (ReanimatedRexportModule).useSharedValue(0);
const value4 = (ReanimatedRexportModule).useSharedValue(0);
let binding = property22;
const [property, env0_3] = env0_3Binding(binding.useState(0), 2);
const property2 = env0_3Binding(property22.useState(function() {
var Date = global.Date;
return Date.now();
}), 1)[0];
var property22 = property2;
const value8 = property22.useMemo(_fun84135, [property2]);
const useSelectedDismissibleContent = UseSelectedDismissibleContentModule.useSelectedDismissibleContent;
const property3 = env0_3Binding(Reflect.apply(useSelectedDismissibleContent, UseSelectedDismissibleContentModule,
[value8 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX] : [],
undefined, true]), 1)[0];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const IN_APP_NOTIFICATION_EXPAND_NUX = DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX;
const value10 = property3 === IN_APP_NOTIFICATION_EXPAND_NUX;
binding = property22;
let closure = _fun84136;
const value11 = binding.useCallback(closure, []);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = DragHandleC;
object = {textRevealProgress: value4};
object.interpolate = ReanimatedRexportModule.interpolate;
object.textHeight = property;
closure.__closure = object;
closure.__workletHash = 10231400867129;
closure.__initData = env0_11;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = DragHandleN;
closure.__closure = {dragHandleBounceProgress: value3};
closure.__workletHash = 6749008409731;
closure.__initData = env0_12;
const value13 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
property22.useEffect(_fun84140, [value10, value4, value3]);
const r5 = (
value10
? (
<>
{((View) => <View style={[styles.dragHandleTextContainer,
value12]}>{((Text) => <Text onLayout={value11} variant="text-xs/normal" color="text-subtle" style={styles.dragHandleText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['vos6/N'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}
{((View) => <View style={[styles.dragHandle,
value13]} />)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}
</>
)
: (
<View style={styles.dragHandle} />
)
);
if (value2) {
if (onAccessibilityExpand == null) {
r0 = r5;
} else {
r0 = (
<Pressable
onPress={onAccessibilityExpand}
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PbxI/x'])}
>
{r5}
</Pressable>
);
}
} else {
r0 = <Pressable onPress={onAccessibilityExpand} accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PbxI/x'])}>{r5}</Pressable>;
r0 = r5;
}
} else {
r0 = r5;
return r0;
function _fun84135() { // fn#84135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2549, offset: 0x01f3b446, size: 113 bytes, params: 1, frame: 15
const expandNUXState = (InAppNotificationExpandNuxModule).getExpandNUXState();
const numTimesShown = expandNUXState.numTimesShown;
const MAX_TIMES_SHOWN = (InAppNotificationExpandNuxModule).MAX_TIMES_SHOWN;
if (numTimesShown >= MAX_TIMES_SHOWN) {
return false;
}
const value4 = ReactModule - expandNUXState.lastShownAtMs;
const ONE_DAY_MS = (InAppNotificationExpandNuxModule).ONE_DAY_MS;
return !(value4 < ONE_DAY_MS);
}
function _fun84136({nativeEvent}) { // fn#84136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2909, offset: 0x01f3b4b7, size: 49 bytes, params: 2, frame: 11
const env0_0 = nativeEvent.layout.height;
env0_3(function(a0) {
var value = a0;
return value === height ? value : height;
});
}
function DragHandleC() { // fn#84138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3002, owner: DragHandle.c, offset: 0x01f3b4fc, size: 103 bytes, params: 1, frame: 16
const object = {};
const binding = env0_1;
object.opacity = binding.get();
object.height = ReanimatedRexportModule.interpolate(binding.get(), [0, 1], [0, env0_2]);
return object;
}
function DragHandleN() { // fn#84139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3233, owner: DragHandle.N, offset: 0x01f3b563, size: 39 bytes, params: 1, frame: 11
const object2 = {};
object2.translateY = env0_0.get();
return {transform: [object2]};
}
function _fun84140() { // fn#84140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3376, offset: 0x01f3b58a, size: 315 bytes, params: 1, frame: 26
var environment;
var value2;
var binding;
var set;
var moduleValue2;
var withDelay;
const NUX_REVEAL_DELAY_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).NUX_REVEAL_DELAY_MS;
var moduleValue3;
var withTiming;
var object;
const NUX_REVEAL_DURATION_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).NUX_REVEAL_DURATION_MS;
var value3;
var moduleValue4;
var withRepeat;
var moduleValue5;
var DRAG_HANDLE_BOUNCE_DISTANCE;
var value;
if (env0_5) {
value2 = environment.__proto__;
(require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).markExpandNUXStateAsShown();
binding = env0_1;
set = binding.set;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue2.withDelay;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue2, [NUX_REVEAL_DELAY_MS,
Reflect.apply(withTiming,
moduleValue3, [1, {duration: NUX_REVEAL_DURATION_MS}])])]);
binding = env0_0;
set = binding.set;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
value3 = NUX_REVEAL_DELAY_MS + NUX_REVEAL_DURATION_MS;
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withRepeat = moduleValue4.withRepeat;
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue5.withTiming;
DRAG_HANDLE_BOUNCE_DISTANCE = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).DRAG_HANDLE_BOUNCE_DISTANCE;
object = {};
object.duration = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).DRAG_HANDLE_BOUNCE_DURATION_MS;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [value3, Reflect.apply(withRepeat, moduleValue4,
[Reflect.apply(withTiming, moduleValue5, [DRAG_HANDLE_BOUNCE_DISTANCE, object]), -1, true])])]);
return _fun84141;
}
function _fun84141() { // fn#84141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3766, offset: 0x01f3b6c5, size: 69 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__;
(ReanimatedRexportModule).cancelAnimation(env1_1);
(ReanimatedRexportModule).cancelAnimation(env1_0);
}
}
}
return r0;
}
function useProgressAnimation(a0) { // fn#84142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4501, offset: 0x01f3b70a, size: 183 bytes, params: 2, frame: 19
const env0_0 = a0;
let binding = env0_4;
const [property, env0_2] = env0_3(binding.useState(0), 2);
binding = env0_4;
let closure = _fun84143;
const value4 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = useProgressAnimationS;
closure.__closure = {percent: a0, width: property};
closure.__workletHash = 11469178060403;
closure.__initData = env0_13;
return {animatedStyles: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]), handleLayout: value4};
}
function useProgressAnimation(a0) { // fn#84142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4501, offset: 0x01f3b70a, size: 183 bytes, params: 2, frame: 19
const env0_0 = a0;
let binding = ReactModule;
const [property, env0_2] = Module00057(binding.useState(0), 2);
binding = ReactModule;
let closure = _fun84143;
const value4 = binding.useCallback(closure, []);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = useProgressAnimationS;
closure.__closure = {percent: a0, width: property};
closure.__workletHash = 11469178060403;
closure.__initData = env0_13;
return {animatedStyles: Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]), handleLayout: value4};
function _fun84143({nativeEvent}) { // fn#84143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4596, offset: 0x01f3b7c1, size: 36 bytes, params: 2, frame: 11
return env0_2(nativeEvent.layout.width);
}
function Progress({percent, hideProgress}) { // fn#84145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4881, offset: 0x01f3b834, size: 171 bytes, params: 2, frame: 20
const styles = useStyles();
const {animatedStyles, handleLayout} = useProgressAnimation(percent);
const items2 = [styles.progressContainerBottom];
items2[1] = {opacity: hideProgress ? 0 : 1};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View onLayout={handleLayout} style={items2}>
<View2 style={[styles.progress, animatedStyles]} />
</View>
);
}
function useProgressAnimationS() { // fn#84144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4693, owner: useProgressAnimation.s, offset: 0x01f3b7e5, size: 79 bytes, params: 1, frame: 11
const value3 = (typeof env0_0 === 'number' ? env0_0 : env0_0.get()) / 100;
const binding = env0_1;
return {transform: [{translateX: binding * value3 - binding}]};
}
function RedesignProgress({percent, hideProgress, type}) { // fn#84146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:5122, offset: 0x01f3b8df, size: 232 bytes, params: 2, frame: 24
const styles = useStyles();
const {animatedStyles, handleLayout} = useProgressAnimation(percent);
const items2 = [styles.progressContainerTop];
items2[1] = {opacity: hideProgress ? 0 : 1};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View onLayout={handleLayout} style={items2}>
<View style={styles.progressTrack}>
<View2
style={[styles.progressRedesign,
type === 'ALERT' ? styles.progressBarWarning : styles.progressBarBrand, animatedStyles]}
/>
}
function Progress({percent, hideProgress}) { // fn#84145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4881, offset: 0x01f3b834, size: 171 bytes, params: 2, frame: 20
const styles = useStyles();
const {animatedStyles, handleLayout} = useProgressAnimation(percent);
const items2 = [styles.progressContainerBottom];
items2[1] = {opacity: hideProgress ? 0 : 1};
const View2 = (ReanimatedRexport).View;
return (
<View onLayout={handleLayout} style={items2}>
<View2 style={[styles.progress, animatedStyles]} />
</View>
</View>
);
}
);
}
function Notification({icon, textChildren, children, alertLabel, accessoryLabelNode, rightAccessory, header, showDragHandle, onAccessibilityExpand, bodyStyle, expandedContentVisible}) { // fn#84147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:5843, offset: 0x01f3b9c7, size: 738 bytes, params: 2, frame: 41
showDragHandle = !(showDragHandle === undefined) && showDragHandle;
expandedContentVisible = !(expandedContentVisible === undefined) && expandedContentVisible;
const styles = useStyles();
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const r8 = alertLabel != null ? <View style={styles.alertContainer}>{((CircleErrorIcon) => <CircleErrorIcon style={styles.warningIcon} color="black" />)((require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon)}{((Text) => <Text variant="text-xs/bold" color="black">{alertLabel.toUpperCase()}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : null;
const r12 = expandedContentVisible ? styles.contentContainerExpanded : styles.contentContainer;
const r14 = icon != null ? <View style={styles.iconContainer}>{icon}</View> : null;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<>
{r8}
<View style={r12}>
{r14}
<View2 style={[styles.body, bodyStyle]}>
<View style={styles.labelContainer}>
{accessoryLabelNode ?? null}
<View style={styles.headerContainer}>
{header.type === 'message' ? ((Component) => <Component {...header} />)(importDefault(10996) /* metro dependency 10996: MessageNotificationHeader */) : ((SimpleNotificationHeader) => <SimpleNotificationHeader {...header} />)((require(10996) /* metro dependency 10996: MessageNotificationHeader */).SimpleNotificationHeader)}
</View>
function RedesignProgress({percent, hideProgress, type}) { // fn#84146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:5122, offset: 0x01f3b8df, size: 232 bytes, params: 2, frame: 24
const styles = useStyles();
const {animatedStyles, handleLayout} = useProgressAnimation(percent);
const items2 = [styles.progressContainerTop];
items2[1] = {opacity: hideProgress ? 0 : 1};
const View2 = (ReanimatedRexport).View;
return (
<View onLayout={handleLayout} style={items2}>
<View style={styles.progressTrack}>
<View2
style={[styles.progressRedesign,
type === 'ALERT' ? styles.progressBarWarning : styles.progressBarBrand, animatedStyles]}
/>
</View>
</View>
);
}
function Notification({icon, textChildren, children, alertLabel, accessoryLabelNode, rightAccessory, header, showDragHandle, onAccessibilityExpand, bodyStyle, expandedContentVisible}) { // fn#84147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:5843, offset: 0x01f3b9c7, size: 738 bytes, params: 2, frame: 41
showDragHandle = !(showDragHandle === undefined) && showDragHandle;
expandedContentVisible = !(expandedContentVisible === undefined) && expandedContentVisible;
const styles = useStyles();
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const r8 = (
alertLabel != null
? (
<View style={styles.alertContainer}>
{((CircleErrorIcon) => <CircleErrorIcon style={styles.warningIcon} color="black" />)((require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon)}
{((Text) => <Text variant="text-xs/bold" color="black">{alertLabel.toUpperCase()}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
{children ?? ((Text) => <Text variant="redesign/message-preview/medium" color="text-subtle" lineClamp={2}>{textChildren}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View2>
{rightAccessory}
)
: null
);
const r12 = expandedContentVisible ? styles.contentContainerExpanded : styles.contentContainer;
const r14 = (
icon != null
? (
<View style={styles.iconContainer}>
{icon}
</View>
)
: null
);
const View2 = (ReanimatedRexport).View;
return (
<>
{r8}
<View style={r12}>
{r14}
<View2 style={[styles.body, bodyStyle]}>
<View style={styles.labelContainer}>
{accessoryLabelNode ?? null}
<View style={styles.headerContainer}>
{
header.type === 'message'
? ((Component) => <Component {...header} />)(importDefault(10996) /* metro dependency 10996: MessageNotificationHeader */)
: ((SimpleNotificationHeader) => <SimpleNotificationHeader {...header} />)((require(10996) /* metro dependency 10996: MessageNotificationHeader */).SimpleNotificationHeader)
}
</View>
</View>
{children ?? ((Text) => <Text variant="redesign/message-preview/medium" color="text-subtle" lineClamp={2}>{textChildren}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View2>
{rightAccessory}
</View>
{
showDragHandle
? (
<DragHandle onAccessibilityExpand={onAccessibilityExpand} />
)
: null
}
</>
);
}
function NotificationPressable(a0) { // fn#84148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:6816, offset: 0x01f3bca9, size: 625 bytes, params: 2, frame: 34
const onPress = a0.onPress;
const onLongPress = a0.onLongPress;
const children = a0.children;
const percent = a0.percent;
const hideProgress = a0.hideProgress;
const type = a0.type;
const isExpandableNotification = a0.isExpandableNotification;
const object = {'onPress': 0, 'onLongPress': 0, 'children': 0, 'percent': 0, 'hideProgress': 0, 'type': 0,
'isExpandableNotification': 0};
const value = null;
silentSetPrototypeOf(object, value, undefined);
const value2 = copyDataProperties({}, a0, object, undefined);
const styles = useStyles();
const value4 = (ReanimatedRexportModule).useSharedValue(1);
const value5 = ReactModule.useCallback(_fun84149, [value4]);
const value6 = ReactModule.useCallback(_fun84150, [value4]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const NotificationPressableN2 = NotificationPressableN;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.scale = value4;
object2.ON_PRESS_SPRING_CONFIG = env0_14;
NotificationPressableN2.__closure = object2;
NotificationPressableN2.__workletHash = 13836553588367;
NotificationPressableN2.__initData = env0_15;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [NotificationPressableN2]);
const useCanExpandInAppNotification = InAppNotificationExpandExperimentModule.useCanExpandInAppNotification;
const canExpand = Reflect.apply(useCanExpandInAppNotification, InAppNotificationExpandExperimentModule,
['NotificationPressable']).canExpand;
const value8 = ReactModule.useMemo(function() {
return {foreground: true};
}, []);
const View = (ReanimatedRexport).View;
const items3 = [styles.shadow];
items3[1] = isExpandableNotification ? value : value7;
const PressableHighlight = (PressablesModule).PressableHighlight;
return (
<View style={items3}>
<PressableHighlight
{...value2}
{...{['style']: styles.container}}
{...{['androidRippleConfig']: value8}}
{...{['onPress']: onPress}}
{...{['onPressIn']: value5}}
{...{['onPressOut']: value6}}
{...{['onLongPress']: onLongPress}}
{...{['accessibilityRole']: 'button'}}
>
{children}
{
value != percent
? (
canExpand
? (
<RedesignProgress
percent={percent}
hideProgress={hideProgress}
type={type}
/>
)
: (
<Progress percent={percent} hideProgress={hideProgress} />
)
)
: value
}
</PressableHighlight>
</View>
{showDragHandle ? <DragHandle onAccessibilityExpand={onAccessibilityExpand} /> : null}
</>
);
}
);
function _fun84149() { // fn#84149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7006, offset: 0x01f3bf1a, size: 29 bytes, params: 1, frame: 11
return env0_0.set(0.95);
}
function NotificationPressable(a0) { // fn#84148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:6816, offset: 0x01f3bca9, size: 625 bytes, params: 2, frame: 34
const onPress = a0.onPress;
const onLongPress = a0.onLongPress;
const children = a0.children;
const percent = a0.percent;
const hideProgress = a0.hideProgress;
const type = a0.type;
const isExpandableNotification = a0.isExpandableNotification;
const object3 = {'onPress': 0, 'onLongPress': 0, 'children': 0, 'percent': 0, 'hideProgress': 0, 'type': 0,
'isExpandableNotification': 0};
const value = null;
silentSetPrototypeOf(object3, value, undefined);
const value2 = copyDataProperties({}, a0, object3, undefined);
const styles = useStyles();
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
const value5 = env0_4.useCallback(_fun84149, [value4]);
const value6 = env0_4.useCallback(_fun84150, [value4]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = NotificationPressableN;
const object4 = {};
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object4.scale = value4;
object4.ON_PRESS_SPRING_CONFIG = env0_14;
closure.__closure = object4;
closure.__workletHash = 13836553588367;
closure.__initData = env0_15;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const inAppNotificationExpandExperimentModule = require(10974) /* metro dependency 10974: InAppNotificationExpandExperiment */;
const useCanExpandInAppNotification = inAppNotificationExpandExperimentModule.useCanExpandInAppNotification;
const canExpand = Reflect.apply(useCanExpandInAppNotification, inAppNotificationExpandExperimentModule,
['NotificationPressable']).canExpand;
const value8 = env0_4.useMemo(function() {
return {foreground: true};
}, []);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.shadow];
items3[1] = isExpandableNotification ? value : value7;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
return (
<View style={items3}>
<PressableHighlight
{...value2}
{...{['style']: styles.container}}
{...{['androidRippleConfig']: value8}}
{...{['onPress']: onPress}}
{...{['onPressIn']: value5}}
{...{['onPressOut']: value6}}
{...{['onLongPress']: onLongPress}}
{...{['accessibilityRole']: 'button'}}
>
{children}
{value != percent ? canExpand ? <RedesignProgress percent={percent} hideProgress={hideProgress} type={type} /> : <Progress percent={percent} hideProgress={hideProgress} /> : value}
</PressableHighlight>
</View>
);
}
function _fun84150() { // fn#84150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7044, offset: 0x01f3bf37, size: 22 bytes, params: 1, frame: 11
return env0_0.set(1);
}
function NotificationPressableN() { // fn#84151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7094, owner: NotificationPressable.N, offset: 0x01f3bf4d, size: 79 bytes, params: 1, frame: 16
const object2 = {};
object2.scale = SpringModule.withSpring(env0_0.get(), env1_14);
return {transform: [object2]};
}
function _fun84135() { // fn#84135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2549, offset: 0x01f3b446, size: 113 bytes, params: 1, frame: 15
const expandNUXState = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).getExpandNUXState();
const numTimesShown = expandNUXState.numTimesShown;
const MAX_TIMES_SHOWN = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).MAX_TIMES_SHOWN;
if (numTimesShown >= MAX_TIMES_SHOWN) {
return false;
}
const value4 = env0_4 - expandNUXState.lastShownAtMs;
const ONE_DAY_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).ONE_DAY_MS;
return !(value4 < ONE_DAY_MS);
}
function _fun84136({nativeEvent}) { // fn#84136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2909, offset: 0x01f3b4b7, size: 49 bytes, params: 2, frame: 11
const env0_0 = nativeEvent.layout.height;
env0_3(function(a0) {
var value = a0;
return value === height ? value : height;
});
}
function DragHandleC() { // fn#84138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3002, owner: DragHandle.c, offset: 0x01f3b4fc, size: 103 bytes, params: 1, frame: 16
const object2 = {};
const binding = env0_1;
object2.opacity = binding.get();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.height = reanimatedRexportModule.interpolate(binding.get(), [0, 1], [0, env0_2]);
return object2;
}
function DragHandleN() { // fn#84139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3233, owner: DragHandle.N, offset: 0x01f3b563, size: 39 bytes, params: 1, frame: 11
const object = {};
object.translateY = env0_0.get();
return {transform: [object]};
}
function _fun84140() { // fn#84140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3376, offset: 0x01f3b58a, size: 315 bytes, params: 1, frame: 26
var environment;
var value2;
var binding;
var set;
var moduleValue2;
var withDelay;
const NUX_REVEAL_DELAY_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).NUX_REVEAL_DELAY_MS;
var moduleValue3;
var withTiming;
var object2;
const NUX_REVEAL_DURATION_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).NUX_REVEAL_DURATION_MS;
var value3;
var moduleValue4;
var withRepeat;
var moduleValue5;
var DRAG_HANDLE_BOUNCE_DISTANCE;
var value;
if (env0_5) {
value2 = environment.__proto__;
(require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).markExpandNUXStateAsShown();
binding = env0_1;
set = binding.set;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue2.withDelay;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue2, [NUX_REVEAL_DELAY_MS,
Reflect.apply(withTiming,
moduleValue3, [1, {duration: NUX_REVEAL_DURATION_MS}])])]);
binding = env0_0;
set = binding.set;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
value3 = NUX_REVEAL_DELAY_MS + NUX_REVEAL_DURATION_MS;
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withRepeat = moduleValue4.withRepeat;
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue5.withTiming;
DRAG_HANDLE_BOUNCE_DISTANCE = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).DRAG_HANDLE_BOUNCE_DISTANCE;
object2 = {};
object2.duration = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).DRAG_HANDLE_BOUNCE_DURATION_MS;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [value3, Reflect.apply(withRepeat, moduleValue4,
[Reflect.apply(withTiming, moduleValue5, [DRAG_HANDLE_BOUNCE_DISTANCE, object2]), -1, true])])]);
return _fun84141;
}
}
function _fun84143({nativeEvent}) { // fn#84143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4596, offset: 0x01f3b7c1, size: 36 bytes, params: 2, frame: 11
return env0_2(nativeEvent.layout.width);
}
function useProgressAnimationS() { // fn#84144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4693, owner: useProgressAnimation.s, offset: 0x01f3b7e5, size: 79 bytes, params: 1, frame: 11
const value3 = (typeof env0_0 === 'number' ? env0_0 : env0_0.get()) / 100;
const binding = env0_1;
return {transform: [{translateX: binding * value3 - binding}]};
}
function _fun84149() { // fn#84149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7006, offset: 0x01f3bf1a, size: 29 bytes, params: 1, frame: 11
return env0_0.set(0.95);
}
function _fun84150() { // fn#84150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7044, offset: 0x01f3bf37, size: 22 bytes, params: 1, frame: 11
return env0_0.set(1);
}
function NotificationPressableN() { // fn#84151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7094, owner: NotificationPressable.N, offset: 0x01f3bf4d, size: 79 bytes, params: 1, frame: 16
const object = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
object.scale = springModule.withSpring(env0_0.get(), env1_14);
return {transform: [object]};
}
function _fun84141() { // fn#84141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3766, offset: 0x01f3b6c5, size: 69 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_1);
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_0);
}
global.__d(_fun84132, 10994, [57, 31, 27, 33, 4501, 697, 4559, 4017, 10995, 7013, 1365, 4504, 4573, 1244, 7684,
10996, 4577, 10974, 5278,
2]) /* metro module 10994, dependencies: [57, 31, 27, 33, 4501, 697, 4559, 4017, 10995, 7013, 1365, 4504, 4573, 1244, 7684, 10996, 4577, 10974, 5278, 2] */;
@@ -1,286 +1,314 @@
/* Metro module 11229; source: modules/in_app_notifications/native/ReactionNotification.tsx; dependencies: [31, 27, 4502, 3793, 1878, 10963, 661, 33, 1305, 4501, 478, 697, 8765, 6819, 3829, 10921, 10973, 4573, 1423, 11230, 6739, 22, 4634, 566, 4805, 1244, 10975, 10994, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import Emoji from '../../emojis/native/Emoji.tsx'; /* Metro dependency 6739 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseChannelNameModule from '../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as InAppNotificationUtilsModule from '../InAppNotificationUtils.tsx'; /* Metro dependency 10921 */
import * as InAppNotificationConstantsModule from './InAppNotificationConstants.tsx'; /* Metro dependency 10963 */
import * as InAppNotificationRedesignExperimentModule from './InAppNotificationRedesignExperiment.tsx'; /* Metro dependency 10973 */
import * as NotificationModule from './Notification.tsx'; /* Metro dependency 10994 */
function _fun85832(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:6, offset: 0x01f7d46f, size: 654 bytes, params: 8, frame: 29
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = 0;
const value2 = undefined;
const env0_3 = importAll(dependencyMap[value]);
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const value3 = 4;
const env0_7 = importDefault(dependencyMap[value3]);
const env0_8 = (require(10963) /* metro dependency 10963: InAppNotificationConstants */).IN_APP_NOTIFICATION_MAX_HEIGHT;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.Fragment;
const env0_12 = value4.jsxs;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
const property = AVATAR_SIZE_MAP[NORMAL];
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
object2 = {newContainerRoleDot: {'paddingRight': 4, 'paddingTop': 0}};
object2.container = {flexDirection: 'column'};
object2.textEmoji = {fontSize: 12};
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
object2.imageEmoji = {'height': 16, 'width': 16,
transform: platformUtilsModule.isIOS() ? value2 : [{translateY: 2}]};
const value7 = platformUtilsModule;
object2.notificationBodyText = {marginBottom: value7.isIOS() ? value3 : value};
value = platformUtilsModule;
let createStyles = CreateStylesModule.createStyles;
object = {newContainerRoleDot: {'paddingRight': 4, 'paddingTop': 0}};
object.container = {flexDirection: 'column'};
object.textEmoji = {fontSize: 12};
object.imageEmoji = {'height': 16, 'width': 16, transform: PlatformUtilsModule.isIOS() ? value2 : [{translateY: 2}]};
object.notificationBodyText = {marginBottom: PlatformUtilsModule.isIOS() ? value3 : value};
value = PlatformUtilsModule;
value = value.isIOS();
object2.italic = {fontStyle: 'italic',
object.italic = {fontStyle: 'italic',
fontFamily: value ? 'ggsans-NormalItalic, NotoSans-NormalItalic' : 'ggsans-MediumItalic, NotoSans-MediumItalic'};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = createStylesModule;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = CreateStylesModule;
createStyles = value.createStyles;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
const env0_14 = Reflect.apply(createStyles, value, [{clydeNotificationIcon: {'backgroundColor': null,
'justifyContent': 'center', 'alignItems': 'center', backgroundColor: BACKGROUND_BRAND, width: property,
height: property, borderRadius: property / 2}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/ReactionNotification.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/ReactionNotification.tsx');
exports.default = _default_85834;
return value2;
}
function ReactorNotificationIcon({user, guild, isMilestone}) { // fn#85833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:931, offset: 0x01f7d6fd, size: 284 bytes, params: 2, frame: 21
const styles = useStyles();
if (isMilestone) {
return (
<View style={styles.clydeNotificationIcon}>
{((ClydeIcon) => <ClydeIcon color="white" size="md" />)((require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon)}
</View>
);
} else if (user != null) {
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
return (
<Avatar
user={user}
guildId={guild?.id}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL}
/>
);
} else {
return ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.NORMAL} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
}
}
function ReactorNotificationIcon({user, guild, isMilestone}) { // fn#85833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:931, offset: 0x01f7d6fd, size: 284 bytes, params: 2, frame: 21
const styles = useStyles();
if (isMilestone) {
function _default_85834({notification}) { // fn#85834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:1242, offset: 0x01f7d819, size: 1571 bytes, params: 2, frame: 36
var r6;
var r7;
var RoleDot;
var moduleValue8;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var t;
const styles = useStyles();
const AnimateEmoji = (UserSettingsModule).AnimateEmoji;
const value3 = AnimateEmoji.useSetting();
const user = notification.user;
const channel = notification.channel;
const guild = notification.guild;
const guild2 = guild;
const parentChannel = notification.parentChannel;
const reaction = notification.reaction;
let type = channel.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
const value4 = type === GUILD_ANNOUNCEMENT;
const message = notification.message;
const content = message.content;
const isReactionMilestoneNotification2 = InAppNotificationUtilsModule.isReactionMilestoneNotification(message.reactions,
channel?.type);
const useInAppNotificationRedesign = InAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, InAppNotificationRedesignExperimentModule,
['ReactionNotification']).redesignEnabled;
let binding = guild2;
const useCallback = binding.useCallback;
let object = [value3, reaction];
object[2] = styles.imageEmoji;
object[3] = styles.textEmoji;
object[4] = styles.italic;
object[5] = redesignEnabled;
const value6 = Reflect.apply(useCallback, binding, [_fun85835, object]);
const value7 = binding.useMemo(_fun85836, [message.reactions]);
const r1 = value4 && value7 !== 1;
const r23 = r1 || isReactionMilestoneNotification2 ? null : (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(user,
channel);
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
let r22 = r23?.colorString ?? undefined;
const value10 = guild2.useMemo(_fun85839, [roleStyle !== 'username' ? undefined : r22]);
if (roleStyle !== 'dot') {
r6 = undefined;
} else if (r22 === undefined) {
r6 = undefined;
} else {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
object = {color: r22};
r22 = r23?.colorStrings ?? null;
object.colors = r22;
object.containerStyles = styles.newContainerRoleDot;
r6 = <RoleDot {...object} />;
}
binding = guild2;
const value13 = binding.useMemo(_fun85841, [redesignEnabled, channel, parentChannel, guild, r23,
binding.useMemo(_fun85840, [r23, channel, guild, parentChannel]), value10]);
const userAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(message.author,
channel);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([userStore], function() {
return userStore.getCurrentUser();
});
type = channel.type;
const GROUP_DM = ChannelTypes.GROUP_DM;
let r14 = type === GROUP_DM && message.author?.id !== currentUser?.id;
const r9 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'text-md/normal' : 'text-md/medium';
if (r1) {
r7 = (
<Text
variant={r9}
color="text-default"
style={redesignEnabled ? styles.italic : undefined}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Tqk79E, {count: value7})}
</Text>
);
} else if (isReactionMilestoneNotification2) {
var textProps = {variant: r9, color: 'text-default', style: redesignEnabled ? styles.italic : undefined};
format = intl.format;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r14 = r14 ? Reflect.apply(format, intl, [t.J86pqQ, {count: value7,
username: userAuthor.nick}]) : Reflect.apply(format, intl, [t.KTurAR, {count: value7}]);
r7 = (
<Text {...textProps}>
{r14}
</Text>
);
} else {
moduleValue8 = InAppNotificationUtilsModule;
r7 = (
<>
<Text
variant={r9}
color="text-default"
style={[styles.notificationBodyText, redesignEnabled ? styles.italic : undefined]}
>
{moduleValue8.getNotificationBodyText({notificationMessageContent: content,
isGdmAllReactionNotification: r14, messageAuthor: userAuthor, emojiHook: value6})}
</Text>
{((NativeChannelRowPreview) => <NativeChannelRowPreview message={message} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} />)((require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeChannelRowPreview)}
</>
);
}
const Notification = (NotificationModule).Notification;
return (
<View style={styles.clydeNotificationIcon}>
{((ClydeIcon) => <ClydeIcon color="white" size="md" />)((require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon)}
</View>
);
} else if (user != null) {
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
return (
<Avatar
user={user}
guildId={guild?.id}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL}
<Notification
icon={<ReactorNotificationIcon
user={user}
guild={guild}
isMilestone={isReactionMilestoneNotification2}
/>}
accessoryLabelNode={r6}
children={<View style={styles.container}>
{r7}
</View>}
header={value13}
/>
);
} else {
return ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.NORMAL} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
}
}
function _default_85834({notification}) { // fn#85834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:1242, offset: 0x01f7d819, size: 1571 bytes, params: 2, frame: 36
var r6;
var r7;
var RoleDot;
var moduleValue8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var t;
const styles = useStyles();
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
const value3 = AnimateEmoji.useSetting();
const user = notification.user;
const channel = notification.channel;
const guild = notification.guild;
const env0_3 = guild;
const parentChannel = notification.parentChannel;
const reaction = notification.reaction;
let type = channel.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
const value4 = type === GUILD_ANNOUNCEMENT;
const message = notification.message;
const content = message.content;
const inAppNotificationUtilsModule = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
const isReactionMilestoneNotification2 = inAppNotificationUtilsModule.isReactionMilestoneNotification(message.reactions,
channel?.type);
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
['ReactionNotification']).redesignEnabled;
let binding = env0_3;
const useCallback = binding.useCallback;
let object = [value3, reaction];
object[2] = styles.imageEmoji;
object[3] = styles.textEmoji;
object[4] = styles.italic;
object[5] = redesignEnabled;
const value6 = Reflect.apply(useCallback, binding, [_fun85835, object]);
const value7 = binding.useMemo(_fun85836, [message.reactions]);
const r1 = value4 && value7 !== 1;
const r23 = r1 || isReactionMilestoneNotification2 ? null : (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(user,
channel);
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
let r22 = r23?.colorString ?? undefined;
const value10 = env0_3.useMemo(_fun85839, [roleStyle !== 'username' ? undefined : r22]);
if (roleStyle !== 'dot') {
r6 = undefined;
} else if (r22 === undefined) {
r6 = undefined;
} else {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
object = {color: r22};
r22 = r23?.colorStrings ?? null;
object.colors = r22;
object.containerStyles = styles.newContainerRoleDot;
r6 = <RoleDot {...object} />;
}
binding = env0_3;
const value13 = binding.useMemo(_fun85841, [redesignEnabled, channel, parentChannel, guild, r23,
binding.useMemo(_fun85840, [r23, channel, guild, parentChannel]), value10]);
const userAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(message.author,
channel);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
type = channel.type;
const GROUP_DM = ChannelTypes.GROUP_DM;
let r14 = type === GROUP_DM && message.author?.id !== currentUser?.id;
const r9 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'text-md/normal' : 'text-md/medium';
if (r1) {
r7 = <Text variant={r9} color="text-default" style={redesignEnabled ? styles.italic : undefined}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Tqk79E,
{count: value7})}</Text>;
} else if (isReactionMilestoneNotification2) {
var textProps = {variant: r9, color: 'text-default', style: redesignEnabled ? styles.italic : undefined};
format = intl.format;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r14 = r14 ? Reflect.apply(format, intl, [t.J86pqQ, {count: value7,
username: userAuthor.nick}]) : Reflect.apply(format, intl, [t.KTurAR, {count: value7}]);
r7 = <Text {...textProps}>{r14}</Text>;
} else {
moduleValue8 = inAppNotificationUtilsModule;
r7 = <><Text variant={r9} color="text-default" style={[styles.notificationBodyText,
redesignEnabled ? styles.italic : undefined]}>{moduleValue8.getNotificationBodyText({notificationMessageContent: content,
isGdmAllReactionNotification: r14, messageAuthor: userAuthor,
emojiHook: value6})}</Text>{((NativeChannelRowPreview) => <NativeChannelRowPreview message={message} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} />)((require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeChannelRowPreview)}</>;
}
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
return (
<Notification
icon={<ReactorNotificationIcon user={user} guild={guild} isMilestone={isReactionMilestoneNotification2} />}
accessoryLabelNode={r6}
children={<View style={styles.container}>{r7}</View>}
header={value13}
/>
);
}
function _fun85835() { // fn#85835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:1609, offset: 0x01f7de3c, size: 454 bytes, params: 1, frame: 20
var id;
var r6;
var emoji;
var value3;
var defaultImport;
var getEmojiURL;
var object2;
var value5;
var value6;
var Text;
let reactionBinding = reaction;
const value2 = undefined;
if ((reactionBinding == null ? value2 : reaction.emoji.name) == null) {
return null;
}
let name = reaction == null ? value2 : reaction.emoji.name;
if (name == null) {
if ((reaction == null ? value2 : reaction.emoji.id) != null) {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport.getEmojiURL;
object2 = {};
object2.id = reaction.emoji.id;
object2.animated = env0_1 && reaction.emoji.animated;
object2.size = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).DEFAULT_EMOJI_SIZE;
r6 = Reflect.apply(getEmojiURL, defaultImport, [object2]);
} else {
r6 = value2;
function _fun85835() { // fn#85835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:1609, offset: 0x01f7de3c, size: 454 bytes, params: 1, frame: 20
var id;
var r6;
var emoji;
var value3;
var defaultImport;
var getEmojiURL;
var object;
var value5;
var value6;
var Text;
let reactionBinding = reaction;
const value2 = undefined;
if ((reactionBinding == null ? value2 : reaction.emoji.name) == null) {
return null;
}
let name = reaction == null ? value2 : reaction.emoji.name;
if (name == null) {
if ((reaction == null ? value2 : reaction.emoji.id) != null) {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport.getEmojiURL;
object = {};
object.id = reaction.emoji.id;
object.animated = env0_1 && reaction.emoji.animated;
object.size = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).DEFAULT_EMOJI_SIZE;
r6 = Reflect.apply(getEmojiURL, defaultImport, [object]);
} else {
r6 = value2;
}
value5 = environment.__proto__;
} else {
id = reaction == null ? value2 : reaction.emoji.id;
if (id == null) {
value6 = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {style: redesignEnabled ? styles.italic : value2, variant: 'text-sm/normal'};
reactionBinding = reaction;
emoji = reactionBinding.emoji;
name = emoji.name;
textProps.children = name;
emoji = reactionBinding.emoji;
name = emoji.name;
return <Text {...textProps} key={name} />;
}
id = reaction == null ? value2 : reaction.emoji.id;
if (id != null) {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport.getEmojiURL;
object = {};
object.id = reaction.emoji.id;
object.animated = env0_1 && reaction.emoji.animated;
object.size = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).DEFAULT_EMOJI_SIZE;
r6 = Reflect.apply(getEmojiURL, defaultImport, [object]);
} else {
r6 = value2;
}
}
const stylesBinding = styles;
return (
<Emoji
textEmojiStyle={stylesBinding.textEmoji}
fastImageStyle={stylesBinding.imageEmoji}
src={r6}
name={reaction.emoji.name}
/>
);
}
value5 = environment.__proto__;
} else {
id = reaction == null ? value2 : reaction.emoji.id;
if (id == null) {
value6 = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {style: redesignEnabled ? styles.italic : value2, variant: 'text-sm/normal'};
reactionBinding = reaction;
emoji = reactionBinding.emoji;
name = emoji.name;
textProps.children = name;
emoji = reactionBinding.emoji;
name = emoji.name;
return <Text {...textProps} key={name} />;
function _fun85836() { // fn#85836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2154, offset: 0x01f7e002, size: 61 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(22) /* metro dependency 22 */;
return value.sumBy(message.reactions, function({count_details}) {
var r5;
var value = undefined;
r5 = count_details == null ? value : count_details.burst;
var value2 = 0;
return (r5 ?? value2) + ((count_details == null ? value : count_details.normal) ?? value2);
});
}
id = reaction == null ? value2 : reaction.emoji.id;
if (id != null) {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport.getEmojiURL;
object2 = {};
object2.id = reaction.emoji.id;
object2.animated = env0_1 && reaction.emoji.animated;
object2.size = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).DEFAULT_EMOJI_SIZE;
r6 = Reflect.apply(getEmojiURL, defaultImport, [object2]);
} else {
r6 = value2;
function _fun85839() { // fn#85839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2513, offset: 0x01f7e03f, size: 33 bytes, params: 1, frame: 3
return ConstantsModule.ChannelTypes != null ? {color: ConstantsModule.ChannelTypes} : undefined;
}
function _fun85840() { // fn#85840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2713, offset: 0x01f7e060, size: 195 bytes, params: 1, frame: 20
var r0;
var guildBinding;
let value = environment.__proto__;
if (InAppNotificationConstantsModule.IN_APP_NOTIFICATION_MAX_HEIGHT == null) {
guildBinding = guild;
value = '';
value = value + UseChannelNameModule.computeChannelName(channel, userStore, RelationshipStore,
true) + ' ' + (guildBinding != null ? ', ' + guild.name : value);
r0 = value;
} else {
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
value = value.getNotificationTitle(channel, InAppNotificationConstantsModule.IN_APP_NOTIFICATION_MAX_HEIGHT, parentChannel, guild);
r0 = value;
}
return r0;
}
function _fun85841() { // fn#85841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2877, offset: 0x01f7e123, size: 90 bytes, params: 1, frame: 4
return redesignEnabled ? {type: 'message', channel: channel, parentChannel: parentChannel, guild: guild,
author: InAppNotificationConstantsModule.IN_APP_NOTIFICATION_MAX_HEIGHT} : {type: 'simple', text: JsxRuntimeModule.Fragment, labelStyle: JsxRuntimeModule.jsx};
}
}
const Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
const stylesBinding = styles;
return (
<Emoji
textEmojiStyle={stylesBinding.textEmoji}
fastImageStyle={stylesBinding.imageEmoji}
src={r6}
name={reaction.emoji.name}
/>
);
}
function _fun85836() { // fn#85836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2154, offset: 0x01f7e002, size: 61 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(22) /* metro dependency 22 */;
return value.sumBy(message.reactions, function({count_details}) {
var r5;
var value = undefined;
r5 = count_details == null ? value : count_details.burst;
var value2 = 0;
return (r5 ?? value2) + ((count_details == null ? value : count_details.normal) ?? value2);
});
}
function _fun85839() { // fn#85839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2513, offset: 0x01f7e03f, size: 33 bytes, params: 1, frame: 3
return env0_9 != null ? {color: env0_9} : undefined;
}
function _fun85840() { // fn#85840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2713, offset: 0x01f7e060, size: 195 bytes, params: 1, frame: 20
var r0;
var guildBinding;
let value = environment.__proto__;
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
if (env0_8 == null) {
guildBinding = guild;
value = '';
value = value + useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore,
true) + ' ' + (guildBinding != null ? ', ' + guild.name : value);
r0 = value;
} else {
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
value = value.getNotificationTitle(channel, env0_8, parentChannel, guild);
r0 = value;
}
return r0;
}
function _fun85841() { // fn#85841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2877, offset: 0x01f7e123, size: 90 bytes, params: 1, frame: 4
return redesignEnabled ? {type: 'message', channel: channel, parentChannel: parentChannel, guild: guild,
author: env0_8} : {type: 'simple', text: env0_11, labelStyle: env0_10};
}
global.__d(_fun85832, 11229, [31, 27, 4502, 3793, 1878, 10963, 661, 33, 1305, 4501, 478, 697, 8765, 6819, 3829,
10921, 10973, 4573, 1423, 11230, 6739, 22, 4634, 566, 4805, 1244, 10975, 10994,
2]) /* metro module 11229, dependencies: [31, 27, 4502, 3793, 1878, 10963, 661, 33, 1305, 4501, 478, 697, 8765, 6819, 3829, 10921, 10973, 4573, 1423, 11230, 6739, 22, 4634, 566, 4805, 1244, 10975, 10994, 2] */;
@@ -1,80 +1,96 @@
/* Metro module 11254; source: modules/in_app_notifications/native/ReminderNotification.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 4076, 44, 1244, 10973, 10994, 10975, 3834, 2] */
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ChannelListLayoutTypesModule from '../../main_tabs_v2/ChannelListLayoutTypes.tsx'; /* Metro dependency 3834 */
import * as ClockIconModule from '../../../design/components/Icon/native/redesign/generated/ClockIcon.tsx'; /* Metro dependency 4076 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as InAppNotificationRedesignExperimentModule from './InAppNotificationRedesignExperiment.tsx'; /* Metro dependency 10973 */
import * as ChannelRowPreviewModule from '../../main_tabs_v2/native/shared_components/ChannelRowPreview.tsx'; /* Metro dependency 10975 */
import * as NotificationModule from './Notification.tsx'; /* Metro dependency 10994 */
function _fun86021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:6, offset: 0x01f845c5, size: 357 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object4 = {'position': 'absolute', 'width': 20, 'height': 20, 'right': 0, 'bottom': 0,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'position': 'absolute', 'width': 20, 'height': 20, 'right': 0, 'bottom': 0,
'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center', 'justifyContent': 'center'};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.backgroundColor = BACKGROUND_BRAND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{cutoutIconContainer: object4,
object2.backgroundColor = BACKGROUND_BRAND;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [{cutoutIconContainer: object2,
avatarContainer: {position: 'relative'}}]);
object3 = {'direction': null, 'radius': 12, 'inset': -2};
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
object = {'direction': null, 'radius': 12, 'inset': -2};
const CutoutDirection = (NativeModule).CutoutDirection;
const BOTTOM_RIGHT = CutoutDirection.BOTTOM_RIGHT;
object3.direction = BOTTOM_RIGHT;
object.direction = BOTTOM_RIGHT;
value = value.memo(_fun86023);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/ReminderNotification.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/ReminderNotification.tsx');
exports.default = value;
}
function NotificationAvatar({user, guildId}) { // fn#86022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:504, offset: 0x01f8472a, size: 237 bytes, params: 2, frame: 23
const styles = useStyles();
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
const avatar = <Avatar user={user} guildId={guildId} size={LARGE_48} cutout={env0_8} />;
const ClockIcon = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
return (
<View style={styles.avatarContainer}>
{avatar}
<View style={styles.cutoutIconContainer}>
<ClockIcon size="xxs" color={WHITE} />
</View>
</View>
);
}
function _fun86023(a0) { // fn#86023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:782, offset: 0x01f84817, size: 321 bytes, params: 2, frame: 21
const {savedMessage, author, channel} = a0.notification;
const message = savedMessage.message;
(importDefault(44) /* metro dependency 44 */)(message != null, 'Message in a notification should not be null.');
const notificationAvatar = <NotificationAvatar user={author} guildId={channel.guild_id} />;
const value3 = env0_3.useMemo(function() {
var object = {type: 'simple'};
object.text = require(dependencyMap[8]).intl.string(require(dependencyMap[8]).t.Whs8tE);
return object;
}, []);
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
['ReminderNotification']).redesignEnabled;
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
const r8 = redesignEnabled ? 'text-default' : 'text-subtle';
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
const COZY = ChannelListLayoutTypes.COZY;
return (
<Notification icon={notificationAvatar} header={value3}>
<ChannelRowPreview
channel={channel}
message={message}
color={r8}
layout={COZY}
muted={false}
lineClamp={redesignEnabled ? 3 : 2}
function NotificationAvatar({user, guildId}) { // fn#86022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:504, offset: 0x01f8472a, size: 237 bytes, params: 2, frame: 23
const styles = useStyles();
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
const avatar = (
<Avatar
user={user}
guildId={guildId}
size={LARGE_48}
cutout={env0_8}
/>
</Notification>
);
);
const ClockIcon = (ClockIconModule).ClockIcon;
const WHITE = (Native).colors.WHITE;
return (
<View style={styles.avatarContainer}>
{avatar}
<View style={styles.cutoutIconContainer}>
<ClockIcon size="xxs" color={WHITE} />
</View>
</View>
);
}
function _fun86023(a0) { // fn#86023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:782, offset: 0x01f84817, size: 321 bytes, params: 2, frame: 21
const {savedMessage, author, channel} = a0.notification;
const message = savedMessage.message;
(Module00044)(message != null, 'Message in a notification should not be null.');
const notificationAvatar = <NotificationAvatar user={author} guildId={channel.guild_id} />;
const value3 = env0_3.useMemo(function() {
var object = {type: 'simple'};
object.text = require(dependencyMap[8]).intl.string(require(dependencyMap[8]).t.Whs8tE);
return object;
}, []);
const useInAppNotificationRedesign = InAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, InAppNotificationRedesignExperimentModule,
['ReminderNotification']).redesignEnabled;
const Notification = (NotificationModule).Notification;
const ChannelRowPreview = (ChannelRowPreviewModule).ChannelRowPreview;
const r8 = redesignEnabled ? 'text-default' : 'text-subtle';
const ChannelListLayoutTypes = (ChannelListLayoutTypesModule).ChannelListLayoutTypes;
const COZY = ChannelListLayoutTypes.COZY;
return (
<Notification icon={notificationAvatar} header={value3}>
<ChannelRowPreview
channel={channel}
message={message}
color={r8}
layout={COZY}
muted={false}
lineClamp={redesignEnabled ? 3 : 2}
/>
</Notification>
);
}
}
global.__d(_fun86021, 11254, [31, 27, 33, 4501, 697, 1305, 4076, 44, 1244, 10973, 10994, 10975, 3834,
2]) /* metro module 11254, dependencies: [31, 27, 33, 4501, 697, 1305, 4076, 44, 1244, 10973, 10994, 10975, 3834, 2] */;
@@ -1,39 +1,51 @@
/* Metro module 11255; source: modules/in_app_notifications/native/RestrictedHoursWarningNotification.tsx; dependencies: [31, 27, 33, 4501, 697, 11256, 10994, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NotificationModule from './Notification.tsx'; /* Metro dependency 10994 */
import * as ThemeDarkIconModule from '../../../design/components/Icon/native/redesign/generated/ThemeDarkIcon.tsx'; /* Metro dependency 11256 */
function _fun86025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11441:6, offset: 0x01f849a8, size: 274 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'width': 48, 'height': 48, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'width': 48, 'height': 48, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center'};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object.backgroundColor = BACKGROUND_BRAND;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{iconContainer: object}]);
object2.backgroundColor = BACKGROUND_BRAND;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{iconContainer: object2}]);
value = value.memo(_fun86026);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/RestrictedHoursWarningNotification.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/RestrictedHoursWarningNotification.tsx');
exports.default = value;
function _fun86026({notification}) { // fn#86026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11441:331, offset: 0x01f84aba, size: 213 bytes, params: 2, frame: 22
const styles = useStyles();
const ThemeDarkIcon = (ThemeDarkIconModule).ThemeDarkIcon;
const WHITE = (Native).colors.WHITE;
const view = (
<View style={styles.iconContainer}>
<ThemeDarkIcon size="sm" color={WHITE} />
</View>
);
const value = env0_3.useMemo(function() {
return {type: 'simple', text: notification.title};
}, [notification.title]);
const Notification = (NotificationModule).Notification;
return (
<Notification
icon={view}
header={value}
textChildren={notification.subtitle}
/>
);
}
}
function _fun86026({notification}) { // fn#86026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11441:331, offset: 0x01f84aba, size: 213 bytes, params: 2, frame: 22
const styles = useStyles();
const ThemeDarkIcon = (require(11256) /* metro dependency 11256: ThemeDarkIcon */).ThemeDarkIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const view = <View style={styles.iconContainer}><ThemeDarkIcon size="sm" color={WHITE} /></View>;
const value = env0_3.useMemo(function() {
return {type: 'simple', text: notification.title};
}, [notification.title]);
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
return (
<Notification
icon={view}
header={value}
textChildren={notification.subtitle}
/>
);
}
global.__d(_fun86025, 11255, [31, 27, 33, 4501, 697, 11256, 10994,
2]) /* metro module 11255, dependencies: [31, 27, 33, 4501, 697, 11256, 10994, 2] */;
@@ -1,4 +1,14 @@
/* Metro module 10965; source: modules/in_app_notifications/native/hooks/usePreviewableMedia.tsx; dependencies: [31, 27, 661, 33, 4501, 3860, 697, 7744, 9783, 10966, 4631, 10968, 4845, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Module07744 from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as Module07744Module from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as CirclePlayIconModule from '../../../../design/components/Icon/native/redesign/generated/CirclePlayIcon.tsx'; /* Metro dependency 9783 */
import * as WaveformIconModule from '../../../../design/components/Icon/native/redesign/generated/WaveformIcon.tsx'; /* Metro dependency 10966 */
function _fun84008(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:6, offset: 0x01f33cbe, size: 440 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_84011 = function(a0, a1) {
@@ -46,8 +56,7 @@ function _fun84008(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
value = require(661) /* metro dependency 661: Constants */;
@@ -59,361 +68,378 @@ function _fun84008(global, require, importDefault, importAll, module, exports, d
const env0_9 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
object['flexDirection'] = 'row';
object['alignItems'] = 'center';
object['justifyContent'] = 'center';
object['paddingBottom'] = 13;
const env0_11 = Reflect.apply(createStyles, value, [{voiceMessageIconOverlay: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/hooks/usePreviewableMedia.tsx');
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['flexDirection'] = 'row';
object2['alignItems'] = 'center';
object2['justifyContent'] = 'center';
object2['paddingBottom'] = 13;
const env0_11 = Reflect.apply(createStyles, value, [{voiceMessageIconOverlay: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/hooks/usePreviewableMedia.tsx');
exports.PreviewableMediaTypes = {IMAGE: 'image', VIDEO: 'video', AUDIO: 'audio', FILE: 'file', STICKER: 'sticker',
GIF: 'gif', VOICE_MESSAGE: 'voice_message'};
exports.usePreviewableMedia = usePreviewableMedia;
}
function _createForOfIteratorHelperLoose_84009(a0, a1) { // fn#84009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:237, offset: 0x01f33e76, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_84009(a0, a1) { // fn#84009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:237, offset: 0x01f33e76, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun84010;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_84011(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun84010;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_84011(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_84011(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_84011(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun84010;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function VoiceMessageIcon() { // fn#84012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:1463, offset: 0x01f33fea, size: 358 bytes, params: 1, frame: 26
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
const value2 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_MOD_STRONG]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
const value3 = Reflect.apply(useToken, moduleValue2, [BACKGROUND_MOD_SUBTLE]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const Path = (require(7744) /* metro dependency 7744 */).Path;
const defaultImport2 = ((Component) => <Component width="100%" height="100%" viewBox="0 0 64 61" fill="none"><Path d="M22.2188 59.8545C19.5607 61.6263 16.0003 59.7208 16 56.5264V48C7.16344 48 2.5772e-07 40.8366 0 32V16C0 7.16344 7.16344 0 16 0H48C56.8366 0 64 7.16344 64 16V32C64 40.8366 56.8366 48 48 48H40L22.2188 59.8545Z" fill={value2} stroke={value3} /></Component>)(defaultImport);
const CirclePlayIcon = (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon;
const circlePlayIcon = <CirclePlayIcon size="md" color="background-brand" secondaryColor="white" />;
const WaveformIcon = (require(10966) /* metro dependency 10966: WaveformIcon */).WaveformIcon;
return (
<>
{defaultImport2}
<View style={styles.voiceMessageIconOverlay}>
{circlePlayIcon}
<WaveformIcon size="md" color="background-brand" />
</View>
</>
);
}
function getBasePreviewableMedia({message, isForward}) { // fn#84013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:2168, offset: 0x01f34150, size: 1106 bytes, params: 2, frame: 38
var r4;
var r22;
var r21;
var r20;
var r9;
var r15;
var value2;
var value3;
var done;
var value4;
var value5;
var filename;
var moduleValue;
var isImageFile;
var moduleValue2;
var isVideoFile;
var moduleValue3;
var isAudioFile2;
var push;
var object2;
var id;
var binding;
var FILE;
var jsxRuntimeEnv0_7Binding;
var FileIcon;
var colors;
var ICON_SUBTLE;
var value6;
var AUDIO;
var CirclePlayIcon;
var value7;
var object8;
var VIDEO;
var value8;
var object9;
var IMAGE;
var value9;
var value10;
var property;
var object10;
var VOICE_MESSAGE;
var value14;
var type;
var GIFV;
var object11;
var GIF;
var value15;
var value16;
var object12;
var STICKER;
const items2 = [];
if (message.attachments.length > 0) {
if (message.hasFlag(MessageFlags.IS_VOICE_MESSAGE)) {
property = message.attachments[0];
push = items2.push;
object10 = {};
id = property.id;
VOICE_MESSAGE = env0_10.VOICE_MESSAGE;
object10.id = '' + id + '-' + VOICE_MESSAGE;
VOICE_MESSAGE = env0_10.VOICE_MESSAGE;
object10.type = VOICE_MESSAGE;
object10.media = property;
object10.icon = <VoiceMessageIcon />;
object10.parentType = isForward ? 'forward' : null;
Reflect.apply(push, items2, [object10]);
} else {
value2 = _createForOfIteratorHelperLoose_84009(message.attachments);
value3 = value2();
done = value3.done;
value4 = 'forward';
if (!done) {
r4 = value3;
while (true) {
value5 = r4.value;
filename = value5.filename;
moduleValue = require(4631) /* metro dependency 4631: MediaFormatTesters */;
isImageFile = moduleValue.isImageFile;
if (!Reflect.apply(isImageFile, moduleValue, [filename])) {
moduleValue2 = require(4631) /* metro dependency 4631: MediaFormatTesters */;
isVideoFile = moduleValue2.isVideoFile;
if (Reflect.apply(isVideoFile, moduleValue2, [filename])) {
push = items2.push;
object8 = {};
id = value5.id;
VIDEO = env0_10.VIDEO;
object8.id = '' + id + '-' + VIDEO;
VIDEO = env0_10.VIDEO;
object8.type = VIDEO;
object8.media = value5;
value8 = null;
if (isForward) {
r21 = value4;
continue;
}
r21 = value8;
continue;
object8.parentType = r21;
Reflect.apply(push, items2, [object8]);
break;
}
moduleValue3 = require(4631) /* metro dependency 4631: MediaFormatTesters */;
isAudioFile2 = moduleValue3.isAudioFile(filename);
push = items2.push;
object2 = {};
id = value5.id;
binding = env0_10;
if (isAudioFile2) {
AUDIO = binding.AUDIO;
object2.id = '' + id + '-' + AUDIO;
AUDIO = env0_10.AUDIO;
object2.type = AUDIO;
object2.media = value5;
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
CirclePlayIcon = (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon;
object2.icon = <CirclePlayIcon size="lg" color="background-brand" secondaryColor="white" />;
value7 = null;
if (isForward) {
r21 = value4;
continue;
}
r21 = value7;
continue;
object2.parentType = r21;
Reflect.apply(push, items2, [object2]);
break;
}
FILE = binding.FILE;
object2.id = '' + id + '-' + FILE;
FILE = env0_10.FILE;
object2.type = FILE;
object2.media = value5;
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
FileIcon = (require(10968) /* metro dependency 10968: FileIcon */).FileIcon;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
ICON_SUBTLE = colors.ICON_SUBTLE;
object2.icon = <FileIcon size="lg" color={ICON_SUBTLE} />;
value6 = null;
if (isForward) {
r22 = value4;
continue;
}
r22 = value6;
continue;
object2.parentType = r22;
Reflect.apply(push, items2, [object2]);
break;
}
push = items2.push;
object9 = {};
id = value5.id;
IMAGE = env0_10.IMAGE;
object9.id = '' + id + '-' + IMAGE;
IMAGE = env0_10.IMAGE;
object9.type = IMAGE;
object9.media = value5;
value9 = null;
if (isForward) {
r20 = value4;
continue;
}
r20 = value9;
continue;
object9.parentType = r20;
Reflect.apply(push, items2, [object9]);
value10 = value2();
done = value10.done;
if (done) {
break;
}
r4 = value10;
continue;
}
}
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun84010;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun84010() { // fn#84010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:808, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const value11 = _createForOfIteratorHelperLoose_84009(message.embeds);
const value12 = value11();
done = value12.done;
const value13 = 'forward';
if (!done) {
r9 = value12;
while (true) {
value14 = r9.value;
type = value14.type;
GIFV = MessageEmbedTypes.GIFV;
if (type === GIFV) {
function VoiceMessageIcon() { // fn#84012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:1463, offset: 0x01f33fea, size: 358 bytes, params: 1, frame: 26
const styles = useStyles();
let useToken = UseTokenModule.useToken;
const BACKGROUND_MOD_STRONG = (Native).colors.BACKGROUND_MOD_STRONG;
const value2 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_MOD_STRONG]);
useToken = UseTokenModule.useToken;
const BACKGROUND_MOD_SUBTLE = (Native).colors.BACKGROUND_MOD_SUBTLE;
const value3 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_MOD_SUBTLE]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const defaultImport = Module07744;
const Path = (Module07744Module).Path;
const defaultImport2 = ((Component) => <Component width="100%" height="100%" viewBox="0 0 64 61" fill="none"><Path d="M22.2188 59.8545C19.5607 61.6263 16.0003 59.7208 16 56.5264V48C7.16344 48 2.5772e-07 40.8366 0 32V16C0 7.16344 7.16344 0 16 0H48C56.8366 0 64 7.16344 64 16V32C64 40.8366 56.8366 48 48 48H40L22.2188 59.8545Z" fill={value2} stroke={value3} /></Component>)(defaultImport);
const CirclePlayIcon = (CirclePlayIconModule).CirclePlayIcon;
const circlePlayIcon = (
<CirclePlayIcon
size="md"
color="background-brand"
secondaryColor="white"
/>
);
const WaveformIcon = (WaveformIconModule).WaveformIcon;
return (
<>
{defaultImport2}
<View style={styles.voiceMessageIconOverlay}>
{circlePlayIcon}
<WaveformIcon size="md" color="background-brand" />
</View>
</>
);
}
function getBasePreviewableMedia({message, isForward}) { // fn#84013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:2168, offset: 0x01f34150, size: 1106 bytes, params: 2, frame: 38
var r4;
var r22;
var r21;
var r20;
var r9;
var r15;
var value2;
var value3;
var done;
var value4;
var value5;
var filename;
var moduleValue;
var isImageFile;
var moduleValue2;
var isVideoFile;
var moduleValue3;
var isAudioFile2;
var push;
var object;
var id;
var binding;
var FILE;
var jsxRuntimeEnv0_7Binding;
var FileIcon;
var colors;
var ICON_SUBTLE;
var value6;
var AUDIO;
var CirclePlayIcon;
var value7;
var object3;
var VIDEO;
var value8;
var object4;
var IMAGE;
var value9;
var value10;
var property;
var object5;
var VOICE_MESSAGE;
var value14;
var type;
var GIFV;
var object6;
var GIF;
var value15;
var value16;
var object7;
var STICKER;
const items2 = [];
if (message.attachments.length > 0) {
if (message.hasFlag(MessageFlags.IS_VOICE_MESSAGE)) {
property = message.attachments[0];
push = items2.push;
object11 = {};
id = value14.id;
GIF = env0_10.GIF;
object11.id = '' + id + '-' + GIF;
GIF = env0_10.GIF;
object11.type = GIF;
object11.media = value14;
value15 = null;
if (isForward) {
r15 = value13;
continue;
object5 = {};
id = property.id;
VOICE_MESSAGE = env0_10.VOICE_MESSAGE;
object5.id = '' + id + '-' + VOICE_MESSAGE;
VOICE_MESSAGE = env0_10.VOICE_MESSAGE;
object5.type = VOICE_MESSAGE;
object5.media = property;
object5.icon = <VoiceMessageIcon />;
object5.parentType = isForward ? 'forward' : null;
Reflect.apply(push, items2, [object5]);
} else {
value2 = _createForOfIteratorHelperLoose_84009(message.attachments);
value3 = value2();
done = value3.done;
value4 = 'forward';
if (!done) {
r4 = value3;
while (true) {
value5 = r4.value;
filename = value5.filename;
moduleValue = require(4631) /* metro dependency 4631: MediaFormatTesters */;
isImageFile = moduleValue.isImageFile;
if (!Reflect.apply(isImageFile, moduleValue, [filename])) {
moduleValue2 = require(4631) /* metro dependency 4631: MediaFormatTesters */;
isVideoFile = moduleValue2.isVideoFile;
if (Reflect.apply(isVideoFile, moduleValue2, [filename])) {
push = items2.push;
object3 = {};
id = value5.id;
VIDEO = env0_10.VIDEO;
object3.id = '' + id + '-' + VIDEO;
VIDEO = env0_10.VIDEO;
object3.type = VIDEO;
object3.media = value5;
value8 = null;
if (isForward) {
r21 = value4;
continue;
}
r21 = value8;
continue;
object3.parentType = r21;
Reflect.apply(push, items2, [object3]);
break;
}
moduleValue3 = require(4631) /* metro dependency 4631: MediaFormatTesters */;
isAudioFile2 = moduleValue3.isAudioFile(filename);
push = items2.push;
object = {};
id = value5.id;
binding = env0_10;
if (isAudioFile2) {
AUDIO = binding.AUDIO;
object.id = '' + id + '-' + AUDIO;
AUDIO = env0_10.AUDIO;
object.type = AUDIO;
object.media = value5;
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
CirclePlayIcon = (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon;
object.icon = (
<CirclePlayIcon
size="lg"
color="background-brand"
secondaryColor="white"
/>
);
value7 = null;
if (isForward) {
r21 = value4;
continue;
}
r21 = value7;
continue;
object.parentType = r21;
Reflect.apply(push, items2, [object]);
break;
}
FILE = binding.FILE;
object.id = '' + id + '-' + FILE;
FILE = env0_10.FILE;
object.type = FILE;
object.media = value5;
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
FileIcon = (require(10968) /* metro dependency 10968: FileIcon */).FileIcon;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
ICON_SUBTLE = colors.ICON_SUBTLE;
object.icon = <FileIcon size="lg" color={ICON_SUBTLE} />;
value6 = null;
if (isForward) {
r22 = value4;
continue;
}
r22 = value6;
continue;
object.parentType = r22;
Reflect.apply(push, items2, [object]);
break;
}
push = items2.push;
object4 = {};
id = value5.id;
IMAGE = env0_10.IMAGE;
object4.id = '' + id + '-' + IMAGE;
IMAGE = env0_10.IMAGE;
object4.type = IMAGE;
object4.media = value5;
value9 = null;
if (isForward) {
r20 = value4;
continue;
}
r20 = value9;
continue;
object4.parentType = r20;
Reflect.apply(push, items2, [object4]);
value10 = value2();
done = value10.done;
if (done) {
break;
}
r4 = value10;
continue;
}
}
r15 = value15;
}
}
const value11 = _createForOfIteratorHelperLoose_84009(message.embeds);
const value12 = value11();
done = value12.done;
const value13 = 'forward';
if (!done) {
r9 = value12;
while (true) {
value14 = r9.value;
type = value14.type;
GIFV = MessageEmbedTypes.GIFV;
if (type === GIFV) {
push = items2.push;
object6 = {};
id = value14.id;
GIF = env0_10.GIF;
object6.id = '' + id + '-' + GIF;
GIF = env0_10.GIF;
object6.type = GIF;
object6.media = value14;
value15 = null;
if (isForward) {
r15 = value13;
continue;
}
r15 = value15;
continue;
object6.parentType = r15;
Reflect.apply(push, items2, [object6]);
}
value16 = value11();
done = value16.done;
if (done) {
break;
}
r9 = value16;
continue;
object11.parentType = r15;
Reflect.apply(push, items2, [object11]);
}
value16 = value11();
done = value16.done;
if (done) {
break;
}
if (message.stickerItems.length > 0) {
property = message.stickerItems[0];
push = items2.push;
object7 = {};
id = property.id;
STICKER = env0_10.STICKER;
object7.id = '' + id + '-' + STICKER;
STICKER = env0_10.STICKER;
object7.type = STICKER;
object7.media = property;
object7.parentType = isForward ? value13 : null;
Reflect.apply(push, items2, [object7]);
}
return items2;
}
function usePreviewableMedia(a0) { // fn#84014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:3600, offset: 0x01f345a2, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun84015, [a0]);
function _fun84015() { // fn#84015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:3650, offset: 0x01f345ce, size: 192 bytes, params: 1, frame: 19
var items3;
const items4 = [];
let value = environment.__proto__;
const getBasePreviewableMediaBinding = getBasePreviewableMedia;
const binding = env0_0;
const basePreviewableMediaBinding = getBasePreviewableMediaBinding({message: binding, isForward: false});
let push = items4.push;
const items2 = [];
apply(push, items2, items4, arraySpread(items2, basePreviewableMediaBinding, 0, undefined));
if (importDefault(dependencyMap[12])(binding)) {
if (env0_0.messageSnapshots.length > 0) {
value = getBasePreviewableMedia({message: env0_0.messageSnapshots[0].message, isForward: true});
push = items4.push;
items3 = [];
arraySpread(items3, value, 0, dependencyMap);
apply(push, items3, items4, dependencyMap);
}
}
r9 = value16;
continue;
return items4;
}
}
if (message.stickerItems.length > 0) {
property = message.stickerItems[0];
push = items2.push;
object12 = {};
id = property.id;
STICKER = env0_10.STICKER;
object12.id = '' + id + '-' + STICKER;
STICKER = env0_10.STICKER;
object12.type = STICKER;
object12.media = property;
object12.parentType = isForward ? value13 : null;
Reflect.apply(push, items2, [object12]);
}
return items2;
}
function usePreviewableMedia(a0) { // fn#84014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:3600, offset: 0x01f345a2, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_3.useMemo(_fun84015, [a0]);
}
function _fun84015() { // fn#84015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:3650, offset: 0x01f345ce, size: 192 bytes, params: 1, frame: 19
var items3;
const items4 = [];
let value = environment.__proto__;
const getBasePreviewableMediaBinding = getBasePreviewableMedia;
const binding = env0_0;
const basePreviewableMediaBinding = getBasePreviewableMediaBinding({message: binding, isForward: false});
let push = items4.push;
const items2 = [];
apply(push, items2, items4, arraySpread(items2, basePreviewableMediaBinding, 0, undefined));
if (importDefault(dependencyMap[12])(binding)) {
if (env0_0.messageSnapshots.length > 0) {
value = getBasePreviewableMedia({message: env0_0.messageSnapshots[0].message, isForward: true});
push = items4.push;
items3 = [];
arraySpread(items3, value, 0, dependencyMap);
apply(push, items3, items4, dependencyMap);
}
}
return items4;
}
global.__d(_fun84008, 10965, [31, 27, 661, 33, 4501, 3860, 697, 7744, 9783, 10966, 4631, 10968, 4845,
2]) /* metro module 10965, dependencies: [31, 27, 661, 33, 4501, 3860, 697, 7744, 9783, 10966, 4631, 10968, 4845, 2] */;
@@ -1,64 +1,69 @@
/* Metro module 10993; source: modules/in_app_notifications/native/hooks/usePreviewableMediaText.tsx; dependencies: [31, 10965, 1244, 2] */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UsePreviewableMediaModule from './usePreviewableMedia.tsx'; /* Metro dependency 10965 */
function _fun84128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:6, offset: 0x01f3a671, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/hooks/usePreviewableMediaText.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/in_app_notifications/native/hooks/usePreviewableMediaText.tsx');
exports.usePreviewableMediaText = usePreviewableMediaText;
}
function usePreviewableMediaText({previewableMedia}) { // fn#84129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:235, offset: 0x01f3a6e3, size: 50 bytes, params: 2, frame: 14
return ReactModule.useMemo(_fun84130, [previewableMedia]);
function _fun84130() { // fn#84130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:308, offset: 0x01f3a715, size: 1055 bytes, params: 1, frame: 21
var environment;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var property;
var type;
const PreviewableMediaTypes = (UsePreviewableMediaModule).PreviewableMediaTypes;
var value;
let length = previewableMedia.length;
if (length === 0) {
return {'text': null, 'secondaryText': null};
}
if (previewableMedia.length === 1) {
property = previewableMedia[0];
type = property.type;
value = environment.__proto__;
if (PreviewableMediaTypes.IMAGE === type) {
return {text: intl.string(t.tCcq5p), secondaryText: null};
}
if (PreviewableMediaTypes.VIDEO === type) {
return {text: intl.string(t.KxO2Yl), secondaryText: null};
}
if (PreviewableMediaTypes.AUDIO === type) {
return {text: intl.string(t.FWqQt5), secondaryText: property.media.filename};
}
if (PreviewableMediaTypes.FILE === type) {
return {text: intl.string(t.mX8M6i), secondaryText: property.media.filename};
}
if (PreviewableMediaTypes.STICKER === type) {
return {text: intl.string(t.dyquw8), secondaryText: null};
}
if (PreviewableMediaTypes.VOICE_MESSAGE === type) {
return {text: intl.string(t.slFYgi), secondaryText: null};
}
if (PreviewableMediaTypes.GIF === type) {
return {text: intl.string(t.p0oZmy), secondaryText: null};
}
return {text: intl.string(t.sDqZHL), secondaryText: null};
}
previewableMediaBinding = previewableMedia;
value = previewableMediaBinding.every(function({type}) {
return type === require(dependencyMap[1]).PreviewableMediaTypes.FILE;
});
length = previewableMediaBinding.length;
const formatToPlainString = intl.formatToPlainString;
return {text: value ? Reflect.apply(formatToPlainString, intl, [t.y0gZht,
{count: length}]) : Reflect.apply(formatToPlainString, intl, [t['8/qgDd'], {count: length}]),
secondaryText: null};
}
function usePreviewableMediaText({previewableMedia}) { // fn#84129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:235, offset: 0x01f3a6e3, size: 50 bytes, params: 2, frame: 14
return env0_2.useMemo(_fun84130, [previewableMedia]);
}
function _fun84130() { // fn#84130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:308, offset: 0x01f3a715, size: 1055 bytes, params: 1, frame: 21
var environment;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var property;
var type;
const PreviewableMediaTypes = (require(10965) /* metro dependency 10965: usePreviewableMedia */).PreviewableMediaTypes;
var value;
let length = previewableMedia.length;
if (length === 0) {
return {'text': null, 'secondaryText': null};
}
if (previewableMedia.length === 1) {
property = previewableMedia[0];
type = property.type;
value = environment.__proto__;
if (PreviewableMediaTypes.IMAGE === type) {
return {text: intl.string(t.tCcq5p), secondaryText: null};
}
if (PreviewableMediaTypes.VIDEO === type) {
return {text: intl.string(t.KxO2Yl), secondaryText: null};
}
if (PreviewableMediaTypes.AUDIO === type) {
return {text: intl.string(t.FWqQt5), secondaryText: property.media.filename};
}
if (PreviewableMediaTypes.FILE === type) {
return {text: intl.string(t.mX8M6i), secondaryText: property.media.filename};
}
if (PreviewableMediaTypes.STICKER === type) {
return {text: intl.string(t.dyquw8), secondaryText: null};
}
if (PreviewableMediaTypes.VOICE_MESSAGE === type) {
return {text: intl.string(t.slFYgi), secondaryText: null};
}
if (PreviewableMediaTypes.GIF === type) {
return {text: intl.string(t.p0oZmy), secondaryText: null};
}
return {text: intl.string(t.sDqZHL), secondaryText: null};
}
previewableMediaBinding = previewableMedia;
value = previewableMediaBinding.every(function({type}) {
return type === require(dependencyMap[1]).PreviewableMediaTypes.FILE;
});
length = previewableMediaBinding.length;
const formatToPlainString = intl.formatToPlainString;
return {text: value ? Reflect.apply(formatToPlainString, intl, [t.y0gZht,
{count: length}]) : Reflect.apply(formatToPlainString, intl, [t['8/qgDd'], {count: length}]),
secondaryText: null};
}
global.__d(_fun84128, 10993, [31, 10965, 1244, 2]) /* metro module 10993, dependencies: [31, 10965, 1244, 2] */;