786 lines
43 KiB
TypeScript
786 lines
43 KiB
TypeScript
/* Metro module 8872; source: utils/MaskedLinkUtils.tsx; dependencies: [8873, 1379, 1867, 8874, 4814, 3793, 1934, 661, 3855, 4647, 1244, 683, 8875, 8876, 8877, 8878, 3847, 10195, 10199, 6626, 10200, 10202, 2] */
|
|
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import SelectedChannelStore from '../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
|
|
import RelationshipStore from '../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import Module03855 from '../by-id/module-03855.js'; /* Metro dependency 3855 */
|
|
import MessageStore from '../stores/MessageStore.tsx'; /* Metro dependency 4814 */
|
|
import BlockedDomainStore from '../modules/blocked_domains/BlockedDomainStore.tsx'; /* Metro dependency 8873 */
|
|
import MaskedLinkStore from '../stores/MaskedLinkStore.tsx'; /* Metro dependency 8874 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as TrustedURLsModule from '../modules/masked_link/constants/TrustedURLs.tsx'; /* Metro dependency 10199 */
|
|
import * as MaskedLinkActionCreatorsModule from '../actions/MaskedLinkActionCreators.tsx'; /* Metro dependency 10202 */
|
|
|
|
function _fun69157(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9057:6, offset: 0x01c6b26e, size: 279 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/MaskedLinkUtils.tsx');
|
|
exports.isLinkTrusted = isLinkTrusted;
|
|
exports.handleClick = handleClick_69159;
|
|
function isLinkTrusted(a0, a1) { // fn#69158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9057:326, offset: 0x01c6b385, size: 122 bytes, params: 3, frame: 14
|
|
var relationshipStoreBinding;
|
|
var isFriend;
|
|
var value;
|
|
const channelStoreBinding = ChannelStore;
|
|
const getChannel = channelStoreBinding.getChannel;
|
|
const selectedChannelStoreBinding = SelectedChannelStore;
|
|
const getChannelId = selectedChannelStoreBinding.getChannelId;
|
|
const value2 = Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getChannelId,
|
|
selectedChannelStoreBinding, [])]);
|
|
let r1 = value2 != null && value2.type === ChannelTypes.DM;
|
|
if (r1) {
|
|
relationshipStoreBinding = RelationshipStore;
|
|
isFriend = relationshipStoreBinding.isFriend;
|
|
value = value2.getRecipientId();
|
|
value = !Reflect.apply(isFriend, relationshipStoreBinding, [value ?? '']);
|
|
r1 = value;
|
|
}
|
|
return !r1 && a0 === a1;
|
|
}
|
|
|
|
function handleClick_69159(a0, a1) { // fn#69159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9057:496, offset: 0x01c6b3ff, size: 2143 bytes, params: 3, frame: 53
|
|
var r1;
|
|
var guild_id;
|
|
var r39;
|
|
var r10;
|
|
var r11;
|
|
var r12;
|
|
var r15;
|
|
var r102;
|
|
var r27;
|
|
var r6;
|
|
var r13;
|
|
var r21;
|
|
var r212;
|
|
var r213;
|
|
var object;
|
|
var decodeURI;
|
|
var error;
|
|
var encodeURI;
|
|
var value5;
|
|
var message;
|
|
var basicChannel;
|
|
var guildStoreBinding;
|
|
var getGuild;
|
|
var guild;
|
|
var messageReference;
|
|
var message_id;
|
|
var channel_id;
|
|
var channel;
|
|
var value20;
|
|
var defaultImport2;
|
|
var track;
|
|
var URL_CLICKED;
|
|
var id;
|
|
var defaultImport3;
|
|
var onConfirm_691602;
|
|
var blockedDomainStoreBinding;
|
|
const TRUSTED_URLS = (TrustedURLsModule).TRUSTED_URLS;
|
|
var protocol;
|
|
var maskedLinkStoreBinding;
|
|
var value30;
|
|
const trustDomain = (MaskedLinkActionCreatorsModule).trustDomain;
|
|
const trustProtocol = (MaskedLinkActionCreatorsModule).trustProtocol;
|
|
var defaultImport7;
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
let value = a2;
|
|
const value2 = undefined;
|
|
const r2 = value !== value2 ? value : [];
|
|
var env0_2;
|
|
const trusted = a0.trusted;
|
|
const onClick = a0.onClick;
|
|
const env0_0 = a0.onConfirm;
|
|
const onCancel = a0.onCancel;
|
|
const shouldConfirm = a0.shouldConfirm;
|
|
const messageId = a0.messageId;
|
|
const channelId = a0.channelId;
|
|
const defaultImport = Module03855;
|
|
const value3 = defaultImport.sanitizeUrl(a0.href);
|
|
const value4 = null;
|
|
if (value4 == value3) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
defaultImport7 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
|
defaultImport7.show({title: intl.string(t.x87gan), body: intl.format(t['9rqRwl'], {url: a0.href}),
|
|
isDismissable: true, contextKey: a3});
|
|
} else {
|
|
try {
|
|
decodeURI = global.decodeURI;
|
|
decodeURI(value3);
|
|
r1 = value3;
|
|
} catch (error) {
|
|
encodeURI = global.encodeURI;
|
|
value5 = encodeURI(value3);
|
|
env0_2 = value5;
|
|
r1 = value5;
|
|
}
|
|
var value6 = false;
|
|
if (value4 == messageId) {
|
|
r6 = value6;
|
|
r11 = value4;
|
|
r12 = channelId;
|
|
r13 = value4;
|
|
r15 = messageId;
|
|
} else if (value4 == channelId) {
|
|
r6 = value6;
|
|
r11 = value4;
|
|
r12 = channelId;
|
|
r13 = value4;
|
|
r15 = messageId;
|
|
} else {
|
|
message = MessageStore.getMessage(channelId, messageId);
|
|
basicChannel = ChannelStore.getBasicChannel(channelId);
|
|
guild_id = value4 == basicChannel ? value2 : basicChannel.guild_id;
|
|
r39 = value4 != guild_id ? guild_id : value4;
|
|
guild = GuildStore.getGuild(r39);
|
|
if (value4 == message) {
|
|
guild_id = value2;
|
|
} else {
|
|
messageReference = message.messageReference;
|
|
guild_id = value4 == messageReference ? value2 : messageReference.guild_id;
|
|
}
|
|
r10 = value4 != guild_id && value4 != (value4 == message ? value2 : message.webhookId) && (value4 == message ? value2 : message.hasFlag(MessageFlags.IS_CROSSPOST)) && value4 != r39;
|
|
if (r10) {
|
|
if (value4 == message) {
|
|
guild_id = value2;
|
|
} else {
|
|
messageReference = message.messageReference;
|
|
guild_id = value4 == messageReference ? value2 : messageReference.guild_id;
|
|
}
|
|
if (value4 != guild_id) {
|
|
messageReference = message.messageReference;
|
|
message_id = messageReference.message_id;
|
|
messageReference = message.messageReference;
|
|
channel_id = messageReference.channel_id;
|
|
messageReference = message.messageReference;
|
|
r11 = messageReference.guild_id;
|
|
r12 = channel_id;
|
|
r15 = message_id;
|
|
} else {
|
|
r11 = r39;
|
|
r12 = channelId;
|
|
r15 = messageId;
|
|
}
|
|
} else {
|
|
r11 = r39;
|
|
r12 = channelId;
|
|
r15 = messageId;
|
|
}
|
|
r102 = (value4 == basicChannel ? value2 : basicChannel.type) === ChannelTypes.GUILD_ANNOUNCEMENT && (value4 == guild ? value2 : guild.features.has(GuildFeatures.COMMUNITY)) === true;
|
|
r27 = value4 == message ? value2 : message.hasFlag(MessageFlags.EPHEMERAL);
|
|
r27 = value4 != message && !(r27 === true);
|
|
r10 = r27 && (r10 || r102);
|
|
r6 = r10;
|
|
r13 = r39;
|
|
}
|
|
if (value4 != channelId) {
|
|
channel = ChannelStore.getChannel(channelId);
|
|
guildStoreBinding = GuildStore;
|
|
getGuild = guildStoreBinding.getGuild;
|
|
r10 = value4 == channel ? value2 : channel.getGuildId();
|
|
value20 = Reflect.apply(getGuild, guildStoreBinding, [r10]);
|
|
r10 = value4 != channel && value4 != value20 && value20.features.has(GuildFeatures.DISCOVERABLE);
|
|
if (r10) {
|
|
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport2.track;
|
|
URL_CLICKED = AnalyticEvents.URL_CLICKED;
|
|
object = {};
|
|
object.url_domain = (require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */).getHostname(r1);
|
|
id = value20.id;
|
|
object.guild_id = id;
|
|
id = channel.id;
|
|
object.channel_id = id;
|
|
Reflect.apply(track, defaultImport2, [URL_CLICKED, object]);
|
|
}
|
|
if ((importDefault(8876) /* metro dependency 8876: isChangelogChannel */)(channelId)) {
|
|
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport3.track(AnalyticEvents.CHANGE_LOG_CTA_CLICKED, {cta_type: 'inline_link', target: r1});
|
|
}
|
|
}
|
|
(importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */).trackLinkClicked(r1);
|
|
if (value4 != onClick) {
|
|
if (onClick(a1)) {
|
|
return value2;
|
|
}
|
|
onConfirm_691602 = onConfirm_69160;
|
|
r21 = value4 != onCancel ? onCancel : function() {
|
|
};
|
|
blockedDomainStoreBinding = BlockedDomainStore;
|
|
if (value4 !== blockedDomainStoreBinding.isBlockedDomain(r1)) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
(importDefault(10195) /* metro dependency 10195: BlockedDomainModalActionCreatorsNative */).show(r1);
|
|
return value2;
|
|
}
|
|
r212 = (typeof trusted === 'function' ? trusted() : trusted) || TRUSTED_URLS.has(r1);
|
|
protocol = (require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */).getProtocol(r1);
|
|
r213 = protocol === 'http:' || protocol === 'https:';
|
|
if (r213) {
|
|
if (r212) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (Reflect.apply(MaskedLinkStore.isTrustedDomain, maskedLinkStoreBinding, [r1])) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (r213) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
} else {
|
|
maskedLinkStoreBinding = MaskedLinkStore;
|
|
if (maskedLinkStoreBinding.isTrustedProtocol(r1)) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
}
|
|
}
|
|
} else if (r213) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
} else {
|
|
maskedLinkStoreBinding = MaskedLinkStore;
|
|
if (maskedLinkStoreBinding.isTrustedProtocol(r1)) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
}
|
|
}
|
|
return value2;
|
|
}
|
|
var value24 = (require(8878) /* metro dependency 8878: getOnClick */).default(r1, {skipExtensionCheck: value2,
|
|
analyticsLocations: r2, messageId: messageId});
|
|
if (value4 == value24) {
|
|
onConfirm_691602 = onConfirm_69160;
|
|
r21 = value4 != onCancel ? onCancel : function() {
|
|
};
|
|
blockedDomainStoreBinding = BlockedDomainStore;
|
|
if (value4 !== blockedDomainStoreBinding.isBlockedDomain(r1)) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
(importDefault(10195) /* metro dependency 10195: BlockedDomainModalActionCreatorsNative */).show(r1);
|
|
return value2;
|
|
}
|
|
r212 = (typeof trusted === 'function' ? trusted() : trusted) || TRUSTED_URLS.has(r1);
|
|
protocol = (require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */).getProtocol(r1);
|
|
r213 = protocol === 'http:' || protocol === 'https:';
|
|
if (r213) {
|
|
if (r212) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (Reflect.apply(MaskedLinkStore.isTrustedDomain, maskedLinkStoreBinding, [r1])) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (r213) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
} else {
|
|
maskedLinkStoreBinding = MaskedLinkStore;
|
|
if (maskedLinkStoreBinding.isTrustedProtocol(r1)) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
}
|
|
}
|
|
} else if (r213) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
} else {
|
|
maskedLinkStoreBinding = MaskedLinkStore;
|
|
if (maskedLinkStoreBinding.isTrustedProtocol(r1)) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
}
|
|
}
|
|
return value2;
|
|
}
|
|
if (value24(a1)) {
|
|
return value2;
|
|
}
|
|
onConfirm_691602 = onConfirm_69160;
|
|
r21 = value4 != onCancel ? onCancel : function() {
|
|
};
|
|
blockedDomainStoreBinding = BlockedDomainStore;
|
|
if (value4 !== blockedDomainStoreBinding.isBlockedDomain(r1)) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
(importDefault(10195) /* metro dependency 10195: BlockedDomainModalActionCreatorsNative */).show(r1);
|
|
return value2;
|
|
}
|
|
r212 = (typeof trusted === 'function' ? trusted() : trusted) || TRUSTED_URLS.has(r1);
|
|
protocol = (require(8875) /* metro dependency 8875: MaskedLinkStoreMethodsAdditionalNative */).getProtocol(r1);
|
|
r213 = protocol === 'http:' || protocol === 'https:';
|
|
if (r213) {
|
|
if (r212) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (Reflect.apply(MaskedLinkStore.isTrustedDomain, maskedLinkStoreBinding, [r1])) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (r213) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
} else {
|
|
maskedLinkStoreBinding = MaskedLinkStore;
|
|
if (maskedLinkStoreBinding.isTrustedProtocol(r1)) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId,
|
|
guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
}
|
|
}
|
|
} else if (r213) {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
} else {
|
|
maskedLinkStoreBinding = MaskedLinkStore;
|
|
if (maskedLinkStoreBinding.isTrustedProtocol(r1)) {
|
|
if (value4 == a1) {
|
|
onConfirm_691602();
|
|
} else if (value4 == shouldConfirm) {
|
|
if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else if (shouldConfirm) {
|
|
onConfirm_691602();
|
|
} else if (r6) {
|
|
value = importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */;
|
|
value.trackAnnouncementMessageLinkClicked({messageId: r15, channelId: channelId, guildId: r13,
|
|
sourceChannelId: r12,
|
|
sourceGuildId: r11});
|
|
}
|
|
} else {
|
|
if (value4 != a1) {
|
|
a1.preventDefault();
|
|
}
|
|
if (r213) {
|
|
value30 = (require(6626) /* metro dependency 6626: MarkupLinkRule */).punycodeLink(r1);
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: value4 != value30 ? value30.displayTarget : r1,
|
|
|
|
|
|
|
|
|
|
trustUrl: trustDomain, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: value6,
|
|
contextKey: a3});
|
|
} else {
|
|
(importDefault(10200) /* metro dependency 10200: MaskedLinkModalActionCreatorsNative */).show({url: r1,
|
|
|
|
trustUrl: trustProtocol, onConfirm: onConfirm_691602, onCancel: r21, isProtocol: true,
|
|
contextKey: a3});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return value2;
|
|
function handleClick_69159OnConfirm() { // fn#69160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9057:2085, owner: handleClick_69159.onConfirm, offset: 0x01c6bc5e, size: 150 bytes, params: 1, frame: 13
|
|
var value2;
|
|
var value3;
|
|
if (env0_4) {
|
|
value2 = environment.__proto__;
|
|
(importDefault(8877) /* metro dependency 8877: LinkAnalyticsUtils */).trackAnnouncementMessageLinkClicked({messageId: env0_5,
|
|
|
|
channelId: channelId, guildId: env0_3, sourceChannelId: env0_6, sourceGuildId: guild_id});
|
|
}
|
|
if (onConfirm == null) {
|
|
value3 = environment.__proto__;
|
|
(importDefault(3847) /* metro dependency 3847: openURL */)(env0_2);
|
|
} else {
|
|
onConfirm();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun69157, 8872, [8873, 1379, 1867, 8874, 4814, 3793, 1934, 661, 3855, 4647, 1244, 683, 8875, 8876, 8877,
|
|
8878, 3847, 10195, 10199, 6626, 10200, 10202,
|
|
2]) /* metro module 8872, dependencies: [8873, 1379, 1867, 8874, 4814, 3793, 1934, 661, 3855, 4647, 1244, 683, 8875, 8876, 8877, 8878, 3847, 10195, 10199, 6626, 10200, 10202, 2] */;
|