/* Metro module 9280; source: modules/rtc/native/SecureFramesUserVerificationModal.tsx; dependencies: [57, 31, 27, 1379, 1878, 9277, 661, 1309, 33, 4501, 697, 566, 4617, 9281, 9282, 9256, 9283, 9275, 5080, 3857, 4073, 1244, 4248, 9284, 9212, 6771, 8743, 9285, 1305, 6618, 5278, 5284, 4573, 4572, 9286, 9288, 4578, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import NicknameUtils from '../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as FormConstantsModule from '../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as SecureFramesDeeplinkExperimentModule from '../SecureFramesDeeplinkExperiment.tsx'; /* Metro dependency 4248 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ArrowLargeLeftIconModule from '../../../design/components/Icon/native/redesign/generated/ArrowLargeLeftIcon.tsx'; /* Metro dependency 5284 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as UseIsSecureFramesVerifiedModule from '../hooks/useIsSecureFramesVerified.tsx'; /* Metro dependency 9256 */
import * as SecureFramesUtilsModule from '../SecureFramesUtils.tsx'; /* Metro dependency 9275 */
import * as UseSecureFramesPairwiseFingerprintModule from '../hooks/useSecureFramesPairwiseFingerprint.tsx'; /* Metro dependency 9281 */
import * as UseReadableSecureFramesFingerprintModule from '../hooks/useReadableSecureFramesFingerprint.tsx'; /* Metro dependency 9282 */
import * as UseIsPersistentSecureFramesFingerprintModule from '../hooks/useIsPersistentSecureFramesFingerprint.tsx'; /* Metro dependency 9283 */
import * as SecureFramesTrackingModule from '../SecureFramesTracking.tsx'; /* Metro dependency 9284 */
import * as UseIsSecureFramesKeyInconsistentModule from '../hooks/useIsSecureFramesKeyInconsistent.tsx'; /* Metro dependency 9285 */
function _fun72582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:6, offset: 0x01d4a679, size: 499 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.View;
value = require(9277) /* metro dependency 9277: SecureFramesConstants */;
const env0_9 = value.USER_VERIFICATION_CHUNK_SIZE;
const env0_10 = value.USER_VERIFICATION_LENGTH;
const env0_11 = value.USER_VERIFICATION_NUM_COLUMNS;
const env0_12 = value.USER_VERIFIED_TOAST_KEY;
value = require(661) /* metro dependency 661: Constants */;
const env0_13 = value.AnalyticsLocations;
const env0_14 = value.AnalyticsSections;
value = require(33) /* metro dependency 33 */;
const env0_16 = value.jsx;
const env0_17 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const env0_18 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'padding': 16,
'flexDirection': 'column', backgroundColor: BACKGROUND_BASE_LOW}, footer: {'flex': 1, 'gap': 16,
'justifyContent': 'flex-end'}, footerText: {textAlign: 'center'}, header: {'height': 56, 'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'space-between'}, subtitle: {textAlign: 'center'},
code: {marginTop: 24}, helpMessage: {marginBottom: 16}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/rtc/native/SecureFramesUserVerificationModal.tsx');
exports.default = SecureFramesUserVerificationModal;
function SecureFramesUserVerificationModal({userId, channelId}) { // fn#72583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:912, offset: 0x01d4a86c, size: 1954 bytes, params: 2, frame: 44
var object4;
var object;
var RDE0Sc;
const Text = (TextModule).Text;
const styles = useStyles();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
const value3 = (NicknameUtils).useName((require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore],
_fun72585), null, user);
const value4 = (UseSecureFramesPairwiseFingerprintModule).useSecureFramesPairwiseFingerprint({userId: userId});
const fingerprint = value4.fingerprint;
const fingerprint2 = fingerprint;
const userKey = value4.userKey;
const userKey2 = userKey;
const value5 = (UseReadableSecureFramesFingerprintModule).useReadableSecureFramesFingerprint({fingerprintBase64: fingerprint,
chunkSize: USER_VERIFICATION_CHUNK_SIZE, desiredLength: USER_VERIFICATION_LENGTH});
const value6 = (UseIsSecureFramesVerifiedModule).useIsUserSecureFramesVerified({userId: userId,
channelId: channelId});
const {isCurrentUserKeyPersistent, isOtherUserKeyPersistent,
loading} = (UseIsPersistentSecureFramesFingerprintModule).useIsPersistentSecureFramesFingerprint({userId: userId});
const binding = userKey2;
const value8 = binding.useCallback(_fun72586, [channelId, userKey, isOtherUserKeyPersistent, value3, userId]);
const value9 = binding.useCallback(_fun72587, [userKey, isOtherUserKeyPersistent, userId]);
const useSecureFramesDeeplinkExperiment = SecureFramesDeeplinkExperimentModule.useSecureFramesDeeplinkExperiment;
const value10 = binding.useCallback(_fun72588, [channelId, value5, fingerprint,
Reflect.apply(useSecureFramesDeeplinkExperiment, SecureFramesDeeplinkExperimentModule,
[{location: 'SecureFramesUserVerificationModal'}]).enabled, userId]);
const value11 = binding.useCallback(_fun72589,
[(UseAnalyticsLocations)().analyticsLocations, channelId,
userId]);
const useAlertIfSecureFramesKeyInconsistent = UseIsSecureFramesKeyInconsistentModule.useAlertIfSecureFramesKeyInconsistent;
object4 = {channelId: channelId, userId: userId, nickname: value3};
object4.onAlertOpen = (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop;
Reflect.apply(useAlertIfSecureFramesKeyInconsistent, UseIsSecureFramesKeyInconsistentModule, [object4]);
const useMemo = binding.useMemo;
const value13 = fingerprint2(Reflect.apply(useMemo, binding, [_fun72590, [value6]]), 2);
const property = value13[0];
const property2 = value13[1];
const value14 = binding.useMemo(_fun72591, [isCurrentUserKeyPersistent, isOtherUserKeyPersistent, value3]);
binding.useEffect(_fun72592, [channelId, userId]);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const cpT0Cq = t.cpT0Cq;
const ArrowLargeLeftIcon = (ArrowLargeLeftIconModule).ArrowLargeLeftIcon;
const pressableOpacity = (
);
let r7 = fingerprint != null && value5 != null;
if (r7) {
object = {accessibilityRole: 'button'};
string = intl.string;
RDE0Sc = t.RDE0Sc;
object.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]);
object.androidRippleConfig = ANDROID_FOREGROUND_RIPPLE;
object.hitSlop = 8;
object.onPress = value10;
string = intl.string;
RDE0Sc = t.RDE0Sc;
r7 = (
{Reflect.apply(string, intl, [RDE0Sc])}
);
}
const items2 = [
{pressableOpacity}
{r7}
,
];
const Stack = (StackNativeModule).Stack;
items2[1] = (
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/WPGnF'])}
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.oc2kce, {username: value3})}
);
items2[2] = (
{((Component) => )(importDefault(9286) /* metro dependency 9286: SecureFramesExistingVerificationsHelpMessage */)}
{((Component) => : ((TextBadge) => )((require(1305) /* metro dependency 1305: native */).TextBadge)} />)(importDefault(9288) /* metro dependency 9288: SecureFramesCode */)}
);
const text = (
{value14}
);
const Button = (ButtonNativeModule).Button;
const r16 = value5 == null || loading;
const r14 = value6 ? value9 : value8;
string = intl.string;
items2[3] = (
{text}
);
return (
{items2}
);
function _fun72585() { // fn#72585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:1078, offset: 0x01d4b00e, size: 47 bytes, params: 1, frame: 11
var r0;
let value = environment.__proto__;
value = ChannelStore.getChannel(channelId);
if (value == null) {
r0 = undefined;
} else {
value = value.getGuildId();
r0 = value;
}
return r0;
}
function _fun72586() { // fn#72586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:1575, offset: 0x01d4b03d, size: 239 bytes, params: 1, frame: 24
var value2;
var moduleValue;
var defaultImport2;
var open;
var object;
var intl;
if (userKey != null) {
value2 = environment.__proto__;
moduleValue = require(9275) /* metro dependency 9275: SecureFramesUtils */;
moduleValue.addVerification(userId, userKey, isOtherUserKeyPersistent, channelId,
AnalyticsLocations.E2EE_USER_VERIFY_MODAL);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
defaultImport2 = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport2.open;
object = {};
object.key = USER_VERIFIED_TOAST_KEY;
object.iconColor = 'text-feedback-positive';
object.IconComponent = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Gwu134,
{username: env0_2});
Reflect.apply(open, defaultImport2, [object]);
}
}
function _fun72587() { // fn#72587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:1868, offset: 0x01d4b12c, size: 93 bytes, params: 1, frame: 18
var value2;
var moduleValue;
if (userKey != null) {
value2 = environment.__proto__;
moduleValue = require(9275) /* metro dependency 9275: SecureFramesUtils */;
moduleValue.deleteVerification(userId, userKey, isOtherUserKeyPersistent);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
}
function _fun72588() { // fn#72588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:2063, offset: 0x01d4b189, size: 228 bytes, params: 1, frame: 16
var r4;
var value2;
var moduleValue2;
if (fingerprint != null) {
if (env0_5 != null) {
value2 = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
(require(9284) /* metro dependency 9284: SecureFramesTracking */).trackE2EEUserVerificationShareClicked({userId: userId,
channelId: channelId});
if (enabled) {
moduleValue2 = require(9275) /* metro dependency 9275: SecureFramesUtils */;
r4 = moduleValue2.getUserVerificationDeeplink(userId, fingerprint);
} else {
r4 = env0_5.join(' ');
}
(require(9212) /* metro dependency 9212: showShareActionSheetAndroid */).showShareActionSheet({message: r4},
AnalyticsSections.SECURE_FRAMES_VOICE_BOTTOM_SHEET);
}
}
}
function _fun72589() { // fn#72589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:2380, offset: 0x01d4b26d, size: 91 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ModalActionCreators).pop();
(ShowUserProfileActionSheet)({userId: userId, channelId: channelId,
isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
function _fun72590() { // fn#72590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:2613, offset: 0x01d4b2c8, size: 162 bytes, params: 1, frame: 16
const BadgeColors = (NativeModule).BadgeColors;
const binding = env0_6;
const value = environment.__proto__;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return binding ? [Reflect.apply(string, intl, [t.UNUuem]), BadgeColors.INFO] : [Reflect.apply(string, intl,
[t.y2b7CA]), BadgeColors.DANGER];
}
function _fun72591() { // fn#72591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:2799, offset: 0x01d4b36a, size: 70 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (SecureFramesUtilsModule).getUserVerificationFooterText({isCurrentUserKeyPersistent: isCurrentUserKeyPersistent,
isOtherUserKeyPersistent: isOtherUserKeyPersistent, otherUserNickname: env0_2});
}
function _fun72592() { // fn#72592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:2951, offset: 0x01d4b3b0, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(SecureFramesTrackingModule).trackE2EEUserVerificationViewed({userId: userId,
channelId: channelId});
}
}
}
global.__d(_fun72582, 9280, [57, 31, 27, 1379, 1878, 9277, 661, 1309, 33, 4501, 697, 566, 4617, 9281, 9282, 9256,
9283, 9275, 5080, 3857, 4073, 1244, 4248, 9284, 9212, 6771, 8743, 9285, 1305, 6618, 5278, 5284, 4573, 4572,
9286, 9288, 4578,
2]) /* metro module 9280, dependencies: [57, 31, 27, 1379, 1878, 9277, 661, 1309, 33, 4501, 697, 566, 4617, 9281, 9282, 9256, 9283, 9275, 5080, 3857, 4073, 1244, 4248, 9284, 9212, 6771, 8743, 9285, 1305, 6618, 5278, 5284, 4573, 4572, 9286, 9288, 4578, 2] */;