/* Metro module 8749; source: modules/user_profile/native/UserProfileActionSheet.tsx; dependencies: [57, 31, 27, 1379, 1945, 1878, 7624, 6816, 661, 6276, 33, 4501, 6277, 4017, 1585, 566, 8490, 6771, 6789, 7326, 3829, 8514, 8750, 8498, 8751, 8503, 8505, 8481, 8494, 8752, 1478, 5314, 8502, 4048, 3860, 697, 8746, 8753, 8061, 1932, 8491, 683, 4008, 4080, 8743, 1484, 6275, 1305, 8754, 1244, 3868, 8758, 477, 7007, 8759, 8779, 10338, 8474, 6515, 10496, 1314, 2] */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */ import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */ import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */ import UserProfileSettingsStore from '../UserProfileSettingsStore.tsx'; /* Metro dependency 7624 */ import UseUserProfileAnalyticsProperties from '../hooks/native/useUserProfileAnalyticsProperties.tsx'; /* Metro dependency 8746 */ import UseUserProfileBannerHeight from '../hooks/native/useUserProfileBannerHeight.tsx'; /* Metro dependency 8752 */ 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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */ import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */ import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */ import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */ import * as RootNavigationRefNativeModule from '../../main_tabs_v2/RootNavigationRef.native.tsx'; /* Metro dependency 4008 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as NavigatorConstantsNativeModule from '../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */ import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */ import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */ import * as moduleValue2 from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */ import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import * as ConstantsModule2 from './Constants.tsx'; /* Metro dependency 6816 */ import * as UseBottomSheetRefModule from '../../../design/components/Sheet/native/useBottomSheetRef.tsx'; /* Metro dependency 7326 */ import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */ import * as UseIsScreenLandscapeNativeModule from '../../screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */ function _fun68486(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6, offset: 0x01c509a0, size: 543 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const env0_18 = (CreateStylesModule).createStyles({container: {flex: 1}, profileContainer: {position: 'relative'}, noPadding: {paddingHorizontal: 0}, profileEffect: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'zIndex': 1}}); object = {code: 'function UserProfileActionSheetTsx1(){const{value}=this.__closure;return value.get();}'}; object = {code: 'function UserProfileActionSheetTsx2(prepared){const{animatedPosition}=this.__closure;return animatedPosition.set(prepared);}'}; object = {code: 'function UserProfileActionSheetTsx3(){const{animatedPosition,safeAreaTop,interpolate,animatedIndex,Extrapolation}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop}],opacity:interpolate(animatedIndex.get(),[-1,0],[0,1],Extrapolation.CLAMP)};}'}; object = {code: 'function UserProfileActionSheetTsx4(payload,context){const{defaultHandleOnScroll,scrollPosition,animatedScrollableState,SCROLLABLE_STATE}=this.__closure;var _defaultHandleOnScrol;(_defaultHandleOnScrol=defaultHandleOnScroll)===null||_defaultHandleOnScrol===void 0||_defaultHandleOnScrol(payload,context);scrollPosition.set(animatedScrollableState.get()===SCROLLABLE_STATE.LOCKED?0:payload.contentOffset.y);}'}; object = {code: 'function UserProfileActionSheetTsx5(){const{scrollPosition}=this.__closure;const transform=scrollPosition.get()<=0?[{translateY:scrollPosition.get()}]:[];return{transform:transform};}'}; value = value.memo(UserProfileActionSheet); (FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileActionSheet.tsx'); exports.default = value; function UseAnimatedPosition({animatedPosition}) { // fn#68487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:784, offset: 0x01c50bbf, size: 179 bytes, params: 2, frame: 17 const useBottomSheet = moduleValue2.useBottomSheet; const animatedPosition2 = Reflect.apply(useBottomSheet, moduleValue2, []).animatedPosition; const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; const closure = function() { return animatedPosition.get(); }; closure.__closure = {value: animatedPosition2}; closure.__workletHash = 5684011437075; closure.__initData = env0_19; const closure2 = function(a0) { return animatedPosition.set(a0); }; closure2.__closure = {animatedPosition: animatedPosition}; closure2.__workletHash = 15360670503044; closure2.__initData = env0_20; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, closure2]); return null; } function ActionSheetAlignedView({animatedPosition, animatedIndex, safeAreaTop, children}) { // fn#68490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:1399, offset: 0x01c50c88, size: 245 bytes, params: 2, frame: 22 const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; const ActionSheetAlignedViewU2 = ActionSheetAlignedViewU; const object = {animatedPosition: animatedPosition, safeAreaTop: safeAreaTop}; object.interpolate = ReanimatedRexportModule.interpolate; object.animatedIndex = animatedIndex; const Extrapolation = ReanimatedRexportModule.Extrapolation; object.Extrapolation = Extrapolation; ActionSheetAlignedViewU2.__closure = object; ActionSheetAlignedViewU2.__workletHash = 16546700050596; ActionSheetAlignedViewU2.__initData = env0_21; const value2 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ActionSheetAlignedViewU2]); const View = (ReanimatedRexport).View; return ( {children} ); function ActionSheetAlignedViewU() { // fn#68491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:1532, owner: ActionSheetAlignedView.u, offset: 0x01c50d7d, size: 159 bytes, params: 1, frame: 21 const object = {}; const object2 = {}; object2.translateY = animatedPosition.get() + safeAreaTop; object.transform = [object2]; const interpolate = ReanimatedRexportModule.interpolate; const value = animatedIndex.get(); const Extrapolation = ReanimatedRexportModule.Extrapolation; const CLAMP = Extrapolation.CLAMP; object.opacity = Reflect.apply(interpolate, ReanimatedRexportModule, [value, [-1, 0], [0, 1], CLAMP]); return object; } } function UserProfileActionSheet({userId, channelId, messageId, roleId, sessionId, disableCalls, disableMessage, isVoiceContext, onClose, location, openedAt, isPreviewingChanges, showGuildProfile, sourceAnalyticsLocations = [], initialSection}) { // fn#68492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:2559, offset: 0x01c50e1c, size: 3564 bytes, params: 2, frame: 65 var r25; var r0; const ThemeContextProvider = (NativeModule).ThemeContextProvider; const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider; var object2; const UserProfileAnalyticsProvider = (UserProfileAnalyticsContextModule).UserProfileAnalyticsProvider; const BottomSheet = (BottomSheetNativeModule).BottomSheet; var items2; var BottomSheetScrollView; var moduleValue14; var items3; var items5; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var EmptyState; let value = undefined; isPreviewingChanges = !(isPreviewingChanges === value) && isPreviewingChanges; showGuildProfile = showGuildProfile === value || showGuildProfile; const env0_23 = value; const styles = useStyles(); const value5 = (ReanimatedRexportModule).useSharedValue(0); const value6 = (ReanimatedRexportModule).useSharedValue(-1); const top = (UseSafeAreaInsetsNative)().top; const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() { return UserStore.getUser(userId); }); const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }, [channelId]); const guild_id = value7 == null ? value : value7.guild_id; const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun68495); const value9 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)((user == null ? value : user.id) ?? EMPTY_STRING_SNOWFLAKE_ID, showGuildProfile ? guild_id : value); const defaultImport2 = UseAnalyticsLocations; let object = []; const value10 = arraySpread(object, sourceAnalyticsLocations, 0, undefined); const USER_PROFILE_ACTION_SHEET = (AnalyticsLocation).USER_PROFILE_ACTION_SHEET; object[value10] = USER_PROFILE_ACTION_SHEET; value10 + 1; const analyticsLocations = defaultImport2(object).analyticsLocations; const {bottomSheetRef, bottomSheetClose} = (UseBottomSheetRefModule).useBottomSheetRef(); let binding = isVoiceContext; const value12 = binding.useRef(null); const value13 = (ReanimatedRexportModule).useSharedValue(0); const value14 = binding.useMemo(_fun68496, [value13]); const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; const UserProfileActionSheetW2 = UserProfileActionSheetW; UserProfileActionSheetW2.__closure = {scrollPosition: value13}; UserProfileActionSheetW2.__workletHash = 6237718973214; UserProfileActionSheetW2.__initData = env0_23; const value15 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [UserProfileActionSheetW2]); let useState = binding.useState; const value16 = Reflect.apply(useState, binding, [false]); const binding2 = disableMessage; const value17 = binding2(value16, 2); const property = value17[0]; const env0_22 = value17[1]; useState = binding.useState; const value18 = binding2(Reflect.apply(useState, binding, [0]), 2); const property2 = value18[0]; const env0_24 = value18[1]; const value19 = binding.useCallback(_fun68501, []); const ProfileVisibility = (UserSettingsModule).ProfileVisibility; const value20 = ProfileVisibility.useSetting(); const {pendingThemeColors, pendingAvatarDecoration, pendingProfileEffect, pendingProfileFrame} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore], function() { return UserProfileSettingsStore.getPendingChanges(); }); const value22 = (UserProfileAnalyticsContextModule).useCreateUserProfileAnalyticsContext({layout: 'ACTION_SHEET', sourceSessionId: sessionId, userId: userId, guildId: guild_id, channelId: channelId, messageId: messageId, roleId: roleId, showGuildProfile: showGuildProfile}); const r22 = isPreviewingChanges && value !== pendingProfileFrame ? pendingProfileFrame == null ? value : pendingProfileFrame.skuId : value9 == null || value9.profileFrame == null ? value : value9.profileFrame.skuId; const value23 = (UseIsScreenLandscapeNativeModule).useIsScreenLandscape(); const value24 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(value23 ? value : r22, 'UserProfileActionSheet'); (importDefault(8751) /* metro dependency 8751: useMaybeTrackProfileFrameViewed */)({skuId: value23 ? value : r22, openedAt: openedAt, context: value22, analyticsLocations: analyticsLocations}); const value25 = isVoiceContext.useMemo(_fun68503, [value24, value5, top, value6, property2]); const value26 = (importDefault(8481) /* metro dependency 8481: useProfileEffect */)(isPreviewingChanges && value !== pendingProfileEffect ? pendingProfileEffect == null ? value : pendingProfileEffect.skuId : value9 == null || value9.profileEffect == null ? value : value9.profileEffect.skuId); const {theme, primaryColor, secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user, displayProfile: value9, pendingThemeColors: isPreviewingChanges ? pendingThemeColors : value}); const value28 = (UseUserProfileBannerHeight)(ACTION_SHEET_MAX_WIDTH); const {height, width} = (UseWindowDimensionsNative)(); const NAV_BAR_HEIGHT_MULTILINE = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT_MULTILINE; const value30 = height - NAV_BAR_HEIGHT_MULTILINE - top; binding = isVoiceContext; const value31 = binding.useMemo(_fun68504, [isPreviewingChanges, value24, width]); const value32 = (UseTheme)(); const useToken = UseTokenModule.useToken; const INTERACTIVE_TEXT_HOVER = (Native).colors.INTERACTIVE_TEXT_HOVER; const value33 = Reflect.apply(useToken, UseTokenModule, [INTERACTIVE_TEXT_HOVER, theme]); const value34 = (UseUserProfileAnalyticsProperties)({userId: userId, user: user, channelId: channelId, guildId: guild_id, displayProfile: value9, guildMember: value8}); const env0_32 = binding.useMemo(_fun68505, [user, channelId]); let useEffect = binding.useEffect; Reflect.apply(useEffect, binding, [_fun68506, [user, userId]]); binding.useEffect(_fun68507, [user, guild_id, channelId]); binding.useEffect(_fun68508, [value34, value9, guild_id, property, value8]); useEffect = binding.useEffect; object = [pendingAvatarDecoration == null ? value : pendingAvatarDecoration.skuId]; object[1] = pendingProfileEffect == null ? value : pendingProfileEffect.skuId; object[2] = pendingProfileFrame == null ? value : pendingProfileFrame.skuId; object[3] = sourceAnalyticsLocations; Reflect.apply(useEffect, binding, [_fun68509, object]); binding = isVoiceContext; binding.useEffect(function() { return _fun68511; }, [onClose]); binding.useEffect(_fun68512, [userId]); const env0_33 = (UseNavigationNativeModule).useNavigation(); if (user == null) { object = {value: analyticsLocations}; var userProfileAnalyticsProviderProps = {value: value22, openedAt: openedAt, fetchStartedAt: value9 == null ? value : value9.fetchStartedAt, fetchEndedAt: value9 == null ? value : value9.fetchEndedAt, isLoaded: value9 == null ? value : value9.isLoaded}; EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState; value = ( ); r0 = value; } else { object = {theme: theme, primaryColor: primaryColor, secondaryColor: secondaryColor}; object2 = {value: analyticsLocations}; var userProfileAnalyticsProviderProps = {value: value22, openedAt: openedAt, fetchStartedAt: value9 == null ? value : value9.fetchStartedAt, fetchEndedAt: value9 == null ? value : value9.fetchEndedAt, isLoaded: value9 == null ? value : value9.isLoaded}; var bottomSheetProps2 = {'ref': null, 'handleDisabled': true, 'scrollable': true, 'startExpanded': true, ref: bottomSheetRef, maxHeight: value30 - value31, contentStyles: styles.noPadding, backdropChildren: value25, animatedIndex: value6}; r25 = value24 != null && ; items2 = [r25]; items2[1] = ((Component) => )(importDefault(8758) /* metro dependency 8758: UserProfileFixedBackground */); BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView; var bottomSheetScrollViewProps2 = {scrollsToTop: false, style: styles.container, contentContainerStyle: {pointerEvents: isPreviewingChanges ? 'none' : value}}; moduleValue14 = require(477) /* metro dependency 477: PlatformUtils */; bottomSheetScrollViewProps2.scrollEventsHandlersHook = moduleValue14.isIOS() ? value14 : value; bottomSheetScrollViewProps2.ref = value12; var viewBindingProps = {style: styles.profileContainer, onLayout: value19}; items3 = [_fun68517(user)]; items3[1] = value26 != null && ((View) => {((Component) => )(importDefault(8474) /* metro dependency 8474: ProfileEffect */)})((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View); items2[2] = ( {items3} ); r25 = value24 == null && ((ActionSheetHeaderBar) => )((require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar); items2[3] = r25; items5 = [ {items2} , ]; items5[1] = value24 != null && {((Component) => )(importDefault(8503) /* metro dependency 8503: ProfileFrame */)}{((ActionSheetHeaderBar) => )((require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar)}; items5[2] = isPreviewingChanges && {((ActionSheetBackdropToast) => )((require(10496) /* metro dependency 10496: ActionSheetBackdropToast */).ActionSheetBackdropToast)}; value = ( {items5} ); r0 = value; } return r0; function _fun68495() { // fn#68495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3095, offset: 0x01c51c3d, size: 45 bytes, params: 1, frame: 14 const guild_idBinding = guild_id; const value2 = null; return value2 != guild_idBinding ? GuildMemberStore.getMember(guild_id, userId) : value2; } function _fun68496() { // fn#68496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3396, offset: 0x01c51c6a, size: 25 bytes, params: 1, frame: 11 return ((a0) => { var env0_0 = a0; return _fun68498; })(env0_20); function buildBottomSheeetScrollEventsHandlers(a0) { // fn#68497, offset: 0x01c51c83, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun68498; function _fun68498(a0, a1, a2) { // fn#68498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3456, offset: 0x01c51c95, size: 232 bytes, params: 4, frame: 23 var environment; let value = environment.__proto__.__proto__.__proto__; const value2 = (moduleValue2).useScrollEventsHandlersDefault(a0, a1, a2); const useBottomSheetInternal = moduleValue2.useBottomSheetInternal; const animatedScrollableState = Reflect.apply(useBottomSheetInternal, moduleValue2, []).animatedScrollableState; const animatedScrollableState2 = animatedScrollableState; const handleOnScroll = value2.handleOnScroll; const useWorkletCallback = ReanimatedRexportModule.useWorkletCallback; const s_684992 = s_68499; let object = {defaultHandleOnScroll: handleOnScroll}; object.scrollPosition = animatedScrollableState2; object.animatedScrollableState = animatedScrollableState; const SCROLLABLE_STATE = moduleValue2.SCROLLABLE_STATE; object.SCROLLABLE_STATE = SCROLLABLE_STATE; s_684992.__closure = object; s_684992.__workletHash = 13254130622789; s_684992.__initData = env3_22; value = Reflect.apply(useWorkletCallback, ReanimatedRexportModule, [s_684992, [handleOnScroll, animatedScrollableState]]); object = {}; copyDataProperties(object, value2, undefined); object['handleOnScroll'] = value; return object; function s_68499(a0, a1) { // fn#68499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3634, offset: 0x01c51d7d, size: 117 bytes, params: 3, frame: 16 if (handleOnScroll != null) { handleOnScroll(a0, a1); } const binding = env1_0; const set = binding.set; const value = animatedScrollableState.get(); const SCROLLABLE_STATE = (moduleValue2).SCROLLABLE_STATE; const LOCKED = SCROLLABLE_STATE.LOCKED; Reflect.apply(set, binding, [value === LOCKED ? 0 : a0.contentOffset.y]); } } } } function UserProfileActionSheetW() { // fn#68500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3989, owner: UserProfileActionSheet.W, offset: 0x01c51df2, size: 67 bytes, params: 1, frame: 12 var items2; var object2; if (env0_20.get() <= 0) { object2 = {}; object2.translateY = env0_20.get(); items2 = [object2]; } else { items2 = []; } return {transform: items2}; } function _fun68501({nativeEvent}) { // fn#68501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:4249, offset: 0x01c51e35, size: 55 bytes, params: 2, frame: 12 const binding = env0_24; const Math = global.Math; binding(Math.floor(nativeEvent.layout.width)); } function _fun68503() { // fn#68503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:4956, offset: 0x01c51e7f, size: 171 bytes, params: 1, frame: 22 const value2 = null; return ( value2 == env0_29 ? value2 : ( {((Component) => )(importDefault(8503) /* metro dependency 8503: ProfileFrame */)} ) ); } function _fun68504() { // fn#68504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5532, offset: 0x01c51f2a, size: 94 bytes, params: 1, frame: 15 var Math; var min; var widthBinding; var value2; if (isPreviewingChanges) { if (env0_29 == null) { return 0; } Math = global.Math; min = Math.min; widthBinding = width; value2 = environment.__proto__; return (importDefault(8502) /* metro dependency 8502: scaleProfileFrame */)(env0_29, Reflect.apply(min, Math, [widthBinding, ACTION_SHEET_MAX_WIDTH])).overflowTop; } return 0; } function _fun68505() { // fn#68505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5806, offset: 0x01c51f88, size: 63 bytes, params: 1, frame: 14 var r0; var value3; var moduleValue; const value2 = user != null; if (value2) { value3 = environment.__proto__; moduleValue = require(8753) /* metro dependency 8753: ApplicationPresenceUtils */; r0 = moduleValue.shouldDisableUserPresenceInChannel(user, channelId); } else { r0 = value2; } return r0; } function _fun68506() { // fn#68506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5889, offset: 0x01c51fc7, size: 57 bytes, params: 1, frame: 12 var value2; var moduleValue; if (user == null) { value2 = environment.__proto__; moduleValue = require(8061) /* metro dependency 8061: UserActionCreators */; moduleValue.getUser(userId); } } function _fun68507() { // fn#68507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5945, offset: 0x01c52000, size: 192 bytes, params: 1, frame: 19 var id; var value5; var value6; var defaultImport2; if (!(user == null || user.isNonUserBot() && !(importDefault(1932) /* metro dependency 1932: isChangelogUser */)(user.id))) { value5 = environment.__proto__; value6 = undefined; defaultImport2 = importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */; id = user.id; userBinding = user; defaultImport2(id, userBinding.getAvatarURL(guild_id, 80), {'type': 'action_sheet', 'withMutualGuilds': true, 'withMutualFriends': true, 'dispatchWait': true, guildId: guild_id, channelId: channelId ?? value6}); } } function _fun68508() { // fn#68508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6170, offset: 0x01c520c0, size: 131 bytes, params: 1, frame: 15 var value6; var defaultImport; if (!(env0_21 || JsxRuntimeModule.jsxs == null)) { if (guild_id == null || JsxRuntimeModule.jsx?.fullProfileLoadedTimestamp != null) { value6 = environment.__proto__; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.OPEN_POPOUT, env0_31); env0_22(true); } } } function _fun68509() { // fn#68509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6324, offset: 0x01c52143, size: 213 bytes, params: 1, frame: 19 var r5; var defaultImport; var track; var OPEN_MODAL; const value2 = env0_8.at(-1); const value4 = undefined; const COLLECTIBLES_SHOP_PROFILE_PREVIEW = (AnalyticsLocation).COLLECTIBLES_SHOP_PROFILE_PREVIEW; if (value2 === COLLECTIBLES_SHOP_PROFILE_PREVIEW) { defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; OPEN_MODAL = AnalyticEvents.OPEN_MODAL; r5 = (pendingAvatarDecoration == null ? value4 : pendingAvatarDecoration.skuId) ?? (pendingProfileEffect == null ? value4 : pendingProfileEffect.skuId); r5 = r5 ?? (pendingProfileFrame == null ? value4 : pendingProfileFrame.skuId); Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: 'Collectibles Shop Details Modal Expanded', location_stack: env0_8, sku_id: r5}]); } return value4; } function _fun68510() { // fn#68510, offset: 0x01c52218, size: 11 bytes, params: 1, frame: 1 return function() { if (onClose != null) { onClose(); } }; function _fun68511() { // fn#68511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6693, offset: 0x01c52223, size: 27 bytes, params: 1, frame: 10 if (onClose != null) { onClose(); } } } function _fun68512() { // fn#68512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6731, offset: 0x01c5223e, size: 126 bytes, params: 1, frame: 15 var environment; var key; var currentRoute; const handleNavigationChange2 = handleNavigationChange; let value = environment.__proto__; value = undefined; const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef(); if (rootNavigationRef != null) { if (rootNavigationRef.isReady()) { currentRoute = rootNavigationRef.getCurrentRoute(); key = currentRoute == null ? value : currentRoute.key; rootNavigationRef.addListener('state', handleNavigationChange2); return _fun68514; } } return value; function handleNavigationChange() { // fn#68513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6958, offset: 0x01c522bc, size: 126 bytes, params: 1, frame: 14 var key2; var currentRoute; var defaultImport; var hideActionSheet; var getUserProfileActionSheetKey; var value4; var value; const value2 = undefined; if (env0_0 == null) { key2 = value2; } else { currentRoute = env0_0.getCurrentRoute(); key2 = currentRoute == null ? value2 : currentRoute.key; } if (key2 !== key) { value = environment.__proto__.__proto__; defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */; hideActionSheet = defaultImport.hideActionSheet; value = require(8743) /* metro dependency 8743: showUserProfileActionSheet */; getUserProfileActionSheetKey = value.getUserProfileActionSheetKey; value4 = environment.__proto__; Reflect.apply(hideActionSheet, defaultImport, [Reflect.apply(getUserProfileActionSheetKey, value, [userId])]); } return value2; } function _fun68514() { // fn#68514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6903, offset: 0x01c5233a, size: 31 bytes, params: 1, frame: 13 const binding = env0_0; binding.removeListener('state', handleNavigationChange); } } function showUserProfileActionSheetWithParams() { // fn#68515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:7201, owner: UserProfileActionSheet.showUserProfileActionSheetWithParams, offset: 0x01c52359, size: 57 bytes, params: 1, frame: 14 let value = environment.__proto__; value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */; const object = {}; const analyticsLocationsBinding = analyticsLocations; object.sourceAnalyticsLocations = analyticsLocationsBinding; copyDataProperties(object, env0_28, analyticsLocationsBinding); value(object); } function handleUserSettingsClose() { // fn#68516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:7276, owner: UserProfileActionSheet.handleUserSettingsClose, offset: 0x01c52392, size: 29 bytes, params: 1, frame: 10 env0_33.goBack(); showUserProfileActionSheetWithParams(); } function _fun68517(a0) { // fn#68517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:8623, offset: 0x01c523af, size: 326 bytes, params: 2, frame: 18 var r0; const object = {user: a0}; var value; object.channel = ConstantsModule.UserSettingsSections; object.displayProfile = JsxRuntimeModule.jsxs; object.disableCalls = disableCalls; object.disableMessage = disableMessage; object.isVoiceContext = isVoiceContext; object.location = location; object.disableStatus = env0_32; object.scrollViewRef = env0_19; object.isPreviewingChanges = isPreviewingChanges; object.navigateToShop = function() { return require(dependencyMap[53]).openUserSettings({screen: UserSettingsSections.COLLECTIBLES_SHOP, onClose: handleUserSettingsClose}); }; object.navigateToPremium = function() { return require(dependencyMap[53]).openUserSettings({screen: UserSettingsSections.PREMIUM, onClose: handleUserSettingsClose}); }; object.showUserProfileActionSheet = showUserProfileActionSheetWithParams; object.initialSection = initialSection; const value3 = undefined; object.scrollPosition = PlatformUtilsModule.isIOS() ? env0_20 : value3; if (a0.isNonUserBot()) { value = importDefault(8759) /* metro dependency 8759: NonUserBotProfileContent */; value = ((Component) => )(value); r0 = value; } else if (a0.bot) { value = importDefault(8779) /* metro dependency 8779: BotUserProfileContent */; value = ((Component) => )(value); r0 = value; } else { value = importDefault(10338) /* metro dependency 10338: UserProfileContent */; value = ((Component) => )(value); r0 = value; } return r0; } } } global.__d(_fun68486, 8749, [57, 31, 27, 1379, 1945, 1878, 7624, 6816, 661, 6276, 33, 4501, 6277, 4017, 1585, 566, 8490, 6771, 6789, 7326, 3829, 8514, 8750, 8498, 8751, 8503, 8505, 8481, 8494, 8752, 1478, 5314, 8502, 4048, 3860, 697, 8746, 8753, 8061, 1932, 8491, 683, 4008, 4080, 8743, 1484, 6275, 1305, 8754, 1244, 3868, 8758, 477, 7007, 8759, 8779, 10338, 8474, 6515, 10496, 1314, 2]) /* metro module 8749, dependencies: [57, 31, 27, 1379, 1945, 1878, 7624, 6816, 661, 6276, 33, 4501, 6277, 4017, 1585, 566, 8490, 6771, 6789, 7326, 3829, 8514, 8750, 8498, 8751, 8503, 8505, 8481, 8494, 8752, 1478, 5314, 8502, 4048, 3860, 697, 8746, 8753, 8061, 1932, 8491, 683, 4008, 4080, 8743, 1484, 6275, 1305, 8754, 1244, 3868, 8758, 477, 7007, 8759, 8779, 10338, 8474, 6515, 10496, 1314, 2] */;