Files
discord-decomp/sources/modules/connections/native/GuildRoleConnectionsConnectAccountsActionSheet.tsx
T
2026-07-27 16:20:00 +03:00

1427 lines
80 KiB
TypeScript

/* Metro module 11363; source: modules/connections/native/GuildRoleConnectionsConnectAccountsActionSheet.tsx; dependencies: [5, 57, 31, 27, 1949, 1885, 1226, 5109, 1379, 5040, 1945, 3784, 5044, 661, 33, 4501, 697, 4048, 4915, 1423, 4002, 1305, 6647, 4805, 4573, 1244, 5043, 11364, 6774, 8706, 11365, 11366, 22, 3860, 11367, 44, 3857, 9836, 4594, 7972, 5042, 566, 5045, 6593, 683, 4863, 4080, 7007, 11370, 9354, 694, 5080, 10206, 1962, 8042, 11374, 6275, 6766, 11375, 6812, 4578, 2] */
function _fun87054(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:6, offset: 0x01face57, size: 1590 bytes, params: 8, frame: 28
var object2;
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 */;
const env0_6 = value.ActivityIndicator;
const env0_7 = value.Pressable;
const env0_8 = value.View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
value = require(5044) /* metro dependency 5044: Constants */;
const env0_17 = value.MetadataFields;
const env0_18 = value.OperatorTypes;
const env0_19 = value.GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE;
const env0_20 = value.GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE;
value = require(661) /* metro dependency 661: Constants */;
const env0_21 = value.PlatformTypes;
const env0_22 = value.UserSettingsSections;
const env0_23 = value.AnalyticEvents;
const env0_24 = value.MarketingURLs;
const env0_25 = value.FRIEND_SYNC_PLATFORM_TYPES;
const env0_26 = value.ACTIVITY_PLATFORM_TYPES;
const env0_27 = value.Permissions;
const env0_28 = value.EMPTY_STRING_SNOWFLAKE_ID;
value = require(33) /* metro dependency 33 */;
const env0_29 = value.jsx;
const env0_30 = value.jsxs;
const env0_31 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {padding: 12};
object2.connectionsChecksGroups = {'marginTop': 16, 'flexDirection': 'column'};
const object5 = {'flexDirection': 'row', 'borderColor': null, 'borderWidth': 2, 'borderRadius': null,
'paddingHorizontal': 16, 'paddingVertical': 20, 'marginBottom': 16, 'width': '100%', 'alignItems': 'center',
'position': 'relative'};
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.connectionsChecksGroup = object5;
const object7 = {};
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object7.borderColor = BACKGROUND_BASE_LOWEST;
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object7.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.connectionsChecksGroupPassed = object7;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.connectionsChecksGroupPlatformDisabled = {backgroundColor: BORDER_SUBTLE};
const object8 = {'paddingVertical': 4, 'paddingHorizontal': 12, 'borderRadius': null, 'backgroundColor': null,
'position': 'absolute', 'top': -8, 'right': 20};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
object8.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
object2.connectionsChecksGroupRequirementsNotMet = object8;
object2.connectionsChecksGroupTextContainer = {flex: 1};
object2.connectionsChecksGroupTextNameContainer = {'flexDirection': 'row', 'alignItems': 'center'};
const TEXT_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING;
object2.connectionsChecksGroupTextNameInfoIcon = {marginLeft: 4, tintColor: TEXT_FEEDBACK_WARNING};
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object2.connectionsChecksGroupCheckmark = {'tintColor': null, 'width': 24, 'height': 24,
tintColor: TEXT_FEEDBACK_POSITIVE};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.connectionsChecksGroupCaret = {'tintColor': null, 'width': 24, 'height': 24,
tintColor: INTERACTIVE_TEXT_DEFAULT};
object2.connectionsCheck = {marginTop: 4};
object2.platformIcon = {'width': 24, 'height': 24, 'marginRight': 12};
object2.channelName = {'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 4};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.channelNameIcon = {'tintColor': null, 'marginRight': 8, 'width': 24, 'height': 24, tintColor: TEXT_MUTED};
object2.channelNameText = {overflow: 'hidden'};
object2.header = {'flexDirection': 'row', 'width': '100%', 'alignItems': 'center', 'marginBottom': 8};
object2.content = {width: '100%'};
object2.footerText = {marginBottom: 16};
object2.accountConnectedContainer = {'flexDirection': 'column', 'alignItems': 'flex-start', 'marginVertical': 24};
object2.accountConnectedPreview = {width: '100%'};
const object9 = {'marginTop': 8, 'borderRadius': null, 'borderWidth': 1};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object9.borderColor = BORDER_SUBTLE;
object2.accountConnectedPreviewConnectedUserAccount = object9;
object2.accountConnectedPrivacy = {'marginTop': 16, 'width': '100%'};
const object10 = {'marginTop': 8, 'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'padding': 8,
'flexDirection': 'column'};
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object10.borderColor = BORDER_SUBTLE;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.accountConnectedPrivacyOptionsContainer = object10;
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.roleGranted = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null,
'paddingVertical': 12, 'paddingHorizontal': 8, 'borderTopStartRadius': 4, 'borderTopEndRadius': 4,
'marginTop': 16, backgroundColor: BACKGROUND_BASE_LOWEST};
object2.roleGrantedName = {'overflow': 'hidden', 'marginRight': 24};
object2.verifiedIcon = {marginRight: 8};
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object2.channelsGranted = {'flexDirection': 'column', 'backgroundColor': null, 'padding': 16,
'borderBottomStartRadius': 4, 'borderBottomEndRadius': 4, 'marginBottom': 24,
backgroundColor: BACKGROUND_MOD_NORMAL};
object2.manageConnectionsButton = {marginTop: 8};
object2.loading = {'marginTop': 24, 'marginBottom': 32, 'alignSelf': 'center'};
object2.appIcon = {marginRight: 8};
object2.botTag = {marginLeft: 4};
const env0_32 = Reflect.apply(createStyles, value, [object2]);
object2 = {CHECKS_REQUIRED: 0};
object2[0] = 'CHECKS_REQUIRED';
object2.ACCOUNT_CONNECTED = 1;
object2[1] = 'ACCOUNT_CONNECTED';
object2.ROLE_GRANTED = 2;
object2[2] = 'ROLE_GRANTED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsConnectAccountsActionSheet.tsx');
exports.default = GuildRoleConnectionsConnectAccountsActionSheet;
}
function PlatformIcon({platformType}) { // fn#87055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:3387, offset: 0x01fad48d, size: 200 bytes, params: 2, frame: 19
const styles = useStyles();
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value3 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType);
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
const makeSource = avatarUtilsModule.makeSource;
const isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(value2);
const icon = value3.icon;
const source = Reflect.apply(makeSource, avatarUtilsModule, [isThemeLight2 ? icon.lightPNG : icon.darkPNG]);
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<Icon
source={source}
style={styles.platformIcon}
disableColor
/>
);
}
function ChannelName_87056({channel, style}) { // fn#87056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:3619, offset: 0x01fad555, size: 259 bytes, params: 2, frame: 22
const styles = useStyles();
const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel);
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const items2 = [styles.channelName, style];
const r6 = channelIcon != null ? ((Icon) => <Icon source={channelIcon} style={styles.channelNameIcon} />)((require(1305) /* metro dependency 1305: native */).Icon) : null;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
{r6}
<Text
variant="heading-lg/semibold"
color="text-default"
style={styles.channelNameText}
lineClamp={1}
>
{value3}
</Text>
</View>
);
}
function ConnectionsCheck({connectionType, connectionMetadataField, operator, value, result, description}) { // fn#87057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:3945, offset: 0x01fad658, size: 761 bytes, params: 2, frame: 25
var r9;
var r5;
var r0;
var property;
var moduleValue;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var Math;
var max;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
if (connectionType !== GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE) {
if (description != null) {
if (OperatorTypes.LESS_THAN === operator) {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['2p7dA3'];
object2 = {description: description};
Math = global.Math;
max = Math.max;
value = global.Number(value);
object2.count = Reflect.apply(max, Math, [0, value - 1]);
value = Reflect.apply(format, intl, [property, object2]);
r5 = value;
} else if (OperatorTypes.GREATER_THAN !== operator) {
r5 = description;
} else {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['2p7dA3'];
object2 = {description: description};
Math = global.Math;
max = Math.max;
value = global.Number(value);
object2.count = Reflect.apply(max, Math, [0, value + 1]);
value = Reflect.apply(format, intl, [property, object2]);
r5 = value;
}
if (r5 == null) {
r0 = null;
} else {
value = 'text-feedback-critical';
value = <Text variant="text-xs/normal" color={result ? 'text-default' : value} style={styles.connectionsCheck}>{r5}</Text>;
r0 = value;
}
return r0;
}
var EQUAL = OperatorTypes.EQUAL;
if (EQUAL === operator) {
r9 = connectionType === PlatformTypes.PAYPAL && connectionMetadataField === MetadataFields.PAYPAL_VERIFIED ? (require(1244) /* metro dependency 1244: indexNative */).t.dcSDhW : (require(1244) /* metro dependency 1244: indexNative */).t['0BlpbA'];
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
value = moduleValue.getConnectionsCheckText({connectionType: connectionType,
connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value});
r5 = value;
if (r5 == null) {
r0 = null;
} else {
value = 'text-feedback-critical';
value = <Text variant="text-xs/normal" color={result ? 'text-default' : value} style={styles.connectionsCheck}>{r5}</Text>;
r0 = value;
}
return r0;
}
var NOT_EQUAL = OperatorTypes.NOT_EQUAL;
if (NOT_EQUAL === operator) {
r9 = (require(1244) /* metro dependency 1244: indexNative */).t.otcpTN;
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
value = moduleValue.getConnectionsCheckText({connectionType: connectionType,
connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value});
r5 = value;
if (r5 == null) {
r0 = null;
} else {
value = 'text-feedback-critical';
value = <Text variant="text-xs/normal" color={result ? 'text-default' : value} style={styles.connectionsCheck}>{r5}</Text>;
r0 = value;
}
return r0;
}
var LESS_THAN = OperatorTypes.LESS_THAN;
if (LESS_THAN === operator) {
r9 = (require(1244) /* metro dependency 1244: indexNative */).t.Ef35xs;
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
value = moduleValue.getConnectionsCheckText({connectionType: connectionType,
connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value});
r5 = value;
if (r5 == null) {
r0 = null;
} else {
value = 'text-feedback-critical';
value = <Text variant="text-xs/normal" color={result ? 'text-default' : value} style={styles.connectionsCheck}>{r5}</Text>;
r0 = value;
}
return r0;
}
var GREATER_THAN = OperatorTypes.GREATER_THAN;
if (GREATER_THAN === operator) {
r9 = (require(1244) /* metro dependency 1244: indexNative */).t['8W9OXU'];
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
value = moduleValue.getConnectionsCheckText({connectionType: connectionType,
connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value});
r5 = value;
if (r5 == null) {
r0 = null;
} else {
value = 'text-feedback-critical';
value = <Text variant="text-xs/normal" color={result ? 'text-default' : value} style={styles.connectionsCheck}>{r5}</Text>;
r0 = value;
}
return r0;
}
if (operator !== undefined) {
if (operator !== null) {
r9 = undefined;
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
value = moduleValue.getConnectionsCheckText({connectionType: connectionType,
connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9,
value: value});
r5 = value;
if (r5 == null) {
r0 = null;
} else {
value = 'text-feedback-critical';
value = <Text variant="text-xs/normal" color={result ? 'text-default' : value} style={styles.connectionsCheck}>{r5}</Text>;
r0 = value;
}
return r0;
}
}
}
return null;
}
function IdentityConnectionsCheckGroup({eligibilityState, onAttempted, onIdentityAuthorize}) { // fn#87058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:4915, offset: 0x01fad951, size: 1199 bytes, params: 2, frame: 35
var r17;
var r6;
var r7;
var value5;
var value7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var items4;
let value = undefined;
const styles = useStyles();
const useGetOrFetchApplicationBatchedModule = require(11364) /* metro dependency 11364: useGetOrFetchApplicationBatched */;
const useGetOrFetchApplicationBatched = useGetOrFetchApplicationBatchedModule.useGetOrFetchApplicationBatched;
const {canStartAuthorization,
startAuthorization} = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(Reflect.apply(useGetOrFetchApplicationBatched,
useGetOrFetchApplicationBatchedModule, [eligibilityState.application_id]));
let env0_5 = canStartAuthorization;
const identity_connected_account_type = eligibilityState.identity_connected_account_type;
const identity_auth_required_scopes = eligibilityState.identity_auth_required_scopes;
if (canStartAuthorization) {
r17 = canStartAuthorization;
} else if (identity_connected_account_type == null) {
r17 = canStartAuthorization;
} else if (identity_auth_required_scopes == null) {
r17 = canStartAuthorization;
} else {
value5 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(identity_connected_account_type);
if (value5 != null && value5.enabled) {
value7 = true;
env0_5 = value7;
r17 = value7;
} else {
r17 = canStartAuthorization;
}
}
const application = eligibilityState.application;
let binding = env0_5;
const value8 = binding.useMemo(_fun87059, [application]);
const result = eligibilityState.result;
const r20 = value8 != null ? ((Component) => <Component style={styles.botTag} verified={value8.isVerifiedBot()} />)(importDefault(8706) /* metro dependency 8706: BotTag */) : value;
if (result) {
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
r6 = <Icon source={importDefault(11365) /* metro dependency 11365 */} style={styles.connectionsChecksGroupCheckmark} />;
} else if (r17) {
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
r6 = <Icon2 source={importDefault(11366) /* metro dependency 11366 */} style={styles.connectionsChecksGroupCaret} />;
} else {
r6 = <Text variant="text-md/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cEts68)}</Text>;
}
binding = env0_5;
const useCallback = binding.useCallback;
items = [result, r17, canStartAuthorization, startAuthorization, onAttempted, onIdentityAuthorize];
items[6] = eligibilityState.connection_type;
items[7] = eligibilityState.application_id;
items[8] = identity_connected_account_type;
items[9] = identity_auth_required_scopes;
const value14 = Reflect.apply(useCallback, binding, [_fun87060, items]);
const officialApplicationIds = (require(5043) /* metro dependency 5043: ConnectionsUtils */).officialApplicationIds;
const includes = officialApplicationIds.includes;
let r0 = (application == null ? value : application.id) ?? '';
if (Reflect.apply(includes, officialApplicationIds, [r0])) {
r0 = null;
} else {
var pressableProps = {accessibilityRole: 'button', style: [styles.connectionsChecksGroup,
result ? styles.connectionsChecksGroupPassed : null,
r17 ? null : styles.connectionsChecksGroupPlatformDisabled]};
r7 = result || !r17;
pressableProps.disabled = r7;
pressableProps.onPress = value14;
if (value8 != null) {
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
r7 = <Avatar style={styles.appIcon} user={value8} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value} />;
} else {
r7 = null;
}
items2 = [r7];
var viewBindingProps = {style: styles.connectionsChecksGroupTextContainer};
items4 = [<View style={styles.connectionsChecksGroupTextNameContainer}><Text variant="text-md/medium" color="mobile-text-heading-primary">{application == null ? value : application.name}</Text>{r20}</View>];
items4[1] = r17 || result ? null : <Text variant="text-xs/normal" color="text-muted" style={styles.connectionsCheck}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+z5dYe'])}</Text>;
items2[1] = <View {...viewBindingProps}>{items4}</View>;
items2[2] = r6;
value = <Pressable {...pressableProps}>{items2}</Pressable>;
r0 = value;
}
return r0;
}
function ConnectionsChecks({eligibilityStatesGroups, onPlatformAttempt, onPlatformConnect, onPlatformConnected, onPlatformIdentityAuthorize, initialAttemptedPlatformType, initialAttemptedApplicationId}) { // fn#87062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:6928, offset: 0x01fadf59, size: 585 bytes, params: 2, frame: 24
const env0_5 = useStyles();
let binding = env0_5;
let useState = binding.useState;
const value3 = onPlatformIdentityAuthorize(Reflect.apply(useState, binding, [{}]), 2);
const env0_6 = value3[0];
const env0_7 = value3[1];
const [env0_8, env0_9] = onPlatformIdentityAuthorize(env0_5.useState(0), 2);
binding = env0_5;
useState = binding.useState;
const value8 = onPlatformIdentityAuthorize(Reflect.apply(useState, binding, [initialAttemptedPlatformType ?? null]),
2);
const property = value8[0];
const env0_11 = value8[1];
binding = env0_5;
useState = binding.useState;
const value10 = onPlatformIdentityAuthorize(Reflect.apply(useState, binding,
[initialAttemptedApplicationId ?? null]), 2);
const property2 = value10[0];
const env0_13 = value10[1];
const value11 = env0_5.useMemo(_fun87063, [eligibilityStatesGroups]);
const value12 = env0_5.useMemo(_fun87064, [value11]);
env0_5.useEffect(_fun87066, [value11]);
env0_5.useEffect(_fun87067, [value12, property, property2, onPlatformConnected]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GREEN_330 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_330;
const env0_16 = Reflect.apply(useToken, useTokenModule, [GREEN_330]);
const jsxRuntimeEnv0_31Binding = jsxRuntimeEnv0_31;
const Object = global.Object;
let value = Object.keys(value12);
value = value.sort(_fun87070);
return (
<>
{value.map(_fun87073)}
</>
);
}
function ConnectedUserAccountOptions({account, setShowPreviewInvisibleIcon, setShowPreviewMetadata}) { // fn#87082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:10884, offset: 0x01faecc3, size: 853 bytes, params: 2, frame: 28
const FormSwitchRow = (require(7972) /* metro dependency 7972: native */).FormSwitchRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
let binding = env0_5;
let useState = binding.useState;
const value4 = env0_4(Reflect.apply(useState, binding, [account.friendSync]), 2);
const property = value4[0];
const env0_3 = value4[1];
binding = env0_5;
useState = binding.useState;
const value6 = env0_4(Reflect.apply(useState, binding, [account.showActivity]), 2);
const property2 = value6[0];
var env0_4 = value6[1];
binding = env0_5;
useState = binding.useState;
const value8 = env0_4(Reflect.apply(useState, binding, [account.metadataVisibility === 1]), 2);
const property3 = value8[0];
var env0_5 = property3;
const env0_6 = value8[1];
binding = env0_5;
useState = binding.useState;
const value10 = env0_4(Reflect.apply(useState, binding, [account.visibility === 1]), 2);
const property4 = value10[0];
const env0_8 = value10[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun87083);
const value11 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(account.type);
return (
<View style={styles.accountConnectedPrivacyOptionsContainer}>
<FormSwitchRow
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f7yOAX)}
value={property4}
onValueChange={onValueChange_87087}
/>
{value11.hasMetadata !== true ? undefined : <FormSwitchRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FYKGsL)} value={property3} disabled={!property4} onValueChange={onValueChange_87086} />}
{ACTIVITY_PLATFORM_TYPES.has(account.type) ? <FormSwitchRow label={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['6u6J0q'],
{platform: value11.name})} value={property2} onValueChange={onValueChange_87085} /> : undefined}
{FRIEND_SYNC_PLATFORM_TYPES.has(account.type) ? <FormSwitchRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+KCMSi'])} value={property} onValueChange={onValueChange_87084} /> : undefined}
</View>
);
}
function GuildRoleConnectionsConnectAccountsActionSheet({guildId, role, initialAttemptedPlatformType, initialAttemptedApplicationId, onCloseModal}) { // fn#87088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:12352, offset: 0x01faf175, size: 1745 bytes, params: 2, frame: 33
var r9;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const handleManageConnections = function() {
GuildRoleConnectionsConnectAccountsActionSheetHandleClose(true);
require(dependencyMap[47]).openUserSettings({screen: UserSettingsSections.CONNECTIONS});
};
const handleManageAuthorizedApplications = function() {
GuildRoleConnectionsConnectAccountsActionSheetHandleClose(true);
require(dependencyMap[47]).openUserSettings({screen: UserSettingsSections.AUTHORIZED_APPS});
};
const styles = useStyles();
const env0_5 = styles;
const binding = env0_5;
const useState = binding.useState;
const binding2 = env0_33;
let CHECKS_REQUIRED = binding2.CHECKS_REQUIRED;
const value4 = onCloseModal(Reflect.apply(useState, binding, [CHECKS_REQUIRED]), 2);
const property = value4[0];
const env0_7 = value4[1];
const [env0_8, env0_9] = onCloseModal(env0_5.useState(null), 2);
const [env0_10, env0_11] = onCloseModal(env0_5.useState(false), 2);
const [env0_12, env0_13] = onCloseModal(env0_5.useState(true), 2);
const [property2, env0_15] = onCloseModal(env0_5.useState(false), 2);
const [env0_16, env0_17] = onCloseModal(env0_5.useState(true), 2);
const [env0_18, env0_19] = onCloseModal(env0_5.useState(false), 2);
const accounts = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectedAccountsStore],
function() {
return ConnectedAccountsStore.getAccounts();
});
const newestTokens = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore],
function() {
return AuthorizedAppsStore.getNewestTokens();
});
const env0_21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.getId();
});
const [property3, env0_23] = onCloseModal(env0_5.useState(null), 2);
const [property4, env0_25] = onCloseModal(env0_5.useState(null), 2);
const [env0_26, env0_27] = onCloseModal(env0_5.useState(function() {
var initialAttemptedPlatformTypeBinding = initialAttemptedPlatformType;
var value2 = null;
return value2 != initialAttemptedPlatformTypeBinding ? {platformType: initialAttemptedPlatformType,
applicationId: value2 != initialAttemptedApplicationId ? initialAttemptedApplicationId : value2} : value2;
}), 2);
const [env0_28, env0_29] = onCloseModal(env0_5.useState(null), 2);
const env0_30 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guildId, id);
});
const mutableGuildChannelsForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getMutableGuildChannelsForGuild(guildId);
});
const env0_32 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const Object = global.Object;
const value27 = Object.values(mutableGuildChannelsForGuild).filter(_fun87113);
var env0_33 = value27;
env0_5.useEffect(_fun87114, [guildId, role.id, accounts, newestTokens]);
env0_5.useEffect(_fun87119, [initialAttemptedPlatformType, role.id, guildId]);
env0_5.useEffect(_fun87120, [property2, value27.length, member, guildId, role.id]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
CHECKS_REQUIRED = binding2.CHECKS_REQUIRED;
if (CHECKS_REQUIRED === property) {
r9 = <View style={styles.header}><Text variant="heading-lg/extrabold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zOZh3R)}</Text></View>;
} else if (env0_33.ACCOUNT_CONNECTED === property) {
(importDefault(44) /* metro dependency 44 */)(property3 != null, 'lastPlatformConnected is null');
r9 = <Text variant="heading-lg/extrabold" style={styles.header}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.yQvgBO,
{platformName: (importDefault(4915) /* metro dependency 4915: Platforms */).get(property3)?.name ?? property4?.name})}</Text>;
} else {
r9 = env0_33.ROLE_GRANTED !== property ? null : <Text variant="heading-lg/extrabold" style={styles.header}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.najNdz)}</Text>;
}
return (
<BottomSheet>
<View style={styles.container}>
{[r9, GuildRoleConnectionsConnectAccountsActionSheetRenderContent(), renderFooter()]}
</View>
</BottomSheet>
);
}
function _fun87059() { // fn#87059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:5333, offset: 0x01fade00, size: 76 bytes, params: 1, frame: 12
const applicationBinding = application;
const value2 = null;
return value2 != (value2 == applicationBinding ? undefined : application.bot) ? new UserRecord() : value2;
}
function _fun87060() { // fn#87060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:5755, offset: 0x01fade4c, size: 248 bytes, params: 1, frame: 17
var r4;
var connection_type;
var r1;
var identity_connected_account_typeBinding;
var value2;
var onAttemptedBinding;
var application_id;
if (!result) {
if (canStartAuthorization) {
identity_connected_account_typeBinding = identity_connected_account_type;
value2 = null;
r4 = value2 != identity_connected_account_typeBinding && ConnectedAccountsStore.getAccounts().some(function({type}) {
return type === identity_connected_account_type;
});
onAttemptedBinding = onAttempted;
connection_type = r4 ? value2 : eligibilityState.connection_type;
application_id = eligibilityState.application_id;
r1 = value2 != application_id ? application_id : value2;
onAttemptedBinding(connection_type, r1);
if (canStartAuthorization) {
startAuthorization({analyticsLocations: ['Verified Roles Connect Accounts Modal']});
} else {
r1 = value2 != identity_connected_account_type && value2 != identity_auth_required_scopes;
r1 = r1 && value2 != eligibilityState.application_id;
if (r1) {
onIdentityAuthorize({applicationId: eligibilityState.application_id,
scopes: identity_auth_required_scopes,
connectedAccountProvider: identity_connected_account_type, wasAlreadyConnected: r4});
}
}
}
}
}
function _fun87063() { // fn#87063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7345, offset: 0x01fae1a2, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.flatten(eligibilityStatesGroups);
}
function _fun87064() { // fn#87064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7388, offset: 0x01fae1cf, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.groupBy(env0_14, function(a0) {
var connection_type = a0.connection_type;
var value = '';
return value + connection_type + (a0.application_id != null ? ':' + a0.application_id : value);
});
}
function _fun87066() { // fn#87066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7510, offset: 0x01fae256, size: 33 bytes, params: 1, frame: 11
const binding = env0_9;
const Date = global.Date;
return binding(Date.now());
}
function _fun87067() { // fn#87067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7547, offset: 0x01fae277, size: 207 bytes, params: 1, frame: 19
var identity_connected_account_type;
var r1;
var application;
var binding;
var binding2;
var value3;
var property;
var property2;
var value5;
var value6;
const value2 = null;
if (value2 != env0_10) {
binding = env0_15;
binding2 = env0_10;
value3 = '';
property = binding[value3 + binding2 + (value2 != env0_12 ? ':' + env0_12 : value3)];
if (value2 != property) {
if (property.every(function(a0) {
return a0.result;
})) {
property2 = property[0];
value5 = undefined;
identity_connected_account_type = value2 == property2 ? value5 : property2.identity_connected_account_type;
r1 = value2 != identity_connected_account_type ? identity_connected_account_type : env0_10;
value6 = property.find(_fun87069);
application = value2 == value6 ? value5 : value6.application;
onPlatformConnected(r1, value2 != application ? application : value2);
}
}
}
}
function _fun87070(a0, a1) { // fn#87070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7931, offset: 0x01fae351, size: 103 bytes, params: 3, frame: 15
const value2 = env0_15[a0].every(function(a0) {
return a0.result;
});
const value = env0_15[a1].every(function(a0) {
return a0.result;
});
return value2 !== true ? value2 !== false || value !== true ? 0 : -1 : value === false ? 1 : value2 !== false || value !== true ? 0 : -1;
}
function _fun87073(a0) { // fn#87073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:8050, offset: 0x01fae3b8, size: 1780 bytes, params: 2, frame: 42
var r13;
var r14;
var application;
var bot;
var r23;
var id;
var type;
var r10;
var r11;
var r21;
var r22;
var r12;
var name;
var value4;
var value5;
var value6;
var value9;
var value10;
var value11;
var userRecord;
const officialApplicationIds = (require(5043) /* metro dependency 5043: ConnectionsUtils */).officialApplicationIds;
var includes;
var value15;
var binding;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var stylesBinding;
var items2;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var object3;
var connectionsChecksGroupTextContainer;
var connectionsChecksGroupTextNameContainer;
var items3;
var items4;
let property = env0_15[a0];
const startsWith = a0.startsWith;
const value3 = '';
if (Reflect.apply(startsWith, a0, [value3 + GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE + ':'])) {
if (property[0] != null) {
property = property[0];
return (
<IdentityConnectionsCheckGroup
eligibilityState={property}
onAttempted={onAttempted}
onIdentityAuthorize={onPlatformIdentityAuthorize}
key={a0}
/>
);
}
value4 = property.find(function(a0) {
return a0.operator == null;
});
value5 = property.filter(_fun87076);
value6 = null;
r13 = value6 == value4 || value4.result;
r13 = r13 && value5.every(_fun87077);
value9 = property.find(_fun87078);
value10 = undefined;
value11 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
r14 = value6 == value11 || value11.enabled;
application = value6 == value9 ? value10 : value9.application;
bot = value6 == application ? value10 : application.bot;
if (value6 != bot) {
bot = application.bot;
userRecord = new UserRecord();
} else {
r23 = value6;
}
includes = officialApplicationIds.includes;
id = value6 == application ? value10 : application.id;
value15 = Reflect.apply(includes, officialApplicationIds, [value6 != id ? id : value3]);
binding = env0_6;
type = value6 == value11 ? value10 : value11.type;
property = binding[value6 != type ? type : GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE];
r10 = !r13 && value6 != property;
r10 = r10 && property <= env0_8;
r11 = r13 ? <Icon source={importDefault(11365) /* metro dependency 11365 */} style={styles.connectionsChecksGroupCheckmark} /> : r10 ? <Text variant="text-sm/semibold" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5911Lb'])}</Text> : r14 ? <Icon source={importDefault(11366) /* metro dependency 11366 */} style={styles.connectionsChecksGroupCaret} /> : <Text variant="text-md/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cEts68)}</Text>;
type = value6 == value11 ? value10 : value11.type;
r21 = type !== PlatformTypes.STEAM ? value10 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NcZh6K);
r22 = value15 ? ((Component) => <Component style={styles.botTag} guildId={EMPTY_STRING_SNOWFLAKE_ID} roleColor={env0_16} size={16} />)(importDefault(11367) /* metro dependency 11367: OfficialConnectionIcon */) : value6 != r23 ? ((Component) => <Component style={styles.botTag} verified={r23.isVerifiedBot()} />)(importDefault(8706) /* metro dependency 8706: BotTag */) : value10;
object2 = {accessibilityRole: 'button'};
object2.style = [styles.connectionsChecksGroup, r13 ? styles.connectionsChecksGroupPassed : value6,
r14 ? value6 : styles.connectionsChecksGroupPlatformDisabled];
r12 = r13 || !r14;
object2.disabled = r12;
object2.onPress = onPress_87079;
r12 = r13 ? value6 : r10 ? <View style={styles.connectionsChecksGroupRequirementsNotMet}><Text variant="text-xs/normal" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UB3hKo)}</Text></View> : value6;
items2 = [r12];
r12 = value6 != value11 ? <PlatformIcon platformType={value11.type} /> : value6;
items2[1] = r12;
r12 = value6 != r23 ? <Avatar style={styles.appIcon} user={r23} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value10} /> : value6;
items2[2] = r12;
object3 = {};
stylesBinding = styles;
object3.style = stylesBinding.connectionsChecksGroupTextContainer;
var viewBinding2Props = {style: stylesBinding.connectionsChecksGroupTextNameContainer};
name = value6 == value11 ? value10 : value11.name;
items3 = [<Text variant="text-md/medium" color="mobile-text-heading-primary">{value6 != name ? name : value6 == application ? value10 : application.name}</Text>,
r22];
items3[2] = value6 != r21 ? <Pressable onPress={onPress_87080}><Icon source={importDefault(9836) /* metro dependency 9836 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} style={styles.connectionsChecksGroupTextNameInfoIcon} /></Pressable> : value6;
items4 = [<View {...viewBinding2Props}>{items3}</View>];
items4[1] = value5.map(_fun87081);
items2[3] = <View {...object3}>{items4}</View>;
} else {
value4 = property.find(function(a0) {
return a0.operator == null;
});
value5 = property.filter(function(a0) {
return a0.operator != null;
});
value6 = null;
r13 = value6 == value4 || value4.result;
r13 = r13 && value5.every(function(a0) {
return a0.result;
});
value9 = property.find(function(a0) {
return a0.application != null;
});
value10 = undefined;
value11 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
r14 = value6 == value11 || value11.enabled;
application = value6 == value9 ? value10 : value9.application;
bot = value6 == application ? value10 : application.bot;
if (value6 != bot) {
bot = application.bot;
userRecord = new UserRecord();
} else {
r23 = value6;
}
includes = officialApplicationIds.includes;
id = value6 == application ? value10 : application.id;
value15 = Reflect.apply(includes, officialApplicationIds, [value6 != id ? id : value3]);
binding = env0_6;
type = value6 == value11 ? value10 : value11.type;
property = binding[value6 != type ? type : GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE];
r10 = !r13 && value6 != property;
r10 = r10 && property <= env0_8;
r11 = r13 ? <Icon source={importDefault(11365) /* metro dependency 11365 */} style={styles.connectionsChecksGroupCheckmark} /> : r10 ? <Text variant="text-sm/semibold" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5911Lb'])}</Text> : r14 ? <Icon source={importDefault(11366) /* metro dependency 11366 */} style={styles.connectionsChecksGroupCaret} /> : <Text variant="text-md/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cEts68)}</Text>;
type = value6 == value11 ? value10 : value11.type;
r21 = type !== PlatformTypes.STEAM ? value10 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NcZh6K);
r22 = value15 ? ((Component) => <Component style={styles.botTag} guildId={EMPTY_STRING_SNOWFLAKE_ID} roleColor={env0_16} size={16} />)(importDefault(11367) /* metro dependency 11367: OfficialConnectionIcon */) : value6 != r23 ? ((Component) => <Component style={styles.botTag} verified={r23.isVerifiedBot()} />)(importDefault(8706) /* metro dependency 8706: BotTag */) : value10;
object2 = {accessibilityRole: 'button'};
object2.style = [styles.connectionsChecksGroup, r13 ? styles.connectionsChecksGroupPassed : value6,
r14 ? value6 : styles.connectionsChecksGroupPlatformDisabled];
r12 = r13 || !r14;
object2.disabled = r12;
object2.onPress = onPress_87079;
r12 = r13 ? value6 : r10 ? <View style={styles.connectionsChecksGroupRequirementsNotMet}><Text variant="text-xs/normal" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UB3hKo)}</Text></View> : value6;
items2 = [r12];
r12 = value6 != value11 ? <PlatformIcon platformType={value11.type} /> : value6;
items2[1] = r12;
r12 = value6 != r23 ? <Avatar style={styles.appIcon} user={r23} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value10} /> : value6;
items2[2] = r12;
stylesBinding = styles;
connectionsChecksGroupTextContainer = stylesBinding.connectionsChecksGroupTextContainer;
connectionsChecksGroupTextNameContainer = stylesBinding.connectionsChecksGroupTextNameContainer;
name = value6 == value11 ? value10 : value11.name;
items4 = [<View style={connectionsChecksGroupTextNameContainer}><Text variant="text-md/medium" color="mobile-text-heading-primary">{value6 != name ? name : value6 == application ? value10 : application.name}</Text>{r22}{value6 != r21 ? <Pressable onPress={onPress_87080}><Icon source={importDefault(9836) /* metro dependency 9836 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} style={styles.connectionsChecksGroupTextNameInfoIcon} /></Pressable> : value6}</View>];
items4[1] = value5.map(_fun87081);
items2[3] = <View style={connectionsChecksGroupTextContainer}>{items4}</View>;
}
items2[4] = r11;
return (
<Pressable {...object2} key={a0}>
{items2}
</Pressable>
);
}
function _fun87083() { // fn#87083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11227, offset: 0x01faf018, size: 36 bytes, params: 1, frame: 12
setShowPreviewInvisibleIcon(!env0_7);
setShowPreviewMetadata(env0_5);
}
function ConnectedUserAccountOptionsOnValueChange(a0) { // fn#87084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11401, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf03c, size: 69 bytes, params: 2, frame: 16
env0_3(a0);
const defaultImport = importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */;
const setFriendSync = defaultImport.setFriendSync;
const accountBinding = account;
Reflect.apply(setFriendSync, defaultImport, [accountBinding.type, accountBinding.id, a0]);
}
function ConnectedUserAccountOptionsOnValueChange_87085(a0) { // fn#87085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11598, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf081, size: 69 bytes, params: 2, frame: 16
env0_4(a0);
const defaultImport = importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */;
const setShowActivity = defaultImport.setShowActivity;
const accountBinding = account;
Reflect.apply(setShowActivity, defaultImport, [accountBinding.type, accountBinding.id, a0]);
}
function ConnectedUserAccountOptionsOnValueChange_87086(a0) { // fn#87086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11780, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf0c6, size: 86 bytes, params: 2, frame: 17
setShowPreviewMetadata(a0);
env0_6(a0);
const defaultImport = importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */;
const setMetadataVisibility = defaultImport.setMetadataVisibility;
const accountBinding = account;
Reflect.apply(setMetadataVisibility, defaultImport, [accountBinding.type, accountBinding.id, a0 ? 1 : 0]);
}
function ConnectedUserAccountOptionsOnValueChange_87087(a0) { // fn#87087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:12005, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf11c, size: 89 bytes, params: 2, frame: 17
setShowPreviewInvisibleIcon(!a0);
env0_8(a0);
const defaultImport = importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */;
const setVisibility = defaultImport.setVisibility;
const accountBinding = account;
Reflect.apply(setVisibility, defaultImport, [accountBinding.type, accountBinding.id, a0 ? 1 : 0]);
}
function GuildRoleConnectionsConnectAccountsActionSheetHandleClose() { // fn#87089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13569, owner: GuildRoleConnectionsConnectAccountsActionSheet.handleClose, offset: 0x01faf846, size: 69 bytes, params: 1, frame: 12
true !== undefined;
if (onCloseModal != null) {
onCloseModal();
}
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _handleAssignRole() { // fn#87092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13858, owner: GuildRoleConnectionsConnectAccountsActionSheet._handleAssignRole, offset: 0x01faf915, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun87094).apply(this, arguments);
}
function reopenSelf(a0, a1) { // fn#87095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14009, owner: GuildRoleConnectionsConnectAccountsActionSheet.reopenSelf, offset: 0x01faf9af, size: 179 bytes, params: 3, frame: 22
const value = a1;
const value2 = a2;
const r7 = value2 !== undefined ? value2 : {};
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
const value4 = Promise.resolve({default: GuildRoleConnectionsConnectAccountsActionSheet});
const guildRoleConnectionsModalActionCreatorsModule = require(11370) /* metro dependency 11370: GuildRoleConnectionsModalActionCreators */;
const makeGuildRoleConnectionsConnectAccountsActionSheetKey = guildRoleConnectionsModalActionCreatorsModule.makeGuildRoleConnectionsConnectAccountsActionSheetKey;
const roleBinding = role;
const guildRoleConnectionsConnectAccountsActionSheetKey = Reflect.apply(makeGuildRoleConnectionsConnectAccountsActionSheetKey,
guildRoleConnectionsModalActionCreatorsModule, [roleBinding.id]);
const value6 = null;
Reflect.apply(openLazy, defaultImport, [value4, guildRoleConnectionsConnectAccountsActionSheetKey,
{role: roleBinding, guildId: guildId, initialAttemptedPlatformType: a0,
initialAttemptedApplicationId: value6 != a0 ? value : value6, overrideUrl: r7.overrideUrl,
onCloseModal: onCloseModal}]);
}
function handlePlatformAttempt() { // fn#87096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14337, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformAttempt, offset: 0x01fafa62, size: 105 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[44]);
const track = defaultImport.track;
const PASSPORT_CHALLENGE_STARTED = AnalyticEvents.PASSPORT_CHALLENGE_STARTED;
const object2 = {};
object2.role_id = role.id;
value = require(dependencyMap[45]);
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(guildId), dependencyMap);
Reflect.apply(track, defaultImport, [PASSPORT_CHALLENGE_STARTED, object2]);
}
function handlePlatformConnect(a0, a1) { // fn#87097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14475, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformConnect, offset: 0x01fafacb, size: 99 bytes, params: 3, frame: 14
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__;
value = undefined;
(importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: a0,
location: 'Verified Roles Connect Accounts Modal', onClose: onClose_87098,
overrideUrl: a1 == null ? value : a1.role_connections_verification_url});
return value;
}
function handlePlatformIdentityAuthorize({applicationId, scopes, connectedAccountProvider, wasAlreadyConnected}) { // fn#87099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14786, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformIdentityAuthorize, offset: 0x01fafb89, size: 271 bytes, params: 2, frame: 23
var environment;
let value = environment.__proto__;
importDefault(dependencyMap[46]).hideActionSheet();
const value2 = 'OAuth2AuthorizeModal-' + applicationId;
const defaultImport2 = importDefault(dependencyMap[50]);
defaultImport2.subscribe('MODAL_POP', handlePlatformIdentityAuthorizeHandleModalClose);
const defaultImport3 = importDefault(dependencyMap[51]);
const pushLazy = defaultImport3.pushLazy;
value = require(dependencyMap[53]);
value = value(dependencyMap[52], dependencyMap.paths);
const object2 = {clientId: applicationId, scopes: scopes};
const ApplicationIntegrationType = require(dependencyMap[54]).ApplicationIntegrationType;
const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL;
object2.integrationType = USER_INSTALL;
object2.connectedAccountProvider = connectedAccountProvider;
object2.callback = function() {
};
object2.dismissOAuthModal = dismissOAuthModal_87102;
Reflect.apply(pushLazy, defaultImport3, [value, object2, value2]);
}
function handlePlatformConnected(a0, a1) { // fn#87103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15336, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformConnected, offset: 0x01fafd29, size: 135 bytes, params: 3, frame: 15
var value;
env0_23(a0);
env0_25(a1);
const binding = env0_7;
const ACCOUNT_CONNECTED = env1_33.ACCOUNT_CONNECTED;
binding(ACCOUNT_CONNECTED);
env0_27(null);
if (a1 != null) {
value = require(11374) /* metro dependency 11374: ConnectionsRoleActionCreators */;
value = value.fetchUserApplicationRoleConnections();
value = value.then(_fun87104);
value.catch(function() {
});
}
}
function _fun87113(a0) { // fn#87113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13489, offset: 0x01fafe7d, size: 110 bytes, params: 2, frame: 15
let value = environment.__proto__;
const can = PermissionStore.can;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
let r0 = Reflect.apply(can, PermissionStore, [VIEW_CHANNEL, a0]) && PermissionStore.can(Permissions.SEND_MESSAGES,
a0);
if (r0) {
value = (importDefault(5045) /* metro dependency 5045: getConnectionsRoles */)(a0);
value = value.includes(role);
r0 = value;
}
return r0;
}
function _fun87114() { // fn#87114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15529, offset: 0x01fafeeb, size: 74 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = Reflect.apply((importDefault(6593) /* metro dependency 6593: GuildActionCreators */).fetchGuildRoleConnectionsEligibility,
value, [guildId, role.id]);
value.then(_fun87115);
}
function _fun87119() { // fn#87119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15722, offset: 0x01faff9c, size: 117 bytes, params: 1, frame: 18
var value2;
var defaultImport;
var track;
var PASSPORT_CHALLENGE_VIEWED;
var object2;
var moduleValue;
if (initialAttemptedPlatformType == null) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[44]);
track = defaultImport.track;
PASSPORT_CHALLENGE_VIEWED = AnalyticEvents.PASSPORT_CHALLENGE_VIEWED;
object2 = {};
object2.role_id = role.id;
moduleValue = require(dependencyMap[45]);
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), dependencyMap);
Reflect.apply(track, defaultImport, [PASSPORT_CHALLENGE_VIEWED, object2]);
}
}
function _fun87120() { // fn#87120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15867, offset: 0x01fb0011, size: 245 bytes, params: 1, frame: 18
var value4;
var value5;
var value6;
var defaultImport2;
var track;
var PASSPORT_CHALLENGE_FINISHED;
var object2;
var moduleValue;
let binding = env0_14;
if (binding && member != null && member.roles.includes(role.id)) {
env0_15(false);
if (env0_33.length > 0) {
binding = env0_7;
value5 = environment.__proto__;
binding(env1_33.ROLE_GRANTED);
} else {
value4 = environment.__proto__;
importDefault(dependencyMap[46]).hideActionSheet();
}
value6 = environment.__proto__;
defaultImport2 = importDefault(dependencyMap[44]);
track = defaultImport2.track;
PASSPORT_CHALLENGE_FINISHED = AnalyticEvents.PASSPORT_CHALLENGE_FINISHED;
object2 = {};
object2.role_id = role.id;
moduleValue = require(dependencyMap[45]);
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), dependencyMap);
Reflect.apply(track, defaultImport2, [PASSPORT_CHALLENGE_FINISHED, object2]);
}
}
function GuildRoleConnectionsConnectAccountsActionSheetRenderContent() { // fn#87121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:16839, owner: GuildRoleConnectionsConnectAccountsActionSheet.renderContent, offset: 0x01fb0106, size: 2070 bytes, params: 1, frame: 41
var r22;
var r14;
var r9;
var r10;
var r15;
var platformType;
var applicationId;
var r0;
var object2;
var stylesBinding;
var VerifiedRoleIcon;
var guildIdBinding;
var verifiedIcon;
var roleBinding;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var value5;
var defaultImport2;
var value6;
var value7;
var jsxRuntimeEnv1_31Binding;
var jsxRuntimeEnv1_31Binding2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items4;
var items6;
var items8;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var format;
var value18;
var value24;
var items9;
var handlePlatformAttemptBinding;
var handlePlatformConnectBinding;
var handlePlatformConnectedBinding;
var handlePlatformIdentityAuthorizeBinding;
const binding = env0_6;
const CHECKS_REQUIRED = env1_33.CHECKS_REQUIRED;
if (CHECKS_REQUIRED === binding) {
value18 = null;
r10 = value18 != env0_8 && env0_8.length > 1;
r15 = value18 != env0_8 && env0_8.length === 1;
r15 = r15 && env0_8[0].length === 1;
if (env0_12) {
r0 = <ActivityIndicator size="large" style={styles.loading} />;
} else if (value18 == env0_8) {
r0 = <ActivityIndicator size="large" style={styles.loading} />;
} else {
var viewBindingProps = {style: styles.content};
value24 = undefined;
format = intl.format;
r10 = r15 ? t.jHfRvZ : r10 ? t['mOQ8k+'] : t.U0olLg;
items9 = [<Text variant="text-md/medium" color="text-default">{Reflect.apply(format, intl, [r10,
{roleName: role.name}])}</Text>];
handlePlatformAttemptBinding = handlePlatformAttempt;
handlePlatformConnectBinding = handlePlatformConnect;
handlePlatformConnectedBinding = handlePlatformConnected;
handlePlatformIdentityAuthorizeBinding = handlePlatformIdentityAuthorize;
platformType = value18 == env0_26 ? value24 : env0_26.platformType;
r15 = value18 != platformType ? platformType : value18;
applicationId = value18 == env0_26 ? value24 : env0_26.applicationId;
items9[1] = <View style={styles.connectionsChecksGroups}><ConnectionsChecks eligibilityStatesGroups={env0_8} onPlatformAttempt={handlePlatformAttemptBinding} onPlatformConnect={handlePlatformConnectBinding} onPlatformConnected={handlePlatformConnectedBinding} onPlatformIdentityAuthorize={handlePlatformIdentityAuthorizeBinding} initialAttemptedPlatformType={r15} initialAttemptedApplicationId={value18 != applicationId ? applicationId : value18} /></View>;
format = intl.format;
items9[2] = <TextWithIOSLinkWorkaround variant="text-xs/normal" style={styles.footerText} color="text-default">{Reflect.apply(format,
intl, [t.gsgvxh, {privacyPolicyUrl: MarketingURLs.PRIVACY,
onAuthorizedApplicationsClick: handleManageAuthorizedApplications,
onConnectionsClick: handleManageConnections}])}</TextWithIOSLinkWorkaround>;
r0 = <View {...viewBindingProps}>{items9}</View>;
}
return r0;
}
const ACCOUNT_CONNECTED = env1_33.ACCOUNT_CONNECTED;
if (ACCOUNT_CONNECTED === binding) {
value5 = undefined;
defaultImport2 = importDefault(44) /* metro dependency 44 */;
value6 = null;
defaultImport2(value6 != env0_22, 'lastPlatformConnected is null');
value7 = accounts.find(_fun87122);
r22 = value6 == env0_28 ? value5 : env0_28.find(_fun87123);
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.content;
var viewBinding4Props = {style: stylesBinding.accountConnectedContainer};
if (value6 != value7) {
jsxRuntimeEnv1_31Binding = jsxRuntimeEnv1_31;
if (value6 != value7) {
jsxRuntimeEnv1_31Binding2 = jsxRuntimeEnv1_31;
stylesBinding = styles;
string = intl.string;
items4 = [<View style={stylesBinding.accountConnectedPreview}><Text variant="eyebrow" color="text-default">{Reflect.apply(string,
intl,
[t.TOjkEg])}</Text>{((ConnectedUserAccount) => <ConnectedUserAccount account={value7} userId={id} theme={env0_30} locale={locale} style={stylesBinding.accountConnectedPreviewConnectedUserAccount} showMetadata={env0_16} showInvisibleIcon={env0_18} />)((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedUserAccount)}</View>];
string = intl.string;
items4[1] = <View style={stylesBinding.accountConnectedPrivacy}><Text variant="eyebrow" color="text-default">{Reflect.apply(string,
intl,
[t.jndPhX])}</Text><ConnectedUserAccountOptions account={value7} setShowPreviewInvisibleIcon={env0_19} setShowPreviewMetadata={env0_17} /></View>;
r14 = <>{items4}</>;
} else {
r14 = value6;
}
items6 = [r14];
items6[1] = value6 != r22 ? <View style={styles.accountConnectedPreview}><Text variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TOjkEg)}</Text>{((ConnectedApplicationUserRoleAccount) => <ConnectedApplicationUserRoleAccount applicationRoleConnection={r22} theme={env0_30} locale={locale} style={styles.accountConnectedPreviewConnectedUserAccount} />)((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedApplicationUserRoleAccount)}</View> : value6;
r9 = <>{items6}</>;
} else if (value6 == r22) {
r9 = <ActivityIndicator size="large" style={styles.loading} />;
} else {
jsxRuntimeEnv1_31Binding = jsxRuntimeEnv1_31;
if (value6 != value7) {
jsxRuntimeEnv1_31Binding2 = jsxRuntimeEnv1_31;
stylesBinding = styles;
string = intl.string;
items4 = [<View style={stylesBinding.accountConnectedPreview}><Text variant="eyebrow" color="text-default">{Reflect.apply(string,
intl,
[t.TOjkEg])}</Text>{((ConnectedUserAccount) => <ConnectedUserAccount account={value7} userId={id} theme={env0_30} locale={locale} style={stylesBinding.accountConnectedPreviewConnectedUserAccount} showMetadata={env0_16} showInvisibleIcon={env0_18} />)((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedUserAccount)}</View>];
string = intl.string;
items4[1] = <View style={stylesBinding.accountConnectedPrivacy}><Text variant="eyebrow" color="text-default">{Reflect.apply(string,
intl,
[t.jndPhX])}</Text><ConnectedUserAccountOptions account={value7} setShowPreviewInvisibleIcon={env0_19} setShowPreviewMetadata={env0_17} /></View>;
r14 = <>{items4}</>;
} else {
r14 = value6;
}
items6 = [r14];
items6[1] = value6 != r22 ? <View style={styles.accountConnectedPreview}><Text variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TOjkEg)}</Text>{((ConnectedApplicationUserRoleAccount) => <ConnectedApplicationUserRoleAccount applicationRoleConnection={r22} theme={env0_30} locale={locale} style={styles.accountConnectedPreviewConnectedUserAccount} />)((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedApplicationUserRoleAccount)}</View> : value6;
r9 = <>{items6}</>;
}
items8 = [<View {...viewBinding4Props}>{r9}</View>];
items8[1] = <TextWithIOSLinkWorkaround variant="text-md/normal" color="text-default">{intl.format(t.gsgvxh,
{privacyPolicyUrl: MarketingURLs.PRIVACY, onAuthorizedApplicationsClick: handleManageAuthorizedApplications,
onConnectionsClick: handleManageConnections})}</TextWithIOSLinkWorkaround>;
return (
<View {...object2}>
{items8}
</View>
);
}
const ROLE_GRANTED = env1_33.ROLE_GRANTED;
if (ROLE_GRANTED === binding) {
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.content;
var viewBinding2Props = {style: stylesBinding.roleGranted};
VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */;
guildIdBinding = guildId;
verifiedIcon = stylesBinding.verifiedIcon;
roleBinding = role;
return (
<View {...object2}>
<View {...viewBinding2Props}>
<VerifiedRoleIcon
guildId={guildIdBinding}
style={verifiedIcon}
role={roleBinding}
size={24}
/>
<Text
variant="text-lg/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={stylesBinding.roleGrantedName}
>
{roleBinding.name}
</Text>
</View>
<View style={stylesBinding.channelsGranted}>
{env0_33.map(_fun87124)}
</View>
</View>
);
}
return null;
}
function renderFooter() { // fn#87125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:19915, owner: GuildRoleConnectionsConnectAccountsActionSheet.renderFooter, offset: 0x01fb0983, size: 669 bytes, params: 1, frame: 30
var r8;
var r5;
var object;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const binding = env0_6;
const CHECKS_REQUIRED = env1_33.CHECKS_REQUIRED;
if (CHECKS_REQUIRED === binding) {
r5 = env0_12 || !env0_10;
r5 = !r5 ? env0_14 : r5;
return (
<Button
variant="primary"
onPress={function() {
return _fun87127();
}}
disabled={r5}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8SuVoE'])}
grow
/>
);
}
const ACCOUNT_CONNECTED = env1_33.ACCOUNT_CONNECTED;
if (ACCOUNT_CONNECTED === binding) {
return (
<Button
variant="primary"
onPress={onPress_87128}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
grow
/>
);
}
const value3 = null;
const r0 = value3 == env0_8 ? undefined : env0_8.flat().some(function(a0) {
return a0.application_id == null;
});
const r9 = value3 != r0 && r0;
const jsxRuntimeEnv1_31Binding = jsxRuntimeEnv1_31;
const button = <Button variant="primary" onPress={function() {
GuildRoleConnectionsConnectAccountsActionSheetHandleClose(true);
}} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} grow />;
if (r9) {
r8 = <View style={styles.manageConnectionsButton}><Button variant="secondary" onPress={handleManageConnections} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VXV55P)} grow /></View>;
} else {
r8 = value3;
}
return (
<>
{button}
{r8}
</>
);
}
function onAttempted(a0, a1) { // fn#87074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:8191, offset: 0x01faeaac, size: 45 bytes, params: 3, frame: 13
env1_11(a0);
env1_13(a1);
if (a0 != null) {
onPlatformAttempt();
}
}
function onPress_87079() { // fn#87079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:9440, offset: 0x01faeafb, size: 168 bytes, params: 1, frame: 18
const value2 = null;
const value3 = undefined;
const type = value2 == env0_1 ? value3 : env0_1.type;
const r3 = value2 != type ? type : GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE;
const application2 = value2 != application ? application : value2;
let binding = env1_7;
const object2 = {};
copyDataProperties(object2, env1_6, undefined);
const Date = global.Date;
object2[r3] = Date.now();
binding(object2);
env1_11(r3);
binding = env1_13;
const id = value2 == application2 ? value3 : application2.id;
binding(value2 != id ? id : value2);
onPlatformAttempt();
onPlatformConnect(r3, application2);
return value3;
}
function onPress_87080() { // fn#87080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:10283, offset: 0x01faeba3, size: 111 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
(importDefault(44) /* metro dependency 44 */)(env0_0 != null, 'tooltip is null');
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'CONNECTIONS_STEAM_TOOLTIP', icon: importDefault(9836) /* metro dependency 9836 */,
content: env0_0});
}
function _fun87081({connection_type, connection_metadata_field, operator, value, result, description}) { // fn#87081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:10540, offset: 0x01faec12, size: 177 bytes, params: 2, frame: 25
(importDefault(44) /* metro dependency 44 */)(connection_metadata_field != null, 'connectionMetadataField is null');
(importDefault(44) /* metro dependency 44 */)(operator != null, 'operator is null');
(importDefault(44) /* metro dependency 44 */)(value != null, 'value is null');
return (
<ConnectionsCheck
connectionType={connection_type}
connectionMetadataField={connection_metadata_field}
operator={operator}
value={value}
result={result}
description={description}
key={connection_metadata_field}
/>
);
}
function* _fun87094() { // fn#87094, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13915, offset: 0x01faf955, size: 90 bytes, params: 1, frame: 15
if (true) {
value = environment.__proto__.__proto__;
GuildMemberStore(true);
var value4 = env3_1(env3_2[43]);
yield value4.assignGuildRoleConnection(require, importDefault.id);
}
}
function handlePlatformConnectOnClose() { // fn#87098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14593, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformConnect.onClose, offset: 0x01fafb2e, size: 91 bytes, params: 1, frame: 18
const reopenSelfBinding = reopenSelf;
const binding = env0_0;
const value2 = null;
const value3 = undefined;
const id = value2 == require ? value3 : require.id;
reopenSelfBinding(binding, value2 != id ? id : value2,
{overrideUrl: value2 == require ? value3 : require.role_connections_verification_url});
return value3;
}
function handlePlatformIdentityAuthorizeHandleModalClose({key}) { // fn#87100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14997, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformIdentityAuthorize.handleModalClose, offset: 0x01fafc98, size: 100 bytes, params: 2, frame: 16
var value2;
var defaultImport;
var value3;
if (key === env0_2) {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.unsubscribe('MODAL_POP', handlePlatformIdentityAuthorizeHandleModalClose);
value3 = environment.__proto__;
reopenSelf(wasAlreadyConnected ? null : GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE,
applicationId);
}
}
function handlePlatformIdentityAuthorizeDismissOAuthModal() { // fn#87102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15305, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformIdentityAuthorize.dismissOAuthModal, offset: 0x01fafcfc, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(env0_2);
}
function _fun87104(a0) { // fn#87104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15480, offset: 0x01fafdb0, size: 19 bytes, params: 2, frame: 11
env1_29(a0);
}
function _fun87115(a0) { // fn#87115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15594, offset: 0x01faff35, size: 53 bytes, params: 2, frame: 13
env1_9(a0);
env1_11(((a0) => a0.some(_fun87117))(a0));
env1_13(false);
}
function _fun87122({type}) { // fn#87122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:18052, offset: 0x01fb091c, size: 21 bytes, params: 2, frame: 2
return env1_22 === type;
}
function _fun87123({application}) { // fn#87123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:18100, offset: 0x01fb0931, size: 46 bytes, params: 2, frame: 4
return application.id === env1_24?.id;
}
function _fun87124(a0) { // fn#87124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:19849, offset: 0x01fb095f, size: 36 bytes, params: 2, frame: 15
return <ChannelName_87056 channel={a0} key={a0.id} />;
}
function renderFooterOnPress() { // fn#87126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:20024, owner: GuildRoleConnectionsConnectAccountsActionSheet.renderFooter.onPress, offset: 0x01fb0c20, size: 17 bytes, params: 1, frame: 9
return (function() {
return _handleAssignRole.apply(this, arguments);
})();
}
function renderFooterOnPress_87128() { // fn#87128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:20259, owner: GuildRoleConnectionsConnectAccountsActionSheet.renderFooter.onPress, offset: 0x01fb0c4f, size: 29 bytes, params: 1, frame: 11
const binding = env1_7;
const CHECKS_REQUIRED = env2_33.CHECKS_REQUIRED;
return binding(CHECKS_REQUIRED);
}
function checkEligibility(a0) { // fn#87116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15605, offset: 0x01faff6a, size: 25 bytes, params: 2, frame: 11
return a0.some(function(a0) {
return a0.every(_fun87118);
});
}
function _fun87117(a0) { // fn#87117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15649, offset: 0x01faff83, size: 25 bytes, params: 2, frame: 11
return a0.every(function(a0) {
return a0.result;
});
}