Files
2026-07-28 01:06:53 +03:00

696 lines
48 KiB
TypeScript

/* Metro module 10338; source: modules/user_profile/native/UserProfileContent.tsx; dependencies: [57, 31, 27, 10035, 1867, 3793, 1878, 7624, 5189, 8516, 6816, 661, 6276, 1376, 33, 8496, 566, 4080, 8692, 1962, 8524, 8513, 8514, 6771, 8783, 3995, 8341, 10339, 1244, 8796, 10340, 4052, 8501, 4617, 6797, 3856, 8695, 7622, 8867, 4578, 9646, 697, 8088, 8752, 8760, 1585, 10341, 10342, 10343, 6902, 8693, 8403, 8494, 8497, 1357, 10034, 8354, 10344, 10345, 10346, 10347, 10348, 10352, 10210, 7331, 10360, 8762, 6792, 10288, 10361, 10327, 10373, 8853, 8761, 10474, 10475, 4017, 8510, 10484, 10485, 10489, 10490, 6517, 8859, 8861, 10494, 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 MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UserUtils from '../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UserProfileStore from '../UserProfileStore.tsx'; /* Metro dependency 5189 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseOpenProfileSettings from '../../profile_customization/useOpenProfileSettings.tsx'; /* Metro dependency 7622 */
import UserProfileSettingsStore from '../UserProfileSettingsStore.tsx'; /* Metro dependency 7624 */
import CloseVoicePanels from '../../voice_panel/native/utils/closeVoicePanels.tsx'; /* Metro dependency 8088 */
import UserProfileSharedStyles from './UserProfileSharedStyles.tsx'; /* Metro dependency 8496 */
import UseBadges from '../hooks/useBadges.tsx'; /* Metro dependency 8501 */
import UseCustomStatusActivityForUser from '../../custom_status/utils/useCustomStatusActivityForUser.tsx'; /* Metro dependency 8693 */
import UserProfilePrimaryInfo from './UserProfilePrimaryInfo.tsx'; /* Metro dependency 8695 */
import UseUserProfileBannerHeight from '../hooks/native/useUserProfileBannerHeight.tsx'; /* Metro dependency 8752 */
import UseUserProfileOverscrollStyles from './useUserProfileOverscrollStyles.tsx'; /* Metro dependency 8760 */
import UserProfileOverscrollBanner from './UserProfileOverscrollBanner.tsx'; /* Metro dependency 8761 */
import UserProfileTextButtonGroup from './UserProfileTextButtonGroup.tsx'; /* Metro dependency 8867 */
import WishlistStore from '../../wishlists/WishlistStore.tsx'; /* Metro dependency 10035 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as UserPlatformIconModule from '../../../design/components/Icon/native/redesign/generated/UserPlatformIcon.tsx'; /* Metro dependency 4052 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ConstantsModule2 from './Constants.tsx'; /* Metro dependency 6816 */
import * as SubscribeGuildMembersModule from '../../../lib/guild/subscribeGuildMembers.tsx'; /* Metro dependency 6902 */
import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as SocialLayerStorefrontMobilePurchasingExperimentModule from '../../slayer_storefront/experiments/SocialLayerStorefrontMobilePurchasingExperiment.tsx'; /* Metro dependency 8354 */
import * as RecentAvatarUtilsModule from '../../recent_avatars/RecentAvatarUtils.tsx'; /* Metro dependency 8403 */
import * as UseUserProfileColorsModule from '../hooks/native/useUserProfileColors.tsx'; /* Metro dependency 8497 */
import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */
import * as ConstantsModule3 from '../Constants.tsx'; /* Metro dependency 8516 */
import * as UserProfileAlertUtilsModule from './UserProfileAlertUtils.tsx'; /* Metro dependency 8796 */
import * as SegmentedControlStateNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as PencilIconModule from '../../../design/components/Icon/native/redesign/generated/PencilIcon.tsx'; /* Metro dependency 9646 */
import * as UseWishlistHooksModule from '../../wishlists/hooks/useWishlistHooks.tsx'; /* Metro dependency 10034 */
import * as UserCheckIconModule from '../../../design/components/Icon/native/redesign/generated/UserCheckIcon.tsx'; /* Metro dependency 10339 */
import * as GameRelationshipStoreHooksModule from '../../game_relationships/GameRelationshipStoreHooks.tsx'; /* Metro dependency 10341 */
import * as UseIsGameFriendsModule from '../../game_relationships/hooks/useIsGameFriends.tsx'; /* Metro dependency 10342 */
import * as UseUserProfileGameFriendApplicationIdsModule from '../../game_relationships/hooks/useUserProfileGameFriendApplicationIds.tsx'; /* Metro dependency 10343 */
import * as WishlistUtilsModule from '../../wishlists/WishlistUtils.tsx'; /* Metro dependency 10344 */
import * as UseSegmentedPagesHeightModule from './useSegmentedPagesHeight.tsx'; /* Metro dependency 10345 */
import * as UseWishlistViewerCoachmarkModule from '../hooks/native/useWishlistViewerCoachmark.tsx'; /* Metro dependency 10346 */
import * as UserProfileConnectionsModule from './UserProfileConnections.tsx'; /* Metro dependency 10361 */
function _fun80120(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6, offset: 0x01e6d2d6, size: 495 bytes, params: 8, frame: 20
const env0_0 = require;
const PrimaryInfo2 = PrimaryInfo;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const constantsModule = ConstantsModule2;
const env0_14 = constantsModule.PROFILE_CONTENT_BOTTOM_PADDING;
const env0_15 = constantsModule.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
value = value.memo(UserProfileContent);
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileContent.tsx');
exports.default = value;
exports.PrimaryInfo = PrimaryInfo2;
function CustomStatusBubble({customStatusActivity, user, guildId, channelId, hasCustomProfileTheme, isPreviewingChanges, bubbleRef}) { // fn#80121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:473, offset: 0x01e6d4c5, size: 391 bytes, params: 2, frame: 26
const value3 = (UserProfileSharedStyles)();
const value4 = (FluxModule).useStateFromStores([UserStore], _fun80122, [user]);
const value5 = env0_4.useCallback(_fun80123, [channelId, guildId, user]);
const value8 = env0_4.useRef(customStatusActivity == null && value4 ? isPreviewingChanges ? null : (importDefault(8524) /* metro dependency 8524: getRandomCustomStatusPrompt */)() : null);
return ((Component) => <Component ref={bubbleRef} customStatusActivity={customStatusActivity} hasCustomProfileTheme={hasCustomProfileTheme} editEnabled={value4 && !isPreviewingChanges} onPressTruncatedStatus={isPreviewingChanges ? undefined : value5} style={[value3.customStatusBubble,
value3.customStatusBubbleInset]} emojiOnlyStyle={value3.emojiOnlyCustomStatusBubble} placeholderText={value8.current?.label()} prompt={value8.current} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */);
function _fun80122() { // fn#80122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:666, offset: 0x01e6d64c, size: 50 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.id === user.id;
}
function _fun80123() { // fn#80123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:757, offset: 0x01e6d67e, size: 116 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'UserProfileCustomStatusActionSheet', {user: user, guildId: guildId,
channelId: channelId}, 'stack']);
}
}
function RemoveFriendIconButton({user}) { // fn#80124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1239, offset: 0x01e6d6f2, size: 279 bytes, params: 2, frame: 19
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
[]).trackUserProfileAction;
const env0_2 = (UseAnalyticsLocations)().newestAnalyticsLocation;
const RemoveFriendIconButtonHandleConfirm = function() {
trackUserProfileAction({action: 'REMOVE_FRIEND'});
importDefault(dependencyMap[24]).removeFriend(user.id, {location: newestAnalyticsLocation});
};
const env0_4 = (UserUtils).useName(user);
const IconButton = (IconButtonNativeModule).IconButton;
const object = {'size': 'sm', 'variant': 'secondary-overlay'};
const UserCheckIcon = (UserCheckIconModule).UserCheckIcon;
object.icon = <UserCheckIcon size="sm" color="white" />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J);
object.onPress = onPress_80126;
return <IconButton {...object} />;
function RemoveFriendIconButtonOnPress() { // fn#80126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1692, owner: RemoveFriendIconButton.onPress, offset: 0x01e6d85b, size: 61 bytes, params: 1, frame: 14
const value = environment.__proto__;
(UserProfileAlertUtilsModule).confirmRemoveFriend({userDisplayName: env0_4,
onConfirm: RemoveFriendIconButtonHandleConfirm});
}
}
function RemoveGameFriendIconButton({user, guildId, channelId}) { // fn#80127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1774, offset: 0x01e6d898, size: 228 bytes, params: 2, frame: 19
const value2 = env0_4.useCallback(_fun80128, [channelId, guildId, user]);
const IconButton = (IconButtonNativeModule).IconButton;
object = {'size': 'sm', 'variant': 'secondary-overlay'};
const UserPlatformIcon = (UserPlatformIconModule).UserPlatformIcon;
object.icon = <UserPlatformIcon size="sm" color="white" />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J);
object.onPress = value2;
return <IconButton {...object} />;
function _fun80128() { // fn#80128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1863, offset: 0x01e6d97c, size: 116 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[30], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'UserProfileGameFriendActionSheet', {user: user, guildId: guildId,
channelId: channelId}, 'stack']);
}
}
function PrimaryInfo({user, channelId, displayProfile, displayNameOverride, pronounsOverride, badgesOverride, pendingDisplayNameStyles, style, badgeContainerBackground, isPreviewingChanges}) { // fn#80129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:2195, offset: 0x01e6d9f0, size: 492 bytes, params: 2, frame: 30
const value3 = (UserUtils).useUserTag(user);
const value4 = (UseBadges)(displayProfile);
const value5 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(displayProfile?.guildId,
channelId, user);
const r15 = displayNameOverride == null ? value5 : displayNameOverride.trim().length > 0 ? displayNameOverride : value5;
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const value6 = env0_4.useCallback(_fun80130, [Reflect.apply(useUserProfileAnalyticsContext,
UserProfileAnalyticsContextModule, []).trackUserProfileAction, value3]);
const defaultImport3Props = {user: user, guildId: displayProfile?.guildId, displayName: r15,
pronouns: pronounsOverride ?? displayProfile?.pronouns, badges: badgesOverride ?? value4, style: style,
badgeContainerBackground: badgeContainerBackground,
onPressDisplayName: isPreviewingChanges ? undefined : value6};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImport3Props.displayNameAccessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy);
defaultImport3Props.onPressUserTag = isPreviewingChanges ? undefined : value6;
defaultImport3Props.onPressPronouns = isPreviewingChanges ? undefined : _fun80131;
defaultImport3Props.showBadgeToastOnPress = !isPreviewingChanges;
defaultImport3Props.pendingDisplayNameStyles = pendingDisplayNameStyles;
return <UserProfilePrimaryInfo {...defaultImport3Props} />;
function _fun80130() { // fn#80130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:2606, offset: 0x01e6dbdc, size: 88 bytes, params: 1, frame: 14
trackUserProfileAction({action: 'COPY_USERNAME'});
(ClipboardUtilsNativeModule).copy(env0_0);
(ToastUtilsModule).presentUsernameCopied();
}
function _fun80131() { // fn#80131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3020, offset: 0x01e6dc34, size: 61 bytes, params: 1, frame: 12
trackUserProfileAction({action: 'PRESS_PRONOUNS'});
const value = environment.__proto__;
(ToastUtilsModule).presentUserPronouns();
}
}
function EditSection({guildId}) { // fn#80132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3140, offset: 0x01e6dc71, size: 650 bytes, params: 2, frame: 31
const PencilIcon = (PencilIconModule).PencilIcon;
var r4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value3 = (UserProfileSharedStyles)();
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
[]).trackUserProfileAction;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const env0_2 = (UseOpenProfileSettings)();
const env0_3 = (UseOpenProfileSettings)({guild: guild});
object = {style: value3.primaryButtons, maxWidth: ACTION_SHEET_MAX_WIDTH};
const Button = (ButtonNativeModule).Button;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object.primaryButton = (
<Button
variant="primary"
icon={<PencilIcon size="sm" color={WHITE} />}
text={guild != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HmFaFB) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.s5vZlQ)}
onPress={onPress_80134}
grow
/>
);
if (guild != null) {
r4 = (
<Button
variant="primary"
icon={<PencilIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PKQB/H'])}
onPress={onPress_80135}
grow
/>
);
} else {
r4 = undefined;
}
object.secondaryButton = r4;
return <UserProfileTextButtonGroup {...object} />;
function EditSectionOnPress() { // fn#80134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3621, owner: EditSection.onPress, offset: 0x01e6defb, size: 83 bytes, params: 1, frame: 14
trackUserProfileAction({action: 'EDIT_PROFILE'});
(ActionSheetActionCreators).hideActionSheet();
(CloseVoicePanels)();
env0_2();
}
function EditSectionOnPress_80135() { // fn#80135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3891, owner: EditSection.onPress, offset: 0x01e6df4e, size: 85 bytes, params: 1, frame: 14
trackUserProfileAction({action: 'EDIT_GUILD_PROFILE'});
(ActionSheetActionCreators).hideActionSheet();
(CloseVoicePanels)();
env0_3();
}
}
function UserProfileContent({user, channel, displayProfile, showUserProfileActionSheet, disableCalls, disableMessage, disableStatus, isPreviewingChanges, location, navigateToPremium, navigateToShop, initialSection, scrollPosition}) { // fn#80136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:4005, offset: 0x01e6dfa3, size: 3742 bytes, params: 2, frame: 82
var object5;
var r8;
var r37;
var r21;
var r14;
var object;
var UserProfileContactButtons;
var LayerScope;
var items11;
const showUserProfileActionSheet2 = showUserProfileActionSheet;
const isPreviewingChanges2 = isPreviewingChanges;
const value3 = (UserProfileSharedStyles)();
const value4 = (UseUserProfileBannerHeight)(ACTION_SHEET_MAX_WIDTH);
const {bannerAnimatedStyle, bannerImageAnimatedStyle, contentAnimatedStyle, blurAnimatedProps,
showBlur} = (UseUserProfileOverscrollStyles)({scrollPosition: scrollPosition,
bannerHeight: value4});
const bottom = (UseSafeAreaInsetsNative)().bottom;
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
[]).trackUserProfileAction;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
var isActive = currentUser?.id === user.id;
const {relationshipType,
originApplicationId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore],
function() {
var object = {};
var relationshipStoreBinding = RelationshipStore;
var userBinding = user;
object.relationshipType = relationshipStoreBinding.getRelationshipType(userBinding.id);
object.originApplicationId = relationshipStoreBinding.getOriginApplicationId(userBinding.id);
return object;
});
const value9 = (GameRelationshipStoreHooksModule).useIncomingGameRelationshipsForUser(user.id);
const value10 = (UseIsGameFriendsModule).useIsGameFriends(user.id);
const value11 = (UseUserProfileGameFriendApplicationIdsModule).useUserProfileGameFriendApplicationIds({userId: user.id});
const r41 = displayProfile != null ? displayProfile.guildId ?? undefined : channel?.guild_id;
const value12 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(r41, channel?.id, user);
let binding = isPreviewingChanges2;
let useMemo = binding.useMemo;
(SubscribeGuildMembersModule).useSubscribeGuildMembers(Reflect.apply(useMemo,
binding, [_fun80139, [r41, user]]), 'UserProfileContent');
const value14 = (UseCustomStatusActivityForUser)(user.id);
const {pendingBanner, pendingAvatar, pendingAvatarDecoration, pendingGlobalName, pendingPronouns, pendingBio,
pendingAccentColor, pendingThemeColors, pendingLegacyUsernameDisabled,
pendingDisplayNameStyles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore],
function() {
return UserProfileSettingsStore.getPendingChanges();
});
const pendingAvatarSrc = (RecentAvatarUtilsModule).getPendingAvatarSrc({userId: user.id,
image: pendingAvatar});
const value17 = (UseBadges)(displayProfile,
pendingLegacyUsernameDisabled);
const {theme, primaryColor,
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
displayProfile: displayProfile, pendingThemeColors: isPreviewingChanges ? pendingThemeColors : undefined});
const value19 = primaryColor != null;
const {containerBackground, avatarBackground,
statusBackground} = (UseUserProfileColorsModule).useUserProfileColors({theme: theme,
primaryColor: primaryColor, secondaryColor: secondaryColor});
const value21 = (MobileVisualRefreshExperiment)('UserProfileContent');
const value22 = isPreviewingChanges2.useRef(null);
const value23 = isPreviewingChanges2.useRef(null);
const firstWishlistId = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
function() {
return UserProfileStore.getFirstWishlistId(user.id);
});
(UseWishlistHooksModule).useFetchWishlist({wishlistId: firstWishlistId,
userId: user.id});
const value24 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], _fun80142,
[firstWishlistId]);
const value25 = (SocialLayerStorefrontMobilePurchasingExperimentModule).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'user_profile_content'});
binding = isPreviewingChanges2;
useMemo = binding.useMemo;
const r15 = isActive || value24 != null && Reflect.apply(useMemo, binding, [_fun80143, [value24, isActive,
value25]]).length > 0;
binding = isPreviewingChanges2;
let useState = binding.useState;
const value30 = Reflect.apply(useState, binding, [0]);
binding = showUserProfileActionSheet2;
const value31 = binding(value30, 2);
const property = value31[0];
const env0_21 = value31[1];
const value33 = isPreviewingChanges2.useCallback(_fun80145, []);
const {pageHeights,
handlePageContentSize} = (UseSegmentedPagesHeightModule).usePageHeights();
const binding3 = isPreviewingChanges2;
useState = binding3.useState;
let WISHLIST = UserProfileSections.WISHLIST;
const value35 = binding(Reflect.apply(useState, binding3, [initialSection === WISHLIST]), 2);
const property2 = value35[0];
const env0_24 = value35[1];
const {isVisible,
markAsDismissed} = (UseWishlistViewerCoachmarkModule).useWishlistViewerCoachmark({isCurrentUser: isActive,
shouldShowWishlistTab: r15});
const value37 = isPreviewingChanges2.useCallback(_fun80146, [trackUserProfileAction, isVisible, markAsDismissed]);
const value40 = isPreviewingChanges2.useCallback(_fun80149, [user, currentUser, containerBackground, value3,
isPreviewingChanges, value21, isPreviewingChanges2.useCallback(_fun80147, [navigateToPremium]),
isPreviewingChanges2.useCallback(_fun80148, [navigateToShop]), value19, r41, value11, displayProfile, value12,
pendingBio, channel, showUserProfileActionSheet]);
const value42 = isPreviewingChanges2.useMemo(_fun80151, [handlePageContentSize, value40,
isPreviewingChanges2.useCallback(_fun80150, [value3.profileContent, firstWishlistId, property2])]);
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
object5 = {pageWidth: property};
WISHLIST = UserProfileSections.WISHLIST;
object5.defaultIndex = initialSection !== WISHLIST ? 0 : 1;
const PX_24 = (Native).space.PX_24;
object5.itemSpacing = PX_24;
object5.items = value42;
object5.onPageChange = value37;
const value43 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [object5]);
const value44 = (UseSegmentedPagesHeightModule).usePagesHeightStyle(value43,
pageHeights);
const value45 = isPreviewingChanges2.useCallback(_fun80154, [value43, markAsDismissed]);
if (user == null) {
return null;
}
if (currentUser == null) {
return null;
}
object5 = {backgroundColor: containerBackground};
const jsxRuntimeEnv0_21Binding = jsxRuntimeEnv0_21;
const object3 = {user: user, displayProfile: displayProfile, bannerHeight: value4};
let r56 = isPreviewingChanges ? pendingBanner : undefined;
object3.pendingBanner = r56;
object3.pendingAvatarSrc = isPreviewingChanges ? pendingAvatarSrc : undefined;
object3.pendingAccentColor = isPreviewingChanges && pendingAccentColor != null ? pendingAccentColor : undefined;
object3.pendingThemeColors = isPreviewingChanges && pendingThemeColors != null ? pendingThemeColors : undefined;
object3.disableInteraction = isPreviewingChanges;
object3.bannerAnimatedStyle = bannerAnimatedStyle;
object3.bannerImageAnimatedStyle = bannerImageAnimatedStyle;
object3.blurAnimatedProps = blurAnimatedProps;
object3.showBlur = showBlur;
object3.privateBanner = (
displayProfile?.private !== true
? undefined
: ((Component) => <Component primaryColor={primaryColor} />)(importDefault(10474) /* metro dependency 10474: UserProfilePrivateBanner */)
);
if (isPreviewingChanges) {
r8 = undefined;
} else {
object = {};
r56 = displayProfile?.private;
r56 = r56 && value3.bannerButtonsWithPrivateBanner;
object.style = [value3.bannerButtons, r56];
r56 = (
user.id === currentUser.id || user.bot
? null
: (
relationshipType === RelationshipTypes.FRIEND
? (
<RemoveFriendIconButton user={user} />
)
: (
value10
? (
<RemoveGameFriendIconButton user={user} />
)
: null
)
)
);
r8 = (
<View {...object}>
{r56}
{((Component) => <Component user={user} currentUser={currentUser} displayProfile={displayProfile} channel={channel} />)(importDefault(10475) /* metro dependency 10475: UserProfileOverflowMenu */)}
</View>
);
}
object3.buttons = r8;
const userProfileOverscrollBanner = <UserProfileOverscrollBanner {...object3} />;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const value51 = ((Component) => <Component user={user} guildId={r41} disableStatus={disableStatus} pendingAvatarSrc={isPreviewingChanges ? pendingAvatarSrc : undefined} pendingAvatarDecoration={isPreviewingChanges ? pendingAvatarDecoration : undefined} backgroundColor={avatarBackground} statusStyle={{backgroundColor: statusBackground}} />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
const items6 = [value3.profileContentWrapper];
const PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING2 = isActive ? isPreviewingChanges ? value14 != null ? 0 : PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING : 0 : value14 != null ? 0 : PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
items6[1] = {paddingTop: PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING2,
paddingBottom: bottom + PROFILE_CONTENT_BOTTOM_PADDING};
const items7 = [
<CustomStatusBubble
customStatusActivity={value14}
user={user}
guildId={r41}
channelId={channel?.id}
hasCustomProfileTheme={value19}
showUserProfileActionSheet={showUserProfileActionSheet}
isPreviewingChanges={isPreviewingChanges}
bubbleRef={value22}
/>,
];
const items8 = [value3.primaryInfo];
items8[1] = value3.profileContent;
const items9 = [
<PrimaryInfo
user={user}
channelId={channel?.id}
displayProfile={displayProfile}
displayNameOverride={isPreviewingChanges ? pendingGlobalName : undefined}
pronounsOverride={isPreviewingChanges ? pendingPronouns : undefined}
badgesOverride={isPreviewingChanges ? value17 : undefined}
pendingDisplayNameStyles={isPreviewingChanges ? pendingDisplayNameStyles : undefined}
badgeContainerBackground={containerBackground}
isPreviewingChanges={isPreviewingChanges}
/>,
];
items9[1] = user.id !== currentUser.id && ((Component) => <Component user={user} guildId={r41} />)(importDefault(10484) /* metro dependency 10484: UserProfileMutuals */);
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
items9[2] = relationshipType === PENDING_INCOMING && ((Component) => <Component user={user} channelId={channel?.id} guildId={r41} applicationId={originApplicationId} style={object5} showUserProfile={showUserProfileActionSheet} />)(importDefault(10485) /* metro dependency 10485: UserProfileIncomingFriendRequest */);
items9[3] = value9.map(_fun80155);
items9[4] = ((Component) => <Component user={user} style={object5} />)(importDefault(10489) /* metro dependency 10489: UserProfileRemediatedNotice */);
var isActive = user.id === currentUser.id;
items9[5] = isActive && !isPreviewingChanges && <EditSection guildId={r41} />;
const value61 = user.id !== currentUser.id;
if (value61) {
UserProfileContactButtons = importDefault(10490) /* metro dependency 10490: UserProfileContactButtons */;
r37 = disableCalls || relationshipType === RelationshipTypes.BLOCKED;
r37 = !r37 ? user.isProvisional : r37;
r21 = (
<UserProfileContactButtons
user={user}
disableCalls={r37}
disableMessage={disableMessage}
location={location}
hasCustomProfileTheme={value19}
style={value3.primaryButtons}
/>
);
} else {
r21 = value61;
}
items9[6] = r21;
items7[1] = (
<View style={items8}>
{items9}
</View>
);
if (r15) {
object5 = {onLayout: value33};
LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
items11 = [
<View style={value3.profileTablist}>
{((Tabs) => <Tabs state={value43} variant={value19 ? 'gradient-background' : undefined} />)((require(8859) /* metro dependency 8859: TabsNative */).Tabs)}
<View
ref={value23}
style={{
'position': 'absolute',
'left': '50%',
'top': 0,
'right': 0,
'bottom': 0,
}}
collapsable={false}
pointerEvents="box-none"
/>
</View>,
];
items11[1] = ((View) => <View style={value44}>{((SegmentedControlPages) => <SegmentedControlPages state={value43} />)((require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
items11[2] = ((Component) => <Component anchorRef={value23} isVisible={isVisible} markAsDismissed={markAsDismissed} onViewWishlist={value45} />)(importDefault(10494) /* metro dependency 10494: WishlistViewerCoachmark */);
r14 = (
<View {...object5}>
<LayerScope>
{items11}
</LayerScope>
</View>
);
} else {
r14 = value40();
}
items7[2] = r14;
return (
<>
{userProfileOverscrollBanner}
<View2 style={contentAnimatedStyle}>
{value51}
<View style={items6}>
{items7}
</View>
</View2>
</>
);
function _fun80139() { // fn#80139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:5094, offset: 0x01e6ee7f, size: 58 bytes, params: 1, frame: 5
return env0_12 == null ? {} : user != null ? {[env0_12]: [user.id]} : {};
}
function _fun80142() { // fn#80142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6136, offset: 0x01e6eeec, size: 40 bytes, params: 1, frame: 12
const firstWishlistIdBinding = firstWishlistId;
const value2 = null;
return value2 != firstWishlistIdBinding ? WishlistStore.getWishlist(firstWishlistId) : value2;
}
function _fun80143() { // fn#80143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6294, offset: 0x01e6ef14, size: 57 bytes, params: 1, frame: 13
let r0 = JsxRuntimeModule.jsx == null ? undefined : JsxRuntimeModule.jsx.items.filter(_fun80144);
r0 = r0 ?? [];
return r0;
function _fun80144(a0) { // fn#80144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6354, offset: 0x01e6ef4d, size: 65 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
return (WishlistUtilsModule).isEligibleWishlistItemOnMobile(a0,
{isWishlistOwner: env1_10, isSocialLayerStorefrontMobilePurchasingEnabled: env1_20});
}
}
function _fun80145({nativeEvent}) { // fn#80145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6583, offset: 0x01e6ef8e, size: 36 bytes, params: 2, frame: 11
env0_21(nativeEvent.layout.width);
}
function _fun80146(a0) { // fn#80146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6905, offset: 0x01e6efb2, size: 105 bytes, params: 2, frame: 17
const value2 = a0 === 1;
env0_24(value2);
trackUserProfileAction({action: 'PRESS_SECTION',
section: value2 ? UserProfileSections.WISHLIST : UserProfileSections.MAIN});
if (value2 && isVisible) {
markAsDismissed(ContentDismissActionType.INDIRECT_ACTION);
}
}
function _fun80147() { // fn#80147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:7043, offset: 0x01e6f01b, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
if (navigateToPremium != null) {
navigateToPremium();
}
}
function _fun80148() { // fn#80148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:7113, offset: 0x01e6f055, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
if (navigateToShop != null) {
navigateToShop();
}
}
function _fun80149() { // fn#80149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:7183, offset: 0x01e6f08f, size: 1192 bytes, params: 1, frame: 24
var r6;
var UserProfileModeratorActions;
if (user == null) {
return null;
}
if (currentUser == null) {
return null;
}
const binding = env0_7;
const items4 = [binding.card];
items4[1] = {backgroundColor: containerBackground};
const items2 = [binding.cards];
items2[1] = binding.profileContent;
const displayProfileBinding = displayProfile;
const value3 = undefined;
const items3 = [
(displayProfileBinding == null ? value3 : displayProfile.private) && ((Component) => <Component username={ConstantsModule3.UserProfileSections} containerBackground={containerBackground} />)(importDefault(10347) /* metro dependency 10347: UserProfilePrivateInfoBanner */),
];
items3[1] = user.isProvisional && ((UserProfileProvisionalAccountExplainerCard) => <UserProfileProvisionalAccountExplainerCard style={items4} userId={user.id} iconSize={16} />)((require(10348) /* metro dependency 10348: ProvisionalAccountExplainer */).UserProfileProvisionalAccountExplainerCard);
items3[2] = user.id === currentUser.id && !isPreviewingChanges && ((Component) => <Component navigateToPremium={env0_27} navigateToShop={env0_28} hasCustomProfileTheme={env0_15} />)(importDefault(10352) /* metro dependency 10352: UserProfileDismissibleUpsells */);
items3[3] = ((Component) => <Component user={user} currentUser={currentUser} guildId={env0_12} style={items4} />)(importDefault(10210) /* metro dependency 10210: UserProfileActivity */);
items3[4] = ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
items3[5] = env0_11.length > 0 && ((Component) => <Component userId={user.id} applicationIds={env0_11} style={ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH ? value3 : items4} />)(importDefault(10360) /* metro dependency 10360: UserProfileGameFriendsCard */);
items3[6] = ((Component) => <Component userId={user.id} displayProfile={displayProfile} pendingBio={isPreviewingChanges ? pendingBio : value3} style={ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH ? value3 : items4} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
items3[7] = ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
items3[8] = env0_12 != null && ((Component) => <Component userId={user.id} guildId={env0_12} style={ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH ? value3 : items4} />)(importDefault(6792) /* metro dependency 6792: UserProfileRolesCard */);
const value15 = (channel == null ? value3 : channel.guild_id) != null;
if (value15) {
UserProfileModeratorActions = importDefault(10288) /* metro dependency 10288: UserProfileModeratorActions */;
userBinding = user;
currentUserBinding = currentUser;
channelBinding = channel;
r6 = (
<UserProfileModeratorActions
user={userBinding}
currentUser={currentUserBinding}
guildId={channelBinding.guild_id}
channelId={channelBinding.id}
showUserProfile={showUserProfileActionSheet}
style={ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH ? value3 : items4}
/>
);
} else {
r6 = value15;
}
items3[9] = r6;
items3[10] = ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
const UserProfileAccountConnectionsCard = (UserProfileConnectionsModule).UserProfileAccountConnectionsCard;
items3[11] = <UserProfileAccountConnectionsCard userId={user.id} style={ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH ? value3 : items4} />;
const UserProfileApplicationRoleConnectionsCard = (UserProfileConnectionsModule).UserProfileApplicationRoleConnectionsCard;
items3[12] = <UserProfileApplicationRoleConnectionsCard userId={user.id} style={ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH ? value3 : items4} />;
items3[13] = !isPreviewingChanges && ((Component) => <Component userId={user.id} style={ActionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH ? value3 : items4} onBack={showUserProfileActionSheet} />)(importDefault(10327) /* metro dependency 10327: UserProfileNote */);
return (
<View style={items2}>
{items3}
</View>
);
}
function _fun80150() { // fn#80150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:8352, offset: 0x01e6f537, size: 157 bytes, params: 1, frame: 19
const value = environment.__proto__;
return (
<View style={env0_7.profileContent}>
{
firstWishlistId == null
? ((WishlistEmptyState) => <WishlistEmptyState />)((require(10373) /* metro dependency 10373: UserProfileWishlistGrid */).WishlistEmptyState)
: ((Component) => <Component wishlistId={firstWishlistId} maxWidth={ACTION_SHEET_MAX_WIDTH} isVisible={env0_23} />)(importDefault(10373) /* metro dependency 10373: UserProfileWishlistGrid */)
}
</View>
);
}
function _fun80151() { // fn#80151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:8531, offset: 0x01e6f5d4, size: 249 bytes, params: 1, frame: 22
let object = {id: 'main'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const LXw470 = (require(1244) /* metro dependency 1244: indexNative */).t.LXw470;
object.label = Reflect.apply(string, intl, [LXw470]);
object.page = (
<ScrollView
scrollEnabled={false}
onContentSizeChange={function(a0, a1) {
return handlePageContentSize(0, a0, a1);
}}
>
{env0_29()}
</ScrollView>
);
const items2 = [object];
object = {id: 'wishlist'};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J']);
object.page = (
<ScrollView
scrollEnabled={false}
onContentSizeChange={function(a0, a1) {
return handlePageContentSize(1, a0, a1);
}}
>
{env0_30()}
</ScrollView>
);
items2[1] = object;
return items2;
}
function _fun80154() { // fn#80154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:9033, offset: 0x01e6f702, size: 47 bytes, params: 1, frame: 12
env0_31.setActiveIndex(1);
const markAsDismissedBinding = markAsDismissed;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
markAsDismissedBinding(TAKE_ACTION);
}
function _fun80155(a0) { // fn#80155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:10810, offset: 0x01e6f731, size: 128 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component user={user} isGameRelationship applicationId={a0.applicationId} channelId={channel?.id} guildId={env0_12} style={env0_32} showUserProfile={showUserProfileActionSheet} key={a0.applicationId} />)(importDefault(10485) /* metro dependency 10485: UserProfileIncomingFriendRequest */);
}
}
}
global.__d(_fun80120, 10338, [57, 31, 27, 10035, 1867, 3793, 1878, 7624, 5189, 8516, 6816, 661, 6276, 1376, 33,
8496, 566, 4080, 8692, 1962, 8524, 8513, 8514, 6771, 8783, 3995, 8341, 10339, 1244, 8796, 10340, 4052, 8501,
4617, 6797, 3856, 8695, 7622, 8867, 4578, 9646, 697, 8088, 8752, 8760, 1585, 10341, 10342, 10343, 6902, 8693,
8403, 8494, 8497, 1357, 10034, 8354, 10344, 10345, 10346, 10347, 10348, 10352, 10210, 7331, 10360, 8762, 6792,
10288, 10361, 10327, 10373, 8853, 8761, 10474, 10475, 4017, 8510, 10484, 10485, 10489, 10490, 6517, 8859, 8861,
10494,
2]) /* metro module 10338, dependencies: [57, 31, 27, 10035, 1867, 3793, 1878, 7624, 5189, 8516, 6816, 661, 6276, 1376, 33, 8496, 566, 4080, 8692, 1962, 8524, 8513, 8514, 6771, 8783, 3995, 8341, 10339, 1244, 8796, 10340, 4052, 8501, 4617, 6797, 3856, 8695, 7622, 8867, 4578, 9646, 697, 8088, 8752, 8760, 1585, 10341, 10342, 10343, 6902, 8693, 8403, 8494, 8497, 1357, 10034, 8354, 10344, 10345, 10346, 10347, 10348, 10352, 10210, 7331, 10360, 8762, 6792, 10288, 10361, 10327, 10373, 8853, 8761, 10474, 10475, 4017, 8510, 10484, 10485, 10489, 10490, 6517, 8859, 8861, 10494, 2] */;