decord/source/modules/user_profile/native/UserProfileActionSheet.tsx

718 lines
30 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8943
// Function ID: 8944
2026-07-20 16:05:17 +00:00
// Name: UseAnimatedPosition
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 17, 1391, 1992, 1922, 8417, 5882, 676, 5504, 21, 4380, 5505, 4120, 1629, 589, 8462, 5834, 5854, 7547, 4070, 8935, 4952, 8944, 8957, 8958, 8959, 8964, 8950, 8969, 8970, 8972, 1494, 5373, 8967, 4315, 4101, 712, 8942, 8973, 8464, 1979, 8463, 698, 4235, 4347, 8930, 1500, 5503, 1297, 8974, 1236, 4108, 8978, 500, 6125, 8981, 12470, 12542, 9526, 5818, 12729, 1306, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 8943 (UseAnimatedPosition)
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import closure_7 from "ensureGuildLoaded" /* 1391 */;
2026-08-25 06:04:03 +00:00
import closure_8 from "trackCommunicationDisabled" /* 1992 */;
2026-08-24 06:08:38 +00:00
import closure_9 from "mergeGuildAvatar" /* 1922 */;
2026-08-25 06:04:03 +00:00
import closure_10 from "handleFormOpen" /* 8417 */;
import { UserProfileThemeTypes } from "ARBITRARY_LARGE_OFFSET" /* 5882 */;
2026-08-24 06:08:38 +00:00
import ME from "ME" /* 676 */;
2026-08-25 06:04:03 +00:00
import { ACTION_SHEET_MAX_WIDTH } from "ACTION_SHEET_START_HEIGHT_RATIO" /* 5504 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function UseAnimatedPosition(animatedPosition) {
animatedPosition = animatedPosition.animatedPosition;
2026-07-29 08:29:29 +00:00
let animatedPosition2;
2026-08-25 06:04:03 +00:00
animatedPosition2 = animatedPosition(5505).useBottomSheet().animatedPosition;
const obj = animatedPosition(5505);
2026-07-20 16:05:17 +00:00
const fn = function n() {
return animatedPosition2.get();
};
fn.__closure = { value: animatedPosition2 };
fn.__workletHash = 5684011437075;
fn.__initData = closure_19;
const fn2 = function o(arg0) {
return animatedPosition.set(arg0);
};
fn2.__closure = { animatedPosition };
fn2.__workletHash = 15360670503044;
fn2.__initData = closure_20;
2026-08-25 06:04:03 +00:00
const animatedReaction = animatedPosition(4120).useAnimatedReaction(fn, fn2);
2026-07-20 16:05:17 +00:00
return null;
}
function ActionSheetAlignedView(children) {
const animatedPosition = children.animatedPosition;
const animatedIndex = children.animatedIndex;
const safeAreaTop = children.safeAreaTop;
2026-07-23 10:11:24 +00:00
let obj = animatedPosition(safeAreaTop[13]);
2026-07-29 08:29:29 +00:00
const fn = function c() {
let obj = { transform: null, opacity: null };
2026-07-20 16:05:17 +00:00
obj = { translateY: animatedPosition.get() + safeAreaTop };
const items = [obj];
2026-07-29 08:29:29 +00:00
obj[0] = items;
2026-07-20 16:05:17 +00:00
const value = animatedIndex.get();
2026-07-29 08:29:29 +00:00
obj[1] = animatedPosition(safeAreaTop[13]).interpolate(value, [-1, 0], [0, 1], animatedPosition(safeAreaTop[13]).Extrapolation.CLAMP);
2026-07-20 16:05:17 +00:00
return obj;
};
2026-07-23 10:11:24 +00:00
obj = { animatedPosition, safeAreaTop, interpolate: animatedPosition(safeAreaTop[13]).interpolate, animatedIndex, Extrapolation: animatedPosition(safeAreaTop[13]).Extrapolation };
2026-07-20 16:05:17 +00:00
fn.__closure = obj;
fn.__workletHash = 16546700050596;
2026-07-29 08:29:29 +00:00
fn.__initData = closure_22;
2026-07-20 16:05:17 +00:00
const animatedStyle = obj.useAnimatedStyle(fn);
const style = [absoluteFill.absoluteFill, animatedStyle];
2026-07-29 08:29:29 +00:00
return callback(animatedIndex(safeAreaTop[13]).View, { style, pointerEvents: "box-none", children: children.children });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let c4 = importAllResult;
({ StyleSheet: c5, View: closure_6 } = get_ActivityIndicator);
({ AnalyticEvents: closure_12, EMPTY_STRING_SNOWFLAKE_ID: map1, UserSettingsSections: closure_14 } = ME);
2026-07-23 10:11:24 +00:00
({ jsx: closure_16, jsxs: closure_17 } = jsxProd);
2026-07-29 08:29:29 +00:00
let closure_18 = createCacheKey.createStyles({ container: { flex: 1 }, profileContainer: { position: "relative" }, noPadding: { paddingHorizontal: 0 }, profileEffect: { position: "absolute", top: 0, left: 0, right: 0, zIndex: 1 } });
2026-07-20 16:05:17 +00:00
let closure_19 = { code: "function UserProfileActionSheetTsx1(){const{value}=this.__closure;return value.get();}" };
let closure_20 = { code: "function UserProfileActionSheetTsx2(prepared){const{animatedPosition}=this.__closure;return animatedPosition.set(prepared);}" };
2026-07-29 08:29:29 +00:00
let closure_22 = { 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)};}" };
let closure_24 = { 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);}" };
let closure_25 = { code: "function UserProfileActionSheetTsx5(){const{scrollPosition}=this.__closure;const transform=scrollPosition.get()<=0?[{translateY:scrollPosition.get()}]:[];return{transform:transform};}" };
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function UserProfileActionSheet(userId) {
userId = userId.userId;
const channelId = userId.channelId;
2026-07-29 08:29:29 +00:00
const onClose = userId.onClose;
({ openedAt, isPreviewingChanges } = userId);
({ messageId, roleId, sessionId, disableCalls, disableMessage, isVoiceContext, location: _location } = userId);
2026-07-20 16:05:17 +00:00
if (isPreviewingChanges === undefined) {
isPreviewingChanges = false;
}
let flag = userId.showGuildProfile;
if (flag === undefined) {
flag = true;
}
let prop = userId.sourceAnalyticsLocations;
if (prop === undefined) {
prop = [];
}
2026-07-23 10:11:24 +00:00
let sharedValue;
let sharedValue1;
2026-07-20 16:05:17 +00:00
let top;
let stateFromStores;
2026-07-23 10:11:24 +00:00
let guild_id;
2026-07-20 16:05:17 +00:00
let stateFromStores2;
2026-08-24 06:08:38 +00:00
UserProfileThemeTypes = undefined;
2026-07-23 10:11:24 +00:00
let analyticsLocations;
let sharedValue2;
let first;
2026-08-24 06:08:38 +00:00
closure_15 = undefined;
2026-07-23 10:11:24 +00:00
let first1;
2026-08-24 06:08:38 +00:00
closure_17 = undefined;
2026-07-23 10:11:24 +00:00
let pendingAvatarDecoration;
2026-07-20 16:05:17 +00:00
let pendingProfileEffect;
let pendingProfileFrame;
let createUserProfileAnalyticsContext;
2026-08-24 06:08:38 +00:00
closure_22 = undefined;
2026-07-20 16:05:17 +00:00
let width;
2026-08-24 06:08:38 +00:00
closure_24 = undefined;
closure_25 = undefined;
2026-07-20 16:05:17 +00:00
function handleUserSettingsClose() {
navigation.goBack();
2026-07-29 08:29:29 +00:00
const merged = Object.assign(createUserProfileAnalyticsContext);
2026-07-31 08:44:05 +00:00
channelId(onClose[46])({ sourceAnalyticsLocations: analyticsLocations });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp = pendingAvatarDecoration();
const tmp3 = onClose;
let obj = userId(onClose[13]);
2026-07-23 10:11:24 +00:00
sharedValue = obj.useSharedValue(0);
2026-08-24 06:08:38 +00:00
obj1 = userId(onClose[13]);
2026-07-23 10:11:24 +00:00
sharedValue1 = obj1.useSharedValue(-1);
2026-07-29 08:29:29 +00:00
top = channelId(onClose[14])().top;
let obj2 = userId(onClose[15]);
let items = [guild_id];
stateFromStores = obj2.useStateFromStores(items, () => guild_id.getUser(userId));
let obj4 = userId(onClose[15]);
const items1 = [top];
2026-07-20 16:05:17 +00:00
const items2 = [channelId];
2026-07-29 08:29:29 +00:00
const stateFromStores1 = obj4.useStateFromStores(items1, () => top.getChannel(channelId), items2);
2026-07-23 10:11:24 +00:00
guild_id = undefined;
2026-07-29 08:29:29 +00:00
if (stateFromStores1 != null) {
2026-07-20 16:05:17 +00:00
guild_id = stateFromStores1.guild_id;
}
2026-07-29 08:29:29 +00:00
let tmp2Result = tmp2(tmp3[15]);
const items3 = [stateFromStores];
stateFromStores2 = tmp2Result.useStateFromStores(items3, () => {
2026-07-20 16:05:17 +00:00
let member = null;
if (null != guild_id) {
2026-07-29 08:29:29 +00:00
member = stateFromStores.getMember(tmp, userId);
2026-07-20 16:05:17 +00:00
}
return member;
});
let id;
2026-07-29 08:29:29 +00:00
let tmp6Result = tmp6(tmp3[16]);
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
id = stateFromStores.id;
}
2026-07-29 08:29:29 +00:00
if (id == null) {
id = sharedValue2;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp12;
2026-07-20 16:05:17 +00:00
if (flag) {
2026-07-29 08:29:29 +00:00
tmp12 = guild_id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const tmp6ResultResult = tmp6Result(id, tmp12);
UserProfileThemeTypes = tmp6ResultResult;
2026-07-20 16:05:17 +00:00
const items4 = [];
2026-07-29 08:29:29 +00:00
tmp6Result = tmp6(tmp3[17]);
items4[HermesBuiltin.arraySpread(prop, 0)] = channelId(tmp3[18]).USER_PROFILE_ACTION_SHEET;
analyticsLocations = tmp6Result(items4).analyticsLocations;
tmp2Result = tmp2(tmp3[19]);
const bottomSheetRef = tmp2Result.useBottomSheetRef();
2026-07-20 16:05:17 +00:00
const bottomSheetClose = bottomSheetRef.bottomSheetClose;
2026-07-29 08:29:29 +00:00
let obj7 = prop;
const ref = prop.useRef(null);
const arraySpreadResult = HermesBuiltin.arraySpread(prop, 0);
sharedValue2 = userId(tmp3[13]).useSharedValue(0);
2026-07-20 16:05:17 +00:00
const items5 = [sharedValue2];
2026-07-29 08:29:29 +00:00
const memo = prop.useMemo(() => {
2026-08-24 06:08:38 +00:00
closure_0 = sharedValue2;
2026-07-29 08:29:29 +00:00
return (arg0, arg1, arg2) => {
2026-08-24 06:08:38 +00:00
let obj = callback(closure_1_2[12]);
2026-07-29 08:29:29 +00:00
const scrollEventsHandlersDefault = obj.useScrollEventsHandlersDefault(arg0, arg1, arg2);
2026-08-24 06:08:38 +00:00
const animatedScrollableState = callback(closure_1_2[12]).useBottomSheetInternal().animatedScrollableState;
2026-07-20 16:05:17 +00:00
const handleOnScroll = scrollEventsHandlersDefault.handleOnScroll;
2026-08-24 06:08:38 +00:00
const obj2 = callback(closure_1_2[12]);
2026-07-20 16:05:17 +00:00
const fn = function s(contentOffset) {
2026-07-29 08:29:29 +00:00
if (handleOnScroll != null) {
tmp(contentOffset, arg1);
2026-07-20 16:05:17 +00:00
}
const value = animatedScrollableState.get();
let num = 0;
2026-08-24 06:08:38 +00:00
if (value !== animatedScrollableState(closure_2_2[12]).SCROLLABLE_STATE.LOCKED) {
2026-07-20 16:05:17 +00:00
num = contentOffset.contentOffset.y;
}
const result = animatedScrollableState.set(num);
};
2026-08-24 06:08:38 +00:00
obj = { defaultHandleOnScroll: handleOnScroll, scrollPosition: animatedScrollableState, animatedScrollableState, SCROLLABLE_STATE: callback(closure_1_2[12]).SCROLLABLE_STATE };
2026-07-20 16:05:17 +00:00
fn.__closure = obj;
fn.__workletHash = 13254130622789;
2026-08-24 06:08:38 +00:00
fn.__initData = closure_1_24;
2026-07-20 16:05:17 +00:00
const items = [handleOnScroll, animatedScrollableState];
obj = {};
2026-08-24 06:08:38 +00:00
const obj3 = callback(closure_1_2[13]);
2026-07-20 16:05:17 +00:00
const merged = Object.assign(scrollEventsHandlersDefault);
2026-08-24 06:08:38 +00:00
obj.handleOnScroll = callback(closure_1_2[13]).useWorkletCallback(fn, items);
2026-07-20 16:05:17 +00:00
return obj;
};
2026-07-29 08:29:29 +00:00
}, items5);
const tmp2Result1 = userId(tmp3[13]);
class V {
2026-07-20 16:05:17 +00:00
constructor() {
2026-08-24 06:08:38 +00:00
obj = closure_13;
if (closure_13.get() <= 0) {
2026-07-29 08:29:29 +00:00
obj = { translateY: null };
obj[0] = obj.get();
2026-07-20 16:05:17 +00:00
items = [];
items[0] = obj;
items1 = items;
} else {
items1 = [];
}
2026-07-29 08:29:29 +00:00
return { transform: items1 };
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
V.__closure = { scrollPosition: sharedValue2 };
V.__workletHash = 6237718973214;
V.__initData = closure_25;
const animatedStyle = userId(tmp3[13]).useAnimatedStyle(V);
const tmp21 = isPreviewingChanges(prop.useState(false), 2);
first = tmp21[0];
closure_15 = tmp21[1];
const tmp23 = isPreviewingChanges(prop.useState(0), 2);
first1 = tmp23[0];
closure_17 = tmp23[1];
const callback = prop.useCallback((nativeEvent) => {
2026-07-20 16:05:17 +00:00
callback2(Math.floor(nativeEvent.nativeEvent.layout.width));
}, []);
2026-07-29 08:29:29 +00:00
const ProfileVisibility = tmp2(tmp3[20]).ProfileVisibility;
2026-07-20 16:05:17 +00:00
const setting = ProfileVisibility.useSetting();
2026-07-29 08:29:29 +00:00
const tmp2Result2 = userId(tmp3[13]);
const items6 = [stateFromStores2];
const stateFromStoresObject = userId(tmp3[15]).useStateFromStoresObject(items6, () => stateFromStores2.getPendingChanges());
2026-07-23 10:11:24 +00:00
pendingAvatarDecoration = stateFromStoresObject.pendingAvatarDecoration;
2026-07-20 16:05:17 +00:00
pendingProfileEffect = stateFromStoresObject.pendingProfileEffect;
pendingProfileFrame = stateFromStoresObject.pendingProfileFrame;
2026-07-29 08:29:29 +00:00
const tmp2Result3 = userId(tmp3[15]);
createUserProfileAnalyticsContext = userId(tmp3[21]).useCreateUserProfileAnalyticsContext({ layout: "ACTION_SHEET", sourceSessionId: sessionId, userId, guildId: guild_id, channelId, messageId, roleId, showGuildProfile: flag });
2026-07-20 16:05:17 +00:00
if (isPreviewingChanges) {
if (undefined !== pendingProfileFrame) {
let skuId;
2026-07-29 08:29:29 +00:00
if (pendingProfileFrame != null) {
2026-07-20 16:05:17 +00:00
skuId = pendingProfileFrame.skuId;
}
}
2026-07-29 08:29:29 +00:00
const isScreenLandscape = tmp2(tmp3[22]).useIsScreenLandscape();
let tmp32;
const tmp2Result5 = tmp2(tmp3[22]);
2026-07-20 16:05:17 +00:00
if (!isScreenLandscape) {
2026-07-29 08:29:29 +00:00
tmp32 = skuId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const tmp6Result2Result = tmp6(tmp3[23])(tmp32, "UserProfileActionSheet");
2026-08-24 06:08:38 +00:00
closure_22 = tmp6Result2Result;
2026-07-29 08:29:29 +00:00
let tmp35;
const tmp6Result1 = tmp6(tmp3[23]);
2026-07-20 16:05:17 +00:00
if (!isScreenLandscape) {
2026-07-29 08:29:29 +00:00
tmp35 = skuId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { skuId: null, openedAt: null, context: null, analyticsLocations: null };
obj[0] = tmp35;
obj[1] = openedAt;
obj[2] = createUserProfileAnalyticsContext;
obj[3] = analyticsLocations;
tmp6(tmp3[24])(obj);
2026-07-31 08:44:05 +00:00
const tmp6Result2 = tmp6(tmp3[24]);
const isShopThisLookMobileEnabled = tmp2(tmp3[25]).useIsShopThisLookMobileEnabled("UserProfileActionSheet");
let tmp39;
const tmp2Result6 = tmp2(tmp3[25]);
if (flag) {
tmp39 = guild_id;
const tmp40 = guild_id;
}
tmp6(tmp3[26])(userId, tmp39, isShopThisLookMobileEnabled);
2026-07-29 08:29:29 +00:00
const items7 = [tmp6Result2Result, sharedValue, top, sharedValue1, first1];
const memo1 = obj7.useMemo(() => {
let tmp2 = null;
2026-08-24 06:08:38 +00:00
if (null != closure_22) {
2026-07-29 08:29:29 +00:00
let obj = { animatedPosition: null, safeAreaTop: null, animatedIndex: null, children: null };
obj[0] = sharedValue;
obj[1] = top;
obj[2] = sharedValue1;
obj = { frame: null, frameOrder: null, profileThemeType: null, containerWidth: null };
obj[0] = tmp;
2026-07-31 08:44:05 +00:00
obj[1] = userId(onClose[28]).ProfileFrameLayerOrder.BACK;
2026-08-24 06:08:38 +00:00
obj[2] = constants.ACTION_SHEET;
2026-07-29 08:29:29 +00:00
obj[3] = first1;
2026-07-31 08:44:05 +00:00
obj[3] = first1(channelId(onClose[27]), obj);
2026-07-29 08:29:29 +00:00
tmp2 = first1(width, obj);
2026-07-31 08:44:05 +00:00
const tmp10 = channelId(onClose[27]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
}, items7);
if (isPreviewingChanges) {
if (undefined !== pendingProfileEffect) {
let skuId1;
2026-07-29 08:29:29 +00:00
if (pendingProfileEffect != null) {
2026-07-20 16:05:17 +00:00
skuId1 = pendingProfileEffect.skuId;
}
let skuId2 = skuId1;
}
2026-07-31 08:44:05 +00:00
const tmp43Result = tmp43(skuId2);
2026-07-29 08:29:29 +00:00
obj = { user: null, displayProfile: null, pendingThemeColors: null };
obj[0] = stateFromStores;
obj[1] = tmp6ResultResult;
2026-07-20 16:05:17 +00:00
let pendingThemeColors;
if (isPreviewingChanges) {
pendingThemeColors = stateFromStoresObject.pendingThemeColors;
}
2026-07-29 08:29:29 +00:00
obj[2] = pendingThemeColors;
2026-07-31 08:44:05 +00:00
const tmp6Result4 = tmp6(tmp3[30]);
({ theme, primaryColor, secondaryColor } = tmp6(tmp3[30])(obj));
const tmp6Result5Result = tmp6(tmp3[30])(obj);
const size = tmp6(tmp3[32])();
2026-07-20 16:05:17 +00:00
width = size.width;
2026-07-31 08:44:05 +00:00
const diff = size.height - tmp2(tmp3[33]).NAV_BAR_HEIGHT_MULTILINE - top;
2026-07-29 08:29:29 +00:00
const items8 = [isPreviewingChanges, tmp6Result2Result, width];
const memo2 = obj7.useMemo(() => {
2026-07-20 16:05:17 +00:00
if (isPreviewingChanges) {
2026-08-24 06:08:38 +00:00
if (null != closure_22) {
2026-07-20 16:05:17 +00:00
const _Math = Math;
2026-07-29 08:29:29 +00:00
const bound = Math.min(width, closure_15);
2026-07-31 08:44:05 +00:00
return channelId(onClose[34])(tmp, bound).overflowTop;
2026-07-20 16:05:17 +00:00
}
}
return 0;
}, items8);
2026-07-31 08:44:05 +00:00
const tmp50 = tmp6(tmp3[31])(closure_15);
const tmp53 = tmp6(tmp3[35])();
const token = tmp2(tmp3[36]).useToken(tmp6(tmp3[37]).colors.INTERACTIVE_TEXT_HOVER, theme);
2026-07-29 08:29:29 +00:00
obj1 = { userId: null, user: null, channelId: null, guildId: null, displayProfile: null, guildMember: null };
obj1[0] = userId;
obj1[1] = stateFromStores;
obj1[2] = channelId;
obj1[3] = guild_id;
obj1[4] = tmp6ResultResult;
obj1[5] = stateFromStores2;
2026-07-31 08:44:05 +00:00
const tmp55 = tmp6(tmp3[38])(obj1);
2026-08-24 06:08:38 +00:00
closure_24 = tmp55;
2026-07-20 16:05:17 +00:00
const items9 = [stateFromStores, channelId];
2026-07-29 08:29:29 +00:00
const items10 = [stateFromStores, userId];
const memo3 = obj7.useMemo(() => {
2026-07-20 16:05:17 +00:00
let result = null != stateFromStores;
if (result) {
2026-07-31 08:44:05 +00:00
result = userId(onClose[39]).shouldDisableUserPresenceInChannel(tmp, channelId);
const obj = userId(onClose[39]);
2026-07-20 16:05:17 +00:00
}
return result;
}, items9);
2026-07-29 08:29:29 +00:00
const effect = obj7.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (null == stateFromStores) {
2026-07-31 08:44:05 +00:00
const user = userId(onClose[40]).getUser(userId);
const obj = userId(onClose[40]);
2026-07-20 16:05:17 +00:00
}
}, items10);
const items11 = [stateFromStores, guild_id, channelId];
2026-07-29 08:29:29 +00:00
const effect1 = obj7.useEffect(() => {
let obj = stateFromStores;
2026-07-20 16:05:17 +00:00
let tmp = null == stateFromStores;
if (!tmp) {
2026-07-29 08:29:29 +00:00
let isNonUserBotResult = obj.isNonUserBot();
2026-07-20 16:05:17 +00:00
if (isNonUserBotResult) {
2026-07-31 08:44:05 +00:00
isNonUserBotResult = !channelId(onClose[41])(obj.id);
2026-07-20 16:05:17 +00:00
}
tmp = isNonUserBotResult;
}
if (!tmp) {
2026-07-29 08:29:29 +00:00
obj = { type: "action_sheet", withMutualGuilds: true, withMutualFriends: true, dispatchWait: true, guildId: null, channelId: null };
obj[4] = guild_id;
const avatarURL = obj.getAvatarURL(guild_id, 80);
obj[5] = channelId;
2026-07-31 08:44:05 +00:00
channelId(onClose[42])(obj.id, avatarURL, obj);
2026-07-29 08:29:29 +00:00
const tmp10 = channelId;
2026-07-31 08:44:05 +00:00
const tmp7 = channelId(onClose[42]);
2026-07-20 16:05:17 +00:00
}
}, items11);
2026-07-31 08:44:05 +00:00
const items12 = [tmp55, tmp6ResultResult, guild_id, first, stateFromStores2];
2026-07-29 08:29:29 +00:00
const effect2 = obj7.useEffect(() => {
2026-07-20 16:05:17 +00:00
let tmp = first;
if (!first) {
2026-08-24 06:08:38 +00:00
tmp = null == closure_11;
2026-07-20 16:05:17 +00:00
}
if (!tmp) {
let tmp6 = null == guild_id;
if (!tmp6) {
2026-08-24 06:08:38 +00:00
prop = undefined;
2026-07-29 08:29:29 +00:00
if (stateFromStores2 != null) {
2026-07-20 16:05:17 +00:00
prop = stateFromStores2.fullProfileLoadedTimestamp;
}
tmp6 = null != prop;
}
if (tmp6) {
2026-08-24 06:08:38 +00:00
channelId(onClose[43]).track(analyticsLocations.OPEN_POPOUT, closure_24);
2026-07-20 16:05:17 +00:00
callback(true);
2026-07-31 08:44:05 +00:00
const obj = channelId(onClose[43]);
2026-07-20 16:05:17 +00:00
}
}
}, items12);
skuId2 = undefined;
2026-07-29 08:29:29 +00:00
if (pendingAvatarDecoration != null) {
2026-07-20 16:05:17 +00:00
skuId2 = pendingAvatarDecoration.skuId;
}
const items13 = [skuId2, , , ];
let skuId3;
2026-07-29 08:29:29 +00:00
if (pendingProfileEffect != null) {
2026-07-20 16:05:17 +00:00
skuId3 = pendingProfileEffect.skuId;
}
items13[1] = skuId3;
let skuId4;
2026-07-29 08:29:29 +00:00
if (pendingProfileFrame != null) {
2026-07-20 16:05:17 +00:00
skuId4 = pendingProfileFrame.skuId;
}
items13[2] = skuId4;
items13[3] = prop;
2026-07-29 08:29:29 +00:00
const effect3 = obj7.useEffect(() => {
if (atResult === channelId(onClose[18]).COLLECTIBLES_SHOP_PROFILE_PREVIEW) {
const obj = { type: "Collectibles Shop Details Modal Expanded", location_stack: null, sku_id: null };
obj[1] = prop;
2026-07-20 16:05:17 +00:00
let skuId;
2026-07-29 08:29:29 +00:00
if (pendingAvatarDecoration != null) {
2026-07-20 16:05:17 +00:00
skuId = pendingAvatarDecoration.skuId;
}
2026-07-29 08:29:29 +00:00
if (skuId == null) {
2026-07-20 16:05:17 +00:00
let skuId1;
2026-07-29 08:29:29 +00:00
if (pendingProfileEffect != null) {
2026-07-20 16:05:17 +00:00
skuId1 = pendingProfileEffect.skuId;
}
skuId = skuId1;
}
2026-07-29 08:29:29 +00:00
if (skuId == null) {
2026-07-20 16:05:17 +00:00
let skuId2;
2026-07-29 08:29:29 +00:00
if (pendingProfileFrame != null) {
2026-07-20 16:05:17 +00:00
skuId2 = pendingProfileFrame.skuId;
}
skuId = skuId2;
}
2026-07-29 08:29:29 +00:00
obj[2] = skuId;
2026-07-31 08:44:05 +00:00
channelId(onClose[43]).track(analyticsLocations.OPEN_MODAL, obj);
const tmp3Result = channelId(onClose[43]);
2026-07-20 16:05:17 +00:00
}
}, items13);
const items14 = [onClose];
2026-07-29 08:29:29 +00:00
const effect4 = obj7.useEffect(() => () => {
if (closure_2 != null) {
tmp();
2026-07-20 16:05:17 +00:00
}
}, items14);
const items15 = [userId];
2026-07-29 08:29:29 +00:00
const effect5 = obj7.useEffect(() => {
2026-07-20 16:05:17 +00:00
function handleNavigationChange() {
2026-08-24 06:08:38 +00:00
key = undefined;
2026-07-29 08:29:29 +00:00
if (rootNavigationRef != null) {
2026-07-20 16:05:17 +00:00
const currentRoute = rootNavigationRef.getCurrentRoute();
2026-07-29 08:29:29 +00:00
if (currentRoute != null) {
2026-07-20 16:05:17 +00:00
key = currentRoute.key;
}
}
if (key !== key) {
2026-07-31 08:44:05 +00:00
const obj2 = channelId(onClose[45]);
obj2.hideActionSheet(userId(onClose[46]).getUserProfileActionSheetKey(rootNavigationRef));
const obj3 = userId(onClose[46]);
2026-07-20 16:05:17 +00:00
}
}
2026-07-31 08:44:05 +00:00
const rootNavigationRef = userId(onClose[44]).getRootNavigationRef();
2026-07-20 16:05:17 +00:00
if (null != rootNavigationRef) {
if (rootNavigationRef.isReady()) {
2026-07-23 10:11:24 +00:00
let currentRoute = rootNavigationRef.getCurrentRoute();
2026-07-20 16:05:17 +00:00
let key;
2026-07-29 08:29:29 +00:00
if (currentRoute != null) {
2026-07-20 16:05:17 +00:00
key = currentRoute.key;
}
rootNavigationRef.addListener("state", handleNavigationChange);
return () => {
rootNavigationRef.removeListener("state", handleNavigationChange);
};
}
}
}, items15);
2026-07-31 08:44:05 +00:00
const tmp2Result7 = tmp2(tmp3[36]);
closure_25 = tmp2(tmp3[47]).useNavigation();
2026-07-20 16:05:17 +00:00
if (null == stateFromStores) {
2026-07-29 08:29:29 +00:00
obj2 = { value: null, children: null };
obj2[0] = analyticsLocations;
let obj3 = { value: null, openedAt: null, fetchStartedAt: null, fetchEndedAt: null, isLoaded: null, children: null };
obj3[0] = createUserProfileAnalyticsContext;
obj3[1] = openedAt;
let fetchStartedAt;
if (tmp6ResultResult != null) {
fetchStartedAt = tmp6ResultResult.fetchStartedAt;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj3[2] = fetchStartedAt;
let fetchEndedAt;
if (tmp6ResultResult != null) {
fetchEndedAt = tmp6ResultResult.fetchEndedAt;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj3[3] = fetchEndedAt;
let isLoaded;
if (tmp6ResultResult != null) {
isLoaded = tmp6ResultResult.isLoaded;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj3[4] = isLoaded;
obj4 = { children: null };
const obj5 = { style: null, Illustration: null, body: null };
obj5[0] = { marginTop: 42 };
2026-07-31 08:44:05 +00:00
obj5[1] = tmp2(tmp3[50]).NoResults;
const intl2 = tmp2(tmp3[51]).intl;
obj5[2] = intl2.string(tmp2(tmp3[51]).t.eAn6z2);
obj4[0] = first1(tmp2(tmp3[49]).EmptyState, obj5);
obj3[5] = first1(tmp2(tmp3[48]).BottomSheet, obj4);
2026-07-29 08:29:29 +00:00
obj2[1] = first1(tmp2(tmp3[21]).UserProfileAnalyticsProvider, obj3);
2026-07-31 08:44:05 +00:00
let tmp99Result3 = tmp95(tmp2(tmp3[17]).AnalyticsLocationProvider, obj2);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj6 = { theme: null, primaryColor: null, secondaryColor: null, children: null };
obj6[0] = theme;
obj6[1] = primaryColor;
obj6[2] = secondaryColor;
obj7 = { value: null, children: null };
obj7[0] = analyticsLocations;
2026-07-31 08:44:05 +00:00
tmp = closure_17;
2026-07-29 08:29:29 +00:00
const obj8 = { value: null, openedAt: null, fetchStartedAt: null, fetchEndedAt: null, isLoaded: null, children: null };
obj8[0] = createUserProfileAnalyticsContext;
obj8[1] = openedAt;
2026-07-20 16:05:17 +00:00
let fetchStartedAt1;
2026-07-29 08:29:29 +00:00
if (tmp6ResultResult != null) {
fetchStartedAt1 = tmp6ResultResult.fetchStartedAt;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj8[2] = fetchStartedAt1;
let fetchEndedAt1;
if (tmp6ResultResult != null) {
fetchEndedAt1 = tmp6ResultResult.fetchEndedAt;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj8[3] = fetchEndedAt1;
let isLoaded1;
if (tmp6ResultResult != null) {
isLoaded1 = tmp6ResultResult.isLoaded;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj8[4] = isLoaded1;
const obj9 = { ref: null, handleDisabled: true, scrollable: true, startExpanded: true, maxHeight: null, contentStyles: null, backdropChildren: null, animatedIndex: null, children: null };
obj9[0] = bottomSheetRef.bottomSheetRef;
obj9[4] = diff - memo2;
obj9[5] = tmp.noPadding;
obj9[6] = memo1;
obj9[7] = sharedValue1;
2026-07-31 08:44:05 +00:00
let tmp99Result = null != tmp6Result2Result;
if (tmp99Result) {
2026-07-29 08:29:29 +00:00
const obj10 = { animatedPosition: null };
obj10[0] = sharedValue;
2026-07-31 08:44:05 +00:00
tmp99Result = tmp99(createUserProfileAnalyticsContext, obj10);
2026-07-20 16:05:17 +00:00
}
2026-07-31 08:44:05 +00:00
const items16 = [tmp99Result, , , ];
2026-07-29 08:29:29 +00:00
const obj11 = { gradientHeight: null, bannerHeight: null };
obj11[0] = diff;
2026-07-31 08:44:05 +00:00
obj11[1] = tmp50;
items16[1] = first1(tmp6(tmp3[53]), obj11);
2026-07-29 08:29:29 +00:00
const obj12 = { scrollsToTop: false, style: null, contentContainerStyle: null, scrollEventsHandlersHook: null, ref: null, children: null };
obj12[1] = tmp.container;
2026-07-20 16:05:17 +00:00
let str2;
if (isPreviewingChanges) {
str2 = "none";
}
2026-07-29 08:29:29 +00:00
const obj13 = { pointerEvents: null };
obj13[0] = str2;
obj12[2] = obj13;
2026-07-31 08:44:05 +00:00
let tmp71;
if (tmp2Result9.isIOS()) {
tmp71 = memo;
2026-07-20 16:05:17 +00:00
}
2026-07-31 08:44:05 +00:00
obj12[3] = tmp71;
2026-07-29 08:29:29 +00:00
obj12[4] = ref;
const obj14 = { style: null, onLayout: null, children: null };
obj14[0] = tmp.profileContainer;
obj14[1] = callback;
const obj15 = { user: null, channel: null, displayProfile: null, disableCalls: null, disableMessage: null, isVoiceContext: null, location: null, disableStatus: null, scrollViewRef: null, isPreviewingChanges: null, navigateToShop: null, navigateToPremium: null, showUserProfileActionSheet: null, initialSection: null, scrollPosition: null };
obj15[0] = stateFromStores;
obj15[1] = stateFromStores1;
obj15[2] = tmp6ResultResult;
obj15[3] = disableCalls;
obj15[4] = disableMessage;
obj15[5] = isVoiceContext;
obj15[6] = _location;
obj15[7] = memo3;
obj15[8] = ref;
obj15[9] = isPreviewingChanges;
obj15[10] = function navigateToShop(initialTab, arg1) {
2026-07-31 08:44:05 +00:00
let obj = userId(onClose[55]);
2026-07-29 08:29:29 +00:00
obj = { screen: first.COLLECTIBLES_SHOP, onClose: handleUserSettingsClose };
return obj.openUserSettings(obj);
};
obj15[11] = function navigateToPremium(arg0) {
2026-07-31 08:44:05 +00:00
let obj = userId(onClose[55]);
2026-07-29 08:29:29 +00:00
obj = { screen: first.PREMIUM, onClose: handleUserSettingsClose };
return obj.openUserSettings(obj);
};
obj15[12] = function showUserProfileActionSheetWithParams() {
const merged = Object.assign(createUserProfileAnalyticsContext);
2026-07-31 08:44:05 +00:00
channelId(onClose[46])({ sourceAnalyticsLocations: analyticsLocations });
2026-07-29 08:29:29 +00:00
};
obj15[13] = userId.initialSection;
2026-07-31 08:44:05 +00:00
tmp2Result9 = tmp2(tmp3[54]);
let tmp73;
if (tmp2Result10.isIOS()) {
tmp73 = sharedValue2;
2026-07-29 08:29:29 +00:00
}
2026-07-31 08:44:05 +00:00
obj15[14] = tmp73;
2026-07-29 08:29:29 +00:00
if (stateFromStores.isNonUserBot()) {
const obj16 = {};
let merged = Object.assign(obj15);
2026-07-31 08:44:05 +00:00
tmp99Result = tmp99(tmp6(tmp3[56]), obj16);
const tmp6Result5 = tmp6(tmp3[56]);
2026-07-29 08:29:29 +00:00
} else if (stateFromStores.bot) {
const obj17 = {};
const merged1 = Object.assign(obj15);
2026-07-31 08:44:05 +00:00
tmp99Result = tmp99(tmp6(tmp3[57]), obj17);
const tmp6Result6 = tmp6(tmp3[57]);
2026-07-29 08:29:29 +00:00
} else {
2026-07-20 16:05:17 +00:00
const obj18 = {};
2026-07-29 08:29:29 +00:00
const merged2 = Object.assign(obj15);
2026-07-31 08:44:05 +00:00
tmp99Result = tmp99(tmp6(tmp3[58]), obj18);
const tmp6Result7 = tmp6(tmp3[58]);
2026-07-29 08:29:29 +00:00
}
2026-07-31 08:44:05 +00:00
const items17 = [tmp99Result, ];
let tmp99Result1 = null != tmp43Result;
if (tmp99Result1) {
2026-07-29 08:29:29 +00:00
const obj19 = { style: null, pointerEvents: "none", children: null };
const items18 = [tmp.profileEffect, , ];
const obj20 = { height: null };
obj20[0] = diff;
items18[1] = obj20;
2026-07-20 16:05:17 +00:00
items18[2] = animatedStyle;
2026-07-29 08:29:29 +00:00
obj19[0] = items18;
const obj21 = { skuId: null, bannerAdjustment: 0 };
2026-07-31 08:44:05 +00:00
obj21[0] = tmp43Result.skuId;
obj19[2] = tmp99(tmp6(tmp3[59]), obj21);
tmp99Result1 = tmp99(tmp6(tmp3[13]).View, obj19);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj22 = { children: null };
2026-07-31 08:44:05 +00:00
items17[1] = tmp99Result1;
2026-07-29 08:29:29 +00:00
obj14[2] = items17;
2026-07-31 08:44:05 +00:00
obj22[0] = tmp(sharedValue1, obj14);
2026-07-29 08:29:29 +00:00
obj12[5] = first1(sharedValue1, obj22);
items16[2] = first1(tmp2(tmp3[12]).BottomSheetScrollView, obj12);
2026-07-31 08:44:05 +00:00
let tmp99Result2 = null == tmp6Result2Result;
if (tmp99Result2) {
2026-07-29 08:29:29 +00:00
const obj23 = { variant: "floating", tabStyle: null, onPress: null };
const obj24 = { backgroundColor: null };
obj24[0] = token;
obj23[1] = obj24;
obj23[2] = bottomSheetClose;
2026-07-31 08:44:05 +00:00
tmp99Result2 = tmp99(tmp2(tmp3[60]).ActionSheetHeaderBar, obj23);
2026-07-20 16:05:17 +00:00
}
2026-07-31 08:44:05 +00:00
items16[3] = tmp99Result2;
2026-07-29 08:29:29 +00:00
obj9[8] = items16;
2026-07-31 08:44:05 +00:00
const items19 = [tmp(tmp2(tmp3[48]).BottomSheet, obj9), , ];
let tmpResult = null != tmp6Result2Result;
if (tmpResult) {
2026-07-29 08:29:29 +00:00
const obj25 = { animatedPosition: null, safeAreaTop: null, animatedIndex: null, children: null };
obj25[0] = sharedValue;
obj25[1] = top;
obj25[2] = sharedValue1;
const obj26 = { frame: null, profileThemeType: null, frameOrder: null, containerWidth: null };
obj26[0] = tmp6Result2Result;
obj26[1] = UserProfileThemeTypes.ACTION_SHEET;
2026-07-31 08:44:05 +00:00
obj26[2] = tmp2(tmp3[28]).ProfileFrameLayerOrder.FRONT;
2026-07-29 08:29:29 +00:00
obj26[3] = first1;
2026-07-31 08:44:05 +00:00
const items20 = [tmp99(tmp6(tmp3[27]), obj26), ];
2026-07-29 08:29:29 +00:00
const obj27 = { variant: "floating", tabStyle: null, onPress: null };
const obj28 = { backgroundColor: null };
obj28[0] = token;
obj27[1] = obj28;
obj27[2] = bottomSheetClose;
2026-07-31 08:44:05 +00:00
items20[1] = tmp99(tmp2(tmp3[60]).ActionSheetHeaderBar, obj27);
2026-07-29 08:29:29 +00:00
obj25[3] = items20;
2026-07-31 08:44:05 +00:00
tmpResult = tmp(width, obj25);
const tmp6Result8 = tmp6(tmp3[27]);
2026-07-20 16:05:17 +00:00
}
2026-07-31 08:44:05 +00:00
items19[1] = tmpResult;
2026-07-20 16:05:17 +00:00
if (!isPreviewingChanges) {
items19[2] = isPreviewingChanges;
2026-07-29 08:29:29 +00:00
obj8[5] = items19;
2026-07-31 08:44:05 +00:00
obj7[1] = tmp(tmp2(tmp3[21]).UserProfileAnalyticsProvider, obj8);
obj6[3] = tmp99(tmp2(tmp3[17]).AnalyticsLocationProvider, obj7);
tmp99Result3 = tmp99(tmp2(tmp3[52]).ThemeContextProvider, obj6);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj29 = { theme: null, primaryColor: null, secondaryColor: null, children: null };
2026-07-31 08:44:05 +00:00
obj29[0] = tmp53;
const intl = tmp2(tmp3[51]).intl;
if (setting === tmp2(tmp3[62]).ProfileVisibility.FRIENDS_ONLY) {
wSnI_0 = tmp2(tmp3[51]).t.mNZcD8;
2026-07-20 16:05:17 +00:00
} else {
2026-07-31 08:44:05 +00:00
wSnI_0 = tmp2(tmp3[51]).t["wSnI/0"];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj30 = { text: null, isExpanded: true };
obj30[0] = intl.string(wSnI_0);
2026-07-31 08:44:05 +00:00
obj29[3] = tmp99(tmp2(tmp3[61]).ActionSheetBackdropToast, obj30);
tmp99(tmp2(tmp3[52]).ThemeContextProvider, obj29);
2026-07-20 16:05:17 +00:00
}
2026-07-31 08:44:05 +00:00
tmp2Result10 = tmp2(tmp3[54]);
2026-07-20 16:05:17 +00:00
}
2026-07-31 08:44:05 +00:00
return tmp99Result3;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp6ResultResult != null) {
const profileEffect = tmp6ResultResult.profileEffect;
if (profileEffect != null) {
2026-07-20 16:05:17 +00:00
skuId2 = profileEffect.skuId;
}
}
2026-07-31 08:44:05 +00:00
const tmp6Result3 = tmp6(tmp3[26]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp6ResultResult != null) {
const profileFrame = tmp6ResultResult.profileFrame;
if (profileFrame != null) {
2026-07-20 16:05:17 +00:00
skuId = profileFrame.skuId;
}
}
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;