/* Metro module 11380; source: components_native/chat/contentHandlers.tsx; dependencies: [5, 9862, 9598, 8877, 3853, 9834, 8743, 6789, 4080, 11381, 1962, 21, 3829, 1244, 6797, 3856, 4647, 8623, 2] */ import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ToastUtilsModule from '../../modules/toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */ function _fun87229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:6, offset: 0x01fb48bd, size: 225 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const value = Module00005; object = {onLongPressLink: onLongPressLink}; const env0_4 = value(_fun87232); object.onTapAttachmentLink = onTapAttachmentLink; const env0_3 = value(_fun87235); object.onLongPressAttachmentLink = onLongPressAttachmentLink; object.onTapMention = onTapMention; object.onTapTimestamp = onTapTimestamp; object.onTapInlineCode = onTapInlineCode; object.onTapEmoji = onTapEmoji; (FileImportTrackerModule).fileFinishedImporting('components_native/chat/contentHandlers.tsx'); exports.contentHandlers = object; function onLongPressLink({nativeEvent}) { // fn#87230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:129, offset: 0x01fb499e, size: 75 bytes, params: 2, frame: 12 const url = nativeEvent.url; if (url != null && url !== '') { (importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: url}); } } async function _fun87232({nativeEvent}) { // fn#87232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:222, offset: 0x01fb49fd, size: 166 bytes, params: 2, frame: 16 if (true) { var attachmentUrl = nativeEvent.data.attachmentUrl; await undefined; if (false) { return undefined; } if (attachmentUrl != null) { if (attachmentUrl === '') { return undefined; } value = environment.__proto__; var binding = env1_0; var value4 = binding(env1_2[2]); await value4.maybeRefreshAttachmentUrl(attachmentUrl); var value5 = undefined; if (false) { return value5; } binding = env1_1; var binding2 = env1_2; value = binding(binding2[3]); value.trackLinkClicked(value5); value = binding(binding2[4]); value.openURL(value5); } } } function onTapAttachmentLink() { // fn#87233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:392, offset: 0x00d8febd, size: 30 bytes, params: 1, frame: 13 return env0_4.apply(this, arguments); } async function _fun87235({nativeEvent}) { // fn#87235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:468, offset: 0x01fb4ab7, size: 144 bytes, params: 2, frame: 16 if (true) { var attachmentUrl = nativeEvent.data.attachmentUrl; await undefined; if (false) { return undefined; } if (attachmentUrl != null) { if (attachmentUrl === '') { return undefined; } value = environment.__proto__; var binding = env1_0; var value4 = binding(env1_2[2]); await value4.maybeRefreshAttachmentUrl(attachmentUrl); var value5 = undefined; if (false) { return value5; } binding = env1_1; value = binding(env1_2[1]); value({urlString: value5}); } } } function onLongPressAttachmentLink() { // fn#87236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:614, offset: 0x00d6afe6, size: 30 bytes, params: 1, frame: 13 return env0_3.apply(this, arguments); } function onTapMention(a0) { // fn#87237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:671, offset: 0x01fb4b47, size: 720 bytes, params: 2, frame: 26 var r8; const DeveloperMode = require(dependencyMap[12]).DeveloperMode; var object; const intl = require(dependencyMap[13]).intl; const t = require(dependencyMap[13]).t; var defaultImport; var show; var defaultImport2; var openLazy; var defaultImport4; var value; const {userId, channelId, roleName, parsedUserId, roleId, guildId} = require(dependencyMap[5]).getNativeSyntheticEventData(a0); if (userId != null) { value = importDefault(dependencyMap[6]); object = {userId: userId, channelId: channelId}; object.sourceAnalyticsLocations = [importDefault(dependencyMap[7]).USER_MENTION]; value(object); } else if (roleId == null) { if (roleName !== '@everyone') { if (roleName === null) { if (DeveloperMode.getSetting()) { if (parsedUserId != null) { object = {}; object.secondaryConfirmText = intl.string(t['/AXYnE']); object.onConfirmSecondary = onConfirmSecondary; r8 = object; } else { r8 = {}; } } else { r8 = {}; } defaultImport = importDefault(dependencyMap[16]); show = defaultImport.show; object = {}; object.title = intl.string(t.r0DLNm); object.body = intl.string(t.Fqqbhg); object.confirmText = intl.string(t.BddRzS); copyDataProperties(object, r8, undefined); Reflect.apply(show, defaultImport, [object]); } } else if (guildId != null) { defaultImport2 = importDefault(dependencyMap[8]); openLazy = defaultImport2.openLazy; value = require(dependencyMap[10]); value = value(dependencyMap[9], dependencyMap.paths); object = {guildId: guildId}; object.roleId = importDefault(dependencyMap[11]).castGuildIdAsEveryoneGuildRoleId(guildId); object.channelId = channelId; Reflect.apply(openLazy, defaultImport2, [value, 'RoleMembersActionSheet', object]); } else if (roleName === null) { if (DeveloperMode.getSetting()) { if (parsedUserId != null) { object = {}; object.secondaryConfirmText = intl.string(t['/AXYnE']); object.onConfirmSecondary = onConfirmSecondary; r8 = object; } else { r8 = {}; } } else { r8 = {}; } defaultImport = importDefault(dependencyMap[16]); show = defaultImport.show; object = {}; object.title = intl.string(t.r0DLNm); object.body = intl.string(t.Fqqbhg); object.confirmText = intl.string(t.BddRzS); copyDataProperties(object, r8, undefined); Reflect.apply(show, defaultImport, [object]); } } else if (guildId != null) { defaultImport4 = importDefault(dependencyMap[8]); openLazy = defaultImport4.openLazy; value = require(dependencyMap[10]); value = value(dependencyMap[9], dependencyMap.paths); Reflect.apply(openLazy, defaultImport4, [value, 'RoleMembersActionSheet', {guildId: guildId, roleId: roleId, channelId: channelId}]); } else if (roleName !== '@everyone') { if (roleName === null) { if (DeveloperMode.getSetting()) { if (parsedUserId != null) { object = {}; object.secondaryConfirmText = intl.string(t['/AXYnE']); object.onConfirmSecondary = onConfirmSecondary; r8 = object; } else { r8 = {}; } } else { r8 = {}; } defaultImport = importDefault(dependencyMap[16]); show = defaultImport.show; object = {}; object.title = intl.string(t.r0DLNm); object.body = intl.string(t.Fqqbhg); object.confirmText = intl.string(t.BddRzS); copyDataProperties(object, r8, undefined); Reflect.apply(show, defaultImport, [object]); } } else if (guildId != null) { defaultImport2 = importDefault(dependencyMap[8]); openLazy = defaultImport2.openLazy; value = require(dependencyMap[10]); value = value(dependencyMap[9], dependencyMap.paths); object = {guildId: guildId}; object.roleId = importDefault(dependencyMap[11]).castGuildIdAsEveryoneGuildRoleId(guildId); object.channelId = channelId; Reflect.apply(openLazy, defaultImport2, [value, 'RoleMembersActionSheet', object]); } else if (roleName === null) { if (DeveloperMode.getSetting()) { if (parsedUserId != null) { object = {}; object.secondaryConfirmText = intl.string(t['/AXYnE']); object.onConfirmSecondary = onConfirmSecondary; r8 = object; } else { r8 = {}; } } else { r8 = {}; } defaultImport = importDefault(dependencyMap[16]); show = defaultImport.show; object = {}; object.title = intl.string(t.r0DLNm); object.body = intl.string(t.Fqqbhg); object.confirmText = intl.string(t.BddRzS); copyDataProperties(object, r8, undefined); Reflect.apply(show, defaultImport, [object]); } function onConfirmSecondary() { // fn#87238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1341, owner: onTapMention.onConfirmSecondary, offset: 0x01fb4e17, size: 67 bytes, params: 1, frame: 14 let value = environment.__proto__; value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */; value.copy(parsedUserId); (ToastUtilsModule).presentCopiedToClipboard(); } } function onTapTimestamp({nativeEvent}) { // fn#87239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1586, offset: 0x01fb4e5a, size: 59 bytes, params: 2, frame: 12 const node = nativeEvent.node; ToastUtilsModule.presentTimestamp(node.full); } function onTapInlineCode({nativeEvent}) { // fn#87240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1664, offset: 0x01fb4e95, size: 115 bytes, params: 2, frame: 14 const node = nativeEvent.node; let value = node.content != null; if (value && typeof node.content === 'string') { value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */; value.copy(node.content); value = require(3856) /* metro dependency 3856: ToastUtils */; value.presentCopiedToClipboard(); } } function onTapEmoji({nativeEvent}) { // fn#87241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1811, offset: 0x01fb4f08, size: 102 bytes, params: 2, frame: 17 const node = nativeEvent.node; const defaultImport = importDefault(dependencyMap[8]); const openLazy = defaultImport.openLazy; let value = require(dependencyMap[10]); value = value(dependencyMap[17], dependencyMap.paths); Reflect.apply(openLazy, defaultImport, [value, 'MessageEmojiActionSheet', {emojiNode: node}]); } } global.__d(_fun87229, 11380, [5, 9862, 9598, 8877, 3853, 9834, 8743, 6789, 4080, 11381, 1962, 21, 3829, 1244, 6797, 3856, 4647, 8623, 2]) /* metro module 11380, dependencies: [5, 9862, 9598, 8877, 3853, 9834, 8743, 6789, 4080, 11381, 1962, 21, 3829, 1244, 6797, 3856, 4647, 8623, 2] */;