Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,125 @@
|
||||
/* Metro module 10496; source: modules/user_profile/native/ActionSheetBackdropToast.tsx; dependencies: [31, 27, 6276, 33, 477, 4501, 697, 1585, 1478, 5314, 4017, 4504, 4573, 2] */
|
||||
function _fun81195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:6, offset: 0x01e9db22, size: 384 bytes, params: 8, frame: 22
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_5 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_START_HEIGHT_RATIO;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['flex'] = 1;
|
||||
object5['alignItems'] = 'center';
|
||||
object5['justifyContent'] = 'center';
|
||||
object4.container = object5;
|
||||
const object6 = {'position': 'absolute', 'bottom': 16, 'backgroundColor': null, 'borderRadius': null,
|
||||
'paddingTop': 6, 'paddingBottom': 8, 'paddingHorizontal': 16};
|
||||
const MOBILE_TOAST_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TOAST_BACKGROUND_DEFAULT;
|
||||
object6.backgroundColor = MOBILE_TOAST_BACKGROUND_DEFAULT;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.toast = object6;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object4]);
|
||||
object4 = {code: 'function ActionSheetBackdropToastTsx1(){const{isInIOS,isExpanded,maxDynamicContentSize,TOAST_BOTTOM_MARGIN,nonExpandedHeight,ACTION_SHEET_START_HEIGHT_RATIO,TOAST_BOTTOM_GAP,positionDelta,TOAST_ANIMATION_Y_DELTA,opacity}=this.__closure;return{bottom:(isInIOS?isExpanded?maxDynamicContentSize+TOAST_BOTTOM_MARGIN:nonExpandedHeight+TOAST_BOTTOM_MARGIN:isExpanded?maxDynamicContentSize+TOAST_BOTTOM_MARGIN:ACTION_SHEET_START_HEIGHT_RATIO*maxDynamicContentSize+TOAST_BOTTOM_GAP)+ +(1-positionDelta.get())*TOAST_ANIMATION_Y_DELTA,opacity:opacity.get()};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/ActionSheetBackdropToast.tsx');
|
||||
exports.ActionSheetBackdropToast = ActionSheetBackdropToast;
|
||||
}
|
||||
|
||||
function ActionSheetBackdropToast({text, isExpanded}) { // fn#81196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1190, offset: 0x01e9dca2, size: 488 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
|
||||
const value2 = height * ACTION_SHEET_START_HEIGHT_RATIO;
|
||||
const NAV_BAR_HEIGHT_MULTILINE = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT_MULTILINE;
|
||||
const value3 = height - NAV_BAR_HEIGHT_MULTILINE - top;
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const env0_3 = value4;
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
env0_3.useEffect(_fun81197, [value4, value5]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = ActionSheetBackdropToastX;
|
||||
closure.__closure = {isInIOS: env0_7, isExpanded: isExpanded, maxDynamicContentSize: value3,
|
||||
TOAST_BOTTOM_MARGIN: 24, nonExpandedHeight: value2,
|
||||
ACTION_SHEET_START_HEIGHT_RATIO: ACTION_SHEET_START_HEIGHT_RATIO, TOAST_BOTTOM_GAP: 46, positionDelta: value4,
|
||||
TOAST_ANIMATION_Y_DELTA: 15, opacity: value5};
|
||||
closure.__workletHash = 9630436597435;
|
||||
closure.__initData = env0_9;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const items3 = [styles.container];
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.toast, value6];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={items3} pointerEvents="none">
|
||||
<View2 style={items2}>
|
||||
<Text variant="text-sm/medium" color="mobile-text-heading-primary">
|
||||
{text}
|
||||
</Text>
|
||||
</View2>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81197() { // fn#81197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1377, offset: 0x01e9de8a, size: 253 bytes, params: 1, frame: 25
|
||||
let binding = env0_3;
|
||||
let set = binding.set;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = reanimatedRexportModule.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
let object2 = {duration: 200};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Easing.in(Easing2.ease);
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, reanimatedRexportModule, [100, Reflect.apply(withTiming,
|
||||
timingModule, [1, object2])])]);
|
||||
binding = env0_4;
|
||||
set = binding.set;
|
||||
const value = timingModule;
|
||||
withTiming = value.withTiming;
|
||||
object2 = {duration: 300};
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Easing.in(Easing3.linear);
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, object2])]);
|
||||
return _fun81198;
|
||||
}
|
||||
|
||||
function ActionSheetBackdropToastX() { // fn#81199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1794, owner: ActionSheetBackdropToast.x, offset: 0x01e9e036, size: 140 bytes, params: 1, frame: 13
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_7;
|
||||
const isExpandedBinding = isExpanded;
|
||||
object2.bottom = (binding ? isExpandedBinding ? env0_2 + 24 : env0_1 + 24 : isExpandedBinding ? env0_2 + 24 : ACTION_SHEET_START_HEIGHT_RATIO * env0_2 + 46) + 15 * (1 - env0_3.get());
|
||||
object2.opacity = env0_4.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun81198() { // fn#81198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1594, offset: 0x01e9df87, size: 175 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
let binding = env1_3;
|
||||
let set = binding.set;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = reanimatedRexportModule.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, reanimatedRexportModule, [200, Reflect.apply(withTiming,
|
||||
timingModule, [0])])]);
|
||||
binding = env1_4;
|
||||
set = binding.set;
|
||||
value = timingModule;
|
||||
withTiming = value.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, {duration: 200, easing: Reflect.apply(out, Easing,
|
||||
[Easing2.exp])}])]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/* Metro module 10483; source: modules/user_profile/native/AddFriendNicknameModal.tsx; dependencies: [5, 57, 31, 27, 3793, 1878, 33, 4501, 697, 566, 1244, 5080, 8783, 5467, 4596, 4573, 6985, 3995, 2] */
|
||||
function _fun81114(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10669:6, offset: 0x01e9a4d2, size: 343 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_SCRIM = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'backgroundColor': null,
|
||||
'justifyContent': 'center', 'alignItems': 'center', backgroundColor: BACKGROUND_SCRIM},
|
||||
title: {textAlign: 'center'}, description: {'marginTop': 8, 'marginBottom': 16, 'textAlign': 'center',
|
||||
'lineHeight': 18}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/AddFriendNicknameModal.tsx');
|
||||
exports.default = AddFriendNicknameModal;
|
||||
}
|
||||
|
||||
function AddFriendNicknameModal({userId, showUserProfile}) { // fn#81115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10669:526, offset: 0x01e9a629, size: 855 bytes, params: 2, frame: 32
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const binding = undefined;
|
||||
const [env0_2, env0_3] = env0_4(binding.useState(false), 2);
|
||||
const nickname = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore],
|
||||
function() {
|
||||
return RelationshipStore.getNickname(userId);
|
||||
});
|
||||
env0_4 = binding.useRef(nickname ?? null);
|
||||
const value5 = undefined.useCallback(_fun81117, []);
|
||||
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getUser(userId);
|
||||
});
|
||||
const r20 = nickname == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BGYkaH) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8pOYUE']);
|
||||
const value8 = undefined.useCallback(_fun81119, [showUserProfile]);
|
||||
const value9 = _fun81120();
|
||||
const KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
const alertProps = {confirmText: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']),
|
||||
onConfirm: value9,
|
||||
cancelText: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']), onCancel: value8};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<Text style={styles.title} accessibilityRole="header" variant="heading-lg/extrabold" color="mobile-text-heading-primary">{r20}</Text>];
|
||||
items2[1] = <Text style={styles.description} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NdQ+lP'])}</Text>;
|
||||
const TextField = (require(6985) /* metro dependency 6985: TextFieldNative */).TextField;
|
||||
items2[2] = <TextField onChange={value5} autoFocus placeholder={(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user)} defaultValue={nickname} maxLength={32} isClearable />;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<KeyboardAwareView>
|
||||
<Alert {...alertProps}>
|
||||
{items2}
|
||||
</Alert>
|
||||
</KeyboardAwareView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81119() { // fn#81119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10669:924, offset: 0x01e9a9af, size: 58 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
if (showUserProfile != null) {
|
||||
showUserProfile();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun81120() { // fn#81120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10669:966, offset: 0x01e9a9e9, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun81122);
|
||||
return _fun81123;
|
||||
}
|
||||
|
||||
function* _fun81122() { // fn#81122, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10669:986, offset: 0x01e9aa18, size: 171 bytes, params: 1, frame: 18
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var updateRelationship;
|
||||
var current;
|
||||
var value5;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
if (!dependencyMap) {
|
||||
env2_3(true);
|
||||
try {
|
||||
binding = env3_1;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
binding2 = env3_2;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
property = binding2[12];
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
updateRelationship = value4.updateRelationship;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
current = binding.current;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value5 = current != null;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value7 = Reflect.apply(updateRelationship, value4, [require, value5 ? current : '']);
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
yield value7;
|
||||
try {
|
||||
value8 = undefined;
|
||||
value9 = false;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
if (value9) {
|
||||
env2_3(false);
|
||||
return value8;
|
||||
}
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
binding();
|
||||
} catch (error) {
|
||||
env2_3(false);
|
||||
throw error;
|
||||
}
|
||||
env2_3(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
/* Metro module 8868; source: modules/user_profile/native/AddOrOpenAppButton.tsx; dependencies: [5, 57, 31, 7861, 661, 1483, 33, 8869, 8870, 4080, 6797, 8809, 3856, 1471, 6249, 10083, 1244, 4578, 697, 6772, 4603, 4015, 1583, 683, 2] */
|
||||
function _fun69132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:6, offset: 0x01c6a3d0, size: 262 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */).getSection;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_8 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/AddOrOpenAppButton.tsx');
|
||||
exports.default = AddOrOpenAppButton;
|
||||
}
|
||||
|
||||
function AddAppButton({application, guildId}) { // fn#69133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:217, offset: 0x01c6a4d6, size: 451 bytes, params: 2, frame: 24
|
||||
var r6;
|
||||
var defaultImport;
|
||||
const binding = env0_5;
|
||||
const useCallback = binding.useCallback;
|
||||
let customInstallUrl = application.customInstallUrl;
|
||||
const value2 = Reflect.apply(useCallback, binding, [_fun69134, [customInstallUrl, application.id,
|
||||
application.installParams, application.integrationTypesConfig, guildId]]);
|
||||
const value3 = env0_5.useCallback(_fun69135, [application]);
|
||||
customInstallUrl = application.customInstallUrl;
|
||||
if (customInstallUrl == null) {
|
||||
r6 = (require(10083) /* metro dependency 10083: PlusSmallIcon */).PlusSmallIcon;
|
||||
} else {
|
||||
defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
||||
r6 = defaultImport.isDiscordUrl(customInstallUrl) ? (require(10083) /* metro dependency 10083: PlusSmallIcon */).PlusSmallIcon : (require(6249) /* metro dependency 6249: LinkExternalSmallIcon */).LinkExternalSmallIcon;
|
||||
}
|
||||
const value4 = env0_5.useMemo(function() {
|
||||
var object = {name: 'longpress'};
|
||||
object.label = require(dependencyMap[16]).intl.string(require(dependencyMap[16]).t.XWDihq);
|
||||
return [object];
|
||||
}, []);
|
||||
const value5 = env0_5.useCallback(_fun69137, [application]);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const NgXl3C = (require(1244) /* metro dependency 1244: indexNative */).t.NgXl3C;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
return (
|
||||
<Button
|
||||
text={Reflect.apply(string, intl, [NgXl3C])}
|
||||
onPress={value2}
|
||||
onLongPress={value3}
|
||||
accessibilityActions={value4}
|
||||
onAccessibilityAction={value5}
|
||||
icon={((Component) => <Component size="sm" color={WHITE} />)(r6)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function OpenAppButton({profileApplication, botUserId, channel}) { // fn#69138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:1219, offset: 0x01c6a839, size: 238 bytes, params: 2, frame: 20
|
||||
const [property, env0_3] = env0_4(env0_5.useState(false), 2);
|
||||
const value5 = env0_5.useCallback(env0_3(_fun69140), [botUserId, channel, profileApplication.id]);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Cia+A8'])}
|
||||
loading={property}
|
||||
onPress={value5}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function AddOrOpenAppButton({application, botUserId, channel, guildId}) { // fn#69142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:2217, offset: 0x01c6ab49, size: 121 bytes, params: 2, frame: 19
|
||||
return (importDefault(8869) /* metro dependency 8869: useIsAppDM */)(channel) && channel != null ? <OpenAppButton profileApplication={application} botUserId={botUserId} channel={channel} /> : <AddAppButton application={application} guildId={guildId} />;
|
||||
}
|
||||
|
||||
function _fun69134() { // fn#69134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:287, offset: 0x01c6a699, size: 123 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const applicationUtilsModule = require(8870) /* metro dependency 8870: ApplicationUtils */;
|
||||
const installApplication = applicationUtilsModule.installApplication;
|
||||
const applicationBinding = application;
|
||||
Reflect.apply(installApplication, applicationUtilsModule, [{applicationId: applicationBinding.id,
|
||||
customInstallUrl: applicationBinding.customInstallUrl, installParams: applicationBinding.installParams,
|
||||
integrationTypesConfig: applicationBinding.integrationTypesConfig, guildId: guildId}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun69135() { // fn#69135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:580, offset: 0x01c6a714, size: 90 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
const copy = value.copy;
|
||||
const getApplicationInstallURLModule = require(8809) /* metro dependency 8809: getApplicationInstallURL */;
|
||||
const getApplicationInstallURL = getApplicationInstallURLModule.getApplicationInstallURL;
|
||||
Reflect.apply(copy, value, [Reflect.apply(getApplicationInstallURL, getApplicationInstallURLModule, [application])]);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
|
||||
}
|
||||
|
||||
function _fun69137({nativeEvent}) { // fn#69137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:891, offset: 0x01c6a7c4, size: 117 bytes, params: 2, frame: 16
|
||||
var value;
|
||||
var copy;
|
||||
var moduleValue;
|
||||
if (nativeEvent.actionName === 'longPress') {
|
||||
value = environment.__proto__;
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
copy = value.copy;
|
||||
moduleValue = require(8809) /* metro dependency 8809: getApplicationInstallURL */;
|
||||
Reflect.apply(copy, value, [moduleValue.getApplicationInstallURL(application)]);
|
||||
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
||||
value.presentLinkCopied();
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun69140() { // fn#69140, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:1351, offset: 0x01c6a932, size: 367 bytes, params: 1, frame: 20
|
||||
var r7;
|
||||
var binding2;
|
||||
var value10;
|
||||
var value13;
|
||||
var track;
|
||||
var APP_PROFILE_OPEN_APP_BUTTON_CLICKED;
|
||||
let value = undefined;
|
||||
if (true) {
|
||||
value = undefined;
|
||||
var binding = env2_6;
|
||||
var id = require.id;
|
||||
var value5 = binding({type: 'channel', channel: dependencyMap}, id);
|
||||
var descriptor = value5.descriptor;
|
||||
var application = descriptor == null ? value : descriptor.application;
|
||||
if (application == null) {
|
||||
env1_3(true);
|
||||
}
|
||||
descriptor = value5.descriptor;
|
||||
application = descriptor == null ? value : descriptor.application;
|
||||
if (application != null) {
|
||||
r7 = application;
|
||||
env1_3(false);
|
||||
if (value5 == null) {
|
||||
return value;
|
||||
}
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
binding(binding2[9]).hideActionSheet();
|
||||
value10 = binding(binding2[20]);
|
||||
yield value10.openPrivateChannel({recipientIds: importDefault});
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
global.setTimeout(_fun69141, 0);
|
||||
binding = env2_1;
|
||||
value13 = binding(env2_2[23]);
|
||||
value13.track(env2_7.APP_PROFILE_OPEN_APP_BUTTON_CLICKED, {application_id: r7.id});
|
||||
return value;
|
||||
}
|
||||
binding = env2_1;
|
||||
var value6 = binding(env2_2[19]);
|
||||
var fetchApplication = value6.fetchApplication;
|
||||
id = require.id;
|
||||
yield Reflect.apply(fetchApplication, value6, [id]);
|
||||
var value7 = undefined;
|
||||
if (false) {
|
||||
return value7;
|
||||
}
|
||||
r7 = value7;
|
||||
env1_3(false);
|
||||
if (value5 == null) {
|
||||
return value;
|
||||
}
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
binding(binding2[9]).hideActionSheet();
|
||||
value10 = binding(binding2[20]);
|
||||
yield value10.openPrivateChannel({recipientIds: importDefault});
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
global.setTimeout(_fun69141, 0);
|
||||
binding = env2_1;
|
||||
value13 = binding(env2_2[23]);
|
||||
track = value13.track;
|
||||
APP_PROFILE_OPEN_APP_BUTTON_CLICKED = env2_7.APP_PROFILE_OPEN_APP_BUTTON_CLICKED;
|
||||
id = r7.id;
|
||||
Reflect.apply(track, value13, [APP_PROFILE_OPEN_APP_BUTTON_CLICKED, {application_id: id}]);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun69141() { // fn#69141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9053:1675, offset: 0x01c6aaa1, size: 168 bytes, params: 1, frame: 16
|
||||
var openCustomKeyboard;
|
||||
var object2;
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const bestActiveInput = env3_0(env3_2[21]).getBestActiveInput();
|
||||
if (bestActiveInput != null) {
|
||||
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
|
||||
object2 = {};
|
||||
object2.type = env3_0(env3_2[22]).KeyboardTypes.APP_LAUNCHER;
|
||||
object2.context = {initialRouteName: env3_8.APPLICATION_VIEW, initiallyExpanded: true, application: env0_1,
|
||||
installOnDemand: !env0_0.isGuildInstalled && !env0_0.isUserInstalled};
|
||||
Reflect.apply(openCustomKeyboard, bestActiveInput, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* Metro module 10349; source: modules/user_profile/native/ApplicationIconAndName.tsx; dependencies: [33, 4501, 697, 1305, 4573, 2] */
|
||||
function _fun80208(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10535:6, offset: 0x01e714c1, size: 175 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.Fragment;
|
||||
const env0_5 = value.jsxs;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
|
||||
var object2 = {width: a0, height: a0, marginTop: -1, marginRight: 4};
|
||||
object2.borderRadius = importDefault(dependencyMap[2]).radii.xs;
|
||||
return {gameIcon: object2};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/ApplicationIconAndName.tsx');
|
||||
exports.default = ApplicationIconAndName;
|
||||
}
|
||||
|
||||
function ApplicationIconAndName({application, textVariant, iconSize, useComma}) { // fn#80210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10535:352, offset: 0x01e715c0, size: 269 bytes, params: 2, frame: 26
|
||||
useComma = !(useComma === undefined) && useComma;
|
||||
const styles = useStyles(iconSize);
|
||||
const jsxRuntimeEnv0_4Binding = jsxRuntimeEnv0_4;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconURL = application.getIconURL(iconSize);
|
||||
const value3 = '';
|
||||
const icon = <Icon style={styles.gameIcon} resizeMode="contain" source={{uri: iconURL ?? value3}} disableColor key={application.id} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<>
|
||||
{icon}
|
||||
<Text variant={textVariant}>
|
||||
{value3 + application.name + (useComma ? ', ' : value3)}
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
/* Metro module 8779; source: modules/user_profile/native/BotUserProfileContent.tsx; dependencies: [31, 27, 1878, 6816, 6276, 33, 8496, 8752, 8760, 1585, 8514, 566, 4617, 3995, 6902, 8501, 8693, 8494, 8497, 6797, 3856, 8761, 8780, 4017, 8510, 8513, 4080, 8692, 1962, 8695, 1244, 8817, 8867, 8063, 8868, 4578, 6682, 697, 5080, 4603, 10210, 8762, 6792, 10288, 10327, 2] */
|
||||
function _fun68635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8964:6, offset: 0x01c56adb, size: 262 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_6 = constantsModule.PROFILE_CONTENT_BOTTOM_PADDING;
|
||||
const env0_7 = constantsModule.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
||||
const env0_8 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value3.jsx;
|
||||
const env0_10 = value3.jsxs;
|
||||
const env0_11 = value3.Fragment;
|
||||
value = value.memo(BotUserProfileContent);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/BotUserProfileContent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function BotUserProfileContent({user, channel, displayProfile, showUserProfileActionSheet, disableMessage, scrollPosition}) { // fn#68636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8964:310, offset: 0x01c56be1, size: 2097 bytes, params: 2, frame: 53
|
||||
var r33;
|
||||
var r19;
|
||||
var r18;
|
||||
var moduleValue5;
|
||||
var AddOrOpenAppButton;
|
||||
var jsxRuntimeEnv0_11Binding2;
|
||||
var UserProfileRolesCard;
|
||||
var items8;
|
||||
var UserProfileModeratorActions;
|
||||
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value4 = (importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)(ACTION_SHEET_MAX_WIDTH);
|
||||
const {bannerAnimatedStyle, bannerImageAnimatedStyle, contentAnimatedStyle, blurAnimatedProps,
|
||||
showBlur} = (importDefault(8760) /* metro dependency 8760: useUserProfileOverscrollStyles */)({scrollPosition: scrollPosition,
|
||||
bannerHeight: value4});
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_2 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const defaultImport3 = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
|
||||
const useName = defaultImport3.useName;
|
||||
const guildId = displayProfile?.guildId;
|
||||
let id = channel?.id;
|
||||
const value6 = Reflect.apply(useName, defaultImport3, [guildId, id, user]);
|
||||
const env0_3 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
|
||||
const application = displayProfile?.application;
|
||||
const guild_id = channel?.guild_id;
|
||||
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers(env0_3.useMemo(function() {
|
||||
return guild_id == null ? {} : user != null ? {[guild_id]: [user.id]} : {};
|
||||
}, [guild_id, user]), 'BotUserProfileContent');
|
||||
const value8 = (importDefault(8501) /* metro dependency 8501: useBadges */)(displayProfile);
|
||||
const value9 = (importDefault(8693) /* metro dependency 8693: useCustomStatusActivityForUser */)(user.id);
|
||||
const {theme, primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
|
||||
displayProfile: displayProfile});
|
||||
const {containerBackground, avatarBackground,
|
||||
statusBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
if (user == null) {
|
||||
return null;
|
||||
}
|
||||
if (currentUser == null) {
|
||||
return null;
|
||||
}
|
||||
const closure = onPressDisplayName;
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const value12 = ((Component) => <Component user={user} displayProfile={displayProfile} bannerHeight={value4} bannerAnimatedStyle={bannerAnimatedStyle} bannerImageAnimatedStyle={bannerImageAnimatedStyle} blurAnimatedProps={blurAnimatedProps} showBlur={showBlur} buttons={<View style={value3.bannerButtons}>{((Component) => <Component user={user} application={application} channel={channel} />)(importDefault(8780) /* metro dependency 8780: BotUserProfileOverflowMenu */)}</View>} />)(importDefault(8761) /* metro dependency 8761: UserProfileOverscrollBanner */);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const value13 = ((Component) => <Component user={user} guildId={displayProfile?.guildId ?? undefined} backgroundColor={avatarBackground} statusStyle={{backgroundColor: statusBackground}} />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
|
||||
const items3 = [value3.profileContentWrapper];
|
||||
items3[1] = value3.profileContent;
|
||||
const PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING2 = value9 != null ? 0 : PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
||||
items3[2] = {paddingTop: PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING2,
|
||||
paddingBottom: bottom + PROFILE_CONTENT_BOTTOM_PADDING};
|
||||
const items4 = [((Component) => <Component customStatusActivity={value9} hasCustomProfileTheme={primaryColor != null} onPressTruncatedStatus={onPressTruncatedStatus} style={value3.customStatusBubble} emojiOnlyStyle={value3.emojiOnlyCustomStatusBubble} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */)];
|
||||
const primaryInfo = value3.primaryInfo;
|
||||
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
||||
const pronouns = displayProfile?.pronouns;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const items5 = [<UserProfilePrimaryInfo user={user} guildId={guild_id} displayName={value6} pronouns={pronouns} badges={value8} badgeContainerBackground={containerBackground} displayNameAccessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy)} onPressDisplayName={closure} onPressUserTag={closure} onPressPronouns={onPressPronouns} showBadgeToastOnPress />];
|
||||
items5[1] = ((Component) => <Component user={user} />)(importDefault(8817) /* metro dependency 8817: UserProfileMutualGuilds */);
|
||||
const UserProfileTextButtonGroup = importDefault(8867) /* metro dependency 8867: UserProfileTextButtonGroup */;
|
||||
const primaryButtons = value3.primaryButtons;
|
||||
if (application != null) {
|
||||
moduleValue5 = require(8063) /* metro dependency 8063: ApplicationInstallUtils */;
|
||||
if (moduleValue5.canInstallApplication(application)) {
|
||||
AddOrOpenAppButton = importDefault(8868) /* metro dependency 8868: AddOrOpenAppButton */;
|
||||
var defaultImport14Props = {application: application, botUserId: user.id};
|
||||
r33 = channel ?? undefined;
|
||||
defaultImport14Props.channel = r33;
|
||||
r33 = guild_id ?? undefined;
|
||||
defaultImport14Props.guildId = r33;
|
||||
r19 = <AddOrOpenAppButton {...defaultImport14Props} />;
|
||||
} else {
|
||||
r19 = undefined;
|
||||
}
|
||||
} else {
|
||||
r19 = undefined;
|
||||
}
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const object = {};
|
||||
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
|
||||
const CONTROL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
|
||||
object.icon = <ChatIcon size="sm" color={CONTROL_SECONDARY_TEXT_DEFAULT} />;
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zROXEV);
|
||||
object.variant = 'secondary';
|
||||
object.disabled = disableMessage;
|
||||
object.grow = true;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const zFfSFQ = (require(1244) /* metro dependency 1244: indexNative */).t.zFfSFQ;
|
||||
const object2 = {};
|
||||
object2.name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
|
||||
object.accessibilityHint = Reflect.apply(formatToPlainString, intl, [zFfSFQ, object2]);
|
||||
object.onPress = function() {
|
||||
trackUserProfileAction({action: 'SEND_MESSAGE'});
|
||||
importDefault(dependencyMap[26]).hideActionSheet();
|
||||
importDefault(dependencyMap[38]).popAll();
|
||||
importDefault(dependencyMap[39]).openPrivateChannel({recipientIds: user.id});
|
||||
};
|
||||
items5[2] = <UserProfileTextButtonGroup style={primaryButtons} maxWidth={ACTION_SHEET_MAX_WIDTH} primaryButton={r19} secondaryButton={<Button {...object} />} />;
|
||||
items4[1] = <View style={primaryInfo}>{items5}</View>;
|
||||
const items6 = [value3.card];
|
||||
items6[1] = {backgroundColor: containerBackground};
|
||||
const cards = value3.cards;
|
||||
const items7 = [((Component) => <Component user={user} currentUser={currentUser} guildId={guild_id} style={items6} />)(importDefault(10210) /* metro dependency 10210: UserProfileActivity */)];
|
||||
items7[1] = ((Component) => <Component userId={user.id} displayProfile={displayProfile} channel={channel} style={items6} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
|
||||
const value19 = guild_id != null;
|
||||
if (value19) {
|
||||
jsxRuntimeEnv0_11Binding2 = jsxRuntimeEnv0_11;
|
||||
UserProfileRolesCard = importDefault(6792) /* metro dependency 6792: UserProfileRolesCard */;
|
||||
id = user.id;
|
||||
items8 = [<UserProfileRolesCard userId={id} guildId={guild_id} style={items6} />];
|
||||
UserProfileModeratorActions = importDefault(10288) /* metro dependency 10288: UserProfileModeratorActions */;
|
||||
id = channel?.id;
|
||||
items8[1] = <UserProfileModeratorActions user={user} currentUser={currentUser} guildId={guild_id} channelId={id} showUserProfile={showUserProfileActionSheet} style={items6} />;
|
||||
r18 = <>{items8}</>;
|
||||
} else {
|
||||
r18 = value19;
|
||||
}
|
||||
items7[2] = r18;
|
||||
items7[3] = ((Component) => <Component userId={user.id} style={items6} onBack={showUserProfileActionSheet} />)(importDefault(10327) /* metro dependency 10327: UserProfileNote */);
|
||||
items4[2] = <View style={cards}>{items7}</View>;
|
||||
return (
|
||||
<>
|
||||
{value12}
|
||||
<View2 style={contentAnimatedStyle}>
|
||||
{value13}
|
||||
<View style={items3}>
|
||||
{items4}
|
||||
</View>
|
||||
</View2>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function BotUserProfileContentOnPressDisplayName() { // fn#68639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8964:1363, owner: BotUserProfileContent.onPressDisplayName, offset: 0x01c5744c, size: 88 bytes, params: 1, frame: 14
|
||||
trackUserProfileAction({action: 'COPY_USERNAME'});
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_3);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
|
||||
}
|
||||
|
||||
function BotUserProfileContentOnPressPronouns() { // fn#68640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8964:1467, owner: BotUserProfileContent.onPressPronouns, offset: 0x01c574a4, size: 61 bytes, params: 1, frame: 12
|
||||
trackUserProfileAction({action: 'PRESS_PRONOUNS'});
|
||||
const value = environment.__proto__;
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUserPronouns();
|
||||
}
|
||||
|
||||
function onPressTruncatedStatus() { // fn#68641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8964:2132, owner: BotUserProfileContent.onPressTruncatedStatus, offset: 0x01c574e1, size: 139 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(dependencyMap[26]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[28]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'UserProfileCustomStatusActionSheet', {user: user, guildId: guild_id,
|
||||
channelId: channel == null ? value2 : channel.id}, 'stack']);
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,345 @@
|
||||
/* Metro module 8780; source: modules/user_profile/native/BotUserProfileOverflowMenu.tsx; dependencies: [31, 1379, 3793, 1934, 1878, 661, 8781, 33, 566, 8782, 8514, 6771, 6789, 8743, 1244, 8783, 4080, 8793, 1962, 480, 6264, 8794, 8795, 8795, 477, 8796, 683, 6797, 3995, 3856, 7504, 8046, 8809, 3829, 8810, 8811, 8341, 8638, 697, 2] */
|
||||
function _fun68643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:6, offset: 0x01c575e4, size: 290 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticEvents;
|
||||
const env0_9 = value.ApplicationFlags;
|
||||
const env0_10 = value.ChannelTypesSets;
|
||||
const env0_11 = value.RelationshipTypes;
|
||||
value = require(8781) /* metro dependency 8781: RestrictionConfirmationConstants */;
|
||||
const env0_12 = value.BLOCK_CONFIRMATION_ACTION_SHEET_KEY;
|
||||
const env0_13 = value.IGNORE_CONFIRMATION_ACTION_SHEET_KEY;
|
||||
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/BotUserProfileOverflowMenu.tsx');
|
||||
exports.default = BotUserProfileOverflowMenu;
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenu({application, user, channel}) { // fn#68644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:447, offset: 0x01c57706, size: 1598 bytes, params: 2, frame: 29
|
||||
var push;
|
||||
var object11;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var object12;
|
||||
var object13;
|
||||
var object14;
|
||||
var moduleValue5;
|
||||
var object15;
|
||||
var object16;
|
||||
var moduleValue6;
|
||||
var object17;
|
||||
var object18;
|
||||
var object19;
|
||||
var env0_12;
|
||||
var env0_13;
|
||||
const {relationshipType,
|
||||
isIgnored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore],
|
||||
function() {
|
||||
var object = {};
|
||||
var userBinding = user;
|
||||
object.relationshipType = RelationshipStore.getRelationshipType(userBinding.id);
|
||||
object.isIgnored = RelationshipStore.isIgnored(userBinding.id);
|
||||
return object;
|
||||
});
|
||||
const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore,
|
||||
ChannelStore], function() {
|
||||
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
|
||||
});
|
||||
const env0_3 = channel2;
|
||||
const isIarUserReportingEnabled2 = (require(8782) /* metro dependency 8782: SafetyExperienceIarUserReportingExperiment */).isIarUserReportingEnabled('User Profile Options - Mobile');
|
||||
const value4 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useUserProfileAnalyticsContext();
|
||||
const context = value4.context;
|
||||
const env0_5 = value4.trackUserProfileAction;
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const USER_PROFILE_OVERFLOW_MENU = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_OVERFLOW_MENU;
|
||||
const value5 = defaultImport(USER_PROFILE_OVERFLOW_MENU);
|
||||
const analyticsLocations = value5.analyticsLocations;
|
||||
const env0_7 = value5.newestAnalyticsLocation;
|
||||
const env0_8 = UserStore.getCurrentUser();
|
||||
const env0_9 = env0_3.useCallback(_fun68647, [user.id, channel?.id, context, analyticsLocations]);
|
||||
items3 = [];
|
||||
const items2 = [];
|
||||
const env0_10 = user.id;
|
||||
const env0_11 = channel?.getGuildId();
|
||||
const BLOCKED = RelationshipTypes.BLOCKED;
|
||||
const value8 = relationshipType === BLOCKED;
|
||||
if (isIgnored) {
|
||||
if (value8) {
|
||||
if (!value8) {
|
||||
push = items2.push;
|
||||
object12 = {};
|
||||
object12.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs);
|
||||
object12.action = action_68649;
|
||||
Reflect.apply(push, items2, [object12]);
|
||||
}
|
||||
} else {
|
||||
push = items2.push;
|
||||
object11 = {};
|
||||
object11.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8wXU9B']);
|
||||
object11.action = action_68648;
|
||||
Reflect.apply(push, items2, [object11]);
|
||||
}
|
||||
} else if (!value8) {
|
||||
push = items2.push;
|
||||
object12 = {};
|
||||
object12.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs);
|
||||
object12.action = action_68649;
|
||||
Reflect.apply(push, items2, [object12]);
|
||||
}
|
||||
if (value8) {
|
||||
push = items2.push;
|
||||
object13 = {};
|
||||
object13.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyHpKH);
|
||||
object13.action = action_68651;
|
||||
Reflect.apply(push, items2, [object13]);
|
||||
}
|
||||
if (!value8) {
|
||||
push = items2.push;
|
||||
object14 = {};
|
||||
object14.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l4Emac);
|
||||
object14.variant = 'destructive';
|
||||
object14.action = action_68652;
|
||||
Reflect.apply(push, items2, [object14]);
|
||||
if (isIarUserReportingEnabled2) {
|
||||
push = items2.push;
|
||||
object16 = {};
|
||||
object16.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jhJzez);
|
||||
object16.variant = 'destructive';
|
||||
object16.action = action_68654;
|
||||
Reflect.apply(push, items2, [object16]);
|
||||
} else {
|
||||
moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue5.isAndroid()) {
|
||||
push = items2.push;
|
||||
object15 = {};
|
||||
object15.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TbHyMG);
|
||||
object15.variant = 'destructive';
|
||||
object15.action = function() {
|
||||
trackUserProfileAction({action: 'REPORT', analyticsLocations: analyticsLocations});
|
||||
require(dependencyMap[25]).alertUserReported();
|
||||
var defaultImport = importDefault(dependencyMap[26]);
|
||||
var TNS_USER_REPORT_SUBMITTED = AnalyticEvents.TNS_USER_REPORT_SUBMITTED;
|
||||
defaultImport.track(TNS_USER_REPORT_SUBMITTED, {reported_user_id: id});
|
||||
};
|
||||
Reflect.apply(push, items2, [object15]);
|
||||
}
|
||||
}
|
||||
}
|
||||
push = items3.push;
|
||||
const object20 = {};
|
||||
object20.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy);
|
||||
object20.action = action_68656;
|
||||
Reflect.apply(push, items3, [object20]);
|
||||
if (application != null) {
|
||||
moduleValue6 = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
|
||||
env0_12 = moduleValue6.hasApplicationFlag(application, ApplicationFlags.EMBEDDED);
|
||||
env0_13 = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getInstallAppPropsFromProfileApplication(application);
|
||||
push = items3.push;
|
||||
object17 = {};
|
||||
object17.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss);
|
||||
object17.action = action_68657;
|
||||
Reflect.apply(push, items3, [object17]);
|
||||
}
|
||||
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
|
||||
const getSetting = DeveloperMode.getSetting;
|
||||
if (Reflect.apply(getSetting, DeveloperMode, [])) {
|
||||
push = items3.push;
|
||||
object18 = {};
|
||||
object18.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/AXYnE']);
|
||||
object18.action = action_68658;
|
||||
Reflect.apply(push, items3, [object18]);
|
||||
}
|
||||
if (channel != null && channel2 != null && ChannelTypesSets.TEXTUAL.has(channel2.type)) {
|
||||
push = items3.push;
|
||||
object19 = {};
|
||||
object19.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
|
||||
object19.action = action_68659;
|
||||
Reflect.apply(push, items3, [object19]);
|
||||
}
|
||||
if (items3.length !== 0) {
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{((ContextMenu) => <ContextMenu items={[items3,
|
||||
items2]}>{children_68660}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)}
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
} else if (items2.length === 0) {
|
||||
return null;
|
||||
} else {
|
||||
const AnalyticsLocationProvider2 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
return (
|
||||
<AnalyticsLocationProvider2 value={analyticsLocations}>
|
||||
{((ContextMenu) => <ContextMenu items={[items3,
|
||||
items2]}>{children_68660}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)}
|
||||
</AnalyticsLocationProvider2>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun68647(a0) { // fn#68647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1041, offset: 0x01c57da1, size: 135 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const defaultImport = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, context, undefined);
|
||||
object2['showGuildProfile'] = a0;
|
||||
object2['userId'] = user.id;
|
||||
object2['channelId'] = channel == null ? value : channel.id;
|
||||
object2['sourceAnalyticsLocations'] = analyticsLocations;
|
||||
object2['ignoreBlockedSpeedBump'] = true;
|
||||
defaultImport(object2);
|
||||
return value;
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction() { // fn#68648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1348, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57e28, size: 113 bytes, params: 1, frame: 18
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'UNIGNORE', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
defaultImport.unignoreUser(id, newestAnalyticsLocation, channel == null ? value2 : channel.id);
|
||||
env0_9();
|
||||
return value2;
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68649() { // fn#68649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1515, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57e99, size: 172 bytes, params: 1, frame: 21
|
||||
var object2;
|
||||
trackUserProfileAction({action: 'IGNORE', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths);
|
||||
object2 = {};
|
||||
object2.userId = id;
|
||||
object2.onSuccess = onSuccess_68650;
|
||||
const ImpressionNames = require(dependencyMap[19]).ImpressionNames;
|
||||
const IGNORE_USER_CONFIRMATION = ImpressionNames.IGNORE_USER_CONFIRMATION;
|
||||
object2.impressionName = IGNORE_USER_CONFIRMATION;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, IGNORE_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']);
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68651() { // fn#68651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1778, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57f54, size: 144 bytes, params: 1, frame: 18
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'UNBLOCK', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
defaultImport.unblockUser(id, {location: newestAnalyticsLocation});
|
||||
const defaultImport2 = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
|
||||
defaultImport2.showUnblockSuccessToast(id, channel == null ? value2 : channel.id);
|
||||
env0_9();
|
||||
return value2;
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68652() { // fn#68652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:2013, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57fe4, size: 211 bytes, params: 1, frame: 21
|
||||
var object2;
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'BLOCK', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value4 = require(dependencyMap[18])(dependencyMap[21], dependencyMap.paths);
|
||||
object2 = {};
|
||||
object2.userId = id;
|
||||
object2.channelId = channel == null ? value2 : channel.id;
|
||||
object2.onSuccess = onSuccess_68653;
|
||||
const ImpressionNames = require(dependencyMap[19]).ImpressionNames;
|
||||
const BLOCK_USER_CONFIRMATION = ImpressionNames.BLOCK_USER_CONFIRMATION;
|
||||
object2.impressionName = BLOCK_USER_CONFIRMATION;
|
||||
Reflect.apply(openLazy, defaultImport, [value4, BLOCK_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68654() { // fn#68654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:2325, owner: BotUserProfileOverflowMenu.action, offset: 0x01c580b7, size: 223 bytes, params: 1, frame: 21
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'REPORT', analyticsLocations: analyticsLocations});
|
||||
const r1 = env0_11 === '@me' || env0_11 === null ? value2 : env0_11;
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value4 = require(dependencyMap[18])(dependencyMap[22], dependencyMap.paths);
|
||||
const BOT_REPORT_CHOOSER_KEY = require(dependencyMap[23]).BOT_REPORT_CHOOSER_KEY;
|
||||
Reflect.apply(openLazy, defaultImport, [value4, BOT_REPORT_CHOOSER_KEY, {user: user,
|
||||
entrypoint: 'UserProfileOverflowMenu', contextualGuildId: r1,
|
||||
contextualChannelId: channel == null ? value2 : channel.id}, 'replaceAll']);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68656() { // fn#68656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:2915, owner: BotUserProfileOverflowMenu.action, offset: 0x01c5820a, size: 147 bytes, params: 1, frame: 19
|
||||
trackUserProfileAction({action: 'COPY_USERNAME', analyticsLocations: analyticsLocations});
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
const copy = clipboardUtilsNativeModule.copy;
|
||||
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
const getUserTag = defaultImport.getUserTag;
|
||||
Reflect.apply(copy, clipboardUtilsNativeModule, [Reflect.apply(getUserTag, defaultImport, [user,
|
||||
{'decoration': 'never', 'identifiable': 'always'}])]);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
|
||||
env0_9();
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68657() { // fn#68657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:3263, owner: BotUserProfileOverflowMenu.action, offset: 0x01c5829d, size: 214 bytes, params: 1, frame: 18
|
||||
var id;
|
||||
var r5;
|
||||
var getApplicationInstallURL;
|
||||
var getActivityLaunchURL;
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
let object2 = {action: 'COPY_APP_LINK'};
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding(object2);
|
||||
const binding = env0_12;
|
||||
const getApplicationInstallURLModule = require(8809) /* metro dependency 8809: getApplicationInstallURL */;
|
||||
if (binding) {
|
||||
getActivityLaunchURL = getApplicationInstallURLModule.getActivityLaunchURL;
|
||||
object2 = {};
|
||||
id = application.id;
|
||||
object2.applicationId = id;
|
||||
id = env0_8 == null ? value2 : env0_8.id;
|
||||
object2.referrerId = id;
|
||||
r5 = Reflect.apply(getActivityLaunchURL, getApplicationInstallURLModule, [object2]);
|
||||
} else {
|
||||
getApplicationInstallURL = getApplicationInstallURLModule.getApplicationInstallURL;
|
||||
object2 = {};
|
||||
object2.id = application.id;
|
||||
copyDataProperties(object2, env0_13, undefined);
|
||||
r5 = Reflect.apply(getApplicationInstallURL, getApplicationInstallURLModule, [object2]);
|
||||
}
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(r5);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
|
||||
return value2;
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68658() { // fn#68658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:3615, owner: BotUserProfileOverflowMenu.action, offset: 0x01c58373, size: 105 bytes, params: 1, frame: 15
|
||||
trackUserProfileAction({action: 'COPY_USER_ID', analyticsLocations: analyticsLocations});
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
clipboardUtilsNativeModule.copy(id);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
|
||||
env0_9();
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuAction_68659() { // fn#68659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:3821, owner: BotUserProfileOverflowMenu.action, offset: 0x01c583dc, size: 72 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(8810) /* metro dependency 8810: openUserContextMenuCommands */)({userId: id,
|
||||
selectedChannel: channel, showUserProfile: env0_9, analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function BotUserProfileOverflowMenuChildren(a0) { // fn#68660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:4037, owner: BotUserProfileOverflowMenu.children, offset: 0x01c58424, size: 241 bytes, params: 2, frame: 21
|
||||
const ref = a0.ref;
|
||||
const value = Object.create(null);
|
||||
value.ref = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {ref: ref, ...value2};
|
||||
iconButtonProps['size'] = 'sm';
|
||||
iconButtonProps['variant'] = 'secondary-overlay';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zofAD']);
|
||||
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
iconButtonProps['icon'] = <MoreHorizontalIcon size="sm" color={WHITE} />;
|
||||
return <IconButton {...iconButtonProps} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* Metro module 13202; source: modules/user_profile/native/ChangeAvatarActionSheet.tsx; dependencies: [31, 27, 1878, 661, 33, 4501, 697, 566, 3802, 6805, 6758, 1244, 7954, 6231, 6238, 7972, 13186, 2] */
|
||||
function _fun100749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13392:6, offset: 0x021f664a, size: 485 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.nitroWheel = {marginLeft: PX_8};
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.sublabel = {color: TEXT_DEFAULT};
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.label = {'marginBottom': 4, 'color': null, 'alignItems': 'center', 'flexDirection': 'row',
|
||||
color: INTERACTIVE_TEXT_ACTIVE};
|
||||
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
|
||||
object2.remove = {color: TEXT_FEEDBACK_CRITICAL};
|
||||
const object3 = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.marginTop = PX_12;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.marginBottom = PX_8;
|
||||
object2.upsellButton = object3;
|
||||
object2.upsellTitleContainer = {'flexDirection': 'row', 'alignItems': 'flex-end'};
|
||||
object2.titleWrapper = {flex: 0};
|
||||
object2.titleContainer = {justifyContent: 'flex-start'};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/ChangeAvatarActionSheet.tsx');
|
||||
exports.default = ChangeAvatarActionSheet;
|
||||
}
|
||||
|
||||
function ChangeAvatarActionSheet({handleUploadAvatarSelect, handleRemoveAvatarSelect, handleUploadGIFAvatarSelect, handleEditAvatarDecorationSelect, showAnimatedAvatarUpsell, showRemoveAvatar}) { // fn#100750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13392:686, offset: 0x021f682f, size: 1395 bytes, params: 2, frame: 42
|
||||
var r14;
|
||||
var r9;
|
||||
var object6;
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
var jsxRuntimeEnv0_8Binding;
|
||||
var FormSubLabel;
|
||||
var items4;
|
||||
var UserProfileUpsellButton;
|
||||
var object18;
|
||||
showAnimatedAvatarUpsell = !(showAnimatedAvatarUpsell === undefined) && showAnimatedAvatarUpsell;
|
||||
showRemoveAvatar = !(showRemoveAvatar === undefined) && showRemoveAvatar;
|
||||
const styles = useStyles();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const isPremium2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
|
||||
[t.lqaIxI])} trailing={isPremium2 && ((NitroWheelIcon) => <NitroWheelIcon />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)} titleWrapperStyle={styles.titleWrapper} titleContainerStyle={styles.titleContainer} />;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const tableRow = <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MsUY/S'])} subLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.r5hKOy)} onPress={handleUploadAvatarSelect} />;
|
||||
const r15 = handleUploadGIFAvatarSelect != null && !showAnimatedAvatarUpsell && <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['xsC+/y'])} onPress={handleUploadGIFAvatarSelect} />;
|
||||
if (showAnimatedAvatarUpsell) {
|
||||
var tableRowProps = {label: <View style={styles.upsellTitleContainer}><FormLabel text={intl.string(t.xZ0Wot)} />{((NitroWheelIcon) => <NitroWheelIcon style={styles.nitroWheel} size="sm" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>};
|
||||
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
FormSubLabel = (require(7972) /* metro dependency 7972: native */).FormSubLabel;
|
||||
items4 = [<FormSubLabel style={styles.sublabel} numberOfLines={3} text={intl.string(t.L3UPqR)} />];
|
||||
var viewBindingProps2 = {style: styles.upsellButton};
|
||||
UserProfileUpsellButton = importDefault(13186) /* metro dependency 13186: UserProfileUpsellButton */;
|
||||
items4[1] = <View {...viewBindingProps2}><UserProfileUpsellButton analyticsObject={AnalyticsObjects.ANIMATED_AVATAR} label={intl.string(t.mr4K7D)} /></View>;
|
||||
tableRowProps.subLabel = <>{items4}</>;
|
||||
r14 = <TableRow {...tableRowProps} />;
|
||||
} else {
|
||||
r14 = showAnimatedAvatarUpsell;
|
||||
}
|
||||
const r12 = handleEditAvatarDecorationSelect != null && <TableRow label={<View style={styles.upsellTitleContainer}><FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BVcYCx)} /></View>} onPress={handleEditAvatarDecorationSelect} />;
|
||||
if (showRemoveAvatar) {
|
||||
r9 = <TableRow label={<FormLabel style={[styles.label,
|
||||
styles.remove]} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.twB3fz)} />} onPress={handleRemoveAvatarSelect} />;
|
||||
} else {
|
||||
r9 = showRemoveAvatar;
|
||||
}
|
||||
return (
|
||||
<ActionSheet>
|
||||
{bottomSheetTitleHeader}
|
||||
<TableRowGroup hasIcons={false}>
|
||||
{tableRow}
|
||||
{r15}
|
||||
{r14}
|
||||
{r12}
|
||||
{r9}
|
||||
</TableRowGroup>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
/* Metro module 13185; source: modules/user_profile/native/ChangeBannerActionSheet.tsx; dependencies: [5, 31, 27, 7624, 661, 33, 4501, 697, 6771, 3802, 4080, 4660, 6805, 6758, 1244, 7954, 6231, 6238, 7972, 13186, 566, 8403, 8490, 8421, 673, 8400, 13187, 4573, 1305, 13188, 13189, 2] */
|
||||
function _fun100641(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:6, offset: 0x021f1753, size: 608 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.AnalyticsObjects;
|
||||
const env0_8 = value.UPLOAD_BANNER_SIZE;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.label = {'color': null, 'alignItems': 'center', 'flexDirection': 'row', color: INTERACTIVE_TEXT_ACTIVE};
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.sublabel = {color: TEXT_DEFAULT};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.nitroWheel = {marginLeft: PX_8};
|
||||
const object3 = {'borderColor': null, 'borderWidth': 1, 'borderRadius': null, 'height': 24, 'minWidth': 24};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object3.borderColor = INTERACTIVE_TEXT_DEFAULT;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.bannerColor = object3;
|
||||
object2.selectedColor = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object2.selectedColorHex = {textTransform: 'uppercase'};
|
||||
object2.rowArrow = {'height': 13, 'width': 8, 'marginLeft': 10, 'marginTop': 2};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.upsellButton = {marginTop: PX_8};
|
||||
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
|
||||
object2.remove = {color: TEXT_FEEDBACK_CRITICAL};
|
||||
object2.titleWrapper = {flex: 0};
|
||||
object2.titleContainer = {justifyContent: 'flex-start'};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/ChangeBannerActionSheet.tsx');
|
||||
exports.default = ChangeBannerActionSheet;
|
||||
}
|
||||
|
||||
function ChangeBannerColorRow({user}) { // fn#100642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:894, offset: 0x021f19b3, size: 747 bytes, params: 2, frame: 29
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const {pendingAvatar,
|
||||
pendingAccentColor} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore],
|
||||
function() {
|
||||
return UserProfileSettingsStore.getPendingChanges();
|
||||
});
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
||||
image: pendingAvatar});
|
||||
const value5 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id);
|
||||
const r11 = pendingAvatarSrc ?? user.getAvatarURL(undefined, 80);
|
||||
const value7 = (require(8421) /* metro dependency 8421: VideoBackground */).memoizedImageSource(r11);
|
||||
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
|
||||
const rgb2int = colorUtilsModule.rgb2int;
|
||||
const videoBackgroundModule = require(8421) /* metro dependency 8421: VideoBackground */;
|
||||
const useDominantColorFromImage = videoBackgroundModule.useDominantColorFromImage;
|
||||
const value8 = Reflect.apply(rgb2int, colorUtilsModule, [Reflect.apply(useDominantColorFromImage,
|
||||
videoBackgroundModule, [r11, value7])]);
|
||||
const r19 = (pendingAccentColor !== undefined ? pendingAccentColor : value5?.primaryColor) ?? value8 ?? 0;
|
||||
const env0_2 = env0_4.useCallback(_fun100644, [value8]);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
object2 = {};
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = <FormLabel style={styles.label} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xzNfPz)} />;
|
||||
const items2 = [((Component) => <Component style={styles.bannerColor} color={r19} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <Text style={styles.selectedColorHex} variant="text-md/medium" color="interactive-text-default">{colorUtilsModule.int2hex(r19)}</Text>;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const CUSTOM = Sizes.CUSTOM;
|
||||
items2[2] = <Icon style={styles.rowArrow} size={CUSTOM} source={importDefault(13188) /* metro dependency 13188 */} />;
|
||||
object2.trailing = <View style={styles.selectedColor}>{items2}</View>;
|
||||
object2.onPress = onPress_100645;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function ChangeBannerActionSheet({user, analyticsLocations, onBannerChange, removeText, showRemoveBanner, isTryItOut}) { // fn#100646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:1896, offset: 0x021f1d24, size: 1166 bytes, params: 2, frame: 47
|
||||
var r12;
|
||||
var object15;
|
||||
showRemoveBanner = !(showRemoveBanner === undefined) && showRemoveBanner;
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
const styles = useStyles();
|
||||
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
|
||||
const r26 = isTryItOut || (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumProfileCustomization(user);
|
||||
const value5 = _fun100647();
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const Vgdusv = t.Vgdusv;
|
||||
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
|
||||
[Vgdusv])} trailing={r26 && ((NitroWheelIcon) => <NitroWheelIcon />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)} titleWrapperStyle={styles.titleWrapper} titleContainerStyle={styles.titleContainer} />;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const items2 = [r26 ? null : <ChangeBannerColorRow user={user} />];
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object = {};
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
string = intl.string;
|
||||
const formLabel = <FormLabel text={showRemoveBanner ? Reflect.apply(string, intl,
|
||||
[t.N0bC3P]) : Reflect.apply(string, intl, [t['70CYsY']])} />;
|
||||
const value13 = !r26;
|
||||
object.label = <View style={styles.label}>{formLabel}{r26 ? value13 : ((NitroWheelIcon) => <NitroWheelIcon style={styles.nitroWheel} size="sm" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>;
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const FormSubLabel = (require(7972) /* metro dependency 7972: native */).FormSubLabel;
|
||||
string = intl.string;
|
||||
object.subLabel = <><FormSubLabel style={styles.sublabel} numberOfLines={2} text={r26 ? Reflect.apply(string, intl,
|
||||
[t.IhzZlo]) : Reflect.apply(string, intl,
|
||||
[t.NSTmdO])} />{r26 ? value13 : <View style={styles.upsellButton}>{((Component) => <Component analyticsObject={AnalyticsObjects.EDIT_PROFILE_BANNER} />)(importDefault(13186) /* metro dependency 13186: UserProfileUpsellButton */)}</View>}</>;
|
||||
object.onPress = r26 ? value5 : undefined;
|
||||
items2[1] = <TableRow {...object} />;
|
||||
if (showRemoveBanner) {
|
||||
r12 = <TableRow label={<FormLabel style={[styles.label,
|
||||
styles.remove]} text={removeText ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tT9n7D)} />} onPress={onPress_100651} />;
|
||||
} else {
|
||||
r12 = showRemoveBanner;
|
||||
}
|
||||
items2[2] = r12;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<ActionSheet>
|
||||
{bottomSheetTitleHeader}
|
||||
<TableRowGroup hasIcons={false}>
|
||||
{items2}
|
||||
</TableRowGroup>
|
||||
</ActionSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100644(a0) { // fn#100644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:1349, offset: 0x021f1cb1, size: 61 bytes, params: 2, frame: 13
|
||||
let value = a0;
|
||||
const r4 = value !== env0_0 ? value : null;
|
||||
value = environment.__proto__;
|
||||
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
|
||||
value.setPendingChanges({accentColor: r4});
|
||||
}
|
||||
|
||||
function ChangeBannerColorRowOnPress() { // fn#100645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:1851, owner: ChangeBannerColorRow.onPress, offset: 0x021f1cee, size: 54 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: env0_1,
|
||||
onSelect: env0_2});
|
||||
}
|
||||
|
||||
function _fun100647() { // fn#100647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:2122, offset: 0x021f21b2, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun100649);
|
||||
return _fun100650;
|
||||
}
|
||||
|
||||
function ChangeBannerActionSheetOnPress() { // fn#100651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:3363, owner: ChangeBannerActionSheet.onPress, offset: 0x021f2258, size: 51 bytes, params: 1, frame: 12
|
||||
onBannerChange(null);
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function* _fun100649() { // fn#100649, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:2142, offset: 0x021f21e1, size: 119 bytes, params: 1, frame: 16
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var binding = env3_1;
|
||||
var binding2 = env3_2;
|
||||
binding(binding2[10]).hideActionSheet();
|
||||
var value4 = binding(binding2[11]);
|
||||
yield value4.openImagePicker(env3_8);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
var base64 = value.base64;
|
||||
if (base64 != null) {
|
||||
require(base64, environment.__proto__.__proto__.originalMd5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 6816; source: modules/user_profile/native/Constants.tsx; dependencies: [1305, 6817, 2] */
|
||||
function _fun53590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6994:6, offset: 0x01350880, size: 363 bytes, params: 8, frame: 23
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XXLARGE = AvatarSizes.XXLARGE;
|
||||
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
||||
const property = AVATAR_SIZE_MAP[XXLARGE];
|
||||
const value = property + 12;
|
||||
const value2 = property / 2;
|
||||
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
|
||||
const md = ICON_SIZE.md;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/Constants.tsx');
|
||||
exports.ARBITRARY_LARGE_OFFSET = 250;
|
||||
exports.PROFILE_SIDE_PADDING = 16;
|
||||
exports.AVATAR_SIZE_VARIANT = XXLARGE;
|
||||
exports.AVATAR_SIZE = property;
|
||||
exports.AVATAR_PADDING = 6;
|
||||
exports.AVATAR_CONTAINER_SIZE = value;
|
||||
exports.AVATAR_CUSTOM_STATUS_GAP = 4;
|
||||
exports.BANNER_ASPECT_RATIO = 2.86;
|
||||
exports.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING = 12 + value2 + 6;
|
||||
exports.PROFILE_CONTENT_BOTTOM_PADDING = 20;
|
||||
exports.CARD_PADDING = 16;
|
||||
exports.CARD_ROWS_ICON_SIZE_VARIANT = 'md';
|
||||
exports.CARD_ROWS_ICON_SIZE = md;
|
||||
exports.CARD_ROWS_COLUMN_GAP = 16;
|
||||
exports.FLOATING_UPSELL_HEIGHT = 140;
|
||||
exports.COLLECTIBLES_PREVIEW_SIZE = 48;
|
||||
exports.UserProfileThemeTypes = {ACTION_SHEET: 'action_sheet', YOU_SCREEN: 'you_screen', PREVIEW: 'preview',
|
||||
EDIT_FORM: 'edit_form'};
|
||||
exports.PROFILE_TOP_LAYER_Z_INDEX = 2;
|
||||
exports.DIVIDER_DOT = ' ∙ ';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 9210; source: modules/user_profile/native/DiscordTag.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 8706, 2] */
|
||||
function _fun72069(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9395:6, offset: 0x01d38a22, size: 249 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{container: {'flexGrow': 1, 'alignItems': 'center',
|
||||
'flexDirection': 'row'}, botTag: {marginLeft: PX_4}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/DiscordTag.tsx');
|
||||
exports.default = DiscordTag;
|
||||
}
|
||||
|
||||
function DiscordTag({user, nick, usernameStyle, nicknameStyle, discriminatorStyle, hideBotTag}) { // fn#72070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9395:280, offset: 0x01d38b1b, size: 437 bytes, params: 2, frame: 31
|
||||
var r5;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items2;
|
||||
hideBotTag = !(hideBotTag === undefined) && hideBotTag;
|
||||
const styles = useStyles();
|
||||
if (nick != null) {
|
||||
r5 = <Text variant="text-md/semibold" maxFontSizeMultiplier={2} style={nicknameStyle} lineClamp={1}>{nick}</Text>;
|
||||
} else if (user != null) {
|
||||
var textProps = {'variant': 'text-md/semibold', 'style': null, 'lineClamp': 1, 'maxFontSizeMultiplier': 2,
|
||||
style: usernameStyle};
|
||||
items2 = [user.toString()];
|
||||
items2[1] = !user.hasUniqueUsername() && <Text variant="text-md/semibold" color="text-muted" style={discriminatorStyle}>{'#'}{user.discriminator}</Text>;
|
||||
r5 = <Text {...textProps}>{items2}</Text>;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
const items3 = [r5];
|
||||
items3[1] = user?.bot !== true || hideBotTag ? null : ((Component) => <Component style={styles.botTag} verified={user.isVerifiedBot()} />)(importDefault(8706) /* metro dependency 8706: BotTag */);
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/* Metro module 8397; source: modules/user_profile/native/EditAvatarDecorationActionSheet.tsx; dependencies: [57, 31, 27, 5145, 5126, 1945, 661, 33, 4501, 697, 8398, 8403, 7326, 6771, 6789, 683, 3868, 6275, 4573, 1244, 8404, 7675, 566, 8407, 8402, 8408, 8414, 8415, 8409, 8405, 8417, 1305, 8424, 2] */
|
||||
function _fun66727(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8582:6, offset: 0x01c07010, size: 443 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
const env0_7 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
object2.bounceOffset = {'position': 'absolute', 'top': -250, 'height': 250, 'right': 0, 'left': 0};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.title = {'alignSelf': 'center', 'color': null, 'margin': 25, color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
object2.avatarDisplayContainer = {'flexDirection': 'row', 'width': '100%', 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'paddingVertical': 16};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditAvatarDecorationActionSheet.tsx');
|
||||
exports.default = EditAvatarDecorationActionSheet;
|
||||
}
|
||||
|
||||
function EditAvatarDecorationInner({pendingAvatarSrc, user, selectedAvatarDecoration, setSelectedAvatarDecoration, guildId, isTryItOut}) { // fn#66728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8582:664, offset: 0x01c071cb, size: 660 bytes, params: 2, frame: 29
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
(require(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */).useGetOrFetchCollectiblesCategoriesAndPurchases();
|
||||
const isFetching = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore],
|
||||
function() {
|
||||
return CollectiblesPurchaseStore.isFetching;
|
||||
});
|
||||
const value4 = (importDefault(8407) /* metro dependency 8407: useAvatarDecorationSections */)();
|
||||
const profilePreviewValue = (require(8402) /* metro dependency 8402: ProfileCustomizationUtils */).getProfilePreviewValue({pendingValue: selectedAvatarDecoration,
|
||||
userValue: user?.avatarDecoration,
|
||||
guildValue: (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore],
|
||||
_fun66730)?.avatarDecoration, guildId: guildId});
|
||||
const value7 = env0_4.useCallback(_fun66731, [setSelectedAvatarDecoration, guildId, isTryItOut]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
let skuId = profilePreviewValue?.skuId;
|
||||
const items2 = [<AvatarDecorationSectionPreview previewSkuId={skuId} user={user} guildId={guildId} pendingAvatarSrc={pendingAvatarSrc} />];
|
||||
const EditCollectiblesPreviewDetails = importDefault(8414) /* metro dependency 8414: EditCollectiblesPreviewDetails */;
|
||||
const defaultImportProps = {user: user, previewSkuId: profilePreviewValue?.skuId};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const FyBDiY = (require(1244) /* metro dependency 1244: indexNative */).t.FyBDiY;
|
||||
defaultImportProps.nitroJoinCTA = Reflect.apply(string, intl, [FyBDiY]);
|
||||
defaultImportProps.nitroUpgradeCTA = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e1UiOa);
|
||||
items2[1] = <EditCollectiblesPreviewDetails {...defaultImportProps} />;
|
||||
const EditCollectiblesPickerList = (require(8415) /* metro dependency 8415: EditCollectiblesPickerList */).EditCollectiblesPickerList;
|
||||
skuId = selectedAvatarDecoration?.skuId;
|
||||
const COLLECTIBLE_ROW_HEIGHT = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).COLLECTIBLE_ROW_HEIGHT;
|
||||
items2[2] = <EditCollectiblesPickerList sections={value4} selectedSkuId={skuId} renderRow={value7} estimatedItemSize={COLLECTIBLE_ROW_HEIGHT} isFetching={isFetching} />;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function AvatarDecorationSectionPreview({previewSkuId, user, guildId, pendingAvatarSrc}) { // fn#66732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8582:1814, offset: 0x01c0750c, size: 434 bytes, params: 2, frame: 24
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
let value2 = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(previewSkuId);
|
||||
let value3 = env0_4.useMemo(function() {
|
||||
var r1;
|
||||
var productBinding = product;
|
||||
var value2 = null;
|
||||
var value3 = undefined;
|
||||
r1 = value2 == productBinding ? value3 : product.items[0];
|
||||
r1 = value2 == r1 ? value2 == purchase ? value3 : purchase.items[0] : r1;
|
||||
return isAvatarDecorationRecord(r1) ? r1 : value2;
|
||||
}, [value2.purchase, value2.product]);
|
||||
const r4 = value3 != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Do2lxE,
|
||||
{a11y_text: value3.label}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7hRBmC']);
|
||||
const HeaderAvatar = importDefault(8417) /* metro dependency 8417: HeaderAvatar */;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const EDIT_AVATAR_DECORATION = AvatarSizes.EDIT_AVATAR_DECORATION;
|
||||
return (
|
||||
<View
|
||||
style={styles.avatarDisplayContainer}
|
||||
accessibilityLabel={r4}
|
||||
accessibilityRole="image"
|
||||
accessible
|
||||
>
|
||||
<HeaderAvatar
|
||||
user={user}
|
||||
guildId={guildId}
|
||||
pendingAvatarSrc={pendingAvatarSrc}
|
||||
pendingAvatarDecoration={value3}
|
||||
size={EDIT_AVATAR_DECORATION}
|
||||
/>
|
||||
{((Component) => <Component user={user} guildId={guildId} pendingAvatarSrc={pendingAvatarSrc} pendingAvatarDecoration={value3} />)(importDefault(8424) /* metro dependency 8424: AvatarGrid */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function EditAvatarDecorationActionSheet({user, guildId, currentAvatarDecoration, isTryItOut, analyticsLocations}) { // fn#66734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8582:2481, offset: 0x01c0771c, size: 777 bytes, params: 2, frame: 41
|
||||
const styles = useStyles();
|
||||
const {pendingAvatar,
|
||||
setPendingAvatarDecoration} = (importDefault(8398) /* metro dependency 8398: usePendingAvatarSettings */)({analyticsLocations: analyticsLocations,
|
||||
isTryItOut: isTryItOut, guildId: guildId});
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
||||
image: pendingAvatar});
|
||||
let binding = env0_4;
|
||||
const [property, property2] = env0_3(binding.useState(currentAvatarDecoration), 2);
|
||||
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
|
||||
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
|
||||
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const r5 = analyticsLocations ?? [];
|
||||
let EDIT_AVATAR_DECORATION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_AVATAR_DECORATION_SHEET;
|
||||
analyticsLocations = defaultImport2(r5, EDIT_AVATAR_DECORATION_SHEET).analyticsLocations;
|
||||
binding = env0_4;
|
||||
const value7 = binding.useCallback(function() {
|
||||
var defaultImport = importDefault(dependencyMap[15]);
|
||||
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
||||
defaultImport.track(OPEN_POPOUT, {type: importDefault(dependencyMap[14]).EDIT_AVATAR_DECORATION_SHEET,
|
||||
is_fullscreen: true});
|
||||
}, []);
|
||||
const value8 = binding.useCallback(_fun66736, [property, setPendingAvatarDecoration]);
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const view = <View style={styles.bounceOffset} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const HykynS = (require(1244) /* metro dependency 1244: indexNative */).t.HykynS;
|
||||
const view2 = <View style={styles.container}>{view}<Text variant="redesign/heading-18/bold" style={styles.title} accessibilityRole="header">{Reflect.apply(string,
|
||||
intl,
|
||||
[HykynS])}</Text><EditAvatarDecorationInner user={user} guildId={guildId} pendingAvatarSrc={pendingAvatarSrc} selectedAvatarDecoration={property} setSelectedAvatarDecoration={property2} isTryItOut={isTryItOut} /></View>;
|
||||
const EditCollectiblesCTAButton = importDefault(8404) /* metro dependency 8404: EditCollectiblesCTAButton */;
|
||||
const defaultImport3Props = {user: user, currentSkuId: currentAvatarDecoration?.skuId,
|
||||
selectedSkuId: property?.skuId, isTryItOut: isTryItOut, onApply: value8, analyticsLocations: analyticsLocations};
|
||||
EDIT_AVATAR_DECORATION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_AVATAR_DECORATION_SHEET;
|
||||
defaultImport3Props.analyticsSource = EDIT_AVATAR_DECORATION_SHEET;
|
||||
return (
|
||||
<ThemeContextProvider>
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<BottomSheet
|
||||
scrollable
|
||||
ref={bottomSheetRef}
|
||||
onExpand={value7}
|
||||
startExpanded
|
||||
>
|
||||
{view2}
|
||||
<EditCollectiblesCTAButton {...defaultImport3Props} />
|
||||
</BottomSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun66731({items, size, selectedSkuId}) { // fn#66731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8582:1151, offset: 0x01c074a0, size: 108 bytes, params: 2, frame: 16
|
||||
const EditAvatarDecorationRow = (require(8408) /* metro dependency 8408: EditAvatarDecorationSection */).EditAvatarDecorationRow;
|
||||
return (
|
||||
<EditAvatarDecorationRow
|
||||
items={items}
|
||||
size={size}
|
||||
selectedSkuId={selectedSkuId}
|
||||
setSelectedAvatarDecoration={setSelectedAvatarDecoration}
|
||||
guildId={guildId}
|
||||
isTryItOut={isTryItOut}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun66736() { // fn#66736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8582:3077, offset: 0x01c07a74, size: 33 bytes, params: 1, frame: 12
|
||||
const setPendingAvatarDecorationBinding = setPendingAvatarDecoration;
|
||||
const value2 = null;
|
||||
setPendingAvatarDecorationBinding(value2 != env0_1 ? env0_1 : value2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 8406; source: modules/user_profile/native/EditCollectiblesActionCreators.tsx; dependencies: [661, 7007, 2] */
|
||||
function _fun66807(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8591:6, offset: 0x01c0a7eb, size: 117 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditCollectiblesActionCreators.tsx');
|
||||
exports.navigateToNitroManagement = function() {
|
||||
require(dependencyMap[1]).openUserSettings({screen: UserSettingsSections.PREMIUM});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
/* Metro module 8404; source: modules/user_profile/native/EditCollectiblesCTAButton.tsx; dependencies: [31, 4502, 663, 1580, 33, 4501, 1585, 566, 8405, 4017, 4577, 3802, 5134, 1244, 4081, 8406, 5120, 4080, 4578, 2] */
|
||||
function _fun66794(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:6, offset: 0x01c09e08, size: 326 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_6 = (require(1580) /* metro dependency 1580: MediaKeyboardConstants */).MEDIA_PICKER_SEND_BUTTON_SPRING;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonRowContainer: {'flexGrow': 0,
|
||||
'flexDirection': 'row', 'justifyContent': 'flex-end', 'paddingHorizontal': 12, 'height': 48},
|
||||
buttonContainer: {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'marginLeft': 24,
|
||||
'marginRight': 24, 'flexDirection': 'column', 'justifyContent': 'flex-end'}});
|
||||
object = {code: 'function EditCollectiblesCTAButtonTsx1(){const{shouldShowButton,APPLY_BUTTON_BOUNCE_DISTANCE,APPLY_BUTTON_SCALE_TRANSITION,reducedMotion,withSpring,MEDIA_PICKER_SEND_BUTTON_SPRING}=this.__closure;const targetTranslateY=shouldShowButton.get()?0:APPLY_BUTTON_BOUNCE_DISTANCE;const targetScale=shouldShowButton.get()?1:APPLY_BUTTON_SCALE_TRANSITION;return{transform:[{translateY:reducedMotion?targetTranslateY:withSpring(targetTranslateY,MEDIA_PICKER_SEND_BUTTON_SPRING)},{scale:reducedMotion?targetScale:withSpring(targetScale,MEDIA_PICKER_SEND_BUTTON_SPRING)}]};}'};
|
||||
object = {code: "function EditCollectiblesCTAButtonTsx2(){const{shouldShowButton}=this.__closure;return{pointerEvents:shouldShowButton.get()?'box-none':'none'};}"};
|
||||
object = {code: 'function EditCollectiblesCTAButtonTsx3(){const{shouldShowButton,reducedMotion,withSpring,MEDIA_PICKER_SEND_BUTTON_SPRING}=this.__closure;const targetOpacity=shouldShowButton.get()?1:0;return{opacity:reducedMotion?targetOpacity:withSpring(targetOpacity,{...MEDIA_PICKER_SEND_BUTTON_SPRING,overshootClamping:true})};}'};
|
||||
value = value.memo(_fun66795);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditCollectiblesCTAButton.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun66795({user, currentSkuId, selectedSkuId, isTryItOut, onApply, analyticsLocations, analyticsSource}) { // fn#66795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:1553, offset: 0x01c09f4e, size: 995 bytes, params: 2, frame: 36
|
||||
var object2;
|
||||
const env0_3 = onApply;
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const {product, purchase} = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(selectedSkuId);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
let binding = env0_3;
|
||||
binding.useEffect(_fun66797, [selectedSkuId, currentSkuId, value3]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = O_66798;
|
||||
object2 = {'shouldShowButton': null, 'APPLY_BUTTON_BOUNCE_DISTANCE': 60, 'APPLY_BUTTON_SCALE_TRANSITION': 0.9};
|
||||
object2.shouldShowButton = value3;
|
||||
object2.reducedMotion = useReducedMotion;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.MEDIA_PICKER_SEND_BUTTON_SPRING = MEDIA_PICKER_SEND_BUTTON_SPRING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 15594859424201;
|
||||
closure.__initData = undefined;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue4.useAnimatedProps;
|
||||
closure = M_66799;
|
||||
closure.__closure = {shouldShowButton: value3};
|
||||
closure.__workletHash = 16151141699021;
|
||||
closure.__initData = env0_10;
|
||||
const value5 = Reflect.apply(useAnimatedProps, moduleValue4, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = R_66800;
|
||||
object2 = {shouldShowButton: value3, reducedMotion: useReducedMotion};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.MEDIA_PICKER_SEND_BUTTON_SPRING = MEDIA_PICKER_SEND_BUTTON_SPRING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13351061137085;
|
||||
closure.__initData = env0_11;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(user);
|
||||
let r11 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product) || (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
|
||||
const value7 = !canUseCollectibles2;
|
||||
let r18 = selectedSkuId == null || purchase != null && !(canUseCollectibles2 ? value7 : (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase));
|
||||
r18 = !r18 ? r11 && isTryItOut : r18;
|
||||
r11 = r11 && value7 && !isTryItOut;
|
||||
binding = env0_3;
|
||||
const value12 = binding.useMemo(_fun66801, [r18, r11, user]);
|
||||
const value13 = binding.useCallback(_fun66802, [r18, onApply, r11, analyticsLocations, analyticsSource,
|
||||
selectedSkuId]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.buttonContainer, value6];
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.buttonRowContainer, value4];
|
||||
items2[2] = {marginBottom: bottom};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={items3} animatedProps={value5}>
|
||||
<View2 style={items2} pointerEvents="box-none">
|
||||
<Button
|
||||
variant={r11 ? 'active' : 'primary'}
|
||||
onPress={value13}
|
||||
size="md"
|
||||
text={value12}
|
||||
grow
|
||||
/>
|
||||
</View2>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun66797() { // fn#66797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:1833, offset: 0x01c0a331, size: 33 bytes, params: 1, frame: 12
|
||||
const binding = env0_7;
|
||||
binding.set(selectedSkuId !== currentSkuId);
|
||||
}
|
||||
|
||||
function O_66798() { // fn#66798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:1903, offset: 0x01c0a352, size: 187 bytes, params: 1, frame: 19
|
||||
var r3;
|
||||
var value;
|
||||
const r8 = env0_7.get() ? 0 : 60;
|
||||
const r7 = env0_7.get() ? 1 : 0.9;
|
||||
const items2 = [{translateY: useReducedMotion ? r8 : (require(4577) /* metro dependency 4577: spring */).withSpring(r8,
|
||||
MEDIA_PICKER_SEND_BUTTON_SPRING)}];
|
||||
if (useReducedMotion) {
|
||||
r3 = r7;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = (require(4577) /* metro dependency 4577: spring */).withSpring(r7, MEDIA_PICKER_SEND_BUTTON_SPRING);
|
||||
r3 = value;
|
||||
}
|
||||
items2[1] = {scale: r3};
|
||||
return {transform: items2};
|
||||
}
|
||||
|
||||
function M_66799() { // fn#66799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:2306, offset: 0x01c0a40d, size: 38 bytes, params: 1, frame: 10
|
||||
const object2 = {};
|
||||
object2.pointerEvents = env0_7.get() ? 'box-none' : 'none';
|
||||
return object2;
|
||||
}
|
||||
|
||||
function R_66800() { // fn#66800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:2478, offset: 0x01c0a433, size: 102 bytes, params: 1, frame: 17
|
||||
var r1;
|
||||
var moduleValue;
|
||||
var withSpring;
|
||||
var object;
|
||||
var value;
|
||||
const r5 = env0_7.get() ? 1 : 0;
|
||||
if (useReducedMotion) {
|
||||
r1 = r5;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
moduleValue = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = moduleValue.withSpring;
|
||||
object = {};
|
||||
copyDataProperties(object, MEDIA_PICKER_SEND_BUTTON_SPRING, undefined);
|
||||
object['overshootClamping'] = true;
|
||||
value = Reflect.apply(withSpring, moduleValue, [r5, object]);
|
||||
r1 = value;
|
||||
}
|
||||
return {opacity: r1};
|
||||
}
|
||||
|
||||
function _fun66801() { // fn#66801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:2962, offset: 0x01c0a499, size: 258 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var defaultImport;
|
||||
var value;
|
||||
if (env0_8) {
|
||||
r0 = intl.string(t.Jh8fJz);
|
||||
} else if (env0_9) {
|
||||
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
value = defaultImport.isPremium(user);
|
||||
string = intl.string;
|
||||
r0 = value ? Reflect.apply(string, intl, [t.KXLX7l]) : Reflect.apply(string, intl, [t.mr4K7D]);
|
||||
} else {
|
||||
r0 = intl.string(t.fYfGgK);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66802() { // fn#66802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8589:3179, offset: 0x01c0a59b, size: 221 bytes, params: 1, frame: 16
|
||||
var moduleValue2;
|
||||
if (env0_8) {
|
||||
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
moduleValue2.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
onApply();
|
||||
} else if (env0_9) {
|
||||
(require(8406) /* metro dependency 8406: EditCollectiblesActionCreators */).navigateToNitroManagement();
|
||||
} else {
|
||||
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).openCollectiblesShopMobile({analyticsLocations: analyticsLocations,
|
||||
|
||||
analyticsSource: analyticsSource, initialProductSkuId: selectedSkuId,
|
||||
screen: CollectiblesMobileShopScreen.SHOP_ALL});
|
||||
}
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/* Metro module 8414; source: modules/user_profile/native/EditCollectiblesPreviewDetails.tsx; dependencies: [31, 27, 1949, 33, 4501, 566, 3802, 5134, 3826, 4573, 1244, 8405, 2] */
|
||||
function _fun66840(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8599:6, offset: 0x01c0c22d, size: 252 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({productDetailsContainer: {'width': '100%',
|
||||
'marginTop': 16, 'alignItems': 'center', 'gap': 2}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditCollectiblesPreviewDetails.tsx');
|
||||
exports.default = _default_66843;
|
||||
}
|
||||
|
||||
function EditCollectiblesPreviewDescription({user, product, purchase, nitroJoinCTA, nitroUpgradeCTA}) { // fn#66841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8599:308, offset: 0x01c0c329, size: 1112 bytes, params: 2, frame: 37
|
||||
var r21;
|
||||
var r12;
|
||||
var moduleValue5;
|
||||
var diffAsUnits;
|
||||
var Date;
|
||||
var value5;
|
||||
var date;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
var Io7ozn;
|
||||
var object;
|
||||
var eZSTa5;
|
||||
var object2;
|
||||
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(user);
|
||||
let r0 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product) || (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
|
||||
const r4 = !canUseCollectibles2 && (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
|
||||
if (purchase == null) {
|
||||
r0 = r0 ? canUseCollectibles2 ? <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hmyYK8)}</Text> : (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(user) ? <Text variant="text-sm/medium" color="text-default">{nitroUpgradeCTA}</Text> : <Text variant="text-sm/medium" color="text-default">{nitroJoinCTA}</Text> : <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fEGjVQ)}</Text>;
|
||||
return r0;
|
||||
}
|
||||
if (r4) {
|
||||
r0 = r0 ? canUseCollectibles2 ? <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hmyYK8)}</Text> : (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(user) ? <Text variant="text-sm/medium" color="text-default">{nitroUpgradeCTA}</Text> : <Text variant="text-sm/medium" color="text-default">{nitroJoinCTA}</Text> : <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fEGjVQ)}</Text>;
|
||||
return r0;
|
||||
}
|
||||
if (purchase?.expiresAt != null) {
|
||||
moduleValue5 = require(3826) /* metro dependency 3826: DateUtils */;
|
||||
diffAsUnits = moduleValue5.diffAsUnits;
|
||||
Date = global.Date;
|
||||
value5 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r21 = Reflect.apply(diffAsUnits, moduleValue5, [date instanceof Object ? date : value5, purchase.expiresAt]);
|
||||
} else {
|
||||
r21 = null;
|
||||
}
|
||||
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
||||
const value8 = r21 != null;
|
||||
if (value8) {
|
||||
format = intl.format;
|
||||
Io7ozn = (require(1244) /* metro dependency 1244: indexNative */).t.Io7ozn;
|
||||
object = {};
|
||||
object.days = r21.days.toString();
|
||||
r12 = <Text variant="text-sm/medium" color="text-default">{Reflect.apply(format, intl, [Io7ozn,
|
||||
object])}</Text>;
|
||||
} else {
|
||||
r12 = value8;
|
||||
}
|
||||
const items2 = [r12];
|
||||
format = intl.format;
|
||||
const gW9R4B = (require(1244) /* metro dependency 1244: indexNative */).t.gW9R4B;
|
||||
const object4 = {};
|
||||
object4.date = purchase == null ? undefined : purchase.purchasedAt.toLocaleDateString(locale, {'month': 'long',
|
||||
'year': 'numeric'});
|
||||
items2[1] = <Text variant="text-sm/medium" color="text-default">{Reflect.apply(format, intl, [gW9R4B,
|
||||
object4])}</Text>;
|
||||
const value11 = purchase?.expiresAt != null;
|
||||
if (value11) {
|
||||
format = intl.format;
|
||||
eZSTa5 = (require(1244) /* metro dependency 1244: indexNative */).t.eZSTa5;
|
||||
object2 = {};
|
||||
object2.date = purchase.expiresAt.toLocaleDateString(locale, {'minute': 'numeric', 'hour': 'numeric',
|
||||
'day': 'numeric', 'month': 'long', 'year': 'numeric'});
|
||||
r12 = <Text variant="text-sm/medium" color="text-default">{Reflect.apply(format, intl, [eZSTa5,
|
||||
object2])}</Text>;
|
||||
} else {
|
||||
r12 = value11;
|
||||
}
|
||||
items2[2] = r12;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_66843({user, previewSkuId, nitroJoinCTA, nitroUpgradeCTA}) { // fn#66843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8599:1752, offset: 0x01c0c781, size: 278 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const {product, purchase} = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(previewSkuId);
|
||||
return previewSkuId == null ? null : product != null ? <View style={styles.productDetailsContainer}>{((Text) => <Text variant="text-md/bold" color="text-default">{product?.name ?? purchase?.name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}<EditCollectiblesPreviewDescription user={user} product={product} purchase={purchase} nitroJoinCTA={nitroJoinCTA} nitroUpgradeCTA={nitroUpgradeCTA} /></View> : purchase == null ? null : <View style={styles.productDetailsContainer}>{((Text) => <Text variant="text-md/bold" color="text-default">{product?.name ?? purchase?.name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}<EditCollectiblesPreviewDescription user={user} product={product} purchase={purchase} nitroJoinCTA={nitroJoinCTA} nitroUpgradeCTA={nitroUpgradeCTA} /></View>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
/* Metro module 13223; source: modules/user_profile/native/EditNameplateActionSheet.tsx; dependencies: [57, 31, 27, 5145, 1902, 1945, 661, 33, 4501, 697, 7326, 6771, 6789, 683, 8400, 6275, 4573, 1244, 8404, 7675, 566, 13224, 8402, 13225, 8414, 8415, 8409, 8405, 8482, 4589, 10507, 2] */
|
||||
function _fun100864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13413:6, offset: 0x021fd72c, size: 503 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
const env0_7 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
object2.bounceOffset = {'position': 'absolute', 'top': -250, 'height': 250, 'right': 0, 'left': 0};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.title = {'alignSelf': 'center', 'color': null, 'margin': 25, color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
object2.nameplatePreviewContainer = {'width': '80%', 'alignSelf': 'center', 'justifyContent': 'center',
|
||||
'alignItems': 'center'};
|
||||
object2.nameplateGradientContainer = {width: '100%'};
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.nameplatePreviewGradient = {'position': 'absolute', 'width': '100%', 'height': '100%',
|
||||
color: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditNameplateActionSheet.tsx');
|
||||
exports.default = EditNameplateActionSheet;
|
||||
}
|
||||
|
||||
function EditNameplateInner({user, selectedNameplate, setSelectedNameplate, guildId}) { // fn#100865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13413:799, offset: 0x021fd923, size: 659 bytes, params: 2, frame: 29
|
||||
(require(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */).useGetOrFetchCollectiblesCategoriesAndPurchases();
|
||||
const isFetching = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore],
|
||||
function() {
|
||||
return CollectiblesPurchaseStore.isFetching;
|
||||
});
|
||||
const value3 = (importDefault(13224) /* metro dependency 13224: useNameplateSections */)();
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun100867);
|
||||
const profilePreviewValue = (require(8402) /* metro dependency 8402: ProfileCustomizationUtils */).getProfilePreviewValue({pendingValue: selectedNameplate,
|
||||
userValue: user == null || user.collectibles == null ? undefined : user.collectibles.nameplate,
|
||||
guildValue: value4 == null || value4.collectibles == null ? undefined : value4.collectibles.nameplate,
|
||||
guildId: guildId});
|
||||
const value6 = env0_4.useCallback(_fun100868, [setSelectedNameplate, guildId]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
let skuId = profilePreviewValue?.skuId;
|
||||
const items2 = [<NameplateActionSheetPreview previewSkuId={skuId} user={user} guildId={guildId} />];
|
||||
const EditCollectiblesPreviewDetails = importDefault(8414) /* metro dependency 8414: EditCollectiblesPreviewDetails */;
|
||||
const defaultImportProps = {user: user, previewSkuId: profilePreviewValue?.skuId};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
defaultImportProps.nitroJoinCTA = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['V+IE93']);
|
||||
defaultImportProps.nitroUpgradeCTA = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a6SrkR);
|
||||
items2[1] = <EditCollectiblesPreviewDetails {...defaultImportProps} />;
|
||||
const EditCollectiblesPickerList = (require(8415) /* metro dependency 8415: EditCollectiblesPickerList */).EditCollectiblesPickerList;
|
||||
skuId = selectedNameplate?.skuId;
|
||||
const COLLECTIBLE_ROW_HEIGHT = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).COLLECTIBLE_ROW_HEIGHT;
|
||||
items2[2] = <EditCollectiblesPickerList sections={value3} selectedSkuId={skuId} renderRow={value6} estimatedItemSize={COLLECTIBLE_ROW_HEIGHT} isFetching={isFetching} />;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function NameplateActionSheetPreview({previewSkuId, user, guildId}) { // fn#100869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13413:1895, offset: 0x021fdc19, size: 827 bytes, params: 2, frame: 38
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
let value2 = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(previewSkuId);
|
||||
let value3 = env0_4.useMemo(function() {
|
||||
var r1;
|
||||
var productBinding = product;
|
||||
var value2 = null;
|
||||
var value3 = undefined;
|
||||
r1 = value2 == productBinding ? value3 : product.items[0];
|
||||
r1 = value2 == r1 ? value2 == purchase ? value3 : purchase.items[0] : r1;
|
||||
return isNameplateRecord(r1) ? r1 : value2;
|
||||
}, [value2.purchase, value2.product]);
|
||||
const r4 = value3 != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.YJig7C,
|
||||
{a11y_text: value3.label}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aqlsGS);
|
||||
let nameplateGradientContainer = styles.nameplateGradientContainer;
|
||||
const NameplateDummyUserPreview = (require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview;
|
||||
const items2 = [<NameplateDummyUserPreview width={100} />];
|
||||
items2[1] = <NameplateDummyUserPreview width={140} />;
|
||||
items2[2] = ((Component) => <Component style={styles.nameplatePreviewGradient} start={{'x': 0,
|
||||
'y': 0.1}} end={{'x': 0, 'y': 0.8}} colors={[styles.nameplatePreviewGradient.color,
|
||||
'' + styles.nameplatePreviewGradient.color + '00']} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
const items3 = [<View style={nameplateGradientContainer}>{items2}</View>];
|
||||
const NameplatePreview = (require(10507) /* metro dependency 10507: NameplatePreview */).NameplatePreview;
|
||||
items3[1] = <NameplatePreview nameplate={value3} user={user} guildId={guildId} animate {...{['aria-hidden']: true}} />;
|
||||
nameplateGradientContainer = styles.nameplateGradientContainer;
|
||||
const items4 = [<NameplateDummyUserPreview width={140} />];
|
||||
items4[1] = <NameplateDummyUserPreview width={100} />;
|
||||
items4[2] = ((Component) => <Component style={styles.nameplatePreviewGradient} start={{'x': 0,
|
||||
'y': 0.2}} end={{'x': 0, 'y': 0.9}} colors={['' + styles.nameplatePreviewGradient.color + '00',
|
||||
styles.nameplatePreviewGradient.color]} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
items3[2] = <View style={nameplateGradientContainer}>{items4}</View>;
|
||||
return (
|
||||
<View
|
||||
style={styles.nameplatePreviewContainer}
|
||||
accessibilityLabel={r4}
|
||||
accessibilityRole="image"
|
||||
accessible
|
||||
>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function EditNameplateActionSheet({user, currentNameplate, guildId}) { // fn#100871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13413:3058, offset: 0x021fdf54, size: 633 bytes, params: 2, frame: 36
|
||||
const styles = useStyles();
|
||||
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
|
||||
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
|
||||
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
|
||||
let binding = env0_4;
|
||||
const [property, property2] = env0_3(binding.useState(undefined), 2);
|
||||
const r15 = property === undefined ? currentNameplate : property;
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
let EDIT_NAMEPLATE_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_NAMEPLATE_SHEET;
|
||||
const analyticsLocations = defaultImport(EDIT_NAMEPLATE_SHEET).analyticsLocations;
|
||||
binding = env0_4;
|
||||
const value5 = binding.useCallback(function() {
|
||||
var defaultImport = importDefault(dependencyMap[13]);
|
||||
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
||||
defaultImport.track(OPEN_POPOUT, {type: importDefault(dependencyMap[12]).EDIT_NAMEPLATE_SHEET,
|
||||
is_fullscreen: true});
|
||||
}, []);
|
||||
const value6 = binding.useCallback(_fun100873, [property, guildId]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const view = <View style={styles.bounceOffset} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const BwdeM1 = (require(1244) /* metro dependency 1244: indexNative */).t.BwdeM1;
|
||||
const view2 = <View style={styles.container}>{view}<Text variant="redesign/heading-18/bold" style={styles.title} accessibilityRole="header">{Reflect.apply(string,
|
||||
intl,
|
||||
[BwdeM1])}</Text><EditNameplateInner user={user} selectedNameplate={r15} setSelectedNameplate={property2} guildId={guildId} /></View>;
|
||||
const EditCollectiblesCTAButton = importDefault(8404) /* metro dependency 8404: EditCollectiblesCTAButton */;
|
||||
const defaultImport2Props = {user: user, currentSkuId: currentNameplate?.skuId, selectedSkuId: r15?.skuId,
|
||||
onApply: value6, analyticsLocations: analyticsLocations};
|
||||
EDIT_NAMEPLATE_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_NAMEPLATE_SHEET;
|
||||
defaultImport2Props.analyticsSource = EDIT_NAMEPLATE_SHEET;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<BottomSheet
|
||||
scrollable
|
||||
ref={bottomSheetRef}
|
||||
onExpand={value5}
|
||||
startExpanded
|
||||
>
|
||||
{view2}
|
||||
<EditCollectiblesCTAButton {...defaultImport2Props} />
|
||||
</BottomSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100868({items, size, selectedSkuId}) { // fn#100868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13413:1283, offset: 0x021fdbb6, size: 99 bytes, params: 2, frame: 16
|
||||
const EditNameplateRow = (require(13225) /* metro dependency 13225: EditNameplateSection */).EditNameplateRow;
|
||||
return (
|
||||
<EditNameplateRow
|
||||
items={items}
|
||||
size={size}
|
||||
selectedSkuId={selectedSkuId}
|
||||
setSelectedNameplate={setSelectedNameplate}
|
||||
guildId={guildId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100873() { // fn#100873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13413:3438, offset: 0x021fe21c, size: 73 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
|
||||
const value3 = null;
|
||||
value.setPendingChanges({guildId: guildId, nameplate: value3 != env0_1 ? env0_1 : value3});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
/* Metro module 13214; source: modules/user_profile/native/EditProfileEffectActionSheet.tsx; dependencies: [57, 31, 27, 5145, 5127, 661, 33, 4501, 697, 8490, 7326, 6771, 6789, 683, 7613, 8400, 6275, 4573, 1244, 8404, 7675, 566, 13215, 8402, 8491, 13216, 8414, 8415, 8409, 8405, 8488, 4589, 2] */
|
||||
function _fun100806(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:6, offset: 0x021fa056, size: 497 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
const env0_7 = (require(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
object2.bounceOffset = {'position': 'absolute', 'top': -250, 'height': 250, 'right': 0, 'left': 0};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.title = {'alignSelf': 'center', 'color': null, 'margin': 25, color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
object2.previewContainer = {'overflow': 'hidden', 'height': 300, 'alignItems': 'center'};
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['bottom'] = -1;
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object3['color'] = MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.previewGradient = object3;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditProfileEffectActionSheet.tsx');
|
||||
exports.default = EditProfileEffectActionSheet;
|
||||
}
|
||||
|
||||
function EditProfileEffectInner({user, selectedProfileEffect, setSelectedProfileEffect, guildId, isTryItOut}) { // fn#100807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:717, offset: 0x021fa247, size: 689 bytes, params: 2, frame: 29
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
(require(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */).useGetOrFetchCollectiblesCategoriesAndPurchases();
|
||||
const isFetching = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore],
|
||||
function() {
|
||||
return CollectiblesPurchaseStore.isFetching;
|
||||
});
|
||||
const value4 = (importDefault(13215) /* metro dependency 13215: useProfileEffectSections */)();
|
||||
const value5 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, guildId);
|
||||
const profilePreviewValue = (require(8402) /* metro dependency 8402: ProfileCustomizationUtils */).getProfilePreviewValue({pendingValue: selectedProfileEffect,
|
||||
userValue: value5 == null || value5._userProfile == null ? undefined : value5._userProfile.profileEffect,
|
||||
guildValue: value5 == null || value5._guildMemberProfile == null ? undefined : value5._guildMemberProfile.profileEffect,
|
||||
guildId: guildId});
|
||||
const binding = env0_4;
|
||||
binding.useEffect(_fun100809, [user]);
|
||||
const value7 = binding.useCallback(_fun100810, [setSelectedProfileEffect, guildId, isTryItOut]);
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
let skuId = profilePreviewValue?.skuId;
|
||||
const items2 = [<ProfileEffectSectionPreview previewSkuId={skuId} user={user} guildId={guildId} />];
|
||||
const EditCollectiblesPreviewDetails = importDefault(8414) /* metro dependency 8414: EditCollectiblesPreviewDetails */;
|
||||
const defaultImport2Props = {user: user, previewSkuId: profilePreviewValue?.skuId};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
defaultImport2Props.nitroJoinCTA = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pertpd);
|
||||
defaultImport2Props.nitroUpgradeCTA = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5eotIZ']);
|
||||
items2[1] = <EditCollectiblesPreviewDetails {...defaultImport2Props} />;
|
||||
const EditCollectiblesPickerList = (require(8415) /* metro dependency 8415: EditCollectiblesPickerList */).EditCollectiblesPickerList;
|
||||
skuId = selectedProfileEffect?.skuId;
|
||||
const COLLECTIBLE_ROW_HEIGHT = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).COLLECTIBLE_ROW_HEIGHT;
|
||||
items2[2] = <EditCollectiblesPickerList sections={value4} selectedSkuId={skuId} renderRow={value7} estimatedItemSize={COLLECTIBLE_ROW_HEIGHT} isFetching={isFetching} />;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ProfileEffectSectionPreview({previewSkuId, user, guildId}) { // fn#100811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:1952, offset: 0x021fa5cf, size: 329 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
let value2 = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(previewSkuId);
|
||||
let value3 = env0_4.useMemo(function() {
|
||||
var r1;
|
||||
var productBinding = product;
|
||||
var value2 = null;
|
||||
var value3 = undefined;
|
||||
r1 = value2 == productBinding ? value3 : product.items[0];
|
||||
r1 = value2 == r1 ? value2 == purchase ? value3 : purchase.items[0] : r1;
|
||||
return isProfileEffectRecord(r1) ? r1 : value2;
|
||||
}, [value2.purchase, value2.product]);
|
||||
let value = importDefault(8488) /* metro dependency 8488: ProfileEffectUserPreview */;
|
||||
value = ((Component) => <Component user={user} guildId={guildId} profileEffect={value3} maxWidth={250} />)(value);
|
||||
const items2 = [value];
|
||||
items2[1] = ((Component) => <Component style={styles.previewGradient} start={{'x': 0, 'y': 0.6}} end={{'x': 0,
|
||||
'y': 1}} colors={['' + styles.previewGradient.color + '00',
|
||||
styles.previewGradient.color]} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
return (
|
||||
<View style={styles.previewContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function EditProfileEffectActionSheet({user, currentProfileEffect, guildId, isTryItOut}) { // fn#100813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:2403, offset: 0x021fa718, size: 733 bytes, params: 2, frame: 38
|
||||
const env0_3 = undefined;
|
||||
const env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const value4 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id ?? '');
|
||||
const binding = env0_4;
|
||||
const [property, property2] = env0_3(binding.useState(currentProfileEffect), 2);
|
||||
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
|
||||
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
|
||||
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
let EDIT_PROFILE_EFFECT_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_PROFILE_EFFECT_SHEET;
|
||||
const analyticsLocations = defaultImport2(EDIT_PROFILE_EFFECT_SHEET).analyticsLocations;
|
||||
const value8 = binding.useCallback(_fun100815, [binding.useMemo(_fun100814, [guildId, value4])]);
|
||||
const value9 = binding.useCallback(_fun100816, [property, guildId, isTryItOut]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const view = <View style={styles.bounceOffset} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const view2 = <View style={styles.container}>{view}<Text variant="redesign/heading-18/bold" style={styles.title} accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/6nv6N'])}</Text><EditProfileEffectInner user={user} selectedProfileEffect={property} setSelectedProfileEffect={property2} guildId={guildId} isTryItOut={isTryItOut} /></View>;
|
||||
const EditCollectiblesCTAButton = importDefault(8404) /* metro dependency 8404: EditCollectiblesCTAButton */;
|
||||
const defaultImport3Props = {user: user, currentSkuId: currentProfileEffect?.skuId, selectedSkuId: property?.skuId,
|
||||
isTryItOut: isTryItOut, onApply: value9, analyticsLocations: analyticsLocations};
|
||||
EDIT_PROFILE_EFFECT_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_PROFILE_EFFECT_SHEET;
|
||||
defaultImport3Props.analyticsSource = EDIT_PROFILE_EFFECT_SHEET;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<BottomSheet
|
||||
scrollable
|
||||
ref={bottomSheetRef}
|
||||
onExpand={value8}
|
||||
startExpanded
|
||||
>
|
||||
{view2}
|
||||
<EditCollectiblesCTAButton {...defaultImport3Props} />
|
||||
</BottomSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100809() { // fn#100809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:1180, offset: 0x021fa4f8, size: 107 bytes, params: 1, frame: 17
|
||||
var value3;
|
||||
var defaultImport;
|
||||
if (!(user == null || user.isNonUserBot())) {
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */;
|
||||
userBinding = user;
|
||||
defaultImport(userBinding.id, userBinding.getAvatarURL(null, 80), {'withMutualGuilds': true,
|
||||
'dispatchWait': true});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100810({items, size, selectedSkuId}) { // fn#100810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:1317, offset: 0x021fa563, size: 108 bytes, params: 2, frame: 16
|
||||
const EditProfileEffectRow = (require(13216) /* metro dependency 13216: EditProfileEffectSection */).EditProfileEffectRow;
|
||||
return (
|
||||
<EditProfileEffectRow
|
||||
items={items}
|
||||
size={size}
|
||||
selectedSkuId={selectedSkuId}
|
||||
setSelectedProfileEffect={setSelectedProfileEffect}
|
||||
guildId={guildId}
|
||||
isTryItOut={isTryItOut}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100814() { // fn#100814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:2704, offset: 0x021fa9f5, size: 98 bytes, params: 1, frame: 14
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const EDIT_PROFILE_EFFECT_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_PROFILE_EFFECT_SHEET;
|
||||
object2.type = EDIT_PROFILE_EFFECT_SHEET;
|
||||
object2.guild_id = guildId;
|
||||
object2.profile_has_nitro_customization = env0_2 != null && (env0_2 == null ? value : env0_2.hasPremiumCustomization());
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun100815() { // fn#100815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:2874, offset: 0x021faa57, size: 75 bytes, params: 1, frame: 16
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_4, undefined);
|
||||
object2['is_fullscreen'] = true;
|
||||
Reflect.apply(track, defaultImport, [OPEN_POPOUT, object2]);
|
||||
}
|
||||
|
||||
function _fun100816() { // fn#100816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13404:2957, offset: 0x021faaa2, size: 126 bytes, params: 1, frame: 16
|
||||
var moduleValue;
|
||||
var value3;
|
||||
var moduleValue2;
|
||||
var value4;
|
||||
if (isTryItOut) {
|
||||
moduleValue2 = require(7613) /* metro dependency 7613: UserProfileActionCreators */;
|
||||
value4 = null;
|
||||
moduleValue2.setTryItOutProfileEffect(value4 != env0_3 ? env0_3 : value4);
|
||||
} else {
|
||||
moduleValue = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
|
||||
value3 = null;
|
||||
moduleValue.setPendingChanges({guildId: guildId, profileEffect: value3 != env0_3 ? env0_3 : value3});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
/* Metro module 13218; source: modules/user_profile/native/EditProfileFrameActionSheet.tsx; dependencies: [57, 31, 27, 5145, 5128, 661, 33, 4501, 697, 8490, 7326, 6771, 6789, 683, 8400, 6275, 4573, 1244, 8404, 7675, 566, 13219, 8402, 8491, 13220, 8414, 8415, 8409, 8405, 10094, 4589, 2] */
|
||||
function _fun100834(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:6, offset: 0x021fbc52, size: 497 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
const env0_7 = (require(5128) /* metro dependency 5128: ProfileFrameRecord */).isProfileFrameRecord;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
object2.bounceOffset = {'position': 'absolute', 'top': -250, 'height': 250, 'right': 0, 'left': 0};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.title = {'alignSelf': 'center', 'color': null, 'margin': 25, color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
object2.previewContainer = {'overflow': 'hidden', 'height': 300, 'alignItems': 'center'};
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['bottom'] = -1;
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object3['color'] = MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.previewGradient = object3;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditProfileFrameActionSheet.tsx');
|
||||
exports.default = EditProfileFrameActionSheet;
|
||||
}
|
||||
|
||||
function EditProfileFrameInner({user, selectedProfileFrame, setSelectedProfileFrame, guildId}) { // fn#100835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:715, offset: 0x021fbe43, size: 669 bytes, params: 2, frame: 29
|
||||
(require(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */).useGetOrFetchCollectiblesCategoriesAndPurchases();
|
||||
const isFetching = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore],
|
||||
function() {
|
||||
return CollectiblesPurchaseStore.isFetching;
|
||||
});
|
||||
const value3 = (importDefault(13219) /* metro dependency 13219: useProfileFrameSections */)();
|
||||
const value4 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, guildId);
|
||||
const profilePreviewValue = (require(8402) /* metro dependency 8402: ProfileCustomizationUtils */).getProfilePreviewValue({pendingValue: selectedProfileFrame,
|
||||
userValue: value4 == null || value4._userProfile == null ? undefined : value4._userProfile.profileFrame,
|
||||
guildValue: value4 == null || value4._guildMemberProfile == null ? undefined : value4._guildMemberProfile.profileFrame,
|
||||
guildId: guildId});
|
||||
const binding = env0_4;
|
||||
binding.useEffect(_fun100837, [user]);
|
||||
const value6 = binding.useCallback(_fun100838, [setSelectedProfileFrame, guildId]);
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
let skuId = profilePreviewValue?.skuId;
|
||||
const items2 = [<ProfileFrameSectionPreview previewSkuId={skuId} user={user} guildId={guildId} />];
|
||||
const EditCollectiblesPreviewDetails = importDefault(8414) /* metro dependency 8414: EditCollectiblesPreviewDetails */;
|
||||
const defaultImport2Props = {user: user, previewSkuId: profilePreviewValue?.skuId};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
defaultImport2Props.nitroJoinCTA = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JvNv+a']);
|
||||
defaultImport2Props.nitroUpgradeCTA = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hR2psy);
|
||||
items2[1] = <EditCollectiblesPreviewDetails {...defaultImport2Props} />;
|
||||
const EditCollectiblesPickerList = (require(8415) /* metro dependency 8415: EditCollectiblesPickerList */).EditCollectiblesPickerList;
|
||||
skuId = selectedProfileFrame?.skuId;
|
||||
const COLLECTIBLE_ROW_HEIGHT = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).COLLECTIBLE_ROW_HEIGHT;
|
||||
items2[2] = <EditCollectiblesPickerList sections={value3} selectedSkuId={skuId} renderRow={value6} estimatedItemSize={COLLECTIBLE_ROW_HEIGHT} isFetching={isFetching} />;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ProfileFrameSectionPreview({previewSkuId, user, guildId}) { // fn#100839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:1911, offset: 0x021fc1ae, size: 332 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
let value2 = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(previewSkuId);
|
||||
let value3 = env0_4.useMemo(function() {
|
||||
var r1;
|
||||
var productBinding = product;
|
||||
var value2 = null;
|
||||
var value3 = undefined;
|
||||
r1 = value2 == productBinding ? value3 : product.items[0];
|
||||
r1 = value2 == r1 ? value2 == purchase ? value3 : purchase.items[0] : r1;
|
||||
return isProfileFrameRecord(r1) ? r1 : value2;
|
||||
}, [value2.purchase, value2.product]);
|
||||
let value = importDefault(10094) /* metro dependency 10094: ProfileFrameUserPreview */;
|
||||
value = ((Component) => <Component user={user} guildId={guildId} profileFrame={value3} maxWidth={280} />)(value);
|
||||
const items2 = [value];
|
||||
items2[1] = ((Component) => <Component style={styles.previewGradient} start={{'x': 0, 'y': 0.6}} end={{'x': 0,
|
||||
'y': 1}} colors={['' + styles.previewGradient.color + '00',
|
||||
styles.previewGradient.color]} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
return (
|
||||
<View style={styles.previewContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function EditProfileFrameActionSheet({user, currentProfileFrame, guildId}) { // fn#100841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:2361, offset: 0x021fc2fa, size: 706 bytes, params: 2, frame: 37
|
||||
const env0_3 = undefined;
|
||||
const styles = useStyles();
|
||||
const value4 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id ?? '');
|
||||
const binding = env0_4;
|
||||
const [property, property2] = env0_3(binding.useState(currentProfileFrame), 2);
|
||||
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
|
||||
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
|
||||
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
let EDIT_PROFILE_FRAME_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_PROFILE_FRAME_SHEET;
|
||||
const analyticsLocations = defaultImport2(EDIT_PROFILE_FRAME_SHEET).analyticsLocations;
|
||||
const value8 = binding.useCallback(_fun100843, [binding.useMemo(_fun100842, [guildId, value4])]);
|
||||
const value9 = binding.useCallback(_fun100844, [property, guildId]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const view = <View style={styles.bounceOffset} />;
|
||||
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const view2 = <View style={styles.container}>{view}<Heading variant="redesign/heading-18/bold" style={styles.title}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oTSa/q'])}</Heading><EditProfileFrameInner user={user} selectedProfileFrame={property} setSelectedProfileFrame={property2} guildId={guildId} /></View>;
|
||||
const EditCollectiblesCTAButton = importDefault(8404) /* metro dependency 8404: EditCollectiblesCTAButton */;
|
||||
const defaultImport3Props = {user: user, currentSkuId: currentProfileFrame?.skuId, selectedSkuId: property?.skuId,
|
||||
onApply: value9, analyticsLocations: analyticsLocations};
|
||||
EDIT_PROFILE_FRAME_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_PROFILE_FRAME_SHEET;
|
||||
defaultImport3Props.analyticsSource = EDIT_PROFILE_FRAME_SHEET;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<BottomSheet
|
||||
scrollable
|
||||
ref={bottomSheetRef}
|
||||
onExpand={value8}
|
||||
startExpanded
|
||||
>
|
||||
{view2}
|
||||
<EditCollectiblesCTAButton {...defaultImport3Props} />
|
||||
</BottomSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100837() { // fn#100837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:1158, offset: 0x021fc0e0, size: 107 bytes, params: 1, frame: 17
|
||||
var value3;
|
||||
var defaultImport;
|
||||
if (!(user == null || user.isNonUserBot())) {
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */;
|
||||
userBinding = user;
|
||||
defaultImport(userBinding.id, userBinding.getAvatarURL(null, 80), {'withMutualGuilds': true,
|
||||
'dispatchWait': true});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100838({items, size, selectedSkuId}) { // fn#100838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:1295, offset: 0x021fc14b, size: 99 bytes, params: 2, frame: 16
|
||||
const EditProfileFrameRow = (require(13220) /* metro dependency 13220: EditProfileFrameSection */).EditProfileFrameRow;
|
||||
return (
|
||||
<EditProfileFrameRow
|
||||
items={items}
|
||||
size={size}
|
||||
selectedSkuId={selectedSkuId}
|
||||
setSelectedProfileFrame={setSelectedProfileFrame}
|
||||
guildId={guildId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100842() { // fn#100842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:2646, offset: 0x021fc5bc, size: 98 bytes, params: 1, frame: 14
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const EDIT_PROFILE_FRAME_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_PROFILE_FRAME_SHEET;
|
||||
object2.type = EDIT_PROFILE_FRAME_SHEET;
|
||||
object2.guild_id = guildId;
|
||||
object2.profile_has_nitro_customization = env0_1 != null && (env0_1 == null ? value : env0_1.hasPremiumCustomization());
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun100843() { // fn#100843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:2815, offset: 0x021fc61e, size: 75 bytes, params: 1, frame: 16
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_3, undefined);
|
||||
object2['is_fullscreen'] = true;
|
||||
Reflect.apply(track, defaultImport, [OPEN_POPOUT, object2]);
|
||||
}
|
||||
|
||||
function _fun100844() { // fn#100844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13408:2898, offset: 0x021fc669, size: 73 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
|
||||
const value3 = null;
|
||||
value.setPendingChanges({guildId: guildId, profileFrame: value3 != env0_2 ? env0_2 : value3});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/* Metro module 13200; source: modules/user_profile/native/EditUserProfileAvatar.tsx; dependencies: [31, 4502, 33, 4501, 6771, 6789, 3802, 8398, 8403, 13201, 4080, 13202, 1962, 13203, 13203, 8396, 8402, 566, 4017, 4504, 8417, 5278, 1244, 13204, 1305, 2] */
|
||||
function _fun100732(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:6, offset: 0x021f5a7b, size: 230 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({editIcon: {'position': 'absolute',
|
||||
'right': -3}});
|
||||
object = {code: 'function EditUserProfileAvatarTsx1(){const{rotation}=this.__closure;return{transform:[{rotateZ:rotation.get()+"deg"}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditUserProfileAvatar.tsx');
|
||||
exports.default = EditUserProfileAvatar;
|
||||
}
|
||||
|
||||
function EditUserProfileAvatar({user, disabled, statusStyle, style, avatarStyle, editIconStyle, disableStatus, isTryItOut, autoStartEditFlow, size}) { // fn#100733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:439, offset: 0x021f5b61, size: 1012 bytes, params: 2, frame: 37
|
||||
disableStatus = disableStatus === undefined || disableStatus;
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
autoStartEditFlow = !(autoStartEditFlow === undefined) && autoStartEditFlow;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const EDIT_AVATAR = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_AVATAR;
|
||||
const analyticsLocations = defaultImport(EDIT_AVATAR).analyticsLocations;
|
||||
const env0_3 = analyticsLocations;
|
||||
const r14 = !(importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseAnimatedAvatar(user) && !isTryItOut;
|
||||
const {pendingAvatar, pendingAvatarDecoration,
|
||||
setPendingAvatar} = (importDefault(8398) /* metro dependency 8398: usePendingAvatarSettings */)({isTryItOut: isTryItOut,
|
||||
analyticsLocations: analyticsLocations});
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
||||
image: pendingAvatar});
|
||||
const r4 = pendingAvatarDecoration !== undefined ? pendingAvatarDecoration : user.avatarDecoration;
|
||||
const value6 = (importDefault(13201) /* metro dependency 13201: useUploadAvatar */)({isTryItOut: isTryItOut,
|
||||
analyticsLocations: analyticsLocations});
|
||||
const env0_8 = value6;
|
||||
const binding = env0_3;
|
||||
const value7 = binding.useCallback(_fun100734, [user, analyticsLocations, pendingAvatar, setPendingAvatar, value6,
|
||||
r14, r4, isTryItOut]);
|
||||
const env0_10 = binding.useRef(false);
|
||||
binding.useEffect(_fun100738, [user, autoStartEditFlow, value7]);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = EditUserProfileAvatarZ;
|
||||
closure.__closure = {rotation: value8};
|
||||
closure.__workletHash = 13368223692459;
|
||||
closure.__initData = env0_8;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
binding.useEffect(_fun100741, [value8]);
|
||||
const value10 = ((Component) => <Component style={avatarStyle} user={user} pendingAvatarSrc={pendingAvatarSrc} pendingAvatarDecoration={pendingAvatarDecoration} statusStyle={statusStyle} disableStatus={disableStatus} size={size} />)(importDefault(8417) /* metro dependency 8417: HeaderAvatar */);
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const MUgHIN = (require(1244) /* metro dependency 1244: indexNative */).t.MUgHIN;
|
||||
const r5 = isTryItOut ? pendingAvatarDecoration != null || useReducedMotion ? value10 : ((View) => <View style={value9}>{value10}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View) : value10;
|
||||
const EditIcon = importDefault(13204) /* metro dependency 13204: EditIcon */;
|
||||
const items2 = [styles.editIcon, editIconStyle];
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const EDIT_AVATAR_DECORATION = AvatarSizes.EDIT_AVATAR_DECORATION;
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={style}
|
||||
disabled={disabled}
|
||||
onPress={value7}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={Reflect.apply(string, intl, [MUgHIN])}
|
||||
>
|
||||
{r5}
|
||||
<EditIcon style={items2} size={size !== EDIT_AVATAR_DECORATION ? 'xs' : 'sm'} />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100734() { // fn#100734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:972, offset: 0x021f5f55, size: 184 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[10]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[12]);
|
||||
value = value(dependencyMap[11], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.showAnimatedAvatarUpsell = env0_4;
|
||||
object2.handleRemoveAvatarSelect = handleRemoveAvatarSelect;
|
||||
object2.handleUploadAvatarSelect = env0_8;
|
||||
object2.handleUploadGIFAvatarSelect = handleUploadGIFAvatarSelect;
|
||||
object2.handleEditAvatarDecorationSelect = handleEditAvatarDecorationSelect;
|
||||
const moduleValue = require(dependencyMap[16]);
|
||||
object2.showRemoveAvatar = moduleValue.showRemoveAvatar(pendingAvatar, user.avatar);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'Change Avatar', object2]);
|
||||
}
|
||||
|
||||
function _fun100738() { // fn#100738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1684, offset: 0x021f613b, size: 51 bytes, params: 1, frame: 10
|
||||
if (autoStartEditFlow && !env0_10.current) {
|
||||
env0_10.current = true;
|
||||
env0_9();
|
||||
}
|
||||
}
|
||||
|
||||
function EditUserProfileAvatarZ() { // fn#100740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1861, owner: EditUserProfileAvatar.z, offset: 0x021f616e, size: 68 bytes, params: 1, frame: 15
|
||||
const object = {};
|
||||
object.rotateZ = '' + env0_11.get() + 'deg';
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function _fun100741() { // fn#100741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:2005, offset: 0x021f61b2, size: 164 bytes, params: 1, frame: 22
|
||||
var environment;
|
||||
const binding = env0_11;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withRepeat = value.withRepeat;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withRepeat, value, [Reflect.apply(withTiming, timingModule, [360,
|
||||
{duration: 3000, easing: Reflect.apply(inOut, Easing, [Easing2.quad])}]), -1])]);
|
||||
return _fun100742;
|
||||
}
|
||||
|
||||
function handleRemoveAvatarSelect() { // fn#100735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1088, offset: 0x021f600d, size: 51 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
value = environment.__proto__;
|
||||
setPendingAvatar(null);
|
||||
}
|
||||
|
||||
function handleUploadGIFAvatarSelect() { // fn#100736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1184, offset: 0x021f6040, size: 182 bytes, params: 1, frame: 19
|
||||
importDefault(dependencyMap[10]).hideActionSheet();
|
||||
const defaultImport2 = importDefault(dependencyMap[10]);
|
||||
const openLazy = defaultImport2.openLazy;
|
||||
const value2 = require(dependencyMap[12])(dependencyMap[13], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
const ProfileAssetType = require(dependencyMap[14]).ProfileAssetType;
|
||||
const AVATAR = ProfileAssetType.AVATAR;
|
||||
object2.profileAssetType = AVATAR;
|
||||
const isTryItOutBinding = isTryItOut;
|
||||
const GIFSelectionContext = require(dependencyMap[14]).GIFSelectionContext;
|
||||
object2.selectionContext = isTryItOutBinding ? GIFSelectionContext.PROFILE_TRY_IT_OUT : GIFSelectionContext.PROFILE_EDIT;
|
||||
Reflect.apply(openLazy, defaultImport2, [value2, 'Select GIF Avatar', object2]);
|
||||
}
|
||||
|
||||
function handleEditAvatarDecorationSelect() { // fn#100737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1474, offset: 0x021f60f6, size: 69 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(8396) /* metro dependency 8396: AvatarDecorationUtils */).openAvatarDecorationActionSheet({user: user,
|
||||
currentAvatarDecoration: env1_7, analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun100742() { // fn#100742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:2132, offset: 0x021f6256, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_11);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/* Metro module 10473; source: modules/user_profile/native/EditWishlistActionSheet.tsx; dependencies: [57, 31, 27, 4502, 10035, 10036, 1878, 5189, 8516, 6276, 33, 4501, 697, 4017, 4504, 566, 1585, 6771, 6789, 10377, 10378, 8354, 10344, 10039, 8515, 8694, 1244, 6277, 6231, 6808, 8141, 10450, 8341, 4071, 2] */
|
||||
function _fun81030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:6, offset: 0x01e96567, size: 681 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
const env0_6 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const wishlistStore = importDefault(10035) /* metro dependency 10035: WishlistStore */;
|
||||
const env0_9 = (require(10036) /* metro dependency 10036: WishlistRecord */).getWishlistProductLines;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const env0_12 = (require(8516) /* metro dependency 8516: Constants */).TrackUserProfileWishlistActions;
|
||||
const env0_13 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.container = {flex: 1, paddingHorizontal: PX_16};
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object2.loadingContainer = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', paddingTop: PX_48};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.toggleRow = {marginBottom: PX_16};
|
||||
object2.itemsContainer = {'alignSelf': 'center', 'flexDirection': 'row', 'flexWrap': 'wrap', 'gap': 16};
|
||||
object2.itemWrapper = {position: 'relative'};
|
||||
const object3 = {position: 'absolute'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.top = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.right = PX_8;
|
||||
object3.zIndex = 1;
|
||||
object2.deleteButton = object3;
|
||||
const env0_16 = Reflect.apply(createStyles, value, [object2]);
|
||||
const LinearTransition = (require(4017) /* metro dependency 4017: ReanimatedRexport */).LinearTransition;
|
||||
value = LinearTransition.springify();
|
||||
value = value.mass(0.8);
|
||||
value = value.damping(100);
|
||||
const env0_17 = value.stiffness(300);
|
||||
object2 = {code: 'function exitingAnimation_EditWishlistActionSheetTsx1(_values){const{withTiming}=this.__closure;return{animations:{opacity:withTiming(0,{duration:150}),transform:[{scale:withTiming(0.8,{duration:150})}]},initialValues:{opacity:1,transform:[{scale:1}]}};}'};
|
||||
const env0_19 = _fun81031();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditWishlistActionSheet.tsx');
|
||||
exports.default = EditWishlistActionSheet;
|
||||
}
|
||||
|
||||
function _fun81031() { // fn#81031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:1119, offset: 0x01e96810, size: 79 bytes, params: 1, frame: 14
|
||||
const closure = exitingAnimation;
|
||||
const object2 = {};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 17293915965800;
|
||||
closure.__initData = env0_18;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function EditWishlistActionSheet({wishlistId, analyticsContext, analyticsLocations}) { // fn#81033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:1599, offset: 0x01e968f5, size: 1168 bytes, params: 2, frame: 40
|
||||
var object4;
|
||||
const styles = useStyles();
|
||||
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const r9 = analyticsLocations ?? [];
|
||||
const USER_PROFILE_EDIT_WISHLIST_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_EDIT_WISHLIST_ACTION_SHEET;
|
||||
analyticsLocations = defaultImport(r9, USER_PROFILE_EDIT_WISHLIST_ACTION_SHEET).analyticsLocations;
|
||||
const env0_4 = analyticsLocations;
|
||||
const value4 = (importDefault(10377) /* metro dependency 10377: useCardGridLayout */)({maxWidth: ACTION_SHEET_MAX_WIDTH});
|
||||
const env0_5 = value4.cardWidth;
|
||||
const rowWidth = value4.rowWidth;
|
||||
const r19 = rowWidth != null ? {width: rowWidth} : undefined;
|
||||
const wishlist = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], function() {
|
||||
return WishlistStore.getWishlist(wishlistId);
|
||||
});
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], function() {
|
||||
return WishlistStore.isFetching(wishlistId);
|
||||
});
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, UserProfileStore],
|
||||
_fun81037);
|
||||
let binding = env0_4;
|
||||
const [property, env0_9] = env0_3(binding.useState(true), 2);
|
||||
binding.useEffect(_fun81038, [value6?.visibility]);
|
||||
const value9 = (require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'edit_wishlist_action_sheet'});
|
||||
binding = env0_4;
|
||||
const value10 = binding.useMemo(_fun81039, [wishlist, value9]);
|
||||
const value11 = binding.useCallback(_fun81041, [wishlistId, property, wishlist, analyticsContext,
|
||||
analyticsLocations]);
|
||||
const env0_11 = binding.useCallback(_fun81042, [wishlistId, analyticsLocations]);
|
||||
const UserProfileStackedActionSheet = importDefault(8694) /* metro dependency 8694: UserProfileStackedActionSheet */;
|
||||
object4 = {'scrollable': true, 'startExpanded': true};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object4.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OEgx/4']);
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const object2 = {paddingBottom: bottom};
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
||||
return (
|
||||
<UserProfileStackedActionSheet {...object4}>
|
||||
<BottomSheetScrollView contentContainerStyle={object2}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.toggleRow}>
|
||||
<TableRowGroup hasIcons={false}>
|
||||
<TableSwitchRow
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.b2nFyA)}
|
||||
subLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dw58pE)}
|
||||
value={property}
|
||||
onValueChange={value11}
|
||||
/>
|
||||
</TableRowGroup>
|
||||
</View>
|
||||
{value5 && wishlist == null ? <View style={styles.loadingContainer}><ActivityIndicator /></View> : value10.length === 0 ? null : <View style={[styles.itemsContainer,
|
||||
r19]}>{value10.map(_fun81043)}</View>}
|
||||
</View>
|
||||
</BottomSheetScrollView>
|
||||
</UserProfileStackedActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function exitingAnimation() { // fn#81032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:1151, offset: 0x01e9685f, size: 150 bytes, params: 1, frame: 20
|
||||
const object = {};
|
||||
const value = environment.__proto__;
|
||||
object.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0, {duration: 150});
|
||||
const object3 = {};
|
||||
object3.scale = (require(4504) /* metro dependency 4504: timing */).withTiming(0.8, {duration: 150});
|
||||
object.transform = [object3];
|
||||
return {animations: object, initialValues: {opacity: 1, transform: [{scale: 1}]}};
|
||||
}
|
||||
|
||||
function _fun81037() { // fn#81037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:2102, offset: 0x01e96d85, size: 55 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const value3 = null;
|
||||
return value3 != currentUser ? UserProfileStore.getWishlistSettings(currentUser.id, wishlistId) : value3;
|
||||
}
|
||||
|
||||
function _fun81038() { // fn#81038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:2238, offset: 0x01e96dbc, size: 94 bytes, params: 1, frame: 14
|
||||
var binding;
|
||||
const value2 = undefined;
|
||||
let visibility = env0_7 == null ? value2 : env0_7.visibility;
|
||||
if (visibility != null) {
|
||||
binding = env0_9;
|
||||
visibility = env0_7.visibility;
|
||||
value = environment.__proto__;
|
||||
binding(visibility === (require(10378) /* metro dependency 10378: WishlistVisibility */).WishlistVisibility.PUBLIC);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun81039() { // fn#81039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:2489, offset: 0x01e96e1a, size: 57 bytes, params: 1, frame: 13
|
||||
let r0 = wishlist == null ? undefined : wishlist.items.filter(_fun81040);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun81041() { // fn#81041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:2697, offset: 0x01e96e92, size: 242 bytes, params: 1, frame: 18
|
||||
const binding = env0_8;
|
||||
const value3 = undefined;
|
||||
const WishlistVisibility = (require(10378) /* metro dependency 10378: WishlistVisibility */).WishlistVisibility;
|
||||
const r5 = binding ? WishlistVisibility.PRIVATE : WishlistVisibility.PUBLIC;
|
||||
env0_9(!env0_8);
|
||||
const defaultImport = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
|
||||
const updateWishlistVisibility = defaultImport.updateWishlistVisibility;
|
||||
const wishlistIdBinding = wishlistId;
|
||||
Reflect.apply(updateWishlistVisibility, defaultImport, [wishlistIdBinding, r5]);
|
||||
const userProfileAnalyticsUtilsModule = require(8515) /* metro dependency 8515: UserProfileAnalyticsUtils */;
|
||||
const trackUserProfileWishlistAction = userProfileAnalyticsUtilsModule.trackUserProfileWishlistAction;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, analyticsContext, undefined);
|
||||
object2['analyticsLocations'] = analyticsLocations;
|
||||
object2['wishlistId'] = wishlistIdBinding;
|
||||
object2['action'] = env0_8 ? TrackUserProfileWishlistActions.WISHLIST_TOGGLE_PRIVATE : TrackUserProfileWishlistActions.WISHLIST_TOGGLE_PUBLIC;
|
||||
object2['productLines'] = wishlist != null ? getWishlistProductLines(wishlist) : value3;
|
||||
Reflect.apply(trackUserProfileWishlistAction, userProfileAnalyticsUtilsModule, [object2]);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun81042(a0) { // fn#81042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:3033, offset: 0x01e96f84, size: 54 bytes, params: 2, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
|
||||
value.removeSkuFromWishlist(wishlistId, a0, analyticsLocations);
|
||||
}
|
||||
|
||||
function _fun81043(a0) { // fn#81043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:3665, offset: 0x01e96fba, size: 485 bytes, params: 2, frame: 30
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const defaultImportProps = {style: styles.itemWrapper, exiting: useReducedMotion ? value2 : env1_19,
|
||||
layout: useReducedMotion ? value2 : env1_17};
|
||||
const value4 = ((Component) => <Component item={a0} size={cardWidth} accessibilityHidden />)(importDefault(10450) /* metro dependency 10450: WishlistItemCard */);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const object = {'variant': 'primary-overlay', 'size': 'sm'};
|
||||
const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon;
|
||||
const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL;
|
||||
object.icon = <TrashIcon size="sm" color={ICON_FEEDBACK_CRITICAL} />;
|
||||
object.onPress = onPress_81044;
|
||||
const isOwned = a0.isOwned;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['IBBF8/'],
|
||||
{productName: a0.skuName});
|
||||
object.accessibilityLabel = isOwned ? '' + value + ', ' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj']) : value;
|
||||
return (
|
||||
<ReanimatedNativeView {...defaultImportProps} key={a0.skuId}>
|
||||
{value4}
|
||||
<View style={styles.deleteButton}>
|
||||
<IconButton {...object} />
|
||||
</View>
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81040(a0) { // fn#81040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:2547, offset: 0x01e96e53, size: 63 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(10344) /* metro dependency 10344: WishlistUtils */).isEligibleWishlistItemOnMobile(a0,
|
||||
{isWishlistOwner: true, isSocialLayerStorefrontMobilePurchasingEnabled: env1_10});
|
||||
}
|
||||
|
||||
function onPress_81044() { // fn#81044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10659:3984, offset: 0x01e9719f, size: 28 bytes, params: 1, frame: 11
|
||||
return env1_11(env0_0.skuId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
/* Metro module 13238; source: modules/user_profile/native/GuildProfileEditForm.tsx; dependencies: [29, 31, 27, 1945, 5189, 6816, 661, 1880, 33, 3802, 6771, 6789, 13184, 4080, 13185, 1962, 8402, 1244, 8400, 7882, 8496, 13195, 6996, 5463, 697, 10302, 13233, 566, 8490, 6882, 8501, 8403, 12687, 13239, 8494, 8497, 4573, 3868, 13240, 8511, 8513, 8695, 13205, 3995, 13206, 13210, 13212, 13213, 13217, 13221, 13231, 5080, 7028, 7940, 2] */
|
||||
function _fun100965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:6, offset: 0x022023c6, size: 405 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['nick', 'bio', 'guild_tag'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.ScrollView;
|
||||
const env0_7 = value.View;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const env0_10 = (require(6816) /* metro dependency 6816: Constants */).FLOATING_UPSELL_HEIGHT;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = value.AnalyticsObjects;
|
||||
const AnalyticsPages = value.AnalyticsPages;
|
||||
const AnalyticsSections = value.AnalyticsSections;
|
||||
const env0_13 = value.BIO_MAX_LENGTH;
|
||||
const env0_14 = value.DISPLAY_NAME_MAX_LENGTH;
|
||||
const env0_15 = value.PRONOUNS_MAX_LENGTH;
|
||||
const env0_16 = value.UpsellTypes;
|
||||
const env0_17 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_18 = value.jsx;
|
||||
const env0_19 = value.jsxs;
|
||||
object2 = {};
|
||||
const USER_SETTINGS = AnalyticsPages.USER_SETTINGS;
|
||||
object2.page = USER_SETTINGS;
|
||||
const SETTINGS_CUSTOMIZE_PROFILE = AnalyticsSections.SETTINGS_CUSTOMIZE_PROFILE;
|
||||
object2.section = SETTINGS_CUSTOMIZE_PROFILE;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/GuildProfileEditForm.tsx');
|
||||
exports.default = GuildProfileEditForm;
|
||||
}
|
||||
|
||||
function EditGuildProfileBanner({user, displayProfile, guildId, guildMember, guildMemberProfile, pendingAvatarSrc, pendingBanner, pendingThemeColors, disabled}) { // fn#100966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:513, offset: 0x0220255b, size: 346 bytes, params: 2, frame: 27
|
||||
const canUsePremiumGuildMemberProfile2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumGuildMemberProfile(user);
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const EDIT_BANNER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_BANNER;
|
||||
const analyticsLocations = defaultImport2(EDIT_BANNER).analyticsLocations;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const UserProfileEditBannerButton = importDefault(13184) /* metro dependency 13184: UserProfileEditBannerButton */;
|
||||
const defaultImport3Props = {user: user, displayProfile: displayProfile, pendingBanner: pendingBanner,
|
||||
pendingAvatarSrc: pendingAvatarSrc, pendingThemeColors: pendingThemeColors, showProfilePreviewButton: false,
|
||||
showEditButton: canUsePremiumGuildMemberProfile2 && guildMember != null, onPressEdit: onPressEdit};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
defaultImport3Props.editButtonAccessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['95hPAe']);
|
||||
defaultImport3Props.editDisabled = disabled;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<UserProfileEditBannerButton {...defaultImport3Props} />
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildProfileEditForm({currentUser}) { // fn#100969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:1750, offset: 0x0220285f, size: 3393 bytes, params: 2, frame: 79
|
||||
var object5;
|
||||
var r30;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var UserProfileEditFormTextField;
|
||||
var object30;
|
||||
var UserProfileUpsellCard;
|
||||
var object36;
|
||||
var items10;
|
||||
var object2;
|
||||
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value4 = (importDefault(13195) /* metro dependency 13195: UserProfileEditFormSharedStyles */)();
|
||||
const value5 = (importDefault(6996) /* metro dependency 6996: useKeyboardIsOpen */)();
|
||||
const binding = env0_5;
|
||||
const value7 = binding.useRef(null);
|
||||
const value8 = binding.useRef(null);
|
||||
const value9 = binding.useRef(null);
|
||||
const value10 = binding.useRef(null);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const defaultImport2 = importDefault(10302) /* metro dependency 10302: useSafeAreaAvoidingInputsNative */;
|
||||
object5 = {insets: insets};
|
||||
const items3 = [{ref: value8, offset: {type: 'toRef', ref: value9, extraOffset: PX_16}}];
|
||||
items3[1] = {ref: value9, offset: {type: 'toRef', ref: value10, extraOffset: PX_16}};
|
||||
const object3 = {ref: value10};
|
||||
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
|
||||
object3.offset = {type: 'toValue', value: PX_64};
|
||||
items3[2] = object3;
|
||||
object5.inputs = items3;
|
||||
object5.scrollViewRef = value7;
|
||||
const onFocus = defaultImport2(object5).onFocus;
|
||||
const {guild, errors, isDisabled, pendingNickname, pendingAvatar, pendingBanner, pendingThemeColors,
|
||||
pendingPronouns, pendingBio, pendingAvatarDecoration, pendingProfileEffect, pendingProfileFrame,
|
||||
pendingNameplate,
|
||||
pendingDisplayNameStyles} = (importDefault(13233) /* metro dependency 13233: useGuildProfileEditForm */)();
|
||||
const value12 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun100970);
|
||||
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore], _fun100971);
|
||||
const value14 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(currentUser.id, guild?.id);
|
||||
const value15 = (require(6882) /* metro dependency 6882: userSettingToActivity */).useCustomStatusActivity();
|
||||
const value16 = (importDefault(8501) /* metro dependency 8501: useBadges */)(value14);
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: currentUser.id,
|
||||
image: pendingAvatar});
|
||||
const guildActionSheetUtilsModule = require(12687) /* metro dependency 12687: GuildActionSheetUtils */;
|
||||
const useGuildActionSheetPermissions = guildActionSheetUtilsModule.useGuildActionSheetPermissions;
|
||||
const canEditNickname = Reflect.apply(useGuildActionSheetPermissions, guildActionSheetUtilsModule,
|
||||
[guild]).canEditNickname;
|
||||
const canUsePremiumGuildMemberProfile2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumGuildMemberProfile(currentUser);
|
||||
const guildIdentitySettingsUtilsModule = require(13239) /* metro dependency 13239: GuildIdentitySettingsUtils */;
|
||||
const canResetThemeColors2 = guildIdentitySettingsUtilsModule.canResetThemeColors(pendingThemeColors,
|
||||
value13?.themeColors);
|
||||
const value18 = !canUsePremiumGuildMemberProfile2;
|
||||
let r9 = canUsePremiumGuildMemberProfile2 ? value18 : !value5;
|
||||
let nick = value12?.nick;
|
||||
const value20 = '';
|
||||
let r57 = nick ?? value20;
|
||||
let r53 = value13?.pronouns ?? value20;
|
||||
const r52 = (value14 == null ? undefined : value14._userProfile.pronouns) ?? value20;
|
||||
r53 = pendingPronouns ?? r53;
|
||||
let bio = value13?.bio;
|
||||
let r47 = bio ?? value20;
|
||||
const r45 = (value14 == null ? undefined : value14._userProfile.bio) ?? value20;
|
||||
const defaultImport5 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const USER_SETTINGS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_SETTINGS;
|
||||
const env0_2 = defaultImport5([USER_SETTINGS]).analyticsLocations;
|
||||
const {theme, primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: currentUser,
|
||||
displayProfile: value14, pendingThemeColors: pendingThemeColors});
|
||||
const {gradientFallbackBackground, gradientSecondaryBackground, containerBackground,
|
||||
avatarBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
const bottom = insets.bottom;
|
||||
const FLOATING_UPSELL_HEIGHT2 = r9 ? FLOATING_UPSELL_HEIGHT : 0;
|
||||
const value24 = bottom + FLOATING_UPSELL_HEIGHT2;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const value25 = value24 + PX_16;
|
||||
object5 = {backgroundColor: avatarBackground};
|
||||
nick = errors.nick;
|
||||
bio = errors.bio;
|
||||
const guild_tag = errors.guild_tag;
|
||||
const value26 = env0_4(errors, env0_3);
|
||||
const r59 = nick?.[0];
|
||||
const r55 = errors.pronouns?.[0];
|
||||
const r50 = bio?.[0];
|
||||
let r29 = guild_tag?.[0];
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const items2 = [value4.container];
|
||||
items2[1] = {backgroundColor: gradientSecondaryBackground};
|
||||
const view = <View style={value4.bounceOffset} />;
|
||||
const object4 = {backgroundColor: gradientSecondaryBackground};
|
||||
const editGuildProfileBanner = <EditGuildProfileBanner user={currentUser} displayProfile={value14} guildId={guild.id} guildMember={value12} guildMemberProfile={value13} pendingAvatarSrc={pendingAvatarSrc} pendingBanner={pendingBanner} pendingThemeColors={pendingThemeColors} disabled={isDisabled} />;
|
||||
const view2 = <View style={[value3.avatarBackground, value3.avatarPosition, value4.avatarContainer,
|
||||
object5]}>{((Component) => <Component userId={currentUser.id} disabled={isDisabled || value18} disableStatus={false} guildId={guild?.id} statusStyle={object5} />)(importDefault(13240) /* metro dependency 13240: EditGuildIdentityAvatar */)}</View>;
|
||||
const UserProfileGradientContainer = importDefault(8511) /* metro dependency 8511: UserProfileGradientContainer */;
|
||||
const items6 = [value3.profileContentWrapper];
|
||||
items6[1] = value3.profileContent;
|
||||
items6[2] = {paddingTop: 0, paddingBottom: value25};
|
||||
const items7 = [((Component) => <Component customStatusActivity={value15} hasCustomProfileTheme={primaryColor != null} style={value3.customStatusBubble} emojiOnlyStyle={value3.emojiOnlyCustomStatusBubble} editEnabled />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */)];
|
||||
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
||||
let r63 = pendingNickname ?? r57;
|
||||
items7[1] = <UserProfilePrimaryInfo user={currentUser} displayName={r63} pronouns={value20 === r53 ? r52 : r53} badges={value16} badgeContainerBackground={containerBackground} displayNameAccessibilityRole="header" guildId={guild.id} pendingDisplayNameStyles={pendingDisplayNameStyles} />;
|
||||
const items8 = [value4.formContainer];
|
||||
items8[1] = {backgroundColor: containerBackground, paddingBottom: 20};
|
||||
if (r50 != null) {
|
||||
r30 = null;
|
||||
} else if (r59 != null) {
|
||||
r30 = null;
|
||||
} else {
|
||||
r63 = r29 ?? (global.Object.keys(value26).length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.s35OuK) : null);
|
||||
r29 = r63 == null || value20 === r63 ? null : <View style={value4.errorContainer}><Text variant="text-sm/bold" color="text-feedback-critical">{r63}</Text></View>;
|
||||
r30 = r29;
|
||||
}
|
||||
const items9 = [r30];
|
||||
const UserProfileEditFormTextField2 = importDefault(13205) /* metro dependency 13205: UserProfileEditFormTextField */;
|
||||
const userProfileEditFormTextField2Props = {inputRef: value8,
|
||||
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.me1lRk), errorMessage: r59};
|
||||
r57 = pendingNickname ?? r57;
|
||||
userProfileEditFormTextField2Props.value = r57;
|
||||
userProfileEditFormTextField2Props.onFocus = onFocus;
|
||||
userProfileEditFormTextField2Props.onChange = onChange_100972;
|
||||
userProfileEditFormTextField2Props.placeholder = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(currentUser);
|
||||
userProfileEditFormTextField2Props.maxLength = DISPLAY_NAME_MAX_LENGTH;
|
||||
userProfileEditFormTextField2Props.isDisabled = canEditNickname ? isDisabled : !canEditNickname;
|
||||
items9[1] = <UserProfileEditFormTextField2 {...userProfileEditFormTextField2Props} />;
|
||||
items9[2] = canUsePremiumGuildMemberProfile2 && ((Component) => <Component user={currentUser} guildId={guild.id} />)(importDefault(13206) /* metro dependency 13206: UserProfileDisplayNameStylesEditButton */);
|
||||
const defaultImport14 = UserProfileEditFormTextField2;
|
||||
const defaultImport14Props = {inputRef: value9,
|
||||
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+T3RI/']), errorMessage: r55};
|
||||
const string = intl.string;
|
||||
const NZqtIp = (require(1244) /* metro dependency 1244: indexNative */).t.NZqtIp;
|
||||
defaultImport14Props.description = Reflect.apply(string, intl, [NZqtIp]);
|
||||
defaultImport14Props.value = r53;
|
||||
defaultImport14Props.onFocus = onFocus;
|
||||
defaultImport14Props.onChange = onChange_100973;
|
||||
defaultImport14Props.placeholder = r52;
|
||||
defaultImport14Props.maxLength = PRONOUNS_MAX_LENGTH;
|
||||
defaultImport14Props.isDisabled = isDisabled;
|
||||
items9[3] = ((Component) => <Component {...defaultImport14Props} />)(defaultImport14);
|
||||
if (canUsePremiumGuildMemberProfile2) {
|
||||
UserProfileEditFormTextField = UserProfileEditFormTextField2;
|
||||
var userProfileEditFormTextFieldProps = {inputRef: value10, label: intl.string(t.ZzAR2Y), errorMessage: r50,
|
||||
description: intl.string(t.S5O8U2)};
|
||||
r47 = pendingBio ?? r47;
|
||||
userProfileEditFormTextFieldProps.value = r47;
|
||||
userProfileEditFormTextFieldProps.onFocus = onFocus;
|
||||
userProfileEditFormTextFieldProps.onChange = onChange_100974;
|
||||
userProfileEditFormTextFieldProps.placeholder = r45;
|
||||
userProfileEditFormTextFieldProps.maxLength = BIO_MAX_LENGTH;
|
||||
userProfileEditFormTextFieldProps.numberOfLines = 5;
|
||||
userProfileEditFormTextFieldProps.isDisabled = isDisabled;
|
||||
r30 = <UserProfileEditFormTextField {...userProfileEditFormTextFieldProps} />;
|
||||
} else {
|
||||
r30 = null;
|
||||
}
|
||||
items9[4] = r30;
|
||||
items9[5] = ((Component) => <Component pendingAvatarSrc={pendingAvatarSrc} pendingThemeColors={pendingThemeColors} user={currentUser} guildId={guild.id} onProfileThemeColorsChanged={onProfileThemeColorsChanged} showResetMenu={canResetThemeColors2} />)(importDefault(13210) /* metro dependency 13210: UserProfileEditTheme */);
|
||||
items9[6] = ((Component) => <Component user={currentUser} guildId={guild.id} pendingAvatarDecoration={pendingAvatarDecoration} />)(importDefault(13212) /* metro dependency 13212: UserProfileAvatarDecorationEditButton */);
|
||||
items9[7] = ((Component) => <Component user={currentUser} guildId={guild.id} pendingProfileEffect={pendingProfileEffect} displayProfile={value14} />)(importDefault(13213) /* metro dependency 13213: UserProfileEffectEditButton */);
|
||||
items9[8] = ((Component) => <Component user={currentUser} guildId={guild.id} pendingProfileFrame={pendingProfileFrame} displayProfile={value14} />)(importDefault(13217) /* metro dependency 13217: UserProfileFrameEditButton */);
|
||||
items9[9] = ((Component) => <Component user={currentUser} pendingNameplate={pendingNameplate} guildId={guild.id} />)(importDefault(13221) /* metro dependency 13221: UserProfileNameplateEditButton */);
|
||||
items7[2] = <View style={items8}>{items9}</View>;
|
||||
const scrollView = <ScrollView ref={value7}>{view}<View style={object4}>{editGuildProfileBanner}<View>{view2}<UserProfileGradientContainer fallbackBackground={gradientFallbackBackground} primaryColor={primaryColor} secondaryColor={secondaryColor} containerStyle={items6}>{items7}</UserProfileGradientContainer></View></View></ScrollView>;
|
||||
if (r9) {
|
||||
UserProfileUpsellCard = importDefault(13231) /* metro dependency 13231: UserProfileUpsellCard */;
|
||||
items10 = [value4.floatingUpsell];
|
||||
object2 = {};
|
||||
object2.bottom = (importDefault(697) /* metro dependency 697: native */).space.PX_16 + insets.bottom;
|
||||
items10[1] = object2;
|
||||
r9 = <UserProfileUpsellCard style={items10} ctaText={intl.string(t.pj0XBN)} onPress={onPress_100976}><Text variant="text-sm/normal">{intl.string(t.YIZS5B)}</Text></UserProfileUpsellCard>;
|
||||
}
|
||||
return (
|
||||
<ThemeContextProvider
|
||||
theme={theme}
|
||||
primaryColor={primaryColor}
|
||||
secondaryColor={secondaryColor}
|
||||
>
|
||||
<View style={items2}>
|
||||
{scrollView}
|
||||
{r9}
|
||||
</View>
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function EditGuildProfileBannerOnPressEdit() { // fn#100967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:1005, owner: EditGuildProfileBanner.onPressEdit, offset: 0x022026b5, size: 359 bytes, params: 1, frame: 22
|
||||
var object2;
|
||||
var value3;
|
||||
var defaultImport2;
|
||||
var openLazy;
|
||||
var value4;
|
||||
var moduleValue2;
|
||||
var intl;
|
||||
if (env0_4) {
|
||||
value3 = undefined;
|
||||
defaultImport2 = importDefault(dependencyMap[13]);
|
||||
openLazy = defaultImport2.openLazy;
|
||||
value4 = require(dependencyMap[15])(dependencyMap[14], dependencyMap.paths);
|
||||
object2 = {};
|
||||
object2.user = user;
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
moduleValue2 = require(dependencyMap[16]);
|
||||
object2.showRemoveBanner = moduleValue2.showRemoveBanner(pendingBanner,
|
||||
guildMemberProfile == null ? value3 : guildMemberProfile.banner);
|
||||
intl = require(dependencyMap[17]).intl;
|
||||
object2.removeText = intl.string(require(dependencyMap[17]).t.jHlJNS);
|
||||
object2.onBannerChange = onBannerChange;
|
||||
Reflect.apply(openLazy, defaultImport2, [value4, 'Change Banner', object2]);
|
||||
} else {
|
||||
importDefault(dependencyMap[19]).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.PREMIUM_GUILD_PROFILE,
|
||||
analyticsLocation: {section: AnalyticsSections.PREMIUM_GUILD_MEMBER_PROFILE,
|
||||
object: AnalyticsObjects.EDIT_GUILD_PROFILE_BANNER}, analyticsLocations: analyticsLocations,
|
||||
analyticsProperties: {type: PremiumUpsellTypes.PREMIUM_GUILD_IDENTITY_MODAL}});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100970() { // fn#100970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:2530, offset: 0x022035a0, size: 55 bytes, params: 1, frame: 14
|
||||
const guildBinding = guild;
|
||||
const value2 = null;
|
||||
return value2 != guildBinding ? GuildMemberStore.getMember(guild.id, currentUser.id) : value2;
|
||||
}
|
||||
|
||||
function _fun100971() { // fn#100971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:2608, offset: 0x022035d7, size: 70 bytes, params: 1, frame: 16
|
||||
const guildBinding = guild;
|
||||
const value2 = null;
|
||||
return value2 != guildBinding ? UserProfileStore.getGuildMemberProfile(currentUser.id,
|
||||
value2 == guild ? undefined : guild.id) : value2;
|
||||
}
|
||||
|
||||
function GuildProfileEditFormOnChange(a0) { // fn#100972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:5510, owner: GuildProfileEditForm.onChange, offset: 0x0220361d, size: 64 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({guildId: guild.id,
|
||||
nickname: a0});
|
||||
}
|
||||
|
||||
function GuildProfileEditFormOnChange_100973(a0) { // fn#100973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:5837, owner: GuildProfileEditForm.onChange, offset: 0x0220365d, size: 64 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({guildId: guild.id,
|
||||
pronouns: a0});
|
||||
}
|
||||
|
||||
function GuildProfileEditFormOnChange_100974(a0) { // fn#100974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:6114, owner: GuildProfileEditForm.onChange, offset: 0x0220369d, size: 64 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({guildId: guild.id,
|
||||
bio: a0});
|
||||
}
|
||||
|
||||
function onProfileThemeColorsChanged(a0) { // fn#100975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:6330, owner: GuildProfileEditForm.onProfileThemeColorsChanged, offset: 0x022036dd, size: 64 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({guildId: guild.id,
|
||||
themeColors: a0});
|
||||
}
|
||||
|
||||
function GuildProfileEditFormOnPress() { // fn#100976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:6822, owner: GuildProfileEditForm.onPress, offset: 0x0220371d, size: 153 bytes, params: 1, frame: 19
|
||||
const defaultImport = importDefault(dependencyMap[51]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
const value2 = require(dependencyMap[15])(dependencyMap[52], dependencyMap.paths);
|
||||
const object3 = {};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, env1_20, undefined);
|
||||
const BUTTON_CTA = AnalyticsObjects.BUTTON_CTA;
|
||||
object4['object'] = BUTTON_CTA;
|
||||
object3.analyticsLocation = object4;
|
||||
object3.analyticsLocations = analyticsLocations;
|
||||
const PremiumFeatureCardOrder = require(dependencyMap[53]).PremiumFeatureCardOrder;
|
||||
const TIER_2_LEADING = PremiumFeatureCardOrder.TIER_2_LEADING;
|
||||
object3.premiumFeatureCardOrder = TIER_2_LEADING;
|
||||
Reflect.apply(pushLazy, defaultImport, [value2, object3]);
|
||||
}
|
||||
|
||||
function onBannerChange(a0, a1) { // fn#100968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13428:1235, owner: EditGuildProfileBanner.onPressEdit.onBannerChange, offset: 0x0220281c, size: 67 bytes, params: 3, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({guildId: guildId,
|
||||
banner: a0, bannerOriginalMd5: a1});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,488 @@
|
||||
/* Metro module 11375; source: modules/user_profile/native/LegacyUserProfileConnections.tsx; dependencies: [31, 27, 1949, 1885, 3996, 5189, 661, 1309, 5044, 33, 4501, 697, 5043, 10362, 4915, 1423, 4002, 1305, 11376, 11377, 3860, 10365, 10366, 4081, 6797, 3856, 1244, 8872, 4863, 3853, 5278, 4573, 3868, 566, 5039, 11378, 2] */
|
||||
function _fun87203(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6, offset: 0x01fb2e4e, size: 964 bytes, params: 8, frame: 29
|
||||
var object2;
|
||||
let env0_0 = require;
|
||||
const closure = ConnectedUserAccount;
|
||||
const closure2 = ConnectedApplicationUserRoleAccount;
|
||||
const closure3 = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
var env0_1 = require(dependencyMap[32]).useThemeContext().theme;
|
||||
var env0_2 = require(dependencyMap[33]).useStateFromStores([LocaleStore], _fun87212);
|
||||
return a0.map(_fun87213);
|
||||
};
|
||||
const closure4 = useConnectedAccountItems;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.Pressable;
|
||||
const env0_5 = value2.View;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
|
||||
const streamerModeStore = importDefault(3996) /* metro dependency 3996: StreamerModeStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.AnalyticEvents;
|
||||
const env0_11 = constantsModule.PlatformTypes;
|
||||
const env0_12 = constantsModule.ThemeTypes;
|
||||
const FORM_ROW_VERTICAL_PADDING = (require(1309) /* metro dependency 1309: FormConstants */).FORM_ROW_VERTICAL_PADDING;
|
||||
const env0_13 = (require(5044) /* metro dependency 5044: Constants */).MetadataFields;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value4.jsx;
|
||||
const env0_15 = value4.jsxs;
|
||||
const env0_16 = value4.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.connectedAccountContainer = {paddingHorizontal: 10, paddingVertical: FORM_ROW_VERTICAL_PADDING / 2};
|
||||
object2.connectedAccount = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object2.connectedAccountNameContainer = {'flex': 1, 'marginLeft': 8};
|
||||
object2.connectedAccountName = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.connectedAccountNameText = {color: INTERACTIVE_TEXT_ACTIVE};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object2.connectedAccountNameCreatedAtText = {color: TEXT_SUBTLE};
|
||||
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.connectedAccountOpenLink = {'height': 24, 'width': 24, transform: [{rotate: '135deg'}],
|
||||
tintColor: INTERACTIVE_TEXT_ACTIVE};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object2.connectedAccountOpenHide = {'alignSelf': 'flex-start', 'margin': 4, 'height': 16, 'width': 16,
|
||||
tintColor: INTERACTIVE_TEXT_DEFAULT};
|
||||
object2.verifiedCheckContainer = {'marginLeft': 4, 'height': 16, 'width': 16};
|
||||
object2.verifiedCheck = {'position': 'absolute', 'left': 0, 'top': 0};
|
||||
object2.connectedAccountChildren = {'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center',
|
||||
'overflow': 'hidden'};
|
||||
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.metadataItem = {color: INTERACTIVE_TEXT_ACTIVE};
|
||||
object2.appConnectionNameContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
|
||||
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null,
|
||||
'borderWidth': 1, 'borderColor': null, 'paddingHorizontal': 8, 'paddingVertical': 4, 'marginTop': 12};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object3.borderColor = BORDER_SUBTLE;
|
||||
object2.connectedAccountPoweredByContainer = object3;
|
||||
object2.connectedAccountPoweredByAvatar = {marginRight: 4};
|
||||
object2.connectedAccountPoweredByText = {'marginTop': -4, 'alignItems': 'center', 'flexDirection': 'row'};
|
||||
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_18 = value.memo(closure);
|
||||
const env0_19 = value.memo(closure2);
|
||||
const env0_20 = [];
|
||||
const env0_21 = [];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/LegacyUserProfileConnections.tsx');
|
||||
exports.default = LegacyUserProfileConnections;
|
||||
exports.ConnectedUserAccount = closure;
|
||||
exports.ConnectedApplicationUserRoleAccount = closure2;
|
||||
exports.useAppplicationRoleConnectionItems = closure3;
|
||||
exports.useConnectedAccountItems = closure4;
|
||||
}
|
||||
|
||||
function ConnectedUserAccount({account, theme, locale, userId, style, showMetadata, showInvisibleIcon}) { // fn#87204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:1782, offset: 0x01fb3212, size: 2055 bytes, params: 2, frame: 39
|
||||
var r28;
|
||||
var color;
|
||||
var r20;
|
||||
var r13;
|
||||
var r15;
|
||||
var r24;
|
||||
var r16;
|
||||
var moduleValue;
|
||||
var type;
|
||||
var moduleValue2;
|
||||
var value6;
|
||||
var moduleValue3;
|
||||
var value7;
|
||||
var moduleValue4;
|
||||
var value8;
|
||||
var moduleValue5;
|
||||
var value9;
|
||||
var defaultImport;
|
||||
var moduleValue6;
|
||||
var value10;
|
||||
var moduleValue7;
|
||||
var value11;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var WHITE;
|
||||
var object;
|
||||
var verifiedCheck;
|
||||
var Sizes;
|
||||
var REFRESH_SMALL_16;
|
||||
var items3;
|
||||
var object4;
|
||||
var intl;
|
||||
showMetadata = showMetadata ?? true;
|
||||
const styles = useStyles();
|
||||
const r10 = account.metadata ?? ({});
|
||||
if (showMetadata) {
|
||||
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
|
||||
r28 = moduleValue.getCreatedAtDate(r10[MetadataFields.CREATED_AT], locale);
|
||||
} else {
|
||||
r28 = null;
|
||||
}
|
||||
if (showMetadata) {
|
||||
type = account.type;
|
||||
if (PlatformTypes.REDDIT === type) {
|
||||
moduleValue7 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value11 = moduleValue7.generateRedditMetadataItems(r10, styles.metadataItem);
|
||||
color = undefined;
|
||||
r20 = value11;
|
||||
} else if (PlatformTypes.STEAM === type) {
|
||||
moduleValue6 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value10 = moduleValue6.generateSteamMetadataItems(r10, styles.metadataItem);
|
||||
color = undefined;
|
||||
r20 = value10;
|
||||
} else if (PlatformTypes.BLUESKY === type) {
|
||||
moduleValue5 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value9 = moduleValue5.generateTwitterMetadataItems(r10, styles.metadataItem);
|
||||
if (r10[MetadataFields.TWITTER_VERIFIED] !== '1') {
|
||||
color = undefined;
|
||||
r20 = value9;
|
||||
} else {
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
color = defaultImport.get(PlatformTypes.TWITTER).color;
|
||||
r20 = value9;
|
||||
}
|
||||
} else if (PlatformTypes.MASTODON === type) {
|
||||
moduleValue5 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value9 = moduleValue5.generateTwitterMetadataItems(r10, styles.metadataItem);
|
||||
if (r10[MetadataFields.TWITTER_VERIFIED] !== '1') {
|
||||
color = undefined;
|
||||
r20 = value9;
|
||||
} else {
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
color = defaultImport.get(PlatformTypes.TWITTER).color;
|
||||
r20 = value9;
|
||||
}
|
||||
} else if (PlatformTypes.TWITTER === type) {
|
||||
moduleValue5 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value9 = moduleValue5.generateTwitterMetadataItems(r10, styles.metadataItem);
|
||||
if (r10[MetadataFields.TWITTER_VERIFIED] !== '1') {
|
||||
color = undefined;
|
||||
r20 = value9;
|
||||
} else {
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
color = defaultImport.get(PlatformTypes.TWITTER).color;
|
||||
r20 = value9;
|
||||
}
|
||||
} else if (PlatformTypes.PAYPAL === type) {
|
||||
moduleValue4 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value8 = moduleValue4.generatePaypalMetadataItems(r10, styles.metadataItem);
|
||||
color = undefined;
|
||||
r20 = value8;
|
||||
} else if (PlatformTypes.EBAY === type) {
|
||||
moduleValue3 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value7 = moduleValue3.generateEbayMetadataItems(r10, styles.metadataItem);
|
||||
color = undefined;
|
||||
r20 = value7;
|
||||
} else if (PlatformTypes.TIKTOK !== type) {
|
||||
color = undefined;
|
||||
r20 = undefined;
|
||||
} else {
|
||||
moduleValue2 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
||||
value6 = moduleValue2.generateTikTokMetadataItems(r10, styles.metadataItem);
|
||||
color = undefined;
|
||||
r20 = value6;
|
||||
}
|
||||
} else {
|
||||
color = undefined;
|
||||
r20 = undefined;
|
||||
}
|
||||
const value12 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(account.type);
|
||||
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
const makeSource = avatarUtilsModule.makeSource;
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
|
||||
const value13 = value12 == null;
|
||||
const source = Reflect.apply(makeSource, avatarUtilsModule,
|
||||
[isThemeDark2 ? value13 ? undefined : value12.icon.darkPNG : value13 ? undefined : value12.icon.lightPNG]);
|
||||
let r5 = value12 == null || value12.getPlatformUserUrl == null ? undefined : value12.getPlatformUserUrl(account);
|
||||
const env0_3 = r5;
|
||||
const r11 = showInvisibleIcon == null ? r5 != null ? <Icon style={styles.connectedAccountOpenLink} source={importDefault(11377) /* metro dependency 11377 */} /> : null : showInvisibleIcon ? <Icon style={styles.connectedAccountOpenHide} source={importDefault(11376) /* metro dependency 11376 */} /> : r5 != null ? <Icon style={styles.connectedAccountOpenLink} source={importDefault(11377) /* metro dependency 11377 */} /> : null;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
const value17 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_MOD_MUTED, theme]);
|
||||
const moduleValue11 = useTokenModule;
|
||||
useToken = moduleValue11.useToken;
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
if (color == null) {
|
||||
r13 = value17;
|
||||
r15 = Reflect.apply(useToken, moduleValue11, [INTERACTIVE_TEXT_ACTIVE,
|
||||
color == null ? theme : ThemeTypes.DARK]);
|
||||
} else {
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
r13 = color;
|
||||
r15 = WHITE;
|
||||
}
|
||||
if (account.verified) {
|
||||
var viewBindingProps = {style: styles.verifiedCheckContainer};
|
||||
object = {};
|
||||
verifiedCheck = styles.verifiedCheck;
|
||||
object.style = verifiedCheck;
|
||||
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
|
||||
REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
||||
object.size = REFRESH_SMALL_16;
|
||||
object.source = importDefault(10365) /* metro dependency 10365 */;
|
||||
object.color = r13;
|
||||
items3 = [<Icon {...object} />];
|
||||
object4 = {};
|
||||
verifiedCheck = styles.verifiedCheck;
|
||||
object4.style = verifiedCheck;
|
||||
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
|
||||
REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
||||
object4.size = REFRESH_SMALL_16;
|
||||
object4.source = importDefault(10366) /* metro dependency 10366 */;
|
||||
object4.color = r15;
|
||||
items3[1] = <Icon {...object4} />;
|
||||
r24 = <View {...viewBindingProps}>{items3}</View>;
|
||||
} else {
|
||||
r24 = null;
|
||||
}
|
||||
const value21 = env0_3.useCallback(_fun87205, [account.name]);
|
||||
const value22 = env0_3.useMemo(_fun87206, [value12?.name, r5]);
|
||||
const value23 = env0_3.useCallback(_fun87207, [account.type, r5, userId]);
|
||||
const PressableComponent = r5 != null ? (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity : Pressable;
|
||||
r5 = r5 != null ? value23 : undefined;
|
||||
const items2 = [styles.connectedAccountContainer, style];
|
||||
const Icon4 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
Sizes = Icon4.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
const icon = <Icon size={MEDIUM} source={source} disableColor />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items5 = [<View style={styles.connectedAccountName}><Text variant="text-md/semibold" style={styles.connectedAccountNameText}>{account.name}</Text>{r24}</View>];
|
||||
if (r28 != null) {
|
||||
var textProps = {variant: 'heading-deprecated-12/medium', style: styles.connectedAccountNameCreatedAtText};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r16 = <Text {...textProps}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['9rfonh'],
|
||||
{date: r28})}</Text>;
|
||||
} else {
|
||||
r16 = null;
|
||||
}
|
||||
items5[1] = r16;
|
||||
items5[2] = r20 != null && r20.length > 0 ? <View style={styles.connectedAccountChildren}>{r20}</View> : null;
|
||||
return (
|
||||
<PressableComponent
|
||||
accessibilityLabel={value22}
|
||||
accessibilityRole="button"
|
||||
onPress={r5}
|
||||
onLongPress={value21}
|
||||
>
|
||||
<View style={items2}>
|
||||
<View style={styles.connectedAccount}>
|
||||
{icon}
|
||||
<View style={styles.connectedAccountNameContainer}>
|
||||
{items5}
|
||||
</View>
|
||||
{r11}
|
||||
</View>
|
||||
</View>
|
||||
</PressableComponent>
|
||||
);
|
||||
}
|
||||
|
||||
function ConnectedApplicationUserRoleAccount({applicationRoleConnection, style}) { // fn#87209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:4815, offset: 0x01fb3c15, size: 588 bytes, params: 2, frame: 30
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateRoleConnectionMetadataItems(applicationRoleConnection);
|
||||
const items3 = [styles.connectedAccountContainer, style];
|
||||
const items2 = [applicationRoleConnection.platform_name != null ? <Text variant="eyebrow" color="interactive-text-default">{applicationRoleConnection.platform_name}</Text> : null];
|
||||
items2[1] = <View style={styles.appConnectionNameContainer}>{applicationRoleConnection.platform_username != null ? <Text variant="text-md/semibold" color="interactive-text-active">{applicationRoleConnection.platform_username}</Text> : null}</View>;
|
||||
items2[2] = value2 != null && value2.length > 0 ? <View style={styles.connectedAccountChildren}>{value2}</View> : null;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[3] = <View style={{flexDirection: 'row'}}><View style={styles.connectedAccountPoweredByContainer}><Text variant="text-xs/normal" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zIT9YA,
|
||||
{applicationHook: applicationHook_87210})}</Text></View><View style={{flexGrow: 1}} /></View>;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useAppplicationRoleConnectionItems(a0, a1) { // fn#87211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6073, offset: 0x01fb3f75, size: 122 bytes, params: 3, frame: 17
|
||||
const env0_0 = a1;
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const env0_1 = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
||||
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
return a0.map(_fun87213);
|
||||
}
|
||||
|
||||
function useConnectedAccountItems(a0, a1, a2) { // fn#87214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6321, offset: 0x01fb4049, size: 182 bytes, params: 4, frame: 18
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a2;
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const env0_2 = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
||||
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const env0_4 = (require(5039) /* metro dependency 5039: ConnectionsHooks */).usePlatformAllowed({forUserProfile: true});
|
||||
return a0.filter(_fun87216).map(_fun87217);
|
||||
}
|
||||
|
||||
function LegacyUserProfileConnections({user}) { // fn#87218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6786, offset: 0x01fb41a3, size: 501 bytes, params: 2, frame: 26
|
||||
var r6;
|
||||
var r0;
|
||||
var jsxRuntimeEnv0_16Binding;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items2;
|
||||
const userProfile = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
||||
function() {
|
||||
return UserProfileStore.getUserProfile(user.id);
|
||||
});
|
||||
const hidePersonalInformation = (require(566) /* metro dependency 566: flux */).useStateFromStores([StreamerModeStore],
|
||||
function() {
|
||||
return StreamerModeStore.hidePersonalInformation;
|
||||
});
|
||||
const value4 = env0_3.useMemo(_fun87221, [userProfile?.applicationRoleConnections]);
|
||||
const value5 = env0_3.useMemo(_fun87222, [userProfile?.connectedAccounts]);
|
||||
const value6 = useAppplicationRoleConnectionItems(value4);
|
||||
if (hidePersonalInformation) {
|
||||
r0 = null;
|
||||
} else if (value5.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
||||
r6 = value6 != null && value6.length > 0;
|
||||
r6 = r6 && ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE)} showContainer>{value6}</Component>)(importDefault(11378) /* metro dependency 11378: UserProfileSection */);
|
||||
items2 = [r6];
|
||||
items2[1] = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5'])} showContainer>{useConnectedAccountItems(value5,
|
||||
|
||||
user.id)}</Component>)(importDefault(11378) /* metro dependency 11378: UserProfileSection */);
|
||||
r0 = <>{items2}</>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun87205() { // fn#87205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3453, offset: 0x01fb3a19, size: 116 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
const triggerHapticFeedback = value.triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
||||
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
|
||||
Reflect.apply(triggerHapticFeedback, value, [IMPACT_LIGHT]);
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
value.copy(account.name);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
||||
}
|
||||
|
||||
function _fun87206() { // fn#87206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3615, offset: 0x01fb3a8d, size: 178 bytes, params: 1, frame: 17
|
||||
var name;
|
||||
var r0;
|
||||
var value2;
|
||||
var value3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var OKzaN3;
|
||||
var value;
|
||||
if (env0_3 != null) {
|
||||
value = environment.__proto__;
|
||||
value = intl.string(t.wuRE8M);
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
OKzaN3 = t.OKzaN3;
|
||||
name = env0_2 == null ? value3 : env0_2.name;
|
||||
value = '';
|
||||
value = Reflect.apply(formatToPlainString, intl, [OKzaN3, {name: name ?? value}]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun87207() { // fn#87207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3824, offset: 0x01fb3b3f, size: 106 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var value2;
|
||||
if (env0_3 != null) {
|
||||
value2 = environment.__proto__;
|
||||
(require(8872) /* metro dependency 8872: MaskedLinkUtils */).handleClick({href: env0_3,
|
||||
trusted: account.type !== PlatformTypes.DOMAIN, onConfirm: onConfirm_87208});
|
||||
}
|
||||
}
|
||||
|
||||
function ConnectedApplicationUserRoleAccountApplicationHook() { // fn#87210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:5632, owner: ConnectedApplicationUserRoleAccount.applicationHook, offset: 0x01fb3e61, size: 276 bytes, params: 1, frame: 25
|
||||
var r5;
|
||||
var Avatar;
|
||||
var value4;
|
||||
var userRecord;
|
||||
let bot = applicationRoleConnection.application.bot;
|
||||
const value3 = null;
|
||||
if (value3 != bot) {
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
var avatarProps = {style: styles.connectedAccountPoweredByAvatar};
|
||||
bot = applicationRoleConnection.application.bot;
|
||||
value4 = Object.create(UserRecord.prototype, {constructor: {value: UserRecord}});
|
||||
userRecord = new UserRecord(bot);
|
||||
avatarProps.user = userRecord instanceof Object ? userRecord : value4;
|
||||
avatarProps.size = (require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16;
|
||||
avatarProps.guildId = undefined;
|
||||
r5 = <Avatar {...avatarProps} />;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.connectedAccountPoweredByText}>
|
||||
{r5}
|
||||
<Text variant="text-xs/normal" color="text-default">
|
||||
{applicationRoleConnection.application.name}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87213(a0, a1) { // fn#87213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6225, offset: 0x01fb3fef, size: 90 bytes, params: 3, frame: 18
|
||||
const Fragment = env1_3.Fragment;
|
||||
return (
|
||||
<Fragment key={a1}>
|
||||
{((Component) => <Component applicationRoleConnection={a0} theme={theme} locale={locale} style={require} />)(env1_19)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87216({type}) { // fn#87216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6519, offset: 0x01fb40ff, size: 66 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
value = value.get(type);
|
||||
const value2 = value != null;
|
||||
if (value2) {
|
||||
value = env0_4(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun87217(a0, a1) { // fn#87217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6580, offset: 0x01fb4141, size: 98 bytes, params: 3, frame: 18
|
||||
const Fragment = env1_3.Fragment;
|
||||
return (
|
||||
<Fragment key={a1}>
|
||||
{((Component) => <Component account={a0} theme={theme} locale={locale} userId={require} style={importDefault} />)(env1_18)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87221() { // fn#87221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6982, offset: 0x01fb43c7, size: 41 bytes, params: 1, frame: 4
|
||||
return userProfile?.applicationRoleConnections ?? env1_21;
|
||||
}
|
||||
|
||||
function _fun87222() { // fn#87222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:7120, offset: 0x01fb43f0, size: 41 bytes, params: 1, frame: 4
|
||||
return userProfile?.connectedAccounts ?? env1_20;
|
||||
}
|
||||
|
||||
function onConfirm_87208() { // fn#87208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3903, offset: 0x01fb3ba9, size: 108 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__.__proto__;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const CONNECTED_ACCOUNT_VIEWED = AnalyticEvents.CONNECTED_ACCOUNT_VIEWED;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [CONNECTED_ACCOUNT_VIEWED, {platform_type: account.type,
|
||||
other_user_id: userId}]);
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(env1_3);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/* Metro module 8759; source: modules/user_profile/native/NonUserBotProfileContent.tsx; dependencies: [31, 27, 6816, 6276, 33, 8496, 8514, 4617, 3995, 8501, 8752, 8760, 1585, 8494, 8497, 6797, 3856, 8761, 4017, 8510, 8695, 1244, 8762, 2] */
|
||||
function _fun68545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:6, offset: 0x01c52f0c, size: 242 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const constantsModule = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_4 = constantsModule.PROFILE_CONTENT_BOTTOM_PADDING;
|
||||
const env0_5 = constantsModule.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
||||
const env0_6 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const env0_9 = value3.Fragment;
|
||||
value = value.memo(NonUserBotProfileContent);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/NonUserBotProfileContent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function NonUserBotProfileContent({user, channel, displayProfile, scrollPosition}) { // fn#68546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:300, offset: 0x01c52ffe, size: 1017 bytes, params: 2, frame: 40
|
||||
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_0 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
|
||||
const useName = defaultImport.useName;
|
||||
let guild_id = channel?.guild_id;
|
||||
const value4 = Reflect.apply(useName, defaultImport, [guild_id, channel?.id, user]);
|
||||
const env0_1 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
|
||||
const value5 = (importDefault(8501) /* metro dependency 8501: useBadges */)(displayProfile);
|
||||
const value6 = (importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)(ACTION_SHEET_MAX_WIDTH);
|
||||
const {bannerAnimatedStyle, bannerImageAnimatedStyle, contentAnimatedStyle, blurAnimatedProps,
|
||||
showBlur} = (importDefault(8760) /* metro dependency 8760: useUserProfileOverscrollStyles */)({scrollPosition: scrollPosition,
|
||||
bannerHeight: value6});
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const {theme, primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
|
||||
displayProfile: displayProfile});
|
||||
const {avatarBackground,
|
||||
containerBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
if (user == null) {
|
||||
return null;
|
||||
}
|
||||
const closure = onPressDisplayName;
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const value10 = ((Component) => <Component user={user} displayProfile={displayProfile} bannerHeight={value6} bannerAnimatedStyle={bannerAnimatedStyle} bannerImageAnimatedStyle={bannerImageAnimatedStyle} blurAnimatedProps={blurAnimatedProps} showBlur={showBlur} />)(importDefault(8761) /* metro dependency 8761: UserProfileOverscrollBanner */);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const value11 = ((Component) => <Component user={user} guildId={displayProfile?.guildId ?? undefined} backgroundColor={avatarBackground} disableStatus />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
|
||||
const items3 = [value3.profileContentWrapper];
|
||||
items3[1] = value3.profileContent;
|
||||
items3[2] = {paddingTop: PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING,
|
||||
paddingBottom: bottom + PROFILE_CONTENT_BOTTOM_PADDING};
|
||||
const primaryInfo = value3.primaryInfo;
|
||||
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
||||
guild_id = channel?.guild_id;
|
||||
const pronouns = displayProfile?.pronouns;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<>
|
||||
{value10}
|
||||
<View2 style={contentAnimatedStyle}>
|
||||
{value11}
|
||||
<View style={items3}>
|
||||
<View style={primaryInfo}>
|
||||
<UserProfilePrimaryInfo
|
||||
user={user}
|
||||
guildId={guild_id}
|
||||
displayName={value4}
|
||||
pronouns={pronouns}
|
||||
badges={value5}
|
||||
badgeContainerBackground={containerBackground}
|
||||
displayNameAccessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy)}
|
||||
onPressDisplayName={closure}
|
||||
onPressUserTag={closure}
|
||||
onPressPronouns={onPressPronouns}
|
||||
showBadgeToastOnPress
|
||||
/>
|
||||
</View>
|
||||
<View style={value3.cards}>
|
||||
{((Component) => <Component userId={user.id} displayProfile={displayProfile} channel={channel} style={[value3.card,
|
||||
{backgroundColor: containerBackground}]} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */)}
|
||||
</View>
|
||||
</View>
|
||||
</View2>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function NonUserBotProfileContentOnPressDisplayName() { // fn#68547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:1019, owner: NonUserBotProfileContent.onPressDisplayName, offset: 0x01c533f7, size: 88 bytes, params: 1, frame: 14
|
||||
trackUserProfileAction({action: 'COPY_USERNAME'});
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_1);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
|
||||
}
|
||||
|
||||
function NonUserBotProfileContentOnPressPronouns() { // fn#68548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:1827, owner: NonUserBotProfileContent.onPressPronouns, offset: 0x01c5344f, size: 61 bytes, params: 1, frame: 12
|
||||
trackUserProfileAction({action: 'PRESS_PRONOUNS'});
|
||||
const value = environment.__proto__;
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUserPronouns();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/* Metro module 13203; source: modules/user_profile/native/ProfileGIFSelectActionSheet.tsx; dependencies: [57, 5, 31, 27, 33, 4501, 697, 4680, 8403, 7613, 8400, 8402, 4080, 6275, 6758, 1244, 7954, 11034, 2] */
|
||||
function _fun100752(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13393:6, offset: 0x021f6da2, size: 426 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object3 = {flex: 1};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object3.marginTop = PX_4;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.marginLeft = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.marginRight = PX_8;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{titleWrapper: {flex: 0},
|
||||
titleContainer: {justifyContent: 'flex-start'}, gifPicker: object3}]);
|
||||
object2 = {AVATAR: 0};
|
||||
object2[0] = 'AVATAR';
|
||||
object2.BANNER = 1;
|
||||
object2[1] = 'BANNER';
|
||||
const object6 = {PROFILE_EDIT: 0};
|
||||
object6[0] = 'PROFILE_EDIT';
|
||||
object6.PROFILE_TRY_IT_OUT = 1;
|
||||
object6[1] = 'PROFILE_TRY_IT_OUT';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/ProfileGIFSelectActionSheet.tsx');
|
||||
exports.default = ProfileGIFSelectActionSheet;
|
||||
exports.ProfileAssetType = object2;
|
||||
exports.GIFSelectionContext = object6;
|
||||
}
|
||||
|
||||
function ProfileGIFSelectActionSheet({profileAssetType, selectionContext, guildId}) { // fn#100753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13393:562, offset: 0x021f6f4c, size: 349 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const value2 = env0_5.useRef(null);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const object = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['xsC+/y']);
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
object.trailing = <NitroWheelIcon />;
|
||||
object.titleWrapperStyle = styles.titleWrapper;
|
||||
object.titleContainerStyle = styles.titleContainer;
|
||||
return (
|
||||
<BottomSheet
|
||||
ref={value2}
|
||||
scrollable
|
||||
startExpanded
|
||||
>
|
||||
<BottomSheetTitleHeader {...object} />
|
||||
<View style={styles.gifPicker}>
|
||||
{((Component) => <Component bottomSheetRef={value2} onPressGIF={function(a0) {
|
||||
return _onPressGIF.apply(this, arguments);
|
||||
}} />)(importDefault(11034) /* metro dependency 11034: GIFPicker */)}
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _onPressGIF() { // fn#100754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13393:677, owner: ProfileGIFSelectActionSheet._onPressGIF, offset: 0x021f70a9, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return env1_4(_fun100756).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun100756(a0) { // fn#100756, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13393:722, offset: 0x021f70e9, size: 620 bytes, params: 2, frame: 24
|
||||
var environment;
|
||||
var binding2;
|
||||
var value10;
|
||||
var createPendingImage;
|
||||
var pendingImage;
|
||||
var binding3;
|
||||
if (true) {
|
||||
yield global.fetch(a0.gifSrc ?? a0.src);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
yield value.blob();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var Promise = global.Promise;
|
||||
var all = Promise.all;
|
||||
var Promise2 = global.Promise;
|
||||
var value5 = Object.create(Promise2.prototype, {constructor: {value: Promise2}});
|
||||
var promise = new Promise2(_fun100757);
|
||||
var object = [promise instanceof Object ? promise : value5];
|
||||
var binding = env3_1;
|
||||
value = binding(env3_2[7]).fromBlob(value);
|
||||
object[1] = value.catch(function() {
|
||||
return null;
|
||||
});
|
||||
yield Reflect.apply(all, Promise, [object]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = env3_3(value, 2);
|
||||
var property = value[0];
|
||||
var property2 = value[1];
|
||||
value = environment.__proto__.__proto__;
|
||||
var AVATAR = env3_10.AVATAR;
|
||||
if (AVATAR === require) {
|
||||
binding = env3_0;
|
||||
binding2 = env3_2;
|
||||
value10 = binding(binding2[8]);
|
||||
createPendingImage = value10.createPendingImage;
|
||||
object = {imageUri: property};
|
||||
object.description = binding(binding2[8]).generateAvatarDescription();
|
||||
object.originalMd5 = property2;
|
||||
pendingImage = Reflect.apply(createPendingImage, value10, [object]);
|
||||
if (importDefault === env3_11.PROFILE_TRY_IT_OUT) {
|
||||
env3_0(env3_2[9]).setTryItOutAvatar(pendingImage);
|
||||
} else {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
binding(binding3[10]).setPendingChanges({guildId: dependencyMap, avatar: pendingImage});
|
||||
binding(binding3[11]).announcePendingAvatarChange('set');
|
||||
}
|
||||
} else if (env3_10.BANNER === require) {
|
||||
if (importDefault === env3_11.PROFILE_TRY_IT_OUT) {
|
||||
env3_0(env3_2[9]).setTryItOutBanner(property);
|
||||
} else {
|
||||
value = env3_0(env3_2[10]);
|
||||
value.setPendingChanges({banner: property, bannerOriginalMd5: property2});
|
||||
}
|
||||
}
|
||||
env3_1(env3_2[12]).hideActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100757(a0) { // fn#100757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13393:845, offset: 0x021f7355, size: 72 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
const FileReader = global.FileReader;
|
||||
const fileReader = new FileReader();
|
||||
fileReader.onload = onload_100758;
|
||||
fileReader.readAsDataURL(env0_0);
|
||||
}
|
||||
|
||||
function onload_100758({target}) { // fn#100758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13393:879, offset: 0x021f739d, size: 60 bytes, params: 2, frame: 14
|
||||
const result = target?.result;
|
||||
env0_0(typeof result !== 'string' ? '' : result);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,360 @@
|
||||
/* Metro module 8762; source: modules/user_profile/native/UserProfileAboutMeCard.tsx; dependencies: [31, 27, 1949, 1945, 1867, 6816, 661, 1483, 33, 4501, 3860, 697, 4573, 1244, 8763, 566, 5043, 21, 8765, 6819, 6771, 8514, 8767, 8743, 4080, 4008, 1230, 5459, 4015, 1583, 8768, 4578, 6815, 2] */
|
||||
function _fun68561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:6, offset: 0x01c53d52, size: 517 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
let value = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_8 = value.DIVIDER_DOT;
|
||||
const UserProfileThemeTypes = value.UserProfileThemeTypes;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).Routes;
|
||||
const env0_10 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
const env0_13 = value.Fragment;
|
||||
const env0_14 = {'headingVariant': 'text-sm/semibold', 'textVariant': 'text-md/normal', 'headingSpacing': 8,
|
||||
'rowGap': 24, 'columnGap': 6};
|
||||
object2 = {};
|
||||
const PREVIEW = UserProfileThemeTypes.PREVIEW;
|
||||
object2[PREVIEW] = {'headingVariant': 'text-xs/semibold', 'textVariant': 'text-sm/normal', 'headingSpacing': 4,
|
||||
'rowGap': 12, 'columnGap': 3};
|
||||
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({card: {flexDirection: 'column'},
|
||||
textWithIcon: {'flexDirection': 'row', 'alignItems': 'center'}, memberJoinDates: {'flexDirection': 'row',
|
||||
'flexWrap': 'wrap'}, slashCommands: {'flex': 1, 'flexDirection': 'row', 'flexWrap': 'wrap',
|
||||
'marginBottom': 12}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileAboutMeCard.tsx');
|
||||
exports.default = UserProfileAboutMeCard;
|
||||
}
|
||||
|
||||
function Heading(a0) { // fn#68562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:826, offset: 0x01c53f57, size: 177 bytes, params: 2, frame: 20
|
||||
const children = a0.children;
|
||||
const {headingVariant, headingSpacing} = getStyleConfig_68574(a0.themeType);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const USER_PROFILE_ABOUT_ME_HEADING_TEXT_STYLE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.USER_PROFILE_ABOUT_ME_HEADING_TEXT_STYLE;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [USER_PROFILE_ABOUT_ME_HEADING_TEXT_STYLE]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
accessibilityRole="header"
|
||||
variant={value3 ?? headingVariant}
|
||||
color="user-profile-about-me-heading-text"
|
||||
style={{marginBottom: headingSpacing}}
|
||||
>
|
||||
{children}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function TextWithIcon({icon, children, themeType, accessibilityLabel}) { // fn#68563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1168, offset: 0x01c54008, size: 186 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const {textVariant, columnGap} = getStyleConfig_68574(themeType);
|
||||
const items2 = [styles.textWithIcon];
|
||||
items2[1] = {columnGap: columnGap};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View
|
||||
style={items2}
|
||||
accessible
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
>
|
||||
{icon}
|
||||
<Text variant={textVariant} color="text-default">
|
||||
{children}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function Bio({userId, displayProfile, pendingBio, themeType, lineClamp}) { // fn#68564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1464, offset: 0x01c540c2, size: 262 bytes, params: 2, frame: 27
|
||||
var r0;
|
||||
var object;
|
||||
var intl;
|
||||
var items2;
|
||||
var value;
|
||||
const textVariant = getStyleConfig_68574(themeType).textVariant;
|
||||
const previewBio = displayProfile?.getPreviewBio(pendingBio);
|
||||
if (previewBio == null) {
|
||||
r0 = null;
|
||||
} else if (previewBio === '') {
|
||||
r0 = null;
|
||||
} else {
|
||||
object = {themeType: themeType};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2 = [<Heading {...object}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZzAR2Y)}</Heading>];
|
||||
value = importDefault(8763) /* metro dependency 8763: BioText */;
|
||||
items2[1] = ((Component) => <Component bio={previewBio} userId={userId} textVariant={textVariant} lineClamp={lineClamp} />)(value);
|
||||
value = <View>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MemberJoinDates({userId, guildId, themeType}) { // fn#68565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1791, offset: 0x01c541c8, size: 848 bytes, params: 2, frame: 36
|
||||
var jsxRuntimeEnv0_13Binding;
|
||||
var items4;
|
||||
var object;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const {textVariant, columnGap} = getStyleConfig_68574(themeType);
|
||||
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun68567);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun68568);
|
||||
const connectionsUtilsModule = require(5043) /* metro dependency 5043: ConnectionsUtils */;
|
||||
const getCreatedAtDate = connectionsUtilsModule.getCreatedAtDate;
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const value6 = Reflect.apply(getCreatedAtDate, connectionsUtilsModule, [defaultImport.extractTimestamp(userId),
|
||||
locale]);
|
||||
const createdAtDate = connectionsUtilsModule.getCreatedAtDate(value5?.joinedAt, locale);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const heading = <Heading themeType={themeType}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a6XYD9)}</Heading>;
|
||||
const items2 = [styles.memberJoinDates];
|
||||
items2[1] = {columnGap: columnGap};
|
||||
const object2 = {themeType: themeType};
|
||||
const ClydeIcon = (require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon;
|
||||
object2.icon = <ClydeIcon size="xs" />;
|
||||
object2.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9t7w53'],
|
||||
{date: value6});
|
||||
const textWithIcon = <TextWithIcon {...object2}>{value6}</TextWithIcon>;
|
||||
let r9 = value4 != null && createdAtDate != null;
|
||||
if (r9) {
|
||||
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
items4 = [((Text) => <Text variant={textVariant} color="text-default" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{DIVIDER_DOT}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
object = {themeType: themeType};
|
||||
value = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
object.icon = ((Component) => <Component guild={value4} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL} />)(value);
|
||||
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FdLNDK,
|
||||
|
||||
{guildName: value4.name, date: createdAtDate});
|
||||
items4[1] = <TextWithIcon {...object}>{createdAtDate}</TextWithIcon>;
|
||||
value = <>{items4}</>;
|
||||
r9 = value;
|
||||
}
|
||||
return (
|
||||
<View>
|
||||
{heading}
|
||||
<View style={items2}>
|
||||
{textWithIcon}
|
||||
{r9}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BotSlashCommands({applicationId, channel, commandIds, themeType}) { // fn#68569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:2918, offset: 0x01c5457c, size: 521 bytes, params: 2, frame: 30
|
||||
var r6;
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const context = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule, []).context;
|
||||
const {commands, application} = (importDefault(8767) /* metro dependency 8767: useBotProfileCommands */)(channel,
|
||||
applicationId, commandIds);
|
||||
const binding = application;
|
||||
const useCallback = binding.useCallback;
|
||||
const items3 = [application];
|
||||
items3[1] = channel.id;
|
||||
items3[2] = channel.guild_id;
|
||||
items3[3] = context;
|
||||
items3[4] = analyticsLocations;
|
||||
if (commands == null) {
|
||||
r0 = null;
|
||||
} else if (commands.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
items2 = [<Heading themeType={themeType}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0hKkS+'])}</Heading>];
|
||||
items2[1] = <View style={styles.slashCommands}>{commands.map(_fun68573)}</View>;
|
||||
r6 = application != null && application.bot != null;
|
||||
r6 = r6 && ((Button) => <Button size="sm" variant="tertiary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VEfKyb)} onPress={Reflect.apply(useCallback,
|
||||
|
||||
binding, [_fun68570, items3])} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
|
||||
items2[2] = r6;
|
||||
r0 = <View>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getStyleConfig_68574(a0) { // fn#68574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:536, offset: 0x01c54a11, size: 38 bytes, params: 2, frame: 4
|
||||
let r0 = a0 != null ? env0_15[a0] : undefined;
|
||||
r0 = r0 ?? env0_14;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function UserProfileAboutMeCard({userId, displayProfile, channel, pendingBio, bioLineClamp, themeType, style}) { // fn#68575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:4305, offset: 0x01c54a37, size: 330 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const rowGap = getStyleConfig_68574(themeType).rowGap;
|
||||
const application = displayProfile?.application;
|
||||
const UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
const items3 = [styles.card];
|
||||
items3[1] = {rowGap: rowGap};
|
||||
items3[2] = style;
|
||||
const items2 = [<Bio userId={userId} displayProfile={displayProfile} pendingBio={pendingBio} themeType={themeType} lineClamp={bioLineClamp} />];
|
||||
items2[1] = <MemberJoinDates userId={userId} guildId={displayProfile?.guildId} themeType={themeType} />;
|
||||
items2[2] = application?.popularApplicationCommandIds != null && channel != null && <BotSlashCommands applicationId={application.id} channel={channel} commandIds={application.popularApplicationCommandIds} themeType={themeType} />;
|
||||
return (
|
||||
<UserProfileCard style={items3}>
|
||||
{items2}
|
||||
</UserProfileCard>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68567() { // fn#68567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1995, offset: 0x01c54527, size: 40 bytes, params: 1, frame: 12
|
||||
const guildIdBinding = guildId;
|
||||
const value2 = null;
|
||||
return value2 != guildIdBinding ? GuildStore.getGuild(guildId) : value2;
|
||||
}
|
||||
|
||||
function _fun68568() { // fn#68568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:2063, offset: 0x01c5454f, size: 45 bytes, params: 1, frame: 14
|
||||
const guildIdBinding = guildId;
|
||||
const value2 = null;
|
||||
return value2 != guildIdBinding ? GuildMemberStore.getMember(guildId, userId) : value2;
|
||||
}
|
||||
|
||||
function _fun68570() { // fn#68570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:3158, offset: 0x01c54785, size: 340 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var length;
|
||||
var r5;
|
||||
var bot;
|
||||
var id;
|
||||
var value2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var getUserProfileActionSheetKey;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var hideActionSheet;
|
||||
var moduleValue2;
|
||||
var getRootNavigationRef;
|
||||
var value5;
|
||||
var isReady;
|
||||
var getState;
|
||||
var value6;
|
||||
var routes;
|
||||
var value7;
|
||||
var goBack;
|
||||
var value8;
|
||||
var moduleValue3;
|
||||
var transitionTo;
|
||||
var CHANNEL;
|
||||
var channelBinding;
|
||||
var guild_id;
|
||||
var runAfterInteractions;
|
||||
let value = environment;
|
||||
reducibleJoin12: while (true) {
|
||||
if (application == null) {
|
||||
break reducibleJoin12;
|
||||
}
|
||||
bot = application.bot;
|
||||
if (bot == null) {
|
||||
break reducibleJoin12;
|
||||
}
|
||||
bot = application.bot;
|
||||
id = bot.id;
|
||||
var env0_0 = id;
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
moduleValue = require(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
getUserProfileActionSheetKey = moduleValue.getUserProfileActionSheetKey;
|
||||
value4 = Reflect.apply(getUserProfileActionSheetKey, moduleValue, [id]);
|
||||
defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
hideActionSheet = defaultImport.hideActionSheet;
|
||||
Reflect.apply(hideActionSheet, defaultImport, [value4]);
|
||||
moduleValue2 = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
getRootNavigationRef = moduleValue2.getRootNavigationRef;
|
||||
value5 = Reflect.apply(getRootNavigationRef, moduleValue2, []);
|
||||
reducibleJoin11: while (true) {
|
||||
if (value5 == null) {
|
||||
break reducibleJoin11;
|
||||
}
|
||||
isReady = value5.isReady;
|
||||
if (Reflect.apply(isReady, value5, [])) {
|
||||
getState = value5.getState;
|
||||
value6 = Reflect.apply(getState, value5, []);
|
||||
reducibleJoin7: while (true) {
|
||||
if (value6 == null) {
|
||||
length = value3;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
routes = value6.routes;
|
||||
if (routes == null) {
|
||||
length = value3;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
length = routes.length;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
value7 = 0;
|
||||
r5 = length ?? value7;
|
||||
if (r5 > 1) {
|
||||
reducibleLoop9: while (true) {
|
||||
goBack = value5.goBack;
|
||||
Reflect.apply(goBack, value5, []);
|
||||
value8 = typeof r5 === 'bigint' ? r5 - 1n : +r5 - 1;
|
||||
if (value8 > 1) {
|
||||
r5 = value8;
|
||||
continue reducibleLoop9;
|
||||
}
|
||||
break reducibleLoop9;
|
||||
}
|
||||
}
|
||||
moduleValue3 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
transitionTo = moduleValue3.transitionTo;
|
||||
CHANNEL = Routes.CHANNEL;
|
||||
channelBinding = channel;
|
||||
guild_id = channelBinding.guild_id;
|
||||
id = channelBinding.id;
|
||||
Reflect.apply(transitionTo, moduleValue3, [Reflect.apply(CHANNEL, Routes, [guild_id, id])]);
|
||||
break reducibleJoin11;
|
||||
}
|
||||
break reducibleJoin11;
|
||||
}
|
||||
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
|
||||
runAfterInteractions = value.runAfterInteractions;
|
||||
Reflect.apply(runAfterInteractions, value, [_fun68571]);
|
||||
break reducibleJoin12;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun68573(a0) { // fn#68573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:4015, offset: 0x01c549c9, size: 72 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component application={application} channel={channel} command={a0} key={a0.id} />)(importDefault(8768) /* metro dependency 8768: UserProfileAboutMeCardCommand */);
|
||||
}
|
||||
|
||||
function _fun68571() { // fn#68571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:3530, offset: 0x01c548d9, size: 145 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var openCustomKeyboard;
|
||||
var object2;
|
||||
const bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput();
|
||||
if (bestActiveInput != null) {
|
||||
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
|
||||
object2 = {};
|
||||
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
|
||||
value = environment.__proto__;
|
||||
object2.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
|
||||
application: application, onPressBack: onPressBack_68572};
|
||||
Reflect.apply(openCustomKeyboard, bestActiveInput, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function onPressBack_68572() { // fn#68572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:3737, offset: 0x01c5496a, size: 95 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, context, undefined);
|
||||
object2['userId'] = id;
|
||||
object2['channelId'] = channel.id;
|
||||
object2['sourceAnalyticsLocations'] = analyticsLocations;
|
||||
value(object2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/* Metro module 8768; source: modules/user_profile/native/UserProfileAboutMeCardCommand.tsx; dependencies: [31, 661, 33, 4501, 697, 4573, 4015, 8769, 683, 4863, 4080, 8776, 5065, 5068, 2] */
|
||||
function _fun68594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:6, offset: 0x01c55540, size: 305 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {};
|
||||
const MENTION_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MENTION_FOREGROUND;
|
||||
object.color = MENTION_FOREGROUND;
|
||||
const MENTION_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MENTION_BACKGROUND;
|
||||
object.backgroundColor = MENTION_BACKGROUND;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.marginEnd = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.marginBottom = PX_12;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{commandClickable: object}]);
|
||||
value = value.memo(UserProfileAboutMeCardCommand);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileAboutMeCardCommand.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function UserProfileAboutMeCardCommand({application, command, channel}) { // fn#68595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:358, offset: 0x01c55671, size: 151 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-md/bold"
|
||||
onPress={onPress_68596}
|
||||
onLongPress={onLongPress_68599}
|
||||
style={styles.commandClickable}
|
||||
>
|
||||
{'/'}
|
||||
{command.displayName}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileAboutMeCardCommandOnPress() { // fn#68596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:498, owner: UserProfileAboutMeCardCommand.onPress, offset: 0x01c55708, size: 172 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput();
|
||||
const markupReactCommandRuleModule = require(8769) /* metro dependency 8769: MarkupReactCommandRule */;
|
||||
const handleTapCommandMention = markupReactCommandRuleModule.handleTapCommandMention;
|
||||
const object2 = {};
|
||||
object2.channelId = channel.id;
|
||||
object2.currentText = (bestActiveInput == null ? value : bestActiveInput.getText()) ?? '';
|
||||
const commandBinding = command;
|
||||
object2.commandId = commandBinding.id;
|
||||
object2.commandName = commandBinding.displayName;
|
||||
object2.onOpenCustomKeyboard = onOpenCustomKeyboard;
|
||||
object2.onSetCommand = onSetCommand;
|
||||
Reflect.apply(handleTapCommandMention, markupReactCommandRuleModule, [object2]);
|
||||
return value;
|
||||
}
|
||||
|
||||
function UserProfileAboutMeCardCommandOnLongPress() { // fn#68599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:1258, owner: UserProfileAboutMeCardCommand.onLongPress, offset: 0x01c55959, size: 56 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(8769) /* metro dependency 8769: MarkupReactCommandRule */;
|
||||
const handleLongPressCommandMention = value.handleLongPressCommandMention;
|
||||
const commandBinding = command;
|
||||
return Reflect.apply(handleLongPressCommandMention, value, [commandBinding.displayName, commandBinding.id]);
|
||||
}
|
||||
|
||||
function onPressOnSetCommand() { // fn#68598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:759, owner: UserProfileAboutMeCardCommand.onPress.onSetCommand, offset: 0x01c557da, size: 383 bytes, params: 1, frame: 21
|
||||
var r1;
|
||||
var r3;
|
||||
var r5;
|
||||
var applicationCommandManager;
|
||||
var setCommand;
|
||||
var moduleValue2;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const POPULAR_APPLICATION_COMMAND_CLICKED = AnalyticEvents.POPULAR_APPLICATION_COMMAND_CLICKED;
|
||||
let object2 = {};
|
||||
const applicationBinding = application;
|
||||
const value4 = null;
|
||||
object2.application_id = value4 == applicationBinding ? value2 : application.id;
|
||||
object2.command_id = command.id;
|
||||
const channelBinding = channel;
|
||||
object2.guild_id = channelBinding.getGuildId();
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), channelBinding);
|
||||
Reflect.apply(track, defaultImport, [POPULAR_APPLICATION_COMMAND_CLICKED, object2]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(8776) /* metro dependency 8776: navigateToLastChannel */)();
|
||||
if (value4 != env0_0) {
|
||||
env0_0.openSystemKeyboard();
|
||||
}
|
||||
const value6 = value4 == env0_0;
|
||||
if (value6) {
|
||||
r1 = value6;
|
||||
r3 = value2;
|
||||
} else {
|
||||
applicationCommandManager = env0_0.getApplicationCommandManager();
|
||||
r1 = value4 == applicationCommandManager;
|
||||
r3 = applicationCommandManager;
|
||||
}
|
||||
if (!r1) {
|
||||
setCommand = r3.setCommand;
|
||||
object2 = {};
|
||||
object2.channelId = channel.id;
|
||||
object2.command = command;
|
||||
if (value4 != application) {
|
||||
moduleValue2 = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
r5 = moduleValue2.getApplicationCommandSection(application);
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
object2.section = r5;
|
||||
object2.location = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.POPULAR_COMMANDS;
|
||||
Reflect.apply(setCommand, r3, [object2]);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,544 @@
|
||||
/* 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] */
|
||||
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});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.StyleSheet;
|
||||
const env0_6 = value2.View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
|
||||
const env0_11 = (require(6816) /* metro dependency 6816: Constants */).UserProfileThemeTypes;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = constantsModule.AnalyticEvents;
|
||||
const env0_13 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_14 = constantsModule.UserSettingsSections;
|
||||
const env0_15 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value4.jsx;
|
||||
const env0_17 = value4.jsxs;
|
||||
const env0_18 = (require(4501) /* metro dependency 4501: createStyles */).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);
|
||||
(require(2) /* metro dependency 2 */).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 moduleValue = require(6277) /* metro dependency 6277 */;
|
||||
const useBottomSheet = moduleValue.useBottomSheet;
|
||||
const animatedPosition2 = Reflect.apply(useBottomSheet, moduleValue, []).animatedPosition;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
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 reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = ActionSheetAlignedViewU;
|
||||
const object2 = {animatedPosition: animatedPosition, safeAreaTop: safeAreaTop};
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.animatedIndex = animatedIndex;
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
object2.Extrapolation = Extrapolation;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16546700050596;
|
||||
closure.__initData = env0_21;
|
||||
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={[StyleSheet.absoluteFill, value2]} pointerEvents="box-none">
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
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 = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
var object3;
|
||||
const UserProfileAnalyticsProvider = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).UserProfileAnalyticsProvider;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).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 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const top = (importDefault(1585) /* metro dependency 1585: 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 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
let object = [];
|
||||
const value10 = arraySpread(object, sourceAnalyticsLocations, 0, undefined);
|
||||
const USER_PROFILE_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_ACTION_SHEET;
|
||||
object[value10] = USER_PROFILE_ACTION_SHEET;
|
||||
value10 + 1;
|
||||
const analyticsLocations = defaultImport2(object).analyticsLocations;
|
||||
const {bottomSheetRef,
|
||||
bottomSheetClose} = (require(7326) /* metro dependency 7326: useBottomSheetRef */).useBottomSheetRef();
|
||||
let binding = isVoiceContext;
|
||||
const value12 = binding.useRef(null);
|
||||
const value13 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value14 = binding.useMemo(_fun68496, [value13]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = UserProfileActionSheetW;
|
||||
closure.__closure = {scrollPosition: value13};
|
||||
closure.__workletHash = 6237718973214;
|
||||
closure.__initData = env0_23;
|
||||
const value15 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
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 = (require(3829) /* metro dependency 3829: UserSettings */).ProfileVisibility;
|
||||
const value20 = ProfileVisibility.useSetting();
|
||||
const {pendingThemeColors, pendingAvatarDecoration, pendingProfileEffect,
|
||||
pendingProfileFrame} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore],
|
||||
function() {
|
||||
return UserProfileSettingsStore.getPendingChanges();
|
||||
});
|
||||
const value22 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).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 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).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 = (importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)(ACTION_SHEET_MAX_WIDTH);
|
||||
const {height, width} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const NAV_BAR_HEIGHT_MULTILINE = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT_MULTILINE;
|
||||
const value30 = height - NAV_BAR_HEIGHT_MULTILINE - top;
|
||||
binding = isVoiceContext;
|
||||
const value31 = binding.useMemo(_fun68504, [isPreviewingChanges, value24, width]);
|
||||
const value32 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const INTERACTIVE_TEXT_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_HOVER;
|
||||
const value33 = Reflect.apply(useToken, useTokenModule, [INTERACTIVE_TEXT_HOVER, theme]);
|
||||
const value34 = (importDefault(8746) /* metro dependency 8746: 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 = (require(1484) /* metro dependency 1484: useNavigationNative */).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 = <AnalyticsLocationProvider {...object}><UserProfileAnalyticsProvider {...userProfileAnalyticsProviderProps}><BottomSheet><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></BottomSheet></UserProfileAnalyticsProvider></AnalyticsLocationProvider>;
|
||||
r0 = value;
|
||||
} else {
|
||||
object = {theme: theme, primaryColor: primaryColor, secondaryColor: secondaryColor};
|
||||
object3 = {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 && <UseAnimatedPosition animatedPosition={value5} />;
|
||||
items2 = [r25];
|
||||
items2[1] = ((Component) => <Component gradientHeight={value30} bannerHeight={value28} />)(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) => <View style={[styles.profileEffect, {height: value30},
|
||||
value15]} pointerEvents="none">{((Component) => <Component skuId={value26.skuId} bannerAdjustment={0} />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
|
||||
items2[2] = <BottomSheetScrollView {...bottomSheetScrollViewProps2}><View><View {...viewBindingProps}>{items3}</View></View></BottomSheetScrollView>;
|
||||
r25 = value24 == null && ((ActionSheetHeaderBar) => <ActionSheetHeaderBar variant="floating" tabStyle={{backgroundColor: value33}} onPress={bottomSheetClose} />)((require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar);
|
||||
items2[3] = r25;
|
||||
items5 = [<BottomSheet {...bottomSheetProps2}>{items2}</BottomSheet>];
|
||||
items5[1] = value24 != null && <ActionSheetAlignedView animatedPosition={value5} safeAreaTop={top} animatedIndex={value6}>{((Component) => <Component frame={value24} profileThemeType={UserProfileThemeTypes.ACTION_SHEET} frameOrder={(require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder.FRONT} containerWidth={property2} />)(importDefault(8503) /* metro dependency 8503: ProfileFrame */)}{((ActionSheetHeaderBar) => <ActionSheetHeaderBar variant="floating" tabStyle={{backgroundColor: value33}} onPress={bottomSheetClose} />)((require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar)}</ActionSheetAlignedView>;
|
||||
items5[2] = isPreviewingChanges && <ThemeContextProvider theme={value32} primaryColor={null} secondaryColor={null}>{((ActionSheetBackdropToast) => <ActionSheetBackdropToast text={intl.string(value20 === (require(1314) /* metro dependency 1314: preloaded_user_settings */).ProfileVisibility.FRIENDS_ONLY ? (require(1244) /* metro dependency 1244: indexNative */).t.mNZcD8 : (require(1244) /* metro dependency 1244: indexNative */).t['wSnI/0'])} isExpanded />)((require(10496) /* metro dependency 10496: ActionSheetBackdropToast */).ActionSheetBackdropToast)}</ThemeContextProvider>;
|
||||
value = <ThemeContextProvider {...object}><AnalyticsLocationProvider {...object3}><UserProfileAnalyticsProvider {...userProfileAnalyticsProviderProps}>{items5}</UserProfileAnalyticsProvider></AnalyticsLocationProvider></ThemeContextProvider>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
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 object3 = {};
|
||||
const object4 = {};
|
||||
object4.translateY = animatedPosition.get() + safeAreaTop;
|
||||
object3.transform = [object4];
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const value = animatedIndex.get();
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
object3.opacity = Reflect.apply(interpolate, reanimatedRexportModule, [value, [-1, 0], [0, 1], CLAMP]);
|
||||
return object3;
|
||||
}
|
||||
|
||||
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 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 items;
|
||||
var object;
|
||||
if (env0_20.get() <= 0) {
|
||||
object = {};
|
||||
object.translateY = env0_20.get();
|
||||
items = [object];
|
||||
} else {
|
||||
items = [];
|
||||
}
|
||||
return {transform: items};
|
||||
}
|
||||
|
||||
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 : <ActionSheetAlignedView animatedPosition={env0_10} safeAreaTop={top} animatedIndex={env0_11}>{((Component) => <Component frame={env0_29} frameOrder={(require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder.BACK} profileThemeType={UserProfileThemeTypes.ACTION_SHEET} containerWidth={env0_23} />)(importDefault(8503) /* metro dependency 8503: ProfileFrame */)}</ActionSheetAlignedView>;
|
||||
}
|
||||
|
||||
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 || env0_17 == null)) {
|
||||
if (guild_id == null || env0_16?.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 = (importDefault(6789) /* metro dependency 6789: 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 _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 closure = handleNavigationChange;
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if (rootNavigationRef != null) {
|
||||
if (rootNavigationRef.isReady()) {
|
||||
currentRoute = rootNavigationRef.getCurrentRoute();
|
||||
key = currentRoute == null ? value : currentRoute.key;
|
||||
rootNavigationRef.addListener('state', closure);
|
||||
return _fun68514;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
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 object2 = {};
|
||||
const analyticsLocationsBinding = analyticsLocations;
|
||||
object2.sourceAnalyticsLocations = analyticsLocationsBinding;
|
||||
copyDataProperties(object2, env0_28, analyticsLocationsBinding);
|
||||
value(object2);
|
||||
}
|
||||
|
||||
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 object2 = {user: a0};
|
||||
var value;
|
||||
object2.channel = env0_14;
|
||||
object2.displayProfile = env0_17;
|
||||
object2.disableCalls = disableCalls;
|
||||
object2.disableMessage = disableMessage;
|
||||
object2.isVoiceContext = isVoiceContext;
|
||||
object2.location = location;
|
||||
object2.disableStatus = env0_32;
|
||||
object2.scrollViewRef = env0_19;
|
||||
object2.isPreviewingChanges = isPreviewingChanges;
|
||||
object2.navigateToShop = function() {
|
||||
return require(dependencyMap[53]).openUserSettings({screen: UserSettingsSections.COLLECTIBLES_SHOP,
|
||||
onClose: handleUserSettingsClose});
|
||||
};
|
||||
object2.navigateToPremium = function() {
|
||||
return require(dependencyMap[53]).openUserSettings({screen: UserSettingsSections.PREMIUM,
|
||||
onClose: handleUserSettingsClose});
|
||||
};
|
||||
object2.showUserProfileActionSheet = showUserProfileActionSheetWithParams;
|
||||
object2.initialSection = initialSection;
|
||||
const value3 = undefined;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object2.scrollPosition = platformUtilsModule.isIOS() ? env0_20 : value3;
|
||||
if (a0.isNonUserBot()) {
|
||||
value = importDefault(8759) /* metro dependency 8759: NonUserBotProfileContent */;
|
||||
value = ((Component) => <Component {...object2} />)(value);
|
||||
r0 = value;
|
||||
} else if (a0.bot) {
|
||||
value = importDefault(8779) /* metro dependency 8779: BotUserProfileContent */;
|
||||
value = ((Component) => <Component {...object2} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = importDefault(10338) /* metro dependency 10338: UserProfileContent */;
|
||||
value = ((Component) => <Component {...object2} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function buildBottomSheeetScrollEventsHandlers(a0) { // fn#68497, offset: 0x01c51c83, size: 18 bytes, params: 2, frame: 2
|
||||
const env0_0 = a0;
|
||||
return _fun68498;
|
||||
}
|
||||
|
||||
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 _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 = (require(6277) /* metro dependency 6277 */).useScrollEventsHandlersDefault(a0, a1, a2);
|
||||
const moduleValue2 = require(6277) /* metro dependency 6277 */;
|
||||
const useBottomSheetInternal = moduleValue2.useBottomSheetInternal;
|
||||
const animatedScrollableState = Reflect.apply(useBottomSheetInternal, moduleValue2, []).animatedScrollableState;
|
||||
const env0_0 = animatedScrollableState;
|
||||
const handleOnScroll = value2.handleOnScroll;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useWorkletCallback = reanimatedRexportModule.useWorkletCallback;
|
||||
const closure = s_68499;
|
||||
let object2 = {defaultHandleOnScroll: handleOnScroll};
|
||||
object2.scrollPosition = env0_0;
|
||||
object2.animatedScrollableState = animatedScrollableState;
|
||||
const SCROLLABLE_STATE = moduleValue2.SCROLLABLE_STATE;
|
||||
object2.SCROLLABLE_STATE = SCROLLABLE_STATE;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13254130622789;
|
||||
closure.__initData = env3_22;
|
||||
value = Reflect.apply(useWorkletCallback, reanimatedRexportModule, [closure, [handleOnScroll,
|
||||
animatedScrollableState]]);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value2, undefined);
|
||||
object2['handleOnScroll'] = value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
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 = (require(6277) /* metro dependency 6277 */).SCROLLABLE_STATE;
|
||||
const LOCKED = SCROLLABLE_STATE.LOCKED;
|
||||
Reflect.apply(set, binding, [value === LOCKED ? 0 : a0.contentOffset.y]);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,89 @@
|
||||
/* Metro module 10221; source: modules/user_profile/native/UserProfileActivityBadges.tsx; dependencies: [31, 27, 661, 33, 4501, 10222, 6885, 8840, 8835, 8841, 8658, 10224, 10225, 697, 10226, 8375, 6699, 4573, 10236, 2] */
|
||||
function _fun79510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10407:6, offset: 0x01e55dbb, size: 278 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
|
||||
'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}, bold: {fontWeight: 'bold'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivityBadges.tsx');
|
||||
exports.TimestampBadge = TimestampBadge;
|
||||
exports.PartyBadge = PartyBadge;
|
||||
exports.EpisodeBadge = EpisodeBadge;
|
||||
}
|
||||
|
||||
function TimestampBadge({activity}) { // fn#79511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10407:403, offset: 0x01e55ed1, size: 574 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const useTimestampTickedNowModule = require(10224) /* metro dependency 10224: useTimestampTickedNow */;
|
||||
const useTimestampTickedNow = useTimestampTickedNowModule.useTimestampTickedNow;
|
||||
const now = Reflect.apply(useTimestampTickedNow, useTimestampTickedNowModule, []).now;
|
||||
const r13 = activity.timestamps?.start ?? activity.created_at;
|
||||
if (r13 == null) {
|
||||
return null;
|
||||
}
|
||||
if ((importDefault(10225) /* metro dependency 10225: shouldShowActivityTimeBar */)(activity)) {
|
||||
return null;
|
||||
}
|
||||
const end = activity.timestamps?.end;
|
||||
const isCountDown = activity.timestamps?.isCountDown;
|
||||
const r11 = isCountDown != null && isCountDown;
|
||||
let r2 = r11 && end != null && end > now;
|
||||
r2 = !(r2 === undefined) && r2;
|
||||
const r7 = r2 ? (require(10222) /* metro dependency 10222: HourglassIcon */).HourglassIcon : (importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity) ? (require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon : activity.type === ActivityTypes.WATCHING ? (require(8835) /* metro dependency 8835: TvIcon */).TvIcon : activity.type === ActivityTypes.LISTENING ? (require(8841) /* metro dependency 8841: MusicIcon */).MusicIcon : (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
|
||||
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
|
||||
const value7 = ((Component) => <Component size="xxs" color={TEXT_FEEDBACK_POSITIVE} />)(r7);
|
||||
const ActiveTimestamp = (require(10226) /* metro dependency 10226: Badges */).ActiveTimestamp;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{value7}
|
||||
<ActiveTimestamp entry={{start: r13, end: end, isCountDown: r11}} style={styles.bold} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PartyBadge({activity}) { // fn#79512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10407:1088, offset: 0x01e5610f, size: 288 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
if ((importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity)) {
|
||||
return null;
|
||||
}
|
||||
if (activity.party == null) {
|
||||
return null;
|
||||
}
|
||||
const richGameStateBadgeText = (require(8375) /* metro dependency 8375: utils */).getRichGameStateBadgeText(activity.state,
|
||||
activity.party);
|
||||
if (richGameStateBadgeText == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
const GroupIcon = (require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon;
|
||||
value = <GroupIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} />;
|
||||
value = <View {...viewBindingProps}>{value}{((Text) => <Text variant="text-sm/medium" color="text-muted">{richGameStateBadgeText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function EpisodeBadge({activity}) { // fn#79513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10407:1445, offset: 0x01e5622f, size: 249 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const episodeBadgeText = (require(8375) /* metro dependency 8375: utils */).getEpisodeBadgeText(activity.assets?.large_text);
|
||||
if (episodeBadgeText == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
const TopicsIcon = (require(10236) /* metro dependency 10236: TopicsIcon */).TopicsIcon;
|
||||
value = <TopicsIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} />;
|
||||
value = <View {...viewBindingProps}>{value}{((Text) => <Text variant="text-sm/medium" color="text-muted">{episodeBadgeText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,805 @@
|
||||
/* Metro module 10256; source: modules/user_profile/native/UserProfileActivityButtons.tsx; dependencies: [5, 31, 1378, 1379, 5040, 4111, 1867, 6877, 3784, 3793, 1934, 6876, 4297, 661, 6868, 33, 4501, 697, 6771, 3774, 632, 10257, 10258, 6885, 4578, 1244, 8840, 8109, 4080, 10265, 6887, 1305, 8381, 10216, 3853, 10266, 8419, 5080, 5176, 4008, 8113, 7709, 4915, 1423, 9354, 7007, 8846, 10218, 1471, 8872, 2] */
|
||||
function _fun79633(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:6, offset: 0x01e5bcd2, size: 534 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
|
||||
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const localActivityStore = importDefault(6877) /* metro dependency 6877: LocalActivityStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_15 = value.PlatformTypes;
|
||||
const env0_16 = value.UserSettingsSections;
|
||||
value = require(6868) /* metro dependency 6868: SpotifyConstants */;
|
||||
const env0_17 = value.SpotifyEndpoints;
|
||||
const env0_18 = value.SpotifyResourceTypes;
|
||||
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const CONTROL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
|
||||
const env0_20 = Reflect.apply(createStyles, value, [{icon: {tintColor: CONTROL_SECONDARY_TEXT_DEFAULT}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivityButtons.tsx');
|
||||
exports.JoinActivityButton = JoinActivityButton;
|
||||
exports.JoinGameActivityButton = JoinGameActivityButton;
|
||||
exports.PlayOnSpotifyButton = PlayOnSpotifyButton;
|
||||
exports.WatchActivityButton = WatchActivityButton;
|
||||
exports.VoiceChannelButtons = VoiceChannelButtons;
|
||||
exports.ConnectPlatformButton = ConnectPlatformButton;
|
||||
exports.CustomActivityButton = CustomActivityButton;
|
||||
}
|
||||
|
||||
function JoinActivityButton({user, currentUser, activity, application, onAction}) { // fn#79634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:560, offset: 0x01e5bee8, size: 707 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
const ActivityJoinability = (require(10258) /* metro dependency 10258: getActivityJoinability */).ActivityJoinability;
|
||||
var Button;
|
||||
var JOINED;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const env0_5 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const env0_6 = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(EmbeddedActivitiesStore.getEmbeddedActivityForUserId(user.id,
|
||||
application?.id)?.location);
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
let useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
const env0_7 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [[], _fun79635]);
|
||||
const moduleValue3 = useStateFromStoresModule;
|
||||
useStateFromStores = moduleValue3.useStateFromStores;
|
||||
object = [ChannelStore];
|
||||
object[1] = GuildStore;
|
||||
object[2] = GuildMemberCountStore;
|
||||
object[3] = RelationshipStore;
|
||||
object[4] = SelectedChannelStore;
|
||||
object[5] = VoiceStateStore;
|
||||
object[6] = PermissionStore;
|
||||
object[7] = LocalActivityStore;
|
||||
object[8] = SelfPresenceStore;
|
||||
object[9] = EmbeddedActivitiesStore;
|
||||
const value5 = Reflect.apply(useStateFromStores, moduleValue3, [object, _fun79636]);
|
||||
if ((importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity)) {
|
||||
if (application != null) {
|
||||
if (value5 === ActivityJoinability.CANNOT_JOIN) {
|
||||
r0 = null;
|
||||
} else {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
object = {};
|
||||
JOINED = ActivityJoinability.JOINED;
|
||||
object.text = value5 === JOINED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DPfdsq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4i2vj+']);
|
||||
object.icon = ((AppsIcon) => <AppsIcon size="sm" color="white" />)((require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon);
|
||||
object.variant = 'active';
|
||||
JOINED = ActivityJoinability.JOINED;
|
||||
object.disabled = value5 === JOINED;
|
||||
object.onPress = onPress_79637;
|
||||
r0 = <Button {...object} />;
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function JoinGameActivityButton({user, currentUser, activity, application, onAction}) { // fn#79638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:1781, offset: 0x01e5c314, size: 527 bytes, params: 2, frame: 24
|
||||
var r8;
|
||||
var r0;
|
||||
const ActivityJoinability = (require(10258) /* metro dependency 10258: getActivityJoinability */).ActivityJoinability;
|
||||
var Button;
|
||||
var JOINED;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const env0_5 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const object2 = {};
|
||||
object2.id = application.id;
|
||||
object2.deeplink_uri = application.deepLinkUri;
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore,
|
||||
GuildStore, GuildMemberCountStore, RelationshipStore, SelectedChannelStore, VoiceStateStore, PermissionStore,
|
||||
LocalActivityStore, SelfPresenceStore, EmbeddedActivitiesStore], _fun79639);
|
||||
if (application == null) {
|
||||
r0 = null;
|
||||
} else if (value2 === ActivityJoinability.CANNOT_JOIN) {
|
||||
r0 = null;
|
||||
} else {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
JOINED = ActivityJoinability.JOINED;
|
||||
r8 = value2 === JOINED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DPfdsq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VJlc0S);
|
||||
JOINED = ActivityJoinability.JOINED;
|
||||
r0 = <Button text={r8} variant="active" disabled={value2 === JOINED} onPress={onPress_79640} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function PlayOnSpotifyButton({activity, onAction}) { // fn#79641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:2826, offset: 0x01e5c66a, size: 317 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var Button;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
if ((importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(activity)) {
|
||||
if (activity.sync_id != null) {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <Button text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.LEgD7t,
|
||||
|
||||
{platform: activity.name})} icon={((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} source={importDefault(8381) /* metro dependency 8381 */} disableColor style={styles.icon} />)((require(1305) /* metro dependency 1305: native */).Icon)} variant="secondary" onPress={env0_3(_fun79643)} />;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function WatchActivityButton({activity, onAction}) { // fn#79644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3399, offset: 0x01e5c874, size: 197 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Button;
|
||||
var intl;
|
||||
if ((importDefault(8419) /* metro dependency 8419: isStreaming */)(activity)) {
|
||||
if ((importDefault(10266) /* metro dependency 10266: getStreamURL */)(activity) != null) {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I6JG46)} variant="secondary" onPress={onPress_79645} />;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function VoiceChannelButtons({channel, isInChannel, onAction}) { // fn#79646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3680, offset: 0x01e5c97b, size: 475 bytes, params: 2, frame: 25
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
|
||||
const isGuildStageVoice2 = channel.isGuildStageVoice();
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const isDM2 = channel.isDM();
|
||||
return (
|
||||
<Button
|
||||
text={isInChannel ? isDM2 || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7hwn2A']) : isGuildStageVoice2 ? intl.string(t.Acqcot) : intl.string(t.BXxdl7) : isDM2 || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ozoE2A) : isGuildStageVoice2 ? intl.string(t['7vb2cc']) : intl.string(t['96ANUN'])}
|
||||
variant={isInChannel ? 'secondary' : 'active'}
|
||||
grow
|
||||
onPress={onPress_79647}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ConnectPlatformButton({type, onAction}) { // fn#79648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:4594, offset: 0x01e5cc91, size: 396 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
if (Reflect.apply(useStateFromStores, useStateFromStoresModule, [[ConnectedAccountsStore], function() {
|
||||
return ConnectedAccountsStore.getAccount(null, type) != null;
|
||||
}])) {
|
||||
return null;
|
||||
}
|
||||
const value2 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(type);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const XWSHTb = (require(1244) /* metro dependency 1244: indexNative */).t.XWSHTb;
|
||||
const object = {};
|
||||
object.platform = value2.name;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const SMALL = Sizes.SMALL;
|
||||
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
return (
|
||||
<Button
|
||||
text={Reflect.apply(formatToPlainString, intl, [XWSHTb, object])}
|
||||
icon={<Icon size={SMALL} source={avatarUtilsModule.makeSource(value2.icon.whitePNG)} disableColor style={styles.icon} />}
|
||||
variant="secondary"
|
||||
onPress={onPress_79650}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function CustomActivityButton({user, activity, index, onAction}) { // fn#79652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5284, offset: 0x01e5ceec, size: 253 bytes, params: 2, frame: 22
|
||||
var r7;
|
||||
var r0;
|
||||
var Button;
|
||||
var intl;
|
||||
const buttons = activity.buttons;
|
||||
const value = null;
|
||||
if (value == buttons) {
|
||||
r0 = value;
|
||||
} else if (index >= activity.buttons.length) {
|
||||
r0 = value;
|
||||
} else {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
if ((importDefault(8846) /* metro dependency 8846: isCrunchyrollActivity */)(activity)) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I6JG46);
|
||||
} else {
|
||||
r7 = activity.buttons[index];
|
||||
}
|
||||
r0 = <Button text={r7} variant="secondary" onPress={onAction(_fun79654)} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun79635() { // fn#79635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:852, offset: 0x01e5c1ab, size: 67 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(10257) /* metro dependency 10257: getActivityChannelId */)({channelId: env0_6,
|
||||
userId: user.id, activity: activity});
|
||||
}
|
||||
|
||||
function _fun79636() { // fn#79636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:958, offset: 0x01e5c1ee, size: 176 bytes, params: 1, frame: 14
|
||||
return (importDefault(10258) /* metro dependency 10258: getActivityJoinability */)({isEmbedded: true, user: user,
|
||||
currentUser: currentUser, activity: activity, application: application, channelId: env0_7,
|
||||
ChannelStore: ChannelStore, GuildStore: GuildStore, GuildMemberCountStore: GuildMemberCountStore,
|
||||
RelationshipStore: RelationshipStore, SelectedChannelStore: SelectedChannelStore,
|
||||
VoiceStateStore: VoiceStateStore, PermissionStore: PermissionStore, LocalActivityStore: LocalActivityStore,
|
||||
SelfPresenceStore: SelfPresenceStore, EmbeddedActivitiesStore: EmbeddedActivitiesStore});
|
||||
}
|
||||
|
||||
function JoinActivityButtonOnPress() { // fn#79637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:1593, owner: JoinActivityButton.onPress, offset: 0x01e5c29e, size: 118 bytes, params: 1, frame: 15
|
||||
onAction({action: 'PRESS_JOIN_BUTTON'});
|
||||
(importDefault(8109) /* metro dependency 8109: handleJoinEmbeddedActivity */)({applicationId: application.id,
|
||||
activityChannelId: env0_7, locationObject: {}, analyticsLocations: analyticsLocations});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun79639() { // fn#79639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:2001, offset: 0x01e5c523, size: 174 bytes, params: 1, frame: 14
|
||||
return (importDefault(10258) /* metro dependency 10258: getActivityJoinability */)({user: user,
|
||||
currentUser: currentUser, activity: activity, application: application, channelId: null, isEmbedded: false,
|
||||
ChannelStore: ChannelStore, GuildStore: GuildStore, GuildMemberCountStore: GuildMemberCountStore,
|
||||
RelationshipStore: RelationshipStore, SelectedChannelStore: SelectedChannelStore,
|
||||
VoiceStateStore: VoiceStateStore, PermissionStore: PermissionStore, LocalActivityStore: LocalActivityStore,
|
||||
SelfPresenceStore: SelfPresenceStore, EmbeddedActivitiesStore: EmbeddedActivitiesStore});
|
||||
}
|
||||
|
||||
function JoinGameActivityButtonOnPress() { // fn#79640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:2576, owner: JoinGameActivityButton.onPress, offset: 0x01e5c5d1, size: 153 bytes, params: 1, frame: 18
|
||||
onAction({action: 'PRESS_JOIN_BUTTON'});
|
||||
const defaultImport = importDefault(10265) /* metro dependency 10265: GamesActionCreatorsNative */;
|
||||
const join = defaultImport.join;
|
||||
const activityBinding = activity;
|
||||
Reflect.apply(join, defaultImport, [{userId: user.id, sessionId: activityBinding.session_id, application: env0_6,
|
||||
channelId: null, messageId: null, applicationActivity: activityBinding, source: 'UserProfile',
|
||||
analyticsLocations: analyticsLocations}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function* _fun79643() { // fn#79643, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3156, offset: 0x01e5c7b2, size: 194 bytes, params: 1, frame: 20
|
||||
var r3;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var canOpenSpotifyUrl;
|
||||
var canOpenSpotifyUrl2;
|
||||
var value5;
|
||||
var value6;
|
||||
var binding3;
|
||||
var value7;
|
||||
var attributeInstall;
|
||||
var openURL;
|
||||
var APP_STORE;
|
||||
var openUrl;
|
||||
var TRACK;
|
||||
var error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
require({action: 'PRESS_PLAY_ON_SPOTIFY_BUTTON'});
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[33];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
canOpenSpotifyUrl = value4.canOpenSpotifyUrl;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
canOpenSpotifyUrl2 = Reflect.apply(canOpenSpotifyUrl, value4, []);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
yield canOpenSpotifyUrl2;
|
||||
try {
|
||||
value5 = undefined;
|
||||
value6 = false;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
if (value6) {
|
||||
return value5;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding3[33];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value7 = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
if (value5) {
|
||||
try {
|
||||
openUrl = value7.openUrl;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_18;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
TRACK = binding.TRACK;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(openUrl, value7, [value5, TRACK, importDefault]);
|
||||
r3 = value;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
attributeInstall = value7.attributeInstall;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(attributeInstall, value7, []);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding3[34];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
openURL = value.openURL;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_17;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
APP_STORE = binding.APP_STORE;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(openURL, value, [APP_STORE]);
|
||||
r3 = value;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return r3;
|
||||
}
|
||||
|
||||
function WatchActivityButtonOnPress() { // fn#79645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3591, owner: WatchActivityButton.onPress, offset: 0x01e5c939, size: 66 bytes, params: 1, frame: 13
|
||||
onAction({action: 'PRESS_WATCH_BUTTON'});
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(env0_1);
|
||||
}
|
||||
|
||||
function VoiceChannelButtonsOnPress() { // fn#79647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:4193, owner: VoiceChannelButtons.onPress, offset: 0x01e5cb56, size: 315 bytes, params: 1, frame: 17
|
||||
var r2;
|
||||
var rootNavigationRef;
|
||||
var value5;
|
||||
var currentRoute;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const onActionBinding = onAction;
|
||||
const value2 = undefined;
|
||||
onActionBinding({action: 'PRESS_JOIN_CALL_BUTTON'});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
|
||||
const YouBarExperiment = (require(5176) /* metro dependency 5176: YouBarExperiment */).YouBarExperiment;
|
||||
const getConfig = YouBarExperiment.getConfig;
|
||||
if (Reflect.apply(getConfig, YouBarExperiment, [{location: 'VoiceChannelButtons'}]).enabled) {
|
||||
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
value5 = (rootNavigationRef == null ? value2 : rootNavigationRef.isReady()) === true;
|
||||
if (value5) {
|
||||
currentRoute = rootNavigationRef.getCurrentRoute();
|
||||
r2 = (currentRoute == null ? value2 : currentRoute.name) === 'you';
|
||||
} else {
|
||||
r2 = value5;
|
||||
}
|
||||
if (r2) {
|
||||
rootNavigationRef.goBack();
|
||||
}
|
||||
}
|
||||
if (env0_3) {
|
||||
moduleValue3 = require(8113) /* metro dependency 8113: StageChannelModalActionCreators */;
|
||||
moduleValue3.connectAndOpen(channel);
|
||||
} else {
|
||||
moduleValue2 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
moduleValue2.openGuildVoiceModal(channel, newestAnalyticsLocation);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function ConnectPlatformButtonOnPress() { // fn#79650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5054, owner: ConnectPlatformButton.onPress, offset: 0x01e5ce3f, size: 118 bytes, params: 1, frame: 15
|
||||
const onActionBinding = onAction;
|
||||
const typeBinding = type;
|
||||
const PLAYSTATION = PlatformTypes.PLAYSTATION;
|
||||
onActionBinding({action: typeBinding !== PLAYSTATION ? 'PRESS_CONNECT_XBOX_BUTTON' : 'PRESS_CONNECT_PLAYSTATION_BUTTON'});
|
||||
(importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: env0_3.type,
|
||||
location: newestAnalyticsLocation, onClose: function() {
|
||||
return require(dependencyMap[45]).openUserSettings({screen: UserSettingsSections.CONNECTIONS});
|
||||
}});
|
||||
}
|
||||
|
||||
function* _fun79654() { // fn#79654, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5523, offset: 0x01e5cff4, size: 354 bytes, params: 1, frame: 21
|
||||
var protocol;
|
||||
var hostname;
|
||||
var binding2;
|
||||
var property;
|
||||
var value5;
|
||||
var getMetadata;
|
||||
var id;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var button_urls;
|
||||
var length;
|
||||
var value9;
|
||||
var value10;
|
||||
var binding3;
|
||||
var property2;
|
||||
var value11;
|
||||
var safeParseWithQuery;
|
||||
var value12;
|
||||
var value13;
|
||||
var value14;
|
||||
var value15;
|
||||
var value16;
|
||||
var binding4;
|
||||
var value17;
|
||||
var format;
|
||||
var value18;
|
||||
var value19;
|
||||
var handleClick;
|
||||
var closure;
|
||||
var error;
|
||||
let value = undefined;
|
||||
if (true) {
|
||||
value = undefined;
|
||||
var env0_0;
|
||||
var binding = env1_3;
|
||||
var object2 = {action: 'PRESS_CUSTOM_BUTTON'};
|
||||
binding(object2);
|
||||
reducibleJoin4: while (true) {
|
||||
reduciblePort69: while (true) {
|
||||
exceptionLanding68: while (true) {
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
break reduciblePort69;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property = binding2[47];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value5 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
getMetadata = value5.getMetadata;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
id = require.id;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(getMetadata, value5, [importDefault, id]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
yield value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
try {
|
||||
button_urls = value7.button_urls;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
length = button_urls.length;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value9 = length <= dependencyMap;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
if (value9) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
button_urls = value7.button_urls;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property = button_urls[dependencyMap];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value10 = typeof property !== 'string';
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
if (value10) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property2 = binding3[48];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value11 = binding(property2);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
safeParseWithQuery = value11.safeParseWithQuery;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value12 = Reflect.apply(safeParseWithQuery, value11, [property]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value13 = value12 == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
reducibleJoin38: while (true) {
|
||||
if (value13) {
|
||||
protocol = value;
|
||||
break reducibleJoin38;
|
||||
}
|
||||
try {
|
||||
protocol = value12.protocol;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
break reducibleJoin38;
|
||||
}
|
||||
try {
|
||||
value14 = protocol == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
if (!value14) {
|
||||
try {
|
||||
value15 = value12 == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
reducibleJoin44: while (true) {
|
||||
if (value15) {
|
||||
hostname = value;
|
||||
break reducibleJoin44;
|
||||
}
|
||||
try {
|
||||
hostname = value12.hostname;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
break reducibleJoin44;
|
||||
}
|
||||
try {
|
||||
value16 = hostname == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
reducibleJoin64: while (true) {
|
||||
if (!value16) {
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding4 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property = binding4[48];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value17 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
format = value17.format;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value18 = Reflect.apply(format, value17, [value12]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
env0_0 = value18;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property = binding4[49];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value19 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
handleClick = value19.handleClick;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2.href = value18;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
closure = onConfirm_79655;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2.onConfirm = closure;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2.trusted = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(handleClick, value19, [object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
break reducibleJoin64;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function onConfirm_79655() { // fn#79655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5880, offset: 0x01e5d156, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return env3_1(env3_2[34]).openURL(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/* Metro module 10220; source: modules/user_profile/native/UserProfileActivityCardBadges.tsx; dependencies: [31, 27, 661, 33, 10221, 2] */
|
||||
function _fun79507(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10406:6, offset: 0x01e55bb5, size: 174 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivityCardBadges.tsx');
|
||||
exports.default = UserProfileActivityCardBadges;
|
||||
}
|
||||
|
||||
function UserProfileActivityCardBadges({activity, style}) { // fn#79508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10406:262, offset: 0x01e55c63, size: 306 bytes, params: 2, frame: 19
|
||||
var r6;
|
||||
var items;
|
||||
const type = activity.type;
|
||||
const PLAYING = ActivityTypes.PLAYING;
|
||||
if (type === PLAYING) {
|
||||
items = [(require(10221) /* metro dependency 10221: UserProfileActivityBadges */).TimestampBadge];
|
||||
items[1] = (require(10221) /* metro dependency 10221: UserProfileActivityBadges */).PartyBadge;
|
||||
r6 = items;
|
||||
} else if (activity.type === ActivityTypes.LISTENING) {
|
||||
r6 = [(require(10221) /* metro dependency 10221: UserProfileActivityBadges */).TimestampBadge];
|
||||
} else if (activity.type === ActivityTypes.WATCHING) {
|
||||
items = [(require(10221) /* metro dependency 10221: UserProfileActivityBadges */).TimestampBadge];
|
||||
items[1] = (require(10221) /* metro dependency 10221: UserProfileActivityBadges */).EpisodeBadge;
|
||||
r6 = items;
|
||||
} else {
|
||||
r6 = [];
|
||||
}
|
||||
return r6.length === 0 ? null : <View style={style}>{r6.map(_fun79509)}</View>;
|
||||
}
|
||||
|
||||
function _fun79509(a0, a1) { // fn#79509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10406:569, offset: 0x01e55d95, size: 38 bytes, params: 3, frame: 15
|
||||
return ((Component) => <Component activity={activity} key={a1} />)(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 10246; source: modules/user_profile/native/UserProfileActivityTimebar.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1357, 10247, 4573, 2] */
|
||||
function _fun79578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10432:6, offset: 0x01e58c65, size: 373 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object5.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object5.height = 4;
|
||||
object5.marginBottom = 4;
|
||||
object4.bar = object5;
|
||||
const object6 = {};
|
||||
const ACTIVITY_TIMEBAR_PROGRESS_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.ACTIVITY_TIMEBAR_PROGRESS_BACKGROUND;
|
||||
object6.backgroundColor = ACTIVITY_TIMEBAR_PROGRESS_BACKGROUND;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object6.height = '100%';
|
||||
object6.minWidth = 4;
|
||||
object4.progress = object6;
|
||||
object4.textRow = {'flexDirection': 'row', 'justifyContent': 'space-between'};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivityTimebar.tsx');
|
||||
exports.default = UserProfileActivityTimebar;
|
||||
}
|
||||
|
||||
function UserProfileActivityTimebar({start, end, style}) { // fn#79579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10432:597, offset: 0x01e58dda, size: 481 bytes, params: 2, frame: 30
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('UserProfileActivityTimebar');
|
||||
const styles = useStyles();
|
||||
const {elapsed, duration,
|
||||
percentage} = (importDefault(10247) /* metro dependency 10247: useActivityTimer */)({start: start, end: end});
|
||||
const r11 = value3 ? undefined : {fontFamily: Fonts.CODE_NORMAL};
|
||||
const view = <View style={styles.bar}><View style={[styles.progress, {width: 100 * percentage + '%'}]} /></View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={style}>
|
||||
{view}
|
||||
<View style={styles.textRow}>
|
||||
<Text
|
||||
variant="text-xs/normal"
|
||||
style={r11}
|
||||
tabularNumbers={value3 || undefined}
|
||||
color={value3 ? 'text-subtle' : undefined}
|
||||
>
|
||||
{(require(10247) /* metro dependency 10247: useActivityTimer */).formatTime(elapsed)}
|
||||
</Text>
|
||||
<Text
|
||||
variant="text-xs/normal"
|
||||
style={r11}
|
||||
tabularNumbers={value3 || undefined}
|
||||
color={value3 ? 'text-subtle' : undefined}
|
||||
>
|
||||
{(require(10247) /* metro dependency 10247: useActivityTimer */).formatTime(duration)}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* Metro module 10248; source: modules/user_profile/native/UserProfileActivityVoiceChannel.tsx; dependencies: [27, 3784, 482, 33, 4501, 477, 6771, 8514, 4559, 10249, 4805, 566, 6707, 6711, 1244, 6819, 5278, 3857, 6818, 4573, 9122, 7709, 4080, 10250, 1962, 8743, 10251, 1305, 2] */
|
||||
function _fun79590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:6, offset: 0x01e593d4, size: 316 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_5 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'flex': 1, 'overflow': 'hidden'};
|
||||
object.marginTop = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? -2 : -1;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{container: {'flexDirection': 'row', 'alignItems': 'center',
|
||||
'gap': 4, 'overflow': 'hidden'}, channelButton: {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'gap': 2}, channelName: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivityVoiceChannel.tsx');
|
||||
exports.default = UserProfileActivityVoiceChannel;
|
||||
}
|
||||
|
||||
function UserProfileActivityVoiceChannel({guild, channel, onAction, style}) { // fn#79591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:524, offset: 0x01e59510, size: 1312 bytes, params: 2, frame: 33
|
||||
var r6;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
const env0_3 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_4 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule, []).context;
|
||||
const value2 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
const value3 = (importDefault(10249) /* metro dependency 10249: usePersonalizedVoiceChannelUsers */)(channel);
|
||||
const value4 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun79592);
|
||||
const r12 = channel.isGuildStageVoice() ? (require(6707) /* metro dependency 6707: StageIcon */).StageIcon : (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
|
||||
const items3 = [styles.container, style];
|
||||
const items2 = [value2 ? <View accessible accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.xm6W9D,
|
||||
{guildName: guild.name})}>{((Component) => <Component size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL} guild={guild} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</View> : <PressableOpacity accessibilityRole="button" accessibilityLabel={guild.name} onPress={function() {
|
||||
onAction({action: 'PRESS_VOICE_CHANNEL_ICON'});
|
||||
importDefault(dependencyMap[17]).open({key: 'GUILD_NAME_TOAST', content: guild.name, icon: _fun79594});
|
||||
}}>{((Component) => <Component size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL} guild={guild} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</PressableOpacity>];
|
||||
const ChevronSmallRightIcon = (require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon;
|
||||
items2[1] = <ChevronSmallRightIcon size="xxs" color="text-default" />;
|
||||
if (value5) {
|
||||
r6 = <PressableOpacity style={styles.channelButton} accessibilityRole="button" accessibilityLabel={(importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel})} accessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9C444m'])} onPress={onPress_79595}>{((Component) => <Component size="xxs" color="text-default" />)(r12)}{((Text) => <Text style={styles.channelName} variant="text-xs/normal" lineClamp={1}>{value4}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>;
|
||||
} else {
|
||||
r6 = <View style={styles.channelButton}>{((Component) => <Component size="xxs" color="text-default" />)(r12)}{((Text) => <Text style={styles.channelName} variant="text-xs/normal" lineClamp={1}>{value4}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
}
|
||||
items2[2] = r6;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const e95u3C = (require(1244) /* metro dependency 1244: indexNative */).t.e95u3C;
|
||||
const object = {};
|
||||
object.count = value3.length;
|
||||
const AvatarPile = (require(10251) /* metro dependency 10251: AvatarPileNative */).AvatarPile;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const SIZE_16 = AvatarSizes.SIZE_16;
|
||||
items2[3] = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
|
||||
intl, [e95u3C,
|
||||
object])} onPress={onPress_79596}><AvatarPile size={SIZE_16} totalCount={value3.length} names={value3.map(function(a0) {
|
||||
return a0.username;
|
||||
})}>{(value3.length <= 3 ? value3 : value3.slice(0, 3)).map(_fun79599)}</AvatarPile></PressableOpacity>;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79592() { // fn#79592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:801, offset: 0x01e59a30, size: 55 bytes, params: 1, frame: 14
|
||||
return channel.isPrivate() || PermissionStore.can(Permissions.CONNECT, channel);
|
||||
}
|
||||
|
||||
function UserProfileActivityVoiceChannelOnPress() { // fn#79593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:1225, owner: UserProfileActivityVoiceChannel.onPress, offset: 0x01e59a67, size: 100 bytes, params: 1, frame: 14
|
||||
onAction({action: 'PRESS_VOICE_CHANNEL_ICON'});
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'GUILD_NAME_TOAST',
|
||||
content: guild.name, icon: icon_79594});
|
||||
}
|
||||
|
||||
function UserProfileActivityVoiceChannelOnPress_79595() { // fn#79595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:1720, owner: UserProfileActivityVoiceChannel.onPress, offset: 0x01e59b1a, size: 97 bytes, params: 1, frame: 16
|
||||
onAction({action: 'OPEN_VOICE_CHANNEL'});
|
||||
const privateChannelCallUtilsModule = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
privateChannelCallUtilsModule.openGuildVoiceModal(channel, newestAnalyticsLocation);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function UserProfileActivityVoiceChannelOnPress_79596() { // fn#79596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:2278, owner: UserProfileActivityVoiceChannel.onPress, offset: 0x01e59b7b, size: 144 bytes, params: 1, frame: 18
|
||||
onAction({action: 'PRESS_VOICE_CHANNEL_AVATARS'});
|
||||
const defaultImport = importDefault(dependencyMap[22]);
|
||||
defaultImport.openLazy(require(dependencyMap[24])(dependencyMap[23], dependencyMap.paths),
|
||||
'UserProfileActivityVoiceChannelUsers', {users: env0_5, channel: channel, onPressUser: onPressUser_79597},
|
||||
'stack');
|
||||
}
|
||||
|
||||
function _fun79599(a0) { // fn#79599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:2639, offset: 0x01e59c52, size: 107 bytes, params: 2, frame: 18
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const SIZE_16 = AvatarSizes.SIZE_16;
|
||||
return (
|
||||
<Avatar
|
||||
size={SIZE_16}
|
||||
channel={channel}
|
||||
guildId={guild.id}
|
||||
user={a0}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onPressIcon_79594() { // fn#79594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:1327, owner: UserProfileActivityVoiceChannel.onPress.icon, offset: 0x01e59acb, size: 79 bytes, params: 1, frame: 16
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const XSMALL = GuildIconSizes.XSMALL;
|
||||
return <GuildIcon size={XSMALL} guild={guild} />;
|
||||
}
|
||||
|
||||
function onPressOnPressUser(a0) { // fn#79597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:2437, owner: UserProfileActivityVoiceChannel.onPress.onPressUser, offset: 0x01e59c0b, size: 60 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, context, undefined);
|
||||
object2['userId'] = a0;
|
||||
return value(object2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/* Metro module 10250; source: modules/user_profile/native/UserProfileActivityVoiceChannelUsers.tsx; dependencies: [31, 4396, 33, 4618, 566, 6238, 4617, 1305, 8694, 1244, 2] */
|
||||
function _fun79610(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10436:6, offset: 0x01e59f7a, size: 165 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivityVoiceChannelUsers.tsx');
|
||||
exports.default = UserProfileActivityVoiceChannelUsers;
|
||||
}
|
||||
|
||||
function UserRow_79611({user, channel, onPress, start, end}) { // fn#79611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10436:128, offset: 0x01e5a01f, size: 321 bytes, params: 2, frame: 29
|
||||
const value2 = (require(4618) /* metro dependency 4618: useAvatarDecoration */).useAvatarDecoration(user,
|
||||
channel.guild_id);
|
||||
const {status, isMobileOnline,
|
||||
isVROnline} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore],
|
||||
function() {
|
||||
var object = {};
|
||||
var userBinding = user;
|
||||
object.status = PresenceStore.getStatus(userBinding.id);
|
||||
object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id);
|
||||
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
|
||||
return object;
|
||||
});
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const tableRowProps = {onPress: onPress,
|
||||
label: (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(channel.guild_id, channel.id,
|
||||
user)};
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
||||
tableRowProps.icon = <Avatar user={user} avatarDecoration={value2} size={REFRESH_MEDIUM_32} guildId={channel.guild_id} status={status} isMobileOnline={isMobileOnline} isVROnline={isVROnline} autoStatusCutout />;
|
||||
tableRowProps.start = start;
|
||||
tableRowProps.end = end;
|
||||
return <TableRow {...tableRowProps} />;
|
||||
}
|
||||
|
||||
function UserProfileActivityVoiceChannelUsers({users, channel, onBack, onPressUser}) { // fn#79613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10436:804, offset: 0x01e5a1b8, size: 203 bytes, params: 2, frame: 23
|
||||
const UserProfileStackedActionSheet = importDefault(8694) /* metro dependency 8694: UserProfileStackedActionSheet */;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3xHUJ+']);
|
||||
object2.onBack = onBack;
|
||||
object2.scrollable = true;
|
||||
const UserProfileStackedActionSheetList = (require(8694) /* metro dependency 8694: UserProfileStackedActionSheet */).UserProfileStackedActionSheetList;
|
||||
return (
|
||||
<UserProfileStackedActionSheet {...object2}>
|
||||
<UserProfileStackedActionSheetList
|
||||
data={users}
|
||||
keyExtractor={function(a0) {
|
||||
return a0.id;
|
||||
}}
|
||||
renderItem={renderItem_79615}
|
||||
/>
|
||||
</UserProfileStackedActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileActivityVoiceChannelUsersRenderItem({item, start, end}) { // fn#79615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10436:1079, owner: UserProfileActivityVoiceChannelUsers.renderItem, offset: 0x01e5a283, size: 87 bytes, params: 2, frame: 18
|
||||
return (
|
||||
<UserRow_79611
|
||||
user={item}
|
||||
channel={channel}
|
||||
onPress={function() {
|
||||
return onPressUser(item.id);
|
||||
}}
|
||||
start={start}
|
||||
end={end}
|
||||
key={item.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/* Metro module 8807; source: modules/user_profile/native/UserProfileAlertUserReported.tsx; dependencies: [31, 33, 4500, 1244, 4500, 2] */
|
||||
function _fun68855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8992:6, offset: 0x01c5f499, size: 131 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileAlertUserReported.tsx');
|
||||
exports.default = UserProfileAlertUserReported;
|
||||
}
|
||||
|
||||
function UserProfileAlertUserReported() { // fn#68856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8992:222, offset: 0x01c5f51c, size: 261 bytes, params: 1, frame: 23
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const IwHU3R = (require(1244) /* metro dependency 1244: indexNative */).t.IwHU3R;
|
||||
object2.title = Reflect.apply(string, intl, [IwHU3R]);
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qxyRaq);
|
||||
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
string = intl.string;
|
||||
const BddRzS = (require(1244) /* metro dependency 1244: indexNative */).t.BddRzS;
|
||||
object2.actions = <AlertActions><AlertActionButton text={Reflect.apply(string, intl,
|
||||
[BddRzS])} key="okay" /></AlertActions>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/* Metro module 8796; source: modules/user_profile/native/UserProfileAlertUtils.tsx; dependencies: [31, 33, 4497, 8797, 8798, 8799, 8806, 8807, 8808, 2] */
|
||||
function _fun68790(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8981:6, offset: 0x01c5d65f, size: 203 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileAlertUtils.tsx');
|
||||
exports.confirmCancelFriendRequest = confirmCancelFriendRequest;
|
||||
exports.confirmRemoveFriend = confirmRemoveFriend;
|
||||
exports.confirmRemoveGameFriend = confirmRemoveGameFriend;
|
||||
exports.confirmVideoUnstableConnection = confirmVideoUnstableConnection;
|
||||
exports.alertUserReported = alertUserReported;
|
||||
exports.confirmThreadRemove = confirmThreadRemove;
|
||||
}
|
||||
|
||||
function confirmCancelFriendRequest(a0) { // fn#68791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8981:234, offset: 0x01c5d72a, size: 83 bytes, params: 2, frame: 16
|
||||
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
const openAlert = useAlertStoreNativeModule.openAlert;
|
||||
let value = importDefault(8797) /* metro dependency 8797: UserProfileConfirmCancelFriendRequest */;
|
||||
value = ((Component) => <Component {...a0} />)(value);
|
||||
Reflect.apply(openAlert, useAlertStoreNativeModule, ['cancel-friend-request', value]);
|
||||
}
|
||||
|
||||
function confirmRemoveFriend(a0) { // fn#68792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8981:322, offset: 0x01c5d77d, size: 83 bytes, params: 2, frame: 16
|
||||
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
const openAlert = useAlertStoreNativeModule.openAlert;
|
||||
let value = importDefault(8798) /* metro dependency 8798: UserProfileConfirmRemoveFriend */;
|
||||
value = ((Component) => <Component {...a0} />)(value);
|
||||
Reflect.apply(openAlert, useAlertStoreNativeModule, ['remove-friend', value]);
|
||||
}
|
||||
|
||||
function confirmRemoveGameFriend(a0) { // fn#68793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8981:406, offset: 0x01c5d7d0, size: 83 bytes, params: 2, frame: 16
|
||||
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
const openAlert = useAlertStoreNativeModule.openAlert;
|
||||
let value = importDefault(8799) /* metro dependency 8799: UserProfileConfirmRemoveGameFriend */;
|
||||
value = ((Component) => <Component {...a0} />)(value);
|
||||
Reflect.apply(openAlert, useAlertStoreNativeModule, ['remove-game-friend', value]);
|
||||
}
|
||||
|
||||
function confirmVideoUnstableConnection(a0) { // fn#68794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8981:502, offset: 0x01c5d823, size: 81 bytes, params: 2, frame: 16
|
||||
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
const openAlert = useAlertStoreNativeModule.openAlert;
|
||||
let value = importDefault(8806) /* metro dependency 8806: UserProfileConfirmVideoUnstableConnection */;
|
||||
value = ((Component) => <Component onConfirm={a0} />)(value);
|
||||
Reflect.apply(openAlert, useAlertStoreNativeModule, ['video-unstable-connection', value]);
|
||||
}
|
||||
|
||||
function alertUserReported() { // fn#68795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8981:599, offset: 0x01c5d874, size: 73 bytes, params: 1, frame: 16
|
||||
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
const openAlert = useAlertStoreNativeModule.openAlert;
|
||||
let value = importDefault(8807) /* metro dependency 8807: UserProfileAlertUserReported */;
|
||||
value = ((Component) => <Component />)(value);
|
||||
Reflect.apply(openAlert, useAlertStoreNativeModule, ['user-reported', value]);
|
||||
}
|
||||
|
||||
function confirmThreadRemove(a0) { // fn#68796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8981:676, offset: 0x01c5d8bd, size: 83 bytes, params: 2, frame: 16
|
||||
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
const openAlert = useAlertStoreNativeModule.openAlert;
|
||||
let value = importDefault(8808) /* metro dependency 8808: UserProfileConfirmThreadRemove */;
|
||||
value = ((Component) => <Component {...a0} />)(value);
|
||||
Reflect.apply(openAlert, useAlertStoreNativeModule, ['thread-remove', value]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Metro module 8510; source: modules/user_profile/native/UserProfileAvatar.tsx; dependencies: [31, 27, 6816, 33, 8496, 8417, 2] */
|
||||
function _fun67452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8695:6, offset: 0x01c23462, size: 196 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(6816) /* metro dependency 6816: Constants */).AVATAR_SIZE_VARIANT;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.Fragment;
|
||||
const env0_6 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileAvatar.tsx');
|
||||
exports.default = UserProfileAvatar;
|
||||
}
|
||||
|
||||
function UserProfileAvatar(a0) { // fn#67453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8695:282, offset: 0x01c23526, size: 230 bytes, params: 2, frame: 25
|
||||
const backgroundColor = a0.backgroundColor;
|
||||
const size = a0.size;
|
||||
const r9 = size !== undefined ? size : AVATAR_SIZE_VARIANT;
|
||||
const value = Object.create(null);
|
||||
value.backgroundColor = 0;
|
||||
value.size = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, backgroundColor);
|
||||
const value4 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
return (
|
||||
<>
|
||||
<View style={[value4.avatarBackground, value4.avatarPosition, {backgroundColor: backgroundColor}]} />
|
||||
{((Component) => <Component style={[value4.avatar,
|
||||
value4.avatarPosition]} size={r9} {...value2} />)(importDefault(8417) /* metro dependency 8417: HeaderAvatar */)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/* Metro module 13212; source: modules/user_profile/native/UserProfileAvatarDecorationEditButton.tsx; dependencies: [31, 27, 1945, 6816, 482, 33, 4501, 697, 566, 8418, 8402, 8461, 8396, 1244, 13209, 7598, 1305, 8411, 2] */
|
||||
function _fun100799(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13402:6, offset: 0x021f9484, size: 384 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.ActivityIndicator;
|
||||
const env0_5 = value.View;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const COLLECTIBLES_PREVIEW_SIZE = (require(6816) /* metro dependency 6816: Constants */).COLLECTIBLES_PREVIEW_SIZE;
|
||||
const env0_8 = (require(482) /* metro dependency 482: Constants */).NOOP;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'position': 'relative', 'height': null, 'width': null, 'justifyContent': 'center',
|
||||
'alignItems': 'center'};
|
||||
object4.height = COLLECTIBLES_PREVIEW_SIZE;
|
||||
object4.width = COLLECTIBLES_PREVIEW_SIZE;
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object4.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.overflow = 'hidden';
|
||||
object3.previewContainer = object4;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object3.noneIcon = {tintColor: TEXT_SUBTLE};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileAvatarDecorationEditButton.tsx');
|
||||
exports.default = UserProfileAvatarDecorationEditButton;
|
||||
}
|
||||
|
||||
function UserProfileAvatarDecorationEditButton({user, guildId, pendingAvatarDecoration, isTryItOut}) { // fn#100800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13402:610, offset: 0x021f9604, size: 988 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const styles = useStyles();
|
||||
const value3 = guildId != null;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun100801);
|
||||
const defaultImport = importDefault(8418) /* metro dependency 8418: useAvatarDecorationIfNotExpired */;
|
||||
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
|
||||
const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
|
||||
object2 = {pendingValue: pendingAvatarDecoration};
|
||||
object2.userValue = user.avatarDecoration;
|
||||
object2.guildValue = value4?.avatarDecoration;
|
||||
object2.guildId = guildId;
|
||||
const value5 = defaultImport(Reflect.apply(getProfilePreviewValue, profileCustomizationUtilsModule, [object2]));
|
||||
const {product,
|
||||
isFetching} = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(value5?.skuId);
|
||||
const moduleValue4 = profileCustomizationUtilsModule;
|
||||
const useUserAvatarDecoration = moduleValue4.useUserAvatarDecoration;
|
||||
const r1 = pendingAvatarDecoration === undefined ? Reflect.apply(useUserAvatarDecoration, moduleValue4,
|
||||
[{user: user, guildId: guildId}]) : pendingAvatarDecoration;
|
||||
const value8 = env0_3.useCallback(_fun100802, [user, guildId, r1, isTryItOut]);
|
||||
const r13 = product?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe);
|
||||
const r10 = value3 ? r1 != null ? r13 : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ep5D4i,
|
||||
{label: r13}) : r13;
|
||||
const UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton;
|
||||
if (isFetching) {
|
||||
object2 = {};
|
||||
object2.label = intl.string(t['7v0T9P']);
|
||||
object2.buttonText = intl.string(t.MKDeyL);
|
||||
object2.onPress = NOOP;
|
||||
object2.leading = <ActivityIndicator animating size="large" />;
|
||||
object2.loading = true;
|
||||
object2.disabled = true;
|
||||
object2.hideArrow = true;
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7v0T9P']);
|
||||
object2.buttonText = r10;
|
||||
object2.accessibilityValue = {text: r10};
|
||||
object2.onPress = value8;
|
||||
object2.leading = product != null ? <View style={styles.previewContainer}>{((Component) => <Component avatarDecoration={value5} size={COLLECTIBLES_PREVIEW_SIZE - 2 * (importDefault(697) /* metro dependency 697: native */).space.PX_4} animate={false} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */)}</View> : ((Icon) => <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
r0 = object2;
|
||||
}
|
||||
return <UserProfileEditFormButton {...r0} />;
|
||||
}
|
||||
|
||||
function _fun100801() { // fn#100801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13402:772, offset: 0x021f99e0, size: 46 bytes, params: 1, frame: 14
|
||||
return result ? GuildMemberStore.getMember(guildId, user.id) : null;
|
||||
}
|
||||
|
||||
function _fun100802() { // fn#100802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13402:1129, offset: 0x021f9a0e, size: 77 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(require(8396) /* metro dependency 8396: AvatarDecorationUtils */).openAvatarDecorationActionSheet({user: user,
|
||||
guildId: guildId, currentAvatarDecoration: env0_4, isTryItOut: isTryItOut});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/* Metro module 8507; source: modules/user_profile/native/UserProfileBanner.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 674, 697, 3829, 8420, 1423, 8508, 5278, 1244, 8509, 2] */
|
||||
function _fun67444(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8692:6, offset: 0x01c22b7d, size: 386 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).BANNER_HEIGHT;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.bannerContainer = {position: 'relative'};
|
||||
const object4 = {'position': 'absolute', 'left': 12, 'top': 12, 'right': 'auto', 'bottom': 'auto'};
|
||||
const value2 = importDefault(674) /* metro dependency 674 */;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
object4.backgroundColor = value2(WHITE).alpha(0.9).css();
|
||||
object2.gifTag = object4;
|
||||
const PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
object2.gifTagText = {color: PRIMARY_800, fontSize: 14};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileBanner.tsx');
|
||||
exports.default = UserProfileBanner;
|
||||
}
|
||||
|
||||
function UserProfileBanner({user, displayProfile, style, bannerSafeArea, bannerHeight = BANNER_HEIGHT, pendingBanner, pendingAvatarSrc, pendingAccentColor, pendingThemeColors, disableInteraction}) { // fn#67445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8692:551, offset: 0x01c22cff, size: 758 bytes, params: 2, frame: 29
|
||||
var r4;
|
||||
var PressableOpacity;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items2;
|
||||
if (bannerSafeArea !== undefined) {
|
||||
}
|
||||
disableInteraction = !(disableInteraction === undefined) && disableInteraction;
|
||||
const styles = useStyles();
|
||||
const GifAutoPlay = (require(3829) /* metro dependency 3829: UserSettings */).GifAutoPlay;
|
||||
const value6 = GifAutoPlay.useSetting();
|
||||
const [property, env0_7] = bannerHeight(pendingAccentColor.useState(false), 2);
|
||||
let r9 = value6 || property;
|
||||
const env0_8 = (require(8420) /* metro dependency 8420: ProfileCustomizationUtils */).useUserProfileBannerBackgroundColor({user: user,
|
||||
guildId: displayProfile?.guildId, pendingAvatarSrc: pendingAvatarSrc, displayProfile: displayProfile});
|
||||
const r2 = pendingBanner !== undefined ? displayProfile?.getPreviewBanner(pendingBanner, r9,
|
||||
600) : displayProfile?.getBannerURL({canAnimate: r9, size: 600});
|
||||
const env0_9 = r2 != null ? (require(1423) /* metro dependency 1423: AvatarUtils */).makeSource(r2) : null;
|
||||
const isAnimatedImageURL2 = (require(1423) /* metro dependency 1423: AvatarUtils */).isAnimatedImageURL(r2);
|
||||
const closure = renderBanner;
|
||||
if (isAnimatedImageURL2) {
|
||||
if (value6) {
|
||||
r4 = closure();
|
||||
} else if (disableInteraction) {
|
||||
r4 = closure();
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {onPress: onPress_67447, accessibilityRole: 'button',
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fzj/l'])};
|
||||
items2 = [closure()];
|
||||
r9 = !r9 && ((Caption) => <Caption label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I5gL2H)} style={styles.gifTag} textStyle={styles.gifTagText} />)((require(8509) /* metro dependency 8509: Caption */).Caption);
|
||||
items2[1] = r9;
|
||||
r4 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
|
||||
}
|
||||
} else {
|
||||
r4 = closure();
|
||||
}
|
||||
return (
|
||||
<View style={styles.bannerContainer}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function renderBanner() { // fn#67446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8692:1162, owner: UserProfileBanner.renderBanner, offset: 0x01c22ff5, size: 176 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const Banner = importDefault(8508) /* metro dependency 8508: Banner */;
|
||||
const styleBinding = style;
|
||||
let r0 = pendingThemeColors == null ? value : pendingThemeColors[0];
|
||||
r0 = r0 ?? pendingAccentColor;
|
||||
r0 = r0 ?? (displayProfile == null ? value : displayProfile.primaryColor);
|
||||
r0 = r0 ?? env0_8;
|
||||
return (
|
||||
<Banner
|
||||
style={styleBinding}
|
||||
bannerSource={env0_9}
|
||||
backgroundColor={r0}
|
||||
bannerSafeArea={bannerSafeArea}
|
||||
bannerHeight={env0_3}
|
||||
key={displayProfile == null ? value : displayProfile.banner}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileBannerOnPress() { // fn#67447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8692:1490, owner: UserProfileBanner.onPress, offset: 0x01c230a5, size: 23 bytes, params: 1, frame: 11
|
||||
env0_7(!env0_6);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/* Metro module 6815; source: modules/user_profile/native/UserProfileCard.tsx; dependencies: [31, 27, 6816, 33, 4501, 697, 5278, 4573, 6818, 1357, 2] */
|
||||
function _fun53584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6993:6, offset: 0x013502e8, size: 440 bytes, params: 8, frame: 25
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(6816) /* metro dependency 6816: Constants */;
|
||||
const CARD_PADDING = value.CARD_PADDING;
|
||||
const CARD_ROWS_COLUMN_GAP = value.CARD_ROWS_COLUMN_GAP;
|
||||
const CARD_ROWS_ICON_SIZE = value.CARD_ROWS_ICON_SIZE;
|
||||
const env0_5 = value.CARD_ROWS_ICON_SIZE_VARIANT;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{title: {'marginBottom': 12, 'flexDirection': 'row',
|
||||
'alignItems': 'center', 'gap': 4}, text: {flexShrink: 1}, rowDivider: {borderBottomWidth: 1,
|
||||
borderBottomColor: BORDER_SUBTLE, marginLeft: CARD_ROWS_ICON_SIZE + CARD_ROWS_COLUMN_GAP,
|
||||
marginRight: -CARD_PADDING}, row: {'flexDirection': 'column', 'paddingVertical': 20},
|
||||
rowLabel: {'flexDirection': 'row', 'alignItems': 'center', columnGap: CARD_ROWS_COLUMN_GAP},
|
||||
rowLabelText: {flex: 1, lineHeight: CARD_ROWS_ICON_SIZE},
|
||||
rowSublabel: {marginHorizontal: CARD_ROWS_ICON_SIZE + CARD_ROWS_COLUMN_GAP}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileCard.tsx');
|
||||
exports.default = UserProfileCard;
|
||||
exports.UserProfileFormRow = UserProfileFormRow;
|
||||
exports.UserProfileCardRows = UserProfileCardRows;
|
||||
}
|
||||
|
||||
function Divider() { // fn#53585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6993:676, offset: 0x013504a0, size: 41 bytes, params: 1, frame: 14
|
||||
const styles = useStyles();
|
||||
return <View style={styles.rowDivider} />;
|
||||
}
|
||||
|
||||
function UserProfileCard(a0) { // fn#53586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6993:830, offset: 0x013504c9, size: 328 bytes, params: 2, frame: 27
|
||||
var r14;
|
||||
var r6;
|
||||
var Text;
|
||||
const title = a0.title;
|
||||
const titleIcon = a0.titleIcon;
|
||||
const titleStyle = a0.titleStyle;
|
||||
const children = a0.children;
|
||||
const style = a0.style;
|
||||
const object2 = {'title': 0, 'titleIcon': 0, 'titleStyle': 0, 'children': 0, 'style': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object2, undefined);
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('UserProfileCard');
|
||||
const viewBindingProps = {style: style, ...value};
|
||||
value = title != null;
|
||||
if (value) {
|
||||
var viewBinding2Props = {style: [styles.title, titleStyle]};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {style: styles.text, accessibilityRole: 'header'};
|
||||
value = 'text-sm/semibold';
|
||||
r14 = value3 ? 'text-sm/medium' : value;
|
||||
textProps.variant = r14;
|
||||
value = 'text-default';
|
||||
r14 = value3 ? 'text-strong' : value;
|
||||
textProps.color = r14;
|
||||
textProps.lineClamp = 1;
|
||||
value = <Text {...textProps}>{title}</Text>;
|
||||
value = <View {...viewBinding2Props}>{value}{titleIcon}</View>;
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{r6}
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileFormRow({label, sublabel, icon, hint, disabled, isDestructive, onPress, labelColor, arrow}) { // fn#53587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6993:1227, offset: 0x01350611, size: 437 bytes, params: 2, frame: 30
|
||||
arrow = !(arrow === undefined) && arrow;
|
||||
const styles = useStyles();
|
||||
const r16 = isDestructive ? 'text-feedback-critical' : undefined;
|
||||
let r18 = isDestructive ? 'text-feedback-critical' : 'mobile-text-heading-primary';
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items2 = [((Component) => <Component size={CARD_ROWS_ICON_SIZE_VARIANT} color={r16} />)(icon)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
r18 = labelColor ?? r18;
|
||||
items2[1] = <Text variant="text-md/semibold" color={r18} style={styles.rowLabelText}>{label}</Text>;
|
||||
items2[2] = hint != null && ((Component) => <Component size={CARD_ROWS_ICON_SIZE_VARIANT} color={r16} />)(hint);
|
||||
items2[3] = arrow && ((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon);
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={styles.row}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={label}
|
||||
disabled={disabled}
|
||||
onPress={onPress}
|
||||
>
|
||||
<View style={styles.rowLabel}>
|
||||
{items2}
|
||||
</View>
|
||||
{sublabel != null && <View style={styles.rowSublabel}>{sublabel}</View>}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileCardRows({children}) { // fn#53588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6993:1887, offset: 0x013507c6, size: 96 bytes, params: 2, frame: 17
|
||||
const env0_0 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('UserProfileCardRows');
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const Children = env0_3.Children;
|
||||
return (
|
||||
<>
|
||||
{Children.map(children, _fun53589)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53589(a0, a1) { // fn#53589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6993:2006, offset: 0x01350826, size: 90 bytes, params: 3, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const Fragment = env1_3.Fragment;
|
||||
return (
|
||||
<Fragment key={a1}>
|
||||
{[env0_0 || a1 === 0 ? null : <Divider />, a0]}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 8797; source: modules/user_profile/native/UserProfileConfirmCancelFriendRequest.tsx; dependencies: [31, 33, 4500, 1244, 4500, 2] */
|
||||
function _fun68797(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8982:6, offset: 0x01c5d910, size: 140 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_2 = value.jsx;
|
||||
const env0_3 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileConfirmCancelFriendRequest.tsx');
|
||||
exports.default = UserProfileConfirmCancelFriendRequest;
|
||||
}
|
||||
|
||||
function UserProfileConfirmCancelFriendRequest({userDisplayName, onConfirm}) { // fn#68798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8982:244, offset: 0x01c5d99c, size: 397 bytes, params: 2, frame: 27
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bTfA//']);
|
||||
object2.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['72FwjH'],
|
||||
{name: userDisplayName});
|
||||
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
object2.actions = <AlertActions><AlertActionButton variant="destructive" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bTfA//'])} onPress={onConfirm} key="cancel-friend-request" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eN6+rI'])} key="nevermind" /></AlertActions>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 8798; source: modules/user_profile/native/UserProfileConfirmRemoveFriend.tsx; dependencies: [31, 33, 4500, 1244, 4500, 2] */
|
||||
function _fun68799(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8983:6, offset: 0x01c5db29, size: 140 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_2 = value.jsx;
|
||||
const env0_3 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileConfirmRemoveFriend.tsx');
|
||||
exports.default = UserProfileConfirmRemoveFriend;
|
||||
}
|
||||
|
||||
function UserProfileConfirmRemoveFriend({userDisplayName, onConfirm}) { // fn#68800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8983:237, offset: 0x01c5dbb5, size: 406 bytes, params: 2, frame: 27
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.fPLvZd,
|
||||
{name: userDisplayName});
|
||||
object2.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.l5FFq6,
|
||||
{name: userDisplayName});
|
||||
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
object2.actions = <AlertActions><AlertActionButton variant="destructive" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J)} onPress={onConfirm} key="confirm-remove" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eN6+rI'])} key="nevermind" /></AlertActions>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* Metro module 8799; source: modules/user_profile/native/UserProfileConfirmRemoveGameFriend.tsx; dependencies: [31, 33, 8515, 8800, 4500, 1244, 4500, 2] */
|
||||
function _fun68801(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8984:6, offset: 0x01c5dd4b, size: 151 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileConfirmRemoveGameFriend.tsx');
|
||||
exports.default = UserProfileConfirmRemoveGameFriend;
|
||||
}
|
||||
|
||||
function UserProfileConfirmRemoveGameFriend({userDisplayName, userId, gameName, applicationId}) { // fn#68802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8984:243, offset: 0x01c5dde2, size: 467 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
const value2 = env0_3.useCallback(_fun68803, [applicationId, userId]);
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.fBKKfq,
|
||||
{name: userDisplayName});
|
||||
object2.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.dsU5bl,
|
||||
{name: userDisplayName, gameName: gameName});
|
||||
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
const string = intl.string;
|
||||
const RLcE6x = (require(1244) /* metro dependency 1244: indexNative */).t.RLcE6x;
|
||||
object2.actions = <AlertActions><AlertActionButton variant="destructive" text={Reflect.apply(string, intl,
|
||||
[RLcE6x])} onPress={value2} key="confirm-remove" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eN6+rI'])} key="nevermind" /></AlertActions>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
function _fun68803() { // fn#68803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8984:365, offset: 0x01c5dfb5, size: 108 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
(require(8515) /* metro dependency 8515: UserProfileAnalyticsUtils */).trackUserProfileAction({action: 'REMOVE_GAME_FRIEND'});
|
||||
(importDefault(8800) /* metro dependency 8800: PeopleUtils */).removeFriend({userId: userId,
|
||||
applicationId: applicationId, location: 'UserProfileConfirmRemoveGameFriend'});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 8808; source: modules/user_profile/native/UserProfileConfirmThreadRemove.tsx; dependencies: [31, 33, 3995, 4500, 1244, 4500, 2] */
|
||||
function _fun68857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8993:6, offset: 0x01c5f621, size: 147 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileConfirmThreadRemove.tsx');
|
||||
exports.default = UserProfileConfirmThreadRemove;
|
||||
}
|
||||
|
||||
function UserProfileConfirmThreadRemove({isForumPost, user, onConfirm}) { // fn#68858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8993:237, offset: 0x01c5f6b4, size: 495 bytes, params: 2, frame: 28
|
||||
const value2 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.title = Reflect.apply(string, intl, [isForumPost ? t['8sKSjm'] : t.ZPm8jN]);
|
||||
object2.content = intl.formatToPlainString(isForumPost ? t['6UGfnx'] : t['hL+Znb'], {user: value2});
|
||||
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
string = intl.string;
|
||||
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
|
||||
object2.actions = <AlertActions><AlertActionButton variant="destructive" text={Reflect.apply(string, intl,
|
||||
[N86XcP])} onPress={onConfirm} key="remove-user-from-thread" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yNbnce)} key="cancel-remove-user-from-thread" /></AlertActions>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 8806; source: modules/user_profile/native/UserProfileConfirmVideoUnstableConnection.tsx; dependencies: [31, 33, 4500, 1244, 4500, 2] */
|
||||
function _fun68853(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8991:6, offset: 0x01c5f297, size: 140 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_2 = value.jsx;
|
||||
const env0_3 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileConfirmVideoUnstableConnection.tsx');
|
||||
exports.default = UserProfileConfirmVideoUnstableConnection;
|
||||
}
|
||||
|
||||
function UserProfileConfirmVideoUnstableConnection({onConfirm}) { // fn#68854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8991:248, offset: 0x01c5f323, size: 374 bytes, params: 2, frame: 27
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0]);
|
||||
string = intl.string;
|
||||
const EhaK6B = (require(1244) /* metro dependency 1244: indexNative */).t.EhaK6B;
|
||||
object2.content = Reflect.apply(string, intl, [EhaK6B]);
|
||||
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
string = intl.string;
|
||||
const ND1my3 = (require(1244) /* metro dependency 1244: indexNative */).t.ND1my3;
|
||||
object2.actions = <AlertActions><AlertActionButton text={Reflect.apply(string, intl,
|
||||
[ND1my3])} onPress={onConfirm} key="confirm" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jEqEhy)} key="cancel" /></AlertActions>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,433 @@
|
||||
/* Metro module 10361; source: modules/user_profile/native/UserProfileConnections.tsx; dependencies: [31, 27, 1949, 3996, 6816, 661, 5044, 33, 1305, 4501, 697, 10362, 3860, 4002, 10365, 10366, 8514, 5043, 4915, 1423, 8872, 4863, 3853, 4081, 6797, 3856, 1244, 5278, 3859, 4573, 6249, 3868, 566, 10367, 6815, 10372, 2] */
|
||||
function _fun80261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6, offset: 0x01e73405, size: 737 bytes, params: 8, frame: 28
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.Pressable;
|
||||
const env0_5 = value2.View;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const streamerModeStore = importDefault(3996) /* metro dependency 3996: StreamerModeStore */;
|
||||
const constantsModule = require(6816) /* metro dependency 6816: Constants */;
|
||||
const CARD_PADDING = constantsModule.CARD_PADDING;
|
||||
const CARD_ROWS_COLUMN_GAP = constantsModule.CARD_ROWS_COLUMN_GAP;
|
||||
const env0_8 = constantsModule.CARD_ROWS_ICON_SIZE;
|
||||
const env0_9 = constantsModule.CARD_ROWS_ICON_SIZE_VARIANT;
|
||||
const constantsModule2 = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule2.AnalyticEvents;
|
||||
const env0_11 = constantsModule2.PlatformTypes;
|
||||
const env0_12 = (require(5044) /* metro dependency 5044: Constants */).MetadataFields;
|
||||
const value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value5.jsx;
|
||||
const env0_14 = value5.jsxs;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
let Sizes = Icon.Sizes;
|
||||
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
||||
const nativeModule = require(1305) /* metro dependency 1305: native */;
|
||||
let getIconSize = nativeModule.getIconSize;
|
||||
const value7 = Reflect.apply(getIconSize, nativeModule, [REFRESH_SMALL_16]);
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.cardContainer = {paddingBottom: CARD_PADDING - 12};
|
||||
object2.cardTitle = {marginBottom: 0};
|
||||
object2.connectionRow = {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': null, 'paddingVertical': 12,
|
||||
'minHeight': 60, columnGap: CARD_ROWS_COLUMN_GAP};
|
||||
object2.connectionInfoContainer = {flexGrow: 1};
|
||||
object2.connectedAccountName = {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': 4};
|
||||
object2.verifiedIconContainer = {height: value7, width: value7};
|
||||
object2.verifiedIcon = {'position': 'absolute', 'left': 0, 'top': 0};
|
||||
object2.connectionMetadata = {'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center',
|
||||
'overflow': 'hidden'};
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.metadataItem = {color: INTERACTIVE_TEXT_ACTIVE};
|
||||
object2.poweredByContainer = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 6};
|
||||
const value9 = nativeModule;
|
||||
getIconSize = value9.getIconSize;
|
||||
Sizes = Icon.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
object2.applicationIcon = {borderRadius: Reflect.apply(getIconSize, value9, [MEDIUM])};
|
||||
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_17 = value.memo(_fun80263);
|
||||
const env0_18 = value.memo(_fun80269);
|
||||
value = value.memo(_fun80273);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileConnections.tsx');
|
||||
exports.ApplicationRoleConnection = value;
|
||||
exports.UserProfileAccountConnectionsCard = UserProfileAccountConnectionsCard;
|
||||
exports.UserProfileApplicationRoleConnectionsCard = UserProfileApplicationRoleConnectionsCard;
|
||||
}
|
||||
|
||||
function VerifiedIcon({theme, isTwitterVerifiedAccount}) { // fn#80262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:1125, offset: 0x01e736e6, size: 410 bytes, params: 2, frame: 25
|
||||
isTwitterVerifiedAccount = !(isTwitterVerifiedAccount === undefined) && isTwitterVerifiedAccount;
|
||||
const styles = useStyles();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
const r14 = isTwitterVerifiedAccount ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_TWITTER : Reflect.apply(useToken,
|
||||
useTokenModule, [MOBILE_TEXT_HEADING_PRIMARY, theme]);
|
||||
const sharedModule = require(4002) /* metro dependency 4002: shared */;
|
||||
const r9 = sharedModule.isThemeLight(theme) || isTwitterVerifiedAccount ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return (
|
||||
<View style={styles.verifiedIconContainer}>
|
||||
<Icon
|
||||
source={importDefault(10365) /* metro dependency 10365 */}
|
||||
color={r14}
|
||||
size={REFRESH_SMALL_16}
|
||||
style={styles.verifiedIcon}
|
||||
/>
|
||||
<Icon
|
||||
source={importDefault(10366) /* metro dependency 10366 */}
|
||||
color={r9}
|
||||
{...object}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80263({userId, account, theme, locale, showMetadata}) { // fn#80263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:1603, offset: 0x01e73880, size: 1537 bytes, params: 2, frame: 35
|
||||
var r23;
|
||||
var r16;
|
||||
var r12;
|
||||
var object2;
|
||||
var moduleValue2;
|
||||
var accountType;
|
||||
var style;
|
||||
var intl;
|
||||
showMetadata = showMetadata === undefined || showMetadata;
|
||||
const styles = useStyles();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
let metadata = account.metadata;
|
||||
const r9 = metadata ?? ({});
|
||||
if (showMetadata) {
|
||||
moduleValue2 = require(5043) /* metro dependency 5043: ConnectionsUtils */;
|
||||
r23 = moduleValue2.getCreatedAtDate(r9[MetadataFields.CREATED_AT], locale);
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
const env0_3 = r23;
|
||||
if (showMetadata) {
|
||||
object2 = {};
|
||||
object2.accountType = account.type;
|
||||
object2.metadata = r9;
|
||||
object2.style = styles.metadataItem;
|
||||
accountType = object2.accountType;
|
||||
metadata = object2.metadata;
|
||||
style = object2.style;
|
||||
r16 = PlatformTypes.REDDIT === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateRedditMetadataItems(metadata,
|
||||
|
||||
style) : PlatformTypes.STEAM === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateSteamMetadataItems(metadata,
|
||||
|
||||
style) : PlatformTypes.BLUESKY === accountType || PlatformTypes.TWITTER === accountType || PlatformTypes.MASTODON === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateTwitterMetadataItems(metadata,
|
||||
|
||||
style) : PlatformTypes.PAYPAL === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generatePaypalMetadataItems(metadata,
|
||||
|
||||
style) : PlatformTypes.EBAY === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateEbayMetadataItems(metadata,
|
||||
|
||||
style) : PlatformTypes.TIKTOK !== accountType ? null : (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateTikTokMetadataItems(metadata,
|
||||
|
||||
style);
|
||||
} else {
|
||||
r16 = null;
|
||||
}
|
||||
const r13 = r16 != null && r16.length > 0;
|
||||
const value14 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(account.type);
|
||||
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
const makeSource = avatarUtilsModule.makeSource;
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
|
||||
const value15 = value14 == null;
|
||||
const source = Reflect.apply(makeSource, avatarUtilsModule,
|
||||
[isThemeDark2 ? value15 ? undefined : value14.icon.darkPNG : value15 ? undefined : value14.icon.lightPNG]);
|
||||
const r5 = value14 == null || value14.getPlatformUserUrl == null ? undefined : value14.getPlatformUserUrl(account);
|
||||
const type = account.type;
|
||||
const TWITTER = PlatformTypes.TWITTER;
|
||||
const r24 = type === TWITTER && r9[MetadataFields.TWITTER_VERIFIED] === '1';
|
||||
const binding = env0_3;
|
||||
const value19 = binding.useCallback(_fun80264, [account.type, r5, trackUserProfileAction, userId]);
|
||||
const value20 = binding.useCallback(_fun80266, [account.name, trackUserProfileAction]);
|
||||
const value21 = binding.useMemo(_fun80267, [account.name, r23, value14?.name]);
|
||||
const value22 = env0_3.useMemo(_fun80268, [value14?.name, r5]);
|
||||
const PressableComponent = r5 != null ? (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity : Pressable;
|
||||
const r8 = r5 != null ? value19 : undefined;
|
||||
const BaseIconImage = (require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage;
|
||||
const items2 = [<BaseIconImage size={CARD_ROWS_ICON_SIZE_VARIANT} source={source} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items3 = [<View style={styles.connectedAccountName}><Text variant="text-md/semibold" color="mobile-text-heading-primary">{account.name}</Text>{account.verified ? <VerifiedIcon theme={theme} isTwitterVerifiedAccount={r24} /> : null}</View>];
|
||||
if (r23 != null) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r12 = <Text variant="text-xs/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['9rfonh'],
|
||||
|
||||
{date: r23})}</Text>;
|
||||
} else {
|
||||
r12 = null;
|
||||
}
|
||||
items3[1] = r12;
|
||||
items3[2] = r13 ? <View style={styles.connectionMetadata}>{r16}</View> : null;
|
||||
items2[1] = <View style={styles.connectionInfoContainer}>{items3}</View>;
|
||||
items2[2] = r5 != null && ((LinkExternalSmallIcon) => <LinkExternalSmallIcon size="sm" />)((require(6249) /* metro dependency 6249: LinkExternalSmallIcon */).LinkExternalSmallIcon);
|
||||
return (
|
||||
<PressableComponent
|
||||
accessibilityLabel={value21}
|
||||
accessibilityHint={value22}
|
||||
accessibilityRole="button"
|
||||
onPress={r8}
|
||||
onLongPress={value20}
|
||||
style={styles.connectionRow}
|
||||
>
|
||||
{items2}
|
||||
</PressableComponent>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80269({identity, application}) { // fn#80269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:4350, offset: 0x01e7415d, size: 477 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const iconSource = application.getIconSource(CARD_ROWS_ICON_SIZE);
|
||||
const username = identity.profile?.username;
|
||||
const r14 = username ?? '';
|
||||
const binding = env0_3;
|
||||
const value6 = binding.useCallback(_fun80270, [r14, trackUserProfileAction]);
|
||||
const value7 = binding.useMemo(_fun80271, [application.name, r14]);
|
||||
const value8 = binding.useMemo(function() {
|
||||
var intl = require(dependencyMap[26]).intl;
|
||||
var OKzaN3 = require(dependencyMap[26]).t.OKzaN3;
|
||||
return intl.formatToPlainString(OKzaN3, {name: application.name});
|
||||
}, [application.name]);
|
||||
const r5 = iconSource != null ? ((BaseIconImage) => <BaseIconImage size={CARD_ROWS_ICON_SIZE_VARIANT} source={iconSource} style={styles.applicationIcon} />)((require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage) : null;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Pressable
|
||||
accessibilityLabel={value7}
|
||||
accessibilityHint={value8}
|
||||
accessibilityRole="button"
|
||||
onLongPress={value6}
|
||||
style={styles.connectionRow}
|
||||
>
|
||||
{r5}
|
||||
<View style={styles.connectionInfoContainer}>
|
||||
<View style={styles.connectedAccountName}>
|
||||
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
|
||||
{r14}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80273({applicationRoleConnection}) { // fn#80273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:5329, offset: 0x01e74449, size: 622 bytes, params: 2, frame: 30
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateRoleConnectionMetadataItems(applicationRoleConnection);
|
||||
const applicationIconSource = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getApplicationIconSource({id: applicationRoleConnection.application.id,
|
||||
icon: applicationRoleConnection.application.icon});
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
const icon = <Icon size={MEDIUM} source={applicationIconSource} disableColor />;
|
||||
const items2 = [applicationRoleConnection.platform_name != null ? <Text variant="text-md/semibold" color="mobile-text-heading-primary">{applicationRoleConnection.platform_name}</Text> : null];
|
||||
items2[1] = applicationRoleConnection.platform_username != null ? <Text variant="text-md/normal" color="text-default">{applicationRoleConnection.platform_username}</Text> : null;
|
||||
items2[2] = value2 != null && value2.length > 0 ? <View style={styles.connectionMetadata}>{value2}</View> : null;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[3] = <View style={styles.poweredByContainer}><Text variant="text-xs/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zIT9YA,
|
||||
{applicationHook: function() {
|
||||
return applicationRoleConnection.application.name;
|
||||
}})}</Text></View>;
|
||||
return (
|
||||
<View style={styles.connectionRow}>
|
||||
{icon}
|
||||
<View style={styles.connectionInfoContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileAccountConnectionsCard({userId, style}) { // fn#80275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6366, offset: 0x01e746ca, size: 426 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var defaultImport;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const UserProfileCardRows = (require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileCardRows;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const env0_1 = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
||||
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const hidePersonalInformation = (require(566) /* metro dependency 566: flux */).useStateFromStores([StreamerModeStore],
|
||||
function() {
|
||||
return StreamerModeStore.hidePersonalInformation;
|
||||
});
|
||||
const {connections,
|
||||
appIdentities} = (importDefault(10367) /* metro dependency 10367: useVisibleUserProfileConnectionsAndAppIdentities */)(userId);
|
||||
if (hidePersonalInformation) {
|
||||
r0 = null;
|
||||
} else if (connections.length !== 0) {
|
||||
defaultImport = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
var defaultImportProps2 = {style: [styles.cardContainer, style],
|
||||
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5']),
|
||||
titleStyle: styles.cardTitle};
|
||||
value = connections.map(_fun80278);
|
||||
value = ((Component) => <Component {...defaultImportProps2}><UserProfileCardRows>{[value,
|
||||
appIdentities.map(_fun80279)]}</UserProfileCardRows></Component>)(defaultImport);
|
||||
r0 = value;
|
||||
} else if (appIdentities.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
defaultImport = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
var defaultImportProps2 = {style: [styles.cardContainer, style],
|
||||
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5']),
|
||||
titleStyle: styles.cardTitle};
|
||||
value = connections.map(_fun80278);
|
||||
value = ((Component) => <Component {...defaultImportProps2}><UserProfileCardRows>{[value,
|
||||
appIdentities.map(_fun80279)]}</UserProfileCardRows></Component>)(defaultImport);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function UserProfileApplicationRoleConnectionsCard({userId, style}) { // fn#80280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:7074, offset: 0x01e7491c, size: 297 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var UserProfileCard;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(10372) /* metro dependency 10372: useUserProfileApplicationRoleConnections */)(userId);
|
||||
const hidePersonalInformation = (require(566) /* metro dependency 566: flux */).useStateFromStores([StreamerModeStore],
|
||||
function() {
|
||||
return StreamerModeStore.hidePersonalInformation;
|
||||
});
|
||||
if (hidePersonalInformation) {
|
||||
r0 = null;
|
||||
} else if (value2.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
var defaultImportProps = {style: [styles.cardContainer, style]};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
defaultImportProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
|
||||
defaultImportProps.titleStyle = styles.cardTitle;
|
||||
r0 = <UserProfileCard {...defaultImportProps}>{((UserProfileCardRows) => <UserProfileCardRows>{value2.map(_fun80282)}</UserProfileCardRows>)((require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileCardRows)}</UserProfileCard>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80264() { // fn#80264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:2692, offset: 0x01e73e81, size: 127 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var value2;
|
||||
if (env0_5 != null) {
|
||||
trackUserProfileAction({action: 'PRESS_VIEW_CONNECTED_ACCOUNT'});
|
||||
value2 = environment.__proto__;
|
||||
(require(8872) /* metro dependency 8872: MaskedLinkUtils */).handleClick({href: env0_5,
|
||||
trusted: account.type !== PlatformTypes.DOMAIN, onConfirm: onConfirm_80265});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80266() { // fn#80266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:2973, offset: 0x01e73f6c, size: 137 bytes, params: 1, frame: 15
|
||||
trackUserProfileAction({action: 'COPY_CONNECTED_ACCOUNT'});
|
||||
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
|
||||
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
|
||||
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
clipboardUtilsNativeModule.copy(account.name);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
||||
}
|
||||
|
||||
function _fun80267() { // fn#80267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:3174, offset: 0x01e73ff5, size: 182 bytes, params: 1, frame: 18
|
||||
var value4;
|
||||
var intl;
|
||||
const items2 = [];
|
||||
let push = items2.push;
|
||||
Reflect.apply(push, items2, [env0_4?.name ?? '']);
|
||||
items2.push(account.name);
|
||||
if (env0_3 != null) {
|
||||
push = items2.push;
|
||||
value4 = environment.__proto__;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
Reflect.apply(push, items2,
|
||||
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9rfonh'],
|
||||
{date: env0_3})]);
|
||||
}
|
||||
return items2.join(', ');
|
||||
}
|
||||
|
||||
function _fun80268() { // fn#80268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:3401, offset: 0x01e740ab, size: 178 bytes, params: 1, frame: 17
|
||||
var name;
|
||||
var r0;
|
||||
var value2;
|
||||
var value3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var OKzaN3;
|
||||
var value;
|
||||
if (env0_5 != null) {
|
||||
value = environment.__proto__;
|
||||
value = intl.string(t.wuRE8M);
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
OKzaN3 = t.OKzaN3;
|
||||
name = env0_4 == null ? value3 : env0_4.name;
|
||||
value = '';
|
||||
value = Reflect.apply(formatToPlainString, intl, [OKzaN3, {name: name ?? value}]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80270() { // fn#80270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:4561, offset: 0x01e7433a, size: 132 bytes, params: 1, frame: 15
|
||||
trackUserProfileAction({action: 'COPY_CONNECTED_ACCOUNT'});
|
||||
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
|
||||
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
|
||||
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_2);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
||||
}
|
||||
|
||||
function _fun80271() { // fn#80271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:4752, offset: 0x01e743be, size: 58 bytes, params: 1, frame: 12
|
||||
const items2 = [];
|
||||
items2.push(application.name);
|
||||
items2.push(env0_2);
|
||||
return items2.join(', ');
|
||||
}
|
||||
|
||||
function _fun80278(a0) { // fn#80278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6849, offset: 0x01e74883, size: 66 bytes, params: 2, frame: 16
|
||||
return ((Component) => <Component account={a0} theme={theme} locale={locale} userId={userId} key={a0.id} />)(env1_17);
|
||||
}
|
||||
|
||||
function _fun80279({application, identity}) { // fn#80279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6909, offset: 0x01e748c5, size: 87 bytes, params: 2, frame: 18
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component identity={identity} application={application} key={'' + identity.application_id + '-' + identity.provider_issued_user_id} />)(env1_18);
|
||||
}
|
||||
|
||||
function _fun80282(a0) { // fn#80282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:7424, offset: 0x01e74a45, size: 42 bytes, params: 2, frame: 15
|
||||
return ((Component) => <Component applicationRoleConnection={a0} key={a0.application.id} />)(env1_19);
|
||||
}
|
||||
|
||||
function onConfirm_80265() { // fn#80265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:2815, offset: 0x01e73f00, size: 108 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__.__proto__;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const CONNECTED_ACCOUNT_VIEWED = AnalyticEvents.CONNECTED_ACCOUNT_VIEWED;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [CONNECTED_ACCOUNT_VIEWED, {platform_type: account.type,
|
||||
other_user_id: userId}]);
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(env1_5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,376 @@
|
||||
/* Metro module 10490; source: modules/user_profile/native/UserProfileContactButtons.tsx; dependencies: [31, 27, 3793, 661, 33, 4501, 697, 4578, 6771, 8514, 10341, 566, 3995, 10491, 4050, 1244, 8796, 8783, 8776, 4080, 5080, 4603, 10493, 8341, 6682, 8850, 9708, 2] */
|
||||
function _fun81166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:6, offset: 0x01e9c624, size: 352 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.threeButtonLayout = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
|
||||
object2.flexGrow = {flex: 1};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.iconButtonGroup = {flexDirection: 'row', gap: PX_12};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileContactButtons.tsx');
|
||||
exports.default = UserProfileContactButtons;
|
||||
}
|
||||
|
||||
function FlatFriendButton(a0) { // fn#81167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:374, offset: 0x01e9c784, size: 268 bytes, params: 2, frame: 21
|
||||
var r10;
|
||||
const icon = a0.icon;
|
||||
const label = a0.label;
|
||||
const hasCustomProfileTheme = a0.hasCustomProfileTheme;
|
||||
const isPending = a0.isPending;
|
||||
const object2 = {'icon': 0, 'label': 0, 'hasCustomProfileTheme': 0, 'isPending': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, r10);
|
||||
const r5 = isPending === false || hasCustomProfileTheme ? 'primary' : 'secondary';
|
||||
r10 = r5 === 'primary' ? (importDefault(697) /* metro dependency 697: native */).colors.WHITE : (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<Button
|
||||
text={label}
|
||||
icon={((Component) => <Component color={r10} size="xs" />)(icon)}
|
||||
accessibilityLabel={label}
|
||||
variant={r5}
|
||||
size="md"
|
||||
grow
|
||||
{...value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function FriendRequestButton({user, hasCustomProfileTheme, location, ButtonComponent}) { // fn#81168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:698, offset: 0x01e9c890, size: 575 bytes, params: 2, frame: 23
|
||||
const newestAnalyticsLocation = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
({}).location = location ?? newestAnalyticsLocation;
|
||||
const value2 = (require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */).useGameFriendsForUser(user.id);
|
||||
const relationshipType = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore],
|
||||
function() {
|
||||
return RelationshipStore.getRelationshipType(user.id);
|
||||
});
|
||||
const env0_4 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
|
||||
const FRIEND = RelationshipTypes.FRIEND;
|
||||
if (relationshipType === FRIEND) {
|
||||
return null;
|
||||
}
|
||||
const BLOCKED = RelationshipTypes.BLOCKED;
|
||||
if (relationshipType === BLOCKED) {
|
||||
return null;
|
||||
}
|
||||
if (value2.length > 0) {
|
||||
return null;
|
||||
}
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
if (relationshipType === PENDING_INCOMING) {
|
||||
return null;
|
||||
}
|
||||
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
|
||||
const value3 = relationshipType === PENDING_OUTGOING;
|
||||
const r10 = value3 ? (require(10491) /* metro dependency 10491: UserClockIcon */).UserClockIcon : (require(4050) /* metro dependency 4050: UserPlusIcon */).UserPlusIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r9 = value3 ? Reflect.apply(string, intl, [t['fMm5q/']]) : Reflect.apply(string, intl, [t['7815ae']]);
|
||||
string = intl.string;
|
||||
return (
|
||||
<ButtonComponent
|
||||
icon={r10}
|
||||
label={r9}
|
||||
accessibilityHint={value3 ? Reflect.apply(string, intl, [t.H0Ql7N]) : Reflect.apply(string, intl,
|
||||
[t.gc9aSx])}
|
||||
onPress={onPress_81170}
|
||||
hasCustomProfileTheme={hasCustomProfileTheme}
|
||||
isPending={value3}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileContactButtons({user, disableMessage, disableCalls, location, hasCustomProfileTheme, style}) { // fn#81172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:1866, offset: 0x01e9cbe0, size: 1683 bytes, params: 2, frame: 47
|
||||
var r24;
|
||||
var view;
|
||||
var object3;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var object4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var zROXEV;
|
||||
var formatToPlainString;
|
||||
var zFfSFQ;
|
||||
var object6;
|
||||
var items2;
|
||||
var object8;
|
||||
var JJogjm;
|
||||
var items4;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
var object9;
|
||||
var items5;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [RelationshipStore];
|
||||
const relationshipType = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return RelationshipStore.getRelationshipType(user.id);
|
||||
}]);
|
||||
const value2 = (require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */).useGameFriendsForUser(user.id);
|
||||
const closure = function() {
|
||||
trackUserProfileAction({action: 'SEND_MESSAGE'});
|
||||
if (closeUserProfile != null) {
|
||||
closeUserProfile();
|
||||
}
|
||||
importDefault(dependencyMap[20]).popAll();
|
||||
importDefault(dependencyMap[21]).openPrivateChannel({recipientIds: user.id});
|
||||
};
|
||||
const {handlePress, text, inCall,
|
||||
accessibilityHint} = (importDefault(10493) /* metro dependency 10493: usePrivateChannelCall */)(user.id, false,
|
||||
function() {
|
||||
trackUserProfileAction({action: 'VOICE_CALL'});
|
||||
if (closeUserProfile != null) {
|
||||
closeUserProfile();
|
||||
}
|
||||
});
|
||||
const r18 = hasCustomProfileTheme ? 'primary' : 'secondary';
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
const r27 = hasCustomProfileTheme ? colors.WHITE : colors.CONTROL_SECONDARY_TEXT_DEFAULT;
|
||||
const FRIEND = RelationshipTypes.FRIEND;
|
||||
if (relationshipType === FRIEND) {
|
||||
object = {};
|
||||
object3 = {flexDirection: 'row'};
|
||||
object3.gap = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.style = [object3, style];
|
||||
object4 = {};
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.text = Reflect.apply(string, intl, [zROXEV]);
|
||||
object4.icon = ((ChatIcon) => <ChatIcon color={r27} size="xs" />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon);
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.accessibilityLabel = Reflect.apply(string, intl, [zROXEV]);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
zFfSFQ = t.zFfSFQ;
|
||||
object6 = {};
|
||||
object6.name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
|
||||
object4.accessibilityHint = Reflect.apply(formatToPlainString, intl, [zFfSFQ, object6]);
|
||||
object4.variant = r18;
|
||||
object4.size = 'md';
|
||||
object4.grow = true;
|
||||
object4.onPress = closure;
|
||||
object4.disabled = disableMessage;
|
||||
items2 = [<View style={{flex: 1}}><Button {...object4} /></View>];
|
||||
object8 = {};
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.text = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.icon = ((PhoneCallIcon) => <PhoneCallIcon color={r27} size="xs" />)((require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon);
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.accessibilityLabel = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.accessibilityHint = accessibilityHint ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.focH1t);
|
||||
object8.variant = r18;
|
||||
object8.size = 'md';
|
||||
object8.grow = true;
|
||||
r24 = inCall ? handlePress : _fun81178;
|
||||
object8.onPress = r24;
|
||||
r24 = disableCalls || text == null;
|
||||
object8.disabled = r24;
|
||||
items2[1] = <View style={{flex: 1}}><Button {...object8} /></View>;
|
||||
view = <View {...object} key="two-button-group">{items2}</View>;
|
||||
} else if (relationshipType === RelationshipTypes.BLOCKED) {
|
||||
object = {};
|
||||
object3 = {flexDirection: 'row'};
|
||||
object3.gap = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.style = [object3, style];
|
||||
object4 = {};
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.text = Reflect.apply(string, intl, [zROXEV]);
|
||||
object4.icon = ((ChatIcon) => <ChatIcon color={r27} size="xs" />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon);
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.accessibilityLabel = Reflect.apply(string, intl, [zROXEV]);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
zFfSFQ = t.zFfSFQ;
|
||||
object6 = {};
|
||||
object6.name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
|
||||
object4.accessibilityHint = Reflect.apply(formatToPlainString, intl, [zFfSFQ, object6]);
|
||||
object4.variant = r18;
|
||||
object4.size = 'md';
|
||||
object4.grow = true;
|
||||
object4.onPress = closure;
|
||||
object4.disabled = disableMessage;
|
||||
items2 = [<View style={{flex: 1}}><Button {...object4} /></View>];
|
||||
object8 = {};
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.text = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.icon = ((PhoneCallIcon) => <PhoneCallIcon color={r27} size="xs" />)((require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon);
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.accessibilityLabel = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.accessibilityHint = accessibilityHint ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.focH1t);
|
||||
object8.variant = r18;
|
||||
object8.size = 'md';
|
||||
object8.grow = true;
|
||||
r24 = inCall ? handlePress : _fun81178;
|
||||
object8.onPress = r24;
|
||||
r24 = disableCalls || text == null;
|
||||
object8.disabled = r24;
|
||||
items2[1] = <View style={{flex: 1}}><Button {...object8} /></View>;
|
||||
view = <View {...object} key="two-button-group">{items2}</View>;
|
||||
} else if (relationshipType === RelationshipTypes.PENDING_INCOMING) {
|
||||
object = {};
|
||||
object3 = {flexDirection: 'row'};
|
||||
object3.gap = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.style = [object3, style];
|
||||
object4 = {};
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.text = Reflect.apply(string, intl, [zROXEV]);
|
||||
object4.icon = ((ChatIcon) => <ChatIcon color={r27} size="xs" />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon);
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.accessibilityLabel = Reflect.apply(string, intl, [zROXEV]);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
zFfSFQ = t.zFfSFQ;
|
||||
object6 = {};
|
||||
object6.name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
|
||||
object4.accessibilityHint = Reflect.apply(formatToPlainString, intl, [zFfSFQ, object6]);
|
||||
object4.variant = r18;
|
||||
object4.size = 'md';
|
||||
object4.grow = true;
|
||||
object4.onPress = closure;
|
||||
object4.disabled = disableMessage;
|
||||
items2 = [<View style={{flex: 1}}><Button {...object4} /></View>];
|
||||
object8 = {};
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.text = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.icon = ((PhoneCallIcon) => <PhoneCallIcon color={r27} size="xs" />)((require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon);
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.accessibilityLabel = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.accessibilityHint = accessibilityHint ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.focH1t);
|
||||
object8.variant = r18;
|
||||
object8.size = 'md';
|
||||
object8.grow = true;
|
||||
r24 = inCall ? handlePress : _fun81178;
|
||||
object8.onPress = r24;
|
||||
r24 = disableCalls || text == null;
|
||||
object8.disabled = r24;
|
||||
items2[1] = <View style={{flex: 1}}><Button {...object8} /></View>;
|
||||
view = <View {...object} key="two-button-group">{items2}</View>;
|
||||
} else if (value2.length === 0) {
|
||||
var viewBindingProps = {style: [styles.threeButtonLayout, style]};
|
||||
items4 = [<View style={styles.flexGrow}><FriendRequestButton user={user} location={location} hasCustomProfileTheme={hasCustomProfileTheme} ButtonComponent={FlatFriendButton} /></View>];
|
||||
var viewBindingProps2 = {style: styles.iconButtonGroup};
|
||||
var iconButtonProps3 = {icon: ((ChatIcon) => <ChatIcon color={r27} size="xs" />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon),
|
||||
|
||||
accessibilityLabel: intl.string(t.zROXEV)};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
zFfSFQ = t.zFfSFQ;
|
||||
object9 = {};
|
||||
object9.name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
|
||||
iconButtonProps3.accessibilityHint = Reflect.apply(formatToPlainString, intl, [zFfSFQ, object9]);
|
||||
iconButtonProps3.variant = r18;
|
||||
iconButtonProps3.size = 'md';
|
||||
iconButtonProps3.onPress = closure;
|
||||
iconButtonProps3.disabled = disableMessage;
|
||||
items5 = [<IconButton {...iconButtonProps3} />];
|
||||
items5[1] = <IconButton icon={((PhoneCallIcon) => <PhoneCallIcon color={r27} size="xs" />)((require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon)} accessibilityLabel={intl.string(t.JJogjm)} accessibilityHint={accessibilityHint ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.focH1t)} variant={r18} size="md" onPress={inCall ? handlePress : _fun81177} disabled={disableCalls || text == null} />;
|
||||
items4[1] = <View {...viewBindingProps2}>{items5}</View>;
|
||||
view = <View {...viewBindingProps} key="three-button-group">{items4}</View>;
|
||||
} else {
|
||||
object = {};
|
||||
object3 = {flexDirection: 'row'};
|
||||
object3.gap = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.style = [object3, style];
|
||||
object4 = {};
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.text = Reflect.apply(string, intl, [zROXEV]);
|
||||
object4.icon = ((ChatIcon) => <ChatIcon color={r27} size="xs" />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon);
|
||||
string = intl.string;
|
||||
zROXEV = t.zROXEV;
|
||||
object4.accessibilityLabel = Reflect.apply(string, intl, [zROXEV]);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
zFfSFQ = t.zFfSFQ;
|
||||
object6 = {};
|
||||
object6.name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
|
||||
object4.accessibilityHint = Reflect.apply(formatToPlainString, intl, [zFfSFQ, object6]);
|
||||
object4.variant = r18;
|
||||
object4.size = 'md';
|
||||
object4.grow = true;
|
||||
object4.onPress = closure;
|
||||
object4.disabled = disableMessage;
|
||||
items2 = [<View style={{flex: 1}}><Button {...object4} /></View>];
|
||||
object8 = {};
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.text = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.icon = ((PhoneCallIcon) => <PhoneCallIcon color={r27} size="xs" />)((require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon);
|
||||
string = intl.string;
|
||||
JJogjm = t.JJogjm;
|
||||
object8.accessibilityLabel = Reflect.apply(string, intl, [JJogjm]);
|
||||
object8.accessibilityHint = accessibilityHint ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.focH1t);
|
||||
object8.variant = r18;
|
||||
object8.size = 'md';
|
||||
object8.grow = true;
|
||||
r24 = inCall ? handlePress : _fun81178;
|
||||
object8.onPress = r24;
|
||||
r24 = disableCalls || text == null;
|
||||
object8.disabled = r24;
|
||||
items2[1] = <View style={{flex: 1}}><Button {...object8} /></View>;
|
||||
view = <View {...object} key="two-button-group">{items2}</View>;
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
function FriendRequestButtonOnPress() { // fn#81170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:1465, owner: FriendRequestButton.onPress, offset: 0x01e9caef, size: 165 bytes, params: 1, frame: 14
|
||||
var moduleValue;
|
||||
const relationshipTypeBinding = relationshipType;
|
||||
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
|
||||
if (relationshipTypeBinding === PENDING_OUTGOING) {
|
||||
moduleValue = require(8796) /* metro dependency 8796: UserProfileAlertUtils */;
|
||||
moduleValue.confirmCancelFriendRequest({userDisplayName: env0_4, onConfirm: onConfirm_81171});
|
||||
} else {
|
||||
trackUserProfileAction({action: 'SEND_FRIEND_REQUEST'});
|
||||
(importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */).addRelationship({userId: user.id,
|
||||
context: env0_2});
|
||||
}
|
||||
}
|
||||
|
||||
function closeUserProfile() { // fn#81174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:2187, owner: UserProfileContactButtons.closeUserProfile, offset: 0x01e9d273, size: 53 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8776) /* metro dependency 8776: navigateToLastChannel */)();
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun81177() { // fn#81177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:3443, offset: 0x01e9d348, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(9708) /* metro dependency 9708: ConfirmStartCall */;
|
||||
return value.confirmStartCall(handlePress);
|
||||
}
|
||||
|
||||
function onPressOnConfirm_81171() { // fn#81171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10676:1558, owner: FriendRequestButton.onPress.onConfirm, offset: 0x01e9cb94, size: 76 bytes, params: 1, frame: 14
|
||||
trackUserProfileAction({action: 'CANCEL_FRIEND_REQUEST'});
|
||||
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
defaultImport.cancelFriendRequest(user.id, env1_2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,531 @@
|
||||
/* 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] */
|
||||
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 closure = PrimaryInfo;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.ScrollView;
|
||||
const env0_6 = value2.View;
|
||||
const wishlistStore = importDefault(10035) /* metro dependency 10035: WishlistStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const env0_13 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
const constantsModule = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_14 = constantsModule.PROFILE_CONTENT_BOTTOM_PADDING;
|
||||
const env0_15 = constantsModule.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
||||
const env0_16 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
const env0_17 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
const env0_18 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_19 = value4.jsx;
|
||||
const env0_20 = value4.jsxs;
|
||||
const env0_21 = value4.Fragment;
|
||||
value = value.memo(UserProfileContent);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileContent.tsx');
|
||||
exports.default = value;
|
||||
exports.PrimaryInfo = closure;
|
||||
}
|
||||
|
||||
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 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).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 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 userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
|
||||
const RemoveFriendIconButtonHandleConfirm = function() {
|
||||
trackUserProfileAction({action: 'REMOVE_FRIEND'});
|
||||
importDefault(dependencyMap[24]).removeFriend(user.id, {location: newestAnalyticsLocation});
|
||||
};
|
||||
const env0_4 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const object2 = {'size': 'sm', 'variant': 'secondary-overlay'};
|
||||
const UserCheckIcon = (require(10339) /* metro dependency 10339: UserCheckIcon */).UserCheckIcon;
|
||||
object2.icon = <UserCheckIcon size="sm" color="white" />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J);
|
||||
object2.onPress = onPress_80126;
|
||||
return <IconButton {...object2} />;
|
||||
}
|
||||
|
||||
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
|
||||
var object2;
|
||||
const value2 = env0_4.useCallback(_fun80128, [channelId, guildId, user]);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
object2 = {'size': 'sm', 'variant': 'secondary-overlay'};
|
||||
const UserPlatformIcon = (require(4052) /* metro dependency 4052: UserPlatformIcon */).UserPlatformIcon;
|
||||
object2.icon = <UserPlatformIcon size="sm" color="white" />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J);
|
||||
object2.onPress = value2;
|
||||
return <IconButton {...object2} />;
|
||||
}
|
||||
|
||||
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 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
|
||||
const value4 = (importDefault(8501) /* metro dependency 8501: 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 userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const value6 = env0_4.useCallback(_fun80130, [Reflect.apply(useUserProfileAnalyticsContext,
|
||||
userProfileAnalyticsContextModule, []).trackUserProfileAction, value3]);
|
||||
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
||||
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 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
|
||||
var object2;
|
||||
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
|
||||
var r4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
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 = (importDefault(7622) /* metro dependency 7622: useOpenProfileSettings */)();
|
||||
const env0_3 = (importDefault(7622) /* metro dependency 7622: useOpenProfileSettings */)({guild: guild});
|
||||
const UserProfileTextButtonGroup = importDefault(8867) /* metro dependency 8867: UserProfileTextButtonGroup */;
|
||||
object2 = {style: value3.primaryButtons, maxWidth: ACTION_SHEET_MAX_WIDTH};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.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;
|
||||
}
|
||||
object2.secondaryButton = r4;
|
||||
return <UserProfileTextButtonGroup {...object2} />;
|
||||
}
|
||||
|
||||
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 object6;
|
||||
var r8;
|
||||
var r37;
|
||||
var r21;
|
||||
var r14;
|
||||
var object2;
|
||||
var UserProfileContactButtons;
|
||||
var LayerScope;
|
||||
var items11;
|
||||
const env0_3 = showUserProfileActionSheet;
|
||||
const env0_4 = isPreviewingChanges;
|
||||
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value4 = (importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)(ACTION_SHEET_MAX_WIDTH);
|
||||
const {bannerAnimatedStyle, bannerImageAnimatedStyle, contentAnimatedStyle, blurAnimatedProps,
|
||||
showBlur} = (importDefault(8760) /* metro dependency 8760: useUserProfileOverscrollStyles */)({scrollPosition: scrollPosition,
|
||||
bannerHeight: value4});
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
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 userBinding = user;
|
||||
object.relationshipType = RelationshipStore.getRelationshipType(userBinding.id);
|
||||
object.originApplicationId = RelationshipStore.getOriginApplicationId(userBinding.id);
|
||||
return object;
|
||||
});
|
||||
const value9 = (require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */).useIncomingGameRelationshipsForUser(user.id);
|
||||
const value10 = (require(10342) /* metro dependency 10342: useIsGameFriends */).useIsGameFriends(user.id);
|
||||
const value11 = (require(10343) /* metro dependency 10343: useUserProfileGameFriendApplicationIds */).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 = env0_4;
|
||||
let useMemo = binding.useMemo;
|
||||
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers(Reflect.apply(useMemo,
|
||||
binding, [_fun80139, [r41, user]]), 'UserProfileContent');
|
||||
const value14 = (importDefault(8693) /* metro dependency 8693: 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 = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
||||
image: pendingAvatar});
|
||||
const value17 = (importDefault(8501) /* metro dependency 8501: 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} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
const value21 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('UserProfileContent');
|
||||
const value22 = env0_4.useRef(null);
|
||||
const value23 = env0_4.useRef(null);
|
||||
const firstWishlistId = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
||||
function() {
|
||||
return UserProfileStore.getFirstWishlistId(user.id);
|
||||
});
|
||||
(require(10034) /* metro dependency 10034: useWishlistHooks */).useFetchWishlist({wishlistId: firstWishlistId,
|
||||
userId: user.id});
|
||||
const value24 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], _fun80142,
|
||||
[firstWishlistId]);
|
||||
const value25 = (require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'user_profile_content'});
|
||||
binding = env0_4;
|
||||
useMemo = binding.useMemo;
|
||||
const r15 = isActive || value24 != null && Reflect.apply(useMemo, binding, [_fun80143, [value24, isActive,
|
||||
value25]]).length > 0;
|
||||
binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value30 = Reflect.apply(useState, binding, [0]);
|
||||
binding = env0_3;
|
||||
const value31 = binding(value30, 2);
|
||||
const property = value31[0];
|
||||
const env0_21 = value31[1];
|
||||
const value33 = env0_4.useCallback(_fun80145, []);
|
||||
const {pageHeights,
|
||||
handlePageContentSize} = (require(10345) /* metro dependency 10345: useSegmentedPagesHeight */).usePageHeights();
|
||||
const binding3 = env0_4;
|
||||
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} = (require(10346) /* metro dependency 10346: useWishlistViewerCoachmark */).useWishlistViewerCoachmark({isCurrentUser: isActive,
|
||||
shouldShowWishlistTab: r15});
|
||||
const value37 = env0_4.useCallback(_fun80146, [trackUserProfileAction, isVisible, markAsDismissed]);
|
||||
const value40 = env0_4.useCallback(_fun80149, [user, currentUser, containerBackground, value3, isPreviewingChanges,
|
||||
value21, env0_4.useCallback(_fun80147, [navigateToPremium]), env0_4.useCallback(_fun80148, [navigateToShop]),
|
||||
value19, r41, value11, displayProfile, value12, pendingBio, channel, showUserProfileActionSheet]);
|
||||
const value42 = env0_4.useMemo(_fun80151, [handlePageContentSize, value40, env0_4.useCallback(_fun80150,
|
||||
[value3.profileContent, firstWishlistId, property2])]);
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
object6 = {pageWidth: property};
|
||||
WISHLIST = UserProfileSections.WISHLIST;
|
||||
object6.defaultIndex = initialSection !== WISHLIST ? 0 : 1;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object6.itemSpacing = PX_24;
|
||||
object6.items = value42;
|
||||
object6.onPageChange = value37;
|
||||
const value43 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object6]);
|
||||
const value44 = (require(10345) /* metro dependency 10345: useSegmentedPagesHeight */).usePagesHeightStyle(value43,
|
||||
pageHeights);
|
||||
const value45 = env0_4.useCallback(_fun80154, [value43, markAsDismissed]);
|
||||
if (user == null) {
|
||||
return null;
|
||||
}
|
||||
if (currentUser == null) {
|
||||
return null;
|
||||
}
|
||||
object6 = {backgroundColor: containerBackground};
|
||||
const jsxRuntimeEnv0_21Binding = jsxRuntimeEnv0_21;
|
||||
const UserProfileOverscrollBanner = importDefault(8761) /* metro dependency 8761: UserProfileOverscrollBanner */;
|
||||
const object4 = {user: user, displayProfile: displayProfile, bannerHeight: value4};
|
||||
let r56 = isPreviewingChanges ? pendingBanner : undefined;
|
||||
object4.pendingBanner = r56;
|
||||
object4.pendingAvatarSrc = isPreviewingChanges ? pendingAvatarSrc : undefined;
|
||||
object4.pendingAccentColor = isPreviewingChanges && pendingAccentColor != null ? pendingAccentColor : undefined;
|
||||
object4.pendingThemeColors = isPreviewingChanges && pendingThemeColors != null ? pendingThemeColors : undefined;
|
||||
object4.disableInteraction = isPreviewingChanges;
|
||||
object4.bannerAnimatedStyle = bannerAnimatedStyle;
|
||||
object4.bannerImageAnimatedStyle = bannerImageAnimatedStyle;
|
||||
object4.blurAnimatedProps = blurAnimatedProps;
|
||||
object4.showBlur = showBlur;
|
||||
object4.privateBanner = displayProfile?.private !== true ? undefined : ((Component) => <Component primaryColor={primaryColor} />)(importDefault(10474) /* metro dependency 10474: UserProfilePrivateBanner */);
|
||||
if (isPreviewingChanges) {
|
||||
r8 = undefined;
|
||||
} else {
|
||||
object2 = {};
|
||||
r56 = displayProfile?.private;
|
||||
r56 = r56 && value3.bannerButtonsWithPrivateBanner;
|
||||
object2.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 {...object2}>{r56}{((Component) => <Component user={user} currentUser={currentUser} displayProfile={displayProfile} channel={channel} />)(importDefault(10475) /* metro dependency 10475: UserProfileOverflowMenu */)}</View>;
|
||||
}
|
||||
object4.buttons = r8;
|
||||
const userProfileOverscrollBanner = <UserProfileOverscrollBanner {...object4} />;
|
||||
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={object6} showUserProfile={showUserProfileActionSheet} />)(importDefault(10485) /* metro dependency 10485: UserProfileIncomingFriendRequest */);
|
||||
items9[3] = value9.map(_fun80155);
|
||||
items9[4] = ((Component) => <Component user={user} style={object6} />)(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) {
|
||||
object6 = {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 {...object6}><LayerScope>{items11}</LayerScope></View>;
|
||||
} else {
|
||||
r14 = value40();
|
||||
}
|
||||
items7[2] = r14;
|
||||
return (
|
||||
<>
|
||||
{userProfileOverscrollBanner}
|
||||
<View2 style={contentAnimatedStyle}>
|
||||
{value51}
|
||||
<View style={items6}>
|
||||
{items7}
|
||||
</View>
|
||||
</View2>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
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 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__;
|
||||
(require(8796) /* metro dependency 8796: UserProfileAlertUtils */).confirmRemoveFriend({userDisplayName: env0_4,
|
||||
onConfirm: RemoveFriendIconButtonHandleConfirm});
|
||||
}
|
||||
|
||||
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 _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'});
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).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__;
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUserPronouns();
|
||||
}
|
||||
|
||||
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'});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(8088) /* metro dependency 8088: 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'});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(8088) /* metro dependency 8088: closeVoicePanels */)();
|
||||
env0_3();
|
||||
}
|
||||
|
||||
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 = env0_19 == null ? undefined : env0_19.items.filter(_fun80144);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
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__;
|
||||
(importDefault(4080) /* metro dependency 4080: 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__;
|
||||
(importDefault(4080) /* metro dependency 4080: 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={env0_13} 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] = env0_17 && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
||||
items3[5] = env0_11.length > 0 && ((Component) => <Component userId={user.id} applicationIds={env0_11} style={env0_17 ? value3 : items4} />)(importDefault(10360) /* metro dependency 10360: UserProfileGameFriendsCard */);
|
||||
items3[6] = ((Component) => <Component userId={user.id} displayProfile={displayProfile} pendingBio={isPreviewingChanges ? pendingBio : value3} style={env0_17 ? value3 : items4} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
|
||||
items3[7] = env0_17 && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
||||
items3[8] = env0_12 != null && ((Component) => <Component userId={user.id} guildId={env0_12} style={env0_17 ? 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={env0_17 ? value3 : items4} />;
|
||||
} else {
|
||||
r6 = value15;
|
||||
}
|
||||
items3[9] = r6;
|
||||
items3[10] = env0_17 && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
||||
const UserProfileAccountConnectionsCard = (require(10361) /* metro dependency 10361: UserProfileConnections */).UserProfileAccountConnectionsCard;
|
||||
items3[11] = <UserProfileAccountConnectionsCard userId={user.id} style={env0_17 ? value3 : items4} />;
|
||||
const UserProfileApplicationRoleConnectionsCard = (require(10361) /* metro dependency 10361: UserProfileConnections */).UserProfileApplicationRoleConnectionsCard;
|
||||
items3[12] = <UserProfileApplicationRoleConnectionsCard userId={user.id} style={env0_17 ? value3 : items4} />;
|
||||
items3[13] = !isPreviewingChanges && ((Component) => <Component userId={user.id} style={env0_17 ? 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 object2 = {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;
|
||||
object2.label = Reflect.apply(string, intl, [LXw470]);
|
||||
object2.page = <ScrollView scrollEnabled={false} onContentSizeChange={function(a0, a1) {
|
||||
return handlePageContentSize(0, a0, a1);
|
||||
}}>{env0_29()}</ScrollView>;
|
||||
const items2 = [object2];
|
||||
object2 = {id: 'wishlist'};
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J']);
|
||||
object2.page = <ScrollView scrollEnabled={false} onContentSizeChange={function(a0, a1) {
|
||||
return handlePageContentSize(1, a0, a1);
|
||||
}}>{env0_30()}</ScrollView>;
|
||||
items2[1] = object2;
|
||||
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 */);
|
||||
}
|
||||
|
||||
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 (require(10344) /* metro dependency 10344: WishlistUtils */).isEligibleWishlistItemOnMobile(a0,
|
||||
{isWishlistOwner: env1_10, isSocialLayerStorefrontMobilePurchasingEnabled: env1_20});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Metro module 8692; source: modules/user_profile/native/UserProfileCustomStatusActionSheet.tsx; dependencies: [31, 27, 1878, 6816, 33, 4501, 697, 566, 8693, 4617, 1244, 8694, 8417, 8513, 2] */
|
||||
function _fun68306(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8877:6, offset: 0x01c48396, size: 377 bytes, params: 8, frame: 25
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(6816) /* metro dependency 6816: Constants */;
|
||||
const AVATAR_CONTAINER_SIZE = value.AVATAR_CONTAINER_SIZE;
|
||||
const AVATAR_CUSTOM_STATUS_GAP = value.AVATAR_CUSTOM_STATUS_GAP;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {flexDirection: 'row', columnGap: AVATAR_CUSTOM_STATUS_GAP};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginHorizontal = PX_16;
|
||||
object3.statusPreviewContainer = object4;
|
||||
object3.avatarContainer = {height: AVATAR_CONTAINER_SIZE, width: AVATAR_CONTAINER_SIZE, alignItems: 'center',
|
||||
justifyContent: 'center'};
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object3.avatarStatus = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
object3.customStatusBubble = {'marginTop': null, 'flexShrink': 1, 'flexGrow': 1,
|
||||
marginTop: AVATAR_CONTAINER_SIZE / 2 + 10};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileCustomStatusActionSheet.tsx');
|
||||
exports.default = UserProfileCustomStatusActionSheet;
|
||||
}
|
||||
|
||||
function UserProfileCustomStatusActionSheet({user, guildId, channelId, previewEmoji, previewText}) { // fn#68307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8877:669, offset: 0x01c4850f, size: 460 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun68308, [user]);
|
||||
const value3 = (importDefault(8693) /* metro dependency 8693: useCustomStatusActivityForUser */)(user.id);
|
||||
const value4 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(guildId, channelId, user);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const r5 = value2 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AHoLf4) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['pP5Aa+'],
|
||||
{username: value4});
|
||||
const UserProfileStackedActionSheet = importDefault(8694) /* metro dependency 8694: UserProfileStackedActionSheet */;
|
||||
let value = importDefault(8417) /* metro dependency 8417: HeaderAvatar */;
|
||||
value = <View style={styles.avatarContainer}>{((Component) => <Component user={user} statusStyle={styles.avatarStatus} />)(value)}</View>;
|
||||
return (
|
||||
<UserProfileStackedActionSheet title={r5}>
|
||||
<View style={styles.statusPreviewContainer}>
|
||||
{value}
|
||||
{((Component) => <Component customStatusActivity={value3} hasCustomProfileTheme={false} showFullStatus style={styles.customStatusBubble} previewEmoji={previewEmoji} previewText={previewText} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */)}
|
||||
</View>
|
||||
</UserProfileStackedActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68308() { // fn#68308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8877:818, offset: 0x01c486db, size: 50 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return UserStore.getCurrentUser()?.id === user.id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
/* Metro module 8513; source: modules/user_profile/native/UserProfileCustomStatusBubble.tsx; dependencies: [57, 31, 27, 6816, 1881, 33, 4501, 697, 3829, 5475, 1423, 477, 4573, 6739, 8514, 8518, 4080, 8520, 6789, 1244, 5278, 10504, 2] */
|
||||
function _fun67460(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:6, offset: 0x01c23929, size: 415 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.PixelRatio;
|
||||
const env0_6 = value2.View;
|
||||
const UserProfileThemeTypes = (require(6816) /* metro dependency 6816: Constants */).UserProfileThemeTypes;
|
||||
const env0_7 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value3.jsx;
|
||||
const env0_9 = value3.Fragment;
|
||||
const env0_10 = value3.jsxs;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67465);
|
||||
const env0_12 = {'textVariant': 'text-md/normal', 'emojiOnlyEmojiSize': 32, 'textMinWidth': 42,
|
||||
'statusBubblePaddingHorizontal': 12, 'statusBubblePaddingVertical': 7};
|
||||
object2 = {};
|
||||
const PREVIEW = UserProfileThemeTypes.PREVIEW;
|
||||
object2[PREVIEW] = {'textVariant': 'text-sm/normal', 'emojiOnlyEmojiSize': 26, 'textMinWidth': 53,
|
||||
'statusBubblePaddingHorizontal': 10, 'statusBubblePaddingVertical': 6};
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
return {container: {alignItems: 'center'}};
|
||||
});
|
||||
value = value.forwardRef(_fun67467);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileCustomStatusBubble.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function getClampedMaxLines() { // fn#67461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:254, offset: 0x01c23ac8, size: 45 bytes, params: 1, frame: 12
|
||||
const fontScale = PixelRatio.getFontScale();
|
||||
const Math = global.Math;
|
||||
return Math.ceil(2 * fontScale);
|
||||
}
|
||||
|
||||
function EmojiImage({emojiId, size, animated, style}) { // fn#67462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:1594, offset: 0x01c23af5, size: 207 bytes, params: 2, frame: 23
|
||||
animated = !(animated === undefined) && animated;
|
||||
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
||||
const value2 = AnimateEmoji.useSetting();
|
||||
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
const items2 = [{height: size, width: size}, style];
|
||||
const defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
const getEmojiURL = defaultImport2.getEmojiURL;
|
||||
const object = {id: emojiId};
|
||||
const Boolean = global.Boolean;
|
||||
object.animated = Boolean(animated) && value2;
|
||||
object.size = EMOJI_URL_BASE_SIZE;
|
||||
return (
|
||||
<FastImage
|
||||
style={items2}
|
||||
source={{uri: Reflect.apply(getEmojiURL, defaultImport2, [object])}}
|
||||
resizeMode="contain"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function TextStatusContent({text, emoji, textVariant, lineClamp, onTextLayout, lineHeight, isPlaceholderText}) { // fn#67463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:1838, offset: 0x01c23bc4, size: 529 bytes, params: 2, frame: 28
|
||||
var r0;
|
||||
var r6;
|
||||
var isAndroid2;
|
||||
var object3;
|
||||
var jsxRuntimeEnv0_9Binding;
|
||||
var items2;
|
||||
isPlaceholderText = !(isPlaceholderText === undefined) && isPlaceholderText;
|
||||
const object4 = {paddingVertical: lineHeight / 10};
|
||||
if (isPlaceholderText) {
|
||||
isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
object3 = {};
|
||||
if (isAndroid2) {
|
||||
object3.fontFamily = 'ggsans-NormalItalic, NotoSans-NormalItalic';
|
||||
r0 = object3;
|
||||
} else {
|
||||
object3.fontStyle = 'italic';
|
||||
r0 = object3;
|
||||
}
|
||||
} else {
|
||||
r0 = isPlaceholderText;
|
||||
}
|
||||
copyDataProperties(object4, r0, undefined);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
if (emoji?.id != null) {
|
||||
r6 = <><View><EmojiImage emojiId={emoji.id} size={0.9 * lineHeight} animated={emoji.animated} style={{marginBottom: 0.1 * -lineHeight}} /></View><View style={{width: 0.5 * lineHeight}} /></>;
|
||||
} else if (emoji?.name != null) {
|
||||
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
items2 = [emoji.name];
|
||||
items2[1] = <View style={{width: 0.4 * lineHeight}} />;
|
||||
r6 = <>{items2}</>;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
return (
|
||||
<Text
|
||||
variant={textVariant}
|
||||
color="text-default"
|
||||
lineClamp={lineClamp}
|
||||
onTextLayout={onTextLayout}
|
||||
style={object4}
|
||||
>
|
||||
{r6}
|
||||
{text}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function EmojiOnlyStatusContent({emoji, size}) { // fn#67464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:2532, offset: 0x01c23dd5, size: 304 bytes, params: 2, frame: 23
|
||||
var r8;
|
||||
var defaultImport;
|
||||
var getEmojiURL;
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
||||
if (emoji?.id != null) {
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getEmojiURL = defaultImport.getEmojiURL;
|
||||
object2 = {};
|
||||
object2.id = emoji.id;
|
||||
object2.animated = global.Boolean(emoji?.animated) && AnimateEmoji.useSetting();
|
||||
object2.size = EMOJI_URL_BASE_SIZE;
|
||||
r8 = Reflect.apply(getEmojiURL, defaultImport, [object2]);
|
||||
} else {
|
||||
r8 = undefined;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{((Component) => <Component textEmojiStyle={{fontSize: size}} fastImageStyle={{width: size,
|
||||
height: size}} src={r8} name={emoji?.name ?? ''} />)(importDefault(6739) /* metro dependency 6739: Emoji */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun67465(a0) { // fn#67465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:357, offset: 0x01c23f05, size: 482 bytes, params: 2, frame: 18
|
||||
const object2 = {};
|
||||
object2.container = {position: 'relative'};
|
||||
const object8 = {};
|
||||
let colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object8.backgroundColor = a0 ? colors.CUSTOM_STATUS_BUBBLE_BG : colors.BACKGROUND_SURFACE_HIGH;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object8.borderColor = a0 ? colors.BORDER_MUTED : colors.BORDER_SUBTLE;
|
||||
object8.borderWidth = 1;
|
||||
object2.bubble = object8;
|
||||
const object9 = {'alignSelf': 'flex-start', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
let SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object9, SHADOW_LOW, undefined);
|
||||
object9['top'] = -14;
|
||||
object2.statusBubble = object9;
|
||||
object2.statusBubbleMeasureable = {'position': 'absolute', 'top': 0, 'left': 0, 'opacity': 0};
|
||||
const object10 = {'position': 'absolute', 'top': -30, 'width': 12, 'height': 12};
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object10, SHADOW_LOW, -14);
|
||||
object2.smallCircle = object10;
|
||||
const object11 = {'position': 'absolute', 'top': -8, 'left': 12, 'width': 20, 'height': 20};
|
||||
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object11, SHADOW_LOW, -14);
|
||||
object2.largeCircle = object11;
|
||||
const object12 = {'position': 'absolute', 'top': -7.5, 'left': 13, 'width': 16, 'height': 16, 'borderWidth': 0};
|
||||
object12.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object12.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.largeCircleInner = object12;
|
||||
object2.addStatusIconSpacer = {width: 6};
|
||||
object2.statusBubbleLeftAligned = {alignItems: 'flex-start'};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun67467({customStatusActivity, themeType, hasCustomProfileTheme, editEnabled, showFullStatus, onPressTruncatedStatus, style, emojiOnlyStyle, previewEmoji, previewText, placeholderText, prompt}, a1) { // fn#67467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:2938, offset: 0x01c240f9, size: 1935 bytes, params: 3, frame: 41
|
||||
var name;
|
||||
var r9;
|
||||
var r17;
|
||||
var closure;
|
||||
var closure2;
|
||||
var object5;
|
||||
var bubble;
|
||||
var items4;
|
||||
var object6;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var UpF5Qa;
|
||||
var value27;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var object8;
|
||||
var isAndroid2;
|
||||
var object9;
|
||||
const CirclePlusIcon = (require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon;
|
||||
var moduleValue4;
|
||||
const r10 = editEnabled !== undefined && editEnabled;
|
||||
const env0_0 = showFullStatus !== undefined && showFullStatus;
|
||||
const styles = useStyles(hasCustomProfileTheme);
|
||||
const env0_3 = styles;
|
||||
let r0 = themeType != null ? env0_13[themeType] : undefined;
|
||||
r0 = r0 ?? env0_12;
|
||||
const textVariant = r0.textVariant;
|
||||
const env0_4 = textVariant;
|
||||
const emojiOnlyEmojiSize = r0.emojiOnlyEmojiSize;
|
||||
const textMinWidth = r0.textMinWidth;
|
||||
const statusBubblePaddingHorizontal = r0.statusBubblePaddingHorizontal;
|
||||
const statusBubblePaddingVertical = r0.statusBubblePaddingVertical;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_6 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
let r27 = previewText === undefined ? customStatusActivity?.state : previewText !== '' ? previewText : customStatusActivity?.state;
|
||||
r0 = r27 != null && r27 !== '';
|
||||
let r25 = previewEmoji !== undefined ? previewEmoji : customStatusActivity?.emoji;
|
||||
const value7 = r25 != null;
|
||||
const r22 = value7 && !r0;
|
||||
let r19 = !r0 && !value7 && placeholderText !== undefined && placeholderText !== '';
|
||||
r27 = r19 ? placeholderText : r27;
|
||||
const r13 = r27 != null && r27 !== '';
|
||||
r0 = !r0 ? value7 : r0;
|
||||
r0 = !r0 ? !r10 && r19 : r0;
|
||||
const r11 = !r0 && r10;
|
||||
var [property, env0_12] = env0_3(env0_4.useState(false), 2);
|
||||
let object = {};
|
||||
object.minWidth = r13 ? textMinWidth : 0;
|
||||
object.minHeight = r22 ? emojiOnlyEmojiSize + 2 * statusBubblePaddingVertical : 0;
|
||||
object.paddingVertical = r13 || r11 ? statusBubblePaddingVertical : 0;
|
||||
object.paddingHorizontal = statusBubblePaddingHorizontal;
|
||||
const object10 = {top: statusBubblePaddingVertical, bottom: statusBubblePaddingVertical,
|
||||
left: statusBubblePaddingHorizontal, right: statusBubblePaddingHorizontal};
|
||||
const binding = env0_4;
|
||||
const value21 = binding.useRef(null);
|
||||
binding.useImperativeHandle(a1, _fun67468);
|
||||
const value22 = (require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */).useScaledTextLineHeight(textVariant);
|
||||
if (r0) {
|
||||
closure = onPress_67469;
|
||||
closure2 = renderStatusContent;
|
||||
object5 = {};
|
||||
name = r25?.name;
|
||||
object5.text = [name, r27].filter(function(a0) {
|
||||
return a0 != null;
|
||||
}).join(' ');
|
||||
var viewProps = {style: [style, r22 ? emojiOnlyStyle : undefined]};
|
||||
bubble = styles.bubble;
|
||||
items4 = [<View style={[bubble, styles.smallCircle]} />];
|
||||
bubble = styles.bubble;
|
||||
items4[1] = <View style={[bubble, styles.largeCircle]} />;
|
||||
items4[2] = _fun67472();
|
||||
object6 = {};
|
||||
bubble = styles.bubble;
|
||||
object6.style = [bubble, styles.statusBubble, object, !r22 && styles.statusBubbleLeftAligned];
|
||||
object6.ref = value21;
|
||||
bubble = styles.bubble;
|
||||
object = [<View style={[bubble, styles.largeCircleInner]} />];
|
||||
if (r11) {
|
||||
r17 = r19 ? placeholderText : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Vq4UmS);
|
||||
var pressableOpacityProps = {accessibilityRole: 'button',
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zrpF/b']),
|
||||
accessibilityHint: r19 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ioWOMP,
|
||||
|
||||
|
||||
{prompt: placeholderText}) : undefined, onPress: closure, hitSlop: object10};
|
||||
var textProps = {variant: r19 ? 'text-md/normal' : 'text-md/medium',
|
||||
color: 'control-secondary-text-default',
|
||||
lineClamp: getClampedMaxLines()};
|
||||
object8 = {paddingVertical: value22 / 10};
|
||||
if (r19) {
|
||||
isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
object9 = {};
|
||||
if (isAndroid2) {
|
||||
object9.fontFamily = 'ggsans-NormalItalic, NotoSans-NormalItalic';
|
||||
r19 = object9;
|
||||
} else {
|
||||
object9.fontStyle = 'italic';
|
||||
r19 = object9;
|
||||
}
|
||||
}
|
||||
copyDataProperties(object8, r19, undefined);
|
||||
textProps.style = object8;
|
||||
var circlePlusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT,
|
||||
|
||||
|
||||
size: 'xs'};
|
||||
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
circlePlusIconProps.style = moduleValue4.isAndroid() ? {marginBottom: 0.1 * -value22} : undefined;
|
||||
r9 = <PressableOpacity {...pressableOpacityProps}><Text {...textProps}><View><CirclePlusIcon {...circlePlusIconProps} /></View><View style={styles.addStatusIconSpacer} />{r17}</Text></PressableOpacity>;
|
||||
} else if (r10) {
|
||||
r9 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QdHxos)} accessibilityValue={object5} onPress={closure} hitSlop={object10}>{closure2()}</PressableOpacity>;
|
||||
} else if (onPressTruncatedStatus == null) {
|
||||
r9 = closure2();
|
||||
} else if (property) {
|
||||
if (r19) {
|
||||
r9 = closure2();
|
||||
} else {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
UpF5Qa = (require(1244) /* metro dependency 1244: indexNative */).t.UpF5Qa;
|
||||
name = r25?.name;
|
||||
value27 = '';
|
||||
r25 = r27 ?? value27;
|
||||
r9 = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
|
||||
intl,
|
||||
[UpF5Qa, {emoji: name ?? value27,
|
||||
status: r25}])} onPress={onPressTruncatedStatus} hitSlop={object10}>{closure2()}</PressableOpacity>;
|
||||
}
|
||||
} else {
|
||||
r9 = closure2();
|
||||
}
|
||||
object[1] = r9;
|
||||
items4[3] = <View {...object6}>{object}</View>;
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
{items4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (r11) {
|
||||
closure = onPress_67469;
|
||||
closure2 = renderStatusContent;
|
||||
object5 = {};
|
||||
name = r25?.name;
|
||||
object5.text = [name, r27].filter(function(a0) {
|
||||
return a0 != null;
|
||||
}).join(' ');
|
||||
var viewProps = {style: [style, r22 ? emojiOnlyStyle : undefined]};
|
||||
bubble = styles.bubble;
|
||||
items4 = [<View style={[bubble, styles.smallCircle]} />];
|
||||
bubble = styles.bubble;
|
||||
items4[1] = <View style={[bubble, styles.largeCircle]} />;
|
||||
items4[2] = _fun67472();
|
||||
object6 = {};
|
||||
bubble = styles.bubble;
|
||||
object6.style = [bubble, styles.statusBubble, object, !r22 && styles.statusBubbleLeftAligned];
|
||||
object6.ref = value21;
|
||||
bubble = styles.bubble;
|
||||
object = [<View style={[bubble, styles.largeCircleInner]} />];
|
||||
if (r11) {
|
||||
r17 = r19 ? placeholderText : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Vq4UmS);
|
||||
var pressableOpacityProps = {accessibilityRole: 'button',
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zrpF/b']),
|
||||
accessibilityHint: r19 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ioWOMP,
|
||||
|
||||
|
||||
{prompt: placeholderText}) : undefined, onPress: closure, hitSlop: object10};
|
||||
var textProps = {variant: r19 ? 'text-md/normal' : 'text-md/medium',
|
||||
color: 'control-secondary-text-default',
|
||||
lineClamp: getClampedMaxLines()};
|
||||
object8 = {paddingVertical: value22 / 10};
|
||||
if (r19) {
|
||||
isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
object9 = {};
|
||||
if (isAndroid2) {
|
||||
object9.fontFamily = 'ggsans-NormalItalic, NotoSans-NormalItalic';
|
||||
r19 = object9;
|
||||
} else {
|
||||
object9.fontStyle = 'italic';
|
||||
r19 = object9;
|
||||
}
|
||||
}
|
||||
copyDataProperties(object8, r19, undefined);
|
||||
textProps.style = object8;
|
||||
var circlePlusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT,
|
||||
|
||||
|
||||
size: 'xs'};
|
||||
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
circlePlusIconProps.style = moduleValue4.isAndroid() ? {marginBottom: 0.1 * -value22} : undefined;
|
||||
r9 = <PressableOpacity {...pressableOpacityProps}><Text {...textProps}><View><CirclePlusIcon {...circlePlusIconProps} /></View><View style={styles.addStatusIconSpacer} />{r17}</Text></PressableOpacity>;
|
||||
} else if (r10) {
|
||||
r9 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QdHxos)} accessibilityValue={object5} onPress={closure} hitSlop={object10}>{closure2()}</PressableOpacity>;
|
||||
} else if (onPressTruncatedStatus == null) {
|
||||
r9 = closure2();
|
||||
} else if (property) {
|
||||
if (r19) {
|
||||
r9 = closure2();
|
||||
} else {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
UpF5Qa = (require(1244) /* metro dependency 1244: indexNative */).t.UpF5Qa;
|
||||
name = r25?.name;
|
||||
value27 = '';
|
||||
r25 = r27 ?? value27;
|
||||
r9 = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
|
||||
intl,
|
||||
[UpF5Qa, {emoji: name ?? value27,
|
||||
status: r25}])} onPress={onPressTruncatedStatus} hitSlop={object10}>{closure2()}</PressableOpacity>;
|
||||
}
|
||||
} else {
|
||||
r9 = closure2();
|
||||
}
|
||||
object[1] = r9;
|
||||
items4[3] = <View {...object6}>{object}</View>;
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
{items4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun67468() { // fn#67468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:3859, offset: 0x01c24888, size: 14 bytes, params: 1, frame: 1
|
||||
return env0_14.current;
|
||||
}
|
||||
|
||||
function onPress_67469() { // fn#67469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:3972, offset: 0x01c24896, size: 130 bytes, params: 1, frame: 16
|
||||
trackUserProfileAction({action: 'PRESS_EDIT_CUSTOM_STATUS'});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
const customStatusUtilsModule = require(8520) /* metro dependency 8520: CustomStatusUtils */;
|
||||
const openEditCustomStatusModal = customStatusUtilsModule.openEditCustomStatusModal;
|
||||
const USER_PROFILE_CUSTOM_STATUS_BUBBLE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_CUSTOM_STATUS_BUBBLE;
|
||||
Reflect.apply(openEditCustomStatusModal, customStatusUtilsModule,
|
||||
[{analyticsLocations: [USER_PROFILE_CUSTOM_STATUS_BUBBLE], prompt: prompt}]);
|
||||
}
|
||||
|
||||
function renderStatusContent() { // fn#67470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:4175, offset: 0x01c24918, size: 148 bytes, params: 1, frame: 18
|
||||
return env0_11 ? <TextStatusContent text={env0_10} isPlaceholderText={env0_9} emoji={env0_7} textVariant={textVariant} lineClamp={env0_0 ? undefined : getClampedMaxLines()} lineHeight={env0_15} /> : env0_8 ? <EmojiOnlyStatusContent emoji={env0_7} size={emojiOnlyEmojiSize} /> : undefined;
|
||||
}
|
||||
|
||||
function _fun67472() { // fn#67472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:4546, offset: 0x01c249ac, size: 199 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
var value2;
|
||||
if (onPressTruncatedStatus != null) {
|
||||
if (env0_0) {
|
||||
return undefined;
|
||||
}
|
||||
if (env0_11) {
|
||||
value2 = environment.__proto__;
|
||||
return (
|
||||
<View style={[styles.bubble, styles.statusBubble, env0_13, styles.statusBubbleMeasureable]}>
|
||||
<TextStatusContent
|
||||
text={env0_10}
|
||||
isPlaceholderText={env0_9}
|
||||
emoji={env0_7}
|
||||
textVariant={textVariant}
|
||||
onTextLayout={onTextLayout}
|
||||
lineHeight={env0_15}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onTextLayout({nativeEvent}) { // fn#67473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8698:4733, offset: 0x01c24a73, size: 51 bytes, params: 2, frame: 12
|
||||
env1_12(nativeEvent.lines.length > getClampedMaxLines());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
/* Metro module 10352; source: modules/user_profile/native/UserProfileDismissibleUpsells.tsx; dependencies: [31, 27, 1878, 8516, 7047, 1376, 33, 4501, 697, 10353, 8514, 566, 3802, 10357, 1365, 1305, 4573, 1244, 5278, 5312, 4578, 7954, 10358, 2] */
|
||||
function _fun80218(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10538:6, offset: 0x01e719bd, size: 460 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(8516) /* metro dependency 8516: Constants */).TrackUserProfileActions;
|
||||
const Gradients = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
|
||||
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const PREMIUM_GUILD = Gradients.PREMIUM_GUILD;
|
||||
object = [];
|
||||
arraySpread(object, PREMIUM_GUILD, 0, undefined);
|
||||
const env0_10 = object.reverse();
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object = {};
|
||||
const object3 = {'paddingVertical': 16, 'paddingHorizontal': 12};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object.upsellContainer = object3;
|
||||
const PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME = (importDefault(697) /* metro dependency 697: native */).colors.PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME;
|
||||
object.customProfileThemeUpsellContainer = {backgroundColor: PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME};
|
||||
object.header = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
|
||||
'alignItems': 'center'};
|
||||
object.upsellButtonsContainer = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
|
||||
'flexWrap': 'wrap', 'gap': 10, 'marginTop': 12};
|
||||
object.upsellButton = {flex: 1};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileDismissibleUpsells.tsx');
|
||||
exports.default = UserProfileDismissibleUpsells;
|
||||
}
|
||||
|
||||
function UserProfileDismissibleUpsells({navigateToShop, navigateToPremium, hasCustomProfileTheme}) { // fn#80219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10538:914, offset: 0x01e71b89, size: 397 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var value;
|
||||
const env0_3 = useStyles();
|
||||
const value2 = (require(10353) /* metro dependency 10353: UserProfilePrivacyNotice */).useIsPrivacyNoticeVisible();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
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();
|
||||
});
|
||||
const env0_5 = (require(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
|
||||
const binding = env0_3;
|
||||
const env0_6 = binding.useCallback(function() {
|
||||
trackUserProfileAction({action: TrackUserProfileActions.VISIT_SHOP});
|
||||
navigateToShop();
|
||||
}, [navigateToShop, trackUserProfileAction]);
|
||||
const env0_7 = binding.useCallback(function() {
|
||||
trackUserProfileAction({action: TrackUserProfileActions.GET_PREMIUM});
|
||||
navigateToPremium();
|
||||
}, [navigateToPremium, trackUserProfileAction]);
|
||||
const env0_8 = binding.useCallback(function() {
|
||||
trackUserProfileAction({action: TrackUserProfileActions.VIEW_PREMIUM_PERKS});
|
||||
navigateToPremium();
|
||||
}, [navigateToPremium, trackUserProfileAction]);
|
||||
if (value2) {
|
||||
value = importDefault(10353) /* metro dependency 10353: UserProfilePrivacyNotice */;
|
||||
value = ((Component) => <Component />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = ((Component) => <Component contentTypes={[(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.USER_PROFILE_PREMIUM_AND_SHOP_ENTRY_POINTS]}>{children_80224}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function UserProfileDismissibleUpsellsChildren({visibleContent, markAsDismissed}) { // fn#80224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10538:1535, owner: UserProfileDismissibleUpsells.children, offset: 0x01e71d97, size: 964 bytes, params: 2, frame: 36
|
||||
var environment;
|
||||
var r15;
|
||||
var r0;
|
||||
var GradientBorder;
|
||||
var object;
|
||||
var object4;
|
||||
var stylesBinding;
|
||||
var object6;
|
||||
var Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items4;
|
||||
var PressableOpacity;
|
||||
var items2;
|
||||
var object7;
|
||||
var upsellButton;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var object8;
|
||||
var binding;
|
||||
var items3;
|
||||
const value = environment.__proto__;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const USER_PROFILE_PREMIUM_AND_SHOP_ENTRY_POINTS = DismissibleContent.USER_PROFILE_PREMIUM_AND_SHOP_ENTRY_POINTS;
|
||||
if (visibleContent !== USER_PROFILE_PREMIUM_AND_SHOP_ENTRY_POINTS) {
|
||||
r0 = null;
|
||||
} else {
|
||||
GradientBorder = (require(1305) /* metro dependency 1305: native */).GradientBorder;
|
||||
var gradientBorderProps = {borderWidth: 2,
|
||||
direction: (require(1305) /* metro dependency 1305: native */).GradientBorder.Direction.VERTICAL,
|
||||
colors: env1_10, borderRadius: (importDefault(697) /* metro dependency 697: native */).radii.lg};
|
||||
object = {};
|
||||
object4 = {};
|
||||
copyDataProperties(object4, styles.upsellContainer, undefined);
|
||||
copyDataProperties(object4, hasCustomProfileTheme ? styles.customProfileThemeUpsellContainer : {}, undefined);
|
||||
object.style = object4;
|
||||
object6 = {};
|
||||
stylesBinding = styles;
|
||||
object6.style = stylesBinding.header;
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
items4 = [<Text accessibilityRole="header" variant="text-sm/semibold">{Reflect.apply(string, intl,
|
||||
[t.EIYbj6])}</Text>];
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
string = intl.string;
|
||||
items4[1] = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
|
||||
[t['6Xcq+Y']])} onPress={function() {
|
||||
return markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
||||
}}>{((XSmallIcon) => <XSmallIcon size="sm" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>;
|
||||
items2 = [<View {...object6}>{items4}</View>];
|
||||
var viewBinding2Props = {style: stylesBinding.upsellButtonsContainer};
|
||||
object7 = {};
|
||||
upsellButton = stylesBinding.upsellButton;
|
||||
object7.style = upsellButton;
|
||||
object8 = {'text': null, 'onPress': null, 'icon': null, 'iconPosition': 'start', 'variant': 'secondary',
|
||||
'shiny': true};
|
||||
binding = env0_5;
|
||||
string = intl.string;
|
||||
r15 = binding ? Reflect.apply(string, intl, [t['0Q61kF']]) : Reflect.apply(string, intl, [t.x6rkDp]);
|
||||
object8.text = r15;
|
||||
r15 = env0_5 ? env0_8 : env0_7;
|
||||
object8.onPress = r15;
|
||||
object8.icon = ((NitroWheelIcon) => <NitroWheelIcon size="sm" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon);
|
||||
items3 = [<View {...object7}><Button {...object8} /></View>];
|
||||
upsellButton = styles.upsellButton;
|
||||
string = intl.string;
|
||||
items3[1] = <View style={upsellButton}><Button text={Reflect.apply(string, intl,
|
||||
[t.pWG4ze])} onPress={env0_6} icon={((ShopIcon) => <ShopIcon size="sm" />)((require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon)} iconPosition="start" variant="secondary" /></View>;
|
||||
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
|
||||
r0 = <GradientBorder {...gradientBorderProps}><View {...object}>{items2}</View></GradientBorder>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
/* Metro module 13206; source: modules/user_profile/native/UserProfileDisplayNameStylesEditButton.tsx; dependencies: [57, 31, 27, 661, 1376, 33, 4501, 697, 1484, 7013, 1365, 8402, 4635, 8701, 1890, 683, 1244, 13207, 1305, 8411, 8696, 13208, 13209, 2582, 2] */
|
||||
function _fun100766(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:6, offset: 0x021f7789, size: 415 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_4 = value.useCallback;
|
||||
const env0_5 = value.useMemo;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.AnalyticEvents;
|
||||
const env0_8 = value.UserSettingsSections;
|
||||
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'height': 48, 'width': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center', 'paddingBottom': 4};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object4.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object3.ggContainer = object4;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object3.noneIcon = {tintColor: TEXT_SUBTLE};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object3.newBadge = {paddingTop: 0, marginLeft: PX_4};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileDisplayNameStylesEditButton.tsx');
|
||||
exports.default = UserProfileDisplayNameStylesEditButton;
|
||||
}
|
||||
|
||||
function UserProfileDisplayNameStylesEditButton({user, guildId, isTryItOut}) { // fn#100767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:680, offset: 0x021f7928, size: 763 bytes, params: 2, frame: 30
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const env0_3 = styles;
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNativeStackNavigation();
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
let DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE;
|
||||
const value5 = env0_3(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[[DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE], undefined, true]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const {pendingDisplayNameStyles,
|
||||
tryItOutDisplayNameStyles} = (require(8402) /* metro dependency 8402: ProfileCustomizationUtils */).useGuildMemberOrUserPendingDisplayNameStyles(user,
|
||||
guildId);
|
||||
const value7 = (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: user.id,
|
||||
guildId: guildId, pendingDisplayNameStyles: isTryItOut ? tryItOutDisplayNameStyles : pendingDisplayNameStyles});
|
||||
const value8 = (require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */).useDisplayNameStylesEffectConfig(value7?.effectId ?? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID);
|
||||
const value9 = useCallback(_fun100768, [guildId, isTryItOut, value3, property2]);
|
||||
const value10 = useMemo(_fun100769, [value8, value7]);
|
||||
const value11 = useCallback(_fun100770, [value7, guildId, user.id, styles]);
|
||||
const value12 = useCallback(_fun100771, [value7]);
|
||||
const UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton;
|
||||
object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['86GtGH']);
|
||||
DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE;
|
||||
object2.labelTrailing = property !== DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE ? undefined : <View {...{['aria-hidden']: true}}>{((TextBadge) => <TextBadge text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.newBadge} />)((require(1305) /* metro dependency 1305: native */).TextBadge)}</View>;
|
||||
object2.buttonText = value10;
|
||||
object2.accessibilityValue = {text: value10};
|
||||
object2.onPress = value9;
|
||||
object2.leading = value11();
|
||||
object2.trailing = value12();
|
||||
return <UserProfileEditFormButton {...object2} />;
|
||||
}
|
||||
|
||||
function _fun100768() { // fn#100768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1259, offset: 0x021f7c23, size: 114 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const DISPLAY_NAME_STYLES_FROM_SETTINGS = AnalyticEvents.DISPLAY_NAME_STYLES_FROM_SETTINGS;
|
||||
Reflect.apply(track, defaultImport, [DISPLAY_NAME_STYLES_FROM_SETTINGS]);
|
||||
let binding = env0_4;
|
||||
const navigate = binding.navigate;
|
||||
const DISPLAY_NAME_STYLES = UserSettingsSections.DISPLAY_NAME_STYLES;
|
||||
Reflect.apply(navigate, binding, [DISPLAY_NAME_STYLES, {guildId: guildId, isTryItOut: isTryItOut}]);
|
||||
binding = env0_5;
|
||||
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
||||
binding(TAKE_ACTION);
|
||||
}
|
||||
|
||||
function _fun100769() { // fn#100769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1410, offset: 0x021f7c95, size: 187 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var value2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value;
|
||||
if (env0_6 == null) {
|
||||
value = environment.__proto__;
|
||||
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe);
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
r0 = '' + intl.string((importDefault(13207) /* metro dependency 13207: getDisplayNameStylesFontName */)(env0_6.fontId)) + ' + ' + env0_7.name;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun100770() { // fn#100770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1533, offset: 0x021f7d50, size: 211 bytes, params: 1, frame: 18
|
||||
if (env0_6 == null) {
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />;
|
||||
} else {
|
||||
return (
|
||||
<View style={styles.ggContainer}>
|
||||
{((Component) => <Component userId={user.id} guildId={guildId} userName="Gg" pendingDisplayNameStyles={env0_6} variant="heading-xl/semibold" />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100771() { // fn#100771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1760, offset: 0x021f7e23, size: 91 bytes, params: 1, frame: 18
|
||||
var colors;
|
||||
var r0;
|
||||
var value3;
|
||||
var value4;
|
||||
var DisplayNameStylesColorSwatch;
|
||||
const value2 = null;
|
||||
if (value2 == env0_6) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
value4 = undefined;
|
||||
DisplayNameStylesColorSwatch = importDefault(13208) /* metro dependency 13208: DisplayNameStylesColorSwatch */;
|
||||
colors = value2 == env0_6 ? value4 : env0_6.colors;
|
||||
r0 = <DisplayNameStylesColorSwatch colors={value2 != colors ? colors : []} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/* Metro module 13184; source: modules/user_profile/native/UserProfileEditBannerButton.tsx; dependencies: [31, 27, 33, 4501, 697, 6771, 8514, 8743, 5278, 1244, 4573, 9646, 8752, 8507, 2] */
|
||||
function _fun100636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:6, offset: 0x021f1243, size: 375 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {position: 'relative'};
|
||||
const object5 = {'position': 'absolute', 'top': 12, 'right': 12, 'width': 28, 'height': 28, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
let CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object5.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.editButton = object5;
|
||||
const object6 = {'position': 'absolute', 'justifyContent': 'center', 'minHeight': 28, 'top': 12, 'right': 48,
|
||||
'paddingVertical': 4, 'paddingHorizontal': 12, 'borderRadius': null, 'backgroundColor': null, 'zIndex': 1};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object6.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object2.previewButton = object6;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditBannerButton.tsx');
|
||||
exports.default = UserProfileEditBannerButton;
|
||||
}
|
||||
|
||||
function ProfilePreviewButton({userId}) { // fn#100637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:673, offset: 0x021f13ba, size: 352 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const context = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule, []).context;
|
||||
const binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
if (userId == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
r0 = <PressableOpacity style={styles.previewButton} onPress={Reflect.apply(useCallback, binding, [_fun100638,
|
||||
[userId, context,
|
||||
analyticsLocations]])} accessibilityRole="button" accessibilityLabel={intl.string(t['3Qcx6K'])}>{((Text) => <Text variant="text-sm/semibold" color="always-white">{intl.string(t['3Qcx6K'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function EditButton({onPress, accessibilityLabel, disabled}) { // fn#100639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:1219, offset: 0x021f157b, size: 180 bytes, params: 2, frame: 21
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
onPress={onPress}
|
||||
disabled={disabled}
|
||||
style={styles.editButton}
|
||||
>
|
||||
<PencilIcon size="xs" color={WHITE} />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileEditBannerButton({user, displayProfile, pendingBanner, pendingAvatarSrc, pendingThemeColors, pendingAccentColor, bannerSafeArea, showProfilePreviewButton, showEditButton, onPressEdit, editButtonAccessibilityLabel, editDisabled}) { // fn#100640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:1597, offset: 0x021f162f, size: 292 bytes, params: 2, frame: 31
|
||||
showEditButton = showEditButton === undefined || showEditButton;
|
||||
editDisabled = !(editDisabled === undefined) && editDisabled;
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{((Component) => <Component user={user} displayProfile={displayProfile} pendingBanner={pendingBanner} pendingAvatarSrc={pendingAvatarSrc} pendingThemeColors={pendingThemeColors} pendingAccentColor={pendingAccentColor} bannerHeight={(importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)()} bannerSafeArea={bannerSafeArea} />)(importDefault(8507) /* metro dependency 8507: UserProfileBanner */)}
|
||||
{showProfilePreviewButton && <ProfilePreviewButton userId={user.id} />}
|
||||
{showEditButton && <EditButton onPress={onPressEdit} accessibilityLabel={editButtonAccessibilityLabel} disabled={editDisabled} />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100638() { // fn#100638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:824, offset: 0x021f151a, size: 97 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var object2;
|
||||
if (userId != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, context, undefined);
|
||||
object2['userId'] = userId;
|
||||
object2['isPreviewingChanges'] = true;
|
||||
object2['sourceAnalyticsLocations'] = analyticsLocations;
|
||||
defaultImport(object2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
/* Metro module 13181; source: modules/user_profile/native/UserProfileEditForm.tsx; dependencies: [31, 27, 7623, 6816, 661, 670, 13182, 33, 13183, 3802, 6771, 6789, 13184, 4080, 13185, 1962, 7613, 8400, 8402, 1244, 8496, 13195, 6996, 5463, 697, 10302, 13196, 7675, 11463, 8490, 6882, 8403, 8501, 8494, 8497, 13199, 4573, 3868, 8511, 13200, 8513, 8695, 13205, 13206, 13210, 13212, 13213, 13217, 13221, 13226, 13229, 13230, 2] */
|
||||
function _fun100624(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:6, offset: 0x021f0072, size: 317 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.ScrollView;
|
||||
const env0_5 = value.View;
|
||||
const profileCustomizationNavigationStore = importDefault(7623) /* metro dependency 7623: ProfileCustomizationNavigationStore */;
|
||||
const env0_7 = (require(6816) /* metro dependency 6816: Constants */).FLOATING_UPSELL_HEIGHT;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.BIO_MAX_LENGTH;
|
||||
const env0_9 = value.DISPLAY_NAME_MAX_LENGTH;
|
||||
const env0_10 = value.PRONOUNS_MAX_LENGTH;
|
||||
const env0_11 = (require(670) /* metro dependency 670: UserSettingsConstants */).ProfileCustomizationScrollPositions;
|
||||
const env0_12 = (require(13182) /* metro dependency 13182: UserProfileEditConstants */).UserProfileEditAutoFocusElement;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value.jsx;
|
||||
const env0_14 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditForm.tsx');
|
||||
exports.default = UserProfileEditForm;
|
||||
}
|
||||
|
||||
function EditUserProfileBanner({user, displayProfile, pendingAvatarSrc, pendingBanner, pendingAccentColor, pendingThemeColors, tryItOutBanner, isTryItOut, disabled}) { // fn#100625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:379, offset: 0x021f01af, size: 406 bytes, params: 2, frame: 27
|
||||
const r16 = isTryItOut ? tryItOutBanner ?? (importDefault(13183) /* metro dependency 13183 */) : pendingBanner;
|
||||
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(user);
|
||||
const defaultImport3 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const EDIT_BANNER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_BANNER;
|
||||
const analyticsLocations = defaultImport3(EDIT_BANNER).analyticsLocations;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const UserProfileEditBannerButton = importDefault(13184) /* metro dependency 13184: UserProfileEditBannerButton */;
|
||||
const defaultImport4Props = {user: user, displayProfile: displayProfile, pendingBanner: r16,
|
||||
pendingAvatarSrc: pendingAvatarSrc, pendingThemeColors: pendingThemeColors,
|
||||
pendingAccentColor: pendingAccentColor, bannerSafeArea: displayProfile?.banner != null ? undefined : 12,
|
||||
showProfilePreviewButton: canUseCollectibles2, onPressEdit: onPressEdit};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const VqsHy0 = (require(1244) /* metro dependency 1244: indexNative */).t.VqsHy0;
|
||||
defaultImport4Props.editButtonAccessibilityLabel = Reflect.apply(string, intl, [VqsHy0]);
|
||||
defaultImport4Props.editDisabled = disabled;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<UserProfileEditBannerButton {...defaultImport4Props} />
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileEditForm({currentUser, autoFocusElement, isTryItOut}) { // fn#100628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:1410, offset: 0x021f045f, size: 3118 bytes, params: 2, frame: 83
|
||||
var object4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
const value4 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value5 = (importDefault(13195) /* metro dependency 13195: UserProfileEditFormSharedStyles */)();
|
||||
const value6 = (importDefault(6996) /* metro dependency 6996: useKeyboardIsOpen */)();
|
||||
const binding = env0_3;
|
||||
const value8 = binding.useRef(null);
|
||||
const value9 = binding.useRef(null);
|
||||
const value10 = binding.useRef(null);
|
||||
const value11 = binding.useRef(null);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const defaultImport2 = importDefault(10302) /* metro dependency 10302: useSafeAreaAvoidingInputsNative */;
|
||||
object4 = {insets: insets};
|
||||
const items3 = [{ref: value9, offset: {type: 'toRef', ref: value10, extraOffset: PX_16}}];
|
||||
items3[1] = {ref: value10, offset: {type: 'toRef', ref: value11, extraOffset: PX_16}};
|
||||
const object2 = {ref: value11};
|
||||
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
|
||||
object2.offset = {type: 'toValue', value: PX_64};
|
||||
items3[2] = object2;
|
||||
object4.inputs = items3;
|
||||
object4.scrollViewRef = value8;
|
||||
const onFocus = defaultImport2(object4).onFocus;
|
||||
const {errors, isSubmitting, pendingAvatar, pendingAvatarDecoration, pendingBanner, pendingProfileEffect,
|
||||
pendingProfileFrame, pendingNameplate, pendingThemeColors, pendingAccentColor, tryItOutBanner,
|
||||
tryItOutAvatarDecoration, tryItOutProfileEffect, tryItOutThemeColors, tryItOutDisplayNameStyles,
|
||||
pendingGlobalName, pendingPronouns, pendingBio, pendingLegacyUsernameDisabled, pendingPrimaryGuildId,
|
||||
pendingDisplayNameStyles} = (importDefault(13196) /* metro dependency 13196: useUserProfileEditForm */)();
|
||||
(importDefault(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */)();
|
||||
const value13 = (require(11463) /* metro dependency 11463: AutomodQuarantineUtils */).useGuildAutomodProfileQuarantineErrors();
|
||||
const defaultImport3 = importDefault(8490) /* metro dependency 8490: useDisplayProfile */;
|
||||
const id = currentUser.id;
|
||||
const value14 = '';
|
||||
const value15 = defaultImport3(id ?? value14);
|
||||
const value16 = (require(6882) /* metro dependency 6882: userSettingToActivity */).useCustomStatusActivity();
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: currentUser.id,
|
||||
image: pendingAvatar});
|
||||
const value18 = (importDefault(8501) /* metro dependency 8501: useBadges */)(value15, pendingLegacyUsernameDisabled);
|
||||
const canUsePremiumProfileCustomization2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumProfileCustomization(currentUser);
|
||||
const legacyUsername = value15?.getLegacyUsername();
|
||||
let r58 = currentUser.globalName ?? value14;
|
||||
let r54 = value15?.pronouns ?? value14;
|
||||
let r49 = value15?.bio ?? value14;
|
||||
const {theme, primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: currentUser,
|
||||
displayProfile: value15, pendingThemeColors: isTryItOut ? tryItOutThemeColors : pendingThemeColors,
|
||||
isPreview: isTryItOut});
|
||||
const {gradientFallbackBackground, gradientSecondaryBackground, containerBackground,
|
||||
avatarBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
const bottom = insets.bottom;
|
||||
const FLOATING_UPSELL_HEIGHT2 = canUsePremiumProfileCustomization2 || value6 ? 0 : FLOATING_UPSELL_HEIGHT;
|
||||
const value23 = bottom + FLOATING_UPSELL_HEIGHT2;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const value24 = value23 + PX_16;
|
||||
object4 = {backgroundColor: avatarBackground};
|
||||
let r61 = errors == null || errors.username == null ? undefined : errors.username[0];
|
||||
r61 = r61 ?? errors.global_name?.[0];
|
||||
r61 = r61 ?? (value13 == null || value13.nick == null ? undefined : value13.nick[0]);
|
||||
const r57 = errors.pronouns?.[0];
|
||||
const r51 = errors.bio?.[0];
|
||||
const Object = global.Object;
|
||||
const r64 = Object.keys(errors).length > 0 && r51 == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['84MExs']) : null;
|
||||
const env0_0 = (importDefault(13199) /* metro dependency 13199: useScrollToUserProfileEditFormSection */)(value8,
|
||||
ProfileCustomizationNavigationStore.useField('scrollPosition'));
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const items2 = [value5.container];
|
||||
items2[1] = {backgroundColor: gradientSecondaryBackground};
|
||||
const view = <View style={value5.bounceOffset} />;
|
||||
const UserProfileGradientContainer = importDefault(8511) /* metro dependency 8511: UserProfileGradientContainer */;
|
||||
const object3 = {backgroundColor: gradientSecondaryBackground};
|
||||
const editUserProfileBanner = <EditUserProfileBanner user={currentUser} displayProfile={value15} pendingAvatarSrc={pendingAvatarSrc} pendingBanner={pendingBanner} pendingAccentColor={pendingAccentColor} pendingThemeColors={pendingThemeColors} tryItOutBanner={tryItOutBanner} isTryItOut={isTryItOut} disabled={isSubmitting} />;
|
||||
const items5 = [value4.avatarBackground];
|
||||
items5[1] = value4.avatarPosition;
|
||||
items5[2] = value5.avatarContainer;
|
||||
items5[3] = object4;
|
||||
const EditUserProfileAvatar = importDefault(13200) /* metro dependency 13200: EditUserProfileAvatar */;
|
||||
const AVATAR = UserProfileEditAutoFocusElement.AVATAR;
|
||||
const view2 = <View style={items5}><EditUserProfileAvatar user={currentUser} disabled={isSubmitting} disableStatus={isTryItOut != null} statusStyle={object4} isTryItOut={isTryItOut} autoStartEditFlow={autoFocusElement === AVATAR} /></View>;
|
||||
const defaultImport8 = UserProfileGradientContainer;
|
||||
const items6 = [value4.profileContentWrapper];
|
||||
items6[1] = value4.profileContent;
|
||||
items6[2] = {paddingTop: 0, paddingBottom: value24};
|
||||
const items7 = [((Component) => <Component customStatusActivity={value16} hasCustomProfileTheme={primaryColor != null} style={value4.customStatusBubble} emojiOnlyStyle={value4.emojiOnlyCustomStatusBubble} editEnabled />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */)];
|
||||
items7[1] = ((Component) => <Component user={currentUser} displayName={pendingGlobalName} badges={value18} pronouns={pendingPronouns ?? r54} badgeContainerBackground={containerBackground} displayNameAccessibilityRole="header" pendingDisplayNameStyles={isTryItOut ? tryItOutDisplayNameStyles : pendingDisplayNameStyles} />)(importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */);
|
||||
const items8 = [value5.formContainer];
|
||||
items8[1] = {backgroundColor: containerBackground};
|
||||
const items9 = [r64 != null ? value14 === r64 ? null : <View style={value5.errorContainer}>{((Text) => <Text variant="text-sm/bold" color="text-feedback-critical">{r64}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : null];
|
||||
const UserProfileEditFormTextField = importDefault(13205) /* metro dependency 13205: UserProfileEditFormTextField */;
|
||||
const userProfileEditFormTextFieldProps = {inputRef: value9,
|
||||
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9AjdkD']), errorMessage: r61};
|
||||
r58 = pendingGlobalName ?? r58;
|
||||
userProfileEditFormTextFieldProps.value = r58;
|
||||
userProfileEditFormTextFieldProps.onFocus = onFocus;
|
||||
userProfileEditFormTextFieldProps.onChange = onChange_100629;
|
||||
userProfileEditFormTextFieldProps.placeholder = currentUser.toString();
|
||||
userProfileEditFormTextFieldProps.maxLength = DISPLAY_NAME_MAX_LENGTH;
|
||||
userProfileEditFormTextFieldProps.isDisabled = isSubmitting;
|
||||
items9[1] = <UserProfileEditFormTextField {...userProfileEditFormTextFieldProps} />;
|
||||
items9[2] = (canUsePremiumProfileCustomization2 || isTryItOut) && ((Component) => <Component user={currentUser} isTryItOut={isTryItOut} />)(importDefault(13206) /* metro dependency 13206: UserProfileDisplayNameStylesEditButton */);
|
||||
const defaultImport13 = UserProfileEditFormTextField;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
r54 = pendingPronouns ?? r54;
|
||||
items9[3] = ((Component) => <Component inputRef={value10} label={Reflect.apply(string, intl,
|
||||
[t['+T3RI/']])} errorMessage={r57} value={r54} onFocus={onFocus} onChange={onChange_100630} maxLength={PRONOUNS_MAX_LENGTH} isDisabled={isSubmitting} />)(defaultImport13);
|
||||
const defaultImport14 = UserProfileEditFormTextField;
|
||||
string = intl.string;
|
||||
const ZzAR2Y = (require(1244) /* metro dependency 1244: indexNative */).t.ZzAR2Y;
|
||||
r49 = pendingBio ?? r49;
|
||||
const BIO = UserProfileEditAutoFocusElement.BIO;
|
||||
items9[4] = ((Component) => <Component inputRef={value11} label={Reflect.apply(string, intl,
|
||||
[ZzAR2Y])} errorMessage={r51} value={r49} onFocus={onFocus} onChange={onChange_100631} autoFocus={autoFocusElement === BIO} maxLength={BIO_MAX_LENGTH} numberOfLines={5} isDisabled={isSubmitting} />)(defaultImport14);
|
||||
items9[5] = ((Component) => <Component user={currentUser} onProfileThemeColorsChanged={isTryItOut ? (require(7613) /* metro dependency 7613: UserProfileActionCreators */).setTryItOutThemeColors : _fun100632} pendingAvatarSrc={pendingAvatarSrc} pendingThemeColors={isTryItOut ? tryItOutThemeColors : pendingThemeColors} isTryItOut={isTryItOut} />)(importDefault(13210) /* metro dependency 13210: UserProfileEditTheme */);
|
||||
items9[6] = ((Component) => <Component user={currentUser} pendingAvatarDecoration={isTryItOut ? tryItOutAvatarDecoration : pendingAvatarDecoration} isTryItOut={isTryItOut} />)(importDefault(13212) /* metro dependency 13212: UserProfileAvatarDecorationEditButton */);
|
||||
items9[7] = ((Component) => <Component user={currentUser} pendingProfileEffect={isTryItOut ? tryItOutProfileEffect : pendingProfileEffect} displayProfile={value15} isTryItOut={isTryItOut} />)(importDefault(13213) /* metro dependency 13213: UserProfileEffectEditButton */);
|
||||
items9[8] = ((Component) => <Component user={currentUser} pendingProfileFrame={pendingProfileFrame} displayProfile={value15} />)(importDefault(13217) /* metro dependency 13217: UserProfileFrameEditButton */);
|
||||
items9[9] = ((Component) => <Component user={currentUser} pendingNameplate={pendingNameplate} />)(importDefault(13221) /* metro dependency 13221: UserProfileNameplateEditButton */);
|
||||
items9[10] = <View ref={ref_100633}>{((Component) => <Component user={currentUser} disabled={isSubmitting} tagStyle={{backgroundColor: containerBackground}} pendingPrimaryGuildId={pendingPrimaryGuildId} />)(importDefault(13226) /* metro dependency 13226: UserProfilePrimaryGuildEditButton */)}</View>;
|
||||
items9[11] = legacyUsername != null && ((Component) => <Component legacyUsername={legacyUsername} pendingLegacyUsernameDisabled={pendingLegacyUsernameDisabled} />)(importDefault(13229) /* metro dependency 13229: UserProfileLegacyUsernameSwitch */);
|
||||
items7[2] = <View style={items8}>{items9}</View>;
|
||||
return (
|
||||
<ThemeContextProvider
|
||||
theme={theme}
|
||||
primaryColor={primaryColor}
|
||||
secondaryColor={secondaryColor}
|
||||
>
|
||||
<View style={items2}>
|
||||
<ScrollView ref={value8}>
|
||||
{view}
|
||||
<UserProfileGradientContainer
|
||||
fallbackBackground={gradientFallbackBackground}
|
||||
primaryColor={primaryColor}
|
||||
secondaryColor={secondaryColor}
|
||||
containerStyle={object3}
|
||||
>
|
||||
{editUserProfileBanner}
|
||||
<View>
|
||||
{view2}
|
||||
{((Component) => <Component fallbackBackground={gradientFallbackBackground} primaryColor={primaryColor} secondaryColor={secondaryColor} containerStyle={items6}>{items7}</Component>)(defaultImport8)}
|
||||
</View>
|
||||
</UserProfileGradientContainer>
|
||||
</ScrollView>
|
||||
{!canUsePremiumProfileCustomization2 && !value6 && ((UserProfilePremiumUpsellCard) => <UserProfilePremiumUpsellCard isTryItOut={isTryItOut} />)((require(13230) /* metro dependency 13230: UserProfilePremiumUpsellCard */).UserProfilePremiumUpsellCard)}
|
||||
</View>
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function EditUserProfileBannerOnPressEdit() { // fn#100626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:938, owner: EditUserProfileBanner.onPressEdit, offset: 0x021f0345, size: 226 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(dependencyMap[13]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[15])(dependencyMap[14], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.user = user;
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
object2.onBannerChange = isTryItOut ? require(dependencyMap[16]).setTryItOutBanner : _fun100627;
|
||||
value = require(dependencyMap[18]);
|
||||
object2.showRemoveBanner = value.showRemoveBanner(env0_3, displayProfile == null ? value2 : displayProfile.banner);
|
||||
object2.isTryItOut = isTryItOut;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, 'Change Banner', object2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function UserProfileEditFormOnChange(a0) { // fn#100629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:5105, owner: UserProfileEditForm.onChange, offset: 0x021f108d, size: 48 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({globalName: a0});
|
||||
}
|
||||
|
||||
function UserProfileEditFormOnChange_100630(a0) { // fn#100630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:5376, owner: UserProfileEditForm.onChange, offset: 0x021f10bd, size: 48 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({pronouns: a0});
|
||||
}
|
||||
|
||||
function UserProfileEditFormOnChange_100631(a0) { // fn#100631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:5572, owner: UserProfileEditForm.onChange, offset: 0x021f10ed, size: 48 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({bio: a0});
|
||||
}
|
||||
|
||||
function _fun100632(a0) { // fn#100632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:5756, offset: 0x021f111d, size: 48 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({themeColors: a0});
|
||||
}
|
||||
|
||||
function UserProfileEditFormRef(a0) { // fn#100633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:6123, owner: UserProfileEditForm.ref, offset: 0x021f114d, size: 42 bytes, params: 2, frame: 3
|
||||
var value;
|
||||
var current;
|
||||
if (a0 != null) {
|
||||
current = env0_0.current;
|
||||
value = environment.__proto__;
|
||||
current[ProfileCustomizationScrollPositions.GUILD_TAG] = a0;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100627(a0, a1) { // fn#100627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13371:1074, offset: 0x021f0427, size: 56 bytes, params: 3, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({banner: a0,
|
||||
bannerOriginalMd5: a1});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* Metro module 13209; source: modules/user_profile/native/UserProfileEditFormControls.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4573, 7682, 5278, 1244, 6243, 477, 6809, 2] */
|
||||
function _fun100777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13399:6, offset: 0x021f830e, size: 367 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Pressable;
|
||||
const env0_5 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'flexGrow': 1, 'flexShrink': 1, 'flexDirection': 'row', 'alignItems': 'center', 'gap': 12,
|
||||
'padding': 12, 'borderColor': null, 'borderWidth': 1};
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object.borderColor = BORDER_STRONG;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{button: object, buttonTextContainer: {'flexGrow': 1,
|
||||
'flexShrink': 1, 'flexDirection': 'column'}, formControlText: {'marginRight': 'auto', 'flexShrink': 1}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditFormControls.tsx');
|
||||
exports.UserProfileEditFormButton = UserProfileEditFormButton;
|
||||
exports.UserProfileEditFormSwitch = UserProfileEditFormSwitch;
|
||||
}
|
||||
|
||||
function FormControlText({text}) { // fn#100778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13399:497, offset: 0x021f847d, size: 86 bytes, params: 2, frame: 16
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color="text-default"
|
||||
style={styles.formControlText}
|
||||
>
|
||||
{text}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function FormControlSubtext({text}) { // fn#100779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13399:648, offset: 0x021f84d3, size: 91 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
if (text == null) {
|
||||
return null;
|
||||
} else {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-xs/medium"
|
||||
color="text-muted"
|
||||
style={styles.formControlText}
|
||||
>
|
||||
{text}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function UserProfileEditFormButton({label, labelTrailing, buttonText, buttonSubtext, onPress, leading, trailing, accessibilityValue, disabled, loading, hideArrow}) { // fn#100780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13399:935, offset: 0x021f852e, size: 433 bytes, params: 2, frame: 30
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
loading = !(loading === undefined) && loading;
|
||||
hideArrow = !(hideArrow === undefined) && hideArrow;
|
||||
const styles = useStyles();
|
||||
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
const pressableHighlightProps = {onPress: onPress, style: styles.button, accessibilityRole: 'button',
|
||||
accessibilityLabel: label, accessibilityValue: accessibilityValue};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
pressableHighlightProps.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4lAcxv']);
|
||||
pressableHighlightProps.accessibilityState = {disabled: disabled, busy: loading};
|
||||
pressableHighlightProps.disabled = disabled;
|
||||
const items2 = [leading];
|
||||
items2[1] = <View style={styles.buttonTextContainer}><FormControlText text={buttonText} /><FormControlSubtext text={buttonSubtext} /></View>;
|
||||
items2[2] = trailing;
|
||||
items2[3] = !hideArrow && ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
|
||||
return (
|
||||
<Input label={label} labelTrailing={labelTrailing}>
|
||||
<PressableHighlight {...pressableHighlightProps}>
|
||||
{items2}
|
||||
</PressableHighlight>
|
||||
</Input>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileEditFormSwitch({label, subLabel, value, onValueChange, accessibilityLabel, accessibilityHint, disabled}) { // fn#100781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13399:1606, offset: 0x021f86df, size: 453 bytes, params: 2, frame: 28
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
var env0_2Binding = undefined;
|
||||
const styles = useStyles();
|
||||
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
const binding = env0_3;
|
||||
var [property, env0_2] = env0_2Binding(binding.useState(value), 2);
|
||||
const closure = function() {
|
||||
return onValueChange?.(!value);
|
||||
};
|
||||
binding.useEffect(_fun100783, [value]);
|
||||
const r6 = isAndroid2 ? (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight : Pressable;
|
||||
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
|
||||
const r6Props = {onPress: isAndroid2 ? closure : undefined, onAccessibilityTap: onAccessibilityTap,
|
||||
style: styles.button, accessibilityRole: 'switch', accessibilityLabel: accessibilityLabel ?? subLabel,
|
||||
accessibilityHint: accessibilityHint, accessibilityState: {disabled: disabled, checked: property},
|
||||
disabled: disabled};
|
||||
const formControlText = <FormControlText text={subLabel} />;
|
||||
const FormSwitch = (require(6809) /* metro dependency 6809: FormSwitchNative */).FormSwitch;
|
||||
return (
|
||||
<Input label={label}>
|
||||
{((Component) => <Component {...r6Props}>{formControlText}<FormSwitch {...{['aria-hidden']: true}} value={value} onValueChange={closure} disabled={disabled} /></Component>)(r6)}
|
||||
</Input>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileEditFormSwitchOnAccessibilityTap() { // fn#100784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13399:2016, owner: UserProfileEditFormSwitch.onAccessibilityTap, offset: 0x021f88a4, size: 45 bytes, params: 1, frame: 11
|
||||
env0_2(!value);
|
||||
global.setTimeout(function() {
|
||||
if (onValueChange != null) {
|
||||
onValueChange(!value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 13195; source: modules/user_profile/native/UserProfileEditFormSharedStyles.tsx; dependencies: [6816, 4501, 697, 2] */
|
||||
function _fun100707(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13385:6, offset: 0x021f4c70, size: 333 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(6816) /* metro dependency 6816: Constants */;
|
||||
const ARBITRARY_LARGE_OFFSET = value.ARBITRARY_LARGE_OFFSET;
|
||||
const FLOATING_UPSELL_HEIGHT = value.FLOATING_UPSELL_HEIGHT;
|
||||
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flex: 1};
|
||||
const object4 = {'position': 'absolute', 'top': null, 'height': null, 'right': 0, 'left': 0};
|
||||
object4.top = -ARBITRARY_LARGE_OFFSET;
|
||||
object4.height = ARBITRARY_LARGE_OFFSET;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object2.bounceOffset = object4;
|
||||
object2.avatarContainer = {zIndex: 1};
|
||||
const object6 = {'marginTop': 16, 'padding': 16, 'borderRadius': null, 'rowGap': 20};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.formContainer = object6;
|
||||
object2.errorContainer = {'flex': 1, 'flexDirection': 'row', 'justifyContent': 'center'};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.floatingUpsell = {'position': 'absolute', 'marginBottom': null, 'left': 0, 'right': 0, marginBottom: PX_4,
|
||||
maxHeight: FLOATING_UPSELL_HEIGHT - 12};
|
||||
value = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditFormSharedStyles.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Metro module 13205; source: modules/user_profile/native/UserProfileEditFormTextField.tsx; dependencies: [31, 33, 7681, 7981, 2] */
|
||||
function _fun100764(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13395:6, offset: 0x021f7600, size: 131 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditFormTextField.tsx');
|
||||
exports.default = UserProfileEditFormTextField;
|
||||
}
|
||||
|
||||
function UserProfileEditFormTextField(a0) { // fn#100765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13395:222, offset: 0x021f7683, size: 262 bytes, params: 2, frame: 21
|
||||
const label = a0.label;
|
||||
const description = a0.description;
|
||||
const errorMessage = a0.errorMessage;
|
||||
const containerStyle = a0.containerStyle;
|
||||
let numberOfLines = a0.numberOfLines;
|
||||
const value = undefined;
|
||||
numberOfLines = numberOfLines === value ? 1 : numberOfLines;
|
||||
const inputRef = a0.inputRef;
|
||||
const object3 = {'label': 0, 'description': 0, 'errorMessage': 0, 'containerStyle': 0, 'numberOfLines': 0,
|
||||
'inputRef': 0};
|
||||
silentSetPrototypeOf(object3, null, undefined);
|
||||
const value3 = copyDataProperties({}, a0, object3, a0);
|
||||
const object4 = {label: label, description: description, errorMessage: errorMessage, containerStyle: containerStyle};
|
||||
object4.status = errorMessage != null ? 'error' : value;
|
||||
copyDataProperties(object4, value3, object3);
|
||||
if (numberOfLines > 1) {
|
||||
const TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
|
||||
return <TextArea ref={inputRef} {...object4} />;
|
||||
} else {
|
||||
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
|
||||
return (
|
||||
<TextInput
|
||||
ref={inputRef}
|
||||
{...object4}
|
||||
{...{['isClearable']: true}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* Metro module 10336; source: modules/user_profile/native/UserProfileEditNote.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 1484, 10328, 5282, 8690, 4015, 9603, 1244, 10337, 4573, 7681, 2] */
|
||||
function _fun80109(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:6, offset: 0x01e6cc66, size: 258 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).ScrollView;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).NOTE_MAX_LENGTH;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({contentContainer: {'paddingVertical': 24,
|
||||
'paddingHorizontal': 16, 'gap': 8}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditNote.tsx');
|
||||
exports.default = UserProfileEditNote;
|
||||
}
|
||||
|
||||
function UserProfileEditNote({userId, onSave, onClose}) { // fn#80110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:377, offset: 0x01e6cd68, size: 586 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_3 = value2;
|
||||
const {loading, note} = (importDefault(10328) /* metro dependency 10328: useNote */)(userId);
|
||||
const env0_4 = note;
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const value6 = env0_3(Reflect.apply(useState, binding, [note ?? '']), 2);
|
||||
const property = value6[0];
|
||||
const property2 = value6[1];
|
||||
env0_4.useLayoutEffect(_fun80111, [value2, userId, note, property, onSave, onClose]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const text = <Text variant="text-sm/semibold">{Reflect.apply(string, intl, [t['mQKv+v']])}</Text>;
|
||||
const TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
|
||||
string = intl.string;
|
||||
return (
|
||||
<ScrollView contentContainerStyle={styles.contentContainer} keyboardShouldPersistTaps="always">
|
||||
{text}
|
||||
<TextArea
|
||||
value={property}
|
||||
onChange={property2}
|
||||
maxLength={NOTE_MAX_LENGTH}
|
||||
autoFocus
|
||||
autoCorrect={false}
|
||||
autoCapitalize="none"
|
||||
placeholder={loading ? Reflect.apply(string, intl, [t['WLKx/9']]) : Reflect.apply(string, intl,
|
||||
[t.tRZR6T])}
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['mQKv+v'])}
|
||||
/>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80111() { // fn#80111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:583, offset: 0x01e6cfb2, size: 84 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
const binding = env0_3;
|
||||
const setOptions = binding.setOptions;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderConditionalBackButton(function() {
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun80113);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
});
|
||||
object2.headerRight = headerRight_80116;
|
||||
Reflect.apply(setOptions, binding, [object2]);
|
||||
}
|
||||
|
||||
function _fun80112() { // fn#80112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:653, offset: 0x01e6d006, size: 39 bytes, params: 1, frame: 11
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun80113);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function headerRight_80116(a0) { // fn#80116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:834, offset: 0x01e6d100, size: 170 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
|
||||
const headerTextButtonProps = {...a0};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
headerTextButtonProps['label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
|
||||
value = environment.__proto__;
|
||||
headerTextButtonProps['disabled'] = (note ?? '') === env1_5;
|
||||
headerTextButtonProps['onPress'] = headerRight_80116OnPress;
|
||||
return <HeaderTextButton {...headerTextButtonProps} />;
|
||||
}
|
||||
|
||||
function _fun80113(a0) { // fn#80113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:670, offset: 0x01e6d02d, size: 135 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
const defaultImport = importDefault(8690) /* metro dependency 8690: maybeShowDiscardChangesAlert */;
|
||||
const object2 = {};
|
||||
object2.hasEdits = (note ?? '') !== env2_5;
|
||||
object2.onHasEdits = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
|
||||
object2.resetPending = resetPending;
|
||||
object2.onConfirm = onConfirm_80115;
|
||||
defaultImport(object2);
|
||||
}
|
||||
|
||||
function headerRight_80116OnPress() { // fn#80117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:956, owner: headerRight_80116.onPress, offset: 0x01e6d1aa, size: 84 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(10337) /* metro dependency 10337: NoteActionCreators */;
|
||||
value.updateNote(userId, env2_5);
|
||||
if (onSave != null) {
|
||||
onSave();
|
||||
}
|
||||
if (onClose != null) {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
function resetPending() { // fn#80114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:760, offset: 0x01e6d0b4, size: 37 bytes, params: 1, frame: 12
|
||||
return env3_6(note ?? '');
|
||||
}
|
||||
|
||||
function onConfirm_80115() { // fn#80115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10522:790, offset: 0x01e6d0d9, size: 39 bytes, params: 1, frame: 12
|
||||
env0_0(true);
|
||||
if (onClose != null) {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 10335; source: modules/user_profile/native/UserProfileEditNoteModal.tsx; dependencies: [31, 33, 5080, 5176, 5280, 478, 1244, 4573, 5282, 10336, 2] */
|
||||
function _fun80104(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10521:6, offset: 0x01e6c988, size: 138 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditNoteModal.tsx');
|
||||
exports.default = UserProfileEditNoteModal;
|
||||
}
|
||||
|
||||
function UserProfileEditNoteModal({userId, onSave, onBack}) { // fn#80105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10521:219, offset: 0x01e6ca12, size: 358 bytes, params: 2, frame: 22
|
||||
var r4;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const closure = UserProfileEditNoteModalHandleClose;
|
||||
const value3 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('UserProfileEditNoteModal');
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
const object2 = {initialRouteName: 'root'};
|
||||
if (value3) {
|
||||
moduleValue2 = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
r4 = moduleValue2.isAndroid() ? undefined : 12;
|
||||
} else {
|
||||
r4 = undefined;
|
||||
}
|
||||
object2.headerStatusBarHeight = r4;
|
||||
if (value3) {
|
||||
moduleValue3 = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
r4 = moduleValue3.isAndroid() ? undefined : {height: 56};
|
||||
} else {
|
||||
r4 = undefined;
|
||||
}
|
||||
object2.headerStyle = r4;
|
||||
const object3 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object3.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sHHsOM);
|
||||
object3.headerTitle = headerTitle_80107;
|
||||
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closure);
|
||||
object3.render = render_80108;
|
||||
object2.screens = {root: object3};
|
||||
return <Navigator {...object2} />;
|
||||
}
|
||||
|
||||
function UserProfileEditNoteModalHandleClose() { // fn#80106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10521:299, owner: UserProfileEditNoteModal.handleClose, offset: 0x01e6cb78, size: 58 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
if (onBack != null) {
|
||||
onBack();
|
||||
}
|
||||
}
|
||||
|
||||
function UserProfileEditNoteModalHeaderTitle() { // fn#80107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10521:621, owner: UserProfileEditNoteModal.headerTitle, offset: 0x01e6cbb2, size: 107 bytes, params: 1, frame: 18
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Text variant="redesign/heading-18/bold" accessibilityRole="header">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sHHsOM)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileEditNoteModalRender() { // fn#80108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10521:812, owner: UserProfileEditNoteModal.render, offset: 0x01e6cc1d, size: 73 bytes, params: 1, frame: 15
|
||||
return ((Component) => <Component userId={userId} onSave={onSave} onClose={UserProfileEditNoteModalHandleClose} />)((require(10336) /* metro dependency 10336: UserProfileEditNote */).default);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
/* Metro module 13210; source: modules/user_profile/native/UserProfileEditTheme.tsx; dependencies: [31, 27, 33, 4501, 697, 673, 6813, 5278, 1244, 9646, 4573, 8490, 8494, 8372, 5062, 3968, 1365, 13189, 4080, 13211, 1962, 8638, 2] */
|
||||
function _fun100786(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:6, offset: 0x021f88d1, size: 422 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {gap: 6};
|
||||
object2.sectionHeader = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
|
||||
'alignItems': 'center'};
|
||||
object2.themeColorContainer = {'flexDirection': 'row', 'gap': 12, 'justifyContent': 'center'};
|
||||
object2.colorSwatchContainer = {'position': 'relative', 'flex': 1, 'flexDirection': 'column',
|
||||
'alignItems': 'center', 'gap': 4};
|
||||
const object4 = {'height': 50, 'width': '100%'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.colorSwatch = object4;
|
||||
object2.dropperIcon = {'position': 'absolute', 'top': 10, 'right': 10};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object2.overflowMenu = {tintColor: TEXT_SUBTLE};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object2]);
|
||||
const env0_7 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
const env0_8 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_530;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditTheme.tsx');
|
||||
exports.default = UserProfileEditTheme;
|
||||
}
|
||||
|
||||
function ColorSwatch({color, label, accessibilityLabel, onPress, style}) { // fn#100787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:705, offset: 0x021f8a77, size: 403 bytes, params: 2, frame: 30
|
||||
const styles = useStyles();
|
||||
const value2 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
|
||||
const higherContrastColor = (require(6813) /* metro dependency 6813: getHigherContrastColor */).getHigherContrastColor({backgroundColor: value2,
|
||||
colors: [WHITE, PRIMARY_530]});
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const Qp04hK = (require(1244) /* metro dependency 1244: indexNative */).t.Qp04hK;
|
||||
const items2 = [styles.colorSwatch];
|
||||
items2[1] = {backgroundColor: value2};
|
||||
items2[2] = style;
|
||||
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
|
||||
const pressableOpacity = <PressableOpacity accessibilityRole="button" accessibilityLabel={accessibilityLabel} accessibilityHint={Reflect.apply(string,
|
||||
intl,
|
||||
[Qp04hK])} style={items2} onPress={onPress} key={color}><PencilIcon size="xs" color={higherContrastColor} style={styles.dropperIcon} /></PressableOpacity>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.colorSwatchContainer}>
|
||||
{pressableOpacity}
|
||||
<Text
|
||||
variant="text-sm/normal"
|
||||
color="text-default"
|
||||
accessibilityElementsHidden
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
>
|
||||
{label}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileEditTheme({user, onProfileThemeColorsChanged, pendingThemeColors, guildId, pendingAvatarSrc, showResetMenu, isTryItOut}) { // fn#100788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:1449, offset: 0x021f8c0a, size: 1033 bytes, params: 2, frame: 37
|
||||
showResetMenu = !(showResetMenu === undefined) && showResetMenu;
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
const styles = useStyles();
|
||||
const {primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
|
||||
displayProfile: (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, guildId),
|
||||
pendingThemeColors: pendingThemeColors, isPreview: isTryItOut});
|
||||
const r6 = pendingAvatarSrc ?? user.getAvatarURL(guildId, 80);
|
||||
const useAvatarColorModule = require(8372) /* metro dependency 8372: useAvatarColor */;
|
||||
const useAvatarColors = useAvatarColorModule.useAvatarColors;
|
||||
const PRIMARY_530 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_530;
|
||||
const env0_4 = Reflect.apply(useAvatarColors, useAvatarColorModule, [r6, PRIMARY_530, false]);
|
||||
if (primaryColor == null) {
|
||||
return null;
|
||||
}
|
||||
if (secondaryColor == null) {
|
||||
return null;
|
||||
}
|
||||
const closure = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
return _fun100791;
|
||||
};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const DMeO2X = (require(1244) /* metro dependency 1244: indexNative */).t.DMeO2X;
|
||||
const view = <View style={styles.sectionHeader}><Text variant="text-sm/semibold" color="text-subtle">{Reflect.apply(string,
|
||||
intl,
|
||||
[DMeO2X])}</Text>{showResetMenu && ((PressableOpacity) => <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+1H47t'])} onPress={onPress_100792}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={styles.overflowMenu.tintColor} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
const object = {onPress: closure(primaryColor, function(a0) {
|
||||
if (a0 !== primaryColor) {
|
||||
handleProfileThemeColorsChanged([a0, secondaryColor]);
|
||||
}
|
||||
}), color: primaryColor};
|
||||
string = intl.string;
|
||||
const C3KTQk = (require(1244) /* metro dependency 1244: indexNative */).t.C3KTQk;
|
||||
object.label = Reflect.apply(string, intl, [C3KTQk]);
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
const v4X2kc = (require(1244) /* metro dependency 1244: indexNative */).t.v4X2kc;
|
||||
const object2 = {};
|
||||
object2.colorHex = (require(673) /* metro dependency 673: ColorUtils */).int2hex(primaryColor);
|
||||
object.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [v4X2kc, object2]);
|
||||
const colorSwatch = <ColorSwatch {...object} />;
|
||||
const colorSwatchProps = {color: secondaryColor, onPress: closure(secondaryColor, function(a0) {
|
||||
if (a0 !== secondaryColor) {
|
||||
handleProfileThemeColorsChanged([primaryColor, a0]);
|
||||
}
|
||||
}), label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8elvy6'])};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
const I0tmru = (require(1244) /* metro dependency 1244: indexNative */).t.I0tmru;
|
||||
const object3 = {};
|
||||
object3.colorHex = (require(673) /* metro dependency 673: ColorUtils */).int2hex(secondaryColor);
|
||||
colorSwatchProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [I0tmru, object3]);
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{view}
|
||||
<View style={styles.themeColorContainer}>
|
||||
{colorSwatch}
|
||||
<ColorSwatch {...colorSwatchProps} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function handleProfileThemeColorsChanged(a0) { // fn#100789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:1911, owner: UserProfileEditTheme.handleProfileThemeColorsChanged, offset: 0x021f9013, size: 81 bytes, params: 2, frame: 15
|
||||
const value = a0;
|
||||
const value3 = undefined;
|
||||
onProfileThemeColorsChanged((importDefault(5062) /* metro dependency 5062 */)(value,
|
||||
env0_1 == null ? value3 : env0_1.themeColors) ? value3 : value);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function makeOnPress(a0, a1) { // fn#100790, owner: UserProfileEditTheme.makeOnPress, offset: 0x021f9064, size: 25 bytes, params: 3, frame: 2
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return _fun100791;
|
||||
}
|
||||
|
||||
function UserProfileEditThemeOnPress() { // fn#100792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:2480, owner: UserProfileEditTheme.onPress, offset: 0x021f90f2, size: 96 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[18]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[19], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'Profile Theme', {onResetTheme: function() {
|
||||
return handleProfileThemeColorsChanged([null, null]);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun100791() { // fn#100791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:1996, offset: 0x021f907d, size: 117 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__.__proto__;
|
||||
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
|
||||
const UNSAFE_markDismissibleContentAsDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_markDismissibleContentAsDismissed;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const PROFILE_THEMES_SETTINGS_VIEWED_V2 = DismissibleContent.PROFILE_THEMES_SETTINGS_VIEWED_V2;
|
||||
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, dismissibleContentUnsafeUtilsModule,
|
||||
[PROFILE_THEMES_SETTINGS_VIEWED_V2]);
|
||||
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: env0_0,
|
||||
onSelect: require, suggestedColors: env1_4});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* Metro module 13213; source: modules/user_profile/native/UserProfileEffectEditButton.tsx; dependencies: [31, 27, 6816, 8471, 482, 33, 4501, 697, 8402, 8461, 4080, 13214, 1962, 1244, 13209, 5461, 5475, 10117, 8474, 1305, 8411, 2] */
|
||||
function _fun100803(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13403:6, offset: 0x021f9a5b, size: 387 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const COLLECTIBLES_PREVIEW_SIZE = (require(6816) /* metro dependency 6816: Constants */).COLLECTIBLES_PREVIEW_SIZE;
|
||||
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
|
||||
const env0_5 = (require(482) /* metro dependency 482: Constants */).NOOP;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {height: COLLECTIBLES_PREVIEW_SIZE, width: COLLECTIBLES_PREVIEW_SIZE};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object4.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object4.overflow = 'hidden';
|
||||
object3.profileEffectPreviewContainer = object4;
|
||||
object3.sampleProfile = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object3.noneIcon = {tintColor: TEXT_SUBTLE};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEffectEditButton.tsx');
|
||||
exports.default = UserProfileEffectEditButton;
|
||||
}
|
||||
|
||||
function UserProfileEffectEditButton({displayProfile, user, pendingProfileEffect, guildId, isTryItOut}) { // fn#100804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13403:607, offset: 0x021f9bde, size: 1025 bytes, params: 2, frame: 27
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const styles = useStyles();
|
||||
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
|
||||
const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
|
||||
let object2 = {pendingValue: pendingProfileEffect};
|
||||
object2.userValue = displayProfile == null || displayProfile._userProfile == null ? undefined : displayProfile._userProfile.profileEffect;
|
||||
object2.guildValue = displayProfile == null || displayProfile._guildMemberProfile == null ? undefined : displayProfile._guildMemberProfile.profileEffect;
|
||||
object2.guildId = guildId;
|
||||
const value3 = Reflect.apply(getProfilePreviewValue, profileCustomizationUtilsModule, [object2]);
|
||||
const {product,
|
||||
isFetching} = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(value3?.skuId);
|
||||
const moduleValue3 = profileCustomizationUtilsModule;
|
||||
const useUserProfileEffect = moduleValue3.useUserProfileEffect;
|
||||
const r1 = pendingProfileEffect === undefined ? Reflect.apply(useUserProfileEffect, moduleValue3, [{user: user,
|
||||
guildId: guildId}]) : pendingProfileEffect;
|
||||
const value6 = r1.useCallback(_fun100805, [r1, guildId, user, isTryItOut]);
|
||||
const r10 = product?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe);
|
||||
const r8 = guildId == null || r1 != null ? r10 : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ep5D4i,
|
||||
{label: r10});
|
||||
const UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton;
|
||||
if (isFetching) {
|
||||
object2 = {};
|
||||
object2.label = intl.string(t.wR5wOo);
|
||||
object2.buttonText = intl.string(t.MKDeyL);
|
||||
object2.onPress = NOOP;
|
||||
object2.leading = ((ActivityIndicator) => <ActivityIndicator animating size="large" />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator);
|
||||
object2.loading = true;
|
||||
object2.disabled = true;
|
||||
object2.hideArrow = true;
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wR5wOo);
|
||||
object2.buttonText = r8;
|
||||
object2.accessibilityValue = {text: r8};
|
||||
object2.onPress = value6;
|
||||
object2.leading = value3 != null ? <View style={styles.profileEffectPreviewContainer}>{((Component) => <Component source={{uri: importDefault(10117) /* metro dependency 10117: sample_profile_smallPng */}} style={styles.sampleProfile} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}{((Component) => <Component skuId={value3.skuId} bannerAdjustment={0} useThumbnail />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */)}</View> : ((Icon) => <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
r0 = object2;
|
||||
}
|
||||
return <UserProfileEditFormButton {...r0} />;
|
||||
}
|
||||
|
||||
function _fun100805() { // fn#100805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13403:1110, offset: 0x021f9fdf, size: 119 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[10]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[12]);
|
||||
value = value(dependencyMap[11], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'Profile Effect', {user: user, currentProfileEffect: env0_3,
|
||||
guildId: guildId, isTryItOut: isTryItOut}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 8758; source: modules/user_profile/native/UserProfileFixedBackground.tsx; dependencies: [57, 31, 27, 33, 3868, 8497, 8512, 4589, 2] */
|
||||
function _fun68543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8943:6, offset: 0x01c52cbe, size: 195 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.StyleSheet;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(_fun68544);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileFixedBackground.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun68544({gradientHeight, bannerHeight, style}) { // fn#68544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8943:174, offset: 0x01c52d81, size: 395 bytes, params: 2, frame: 25
|
||||
var Math;
|
||||
var min;
|
||||
var Math2;
|
||||
const {theme, primaryColor, secondaryColor} = (require(3868) /* metro dependency 3868: native */).useThemeContext();
|
||||
const useUserProfileColorsModule = require(8497) /* metro dependency 8497: useUserProfileColors */;
|
||||
const useUserProfileColors = useUserProfileColorsModule.useUserProfileColors;
|
||||
const gradientFallbackBackground = Reflect.apply(useUserProfileColors, useUserProfileColorsModule, [{theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor}]).gradientFallbackBackground;
|
||||
const value4 = env0_3((require(8512) /* metro dependency 8512: useUserProfileGradientColors */).useUserProfileGradientColors(primaryColor,
|
||||
secondaryColor, gradientFallbackBackground), 2);
|
||||
const property = value4[0];
|
||||
if (primaryColor != null) {
|
||||
if (secondaryColor != null) {
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
Math2 = global.Math;
|
||||
return ((Component) => <Component colors={[property, property, value4[1]]} locations={[0, Reflect.apply(min,
|
||||
Math,
|
||||
[1, Math2.max(0,
|
||||
bannerHeight / gradientHeight)]), 1]} style={[StyleSheet.absoluteFill, style]} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
}
|
||||
}
|
||||
return (
|
||||
<View style={[StyleSheet.absoluteFill, {backgroundColor: gradientFallbackBackground},
|
||||
style]} pointerEvents="none" />
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/* Metro module 13217; source: modules/user_profile/native/UserProfileFrameEditButton.tsx; dependencies: [57, 31, 27, 6816, 1376, 482, 33, 697, 4501, 10054, 7013, 1365, 8402, 8461, 1904, 4080, 13218, 1962, 1244, 13209, 5461, 1305, 10031, 8411, 2] */
|
||||
function _fun100831(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13407:6, offset: 0x021fb4be, size: 458 bytes, params: 8, frame: 25
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const COLLECTIBLES_PREVIEW_SIZE = (require(6816) /* metro dependency 6816: Constants */).COLLECTIBLES_PREVIEW_SIZE;
|
||||
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_8 = (require(482) /* metro dependency 482: Constants */).NOOP;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {height: COLLECTIBLES_PREVIEW_SIZE, width: COLLECTIBLES_PREVIEW_SIZE, paddingVertical: PX_4};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object4.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object4.justifyContent = 'center';
|
||||
object4.alignItems = 'center';
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.overflow = 'hidden';
|
||||
object3.previewContainer = object4;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object3.noneIcon = {tintColor: TEXT_SUBTLE};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object3.newBadge = {paddingTop: 0, marginLeft: PX_4};
|
||||
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileFrameEditButton.tsx');
|
||||
exports.default = UserProfileFrameEditButton;
|
||||
}
|
||||
|
||||
function UserProfileFrameEditButton({displayProfile, user, pendingProfileFrame, guildId}) { // fn#100832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13407:681, offset: 0x021fb688, size: 1353 bytes, params: 2, frame: 31
|
||||
var object2;
|
||||
var r14;
|
||||
var r8;
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var UserProfileEditFormButton;
|
||||
const env0_3 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useCanViewProfileFramesInCollectiblesShop('UserProfileFrameEditButton');
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const PROFILE_FRAME_USER_PROFILE_NEW_BADGE = DismissibleContent.PROFILE_FRAME_USER_PROFILE_NEW_BADGE;
|
||||
const value5 = env0_3(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[[PROFILE_FRAME_USER_PROFILE_NEW_BADGE]]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
|
||||
const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
|
||||
object2 = {pendingValue: pendingProfileFrame};
|
||||
object2.userValue = displayProfile == null || displayProfile._userProfile == null ? undefined : displayProfile._userProfile.profileFrame;
|
||||
object2.guildValue = displayProfile == null || displayProfile._guildMemberProfile == null ? undefined : displayProfile._guildMemberProfile.profileFrame;
|
||||
object2.guildId = guildId;
|
||||
const {product,
|
||||
isFetching} = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(Reflect.apply(getProfilePreviewValue,
|
||||
profileCustomizationUtilsModule, [object2])?.skuId);
|
||||
const type = product == null || product.items[0] == null ? undefined : product.items[0].type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
const r11 = type !== PROFILE_FRAME ? undefined : product.items[0];
|
||||
const moduleValue5 = profileCustomizationUtilsModule;
|
||||
const useUserProfileFrame = moduleValue5.useUserProfileFrame;
|
||||
const r1 = pendingProfileFrame === undefined ? Reflect.apply(useUserProfileFrame, moduleValue5, [{user: user,
|
||||
guildId: guildId}]) : pendingProfileFrame;
|
||||
const binding = env0_4;
|
||||
const useCallback = binding.useCallback;
|
||||
if (value3) {
|
||||
r14 = product?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe);
|
||||
r8 = guildId == null || r1 != null ? r14 : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ep5D4i,
|
||||
|
||||
{label: r14});
|
||||
UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton;
|
||||
if (isFetching) {
|
||||
object2 = {};
|
||||
object2.label = intl.string(t.GWrZOd);
|
||||
object2.buttonText = intl.string(t.MKDeyL);
|
||||
object2.onPress = NOOP;
|
||||
object2.leading = ((ActivityIndicator) => <ActivityIndicator animating size="large" />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator);
|
||||
object2.loading = true;
|
||||
object2.disabled = true;
|
||||
object2.hideArrow = true;
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GWrZOd);
|
||||
object2.labelTrailing = property !== (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PROFILE_FRAME_USER_PROFILE_NEW_BADGE ? undefined : <View {...{['aria-hidden']: true}}>{((TextBadge) => <TextBadge text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.newBadge} />)((require(1305) /* metro dependency 1305: native */).TextBadge)}</View>;
|
||||
object2.buttonText = r8;
|
||||
object2.accessibilityValue = {text: r8};
|
||||
object2.onPress = Reflect.apply(useCallback, binding, [_fun100833, [r1, guildId, user, property2]]);
|
||||
object2.leading = r11 != null ? <View style={styles.previewContainer}>{((Component) => <Component profileFrame={r11} previewWidth={COLLECTIBLES_PREVIEW_SIZE - 2 * (importDefault(697) /* metro dependency 697: native */).space.PX_8} previewHeight={COLLECTIBLES_PREVIEW_SIZE - 2 * PX_4} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}</View> : ((Icon) => <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
r0 = object2;
|
||||
}
|
||||
return <UserProfileEditFormButton {...r0} />;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun100833() { // fn#100833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13407:1497, offset: 0x021fbbd1, size: 129 bytes, params: 1, frame: 18
|
||||
const defaultImport = importDefault(dependencyMap[15]);
|
||||
defaultImport.openLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths), 'Profile Frame',
|
||||
{user: user, currentProfileFrame: env0_3, guildId: guildId});
|
||||
const binding = env0_2;
|
||||
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
||||
binding(TAKE_ACTION);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
/* Metro module 10340; source: modules/user_profile/native/UserProfileGameFriendActionSheet.tsx; dependencies: [5, 57, 31, 27, 3793, 661, 33, 4501, 697, 8796, 6807, 5312, 1305, 4573, 10341, 6777, 4617, 8783, 3856, 4080, 6805, 6758, 1244, 2] */
|
||||
function _fun80158(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:6, offset: 0x01e6f83b, size: 356 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.ActivityIndicator;
|
||||
const env0_7 = value.View;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'width': 32, 'height': 32};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [{applicationNameWrapper: {'flexDirection': 'row',
|
||||
'justifyContent': 'flex-start', 'alignItems': 'center', 'gap': 12}, gameIcon: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileGameFriendActionSheet.tsx');
|
||||
exports.default = UserProfileGameFriendActionSheet;
|
||||
}
|
||||
|
||||
function GameFriendApplicationRow({application, userId, userDisplayName}) { // fn#80159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:418, offset: 0x01e6f99f, size: 395 bytes, params: 2, frame: 27
|
||||
var object3;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_5.useCallback(_fun80160, [application.id, application.name, userDisplayName, userId]);
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
object3 = {};
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
object3.trailing = <XSmallIcon size="md" color="redesign-button-tertiary-text" />;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const object2 = {};
|
||||
object2.uri = application.getIconURL(32) ?? '';
|
||||
const icon = <Icon style={styles.gameIcon} resizeMode="contain" source={object2} disableColor key={application.id} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
object3.label = <View style={styles.applicationNameWrapper}>{icon}<Text variant="text-md/semibold" color="mobile-text-heading-primary">{application.name}</Text></View>;
|
||||
object3.onPress = value2;
|
||||
return <ActionSheetRow {...object3} key={application.id} />;
|
||||
}
|
||||
|
||||
function UserProfileGameFriendActionSheet({user, guildId, channelId}) { // fn#80161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:1166, offset: 0x01e6fb7d, size: 847 bytes, params: 2, frame: 32
|
||||
var object2;
|
||||
var r5;
|
||||
var object4;
|
||||
var object5;
|
||||
const value2 = (require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */).useGameFriendsForUser(user.id);
|
||||
let binding = env0_5;
|
||||
const value3 = binding.useMemo(_fun80162, [value2]);
|
||||
const value4 = (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(value3);
|
||||
const env0_3 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(guildId, channelId, user);
|
||||
binding = env0_5;
|
||||
let useState = binding.useState;
|
||||
const value5 = Reflect.apply(useState, binding, [_fun80164]);
|
||||
binding = env0_4;
|
||||
const property = binding(value5, 1)[0];
|
||||
var [property2, env0_4] = binding(env0_5.useState(false), 2);
|
||||
const binding3 = env0_5;
|
||||
useState = binding3.useState;
|
||||
const value9 = binding(Reflect.apply(useState, binding3, [false]), 2);
|
||||
const property3 = value9[0];
|
||||
var env0_5 = value9[1];
|
||||
const value11 = env0_5.useCallback(env0_3(_fun80166), [user.id]);
|
||||
env0_5.useEffect(_fun80167, [value3]);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
object2 = {};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [t['Uv/eTx']])} />;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
let Group = ActionSheetRow.Group;
|
||||
string = intl.string;
|
||||
const YpCiMt = (require(1244) /* metro dependency 1244: indexNative */).t.YpCiMt;
|
||||
const group = <Group title={Reflect.apply(string, intl, [YpCiMt])} hasIcons={false}>{value4.map(_fun80168)}</Group>;
|
||||
if (property) {
|
||||
Group = ActionSheetRow.Group;
|
||||
r5 = <Group title={intl.string(t.GbsGCp)} hasIcons={false}><ActionSheetRow label={intl.string(t.LAcY7m)} subLabel={intl.string(t.YTvOUx)} onPress={value11} disabled={property2} trailing={property3 ? <ActivityIndicator /> : null} /></Group>;
|
||||
} else {
|
||||
r5 = property;
|
||||
}
|
||||
return (
|
||||
<ActionSheet {...object2}>
|
||||
{group}
|
||||
{r5}
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80160() { // fn#80160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:525, offset: 0x01e6fb2a, size: 83 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(8796) /* metro dependency 8796: UserProfileAlertUtils */;
|
||||
const confirmRemoveGameFriend = value.confirmRemoveGameFriend;
|
||||
const applicationBinding = application;
|
||||
Reflect.apply(confirmRemoveGameFriend, value, [{userDisplayName: userDisplayName, userId: userId,
|
||||
applicationId: applicationBinding.id, gameName: applicationBinding.name}]);
|
||||
}
|
||||
|
||||
function _fun80162() { // fn#80162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:1296, offset: 0x01e6fecc, size: 28 bytes, params: 1, frame: 11
|
||||
return env0_1.map(function(a0) {
|
||||
return a0.applicationId;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun80164() { // fn#80164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:1392, offset: 0x01e6fee8, size: 121 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
if (RelationshipStore.isFriend(user.id)) {
|
||||
return false;
|
||||
}
|
||||
if (RelationshipStore.isBlockedOrIgnored(user.id)) {
|
||||
return false;
|
||||
}
|
||||
const relationshipType = RelationshipStore.getRelationshipType(user.id);
|
||||
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
|
||||
return relationshipType !== PENDING_OUTGOING && relationshipType !== RelationshipTypes.PENDING_INCOMING;
|
||||
}
|
||||
|
||||
function* _fun80166() { // fn#80166, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:1656, offset: 0x01e6ff6c, size: 201 bytes, params: 1, frame: 17
|
||||
var value;
|
||||
var value2;
|
||||
var value3;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var addRelationship;
|
||||
var object3;
|
||||
var id;
|
||||
var object4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var binding3;
|
||||
var value8;
|
||||
var presentAddedFriendToast;
|
||||
var error;
|
||||
exceptionLanding35: while (true) {
|
||||
value = undefined;
|
||||
value2 = false;
|
||||
if (value2) {
|
||||
return value;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
env1_4(true);
|
||||
env1_5(true);
|
||||
value3 = environment.__proto__.__proto__;
|
||||
reducibleJoin4: while (true) {
|
||||
reduciblePort34: while (true) {
|
||||
exceptionLanding30: while (true) {
|
||||
try {
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
try {
|
||||
binding = env1_4;
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
binding(false);
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
break reduciblePort34;
|
||||
}
|
||||
env1_5(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
property = binding2[17];
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
addRelationship = value4.addRelationship;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
id = require.id;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object3.userId = id;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object4 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object4.location = 'User Profile Action Sheet';
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object3.context = object4;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
value5 = Reflect.apply(addRelationship, value4, [object3]);
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
yield value5;
|
||||
try {
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
if (value7) {
|
||||
env1_5(false);
|
||||
return value6;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
property = binding3[18];
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
value8 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
presentAddedFriendToast = value8.presentAddedFriendToast;
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
Reflect.apply(presentAddedFriendToast, value8, []);
|
||||
} catch (error) {
|
||||
break exceptionLanding30;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding35;
|
||||
}
|
||||
env1_5(false);
|
||||
return undefined;
|
||||
}
|
||||
env1_5(false);
|
||||
throw error;
|
||||
}
|
||||
|
||||
function _fun80167() { // fn#80167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:1873, offset: 0x01e70035, size: 57 bytes, params: 1, frame: 11
|
||||
var value;
|
||||
if (env0_2.length === 0) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80168(a0) { // fn#80168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10526:2160, offset: 0x01e7006e, size: 70 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var object;
|
||||
var id;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
var gameFriendApplicationRowProps = {application: a0, userDisplayName: env0_3};
|
||||
id = user.id;
|
||||
gameFriendApplicationRowProps.userId = id;
|
||||
id = a0.id;
|
||||
value = <GameFriendApplicationRow {...gameFriendApplicationRowProps} key={id} />;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Metro module 10360; source: modules/user_profile/native/UserProfileGameFriendsCard.tsx; dependencies: [31, 33, 4501, 6777, 1244, 10349, 6815, 4573, 2] */
|
||||
function _fun80252(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10546:6, offset: 0x01e72fad, size: 181 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({card: {flexDirection: 'column'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileGameFriendsCard.tsx');
|
||||
exports.default = UserProfileGameFriendsCard;
|
||||
}
|
||||
|
||||
function UserProfileGameFriendsCard({applicationIds, style}) { // fn#80253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10546:276, offset: 0x01e73062, size: 590 bytes, params: 2, frame: 20
|
||||
var r6;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var env0_2;
|
||||
var env0_3;
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(applicationIds).filter(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
if (value3.length === 0) {
|
||||
return null;
|
||||
}
|
||||
if (value3.length === 1) {
|
||||
r6 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.wQ6urw,
|
||||
{applicationName: applicationName_80255});
|
||||
} else if (value3.length === 2) {
|
||||
r6 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.C98CSN,
|
||||
{applicationName: applicationName, applicationName2: applicationName2});
|
||||
} else {
|
||||
env0_2 = value3[value3.length - 1];
|
||||
env0_3 = value3.slice(0, -1);
|
||||
r6 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.UxpwAh, {applications: applications,
|
||||
applicationNameLast: applicationNameLast});
|
||||
}
|
||||
const UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
const userProfileCardProps = {style: [styles.card, style],
|
||||
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Uv/eTx'])};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<UserProfileCard {...userProfileCardProps}>
|
||||
<Text variant="text-md/normal" color="text-default">
|
||||
{r6}
|
||||
</Text>
|
||||
</UserProfileCard>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileGameFriendsCardApplicationName() { // fn#80255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10546:514, owner: UserProfileGameFriendsCard.applicationName, offset: 0x01e732b0, size: 83 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
|
||||
const binding = env0_0;
|
||||
return ((Component) => <Component application={binding[0]} textVariant={env0_1} iconSize={16} key={binding[0].id} />)(value);
|
||||
}
|
||||
|
||||
function applicationName2() { // fn#80257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10546:746, owner: UserProfileGameFriendsCard.applicationName2, offset: 0x01e73303, size: 84 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
|
||||
const binding = env0_0;
|
||||
return ((Component) => <Component application={binding[1]} textVariant={env0_1} iconSize={16} key={binding[1].id} />)(value);
|
||||
}
|
||||
|
||||
function applications() { // fn#80258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10546:910, owner: UserProfileGameFriendsCard.applications, offset: 0x01e73357, size: 28 bytes, params: 1, frame: 11
|
||||
return env0_3.map(_fun80259);
|
||||
}
|
||||
|
||||
function applicationNameLast() { // fn#80260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10546:1016, owner: UserProfileGameFriendsCard.applicationNameLast, offset: 0x01e733c2, size: 67 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component application={env0_2} textVariant={env0_1} iconSize={16} />)(importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */);
|
||||
}
|
||||
|
||||
function _fun80259(a0) { // fn#80259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10546:921, offset: 0x01e73373, size: 79 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component application={a0} useComma textVariant={env1_1} iconSize={16} key={a0.id} />)(importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 8511; source: modules/user_profile/native/UserProfileGradientContainer.tsx; dependencies: [31, 33, 8512, 4589, 2] */
|
||||
function _fun67454(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8696:6, offset: 0x01c2360c, size: 148 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(_fun67455);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileGradientContainer.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun67455({primaryColor, secondaryColor, fallbackBackground, containerStyle, children}) { // fn#67455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8696:130, offset: 0x01c236a0, size: 112 bytes, params: 2, frame: 20
|
||||
return ((Component) => <Component colors={(require(8512) /* metro dependency 8512: useUserProfileGradientColors */).useUserProfileGradientColors(primaryColor,
|
||||
secondaryColor,
|
||||
fallbackBackground)} style={containerStyle}>{children}</Component>)(importDefault(4589) /* metro dependency 4589 */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
/* Metro module 10485; source: modules/user_profile/native/UserProfileIncomingFriendRequest.tsx; dependencies: [31, 27, 33, 4501, 697, 8496, 8514, 6771, 10486, 4617, 6777, 4573, 1244, 1305, 1423, 10487, 4578, 2] */
|
||||
function _fun81139(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:6, offset: 0x01e9b237, size: 289 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [{container: {'rowGap': 16, 'flexDirection': 'column'},
|
||||
buttons: {'flexDirection': 'row', 'columnGap': 12}, gameIcon: {paddingTop: 2},
|
||||
friendRequestNote: {borderWidth: 1, borderColor: BORDER_STRONG}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileIncomingFriendRequest.tsx');
|
||||
exports.default = UserProfileIncomingFriendRequest;
|
||||
}
|
||||
|
||||
function UserProfileIncomingFriendRequest({user, channelId, guildId, isGameRelationship, applicationId, style, showUserProfile}) { // fn#81140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:470, offset: 0x01e9b358, size: 968 bytes, params: 2, frame: 34
|
||||
var r0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var object3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var string;
|
||||
var items3;
|
||||
let value = undefined;
|
||||
isGameRelationship = !(isGameRelationship === value) && isGameRelationship;
|
||||
const styles = useStyles();
|
||||
const value4 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const newestAnalyticsLocation = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
|
||||
const useFriendRequestActionsModule = require(10486) /* metro dependency 10486: useFriendRequestActions */;
|
||||
const useFriendRequestActions = useFriendRequestActionsModule.useFriendRequestActions;
|
||||
const object4 = {};
|
||||
object4.userId = user.id;
|
||||
object4.applicationId = applicationId;
|
||||
object4.isGameRelationship = isGameRelationship;
|
||||
object4.location = newestAnalyticsLocation;
|
||||
object4.onConfirm = showUserProfile;
|
||||
object4.onCancel = showUserProfile;
|
||||
const value5 = Reflect.apply(useFriendRequestActions, useFriendRequestActionsModule, [object4]);
|
||||
const acceptFriendRequest = value5.acceptFriendRequest;
|
||||
const env0_3 = acceptFriendRequest;
|
||||
const cancelFriendRequest = value5.cancelFriendRequest;
|
||||
const value6 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(guildId, channelId, user);
|
||||
const binding = env0_3;
|
||||
const value7 = binding.useCallback(_fun81141, [acceptFriendRequest, isGameRelationship, trackUserProfileAction]);
|
||||
const value8 = binding.useCallback(_fun81142, [cancelFriendRequest, isGameRelationship, trackUserProfileAction]);
|
||||
const value10 = applicationId != null;
|
||||
const value11 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(applicationId);
|
||||
if (value10) {
|
||||
if (value11 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewProps = {style: [styles.container, value4.card, style]};
|
||||
object3 = {'variant': 'text-sm/semibold', 'color': 'text-default'};
|
||||
format = intl.format;
|
||||
if (value10) {
|
||||
object3.children = Reflect.apply(format, intl, [isGameRelationship ? t.syHjLL : t.V15uUI,
|
||||
{username: value6,
|
||||
applicationName: value11 == null ? value : value11.name, applicationIcon: applicationIcon}]);
|
||||
} else {
|
||||
object3.children = Reflect.apply(format, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.uIomXw,
|
||||
{username: value6}]);
|
||||
}
|
||||
items2 = [<Text {...object3} />];
|
||||
items2[1] = ((Component) => <Component userId={user.id} styles={styles.friendRequestNote} analyticsLocation="User Profile" />)(importDefault(10487) /* metro dependency 10487: FriendRequestNote */);
|
||||
var viewBinding2Props = {style: styles.buttons};
|
||||
string = intl.string;
|
||||
items3 = [<Button size="sm" variant="primary" text={Reflect.apply(string, intl,
|
||||
[t.Zcibdf])} onPress={value7} />];
|
||||
string = intl.string;
|
||||
items3[1] = <Button size="sm" variant="secondary" text={Reflect.apply(string, intl,
|
||||
[t.xuio0C])} onPress={value8} />;
|
||||
items2[2] = <View {...viewBinding2Props}>{items3}</View>;
|
||||
value = <View {...viewProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
var viewProps = {style: [styles.container, value4.card, style]};
|
||||
object3 = {'variant': 'text-sm/semibold', 'color': 'text-default'};
|
||||
format = intl.format;
|
||||
if (value10) {
|
||||
object3.children = Reflect.apply(format, intl, [isGameRelationship ? t.syHjLL : t.V15uUI, {username: value6,
|
||||
applicationName: value11 == null ? value : value11.name, applicationIcon: applicationIcon}]);
|
||||
} else {
|
||||
object3.children = Reflect.apply(format, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.uIomXw,
|
||||
{username: value6}]);
|
||||
}
|
||||
items2 = [<Text {...object3} />];
|
||||
items2[1] = ((Component) => <Component userId={user.id} styles={styles.friendRequestNote} analyticsLocation="User Profile" />)(importDefault(10487) /* metro dependency 10487: FriendRequestNote */);
|
||||
var viewBinding2Props = {style: styles.buttons};
|
||||
string = intl.string;
|
||||
items3 = [<Button size="sm" variant="primary" text={Reflect.apply(string, intl,
|
||||
[t.Zcibdf])} onPress={value7} />];
|
||||
string = intl.string;
|
||||
items3[1] = <Button size="sm" variant="secondary" text={Reflect.apply(string, intl,
|
||||
[t.xuio0C])} onPress={value8} />;
|
||||
items2[2] = <View {...viewBinding2Props}>{items3}</View>;
|
||||
value = <View {...viewProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun81141() { // fn#81141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:944, offset: 0x01e9b720, size: 49 bytes, params: 1, frame: 13
|
||||
acceptFriendRequest();
|
||||
trackUserProfileAction({action: isGameRelationship ? 'ACCEPT_GAME_FRIEND_REQUEST' : 'ACCEPT_FRIEND_REQUEST'});
|
||||
}
|
||||
|
||||
function _fun81142() { // fn#81142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:1048, offset: 0x01e9b751, size: 49 bytes, params: 1, frame: 13
|
||||
cancelFriendRequest();
|
||||
trackUserProfileAction({action: isGameRelationship ? 'IGNORE_GAME_FRIEND_REQUEST' : 'IGNORE_FRIEND_REQUEST'});
|
||||
}
|
||||
|
||||
function applicationIcon() { // fn#81143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:1452, owner: UserProfileIncomingFriendRequest.applicationIcon, offset: 0x01e9b782, size: 172 bytes, params: 1, frame: 23
|
||||
var r0;
|
||||
var value3;
|
||||
var Avatar;
|
||||
var object2;
|
||||
var defaultImport;
|
||||
var getApplicationIconSource;
|
||||
var id;
|
||||
const value2 = null;
|
||||
if (value2 == env0_5) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
object2 = {};
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getApplicationIconSource = defaultImport.getApplicationIconSource;
|
||||
id = env0_5.id;
|
||||
object2.source = Reflect.apply(getApplicationIconSource, defaultImport, [{id: id, icon: env0_5.icon}]);
|
||||
object2.size = (require(1305) /* metro dependency 1305: native */).AvatarSizes.XXSMALL;
|
||||
object2.style = styles.gameIcon;
|
||||
id = env0_5.id;
|
||||
r0 = <Avatar {...object2} key={id} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Metro module 13229; source: modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx; dependencies: [31, 33, 3829, 13209, 1244, 7620, 8400, 2] */
|
||||
function _fun100906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13419:6, offset: 0x021ff8be, size: 131 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx');
|
||||
exports.default = UserProfileLegacyUsernameSwitch;
|
||||
}
|
||||
|
||||
function UserProfileLegacyUsernameSwitch({legacyUsername, pendingLegacyUsernameDisabled}) { // fn#100907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13419:225, offset: 0x021ff941, size: 243 bytes, params: 2, frame: 21
|
||||
const LegacyUsernameDisabled = (require(3829) /* metro dependency 3829: UserSettings */).LegacyUsernameDisabled;
|
||||
const r5 = pendingLegacyUsernameDisabled === undefined ? LegacyUsernameDisabled.useSetting() : pendingLegacyUsernameDisabled;
|
||||
const UserProfileEditFormSwitch = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormSwitch;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<UserProfileEditFormSwitch
|
||||
value={!r5}
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3cWDuO'])}
|
||||
subLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.aYhclf,
|
||||
{username: legacyUsername})}
|
||||
onValueChange={onValueChange_100908}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileLegacyUsernameSwitchOnValueChange(a0) { // fn#100908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13419:572, owner: UserProfileLegacyUsernameSwitch.onValueChange, offset: 0x021ffa34, size: 104 bytes, params: 2, frame: 12
|
||||
var value3;
|
||||
var moduleValue;
|
||||
let value = !a0;
|
||||
if (value === env0_0) {
|
||||
value = environment.__proto__;
|
||||
value = require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */;
|
||||
value.resetPendingLegacyUsernameDisabled();
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
|
||||
moduleValue.setPendingChanges({legacyUsernameDisabled: value});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,487 @@
|
||||
/* Metro module 10288; source: modules/user_profile/native/UserProfileModeratorActions.tsx; dependencies: [31, 4811, 1379, 1935, 1945, 1867, 3784, 4297, 661, 3772, 33, 4501, 8514, 4080, 8832, 566, 6860, 10289, 1387, 8037, 4805, 4802, 4800, 3789, 6815, 1244, 10290, 8118, 10292, 7972, 4573, 6711, 10294, 1962, 6593, 7002, 5080, 10296, 1391, 10315, 3773, 10317, 10299, 9252, 10280, 9248, 10319, 9616, 4054, 10321, 9409, 10323, 10325, 8796, 7153, 2] */
|
||||
function _fun79784(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:6, offset: 0x01e61e97, size: 378 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const stageChannelRoleStore = importDefault(4811) /* metro dependency 4811: StageChannelRoleStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
||||
const env0_7 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = constantsModule.GuildFeatures;
|
||||
const env0_13 = constantsModule.Permissions;
|
||||
const env0_14 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({cardContainer: {paddingBottom: 0},
|
||||
cardTitle: {marginBottom: 0}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileModeratorActions.tsx');
|
||||
exports.default = UserProfileModeratorActions;
|
||||
}
|
||||
|
||||
function UserProfileModeratorActions({user, currentUser, guildId, channelId, showUserProfile, style}) { // fn#79785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:485, offset: 0x01e62011, size: 3819 bytes, params: 2, frame: 54
|
||||
var r1;
|
||||
var push;
|
||||
const UserProfileFormRow = (require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileFormRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value21;
|
||||
var isMemberCommunicationDisabled2;
|
||||
var object2;
|
||||
var mute;
|
||||
var object3;
|
||||
var deaf;
|
||||
var UserProfileCard;
|
||||
var object16;
|
||||
const styles = useStyles();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_4 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const env0_5 = (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet;
|
||||
const {voiceState,
|
||||
voiceChannel} = (importDefault(8832) /* metro dependency 8832: useUserVoiceActivity */)({userId: user.id,
|
||||
guildId: guildId});
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
|
||||
return GuildMemberStore.getMember(guildId, user.id);
|
||||
});
|
||||
const isActive = user.id === currentUser.id;
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun79788);
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun79789);
|
||||
const value7 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanRemoveThreadMember(channelId);
|
||||
const {canKickUser, canBanUser, canChangeNick, canManageUserRoles, canManageGuildRoles, canManageGuild,
|
||||
canModerateMembers, canMoveMembers, canMuteMembers, canDeafenMembers,
|
||||
canModerateStage} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
|
||||
_fun79790);
|
||||
const value9 = (importDefault(8037) /* metro dependency 8037: useCanToggleCommunicationDisableOnUser */)(guildId,
|
||||
user.id);
|
||||
let r29 = canModerateMembers && canKickUser && canBanUser;
|
||||
r29 = !r29 ? canManageGuild : r29;
|
||||
r29 = !r29 ? canManageUserRoles : r29;
|
||||
const value10 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(voiceChannel);
|
||||
const value12 = (importDefault(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */)(user.id,
|
||||
voiceChannel?.id);
|
||||
let r16 = voiceChannel != null && voiceState?.channelId != null;
|
||||
const r32 = voiceChannel != null && voiceChannel.isGuildStageVoice();
|
||||
const r22 = voiceChannel != null && (r32 ? value12 === (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).RequestToSpeakStates.ON_STAGE : !r32);
|
||||
const speaker = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageChannelRoleStore],
|
||||
function() {
|
||||
var getPermissionsForUser = StageChannelRoleStore.getPermissionsForUser;
|
||||
return Reflect.apply(getPermissionsForUser, StageChannelRoleStore, [user.id, voiceChannel?.id]).speaker;
|
||||
});
|
||||
const env0_13 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore,
|
||||
VoiceStateStore, GuildStore, PermissionStore], _fun79792);
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
if (member == null) {
|
||||
return null;
|
||||
}
|
||||
items = [];
|
||||
let r33 = r32 && canModerateStage && speaker;
|
||||
if (r33) {
|
||||
items.push(<UserProfileFormRow label={user.id === currentUser.id ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6C6PJx']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.r23NoB)} icon={(require(10290) /* metro dependency 10290: GroupArrowDownIcon */).GroupArrowDownIcon} onPress={onPress_79795} key="remove-from-stage" />);
|
||||
}
|
||||
if (r32) {
|
||||
if (canModerateStage) {
|
||||
if (!speaker) {
|
||||
value21 = value12 === (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK;
|
||||
string = intl.string;
|
||||
r33 = value21 ? Reflect.apply(string, intl, [t.tHj7Tb]) : Reflect.apply(string, intl, [t.VUCWcO]);
|
||||
push = items.push;
|
||||
var userProfileFormRowProps = {icon: (require(10292) /* metro dependency 10292: MicrophoneArrowRightIcon */).MicrophoneArrowRightIcon};
|
||||
r33 = isActive ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8Joh+p']) : r33;
|
||||
userProfileFormRowProps.label = r33;
|
||||
userProfileFormRowProps.disabled = value21;
|
||||
userProfileFormRowProps.onPress = onPress_79796;
|
||||
Reflect.apply(push, items, [<UserProfileFormRow {...userProfileFormRowProps} key="invite-to-speak" />]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (r16 && canMoveMembers) {
|
||||
items.push(<UserProfileFormRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FAplms)} hint={(require(7972) /* metro dependency 7972: native */).FormArrow} sublabel={((Text) => <Text variant="text-xs/normal" color="text-subtle">{value10}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} icon={(require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon} onPress={onPress_79797} key="move-to-channel" />);
|
||||
}
|
||||
let r3 = canKickUser || canBanUser;
|
||||
r3 = !r3 ? canChangeNick : r3;
|
||||
r3 = (!r3 ? canManageGuildRoles : r3) && !user.isNonUserBot();
|
||||
if (r3) {
|
||||
items.push(<UserProfileFormRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HxrBOZ)} icon={(require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon} onPress={onPress_79799} key="manage" />);
|
||||
}
|
||||
let features = guild.features;
|
||||
let has = features.has;
|
||||
const COMMUNITY = GuildFeatures.COMMUNITY;
|
||||
const value26 = Reflect.apply(has, features, [COMMUNITY]);
|
||||
features = guild.features;
|
||||
has = features.has;
|
||||
const GUILD_ONBOARDING_EVER_ENABLED = GuildFeatures.GUILD_ONBOARDING_EVER_ENABLED;
|
||||
const value27 = Reflect.apply(has, features, [GUILD_ONBOARDING_EVER_ENABLED]);
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const hasFlag = flagUtilsModule.hasFlag;
|
||||
const r26 = member.flags ?? 0;
|
||||
const BYPASSES_VERIFICATION = GuildMemberFlags.BYPASSES_VERIFICATION;
|
||||
const hasFlag2 = Reflect.apply(hasFlag, flagUtilsModule, [r26, BYPASSES_VERIFICATION]);
|
||||
const value29 = !isActive;
|
||||
let r30 = (isActive ? value29 : r29) && value26;
|
||||
r30 = r30 && value27 && hasFlag2;
|
||||
if (r30) {
|
||||
items.push(<UserProfileFormRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NbhSI7)} icon={(require(10315) /* metro dependency 10315: StampIcon */).StampIcon} onPress={onPress_79802} key="unverify" />);
|
||||
}
|
||||
let r24 = (isActive ? value29 : r29) && value26;
|
||||
r24 = r24 && value27 && !hasFlag2;
|
||||
if (r24) {
|
||||
items.push(<UserProfileFormRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6QlTeK'])} icon={(require(10315) /* metro dependency 10315: StampIcon */).StampIcon} onPress={onPress_79803} key="verify" />);
|
||||
}
|
||||
if (value9) {
|
||||
isMemberCommunicationDisabled2 = (require(3773) /* metro dependency 3773: CommunicationDisabledUtils */).isMemberCommunicationDisabled(member);
|
||||
push = items.push;
|
||||
string = intl.string;
|
||||
Reflect.apply(push, items, [<UserProfileFormRow label={isMemberCommunicationDisabled2 ? Reflect.apply(string,
|
||||
intl,
|
||||
[t.qXtNtS]) : Reflect.apply(string, intl,
|
||||
[t.xpsADY])} icon={(require(10317) /* metro dependency 10317: ClockWarningIcon */).ClockWarningIcon} onPress={onPress_79804} key="time-out" />]);
|
||||
}
|
||||
let r19 = r16 && r22 && canMuteMembers;
|
||||
if (r19) {
|
||||
push = items.push;
|
||||
object2 = {};
|
||||
mute = voiceState.mute;
|
||||
string = intl.string;
|
||||
r19 = mute ? Reflect.apply(string, intl, [t.wG9K2n]) : Reflect.apply(string, intl, [t.e9e9Ua]);
|
||||
object2.label = r19;
|
||||
mute = voiceState.mute;
|
||||
r19 = mute ? (require(9252) /* metro dependency 9252: MicrophoneSlashIcon */).MicrophoneSlashIcon : (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon;
|
||||
object2.icon = r19;
|
||||
object2.onPress = function() {
|
||||
trackUserProfileAction({action: 'SERVER_MUTE'});
|
||||
importDefault(dependencyMap[34]).setServerMute(guild.id, user.id, !voiceState.mute);
|
||||
};
|
||||
Reflect.apply(push, items, [<UserProfileFormRow {...object2} key="server-mute" />]);
|
||||
}
|
||||
if (r16 && r22 && canDeafenMembers) {
|
||||
push = items.push;
|
||||
object3 = {};
|
||||
deaf = voiceState.deaf;
|
||||
string = intl.string;
|
||||
object3.label = deaf ? Reflect.apply(string, intl, [t.Gbw4Z9]) : Reflect.apply(string, intl, [t.hMA2GE]);
|
||||
deaf = voiceState.deaf;
|
||||
object3.icon = deaf ? (require(9248) /* metro dependency 9248: HeadphonesSlashIcon */).HeadphonesSlashIcon : (require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon;
|
||||
object3.onPress = function() {
|
||||
trackUserProfileAction({action: 'DEAFEN'});
|
||||
importDefault(dependencyMap[34]).setServerDeaf(guild.id, user.id, !voiceState.deaf);
|
||||
};
|
||||
Reflect.apply(push, items, [<UserProfileFormRow {...object3} key="deafen" />]);
|
||||
}
|
||||
r16 = r16 && canMoveMembers;
|
||||
if (r16) {
|
||||
items.push(<UserProfileFormRow label={user.id === currentUser.id ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6vrfgt']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/jERiG'])} icon={(require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon} isDestructive onPress={function() {
|
||||
trackUserProfileAction({action: 'DISCONNECT'});
|
||||
importDefault(dependencyMap[34]).setChannel(guild.id, user.id, null);
|
||||
}} key="disconnect" />);
|
||||
}
|
||||
if (canKickUser) {
|
||||
items.push(<UserProfileFormRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3glT6Z'])} icon={(require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon} isDestructive onPress={function() {
|
||||
trackUserProfileAction({action: 'PRESS_KICK_USER'});
|
||||
hideActionSheet();
|
||||
importDefault(dependencyMap[49])({guildId: guild.id, userId: user.id,
|
||||
cancelButtonCallback: showUserProfile});
|
||||
}} key="kick" />);
|
||||
}
|
||||
if (canBanUser) {
|
||||
items.push(<UserProfileFormRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5MBJ5M'])} icon={(require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon} isDestructive onPress={function() {
|
||||
trackUserProfileAction({action: 'PRESS_BAN_USER'});
|
||||
importDefault(dependencyMap[51])({guildId: guild.id, userId: user.id,
|
||||
cancelButtonCallback: showUserProfile});
|
||||
}} key="ban" />);
|
||||
}
|
||||
if (value5) {
|
||||
if (value7) {
|
||||
if (!isActive) {
|
||||
if (channelId != null) {
|
||||
string = intl.string;
|
||||
items.push(<UserProfileFormRow isDestructive label={value6 ? Reflect.apply(string, intl,
|
||||
[t['6+b8ae']]) : Reflect.apply(string, intl,
|
||||
[t.at1yY3])} icon={(require(10325) /* metro dependency 10325: ThreadMinusIcon */).ThreadMinusIcon} onPress={onPress_79810} key="remove-from-thread" />);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (value6) {
|
||||
if (value7) {
|
||||
if (!isActive) {
|
||||
if (channelId != null) {
|
||||
string = intl.string;
|
||||
items.push(<UserProfileFormRow isDestructive label={value6 ? Reflect.apply(string, intl,
|
||||
[t['6+b8ae']]) : Reflect.apply(string, intl,
|
||||
[t.at1yY3])} icon={(require(10325) /* metro dependency 10325: ThreadMinusIcon */).ThreadMinusIcon} onPress={onPress_79810} key="remove-from-thread" />);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (items.length === 0) {
|
||||
r1 = null;
|
||||
} else {
|
||||
UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
r1 = <UserProfileCard title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['EApw/R'])} style={[style,
|
||||
|
||||
styles.cardContainer]} titleStyle={styles.cardTitle}>{((UserProfileCardRows) => <UserProfileCardRows>{items}</UserProfileCardRows>)((require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileCardRows)}</UserProfileCard>;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun79788() { // fn#79788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:933, offset: 0x01e62f3c, size: 57 bytes, params: 1, frame: 12
|
||||
var r1;
|
||||
let value = environment.__proto__;
|
||||
value = ChannelStore.getChannel(channelId);
|
||||
if (value == null) {
|
||||
r1 = undefined;
|
||||
} else {
|
||||
value = value.isThread();
|
||||
r1 = value;
|
||||
}
|
||||
return r1 != null && r1;
|
||||
}
|
||||
|
||||
function _fun79789() { // fn#79789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:1050, offset: 0x01e62f75, size: 57 bytes, params: 1, frame: 12
|
||||
var r1;
|
||||
let value = environment.__proto__;
|
||||
value = ChannelStore.getChannel(channelId);
|
||||
if (value == null) {
|
||||
r1 = undefined;
|
||||
} else {
|
||||
value = value.isForumPost();
|
||||
r1 = value;
|
||||
}
|
||||
return r1 != null && r1;
|
||||
}
|
||||
|
||||
function _fun79790() { // fn#79790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:1215, offset: 0x01e62fae, size: 455 bytes, params: 1, frame: 21
|
||||
const object2 = {};
|
||||
const guildMemberUtilsModule = require(10289) /* metro dependency 10289: GuildMemberUtils */;
|
||||
const canKickMember = guildMemberUtilsModule.canKickMember;
|
||||
const userBinding = user;
|
||||
const guildBinding = guild;
|
||||
object2.canKickUser = Reflect.apply(canKickMember, guildMemberUtilsModule, [userBinding, guildBinding]);
|
||||
object2.canBanUser = guildMemberUtilsModule.canBanMember(userBinding, guildBinding);
|
||||
object2.canChangeNick = guildBinding != null && PermissionStore.canManageUser(Permissions.MANAGE_NICKNAMES, user,
|
||||
guild);
|
||||
object2.canManageUserRoles = guild != null && PermissionStore.canManageUser(Permissions.MANAGE_ROLES, user, guild);
|
||||
object2.canManageGuildRoles = guild != null && PermissionStore.can(Permissions.MANAGE_ROLES, guild);
|
||||
object2.canManageGuild = guild != null && PermissionStore.canManageUser(Permissions.MANAGE_GUILD, user, guild);
|
||||
object2.canModerateMembers = guild != null && PermissionStore.canManageUser(Permissions.MODERATE_MEMBERS, user,
|
||||
guild);
|
||||
let can = PermissionStore.can;
|
||||
const MOVE_MEMBERS = Permissions.MOVE_MEMBERS;
|
||||
const voiceChannelBinding = voiceChannel;
|
||||
object2.canMoveMembers = Reflect.apply(can, PermissionStore, [MOVE_MEMBERS, voiceChannelBinding]);
|
||||
can = PermissionStore.can;
|
||||
const MUTE_MEMBERS = Permissions.MUTE_MEMBERS;
|
||||
object2.canMuteMembers = Reflect.apply(can, PermissionStore, [MUTE_MEMBERS, voiceChannelBinding]);
|
||||
can = PermissionStore.can;
|
||||
const DEAFEN_MEMBERS = Permissions.DEAFEN_MEMBERS;
|
||||
object2.canDeafenMembers = Reflect.apply(can, PermissionStore, [DEAFEN_MEMBERS, voiceChannelBinding]);
|
||||
can = PermissionStore.can;
|
||||
const MODERATE_STAGE_CHANNEL_PERMISSIONS = (require(1387) /* metro dependency 1387: StageChannelPermissions */).MODERATE_STAGE_CHANNEL_PERMISSIONS;
|
||||
object2.canModerateStage = Reflect.apply(can, PermissionStore, [MODERATE_STAGE_CHANNEL_PERMISSIONS,
|
||||
voiceChannelBinding]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun79792() { // fn#79792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:2398, offset: 0x01e631b4, size: 94 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var r0;
|
||||
var value2;
|
||||
var value;
|
||||
if (canMoveMembers) {
|
||||
if (voiceChannel != null) {
|
||||
value2 = environment.__proto__;
|
||||
value = GuildChannelStore.getChannels(guildId);
|
||||
value = value[GUILD_VOCAL_CHANNELS_KEY].filter(_fun79793);
|
||||
value = value.map(function(a0) {
|
||||
return a0.channel;
|
||||
});
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress() { // fn#79795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:2925, owner: UserProfileModeratorActions.onPress, offset: 0x01e63335, size: 97 bytes, params: 1, frame: 16
|
||||
trackUserProfileAction({action: 'PRESS_REMOVE_FROM_STAGE'});
|
||||
const stageChannelActionCreatorsModule = require(8118) /* metro dependency 8118: StageChannelActionCreators */;
|
||||
stageChannelActionCreatorsModule.moveUserToAudience(user, voiceChannel);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress_79796() { // fn#79796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:3385, owner: UserProfileModeratorActions.onPress, offset: 0x01e63396, size: 133 bytes, params: 1, frame: 16
|
||||
trackUserProfileAction({action: 'PRESS_INVITE_TO_SPEAK'});
|
||||
const resultBinding = result;
|
||||
const stageChannelActionCreatorsModule = require(8118) /* metro dependency 8118: StageChannelActionCreators */;
|
||||
if (resultBinding) {
|
||||
stageChannelActionCreatorsModule.audienceAckRequestToSpeak(voiceChannel, false);
|
||||
} else {
|
||||
stageChannelActionCreatorsModule.inviteUserToStage(voiceChannel, user.id);
|
||||
}
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress_79797() { // fn#79797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:3791, owner: UserProfileModeratorActions.onPress, offset: 0x01e6341b, size: 211 bytes, params: 1, frame: 23
|
||||
var object3;
|
||||
trackUserProfileAction({action: 'PRESS_MOVE_TO_CHANNEL'});
|
||||
const defaultImport = importDefault(dependencyMap[13]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[33])(dependencyMap[32], dependencyMap.paths);
|
||||
object3 = {};
|
||||
object3.guild = guild;
|
||||
const object4 = {};
|
||||
const intl = require(dependencyMap[25]).intl;
|
||||
object4.title = intl.string(require(dependencyMap[25]).t.r2ptsz);
|
||||
object3.header = object4;
|
||||
object3.channels = env0_13;
|
||||
object3.onSelect = onSelect_79798;
|
||||
object3.selectedChannel = null;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, 'ChannelPicker', object3, 'stack']);
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress_79799() { // fn#79799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:4220, owner: UserProfileModeratorActions.onPress, offset: 0x01e63533, size: 159 bytes, params: 1, frame: 17
|
||||
trackUserProfileAction({action: 'PRESS_MANAGE_USER'});
|
||||
hideActionSheet();
|
||||
const defaultImport = importDefault(dependencyMap[36]);
|
||||
defaultImport.pushLazy(require(dependencyMap[33])(dependencyMap[37], dependencyMap.paths), {userId: user.id,
|
||||
guildId: guild.id, onClose: onClose_79800, onRemove: onRemove});
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress_79802() { // fn#79802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:4699, owner: UserProfileModeratorActions.onPress, offset: 0x01e63627, size: 146 bytes, params: 1, frame: 21
|
||||
trackUserProfileAction({action: 'PRESS_UNVERIFY_USER'});
|
||||
const defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
|
||||
const setMemberFlags = defaultImport.setMemberFlags;
|
||||
const id = guild.id;
|
||||
const id2 = user.id;
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const setFlag = flagUtilsModule.setFlag;
|
||||
const r7 = member.flags ?? 0;
|
||||
const BYPASSES_VERIFICATION = GuildMemberFlags.BYPASSES_VERIFICATION;
|
||||
Reflect.apply(setMemberFlags, defaultImport, [id, id2, Reflect.apply(setFlag, flagUtilsModule, [r7,
|
||||
BYPASSES_VERIFICATION, false])]);
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress_79803() { // fn#79803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:5001, owner: UserProfileModeratorActions.onPress, offset: 0x01e636b9, size: 146 bytes, params: 1, frame: 21
|
||||
trackUserProfileAction({action: 'PRESS_VERIFY_USER'});
|
||||
const defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
|
||||
const setMemberFlags = defaultImport.setMemberFlags;
|
||||
const id = guild.id;
|
||||
const id2 = user.id;
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const setFlag = flagUtilsModule.setFlag;
|
||||
const r7 = member.flags ?? 0;
|
||||
const BYPASSES_VERIFICATION = GuildMemberFlags.BYPASSES_VERIFICATION;
|
||||
Reflect.apply(setMemberFlags, defaultImport, [id, id2, Reflect.apply(setFlag, flagUtilsModule, [r7,
|
||||
BYPASSES_VERIFICATION, true])]);
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress_79804() { // fn#79804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:5378, owner: UserProfileModeratorActions.onPress, offset: 0x01e6374b, size: 169 bytes, params: 1, frame: 15
|
||||
var openDisableCommunication;
|
||||
var memberBinding;
|
||||
var openEnableCommunication;
|
||||
trackUserProfileAction({action: env0_14 ? 'PRESS_REMOVE_TIME_OUT' : 'PRESS_TIME_OUT_USER'});
|
||||
hideActionSheet();
|
||||
const binding = env0_14;
|
||||
const guildDisableCommunicationActionCreatorsNativeModule = require(10299) /* metro dependency 10299: GuildDisableCommunicationActionCreatorsNative */;
|
||||
if (binding) {
|
||||
openEnableCommunication = guildDisableCommunicationActionCreatorsNativeModule.openEnableCommunication;
|
||||
memberBinding = member;
|
||||
Reflect.apply(openEnableCommunication, guildDisableCommunicationActionCreatorsNativeModule,
|
||||
[{guildId: memberBinding.guildId, userId: memberBinding.userId, cancelButtonCallback: showUserProfile}]);
|
||||
} else {
|
||||
openDisableCommunication = guildDisableCommunicationActionCreatorsNativeModule.openDisableCommunication;
|
||||
memberBinding = member;
|
||||
Reflect.apply(openDisableCommunication, guildDisableCommunicationActionCreatorsNativeModule,
|
||||
[{guildId: memberBinding.guildId, userId: memberBinding.userId, cancelButtonCallback: showUserProfile}]);
|
||||
}
|
||||
}
|
||||
|
||||
function UserProfileModeratorActionsOnPress_79810() { // fn#79810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:7266, owner: UserProfileModeratorActions.onPress, offset: 0x01e639c2, size: 74 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(8796) /* metro dependency 8796: UserProfileAlertUtils */).confirmThreadRemove({isForumPost: env0_11,
|
||||
user: user, onConfirm: function() {
|
||||
trackUserProfileAction({action: 'PRESS_REMOVE_FROM_THREAD'});
|
||||
importDefault(dependencyMap[54]).removeMember(channelId, user.id, 'Context Menu');
|
||||
hideActionSheet();
|
||||
}});
|
||||
}
|
||||
|
||||
function _fun79793({channel}) { // fn#79793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:2441, offset: 0x01e63212, size: 291 bytes, params: 2, frame: 23
|
||||
var r1;
|
||||
var r2;
|
||||
var r0;
|
||||
var resultBinding;
|
||||
var value3;
|
||||
var can;
|
||||
const id = channel.id;
|
||||
let value = environment.__proto__;
|
||||
const value2 = id !== voiceChannel.id;
|
||||
if (value2) {
|
||||
resultBinding = result;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
can = PermissionStore.can;
|
||||
if (resultBinding) {
|
||||
value = Reflect.apply(can, PermissionStore, [Permissions.CONNECT, channel]);
|
||||
if (value) {
|
||||
value = require(4800) /* metro dependency 4800: ChannelUtils */;
|
||||
value = !value.isChannelFull(channel, VoiceStateStore, GuildStore);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = Reflect.apply(can, PermissionStore, [Permissions.MOVE_MEMBERS,
|
||||
channel]) && (PermissionStore.can(Permissions.CONNECT,
|
||||
channel) || (importAll(3789) /* metro dependency 3789: PermissionUtils */).can({permission: Permissions.CONNECT,
|
||||
|
||||
|
||||
user: user, context: channel}));
|
||||
if (r1) {
|
||||
value = require(4800) /* metro dependency 4800: ChannelUtils */;
|
||||
value = !value.isChannelFull(channel, VoiceStateStore, GuildStore);
|
||||
r1 = value;
|
||||
}
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function onPressOnSelect({id}) { // fn#79798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:3975, owner: UserProfileModeratorActions.onPress.onSelect, offset: 0x01e634ee, size: 69 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
|
||||
const setChannel = value.setChannel;
|
||||
const id = guild.id;
|
||||
return Reflect.apply(setChannel, value, [id, user.id, id]);
|
||||
}
|
||||
|
||||
function onPressOnClose_79800() { // fn#79800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:4337, owner: UserProfileModeratorActions.onPress.onClose, offset: 0x01e635d2, size: 48 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
value = environment.__proto__;
|
||||
showUserProfile();
|
||||
}
|
||||
|
||||
function onPressOnRemove() { // fn#79801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10474:4371, owner: UserProfileModeratorActions.onPress.onRemove, offset: 0x01e63602, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* Metro module 8817; source: modules/user_profile/native/UserProfileMutualGuilds.tsx; dependencies: [31, 27, 8516, 33, 4501, 8514, 8818, 8820, 4080, 8822, 1962, 6947, 5278, 8863, 6819, 4573, 8823, 2] */
|
||||
function _fun68920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9002:6, offset: 0x01c6194d, size: 255 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexDirection': 'row',
|
||||
'columnGap': 4, 'flexWrap': 'wrap'}, section: {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': 6}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileMutualGuilds.tsx');
|
||||
exports.default = UserProfileMutualGuilds;
|
||||
}
|
||||
|
||||
function UserProfileMutualGuilds({user}) { // fn#68921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9002:424, offset: 0x01c61a4c, size: 462 bytes, params: 2, frame: 26
|
||||
var length;
|
||||
var value3;
|
||||
var PressableOpacity;
|
||||
var GuildIconPile;
|
||||
var XXSMALL;
|
||||
var items2;
|
||||
var Text;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const mutualGuilds = (importDefault(8818) /* metro dependency 8818: useUserProfileMutuals */)(user).mutualGuilds;
|
||||
if ((importDefault(8820) /* metro dependency 8820: useShouldShowMutualInfo */)(user)) {
|
||||
if (mutualGuilds == null) {
|
||||
return null;
|
||||
}
|
||||
length = mutualGuilds.length;
|
||||
if (length === 0) {
|
||||
return null;
|
||||
}
|
||||
value3 = mutualGuilds.slice(0, 3).map(function(a0) {
|
||||
return a0.guild;
|
||||
});
|
||||
var viewBindingProps = {style: styles.container};
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {style: styles.section, accessibilityRole: 'button', onPress: onPress_68923};
|
||||
GuildIconPile = (require(8863) /* metro dependency 8863: GuildIconPileNative */).GuildIconPile;
|
||||
XXSMALL = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL;
|
||||
length = value3.length;
|
||||
items2 = [<GuildIconPile size={XXSMALL} totalCount={length} names={value3.map(_fun68925)}>{value3.map(_fun68926)}</GuildIconPile>];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = importDefault(8823) /* metro dependency 8823: getMutualGuildsLabel */;
|
||||
length = mutualGuilds.length;
|
||||
items2[1] = <Text variant="text-sm/medium" color="text-default">{value(length)}</Text>;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
{items2}
|
||||
</PressableOpacity>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function UserProfileMutualGuildsOnPress() { // fn#68923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9002:779, owner: UserProfileMutualGuilds.onPress, offset: 0x01c61c24, size: 152 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const MUTUAL_GUILDS = UserProfileSections.MUTUAL_GUILDS;
|
||||
trackUserProfileAction({action: 'PRESS_SECTION', section: MUTUAL_GUILDS});
|
||||
const defaultImport = importDefault(dependencyMap[8]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[10]);
|
||||
value = value(dependencyMap[9], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'UserProfileMutualGuildsActionSheet', {user: user,
|
||||
onPressMutualGuild: onPressMutualGuild_68924}, 'stack']);
|
||||
}
|
||||
|
||||
function _fun68926(a0) { // fn#68926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9002:1231, offset: 0x01c61d2a, size: 81 bytes, params: 2, frame: 19
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const XXSMALL = GuildIconSizes.XXSMALL;
|
||||
return (
|
||||
<GuildIcon
|
||||
guild={a0}
|
||||
size={XXSMALL}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onPressOnPressMutualGuild(a0) { // fn#68924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9002:956, owner: UserProfileMutualGuilds.onPress.onPressMutualGuild, offset: 0x01c61cbc, size: 110 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
trackUserProfileAction({action: 'PRESS_MUTUAL_GUILD'});
|
||||
value = environment.__proto__.__proto__;
|
||||
(require(6947) /* metro dependency 6947: transitionToGuildNative */).transitionToGuild(a0);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 8822; source: modules/user_profile/native/UserProfileMutualGuildsActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 8818, 8694, 8823, 8824, 8828, 2] */
|
||||
function _fun68945(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9007:6, offset: 0x01c624bc, size: 292 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.ActivityIndicator;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.container = {'flex': 1, 'gap': 20, paddingTop: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.loadingState = {paddingTop: PX_8, alignItems: 'center'};
|
||||
object2.emptyState = {alignItems: 'center'};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileMutualGuildsActionSheet.tsx');
|
||||
exports.default = UserProfileMutualGuildsActionSheet;
|
||||
}
|
||||
|
||||
function UserProfileMutualGuildsActionSheet({user, onPressMutualGuild}) { // fn#68946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9007:450, offset: 0x01c625e0, size: 362 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const mutualGuilds = (importDefault(8818) /* metro dependency 8818: useUserProfileMutuals */)(user).mutualGuilds;
|
||||
return ((Component) => <Component scrollable title={(importDefault(8823) /* metro dependency 8823: getMutualGuildsLabel */)(mutualGuilds?.length)}><View style={styles.container}>{mutualGuilds == null ? <View style={styles.loadingState}><ActivityIndicator /></View> : mutualGuilds.length === 0 ? <View style={styles.emptyState}>{((NoMutualServers) => <NoMutualServers />)((require(8824) /* metro dependency 8824: NoMutualServers */).NoMutualServers)}</View> : ((UserProfileStackedActionSheetList) => <UserProfileStackedActionSheetList data={mutualGuilds} keyExtractor={function(a0) {
|
||||
return a0.guild.id;
|
||||
}} renderItem={renderItem_68948} />)((require(8694) /* metro dependency 8694: UserProfileStackedActionSheet */).UserProfileStackedActionSheetList)}</View></Component>)(importDefault(8694) /* metro dependency 8694: UserProfileStackedActionSheet */);
|
||||
}
|
||||
|
||||
function UserProfileMutualGuildsActionSheetRenderItem({item, start, end}) { // fn#68948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9007:898, owner: UserProfileMutualGuildsActionSheet.renderItem, offset: 0x01c62759, size: 104 bytes, params: 2, frame: 18
|
||||
const MutualGuildRow = (require(8828) /* metro dependency 8828: UserProfileMutualsActionSheet */).MutualGuildRow;
|
||||
return (
|
||||
<MutualGuildRow
|
||||
user={user}
|
||||
mutualGuild={item}
|
||||
onPress={function() {
|
||||
return onPressMutualGuild(item.guild.id);
|
||||
}}
|
||||
start={start}
|
||||
end={end}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
/* Metro module 10484; source: modules/user_profile/native/UserProfileMutuals.tsx; dependencies: [31, 27, 8516, 6816, 33, 4501, 8514, 8818, 8820, 4080, 8828, 1962, 8743, 6947, 5278, 10251, 1305, 4573, 8854, 8863, 6819, 8823, 2] */
|
||||
function _fun81124(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:6, offset: 0x01e9aac3, size: 277 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
const env0_5 = (require(6816) /* metro dependency 6816: Constants */).DIVIDER_DOT;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexDirection': 'row',
|
||||
'columnGap': 4, 'flexWrap': 'wrap'}, section: {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': 6}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileMutuals.tsx');
|
||||
exports.default = UserProfileMutuals;
|
||||
}
|
||||
|
||||
function UserProfileMutuals({user, guildId}) { // fn#81125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:477, offset: 0x01e9abd8, size: 364 bytes, params: 2, frame: 21
|
||||
var r6;
|
||||
var r7;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useUserProfileAnalyticsContext();
|
||||
const env0_3 = value2.context;
|
||||
const env0_4 = value2.trackUserProfileAction;
|
||||
const {mutualFriends, mutualGuilds} = (importDefault(8818) /* metro dependency 8818: useUserProfileMutuals */)(user);
|
||||
if ((importDefault(8820) /* metro dependency 8820: useShouldShowMutualInfo */)(user)) {
|
||||
r6 = mutualFriends != null && mutualFriends.length > 0;
|
||||
r7 = mutualGuilds != null && mutualGuilds.length > 0;
|
||||
if (r6) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
items2 = [_fun81129()];
|
||||
r6 = r6 && r7;
|
||||
r6 = r6 && ((Text) => <Text variant="text-sm/medium" color="text-default" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{DIVIDER_DOT}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items2[1] = r6;
|
||||
items2[2] = _fun81134();
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (r7) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
items2 = [_fun81129()];
|
||||
r6 = r6 && r7;
|
||||
r6 = r6 && ((Text) => <Text variant="text-sm/medium" color="text-default" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{DIVIDER_DOT}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items2[1] = r6;
|
||||
items2[2] = _fun81134();
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function UserProfileMutualsHandlePress(a0) { // fn#81126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:778, owner: UserProfileMutuals.handlePress, offset: 0x01e9ad44, size: 168 bytes, params: 2, frame: 20
|
||||
trackUserProfileAction({action: 'PRESS_SECTION', section: a0});
|
||||
let defaultImport = importDefault(dependencyMap[9]);
|
||||
defaultImport.openLazy(require(dependencyMap[11])(dependencyMap[10], dependencyMap.paths),
|
||||
'UserProfileMutualsActionSheet', {user: user, section: a0, guildId: guildId, onPressMutualFriend: function(a0) {
|
||||
trackUserProfileAction({action: 'PRESS_MUTUAL_FRIEND'});
|
||||
var defaultImport = importDefault(dependencyMap[12]);
|
||||
object = {};
|
||||
copyDataProperties(object, context, dependencyMap);
|
||||
object['userId'] = a0;
|
||||
defaultImport(object);
|
||||
}, onPressMutualGuild: onPressMutualGuild_81128}, 'stack');
|
||||
}
|
||||
|
||||
function _fun81129() { // fn#81129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:1197, offset: 0x01e9aeab, size: 324 bytes, params: 1, frame: 24
|
||||
var environment;
|
||||
var mutualFriendsBinding;
|
||||
var value3;
|
||||
var value4;
|
||||
var PressableOpacity;
|
||||
var AvatarPile;
|
||||
var SIZE_16;
|
||||
var length;
|
||||
var items2;
|
||||
var Text;
|
||||
var value;
|
||||
if (env0_7) {
|
||||
mutualFriendsBinding = mutualFriends;
|
||||
value3 = mutualFriendsBinding.slice(0, 3).map(function(a0) {
|
||||
return a0.user;
|
||||
});
|
||||
value4 = environment.__proto__;
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {style: styles.section, accessibilityRole: 'button', onPress: onPress_81131};
|
||||
AvatarPile = (require(10251) /* metro dependency 10251: AvatarPileNative */).AvatarPile;
|
||||
SIZE_16 = (require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16;
|
||||
length = value3.length;
|
||||
value = <AvatarPile size={SIZE_16} totalCount={length} names={value3.map(_fun81132)}>{value3.map(_fun81133)}</AvatarPile>;
|
||||
items2 = [value];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = importDefault(8854) /* metro dependency 8854: getMutualFriendsLabel */;
|
||||
length = mutualFriendsBinding.length;
|
||||
items2[1] = <Text variant="text-sm/medium" color="text-default">{value(length)}</Text>;
|
||||
return (
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
{items2}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun81134() { // fn#81134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:1812, offset: 0x01e9b063, size: 358 bytes, params: 1, frame: 24
|
||||
var environment;
|
||||
var value3;
|
||||
var value4;
|
||||
var PressableOpacity;
|
||||
var items2;
|
||||
if (env0_8) {
|
||||
value3 = mutualGuilds.slice(0, 3).map(function(a0) {
|
||||
return a0.guild;
|
||||
});
|
||||
value4 = environment.__proto__;
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {style: styles.section, accessibilityRole: 'button', onPress: onPress_81136};
|
||||
items2 = [!env0_7 && ((GuildIconPile) => <GuildIconPile size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL} totalCount={value3.length} names={value3.map(_fun81137)}>{value3.map(_fun81138)}</GuildIconPile>)((require(8863) /* metro dependency 8863: GuildIconPileNative */).GuildIconPile)];
|
||||
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-default">{(importDefault(8823) /* metro dependency 8823: getMutualGuildsLabel */)(mutualGuilds.length)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
{items2}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function handlePressOnPressMutualGuild(a0) { // fn#81128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:1025, owner: UserProfileMutuals.handlePress.onPressMutualGuild, offset: 0x01e9ae3d, size: 110 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
trackUserProfileAction({action: 'PRESS_MUTUAL_GUILD'});
|
||||
value = environment.__proto__.__proto__;
|
||||
(require(6947) /* metro dependency 6947: transitionToGuildNative */).transitionToGuild(a0);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function onPress_81131() { // fn#81131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:1347, offset: 0x01e9afef, size: 29 bytes, params: 1, frame: 11
|
||||
const MUTUAL_FRIENDS = UserProfileSections.MUTUAL_FRIENDS;
|
||||
return UserProfileMutualsHandlePress(MUTUAL_FRIENDS);
|
||||
}
|
||||
|
||||
function _fun81133(a0) { // fn#81133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:1517, offset: 0x01e9b00c, size: 87 bytes, params: 2, frame: 19
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const SIZE_16 = AvatarSizes.SIZE_16;
|
||||
return (
|
||||
<Avatar
|
||||
user={a0}
|
||||
size={SIZE_16}
|
||||
guildId={undefined}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onPress_81136() { // fn#81136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:1963, offset: 0x01e9b1c9, size: 29 bytes, params: 1, frame: 11
|
||||
const MUTUAL_GUILDS = UserProfileSections.MUTUAL_GUILDS;
|
||||
return UserProfileMutualsHandlePress(MUTUAL_GUILDS);
|
||||
}
|
||||
|
||||
function _fun81138(a0) { // fn#81138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10670:2138, offset: 0x01e9b1e6, size: 81 bytes, params: 2, frame: 19
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const XXSMALL = GuildIconSizes.XXSMALL;
|
||||
return (
|
||||
<GuildIcon
|
||||
guild={a0}
|
||||
size={XXSMALL}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/* Metro module 8828; source: modules/user_profile/native/UserProfileMutualsActionSheet.tsx; dependencies: [57, 31, 27, 4396, 8516, 33, 4501, 697, 4618, 566, 6238, 1305, 4617, 8829, 6819, 4573, 8818, 8853, 8854, 8855, 8694, 8823, 8824, 1244, 8859, 8861, 2] */
|
||||
function _fun68962(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9013:6, offset: 0x01c62aed, size: 461 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = MutualGuildRow;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.ActivityIndicator;
|
||||
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
||||
const env0_8 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.container = {'flex': 1, 'gap': 20, paddingTop: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.loadingState = {paddingTop: PX_8, alignItems: 'center'};
|
||||
object2.emptyState = {alignItems: 'center'};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object2.activityStatusText = {color: TEXT_SUBTLE};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.mutualGuildSubLabel = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileMutualsActionSheet.tsx');
|
||||
exports.default = UserProfileMutualsActionSheet;
|
||||
exports.MutualGuildRow = closure;
|
||||
}
|
||||
|
||||
function MutualFriendRow(a0) { // fn#68963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9013:543, offset: 0x01c62cba, size: 373 bytes, params: 2, frame: 31
|
||||
const user = a0.mutualFriend.user;
|
||||
const guildId = a0.guildId;
|
||||
const onPress = a0.onPress;
|
||||
const start = a0.start;
|
||||
const end = a0.end;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4618) /* metro dependency 4618: useAvatarDecoration */).useAvatarDecoration(user);
|
||||
const {status, isMobileOnline,
|
||||
isVROnline} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore],
|
||||
function() {
|
||||
var object = {};
|
||||
var userBinding = user;
|
||||
object.status = PresenceStore.getStatus(userBinding.id);
|
||||
object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id);
|
||||
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
|
||||
return object;
|
||||
});
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
||||
return (
|
||||
<TableRow
|
||||
onPress={onPress}
|
||||
icon={<Avatar user={user} size={REFRESH_MEDIUM_32} avatarDecoration={value2} status={status} guildId={guildId} isMobileOnline={isMobileOnline} isVROnline={isVROnline} autoStatusCutout />}
|
||||
label={(importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, undefined, user)}
|
||||
subLabel={((Component) => <Component userId={user.id} guildId={guildId} textStyle={styles.activityStatusText} />)(importDefault(8829) /* metro dependency 8829: ActivityStatus */)}
|
||||
start={start}
|
||||
end={end}
|
||||
key={user.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function MutualGuildRow(a0) { // fn#68965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9013:1193, offset: 0x01c62e87, size: 456 bytes, params: 2, frame: 31
|
||||
const {guild, nick} = a0.mutualGuild;
|
||||
const user = a0.user;
|
||||
const onPress = a0.onPress;
|
||||
const start = a0.start;
|
||||
const end = a0.end;
|
||||
const styles = useStyles();
|
||||
const hasAvatarForGuild2 = user.hasAvatarForGuild(guild.id);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {onPress: onPress};
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const SMALL_32 = GuildIconSizes.SMALL_32;
|
||||
object2.icon = <GuildIcon guild={guild} size={SMALL_32} />;
|
||||
object2.label = guild.name;
|
||||
const items2 = [hasAvatarForGuild2 && ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} user={user} guildId={guild.id} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
|
||||
items2[1] = nick != null && ((Text) => <Text variant="text-xs/medium" color="text-subtle">{nick}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items2[2] = nick == null && hasAvatarForGuild2 && ((Text) => <Text variant="text-xs/medium" color="text-subtle">{user.username}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
object2.subLabel = <View style={styles.mutualGuildSubLabel}>{items2}</View>;
|
||||
object2.start = start;
|
||||
object2.end = end;
|
||||
return <TableRow {...object2} key={guild.id} />;
|
||||
}
|
||||
|
||||
function UserProfileMutualsActionSheet({user, section, guildId, onPressMutualFriend, onPressMutualGuild}) { // fn#68966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9013:1874, offset: 0x01c6304f, size: 998 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const [property, env0_4] = onPressMutualGuild(env0_4Binding.useState(0), 2);
|
||||
const {mutualFriends, mutualGuilds} = (importDefault(8818) /* metro dependency 8818: useUserProfileMutuals */)(user);
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
let object3 = {pageWidth: property};
|
||||
const MUTUAL_GUILDS = UserProfileSections.MUTUAL_GUILDS;
|
||||
object3.defaultIndex = section !== MUTUAL_GUILDS ? 0 : 1;
|
||||
const object4 = {id: 'mutual-friends'};
|
||||
object4.label = (importDefault(8854) /* metro dependency 8854: getMutualFriendsLabel */)(mutualFriends?.length);
|
||||
object4.page = mutualFriends == null ? <View style={styles.loadingState}><ActivityIndicator /></View> : mutualFriends.length === 0 ? <View style={styles.emptyState}>{((NoMutualFriends) => <NoMutualFriends />)((require(8855) /* metro dependency 8855: NoMutualFriends */).NoMutualFriends)}</View> : ((UserProfileStackedActionSheetList) => <UserProfileStackedActionSheetList data={mutualFriends} keyExtractor={function(a0) {
|
||||
return a0.user.id;
|
||||
}} renderItem={renderItem_68968} />)((require(8694) /* metro dependency 8694: UserProfileStackedActionSheet */).UserProfileStackedActionSheetList);
|
||||
const items2 = [object4];
|
||||
const object5 = {id: 'mutual-guilds'};
|
||||
object5.label = (importDefault(8823) /* metro dependency 8823: getMutualGuildsLabel */)(mutualGuilds?.length);
|
||||
object5.page = mutualGuilds == null ? <View style={styles.loadingState}><ActivityIndicator /></View> : mutualGuilds.length === 0 ? <View style={styles.emptyState}>{((NoMutualServers) => <NoMutualServers />)((require(8824) /* metro dependency 8824: NoMutualServers */).NoMutualServers)}</View> : ((UserProfileStackedActionSheetList) => <UserProfileStackedActionSheetList data={mutualGuilds} keyExtractor={function(a0) {
|
||||
return a0.guild.id;
|
||||
}} renderItem={renderItem_68971} />)((require(8694) /* metro dependency 8694: UserProfileStackedActionSheet */).UserProfileStackedActionSheetList);
|
||||
items2[1] = object5;
|
||||
object3.items = items2;
|
||||
const value14 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object3]);
|
||||
const value15 = env0_4Binding.useCallback(_fun68973, []);
|
||||
const UserProfileStackedActionSheet = importDefault(8694) /* metro dependency 8694: UserProfileStackedActionSheet */;
|
||||
object3 = {scrollable: true};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object3.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['l2/aLi']);
|
||||
const Tabs = (require(8859) /* metro dependency 8859: TabsNative */).Tabs;
|
||||
const view = <View><Tabs state={value14} /></View>;
|
||||
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
|
||||
return (
|
||||
<UserProfileStackedActionSheet {...object3}>
|
||||
<View style={styles.container} onLayout={value15}>
|
||||
{view}
|
||||
<SegmentedControlPages state={value14} />
|
||||
</View>
|
||||
</UserProfileStackedActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileMutualsActionSheetRenderItem({item, start, end}) { // fn#68968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9013:2469, owner: UserProfileMutualsActionSheet.renderItem, offset: 0x01c63435, size: 82 bytes, params: 2, frame: 16
|
||||
return (
|
||||
<MutualFriendRow
|
||||
mutualFriend={item}
|
||||
guildId={guildId}
|
||||
onPress={function() {
|
||||
return onPressMutualFriend(item.user.id);
|
||||
}}
|
||||
start={start}
|
||||
end={end}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileMutualsActionSheetRenderItem_68971({item, start, end}) { // fn#68971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9013:2875, owner: UserProfileMutualsActionSheet.renderItem, offset: 0x01c634a8, size: 82 bytes, params: 2, frame: 17
|
||||
return (
|
||||
<MutualGuildRow
|
||||
user={user}
|
||||
mutualGuild={item}
|
||||
onPress={function() {
|
||||
return onPressMutualGuild(item.guild.id);
|
||||
}}
|
||||
start={start}
|
||||
end={end}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/* Metro module 13221; source: modules/user_profile/native/UserProfileNameplateEditButton.tsx; dependencies: [31, 27, 1945, 6816, 482, 33, 4501, 697, 566, 8402, 13222, 4080, 13223, 1962, 13209, 1244, 8483, 1305, 8411, 2] */
|
||||
function _fun100858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13411:6, offset: 0x021fd03a, size: 340 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.ActivityIndicator;
|
||||
const env0_5 = value.View;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const COLLECTIBLES_PREVIEW_SIZE = (require(6816) /* metro dependency 6816: Constants */).COLLECTIBLES_PREVIEW_SIZE;
|
||||
const env0_7 = (require(482) /* metro dependency 482: Constants */).NOOP;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {height: COLLECTIBLES_PREVIEW_SIZE, width: COLLECTIBLES_PREVIEW_SIZE};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.overflow = 'hidden';
|
||||
object3.previewContainer = object4;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object3.noneIcon = {tintColor: TEXT_SUBTLE};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileNameplateEditButton.tsx');
|
||||
exports.default = UserProfileNameplateEditButton;
|
||||
}
|
||||
|
||||
function UserProfileNameplateEditButton({user, pendingNameplate, guildId}) { // fn#100859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13411:487, offset: 0x021fd18e, size: 998 bytes, params: 2, frame: 26
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton;
|
||||
const styles = useStyles();
|
||||
const value3 = guildId != null;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun100860);
|
||||
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
|
||||
const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
|
||||
object2 = {pendingValue: pendingNameplate};
|
||||
object2.userValue = user.collectibles?.nameplate;
|
||||
object2.guildValue = value4 == null ? undefined : value4.collectibles?.nameplate;
|
||||
object2.guildId = guildId;
|
||||
const {nameplateProduct, nameplateRecord, nameplateData,
|
||||
isFetching} = (require(13222) /* metro dependency 13222: useFetchNameplate */).useFetchNameplate(Reflect.apply(getProfilePreviewValue,
|
||||
profileCustomizationUtilsModule, [object2])?.skuId);
|
||||
let r0 = value3 ? value4 == null || value4.collectibles == null ? undefined : value4.collectibles.nameplate : user.collectibles?.nameplate;
|
||||
r0 = pendingNameplate !== undefined ? pendingNameplate : r0;
|
||||
const value7 = r0.useCallback(_fun100861, [user, r0, guildId]);
|
||||
if (isFetching) {
|
||||
return (
|
||||
<UserProfileEditFormButton
|
||||
label={intl.string(t.x5CoXR)}
|
||||
buttonText={intl.string(t.MKDeyL)}
|
||||
onPress={NOOP}
|
||||
leading={<ActivityIndicator animating size="large" />}
|
||||
loading
|
||||
disabled
|
||||
hideArrow
|
||||
/>
|
||||
);
|
||||
}
|
||||
const r13 = nameplateProduct?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe);
|
||||
const r12 = value3 ? r0 != null ? r13 : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ep5D4i,
|
||||
{label: r13}) : r13;
|
||||
return (
|
||||
<UserProfileEditFormButton
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x5CoXR)}
|
||||
buttonText={r12}
|
||||
accessibilityValue={{text: r12}}
|
||||
onPress={value7}
|
||||
leading={nameplateData == null || nameplateRecord == null ? ((Icon) => <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />)((require(1305) /* metro dependency 1305: native */).Icon) : nameplateProduct != null ? <View style={styles.previewContainer}>{((Component) => <Component nameplate={nameplateData} fullOpacity isSquarePreview />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}</View> : ((Icon) => <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100860() { // fn#100860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13411:630, offset: 0x021fd574, size: 46 bytes, params: 1, frame: 14
|
||||
return result ? GuildMemberStore.getMember(guildId, user.id) : null;
|
||||
}
|
||||
|
||||
function _fun100861() { // fn#100861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13411:1104, offset: 0x021fd5a2, size: 110 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[11]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[13]);
|
||||
value = value(dependencyMap[12], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'Edit Nameplate', {user: user, currentNameplate: env0_3,
|
||||
guildId: guildId}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Metro module 10327; source: modules/user_profile/native/UserProfileNote.tsx; dependencies: [31, 33, 4501, 8514, 10328, 10330, 10332, 5278, 1244, 4080, 10334, 6815, 4573, 2] */
|
||||
function _fun80070(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10513:6, offset: 0x01e6bcea, size: 182 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {justifyContent: 'space-between'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileNote.tsx');
|
||||
exports.default = UserProfileNote;
|
||||
}
|
||||
|
||||
function UserProfileNote({userId, style, onBack}) { // fn#80071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10513:275, offset: 0x01e6bda0, size: 565 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_2 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const note = (importDefault(10328) /* metro dependency 10328: useNote */)(userId).note;
|
||||
let r7 = note != null && note !== '';
|
||||
const r12 = r7 ? (require(10330) /* metro dependency 10330: PaperIcon */).PaperIcon : (require(10332) /* metro dependency 10332: PaperPlusIcon */).PaperPlusIcon;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object2 = {accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.accessibilityHint = r7 ? Reflect.apply(string, intl, [t['gs+qcM']]) : Reflect.apply(string, intl,
|
||||
[t['1ZZtts']]);
|
||||
object2.accessibilityLabel = note ?? undefined;
|
||||
object2.onPress = onPress_80072;
|
||||
object2.activeOpacity = 0.8;
|
||||
const UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
const userProfileCardProps = {style: style,
|
||||
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['mQKv+v']),
|
||||
titleStyle: [styles.title, !r7 && ({marginBottom: 0})],
|
||||
titleIcon: ((Component) => <Component size="xs" color="interactive-text-default" />)(r12)};
|
||||
r7 = r7 && ((Text) => <Text variant="text-md/normal" color="text-default">{note}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<PressableOpacity {...object2}>
|
||||
<UserProfileCard {...userProfileCardProps}>
|
||||
{r7}
|
||||
</UserProfileCard>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileNoteOnPress() { // fn#80072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10513:693, owner: UserProfileNote.onPress, offset: 0x01e6bfd5, size: 90 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(10334) /* metro dependency 10334: openEditNoteModal */)({userId: userId, onBack: onBack,
|
||||
onSave: function() {
|
||||
return trackUserProfileAction({action: 'SET_NOTE'});
|
||||
}});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,572 @@
|
||||
/* Metro module 10475; source: modules/user_profile/native/UserProfileOverflowMenu.tsx; dependencies: [57, 31, 4606, 1379, 3793, 1934, 661, 4299, 8781, 33, 566, 10476, 10482, 8782, 8514, 6771, 6789, 8490, 8917, 4619, 6796, 8742, 480, 8743, 1244, 4603, 4080, 5080, 10483, 1962, 8783, 8793, 6264, 8794, 8153, 477, 8796, 683, 8916, 7709, 3829, 6797, 3995, 3856, 6803, 8810, 8811, 8341, 8638, 697, 2] */
|
||||
function _fun81047(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6, offset: 0x01e97422, size: 338 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = value.AnalyticEvents;
|
||||
const env0_10 = value.AVATAR_MAX_SIZE;
|
||||
const env0_11 = value.ChannelTypesSets;
|
||||
const env0_12 = value.NOOP;
|
||||
const env0_13 = value.RelationshipTypes;
|
||||
const env0_14 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
value = require(8781) /* metro dependency 8781: RestrictionConfirmationConstants */;
|
||||
const env0_15 = value.BLOCK_CONFIRMATION_ACTION_SHEET_KEY;
|
||||
const env0_16 = value.IGNORE_CONFIRMATION_ACTION_SHEET_KEY;
|
||||
const env0_17 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileOverflowMenu.tsx');
|
||||
exports.default = UserProfileOverflowMenu;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenu({user, currentUser, displayProfile, channel}) { // fn#81048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:489, offset: 0x01e97574, size: 2811 bytes, params: 2, frame: 42
|
||||
var r18;
|
||||
var r22;
|
||||
var push;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object3;
|
||||
var recipients;
|
||||
var object4;
|
||||
var object8;
|
||||
var object16;
|
||||
var object20;
|
||||
var moduleValue8;
|
||||
var object21;
|
||||
var object22;
|
||||
var object23;
|
||||
var object24;
|
||||
var object25;
|
||||
var object26;
|
||||
var object27;
|
||||
const {relationshipType,
|
||||
isIgnored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore],
|
||||
function() {
|
||||
var object = {};
|
||||
var userBinding = user;
|
||||
object.relationshipType = RelationshipStore.getRelationshipType(userBinding.id);
|
||||
object.isIgnored = RelationshipStore.isIgnored(userBinding.id);
|
||||
return object;
|
||||
});
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SelectedChannelStore,
|
||||
ChannelStore], function() {
|
||||
var object = {};
|
||||
object.selectedChannel = ChannelStore.getChannel(SelectedChannelStore.getChannelId());
|
||||
object.selectedVoiceChannelId = SelectedChannelStore.getVoiceChannelId();
|
||||
object.selectedVoiceChannel = ChannelStore.getChannel(SelectedChannelStore.getVoiceChannelId());
|
||||
return object;
|
||||
});
|
||||
const selectedChannel = value4.selectedChannel;
|
||||
const env0_3 = selectedChannel;
|
||||
const selectedVoiceChannelId = value4.selectedVoiceChannelId;
|
||||
const env0_4 = selectedVoiceChannelId;
|
||||
const selectedVoiceChannel = value4.selectedVoiceChannel;
|
||||
const guildInviteUtilsModule = require(10476) /* metro dependency 10476: GuildInviteUtils */;
|
||||
const useServerInviteRows = guildInviteUtilsModule.useServerInviteRows;
|
||||
let id = user.id;
|
||||
const value6 = env0_3(Reflect.apply(useServerInviteRows, guildInviteUtilsModule, [id]), 2);
|
||||
const property = value6[0];
|
||||
const property2 = value6[1];
|
||||
const value9 = RelationshipStore.getNickname(user.id) != null;
|
||||
const r12 = (importDefault(10482) /* metro dependency 10482: useCanDM */)(user.id) && property.length + property2.length > 0;
|
||||
const isIarUserReportingEnabled2 = (require(8782) /* metro dependency 8782: SafetyExperienceIarUserReportingExperiment */).isIarUserReportingEnabled('User Profile Options - Mobile');
|
||||
const value12 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useUserProfileAnalyticsContext();
|
||||
const context = value12.context;
|
||||
const env0_7 = value12.trackUserProfileAction;
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const USER_PROFILE_OVERFLOW_MENU = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_OVERFLOW_MENU;
|
||||
const value13 = defaultImport2(USER_PROFILE_OVERFLOW_MENU);
|
||||
const analyticsLocations = value13.analyticsLocations;
|
||||
const env0_9 = value13.newestAnalyticsLocation;
|
||||
const value14 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, channel?.guild_id);
|
||||
const value15 = (require(8917) /* metro dependency 8917: useCanRing */).useCanRing(user, 'UserProfileOverflowMenu',
|
||||
selectedVoiceChannelId);
|
||||
const defaultImport4 = importDefault(4619) /* metro dependency 4619: GuildVoiceRingingExperiment */;
|
||||
let useExperiment = defaultImport4.useExperiment;
|
||||
const enabled = Reflect.apply(useExperiment, defaultImport4, [{guildId: selectedVoiceChannel?.guild_id,
|
||||
location: 'UserProfileOverflowMenu'}]).enabled;
|
||||
const defaultImport5 = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
|
||||
useExperiment = defaultImport5.useExperiment;
|
||||
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport5, [{location: 'UserProfileOverflowMenu'},
|
||||
{autoTrackExposure: false}]).tidaWebformEnabled;
|
||||
const value16 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelRTCStore],
|
||||
_fun81051);
|
||||
const userIsInCall = value16.userIsInCall;
|
||||
const r11 = value15 && selectedVoiceChannelId != null && (userIsInCall ? value16.isUserRinging : !userIsInCall);
|
||||
const defaultImport6 = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
object = {};
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const MENU = ImpressionTypes.MENU;
|
||||
object.type = MENU;
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const RING_TO_GUILD_VC_MENU_ITEM_SHOWN = ImpressionNames.RING_TO_GUILD_VC_MENU_ITEM_SHOWN;
|
||||
object.name = RING_TO_GUILD_VC_MENU_ITEM_SHOWN;
|
||||
object.properties = {voice_channel_id: selectedVoiceChannelId, voice_guild_id: selectedVoiceChannel?.guild_id};
|
||||
defaultImport6(object, {disableTrack: !(enabled && r11)}, [user.id]);
|
||||
const env0_13 = env0_4.useCallback(_fun81052, [user.id, channel?.id, context, analyticsLocations]);
|
||||
object = [];
|
||||
const items2 = [];
|
||||
id = user.id;
|
||||
const id2 = currentUser.id;
|
||||
const env0_15 = channel?.getGuildId();
|
||||
const BLOCKED = RelationshipTypes.BLOCKED;
|
||||
const value20 = relationshipType === BLOCKED;
|
||||
if (displayProfile?.guildId != null && (displayProfile == null || !displayProfile.private)) {
|
||||
push = object.push;
|
||||
object2 = {};
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GISTta);
|
||||
object2.action = action_81053;
|
||||
Reflect.apply(push, object, [object2]);
|
||||
}
|
||||
if (value14?.guildId != null && displayProfile?.guildId == null) {
|
||||
push = object.push;
|
||||
object3 = {};
|
||||
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DisZzB);
|
||||
object3.action = action_81054;
|
||||
Reflect.apply(push, object, [object3]);
|
||||
}
|
||||
if (id2 !== id) {
|
||||
r18 = channel != null && !channel.isThread();
|
||||
r18 = r18 && channel.isOwner(currentUser.id);
|
||||
if (r18) {
|
||||
recipients = channel.recipients;
|
||||
r18 = recipients != null;
|
||||
r22 = recipients;
|
||||
} else {
|
||||
r22 = undefined;
|
||||
}
|
||||
r18 = r18 && r22.includes(id);
|
||||
if (r18) {
|
||||
push = items2.push;
|
||||
object4 = {};
|
||||
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['n5zMI+']);
|
||||
object4.variant = 'destructive';
|
||||
object4.action = action_81055;
|
||||
Reflect.apply(push, items2, [object4]);
|
||||
}
|
||||
if (relationshipType === RelationshipTypes.FRIEND) {
|
||||
push = object.push;
|
||||
string = intl.string;
|
||||
Reflect.apply(push, object, [{label: value9 ? Reflect.apply(string, intl,
|
||||
[t['8pOYUE']]) : Reflect.apply(string,
|
||||
intl, [t.BGYkaH]), action: action_81056}]);
|
||||
}
|
||||
if (isIgnored) {
|
||||
if (value20) {
|
||||
if (!value20) {
|
||||
push = items2.push;
|
||||
object16 = {};
|
||||
object16.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs);
|
||||
object16.action = action_81058;
|
||||
Reflect.apply(push, items2, [object16]);
|
||||
}
|
||||
} else {
|
||||
push = items2.push;
|
||||
object8 = {};
|
||||
object8.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8wXU9B']);
|
||||
object8.action = action_81057;
|
||||
Reflect.apply(push, items2, [object8]);
|
||||
}
|
||||
} else if (!value20) {
|
||||
push = items2.push;
|
||||
object16 = {};
|
||||
object16.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs);
|
||||
object16.action = action_81058;
|
||||
Reflect.apply(push, items2, [object16]);
|
||||
}
|
||||
push = items2.push;
|
||||
if (value20) {
|
||||
object24 = {};
|
||||
object24.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyHpKH);
|
||||
object24.action = action_81059;
|
||||
Reflect.apply(push, items2, [object24]);
|
||||
} else {
|
||||
object20 = {};
|
||||
object20.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l4Emac);
|
||||
object20.variant = 'destructive';
|
||||
object20.action = action_81060;
|
||||
Reflect.apply(push, items2, [object20]);
|
||||
if (isIarUserReportingEnabled2) {
|
||||
push = items2.push;
|
||||
object22 = {};
|
||||
object22.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wqHXNt);
|
||||
object22.variant = 'destructive';
|
||||
object22.action = action_81062;
|
||||
Reflect.apply(push, items2, [object22]);
|
||||
} else {
|
||||
moduleValue8 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue8.isAndroid()) {
|
||||
push = items2.push;
|
||||
object21 = {};
|
||||
object21.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TbHyMG);
|
||||
object21.variant = 'destructive';
|
||||
object21.action = function() {
|
||||
trackUserProfileAction({action: 'REPORT', analyticsLocations: analyticsLocations});
|
||||
require(dependencyMap[36]).alertUserReported();
|
||||
var defaultImport = importDefault(dependencyMap[37]);
|
||||
var TNS_USER_REPORT_SUBMITTED = AnalyticEvents.TNS_USER_REPORT_SUBMITTED;
|
||||
defaultImport.track(TNS_USER_REPORT_SUBMITTED, {reported_user_id: id});
|
||||
};
|
||||
Reflect.apply(push, items2, [object21]);
|
||||
}
|
||||
}
|
||||
if (r12) {
|
||||
push = object.push;
|
||||
object23 = {};
|
||||
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Sd8Ixw);
|
||||
object23.action = action_81064;
|
||||
Reflect.apply(push, object, [object23]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (r11) {
|
||||
push = object.push;
|
||||
string = intl.string;
|
||||
Reflect.apply(push, object, [{label: userIsInCall ? Reflect.apply(string, intl,
|
||||
[t.ygslb0]) : Reflect.apply(string,
|
||||
intl, [t.bHa9kN]), action: action_81065}]);
|
||||
}
|
||||
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
|
||||
const setting = DeveloperMode.getSetting();
|
||||
if (!setting || !tidaWebformEnabled) {
|
||||
push = object.push;
|
||||
object25 = {};
|
||||
object25.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy);
|
||||
object25.action = action_81066;
|
||||
Reflect.apply(push, object, [object25]);
|
||||
}
|
||||
if (setting) {
|
||||
push = object.push;
|
||||
object26 = {};
|
||||
string = intl.string;
|
||||
if (tidaWebformEnabled) {
|
||||
object26.label = Reflect.apply(string, intl, [t.QvQeLv]);
|
||||
object26.action = action_81067;
|
||||
Reflect.apply(push, object, [object26]);
|
||||
} else {
|
||||
object26.label = Reflect.apply(string, intl, [t['/AXYnE']]);
|
||||
object26.action = action_81072;
|
||||
Reflect.apply(push, object, [object26]);
|
||||
}
|
||||
}
|
||||
if (channel != null && selectedChannel != null && ChannelTypesSets.TEXTUAL.has(selectedChannel.type)) {
|
||||
push = object.push;
|
||||
object27 = {};
|
||||
object27.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
|
||||
object27.action = action_81073;
|
||||
Reflect.apply(push, object, [object27]);
|
||||
}
|
||||
if (object.length !== 0) {
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{((ContextMenu) => <ContextMenu items={[object,
|
||||
items2]}>{children_81074}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)}
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
} else if (items2.length === 0) {
|
||||
return null;
|
||||
} else {
|
||||
const AnalyticsLocationProvider2 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
return (
|
||||
<AnalyticsLocationProvider2 value={analyticsLocations}>
|
||||
{((ContextMenu) => <ContextMenu items={[object,
|
||||
items2]}>{children_81074}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)}
|
||||
</AnalyticsLocationProvider2>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun81051() { // fn#81051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:1735, offset: 0x01e980fb, size: 115 bytes, params: 1, frame: 15
|
||||
var r1;
|
||||
var type;
|
||||
const r3 = env0_10 && selectedVoiceChannelId != null;
|
||||
const value3 = null;
|
||||
const r2 = r3 ? ChannelRTCStore.getParticipant(selectedVoiceChannelId, user.id) : value3;
|
||||
let value = value3 != r2;
|
||||
if (value) {
|
||||
type = r2.type;
|
||||
value = environment.__proto__;
|
||||
value = type === ParticipantTypes.USER;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r1 = r1 && r2.ringing;
|
||||
return {userIsInCall: value3 != r2, isUserRinging: r1};
|
||||
}
|
||||
|
||||
function _fun81052(a0) { // fn#81052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2170, offset: 0x01e9816e, size: 135 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const defaultImport = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, context, undefined);
|
||||
object2['showGuildProfile'] = a0;
|
||||
object2['userId'] = user.id;
|
||||
object2['channelId'] = channel == null ? value : channel.id;
|
||||
object2['sourceAnalyticsLocations'] = analyticsLocations;
|
||||
object2['ignoreBlockedSpeedBump'] = true;
|
||||
defaultImport(object2);
|
||||
return value;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction() { // fn#81053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2538, owner: UserProfileOverflowMenu.action, offset: 0x01e981f5, size: 48 bytes, params: 1, frame: 12
|
||||
trackUserProfileAction({action: 'PRESS_VIEW_MAIN_PROFILE', analyticsLocations: analyticsLocations});
|
||||
env0_13(false);
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81054() { // fn#81054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2742, owner: UserProfileOverflowMenu.action, offset: 0x01e98225, size: 45 bytes, params: 1, frame: 12
|
||||
trackUserProfileAction({action: 'PRESS_VIEW_SERVER_PROFILE', analyticsLocations: analyticsLocations});
|
||||
env0_13();
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81055() { // fn#81055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2991, owner: UserProfileOverflowMenu.action, offset: 0x01e98252, size: 77 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
value.removeRecipient(channel.id, id);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81056() { // fn#81056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3181, owner: UserProfileOverflowMenu.action, offset: 0x01e9829f, size: 147 bytes, params: 1, frame: 18
|
||||
trackUserProfileAction({action: 'PRESS_SET_FRIEND_NICKNAME', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(dependencyMap[27]);
|
||||
defaultImport.pushLazy(require(dependencyMap[29])(dependencyMap[28], dependencyMap.paths), {userId: id,
|
||||
showUserProfile: env0_13});
|
||||
importDefault(dependencyMap[26]).hideActionSheet();
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81057() { // fn#81057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3423, owner: UserProfileOverflowMenu.action, offset: 0x01e98332, size: 113 bytes, params: 1, frame: 18
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'UNIGNORE', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
defaultImport.unignoreUser(id, newestAnalyticsLocation, channel == null ? value2 : channel.id);
|
||||
env0_13();
|
||||
return value2;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81058() { // fn#81058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3594, owner: UserProfileOverflowMenu.action, offset: 0x01e983a3, size: 206 bytes, params: 1, frame: 21
|
||||
var object2;
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'IGNORE', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(dependencyMap[26]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value4 = require(dependencyMap[29])(dependencyMap[31], dependencyMap.paths);
|
||||
object2 = {};
|
||||
object2.userId = id;
|
||||
object2.channelId = channel == null ? value2 : channel.id;
|
||||
object2.onSuccess = NOOP;
|
||||
const ImpressionNames = require(dependencyMap[22]).ImpressionNames;
|
||||
const IGNORE_USER_CONFIRMATION = ImpressionNames.IGNORE_USER_CONFIRMATION;
|
||||
object2.impressionName = IGNORE_USER_CONFIRMATION;
|
||||
Reflect.apply(openLazy, defaultImport, [value4, IGNORE_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81059() { // fn#81059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3881, owner: UserProfileOverflowMenu.action, offset: 0x01e98471, size: 144 bytes, params: 1, frame: 18
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'UNBLOCK', analyticsLocations: analyticsLocations});
|
||||
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
defaultImport.unblockUser(id, {location: newestAnalyticsLocation});
|
||||
env0_13();
|
||||
const defaultImport2 = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
|
||||
defaultImport2.showUnblockSuccessToast(id, channel == null ? value2 : channel.id);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81060() { // fn#81060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4117, owner: UserProfileOverflowMenu.action, offset: 0x01e98501, size: 183 bytes, params: 1, frame: 21
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(dependencyMap[26]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[29])(dependencyMap[33], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.userId = id;
|
||||
object2.channelId = channel == null ? value2 : channel.id;
|
||||
object2.onSuccess = onSuccess_81061;
|
||||
const ImpressionNames = require(dependencyMap[22]).ImpressionNames;
|
||||
const BLOCK_USER_CONFIRMATION = ImpressionNames.BLOCK_USER_CONFIRMATION;
|
||||
object2.impressionName = BLOCK_USER_CONFIRMATION;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, BLOCK_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81062() { // fn#81062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4441, owner: UserProfileOverflowMenu.action, offset: 0x01e985fe, size: 132 bytes, params: 1, frame: 16
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'REPORT', analyticsLocations: analyticsLocations});
|
||||
const r6 = env0_15 === '@me' || env0_15 === null ? value2 : env0_15;
|
||||
const reportModalsModule = require(8153) /* metro dependency 8153: ReportModals */;
|
||||
reportModalsModule.showReportModalForUser(user, r6);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
return value2;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81064() { // fn#81064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4909, owner: UserProfileOverflowMenu.action, offset: 0x01e986f6, size: 80 bytes, params: 1, frame: 14
|
||||
trackUserProfileAction({action: 'PRESS_INVITE_TO_SERVER', analyticsLocations: analyticsLocations});
|
||||
const guildInviteUtilsModule = require(10476) /* metro dependency 10476: GuildInviteUtils */;
|
||||
guildInviteUtilsModule.showGuildInviteActionSheet(id, newestAnalyticsLocation);
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81065() { // fn#81065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5126, owner: UserProfileOverflowMenu.action, offset: 0x01e98746, size: 239 bytes, params: 1, frame: 18
|
||||
var moduleValue;
|
||||
trackUserProfileAction({action: userIsInCall ? 'STOP_RINGING' : 'RING', analyticsLocations: analyticsLocations});
|
||||
userIsInCallBinding = userIsInCall;
|
||||
const defaultImport = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
|
||||
if (userIsInCallBinding) {
|
||||
defaultImport.stopRinging(selectedVoiceChannelId, [user.id]);
|
||||
} else {
|
||||
defaultImport.ring(selectedVoiceChannelId, [user.id], 'user_profile_overflow_menu');
|
||||
if (enabled && selectedVoiceChannel != null) {
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
moduleValue = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
moduleValue.openChannelCallModal(selectedVoiceChannel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81066() { // fn#81066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5472, owner: UserProfileOverflowMenu.action, offset: 0x01e98835, size: 139 bytes, params: 1, frame: 18
|
||||
trackUserProfileAction({action: 'COPY_USERNAME', analyticsLocations: analyticsLocations});
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
const copy = clipboardUtilsNativeModule.copy;
|
||||
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
const getUserTag = defaultImport.getUserTag;
|
||||
Reflect.apply(copy, clipboardUtilsNativeModule, [Reflect.apply(getUserTag, defaultImport, [user,
|
||||
{'decoration': 'never', 'identifiable': 'always'}])]);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81067() { // fn#81067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5712, owner: UserProfileOverflowMenu.action, offset: 0x01e988c0, size: 548 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var getBannerURL;
|
||||
var object2;
|
||||
const items = [];
|
||||
let push = items.push;
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
Reflect.apply(push, items, [{label: Reflect.apply(string, intl, [t.y5MwJy]), onPress: onPress_81068}]);
|
||||
push = items.push;
|
||||
const object4 = {};
|
||||
object4.label = intl.string(t['/AXYnE']);
|
||||
object4.onPress = onPress_81069;
|
||||
Reflect.apply(push, items, [object4]);
|
||||
if (user.avatar != null || user.hasAvatarForGuild(displayProfile == null ? value2 : displayProfile.guildId)) {
|
||||
items.push({label: intl.string(t.gERDvM), onPress: onPress_81070});
|
||||
}
|
||||
let displayProfileBinding = displayProfile;
|
||||
if (displayProfileBinding != null) {
|
||||
displayProfileBinding = displayProfile;
|
||||
getBannerURL = displayProfileBinding.getBannerURL;
|
||||
object2 = {canAnimate: true};
|
||||
object2.size = AVATAR_MAX_SIZE;
|
||||
if (Reflect.apply(getBannerURL, displayProfileBinding, [object2]) != null) {
|
||||
items.push({label: intl.string(t.hsNv0R), onPress: onPress_81071});
|
||||
}
|
||||
}
|
||||
value = require(6803) /* metro dependency 6803: showSimpleActionSheetNative */;
|
||||
const showSimpleActionSheet = value.showSimpleActionSheet;
|
||||
string = intl.string;
|
||||
const QvQeLv = t.QvQeLv;
|
||||
Reflect.apply(showSimpleActionSheet, value, [{'options': null, 'key': 'copy-info', 'header': null,
|
||||
'stackingBehavior': 'stack', 'hasIcons': false, options: items, header: {title: Reflect.apply(string, intl,
|
||||
[QvQeLv])}}]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81072() { // fn#81072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6887, owner: UserProfileOverflowMenu.action, offset: 0x01e98cc4, size: 97 bytes, params: 1, frame: 14
|
||||
trackUserProfileAction({action: 'COPY_USER_ID', analyticsLocations: analyticsLocations});
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
clipboardUtilsNativeModule.copy(id);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuAction_81073() { // fn#81073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:7092, owner: UserProfileOverflowMenu.action, offset: 0x01e98d25, size: 72 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(8810) /* metro dependency 8810: openUserContextMenuCommands */)({userId: id,
|
||||
selectedChannel: selectedChannel, showUserProfile: env0_13, analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function UserProfileOverflowMenuChildren(a0) { // fn#81074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:7314, owner: UserProfileOverflowMenu.children, offset: 0x01e98d6d, size: 241 bytes, params: 2, frame: 21
|
||||
const ref = a0.ref;
|
||||
const value = Object.create(null);
|
||||
value.ref = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {ref: ref, ...value2};
|
||||
iconButtonProps['size'] = 'sm';
|
||||
iconButtonProps['variant'] = 'secondary-overlay';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zofAD']);
|
||||
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
iconButtonProps['icon'] = <MoreHorizontalIcon size="sm" color={WHITE} />;
|
||||
return <IconButton {...iconButtonProps} />;
|
||||
}
|
||||
|
||||
function actionOnSuccess_81061() { // fn#81061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4217, owner: UserProfileOverflowMenu.action.onSuccess, offset: 0x01e985b8, size: 70 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = undefined;
|
||||
const defaultImport = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
|
||||
defaultImport.showBlockSuccessToast(id, channel == null ? value : channel.id);
|
||||
return value;
|
||||
}
|
||||
|
||||
function actionOnPress() { // fn#81068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5791, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98ae4, size: 139 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
trackUserProfileAction({action: 'COPY_USERNAME', analyticsLocations: analyticsLocations});
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
const copy = clipboardUtilsNativeModule.copy;
|
||||
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
const getUserTag = defaultImport.getUserTag;
|
||||
Reflect.apply(copy, clipboardUtilsNativeModule, [Reflect.apply(getUserTag, defaultImport, [user,
|
||||
{'decoration': 'never', 'identifiable': 'always'}])]);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
|
||||
}
|
||||
|
||||
function actionOnPress_81069() { // fn#81069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6027, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98b6f, size: 97 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
trackUserProfileAction({action: 'COPY_USER_ID', analyticsLocations: analyticsLocations});
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
clipboardUtilsNativeModule.copy(id);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
|
||||
}
|
||||
|
||||
function actionOnPress_81070() { // fn#81070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6255, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98bd0, size: 144 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const trackUserProfileActionBinding = trackUserProfileAction;
|
||||
const value2 = undefined;
|
||||
trackUserProfileActionBinding({action: 'COPY_AVATAR_IMAGE_LINK', analyticsLocations: analyticsLocations});
|
||||
const userBinding = user;
|
||||
const getAvatarURL = userBinding.getAvatarURL;
|
||||
const guildId = displayProfile == null ? value2 : displayProfile.guildId;
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = Reflect.apply(getAvatarURL, userBinding, [guildId, AVATAR_MAX_SIZE, true]);
|
||||
if (value3 != null) {
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
value.copy(value3);
|
||||
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
||||
value.presentLinkCopied();
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function actionOnPress_81071() { // fn#81071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6555, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98c60, size: 100 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
trackUserProfileAction({action: 'COPY_BANNER_IMAGE_LINK', analyticsLocations: analyticsLocations});
|
||||
value = environment.__proto__.__proto__;
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* Metro module 8761; source: modules/user_profile/native/UserProfileOverscrollBanner.tsx; dependencies: [31, 27, 33, 4017, 8670, 8507, 477, 2] */
|
||||
function _fun68559(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8946:6, offset: 0x01c53b65, size: 208 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
const env0_6 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(8670) /* metro dependency 8670: VisualEffectViewThemed */);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileOverscrollBanner.tsx');
|
||||
exports.default = UserProfileOverscrollBanner;
|
||||
}
|
||||
|
||||
function UserProfileOverscrollBanner(a0) { // fn#68560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8946:298, offset: 0x01c53c35, size: 285 bytes, params: 2, frame: 26
|
||||
const bannerAnimatedStyle = a0.bannerAnimatedStyle;
|
||||
const bannerImageAnimatedStyle = a0.bannerImageAnimatedStyle;
|
||||
const blurAnimatedProps = a0.blurAnimatedProps;
|
||||
const showBlur = a0.showBlur;
|
||||
const privateBanner = a0.privateBanner;
|
||||
const buttons = a0.buttons;
|
||||
let object = {'bannerAnimatedStyle': 0, 'bannerImageAnimatedStyle': 0, 'blurAnimatedProps': 0, 'showBlur': 0,
|
||||
'privateBanner': 0, 'buttons': 0};
|
||||
silentSetPrototypeOf(object, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object, undefined);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
value = ((Component) => <Component {...value} />)(importDefault(8507) /* metro dependency 8507: UserProfileBanner */);
|
||||
object = [value];
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isIOS();
|
||||
object[1] = value && showBlur && ((Component) => <Component animatedProps={blurAnimatedProps} style={StyleSheet.absoluteFillObject} />)(env0_6);
|
||||
return (
|
||||
<View style={bannerAnimatedStyle}>
|
||||
{privateBanner}
|
||||
<View2 style={bannerImageAnimatedStyle}>
|
||||
{object}
|
||||
</View2>
|
||||
{buttons}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/* Metro module 13230; source: modules/user_profile/native/UserProfilePremiumUpsellCard.tsx; dependencies: [31, 661, 33, 4501, 1585, 1484, 7061, 6771, 6789, 7508, 5080, 7028, 1962, 7940, 13231, 1244, 4573, 2] */
|
||||
function _fun100909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13420:6, offset: 0x021ffa9c, size: 227 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.AnalyticsObjects;
|
||||
const env0_5 = constantsModule.AnalyticsPages;
|
||||
const env0_6 = constantsModule.AnalyticsSections;
|
||||
const env0_7 = constantsModule.UserSettingsSections;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
|
||||
return {container: {'position': 'absolute', 'bottom': null, 'start': 0, 'end': 0, bottom: a0}};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePremiumUpsellCard.tsx');
|
||||
exports.UserProfilePremiumUpsellCard = UserProfilePremiumUpsellCard;
|
||||
}
|
||||
|
||||
function UserProfilePremiumUpsellCard({isTryItOut}) { // fn#100911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13420:431, offset: 0x021ffb9e, size: 568 bytes, params: 2, frame: 24
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value3 = (require(7061) /* metro dependency 7061: MobileTrialUtils */).useNitroTrialCtaOverride('user_profile_premium_upsell_card');
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const defaultImport2 = importDefault(6789) /* metro dependency 6789: AnalyticsLocation */;
|
||||
const analyticsLocations = defaultImport([isTryItOut ? defaultImport2.USER_SETTINGS_TRY_OUT_PREMIUM : defaultImport2.USER_SETTINGS_USER_PROFILE]).analyticsLocations;
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useCallback(_fun100912, [value2]);
|
||||
const value5 = binding.useCallback(_fun100913, [analyticsLocations]);
|
||||
const UserProfileUpsellCard = importDefault(13231) /* metro dependency 13231: UserProfileUpsellCard */;
|
||||
const r6 = isTryItOut ? value3 ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pj0XBN) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PxUx8e);
|
||||
const r4 = isTryItOut ? value5 : value4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<UserProfileUpsellCard
|
||||
style={styles.container}
|
||||
ctaText={r6}
|
||||
showLinearGradient
|
||||
onPress={r4}
|
||||
>
|
||||
<Text variant="text-sm/normal" maxFontSizeMultiplier={2.5}>
|
||||
{isTryItOut ? Reflect.apply(string, intl, [t.ZFR9LF]) : Reflect.apply(string, intl, [t.Tii53U])}
|
||||
</Text>
|
||||
</UserProfileUpsellCard>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100912() { // fn#100912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13420:736, offset: 0x021ffdd6, size: 71 bytes, params: 1, frame: 13
|
||||
const defaultImport = importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */;
|
||||
const setSection = defaultImport.setSection;
|
||||
let PROFILE_CUSTOMIZATION_TRY_IT_OUT = UserSettingsSections.PROFILE_CUSTOMIZATION_TRY_IT_OUT;
|
||||
Reflect.apply(setSection, defaultImport, [PROFILE_CUSTOMIZATION_TRY_IT_OUT]);
|
||||
const binding = env0_0;
|
||||
const push = binding.push;
|
||||
PROFILE_CUSTOMIZATION_TRY_IT_OUT = UserSettingsSections.PROFILE_CUSTOMIZATION_TRY_IT_OUT;
|
||||
Reflect.apply(push, binding, [PROFILE_CUSTOMIZATION_TRY_IT_OUT]);
|
||||
}
|
||||
|
||||
function _fun100913() { // fn#100913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13420:863, offset: 0x021ffe1d, size: 168 bytes, params: 1, frame: 19
|
||||
const defaultImport = importDefault(dependencyMap[10]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
const value2 = require(dependencyMap[12])(dependencyMap[11], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
const USER_SETTINGS = AnalyticsPages.USER_SETTINGS;
|
||||
const SETTINGS_CUSTOMIZE_PROFILE_TRY_IT_OUT = AnalyticsSections.SETTINGS_CUSTOMIZE_PROFILE_TRY_IT_OUT;
|
||||
const BUTTON_CTA = AnalyticsObjects.BUTTON_CTA;
|
||||
object2.analyticsLocation = {page: USER_SETTINGS, section: SETTINGS_CUSTOMIZE_PROFILE_TRY_IT_OUT,
|
||||
object: BUTTON_CTA};
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
const PremiumFeatureCardOrder = require(dependencyMap[13]).PremiumFeatureCardOrder;
|
||||
const TIER_2_LEADING = PremiumFeatureCardOrder.TIER_2_LEADING;
|
||||
object2.premiumFeatureCardOrder = TIER_2_LEADING;
|
||||
Reflect.apply(pushLazy, defaultImport, [value2, object2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
/* Metro module 8489; source: modules/user_profile/native/UserProfilePreview.tsx; dependencies: [57, 31, 27, 7624, 6816, 33, 4501, 697, 566, 8490, 8494, 8496, 6882, 8497, 8402, 8498, 8403, 8501, 8502, 3868, 8503, 8505, 8507, 8476, 8510, 8511, 8513, 8695, 8762, 8474, 2] */
|
||||
function _fun67343(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:6, offset: 0x01c1ee98, size: 280 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
|
||||
let value = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_7 = value.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
||||
const env0_8 = value.UserProfileThemeTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const filterLayer = function(a0) {
|
||||
return a0.responsive !== true;
|
||||
};
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67345);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePreview.tsx');
|
||||
exports.default = UserProfilePreview;
|
||||
}
|
||||
|
||||
function _fun67345(a0, a1, a2) { // fn#67345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:312, offset: 0x01c1efc1, size: 242 bytes, params: 4, frame: 17
|
||||
let value = a2;
|
||||
const object2 = {};
|
||||
object2.profileContainer = {'position': 'relative', 'width': '100%', maxWidth: value ?? 263};
|
||||
const object4 = {overflow: 'hidden'};
|
||||
object4.minHeight = a0 ? undefined : 350;
|
||||
value = 1;
|
||||
object4.borderWidth = a1 ? undefined : value;
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object4.borderColor = a1 ? colors.BORDER_MUTED : colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.profileContentContainer = object4;
|
||||
object2.profileInnerContent = {flexGrow: value};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.aboutMeCard = {marginTop: PX_12};
|
||||
object2.profileEffect = {zIndex: value};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function UserProfilePreview({user, accessibilityLabel, displayName, guildId, profileEffectOverride, profileEffectRestartKey, profileFrameOverride, displayNameStylesOverride, style, compact, hideFrame, maxWidth, additionalBadges = []}) { // fn#67346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:800, offset: 0x01c1f0b3, size: 2185 bytes, params: 2, frame: 62
|
||||
var profileFrame;
|
||||
var r1;
|
||||
var moduleValue5;
|
||||
compact = !(compact === undefined) && compact;
|
||||
hideFrame = !(hideFrame === undefined) && hideFrame;
|
||||
const env0_3 = undefined;
|
||||
var env0_4 = undefined;
|
||||
const {pendingAvatar, pendingBanner, pendingAccentColor, pendingThemeColors, pendingAvatarDecoration,
|
||||
pendingProfileEffect, pendingProfileFrame, pendingDisplayNameStyles, pendingGlobalName, pendingPronouns,
|
||||
pendingLegacyUsernameDisabled} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore],
|
||||
function() {
|
||||
return UserProfileSettingsStore.getPendingChanges(guildId);
|
||||
});
|
||||
const value6 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, guildId);
|
||||
const {theme, primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
|
||||
displayProfile: value6, pendingThemeColors: pendingThemeColors});
|
||||
const value8 = primaryColor != null;
|
||||
const styles = useStyles(compact, value8, maxWidth);
|
||||
const value9 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value10 = (require(6882) /* metro dependency 6882: userSettingToActivity */).useCustomStatusActivity();
|
||||
let r29 = value10 != null && !compact;
|
||||
const {gradientFallbackBackground, avatarBackground,
|
||||
containerBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
const r16 = profileEffectOverride === undefined ? pendingProfileEffect : profileEffectOverride;
|
||||
const r11 = profileFrameOverride === undefined ? pendingProfileFrame : profileFrameOverride;
|
||||
const r38 = displayNameStylesOverride === undefined ? pendingDisplayNameStyles : displayNameStylesOverride;
|
||||
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
|
||||
let getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
|
||||
let object = {pendingValue: r16};
|
||||
object.userValue = value6?.profileEffect;
|
||||
object.guildValue = value6 == null || value6._guildMemberProfile == null ? undefined : value6._guildMemberProfile.profileEffect;
|
||||
object.guildId = guildId;
|
||||
const value14 = Reflect.apply(getProfilePreviewValue, profileCustomizationUtilsModule, [object]);
|
||||
if (hideFrame) {
|
||||
r1 = undefined;
|
||||
} else {
|
||||
moduleValue5 = profileCustomizationUtilsModule;
|
||||
getProfilePreviewValue = moduleValue5.getProfilePreviewValue;
|
||||
object = {pendingValue: r11};
|
||||
profileFrame = value6?.profileFrame;
|
||||
object.userValue = profileFrame;
|
||||
profileFrame = value6 == null || value6._guildMemberProfile == null ? undefined : value6._guildMemberProfile.profileFrame;
|
||||
object.guildValue = profileFrame;
|
||||
object.guildId = guildId;
|
||||
r1 = Reflect.apply(getProfilePreviewValue, moduleValue5, [object]);
|
||||
}
|
||||
const value16 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(r1?.skuId,
|
||||
'UserProfilePreview');
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
||||
image: pendingAvatar});
|
||||
const value18 = (importDefault(8501) /* metro dependency 8501: useBadges */)(value6, pendingLegacyUsernameDisabled);
|
||||
const Set = global.Set;
|
||||
const set = new Set(value18.map(function(a0) {
|
||||
return a0.id;
|
||||
}));
|
||||
object = [];
|
||||
arraySpread(object, additionalBadges.filter(_fun67349), arraySpread(object, value18, 0, undefined), undefined);
|
||||
const binding = env0_4;
|
||||
var [property, env0_4] = env0_3(binding.useState({'width': 0, 'height': 0}), 2);
|
||||
const value25 = binding.useCallback(_fun67350, []);
|
||||
const value26 = binding.useMemo(_fun67351, [value16, property.width]);
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const items2 = [styles.profileContainer, value26, style];
|
||||
const items3 = [value16 != null && ((Component) => <Component frame={value16} filterLayer={filterLayer} profileThemeType={UserProfileThemeTypes.PREVIEW} frameOrder={(require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder.BACK} containerWidth={property.width} containerHeight={property.height} />)(importDefault(8503) /* metro dependency 8503: ProfileFrame */)];
|
||||
const UserProfileBanner = importDefault(8507) /* metro dependency 8507: UserProfileBanner */;
|
||||
const PFX_MOBILE_ACTION_SHEET_BANNER_HEIGHT = (require(8476) /* metro dependency 8476: constants */).PFX_MOBILE_ACTION_SHEET_BANNER_HEIGHT;
|
||||
const items4 = [<UserProfileBanner user={user} displayProfile={value6} bannerHeight={PFX_MOBILE_ACTION_SHEET_BANNER_HEIGHT} pendingBanner={pendingBanner} pendingAvatarSrc={pendingAvatarSrc} pendingAccentColor={pendingAccentColor ?? undefined} pendingThemeColors={pendingThemeColors ?? undefined} disableInteraction />];
|
||||
const value30 = ((Component) => <Component user={user} guildId={guildId} pendingAvatarSrc={pendingAvatarSrc} pendingAvatarDecoration={pendingAvatarDecoration} backgroundColor={avatarBackground} disableStatus />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
|
||||
const UserProfileGradientContainer = importDefault(8511) /* metro dependency 8511: UserProfileGradientContainer */;
|
||||
const items6 = [value9.profileContentWrapper];
|
||||
items6[1] = value9.profileContent;
|
||||
items6[2] = !r29 && ({paddingTop: PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING});
|
||||
r29 = r29 && ((Component) => <Component customStatusActivity={value10} themeType={UserProfileThemeTypes.PREVIEW} hasCustomProfileTheme={value8} style={value9.customStatusBubble} emojiOnlyStyle={value9.emojiOnlyCustomStatusBubble} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */);
|
||||
const items7 = [r29];
|
||||
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
||||
const PREVIEW = UserProfileThemeTypes.PREVIEW;
|
||||
items7[1] = <UserProfilePrimaryInfo user={user} themeType={PREVIEW} displayName={displayName ?? pendingGlobalName} pronouns={pendingPronouns ?? value6?.pronouns} badges={object} badgeContainerBackground={containerBackground} showBadgeToastOnPress={false} pendingDisplayNameStyles={r38} guildId={guildId} />;
|
||||
items7[2] = !compact && ((Component) => <Component userId={user.id} displayProfile={value6} themeType={UserProfileThemeTypes.PREVIEW} style={[value9.card,
|
||||
styles.aboutMeCard,
|
||||
{backgroundColor: containerBackground}]} bioLineClamp={1} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
|
||||
items4[1] = <View style={styles.profileInnerContent}>{value30}<UserProfileGradientContainer fallbackBackground={gradientFallbackBackground} primaryColor={primaryColor} secondaryColor={secondaryColor} containerStyle={items6}>{items7}</UserProfileGradientContainer></View>;
|
||||
items4[2] = value14 != null && ((Component) => <Component skuId={value14.skuId} style={styles.profileEffect} key={profileEffectRestartKey != null ? '' + value14.skuId + '-' + profileEffectRestartKey : value14.skuId} />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */);
|
||||
items3[1] = <View onLayout={value25} style={styles.profileContentContainer}>{items4}</View>;
|
||||
items3[2] = value16 != null && ((Component) => <Component frame={value16} filterLayer={filterLayer} profileThemeType={UserProfileThemeTypes.PREVIEW} frameOrder={(require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder.FRONT} containerWidth={property.width} containerHeight={property.height} />)(importDefault(8503) /* metro dependency 8503: ProfileFrame */);
|
||||
return (
|
||||
<ThemeContextProvider
|
||||
theme={theme}
|
||||
primaryColor={primaryColor}
|
||||
secondaryColor={secondaryColor}
|
||||
>
|
||||
<View
|
||||
style={items2}
|
||||
pointerEvents="none"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityRole="image"
|
||||
accessible
|
||||
>
|
||||
<View
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
accessibilityElementsHidden
|
||||
style={{flexShrink: 1}}
|
||||
>
|
||||
{items3}
|
||||
</View>
|
||||
</View>
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun67349({id}) { // fn#67349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2361, offset: 0x01c1f957, size: 30 bytes, params: 2, frame: 11
|
||||
const binding = env0_2;
|
||||
return !binding.has(id);
|
||||
}
|
||||
|
||||
function _fun67350(a0) { // fn#67350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2462, offset: 0x01c1f975, size: 99 bytes, params: 2, frame: 15
|
||||
const binding = env0_4;
|
||||
const object2 = {};
|
||||
let Math = global.Math;
|
||||
object2.width = Math.floor(a0.nativeEvent.layout.width);
|
||||
Math = global.Math;
|
||||
object2.height = Math.floor(a0.nativeEvent.layout.height);
|
||||
binding(object2);
|
||||
}
|
||||
|
||||
function _fun67351() { // fn#67351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2584, offset: 0x01c1f9d8, size: 170 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var value2;
|
||||
var value3;
|
||||
var overflowTop;
|
||||
var overflowBottom;
|
||||
var overflowHorizontal;
|
||||
var layers;
|
||||
var value4;
|
||||
var value5;
|
||||
if (env0_1 != null) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = (importDefault(8502) /* metro dependency 8502: scaleProfileFrame */)(env0_1, env0_3.width);
|
||||
overflowTop = value3.overflowTop;
|
||||
overflowBottom = value3.overflowBottom;
|
||||
overflowHorizontal = value3.overflowHorizontal;
|
||||
layers = env0_1.layers;
|
||||
value4 = layers.some(function(a0) {
|
||||
return a0.type === 'staple' && a0.anchor === 'top';
|
||||
});
|
||||
value5 = 0;
|
||||
layers = env0_1.layers;
|
||||
return {marginTop: value4 ? overflowTop : value5,
|
||||
marginBottom: layers.some(_fun67353) ? overflowBottom : value5,
|
||||
marginHorizontal: overflowHorizontal};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun67353(a0) { // fn#67353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2795, offset: 0x01c1faa7, size: 37 bytes, params: 2, frame: 3
|
||||
return a0.type === 'staple' && a0.anchor === 'bottom';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/* Metro module 13226; source: modules/user_profile/native/UserProfilePrimaryGuildEditButton.tsx; dependencies: [31, 1867, 8187, 33, 4501, 697, 566, 13227, 8400, 8401, 1244, 477, 4573, 13209, 4080, 13228, 1962, 6819, 9299, 2] */
|
||||
function _fun100888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13416:6, offset: 0x021feb90, size: 249 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_4 = (require(8187) /* metro dependency 8187: GuildTagConstants */).GuildTagBadgeSize;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'paddingHorizontal': 6, 'paddingVertical': 2, 'columnGap': 4};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{tag: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePrimaryGuildEditButton.tsx');
|
||||
exports.default = UserProfilePrimaryGuildEditButton;
|
||||
}
|
||||
|
||||
function UserProfilePrimaryGuildEditButton({user, disabled, tagStyle, pendingPrimaryGuildId}) { // fn#100889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13416:378, offset: 0x021fec89, size: 880 bytes, params: 2, frame: 32
|
||||
var profile;
|
||||
var r11;
|
||||
var r8;
|
||||
var r9;
|
||||
var r6;
|
||||
var value8;
|
||||
var moduleValue3;
|
||||
var value10;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var tag;
|
||||
var value15;
|
||||
var UserProfileEditFormButton;
|
||||
var BaseGuildTagChiplet;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const r0 = pendingPrimaryGuildId !== undefined ? pendingPrimaryGuildId : user.primaryGuild != null && user.primaryGuild.identityEnabled ? user.primaryGuild?.identityGuildId : null;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const items = [GuildStore];
|
||||
const value4 = Reflect.apply(useStateFromStores, fluxModule, [items, _fun100890, [r0]]);
|
||||
if (user != null) {
|
||||
if ((require(13227) /* metro dependency 13227: useUserAvailableGuildsWithTags */).useUserAvailableGuildsWithTags().length > 0) {
|
||||
profile = value4?.profile;
|
||||
value8 = value4 != null;
|
||||
if (value8) {
|
||||
moduleValue3 = require(8401) /* metro dependency 8401: GuildTagUtils */;
|
||||
r11 = moduleValue3.getGuildTagBadgeUrl(value4.id, profile?.badge ?? undefined,
|
||||
GuildTagBadgeSize.SIZE_24);
|
||||
} else {
|
||||
r11 = value8;
|
||||
}
|
||||
value10 = value4 != null;
|
||||
r8 = value10 ? value4.name : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ECv270);
|
||||
r9 = profile == null ? r8 : '' + r8 + ', ' + profile.tag;
|
||||
value15 = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet['text-md/semibold'].fontSize + ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 1 : 4);
|
||||
UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton;
|
||||
var userProfileEditFormButtonProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DUD+5n']),
|
||||
|
||||
|
||||
buttonText: r8, accessibilityValue: {text: r9}, onPress: onPress_100892};
|
||||
r6 = value10 ? ((Component) => <Component guild={value4} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : null;
|
||||
userProfileEditFormButtonProps.leading = r6;
|
||||
if (profile != null) {
|
||||
BaseGuildTagChiplet = (require(9299) /* metro dependency 9299: GuildTag */).BaseGuildTagChiplet;
|
||||
tag = styles.tag;
|
||||
items2 = [tag, tagStyle];
|
||||
tag = profile.tag;
|
||||
r6 = <BaseGuildTagChiplet containerStyles={items2} textStyle={{lineHeight: value15}} guildTag={tag ?? undefined} guildBadge={r11} badgeSize={GuildTagBadgeSize.SIZE_16} textVariant="text-md/semibold" textColor="text-default" />;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
userProfileEditFormButtonProps.trailing = r6;
|
||||
userProfileEditFormButtonProps.disabled = disabled;
|
||||
return <UserProfileEditFormButton {...userProfileEditFormButtonProps} />;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function handleSelectPrimaryGuild(a0) { // fn#100891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13416:748, owner: UserProfilePrimaryGuildEditButton.handleSelectPrimaryGuild, offset: 0x021feff9, size: 48 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({primaryGuildId: a0});
|
||||
}
|
||||
|
||||
function UserProfilePrimaryGuildEditButtonOnPress() { // fn#100892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13416:1275, owner: UserProfilePrimaryGuildEditButton.onPress, offset: 0x021ff029, size: 125 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[14]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[16]);
|
||||
value = value(dependencyMap[15], dependencyMap.paths);
|
||||
const value3 = null;
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'UserPrimaryGuildListBottomSheet', {availableGuilds: env0_2,
|
||||
userPrimaryGuild: value3 != env0_1 ? env0_1 : value3, onSelectGuild: handleSelectPrimaryGuild}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,428 @@
|
||||
/* Metro module 8695; source: modules/user_profile/native/UserProfilePrimaryInfo.tsx; dependencies: [31, 27, 8516, 6816, 661, 8187, 33, 4501, 697, 8696, 8697, 8706, 5278, 8708, 4573, 8710, 7122, 4008, 10497, 1244, 10499, 7635, 7007, 3857, 8501, 683, 7120, 6531, 477, 10500, 1478, 8401, 9299, 3995, 2] */
|
||||
function _fun68322(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:6, offset: 0x01c48e9c, size: 731 bytes, params: 8, frame: 27
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = DisplayName;
|
||||
const closure2 = UserTagAndPronouns;
|
||||
const closure3 = ProfileBadgeRows;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Image;
|
||||
const env0_5 = value.View;
|
||||
value = require(8516) /* metro dependency 8516: Constants */;
|
||||
const env0_6 = value.getBadgeAssetFromCDN;
|
||||
const env0_7 = value.getBadgeName;
|
||||
value = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_8 = value.DIVIDER_DOT;
|
||||
const env0_9 = value.PROFILE_SIDE_PADDING;
|
||||
const UserProfileThemeTypes = value.UserProfileThemeTypes;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = value.AnalyticEvents;
|
||||
const env0_12 = value.UserSettingsSections;
|
||||
const GuildTagBadgeSize = (require(8187) /* metro dependency 8187: GuildTagConstants */).GuildTagBadgeSize;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value.jsx;
|
||||
const env0_14 = value.jsxs;
|
||||
const env0_15 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flexDirection: 'column'};
|
||||
object2.displayName = {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': 4};
|
||||
object2.details = {'flexDirection': 'row', 'flexWrap': 'wrap', 'gap': 8};
|
||||
object2.detailsText = {'flexDirection': 'row', 'flexWrap': 'wrap', 'alignContent': 'center', 'paddingVertical': 2};
|
||||
object2.botTag = {marginLeft: 4};
|
||||
const object3 = {'alignSelf': 'center', 'justifyContent': 'center', 'borderRadius': null, 'columnGap': 4};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.guildTag = object3;
|
||||
object2.transparentBackground = {backgroundColor: 'transparent'};
|
||||
object2.badge = {resizeMode: 'contain'};
|
||||
object2.badges = {'alignSelf': 'center', 'flexDirection': 'column', 'justifyContent': 'flex-start', 'rowGap': 8};
|
||||
const object5 = {'borderRadius': null, 'paddingVertical': 2, 'justifyContent': 'flex-start', 'flexDirection': 'row',
|
||||
'marginRight': 'auto', 'columnGap': 4};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.badgeRow = object5;
|
||||
const env0_16 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {'headingVariant': 'heading-xl/bold', 'textVariant': 'text-md/normal', 'badgeSize': 20,
|
||||
'badgeRowHorizontalPadding': 7, 'guildTagBadgeSize': null, 'guildTagTextVariant': 'text-sm/medium',
|
||||
'guildTagHorizontalPadding': 8};
|
||||
const SIZE_16 = GuildTagBadgeSize.SIZE_16;
|
||||
object2.guildTagBadgeSize = SIZE_16;
|
||||
object2 = {};
|
||||
const PREVIEW = UserProfileThemeTypes.PREVIEW;
|
||||
const SIZE_12 = GuildTagBadgeSize.SIZE_12;
|
||||
object2[PREVIEW] = {'headingVariant': 'heading-lg/bold', 'textVariant': 'text-sm/normal', 'badgeSize': 16,
|
||||
'badgeRowHorizontalPadding': 6, 'guildTagBadgeSize': null, 'guildTagTextVariant': 'text-xs/medium',
|
||||
'guildTagHorizontalPadding': 6, guildTagBadgeSize: SIZE_12};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePrimaryInfo.tsx');
|
||||
exports.default = UserProfilePrimaryInfo;
|
||||
exports.DisplayName = closure;
|
||||
exports.UserTagAndPronouns = closure2;
|
||||
exports.ProfileBadgeRows = closure3;
|
||||
}
|
||||
|
||||
function DisplayName({user, guildId, name, themeType, onPress, accessibilityHint, showChevron, pendingDisplayNameStyles, displayNameAccessibilityRole}) { // fn#68323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:1564, offset: 0x01c49177, size: 341 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var PressableOpacity;
|
||||
var items2;
|
||||
showChevron = !(showChevron === undefined) && showChevron;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const env0_6 = getStyleConfig(themeType).headingVariant;
|
||||
const closure = renderDisplayName;
|
||||
const closure2 = renderBotTag;
|
||||
if (onPress == null) {
|
||||
value = closure();
|
||||
value = <View>{[value, closure2()]}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {onPress: onPress, accessibilityRole: 'button', accessibilityLabel: name,
|
||||
accessibilityHint: accessibilityHint, style: styles.displayName};
|
||||
items2 = [closure(), closure2()];
|
||||
items2[2] = showChevron && ((ChevronSmallDownIcon) => <ChevronSmallDownIcon size="sm" color="icon-muted" />)((require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon);
|
||||
r0 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function UserTagAndPronouns({userTag, pronouns, themeType, onPressUserTag, userTagAccessibilityHint, onPressPronouns, pronounsAccessibilityHint}) { // fn#68326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:2532, offset: 0x01c49446, size: 414 bytes, params: 2, frame: 30
|
||||
var jsxRuntimeEnv0_15Binding;
|
||||
var items2;
|
||||
const env0_3 = userTagAccessibilityHint;
|
||||
const styles = useStyles();
|
||||
let r5 = pronouns != null && pronouns.length > 0;
|
||||
const textVariant = getStyleConfig(themeType).textVariant;
|
||||
const value4 = env0_3.useCallback(_fun68327, [onPressUserTag, textVariant, userTag, userTagAccessibilityHint]);
|
||||
const closure = renderPronouns;
|
||||
const value5 = value4();
|
||||
if (r5) {
|
||||
jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
||||
items2 = [((Text) => <Text variant={textVariant} color="mobile-text-heading-primary" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{DIVIDER_DOT}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items2[1] = onPressUserTag != null ? ((PressableOpacity) => <PressableOpacity onPress={onPressPronouns} accessibilityRole="button" accessibilityLabel={pronouns} accessibilityHint={pronounsAccessibilityHint}>{closure()}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity) : <View>{closure()}</View>;
|
||||
r5 = <>{items2}</>;
|
||||
}
|
||||
return (
|
||||
<View style={styles.detailsText}>
|
||||
{value5}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ProfileBadge({source, id, label, badgeSize, userId, themeType, showToastOnPress}) { // fn#68329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:3563, offset: 0x01c496f6, size: 800 bytes, params: 2, frame: 29
|
||||
showToastOnPress = showToastOnPress === undefined || showToastOnPress;
|
||||
let env0_3 = undefined;
|
||||
const styles = useStyles();
|
||||
const r15 = badgeSize != null ? {width: badgeSize, height: badgeSize} : undefined;
|
||||
const value5 = env0_3.useRef(null);
|
||||
env0_3 = (require(8710) /* metro dependency 8710: useTieredTenureBadgeClickHandler */).useTieredTenureBadgeClickHandler(id,
|
||||
userId, themeType);
|
||||
const env0_4 = (require(7122) /* metro dependency 7122: AdDataUtilsAndroid */).useAdUser('profile_badge');
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
const r5 = rootNavigationRef != null && rootNavigationRef.isReady() ? rootNavigationRef.getCurrentRoute() : undefined;
|
||||
const showOrbsBadgeCoachmark = r5 == null || r5.params == null ? undefined : r5.params.showOrbsBadgeCoachmark;
|
||||
const value9 = (require(10497) /* metro dependency 10497: OrbsBadgeCoachmark */).useOrbsBadgeCoachmark({disabled: !(showOrbsBadgeCoachmark != null && showOrbsBadgeCoachmark)});
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const A0LN9t = (require(1244) /* metro dependency 1244: indexNative */).t.A0LN9t;
|
||||
const value10 = Reflect.apply(formatToPlainString, intl, [A0LN9t, {badgeLabel: label}]);
|
||||
let YOU_SCREEN = UserProfileThemeTypes.YOU_SCREEN;
|
||||
const r7 = themeType === YOU_SCREEN && typeof id === 'string' ? ((Component) => <Component targetRef={value5} badgeId={id} />)(importDefault(10499) /* metro dependency 10499: TieredTenureBadgeCoachmark */) : null;
|
||||
YOU_SCREEN = UserProfileThemeTypes.YOU_SCREEN;
|
||||
const r6 = themeType === YOU_SCREEN && typeof id === 'string' && id === 'orb_profile_badge' && value9 != null ? ((Component) => <Component badgeRef={value5} {...value9.props} />)(importDefault(10497) /* metro dependency 10497: OrbsBadgeCoachmark */) : null;
|
||||
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
||||
const object2 = {};
|
||||
if (showToastOnPress) {
|
||||
object2.children = [((PressableOpacity) => <PressableOpacity accessibilityRole="image" accessibilityLabel={value10} onPress={onPress_68330} ref={value5}><Image style={[styles.badge,
|
||||
|
||||
r15]} source={source} /></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity),
|
||||
|
||||
r7, r6];
|
||||
} else {
|
||||
object2.children = [<Image style={[styles.badge,
|
||||
r15]} source={source} accessible accessibilityRole="image" accessibilityLabel={value10} ref={value5} />, r7,
|
||||
r6];
|
||||
}
|
||||
return ((Fragment) => <Fragment {...object2} />)(jsxRuntimeEnv0_15Binding);
|
||||
}
|
||||
|
||||
function ProfileBadgeRows({userId, badges, isTryItOut, style, themeType, showToastOnPress}) { // fn#68331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:5071, offset: 0x01c49c0e, size: 519 bytes, params: 2, frame: 27
|
||||
var push;
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var Date;
|
||||
var value6;
|
||||
var date;
|
||||
const env0_3 = showToastOnPress;
|
||||
const styles = useStyles();
|
||||
const {badgeSize, badgeRowHorizontalPadding} = getStyleConfig(themeType);
|
||||
const value3 = badges.map(_fun68332);
|
||||
if (isTryItOut && badges.find(function(a0) {
|
||||
return a0.id === 'premium';
|
||||
}) == null) {
|
||||
push = value3.push;
|
||||
var profileBadgeProps = {source: importDefault(10500) /* metro dependency 10500 */, id: 'premium',
|
||||
userId: userId};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['8zbGNR'];
|
||||
Date = global.Date;
|
||||
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
profileBadgeProps.label = Reflect.apply(formatToPlainString, intl, [property,
|
||||
{date: date instanceof Object ? date : value6}]);
|
||||
profileBadgeProps.badgeSize = badgeSize;
|
||||
profileBadgeProps.showToastOnPress = showToastOnPress;
|
||||
Reflect.apply(push, value3, [<ProfileBadge {...profileBadgeProps} />]);
|
||||
}
|
||||
const value8 = env0_3.useMemo(_fun68334, [value3, badgeRowHorizontalPadding, badgeSize,
|
||||
(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width]);
|
||||
const items2 = [styles.badges];
|
||||
const string = intl.string;
|
||||
const VWV0y5 = (require(1244) /* metro dependency 1244: indexNative */).t.VWV0y5;
|
||||
return (
|
||||
<View
|
||||
style={items2}
|
||||
accessibilityRole="list"
|
||||
accessibilityLabel={Reflect.apply(string, intl, [VWV0y5])}
|
||||
>
|
||||
{value8.map(_fun68336)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildTag({user, themeType, style, showToastOnPress}) { // fn#68337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:6011, offset: 0x01c49fb2, size: 386 bytes, params: 2, frame: 27
|
||||
showToastOnPress = !(showToastOnPress === undefined) && showToastOnPress;
|
||||
const styles = useStyles();
|
||||
const {tag,
|
||||
guildId} = (require(8401) /* metro dependency 8401: GuildTagUtils */).getUserPrimaryGuild(user?.primaryGuild);
|
||||
const {badgeSize, guildTagBadgeSize, guildTagHorizontalPadding, guildTagTextVariant} = getStyleConfig(themeType);
|
||||
const r6 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 2 : 4;
|
||||
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
|
||||
return tag == null || guildId == null ? null : <View style={[styles.guildTag, {minHeight: badgeSize + 4,
|
||||
paddingHorizontal: guildTagHorizontalPadding},
|
||||
style]}>{((Component) => <Component userId={user.id} disabledTooltip={!showToastOnPress} containerStyles={styles.transparentBackground} textStyle={{lineHeight: TextStyleSheet[guildTagTextVariant].fontSize + r6}} badgeSize={guildTagBadgeSize} textVariant={guildTagTextVariant} />)(importDefault(9299) /* metro dependency 9299: GuildTag */)}</View>;
|
||||
}
|
||||
|
||||
function getStyleConfig(a0) { // fn#68338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:1514, offset: 0x01c4a134, size: 38 bytes, params: 2, frame: 4
|
||||
let r0 = a0 != null ? env0_18[a0] : undefined;
|
||||
r0 = r0 ?? env0_17;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function UserProfilePrimaryInfo({user, guildId, displayName, pronouns, style, badges, badgeContainerBackground, themeType, onPressDisplayName, displayNameAccessibilityHint, displayNameAccessibilityRole, onPressUserTag, userTagAccessibilityHint, onPressPronouns, pronounsAccessibilityHint, showChevron, showBadgeToastOnPress, pendingDisplayNameStyles}) { // fn#68339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:6688, offset: 0x01c4a15a, size: 501 bytes, params: 2, frame: 38
|
||||
const styles = useStyles();
|
||||
const object2 = {backgroundColor: badgeContainerBackground};
|
||||
const value2 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
|
||||
return (
|
||||
<View style={[styles.container, style]}>
|
||||
<DisplayName
|
||||
user={user}
|
||||
guildId={guildId}
|
||||
name={displayName === '' ? value2 : displayName ?? value2}
|
||||
themeType={themeType}
|
||||
onPress={onPressDisplayName}
|
||||
accessibilityHint={displayNameAccessibilityHint}
|
||||
displayNameAccessibilityRole={displayNameAccessibilityRole}
|
||||
showChevron={showChevron}
|
||||
pendingDisplayNameStyles={pendingDisplayNameStyles}
|
||||
/>
|
||||
<View style={styles.details}>
|
||||
<UserTagAndPronouns
|
||||
userTag={user.isProvisional ? null : (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user)}
|
||||
pronouns={pronouns}
|
||||
themeType={themeType}
|
||||
onPressUserTag={onPressUserTag}
|
||||
userTagAccessibilityHint={userTagAccessibilityHint}
|
||||
onPressPronouns={onPressPronouns}
|
||||
pronounsAccessibilityHint={pronounsAccessibilityHint}
|
||||
/>
|
||||
<GuildTag
|
||||
user={user}
|
||||
themeType={themeType}
|
||||
style={object2}
|
||||
showToastOnPress={showBadgeToastOnPress}
|
||||
/>
|
||||
<ProfileBadgeRows
|
||||
userId={user.id}
|
||||
badges={badges}
|
||||
style={object2}
|
||||
themeType={themeType}
|
||||
showToastOnPress={showBadgeToastOnPress}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function renderDisplayName() { // fn#68324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:1792, owner: DisplayName.renderDisplayName, offset: 0x01c492cc, size: 149 bytes, params: 1, frame: 17
|
||||
const UsernameWithEffects = importDefault(8696) /* metro dependency 8696: UsernameWithEffects */;
|
||||
const id = user.id;
|
||||
const guildIdBinding = guildId;
|
||||
const nameBinding = name;
|
||||
const headingVariantBinding = headingVariant;
|
||||
const EffectDisplayType = (require(8697) /* metro dependency 8697: types */).EffectDisplayType;
|
||||
const STATIC = EffectDisplayType.STATIC;
|
||||
return (
|
||||
<UsernameWithEffects
|
||||
userId={id}
|
||||
guildId={guildIdBinding}
|
||||
userName={nameBinding}
|
||||
variant={headingVariantBinding}
|
||||
effectDisplayType={STATIC}
|
||||
lineClamp={2}
|
||||
pendingDisplayNameStyles={pendingDisplayNameStyles}
|
||||
defaultColor="mobile-text-heading-primary"
|
||||
accessibilityRole={displayNameAccessibilityRole}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function renderBotTag() { // fn#68325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:2020, owner: DisplayName.renderBotTag, offset: 0x01c49361, size: 229 bytes, params: 1, frame: 19
|
||||
const userBinding = user;
|
||||
return userBinding.isSystemUser() ? ((Component) => <Component style={styles.botTag} type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.SYSTEM_DM} verified={user.isVerifiedBot()} />)(importDefault(8706) /* metro dependency 8706: BotTag */) : user.bot ? ((Component) => <Component style={styles.botTag} type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.BOT} verified={user.isVerifiedBot()} />)(importDefault(8706) /* metro dependency 8706: BotTag */) : null;
|
||||
}
|
||||
|
||||
function _fun68327() { // fn#68327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:2767, offset: 0x01c495e4, size: 197 bytes, params: 1, frame: 18
|
||||
if (userTag == null) {
|
||||
return null;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant={textVariant} color="mobile-text-heading-primary" lineClamp={2}>{userTag}</Text>;
|
||||
if (onPressUserTag != null) {
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
return (
|
||||
<PressableOpacity
|
||||
onPress={onPressUserTag}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={userTag}
|
||||
accessibilityHint={userTagAccessibilityHint}
|
||||
>
|
||||
{text}
|
||||
</PressableOpacity>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<View>
|
||||
{text}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function renderPronouns() { // fn#68328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:3070, owner: UserTagAndPronouns.renderPronouns, offset: 0x01c496a9, size: 77 bytes, params: 1, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant={textVariant}
|
||||
color="mobile-text-heading-primary"
|
||||
lineClamp={1}
|
||||
>
|
||||
{pronouns}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function ProfileBadgeOnPress() { // fn#68330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:4416, owner: ProfileBadge.onPress, offset: 0x01c49a16, size: 504 bytes, params: 1, frame: 22
|
||||
var advertisingId;
|
||||
var idBinding;
|
||||
var value3;
|
||||
var object2;
|
||||
var defaultImport;
|
||||
var open;
|
||||
var labelBinding;
|
||||
var defaultImport2;
|
||||
var track;
|
||||
var QUEST_CONTENT_VIEWED;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const value2 = null;
|
||||
if (value2 == env0_3) {
|
||||
idBinding = id;
|
||||
value3 = environment.__proto__;
|
||||
if (idBinding !== getBadgeName(require(dependencyMap[21]).BadgeId.GIFTING)) {
|
||||
defaultImport = importDefault(dependencyMap[23]);
|
||||
open = defaultImport.open;
|
||||
object2 = {};
|
||||
labelBinding = label;
|
||||
object2.key = 'PROFILE_BADGE-' + labelBinding;
|
||||
object2.content = labelBinding;
|
||||
object2.icon = source;
|
||||
Reflect.apply(open, defaultImport, [object2]);
|
||||
if (id === require(dependencyMap[24]).QUEST_COMPLETED_BADGE) {
|
||||
defaultImport2 = importDefault(dependencyMap[25]);
|
||||
track = defaultImport2.track;
|
||||
QUEST_CONTENT_VIEWED = AnalyticEvents.QUEST_CONTENT_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue = require(dependencyMap[26]);
|
||||
copyDataProperties(object2,
|
||||
moduleValue.getContentProperties(require(dependencyMap[27]).QuestContent.QUEST_BADGE),
|
||||
dependencyMap);
|
||||
if (value2 != env0_4) {
|
||||
moduleValue2 = require(dependencyMap[28]);
|
||||
advertisingId = moduleValue2.isIOS() ? env0_4.advertisingId : value2;
|
||||
} else {
|
||||
advertisingId = value2;
|
||||
}
|
||||
object2['apple_advertising_id'] = advertisingId;
|
||||
if (value2 != env0_4) {
|
||||
moduleValue3 = require(dependencyMap[28]);
|
||||
advertisingId = moduleValue3.isAndroid() ? env0_4.advertisingId : value2;
|
||||
} else {
|
||||
advertisingId = value2;
|
||||
}
|
||||
object2['android_advertising_id'] = advertisingId;
|
||||
object2['is_targeted'] = false;
|
||||
Reflect.apply(track, defaultImport2, [QUEST_CONTENT_VIEWED, object2]);
|
||||
}
|
||||
} else {
|
||||
require(dependencyMap[22]).openUserSettings({screen: UserSettingsSections.PREMIUM_GIFTING, params: {}});
|
||||
}
|
||||
} else {
|
||||
env0_3();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun68332(a0) { // fn#68332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:5253, offset: 0x01c49e15, size: 126 bytes, params: 2, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const profileBadgeBindingProps = {id: a0.id, userId: userId};
|
||||
const object = {};
|
||||
object.uri = a0.iconSrc ?? getBadgeAssetFromCDN(a0.icon);
|
||||
profileBadgeBindingProps.source = object;
|
||||
profileBadgeBindingProps.label = a0.description;
|
||||
profileBadgeBindingProps.badgeSize = badgeSize;
|
||||
profileBadgeBindingProps.themeType = themeType;
|
||||
profileBadgeBindingProps.showToastOnPress = showToastOnPress;
|
||||
return <ProfileBadge {...profileBadgeBindingProps} key={a0.id} />;
|
||||
}
|
||||
|
||||
function _fun68334() { // fn#68334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:5672, offset: 0x01c49ea5, size: 143 bytes, params: 1, frame: 18
|
||||
let Math = global.Math;
|
||||
const value6 = Math.floor((width - 2 * PROFILE_SIDE_PADDING - 2 * badgeRowHorizontalPadding + 4) / (badgeSize + 4));
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
Math = global.Math;
|
||||
return Reflect.apply(from, Array, [{length: Math.ceil(env0_7.length / value6)}, _fun68335]);
|
||||
}
|
||||
|
||||
function _fun68336(a0, a1) { // fn#68336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:5937, offset: 0x01c49f61, size: 81 bytes, params: 3, frame: 17
|
||||
return (
|
||||
<View style={[styles.badgeRow, {paddingHorizontal: badgeRowHorizontalPadding}, style]} key={a1}>
|
||||
{a0}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68335(a0, a1) { // fn#68335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8880:5765, offset: 0x01c49f34, size: 45 bytes, params: 3, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_7;
|
||||
const slice = binding.slice;
|
||||
const binding2 = env0_0;
|
||||
return Reflect.apply(slice, binding, [a1 * binding2, (a1 + 1) * binding2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
/* Metro module 10353; source: modules/user_profile/native/UserProfilePrivacyNotice.tsx; dependencies: [57, 31, 27, 661, 1376, 33, 4501, 697, 1314, 1244, 10354, 8169, 3829, 1365, 7013, 4573, 7007, 4068, 5278, 5312, 2] */
|
||||
function _fun80226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10539:6, offset: 0x01e72178, size: 468 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const BACKGROUND_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_INFO;
|
||||
object.backgroundColor = BACKGROUND_FEEDBACK_INFO;
|
||||
object.borderWidth = 1;
|
||||
const ICON_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO;
|
||||
object.borderColor = ICON_FEEDBACK_INFO;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.padding = PX_12;
|
||||
object.flexDirection = 'row';
|
||||
object.alignItems = 'flex-start';
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.gap = PX_8;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{container: object, icon: {'flexShrink': 0, 'marginTop': 2},
|
||||
text: {flex: 1}, closeButton: {flexShrink: 0}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePrivacyNotice.tsx');
|
||||
exports.default = UserProfilePrivacyNotice;
|
||||
exports.useIsPrivacyNoticeVisible = useIsPrivacyNoticeVisible;
|
||||
}
|
||||
|
||||
function usePrivacyNoticeContentTypes() { // fn#80227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10539:576, offset: 0x01e7234c, size: 146 bytes, params: 1, frame: 17
|
||||
const value2 = (require(10354) /* metro dependency 10354: PrivateProfilesExperiment */).useIsInPrivateProfilesExperiment('UserProfilePrivacyNotice');
|
||||
const value3 = (require(8169) /* metro dependency 8169: useUserIsTeen */).useUserIsTeen();
|
||||
const ProfileVisibility = (require(3829) /* metro dependency 3829: UserSettings */).ProfileVisibility;
|
||||
return env0_3.useMemo(_fun80228, [value2, value3, ProfileVisibility.useSetting()]);
|
||||
}
|
||||
|
||||
function UserProfilePrivacyNotice() { // fn#80229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10539:1016, offset: 0x01e7244f, size: 721 bytes, params: 1, frame: 27
|
||||
var r16;
|
||||
const styles = useStyles();
|
||||
const value4 = env0_2((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(usePrivacyNoticeContentTypes()),
|
||||
2);
|
||||
const property = value4[0];
|
||||
const env0_0 = value4[1];
|
||||
let ProfileVisibility = (require(3829) /* metro dependency 3829: UserSettings */).ProfileVisibility;
|
||||
const value5 = ProfileVisibility.useSetting();
|
||||
const value6 = env0_3.useCallback(_fun80230, []);
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const PRIVATE_PROFILE_INLINE_NOTICE = DismissibleContent.PRIVATE_PROFILE_INLINE_NOTICE;
|
||||
if (property !== PRIVATE_PROFILE_INLINE_NOTICE) {
|
||||
return null;
|
||||
}
|
||||
ProfileVisibility = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ProfileVisibility;
|
||||
const FRIENDS_ONLY = ProfileVisibility.FRIENDS_ONLY;
|
||||
if (FRIENDS_ONLY === value5) {
|
||||
r16 = (require(1244) /* metro dependency 1244: indexNative */).t['0UBDvq'];
|
||||
} else if ((require(1314) /* metro dependency 1314: preloaded_user_settings */).ProfileVisibility.FRIENDS_AND_SMALL_GUILDS === value5) {
|
||||
r16 = (require(1244) /* metro dependency 1244: indexNative */).t['9AvQO/'];
|
||||
} else {
|
||||
(require(1314) /* metro dependency 1314: preloaded_user_settings */).ProfileVisibility.FRIENDS_AND_ALL_GUILDS;
|
||||
r16 = (require(1244) /* metro dependency 1244: indexNative */).t.dqQ7AN;
|
||||
}
|
||||
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
|
||||
const items2 = [<View style={styles.icon}><CircleInformationIcon size="xs" color="icon-feedback-info" /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[1] = <Text style={styles.text} variant="text-sm/normal" color="text-default">{intl.format(r16,
|
||||
{privacySettingsLink: value6})}</Text>;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object = {accessibilityRole: 'button'};
|
||||
const string = intl.string;
|
||||
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
|
||||
object.accessibilityLabel = Reflect.apply(string, intl, [WAI6xu]);
|
||||
object.onPress = onPress_80232;
|
||||
object.style = styles.closeButton;
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
items2[2] = <PressableOpacity {...object}><XSmallIcon size="xs" color="icon-feedback-info" /></PressableOpacity>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useIsPrivacyNoticeVisible() { // fn#80233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10539:2286, offset: 0x01e727c4, size: 93 bytes, params: 1, frame: 16
|
||||
const property = env0_2((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(usePrivacyNoticeContentTypes()),
|
||||
1)[0];
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const PRIVATE_PROFILE_INLINE_NOTICE = DismissibleContent.PRIVATE_PROFILE_INLINE_NOTICE;
|
||||
return property === PRIVATE_PROFILE_INLINE_NOTICE;
|
||||
}
|
||||
|
||||
function _fun80228() { // fn#80228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10539:779, offset: 0x01e723de, size: 113 bytes, params: 1, frame: 13
|
||||
return env0_0 && env0_1 && env0_2 !== (require(1314) /* metro dependency 1314: preloaded_user_settings */).ProfileVisibility.FRIENDS_AND_ALL_GUILDS ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PRIVATE_PROFILE_INLINE_NOTICE] : [];
|
||||
}
|
||||
|
||||
function _fun80230(a0, a1) { // fn#80230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10539:1221, offset: 0x01e72720, size: 80 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-sm/normal"
|
||||
color="text-link"
|
||||
onPress={function() {
|
||||
return require(dependencyMap[16]).openUserSettings({screen: UserSettingsSections.DATA_AND_PRIVACY});
|
||||
}}
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Metro module 10474; source: modules/user_profile/native/UserProfilePrivateBanner.tsx; dependencies: [31, 27, 6816, 33, 4501, 697, 673, 6705, 4573, 1244, 2] */
|
||||
function _fun81045(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10660:6, offset: 0x01e971bb, size: 321 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const PROFILE_TOP_LAYER_Z_INDEX = (require(6816) /* metro dependency 6816: Constants */).PROFILE_TOP_LAYER_Z_INDEX;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'gap': 6,
|
||||
'paddingTop': 18};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingBottom = PX_12;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.paddingHorizontal = PX_8;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object.position = 'relative';
|
||||
object.zIndex = PROFILE_TOP_LAYER_Z_INDEX;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{banner: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePrivateBanner.tsx');
|
||||
exports.default = UserProfilePrivateBanner;
|
||||
}
|
||||
|
||||
function UserProfilePrivateBanner({primaryColor}) { // fn#81046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10660:557, offset: 0x01e972fc, size: 294 bytes, params: 2, frame: 22
|
||||
var r5;
|
||||
var object;
|
||||
const styles = useStyles();
|
||||
const items2 = [styles.banner];
|
||||
const value2 = primaryColor != null;
|
||||
if (value2) {
|
||||
object = {};
|
||||
object.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(primaryColor);
|
||||
r5 = object;
|
||||
} else {
|
||||
r5 = value2;
|
||||
}
|
||||
items2[1] = r5;
|
||||
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
const lockIcon = <LockIcon size="xs" color={TEXT_DEFAULT} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const KPnd2O = (require(1244) /* metro dependency 1244: indexNative */).t.KPnd2O;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{lockIcon}
|
||||
<Text variant="text-sm/medium" color="text-default">
|
||||
{Reflect.apply(string, intl, [KPnd2O])}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* Metro module 10347; source: modules/user_profile/native/UserProfilePrivateInfoBanner.tsx; dependencies: [27, 33, 4501, 697, 4573, 1244, 2] */
|
||||
function _fun80200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10533:6, offset: 0x01e70e7c, size: 280 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.padding = PX_12;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object.borderWidth = 1;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object.borderColor = BORDER_MUTED;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{banner: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePrivateInfoBanner.tsx');
|
||||
exports.default = UserProfilePrivateInfoBanner;
|
||||
}
|
||||
|
||||
function UserProfilePrivateInfoBanner({username, containerBackground}) { // fn#80201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10533:431, offset: 0x01e70f94, size: 198 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const items2 = [styles.banner];
|
||||
items2[1] = containerBackground != null && ({backgroundColor: containerBackground});
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const P8ij6Z = (require(1244) /* metro dependency 1244: indexNative */).t.P8ij6Z;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Text variant="text-sm/normal">
|
||||
{Reflect.apply(format, intl, [P8ij6Z, {username: username}])}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/* Metro module 10489; source: modules/user_profile/native/UserProfileRemediatedNotice.tsx; dependencies: [31, 27, 3793, 661, 33, 4501, 697, 8496, 632, 4573, 1244, 8783, 2] */
|
||||
function _fun81161(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:6, offset: 0x01e9c1dd, size: 316 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.Fragment;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.padding = PX_12;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.gap = PX_8;
|
||||
object.flexDirection = 'row';
|
||||
object.alignItems = 'center';
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{container: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileRemediatedNotice.tsx');
|
||||
exports.default = RemediatedUserNotice;
|
||||
}
|
||||
|
||||
function RemediatedUserNotice({user, style}) { // fn#81162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:430, offset: 0x01e9c319, size: 551 bytes, params: 2, frame: 30
|
||||
var r6;
|
||||
var r0;
|
||||
var value4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
var jsxRuntimeEnv0_7Binding;
|
||||
var items3;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStoresObject = useStateFromStoresModule.useStateFromStoresObject;
|
||||
const items = [RelationshipStore];
|
||||
const {isPendingIncoming, isBlocked, isIgnored} = Reflect.apply(useStateFromStoresObject, useStateFromStoresModule,
|
||||
[items, function() {
|
||||
var object = {};
|
||||
var userBinding = user;
|
||||
object.isPendingIncoming = RelationshipStore.getRelationshipType(userBinding.id) === RelationshipTypes.PENDING_INCOMING;
|
||||
object.isBlocked = RelationshipStore.isBlocked(userBinding.id);
|
||||
object.isIgnored = RelationshipStore.isIgnored(userBinding.id);
|
||||
return object;
|
||||
}]);
|
||||
if (isBlocked) {
|
||||
var viewProps = {style: [styles.container, value2.card, style]};
|
||||
items2 = [isBlocked && <Text variant="text-sm/semibold" color="text-default" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oC/fU6'])}</Text>];
|
||||
if (isIgnored) {
|
||||
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
value = <Text variant="text-sm/semibold" color="text-default" lineClamp={1}>{intl.string(t.HXz5An)}</Text>;
|
||||
items3 = [value];
|
||||
items3[1] = <Text variant="text-sm/semibold" color="text-default" accessibilityElementsHidden importantForAccessibility="no">{'•'}</Text>;
|
||||
items3[2] = intl.format(t.PrtAqy, {unignoreHook: unignoreHook});
|
||||
value = <>{items3}</>;
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = isIgnored;
|
||||
}
|
||||
items2[1] = r6;
|
||||
value = <View {...viewProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
value4 = null;
|
||||
if (isIgnored) {
|
||||
if (isPendingIncoming) {
|
||||
r0 = value4;
|
||||
} else {
|
||||
var viewProps = {style: [styles.container, value2.card, style]};
|
||||
items2 = [isBlocked && <Text variant="text-sm/semibold" color="text-default" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oC/fU6'])}</Text>];
|
||||
if (isIgnored) {
|
||||
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
value = <Text variant="text-sm/semibold" color="text-default" lineClamp={1}>{intl.string(t.HXz5An)}</Text>;
|
||||
items3 = [value];
|
||||
items3[1] = <Text variant="text-sm/semibold" color="text-default" accessibilityElementsHidden importantForAccessibility="no">{'•'}</Text>;
|
||||
items3[2] = intl.format(t.PrtAqy, {unignoreHook: unignoreHook});
|
||||
value = <>{items3}</>;
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = isIgnored;
|
||||
}
|
||||
items2[1] = r6;
|
||||
value = <View {...viewProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
r0 = value4;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function unignoreHook(a0) { // fn#81164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:1257, owner: RemediatedUserNotice.unignoreHook, offset: 0x01e9c59f, size: 76 bytes, params: 2, frame: 14
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
role="button"
|
||||
variant="heading-sm/medium"
|
||||
color="text-link"
|
||||
onPress={onPress_81165}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function unignoreHookOnPress() { // fn#81165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:1344, owner: RemediatedUserNotice.unignoreHook.onPress, offset: 0x01e9c5eb, size: 57 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
return value.unignoreUser(user.id, 'UserProfileRemediatedNotice');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/* Metro module 6792; source: modules/user_profile/native/UserProfileRolesCard.tsx; dependencies: [31, 27, 1945, 1938, 661, 33, 4501, 697, 6793, 3829, 6796, 6797, 3856, 1244, 6794, 6802, 6812, 4573, 5278, 566, 6814, 6815, 2] */
|
||||
function _fun53473(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:6, offset: 0x0134c8ff, size: 438 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const closure = RoleItem;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.DEFAULT_ROLE_COLOR_HEX;
|
||||
const env0_8 = value.MAX_VISUAL_ROLE_LENGTH;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.Fragment;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {roleContainer: {'flexDirection': 'row', 'gap': 8, 'flexWrap': 'wrap'}};
|
||||
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': 4, 'padding': 6};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object5.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.role = object5;
|
||||
const object6 = {'borderRadius': null, 'height': 12, 'width': 12};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.roleDot = object6;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileRolesCard.tsx');
|
||||
exports.default = UserProfileRolesCard;
|
||||
exports.RoleItem = closure;
|
||||
}
|
||||
|
||||
function RoleDot({color}) { // fn#53474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:542, offset: 0x0134cab5, size: 77 bytes, params: 2, frame: 18
|
||||
const styles = useStyles();
|
||||
return <View style={[styles.roleDot, {backgroundColor: color ?? DEFAULT_ROLE_COLOR_HEX}]} />;
|
||||
}
|
||||
|
||||
function RoleItem({role, guildId, color}) { // fn#53475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:642, offset: 0x0134cb02, size: 598 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var PressableHighlight;
|
||||
var intl;
|
||||
let value = undefined;
|
||||
const styles = useStyles();
|
||||
const r8 = role.name.length <= MAX_VISUAL_ROLE_LENGTH ? role.name : '' + role.name.slice(0,
|
||||
MAX_VISUAL_ROLE_LENGTH) + '...';
|
||||
const env0_3 = color ?? role.colorString;
|
||||
const value5 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guildId,
|
||||
roleId: role.id, size: 12});
|
||||
const tags = role.tags;
|
||||
const env0_5 = value !== (tags == null ? value : tags.guild_connections);
|
||||
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
|
||||
const value6 = DeveloperMode.useSetting();
|
||||
const defaultImport = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
|
||||
const useExperiment = defaultImport.useExperiment;
|
||||
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport, [{location: 'RoleItem'},
|
||||
{autoTrackExposure: false}]).tidaWebformEnabled;
|
||||
const value7 = env0_3.useCallback(_fun53476, [role.id, r8]);
|
||||
const value8 = env0_3.useCallback(_fun53477, [role, r8, value5]);
|
||||
const closure = RoleItemRenderContent;
|
||||
if (value6) {
|
||||
PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
var pressableHighlightProps = {onPress: value7, onLongPress: value6 && tidaWebformEnabled ? value8 : value,
|
||||
accessibilityRole: 'button', accessibilityLabel: r8};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
pressableHighlightProps.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sMsaLg);
|
||||
pressableHighlightProps.style = styles.role;
|
||||
value = <PressableHighlight {...pressableHighlightProps}>{closure()}</PressableHighlight>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = <View style={styles.role}>{closure()}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function RolesList({guildMemberRoleIds, guildId}) { // fn#53481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:2057, offset: 0x0134d056, size: 159 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildRoleStore],
|
||||
function() {
|
||||
return GuildRoleStore.getManyRoles(guildId,
|
||||
guildMemberRoleIds).sort(require(dependencyMap[20]).sortRolesByVerification);
|
||||
}, [guildMemberRoleIds, guildId]);
|
||||
return value2.length === 0 ? null : <View style={styles.roleContainer}>{value2.map(_fun53483)}</View>;
|
||||
}
|
||||
|
||||
function UserProfileRolesCard({userId, guildId, style}) { // fn#53484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:2439, offset: 0x0134d16c, size: 254 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var UserProfileCard;
|
||||
var intl;
|
||||
const r8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
|
||||
return GuildMemberStore.getMember(guildId, userId);
|
||||
}, [userId, guildId])?.roles ?? [];
|
||||
if (r8.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <UserProfileCard title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])} style={style}><RolesList guildId={guildId} guildMemberRoleIds={r8} /></UserProfileCard>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun53476() { // fn#53476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:1034, offset: 0x0134cd58, size: 77 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
value.copy(role.id);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).roleIdCopied(env0_2);
|
||||
}
|
||||
|
||||
function _fun53477() { // fn#53477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:1113, offset: 0x0134cda5, size: 286 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var moduleValue;
|
||||
var push;
|
||||
let object2 = {};
|
||||
const value = environment.__proto__;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.label = Reflect.apply(string, intl, [t.sMsaLg]);
|
||||
object2.onPress = onPress_53478;
|
||||
const items2 = [object2];
|
||||
if (env0_4 != null) {
|
||||
moduleValue = require(6794) /* metro dependency 6794: RoleIconUtils */;
|
||||
if ((moduleValue.getRoleIconData(role) ?? ({})).customIconSrc != null) {
|
||||
push = items2.push;
|
||||
object2 = {};
|
||||
object2.label = intl.string(t['8xHmxo']);
|
||||
object2.onPress = onPress_53479;
|
||||
Reflect.apply(push, items2, [object2]);
|
||||
}
|
||||
}
|
||||
(require(6802) /* metro dependency 6802: showSimpleActionSheet */).showSimpleActionSheet({'key': 'RoleItem',
|
||||
'options': null, 'hasIcons': false, options: items2});
|
||||
}
|
||||
|
||||
function RoleItemRenderContent() { // fn#53480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:1537, owner: RoleItem.renderContent, offset: 0x0134cf53, size: 259 bytes, params: 1, frame: 22
|
||||
var r5;
|
||||
var value5;
|
||||
var VerifiedRoleIcon;
|
||||
var roleBinding;
|
||||
const jsxRuntimeEnv1_10Binding = jsxRuntimeEnv1_10;
|
||||
if (env0_5) {
|
||||
value5 = undefined;
|
||||
VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */;
|
||||
roleBinding = role;
|
||||
r5 = <VerifiedRoleIcon roleId={roleBinding.id} guildId={guildId} roleColor={(roleBinding == null ? value5 : role.colorString) ?? value5} size={12} displayRoleIcon={false} />;
|
||||
} else {
|
||||
r5 = <RoleDot color={env0_3 ?? undefined} />;
|
||||
}
|
||||
const items2 = [r5, env0_4];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[2] = <Text variant="text-xs/medium">{env0_2}</Text>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53483(a0) { // fn#53483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:2299, offset: 0x0134d13c, size: 48 bytes, params: 2, frame: 15
|
||||
return (
|
||||
<RoleItem
|
||||
role={a0}
|
||||
guildId={guildId}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onPress_53478() { // fn#53478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:1172, offset: 0x0134cec3, size: 77 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
value.copy(role.id);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).roleIdCopied(env1_2);
|
||||
}
|
||||
|
||||
function onPress_53479() { // fn#53479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6970:1375, offset: 0x0134cf10, size: 67 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
value.copy(customIconSrc);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/* Metro module 11378; source: modules/user_profile/native/UserProfileSection.tsx; dependencies: [31, 27, 33, 4501, 697, 3868, 6791, 4000, 7331, 4573, 2] */
|
||||
function _fun87225(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11564:6, offset: 0x01fb44a5, size: 308 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {borderWidth: 1};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object.borderColor = BORDER_SUBTLE;
|
||||
const env0_5 = Reflect.apply(createStyles, value, [{titleContainer: {'flexDirection': 'row', 'marginBottom': 12,
|
||||
'justifyContent': 'space-between'}, title: {flexDirection: 'row'}, section: {'marginHorizontal': 12,
|
||||
'marginTop': 12, 'marginBottom': 8}, contentContainer: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileSection.tsx');
|
||||
exports.default = UserProfileSection;
|
||||
}
|
||||
|
||||
function UserProfileSection(a0) { // fn#87226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11564:541, offset: 0x01fb45d9, size: 500 bytes, params: 2, frame: 31
|
||||
var r1;
|
||||
var moduleValue3;
|
||||
const title = a0.title;
|
||||
const headerIcon = a0.headerIcon;
|
||||
const trailingIcon = a0.trailingIcon;
|
||||
const showContainer = a0.showContainer;
|
||||
const children = a0.children;
|
||||
const style = a0.style;
|
||||
const object3 = {'title': 0, 'headerIcon': 0, 'trailingIcon': 0, 'showContainer': 0, 'children': 0, 'style': 0};
|
||||
const value = null;
|
||||
silentSetPrototypeOf(object3, value, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object3, undefined);
|
||||
const styles = useStyles();
|
||||
const {theme, primaryColor} = (require(3868) /* metro dependency 3868: native */).useThemeContext();
|
||||
const value5 = (require(6791) /* metro dependency 6791: useProfileThemeValuesNative */).useProfileThemeValues(theme);
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, styles.contentContainer, object3);
|
||||
if (value == primaryColor) {
|
||||
r1 = styles.contentContainer.borderColor;
|
||||
} else if (value != value5) {
|
||||
moduleValue3 = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
r1 = moduleValue3.hexOpacityToRgba((require(7331) /* metro dependency 7331: FormDivider */).DIVIDER_COLORS[theme],
|
||||
|
||||
value5.dividerOpacity);
|
||||
} else {
|
||||
r1 = styles.contentContainer.borderColor;
|
||||
}
|
||||
object4['borderColor'] = r1;
|
||||
return (
|
||||
<View style={[styles.section, style]} {...value2}>
|
||||
{value != title ? <View style={styles.titleContainer}><View style={styles.title}>{((Text) => <Text variant="eyebrow" accessibilityRole="header">{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{headerIcon}</View>{trailingIcon}</View> : value}
|
||||
<View style={showContainer ? object4 : value}>
|
||||
{children}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Metro module 8496; source: modules/user_profile/native/UserProfileSharedStyles.tsx; dependencies: [6816, 4501, 697, 1357, 2] */
|
||||
function _fun67406(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8681:6, offset: 0x01c2144a, size: 213 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const constantsModule = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_2 = constantsModule.AVATAR_CONTAINER_SIZE;
|
||||
const env0_3 = constantsModule.AVATAR_CUSTOM_STATUS_GAP;
|
||||
const env0_4 = constantsModule.AVATAR_PADDING;
|
||||
const env0_5 = constantsModule.CARD_PADDING;
|
||||
const env0_6 = constantsModule.PROFILE_CONTENT_BOTTOM_PADDING;
|
||||
const env0_7 = constantsModule.PROFILE_SIDE_PADDING;
|
||||
const env0_8 = constantsModule.PROFILE_TOP_LAYER_Z_INDEX;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67407);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileSharedStyles.tsx');
|
||||
exports.default = function() {
|
||||
return useStyles(importDefault(dependencyMap[3])('UserProfileSharedStyles'));
|
||||
};
|
||||
}
|
||||
|
||||
function _fun67407(a0) { // fn#67407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8681:311, offset: 0x01c2151f, size: 459 bytes, params: 2, frame: 19
|
||||
const object2 = {};
|
||||
object2.avatarPosition = {position: 'absolute',
|
||||
top: -AVATAR_CONTAINER_SIZE / 2, left: PROFILE_SIDE_PADDING - AVATAR_PADDING};
|
||||
object2.avatarBackground = {width: AVATAR_CONTAINER_SIZE, height: AVATAR_CONTAINER_SIZE,
|
||||
borderRadius: AVATAR_CONTAINER_SIZE, padding: AVATAR_PADDING, zIndex: 0};
|
||||
object2.avatar = {margin: AVATAR_PADDING, zIndex: 1};
|
||||
object2.profileContentWrapper = {'flexGrow': 1, 'paddingBottom': null, 'overflow': 'visible',
|
||||
paddingBottom: PROFILE_CONTENT_BOTTOM_PADDING};
|
||||
object2.profileContent = {paddingHorizontal: PROFILE_SIDE_PADDING};
|
||||
object2.customStatusBubble = {'marginTop': 6, 'marginBottom': 12,
|
||||
marginLeft: AVATAR_CONTAINER_SIZE - AVATAR_PADDING + AVATAR_CUSTOM_STATUS_GAP};
|
||||
object2.customStatusBubbleInset = {marginLeft: PROFILE_SIDE_PADDING + AVATAR_CONTAINER_SIZE - AVATAR_PADDING + AVATAR_CUSTOM_STATUS_GAP,
|
||||
marginRight: PROFILE_SIDE_PADDING};
|
||||
object2.emojiOnlyCustomStatusBubble = {marginBottom: 4};
|
||||
object2.primaryInfo = {'rowGap': 12, 'paddingBottom': 12};
|
||||
object2.primaryButtons = {paddingVertical: 12};
|
||||
object2.bannerButtons = {'flexDirection': 'row', 'position': 'absolute', 'top': 16, 'right': 16, 'gap': 8,
|
||||
zIndex: PROFILE_TOP_LAYER_Z_INDEX};
|
||||
object2.bannerButtonsWithPrivateBanner = {top: 54};
|
||||
const object3 = {paddingHorizontal: PROFILE_SIDE_PADDING};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.marginBottom = PX_16;
|
||||
object2.profileTablist = object3;
|
||||
object2.cards = {rowGap: 16};
|
||||
const object4 = {};
|
||||
const radii = (importDefault(697) /* metro dependency 697: native */).radii;
|
||||
object4.borderRadius = a0 ? radii.md : radii.lg;
|
||||
object4.padding = CARD_PADDING;
|
||||
object4.borderWidth = 1;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object4.borderColor = BORDER_MUTED;
|
||||
object2.card = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
/* Metro module 8744; source: modules/user_profile/native/UserProfileSpeedBumpActionSheet.tsx; dependencies: [57, 31, 27, 1379, 1945, 1878, 8516, 661, 33, 4501, 697, 8745, 1244, 6231, 6238, 1305, 4002, 4048, 566, 8490, 6771, 6789, 8514, 8746, 683, 8061, 8743, 6275, 6277, 8747, 8748, 4573, 4617, 4578, 5278, 3829, 2] */
|
||||
function _fun68465(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:6, offset: 0x01c4f741, size: 716 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(8516) /* metro dependency 8516: Constants */).UserProfileAnalyticsTypes;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.AnalyticEvents;
|
||||
const env0_11 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value3.jsx;
|
||||
const env0_13 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.button = {paddingHorizontal: PX_16, paddingBottom: 56};
|
||||
const object5 = {};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.marginBottom = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
object2.tableContainer = object5;
|
||||
const object6 = {};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object6.marginBottom = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginHorizontal = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
object2.header = object6;
|
||||
object2.bodyText = {textAlign: 'center'};
|
||||
object2.headerText = {textAlign: 'center'};
|
||||
object2.avatar = {alignSelf: 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.avatarContainer = {'position': 'relative', 'alignSelf': 'center', marginTop: PX_16};
|
||||
const object7 = {'position': 'absolute', 'bottom': -8, 'right': -8};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7.padding = PX_4;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.avatarIconContainer = object7;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.suppress = {alignSelf: 'center', marginTop: PX_16};
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(UserProfileSpeedBumpActionSheet);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileSpeedBumpActionSheet.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function InformationTable({speedBumpType}) { // fn#68466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:987, offset: 0x01c4fa0d, size: 320 bytes, params: 2, frame: 22
|
||||
let object2 = {};
|
||||
object2.icon = importDefault(8745) /* metro dependency 8745 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kcuWva);
|
||||
const items2 = [object2];
|
||||
object2 = {icon: importDefault(8745) /* metro dependency 8745 */};
|
||||
object2.text = speedBumpType === 'block' ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QxrDY1) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.W6fjkS);
|
||||
items2[1] = object2;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<TableRowGroup hasIcons>
|
||||
{items2.map(_fun68467)}
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileSpeedBumpActionSheet({userId, channelId, messageId, roleId, sessionId, onClose, location, openedAt, sourceAnalyticsLocations = [], speedBumpType}) { // fn#68468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:1445, offset: 0x01c4fbf0, size: 1972 bytes, params: 2, frame: 48
|
||||
const styles = useStyles();
|
||||
const sharedModule = require(4002) /* metro dependency 4002: shared */;
|
||||
const isThemeLight2 = sharedModule.isThemeLight((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getUser(userId);
|
||||
});
|
||||
const env0_4 = user;
|
||||
const guild_id = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
}, [channelId])?.guild_id;
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun68471);
|
||||
const value6 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user?.id ?? EMPTY_STRING_SNOWFLAKE_ID,
|
||||
guild_id);
|
||||
const IGNORED_USER_SHEET = UserProfileAnalyticsTypes.IGNORED_USER_SHEET;
|
||||
const binding = env0_4;
|
||||
const [property, env0_9] = location(binding.useState(false), 2);
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const items = [];
|
||||
const value9 = arraySpread(items, sourceAnalyticsLocations, 0, channelId);
|
||||
const IGNORED_PROFILE_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).IGNORED_PROFILE_ACTION_SHEET;
|
||||
items[value9] = IGNORED_PROFILE_ACTION_SHEET;
|
||||
value9 + 1;
|
||||
const analyticsLocations = defaultImport2(items).analyticsLocations;
|
||||
const value10 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useCreateUserProfileAnalyticsContext({layout: 'ACTION_SHEET',
|
||||
sourceSessionId: sessionId, userId: userId, channelId: channelId, messageId: messageId, roleId: roleId});
|
||||
binding.useEffect(_fun68472,
|
||||
[(importDefault(8746) /* metro dependency 8746: useUserProfileAnalyticsProperties */)({userId: userId,
|
||||
user: user, channelId: channelId, guildId: guild_id, displayProfile: value6, guildMember: value5,
|
||||
type: IGNORED_USER_SHEET}), value6, guild_id, property, value5]);
|
||||
binding.useEffect(function() {
|
||||
return _fun68474;
|
||||
}, [onClose]);
|
||||
binding.useEffect(_fun68475, [user, userId]);
|
||||
if (user == null) {
|
||||
return null;
|
||||
}
|
||||
const closure = onPress_68476;
|
||||
const value12 = speedBumpType === 'block';
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const UserProfileAnalyticsProvider = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).UserProfileAnalyticsProvider;
|
||||
const fetchStartedAt = value6?.fetchStartedAt;
|
||||
const fetchEndedAt = value6?.fetchEndedAt;
|
||||
const isLoaded = value6?.isLoaded;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetView = (require(6277) /* metro dependency 6277 */).BottomSheetView;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XLARGE = AvatarSizes.XLARGE;
|
||||
const avatar = <Avatar user={user} guildId={guild_id} animate={false} size={XLARGE} style={styles.avatar} />;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const object2 = {};
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
object2.size = MEDIUM;
|
||||
if (value12) {
|
||||
object2.source = importDefault(8747) /* metro dependency 8747 */;
|
||||
} else {
|
||||
object2.source = importDefault(8748) /* metro dependency 8748 */;
|
||||
}
|
||||
const items3 = [<View style={styles.avatarContainer}>{avatar}<View style={styles.avatarIconContainer}><Icon {...object2} /></View></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
items3[1] = <Text style={styles.headerText} variant="heading-xl/bold" color="mobile-text-heading-primary" accessibilityRole="header">{Reflect.apply(string,
|
||||
intl, [t.b33pLD])}</Text>;
|
||||
const format = intl.format;
|
||||
const r29 = value12 ? t['8F+WNz'] : t['/cZp5s'];
|
||||
const object3 = {};
|
||||
object3.username = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guild_id, channelId,
|
||||
user);
|
||||
items3[2] = <Text style={styles.bodyText} variant="text-md/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [r29, object3])}</Text>;
|
||||
const items4 = [<View style={styles.header}>{items3}</View>];
|
||||
items4[1] = <View style={styles.tableContainer}><InformationTable speedBumpType={speedBumpType} /></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items4[2] = <View style={styles.button}><Button variant={isThemeLight2 ? 'tertiary' : 'secondary'} size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UJKH/l'])} onPress={closure} />{speedBumpType !== 'ignore' ? null : ((PressableOpacity) => <PressableOpacity style={styles.suppress} accessibilityRole="button" onPress={function() {
|
||||
var IgnoreProfileSpeedbumpDisabled = require(dependencyMap[35]).IgnoreProfileSpeedbumpDisabled;
|
||||
IgnoreProfileSpeedbumpDisabled.updateSetting(true);
|
||||
onPress_68476();
|
||||
}}><Text variant="text-sm/normal" color="text-link">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QbcRCJ)}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<UserProfileAnalyticsProvider
|
||||
value={value10}
|
||||
openedAt={openedAt}
|
||||
fetchStartedAt={fetchStartedAt}
|
||||
fetchEndedAt={fetchEndedAt}
|
||||
isLoaded={isLoaded}
|
||||
>
|
||||
<BottomSheet startExpanded>
|
||||
<BottomSheetView>
|
||||
{items4}
|
||||
</BottomSheetView>
|
||||
</BottomSheet>
|
||||
</UserProfileAnalyticsProvider>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68467(a0, a1) { // fn#68467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:1283, offset: 0x01c4fb4d, size: 163 bytes, params: 3, frame: 22
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const tableRowProps = {start: a1 === 0, end: env0_0.length === a1};
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
tableRowProps.icon = <Icon size={MEDIUM} source={a0.icon} />;
|
||||
tableRowProps.label = a0.text;
|
||||
return <TableRow {...tableRowProps} key={a1} />;
|
||||
}
|
||||
|
||||
function _fun68471() { // fn#68471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:1847, offset: 0x01c503d9, 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 _fun68472() { // fn#68472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:2309, offset: 0x01c50406, size: 131 bytes, params: 1, frame: 15
|
||||
var value6;
|
||||
var defaultImport;
|
||||
if (!(env0_8 || env0_7 == null)) {
|
||||
if (guild_id == null || env0_6?.fullProfileLoadedTimestamp != null) {
|
||||
value6 = environment.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.OPEN_POPOUT, env0_12);
|
||||
env0_9(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun68473() { // fn#68473, offset: 0x01c50489, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
if (onClose != null) {
|
||||
onClose();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function _fun68475() { // fn#68475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:2500, offset: 0x01c504af, 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 UserProfileSpeedBumpActionSheetOnPress() { // fn#68476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8929:2596, owner: UserProfileSpeedBumpActionSheet.onPress, offset: 0x01c504e8, size: 72 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
const object2 = {};
|
||||
object2.sourceAnalyticsLocations = analyticsLocations;
|
||||
object2.ignoreBlockedSpeedBump = true;
|
||||
const locationBinding = location;
|
||||
object2.location = locationBinding;
|
||||
copyDataProperties(object2, env0_11, locationBinding);
|
||||
value(object2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/* Metro module 8694; source: modules/user_profile/native/UserProfileStackedActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 6277, 7972, 477, 6275, 5278, 1244, 5284, 4573, 2] */
|
||||
function _fun68314(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8879:6, offset: 0x01c48888, size: 375 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.header = {flexDirection: 'row', marginHorizontal: PX_16};
|
||||
const object4 = {};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.width = PX_24;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.height = PX_24;
|
||||
object2.headerSpacer = object4;
|
||||
object2.list = {flex: 1};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.contentContainer = {marginHorizontal: PX_16};
|
||||
object2.divider = {marginLeft: 64};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileStackedActionSheet.tsx');
|
||||
exports.default = UserProfileStackedActionSheet;
|
||||
exports.UserProfileStackedActionSheetList = UserProfileStackedActionSheetList;
|
||||
exports.UserProfileStackedActionSheetSectionList = UserProfileStackedActionSheetSectionList;
|
||||
}
|
||||
|
||||
function UserProfileStackedActionSheet(a0) { // fn#68315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8879:506, offset: 0x01c489ff, size: 444 bytes, params: 2, frame: 32
|
||||
var r6;
|
||||
var PressableOpacity;
|
||||
var intl;
|
||||
const title = a0.title;
|
||||
const children = a0.children;
|
||||
const onBack = a0.onBack;
|
||||
const object2 = {'title': 0, 'children': 0, 'onBack': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, undefined);
|
||||
const styles = useStyles();
|
||||
const value3 = onBack != null;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {...value};
|
||||
const items3 = [styles.header];
|
||||
items3[1] = {justifyContent: value3 ? 'space-between' : 'center'};
|
||||
if (value3) {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r6 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} onPress={onBack}>{((ArrowLargeLeftIcon) => <ArrowLargeLeftIcon size="md" />)((require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon)}</PressableOpacity>;
|
||||
} else {
|
||||
r6 = value3;
|
||||
}
|
||||
const items2 = [r6];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <Text variant="redesign/heading-18/bold" color="mobile-text-heading-primary" accessibilityRole="header">{title}</Text>;
|
||||
items2[2] = value3 && <View style={styles.headerSpacer} />;
|
||||
bottomSheetProps['header'] = <View style={items3}>{items2}</View>;
|
||||
return (
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
{children}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileStackedActionSheetList(a0) { // fn#68316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8879:1116, offset: 0x01c48bbb, size: 309 bytes, params: 2, frame: 24
|
||||
const data = a0.data;
|
||||
const contentContainerStyle = a0.contentContainerStyle;
|
||||
const env0_1 = a0.renderItem;
|
||||
let object = {'data': 0, 'contentContainerStyle': 0, 'renderItem': 0};
|
||||
silentSetPrototypeOf(object, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object, undefined);
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
|
||||
const bottomSheetFlatListProps = {...value};
|
||||
bottomSheetFlatListProps['data'] = data;
|
||||
bottomSheetFlatListProps['style'] = styles.list;
|
||||
bottomSheetFlatListProps['ItemSeparatorComponent'] = UserProfileStackedActionSheetListItemSeparatorComponent;
|
||||
object = [styles.contentContainer];
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
const PX_16 = value ? (importDefault(697) /* metro dependency 697: native */).space.PX_16 : 0;
|
||||
object[1] = {paddingBottom: bottom + PX_16};
|
||||
object[2] = contentContainerStyle;
|
||||
bottomSheetFlatListProps['contentContainerStyle'] = object;
|
||||
bottomSheetFlatListProps['renderItem'] = function({item, index}) {
|
||||
return renderItem({item: item, index: index, start: index === 0, end: index === data.length - 1});
|
||||
};
|
||||
return <BottomSheetFlatList {...bottomSheetFlatListProps} />;
|
||||
}
|
||||
|
||||
function UserProfileStackedActionSheetSectionList(a0) { // fn#68319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8879:1606, offset: 0x01c48d77, size: 155 bytes, params: 2, frame: 18
|
||||
const contentContainerStyle = a0.contentContainerStyle;
|
||||
const env0_0 = a0.renderItem;
|
||||
const value = Object.create(null);
|
||||
value.contentContainerStyle = 0;
|
||||
value.renderItem = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const env0_1 = useStyles();
|
||||
const BottomSheetSectionList = (require(6277) /* metro dependency 6277 */).BottomSheetSectionList;
|
||||
return (
|
||||
<BottomSheetSectionList
|
||||
{...value2}
|
||||
{...{['contentContainerStyle']: contentContainerStyle}}
|
||||
{...{['renderItem']: function({item, section, index}) {
|
||||
return renderItem({item: item, start: index === 0, end: index === section.data.length - 1});
|
||||
}}}
|
||||
{...{['ItemSeparatorComponent']: UserProfileStackedActionSheetSectionListItemSeparatorComponent}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileStackedActionSheetListItemSeparatorComponent() { // fn#68317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8879:1326, owner: UserProfileStackedActionSheetList.ItemSeparatorComponent, offset: 0x01c48cf0, size: 62 bytes, params: 1, frame: 14
|
||||
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
||||
return <FormDivider style={styles.divider} />;
|
||||
}
|
||||
|
||||
function UserProfileStackedActionSheetSectionListItemSeparatorComponent() { // fn#68321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8879:1893, owner: UserProfileStackedActionSheetSectionList.ItemSeparatorComponent, offset: 0x01c48e5e, size: 62 bytes, params: 1, frame: 14
|
||||
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
||||
return <FormDivider style={styles.divider} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* Metro module 8867; source: modules/user_profile/native/UserProfileTextButtonGroup.tsx; dependencies: [31, 27, 6816, 33, 4501, 1478, 2] */
|
||||
function _fun69130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9052:6, offset: 0x01c6a162, size: 240 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(6816) /* metro dependency 6816: Constants */).PROFILE_SIDE_PADDING;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexDirection': 'row',
|
||||
'flexWrap': 'wrap', 'gap': 12}, buttonArea: {flexGrow: 1}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileTextButtonGroup.tsx');
|
||||
exports.default = UserProfileTextButtonGroup;
|
||||
}
|
||||
|
||||
function UserProfileTextButtonGroup({primaryButton, secondaryButton, maxWidth, style}) { // fn#69131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9052:384, offset: 0x01c6a252, size: 382 bytes, params: 2, frame: 25
|
||||
var r1;
|
||||
var r0;
|
||||
var buttonArea;
|
||||
var items3;
|
||||
var view;
|
||||
const styles = useStyles();
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const value4 = ((maxWidth == null ? width : global.Math.min(width, maxWidth)) - 2 * PROFILE_SIDE_PADDING - 12) / 2;
|
||||
if (primaryButton != null) {
|
||||
if (primaryButton == null) {
|
||||
r1 = <View style={[styles.container, style]}>{secondaryButton}</View>;
|
||||
} else if (secondaryButton == null) {
|
||||
r1 = <View style={[styles.container, style]}>{primaryButton}</View>;
|
||||
} else {
|
||||
var viewBindingProps = {style: [styles.container, style]};
|
||||
buttonArea = styles.buttonArea;
|
||||
view = <View style={[buttonArea, {minWidth: value4}]}>{primaryButton}</View>;
|
||||
items3 = [view];
|
||||
buttonArea = styles.buttonArea;
|
||||
items3[1] = <View style={[buttonArea, {minWidth: value4}]}>{secondaryButton}</View>;
|
||||
view = <View {...viewBindingProps}>{items3}</View>;
|
||||
r1 = view;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (secondaryButton == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
if (primaryButton == null) {
|
||||
r1 = <View style={[styles.container, style]}>{secondaryButton}</View>;
|
||||
} else if (secondaryButton == null) {
|
||||
r1 = <View style={[styles.container, style]}>{primaryButton}</View>;
|
||||
} else {
|
||||
var viewBindingProps = {style: [styles.container, style]};
|
||||
buttonArea = styles.buttonArea;
|
||||
view = <View style={[buttonArea, {minWidth: value4}]}>{primaryButton}</View>;
|
||||
items3 = [view];
|
||||
buttonArea = styles.buttonArea;
|
||||
items3[1] = <View style={[buttonArea, {minWidth: value4}]}>{secondaryButton}</View>;
|
||||
view = <View {...viewBindingProps}>{items3}</View>;
|
||||
r1 = view;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Metro module 13186; source: modules/user_profile/native/UserProfileUpsellButton.tsx; dependencies: [31, 661, 1880, 33, 4501, 6771, 7061, 683, 4578, 7882, 1244, 7954, 2] */
|
||||
function _fun100652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13376:6, offset: 0x021f228b, size: 256 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.AnalyticsPages;
|
||||
const env0_5 = constantsModule.UpsellTypes;
|
||||
const env0_6 = constantsModule.AnalyticsSections;
|
||||
const env0_7 = constantsModule.AnalyticEvents;
|
||||
const env0_8 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({nitroWheel: {marginRight: 2}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileUpsellButton.tsx');
|
||||
exports.default = _default_100653;
|
||||
}
|
||||
|
||||
function _default_100653({analyticsObject, label}) { // fn#100653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13376:297, offset: 0x021f238b, size: 320 bytes, params: 2, frame: 22
|
||||
var object2;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const value2 = (require(7061) /* metro dependency 7061: MobileTrialUtils */).useNitroTrialCtaOverride('user_profile_upsell_button');
|
||||
env0_3.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[7]);
|
||||
var PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
|
||||
defaultImport.track(PREMIUM_UPSELL_VIEWED, {type: PremiumUpsellTypes.CUSTOM_PROFILE_SETTINGS_BANNER_BUTTON,
|
||||
location: {page: AnalyticsPages.USER_SETTINGS, section: AnalyticsSections.USER_PROFILE,
|
||||
object: analyticsObject}, location_stack: analyticsLocations});
|
||||
}, [analyticsLocations, analyticsObject]);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
object2 = {onPress: onPress_100655, variant: 'active'};
|
||||
let r5 = value2 ?? label;
|
||||
if (r5 == null) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pj0XBN);
|
||||
}
|
||||
object2.text = r5;
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
object2.icon = <NitroWheelIcon color="white" size="sm" style={styles.nitroWheel} />;
|
||||
return <Button {...object2} />;
|
||||
}
|
||||
|
||||
function _default_100653OnPress() { // fn#100655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13376:664, owner: _default_100653.onPress, offset: 0x021f2544, size: 134 bytes, params: 1, frame: 16
|
||||
const defaultImport = importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */;
|
||||
const handleShowUpsellAlert = defaultImport.handleShowUpsellAlert;
|
||||
const CUSTOM_PROFILES = UpsellTypes.CUSTOM_PROFILES;
|
||||
const USER_SETTINGS = AnalyticsPages.USER_SETTINGS;
|
||||
const USER_PROFILE = AnalyticsSections.USER_PROFILE;
|
||||
const CUSTOM_PROFILE_UPSELL = PremiumUpsellTypes.CUSTOM_PROFILE_UPSELL;
|
||||
Reflect.apply(handleShowUpsellAlert, defaultImport, [{initialUpsellKey: CUSTOM_PROFILES,
|
||||
analyticsLocation: {page: USER_SETTINGS, section: USER_PROFILE, object: analyticsObject},
|
||||
analyticsLocations: analyticsLocations, analyticsProperties: {type: CUSTOM_PROFILE_UPSELL}}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/* Metro module 13231; source: modules/user_profile/native/UserProfileUpsellCard.tsx; dependencies: [31, 27, 6816, 7047, 33, 4501, 697, 1305, 7954, 4573, 4589, 676, 2] */
|
||||
function _fun100914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:6, offset: 0x021ffec5, size: 421 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.ScrollView;
|
||||
const PROFILE_SIDE_PADDING = (require(6816) /* metro dependency 6816: Constants */).PROFILE_SIDE_PADDING;
|
||||
const env0_5 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {'marginTop': 8, 'flexShrink': 0, 'borderRadius': null, 'gap': 4};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object3.upsellButton = object5;
|
||||
object3.titleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'marginBottom': 4};
|
||||
object3.linearGradient = {'width': '100%', 'height': '100%', 'position': 'absolute', 'overflow': 'hidden'};
|
||||
object3.outer = {marginHorizontal: PROFILE_SIDE_PADDING - 1};
|
||||
const object6 = {};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object3.scroll = object6;
|
||||
object3.inner = {'paddingVertical': 12, 'paddingHorizontal': 14};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileUpsellCard.tsx');
|
||||
exports.default = UserProfileUpsellCard;
|
||||
}
|
||||
|
||||
function UserProfileUpsellCard({style, children, ctaText, headerText, showLinearGradient, onPress}) { // fn#100915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:750, offset: 0x0220006a, size: 544 bytes, params: 2, frame: 36
|
||||
const styles = useStyles();
|
||||
const GradientBorder = (require(1305) /* metro dependency 1305: native */).GradientBorder;
|
||||
const items2 = [styles.outer, style];
|
||||
const GradientBorder2 = (require(1305) /* metro dependency 1305: native */).GradientBorder;
|
||||
const Direction = GradientBorder2.Direction;
|
||||
const HORIZONTAL = Direction.HORIZONTAL;
|
||||
const PREMIUM_TIER_2 = Gradients.PREMIUM_TIER_2;
|
||||
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const r10 = headerText != null ? <View style={styles.titleContainer}>{((NitroWheelIcon) => <NitroWheelIcon color={(importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY} size="xs" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}{((Text) => <Text variant="heading-sm/bold">{headerText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : null;
|
||||
const ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
|
||||
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
|
||||
const GREEN = ButtonColors.GREEN;
|
||||
return (
|
||||
<GradientBorder
|
||||
borderWidth={1}
|
||||
style={items2}
|
||||
direction={HORIZONTAL}
|
||||
colors={PREMIUM_TIER_2}
|
||||
borderRadius={lg}
|
||||
>
|
||||
<ScrollView
|
||||
bounces={false}
|
||||
style={styles.scroll}
|
||||
contentContainerStyle={styles.inner}
|
||||
>
|
||||
{r10}
|
||||
{children}
|
||||
<ShinyButton
|
||||
style={styles.upsellButton}
|
||||
onPress={onPress}
|
||||
text={ctaText}
|
||||
color={GREEN}
|
||||
renderIcon={renderIcon}
|
||||
renderLinearGradient={showLinearGradient ? _fun100917 : undefined}
|
||||
/>
|
||||
</ScrollView>
|
||||
</GradientBorder>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileUpsellCardRenderIcon() { // fn#100916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:1423, owner: UserProfileUpsellCard.renderIcon, offset: 0x0220028a, size: 57 bytes, params: 1, frame: 13
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
return <NitroWheelIcon color="white" size="xs" />;
|
||||
}
|
||||
|
||||
function _fun100917() { // fn#100917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:1502, offset: 0x022002c3, size: 135 bytes, params: 1, frame: 18
|
||||
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
const items2 = [styles.linearGradient];
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
|
||||
const PREMIUM_TIER_2_TRI_COLOR = Gradients.PREMIUM_TIER_2_TRI_COLOR;
|
||||
return ((Component) => <Component style={items2} start={START} end={END} colors={PREMIUM_TIER_2_TRI_COLOR} />)(defaultImport);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Metro module 8849; source: modules/user_profile/native/UserProfileVoiceActivityIcon.tsx; dependencies: [31, 3784, 482, 33, 566, 8850, 5107, 6706, 6707, 6709, 6708, 6711, 2] */
|
||||
function _fun69024(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9034:6, offset: 0x01c65707, size: 176 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_4 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileVoiceActivityIcon.tsx');
|
||||
exports.default = UserProfileVoiceActivityIcon;
|
||||
}
|
||||
|
||||
function UserProfileVoiceActivityIcon(a0) { // fn#69025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9034:255, offset: 0x01c657b7, size: 454 bytes, params: 2, frame: 19
|
||||
const channel = a0.channel;
|
||||
const value = Object.create(null);
|
||||
value.channel = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun69026);
|
||||
if (channel.isDM()) {
|
||||
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
|
||||
return <PhoneCallIcon {...value2} />;
|
||||
}
|
||||
if (channel.isGroupDM()) {
|
||||
const PhoneCallIcon2 = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
|
||||
return <PhoneCallIcon2 {...value2} />;
|
||||
}
|
||||
const isGuildStageVoice2 = channel.isGuildStageVoice();
|
||||
let r1 = value4 ? (importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel) : !value4;
|
||||
if (isGuildStageVoice2 && r1) {
|
||||
const StageLockIcon = (require(6706) /* metro dependency 6706: StageLockIcon */).StageLockIcon;
|
||||
r1 = <StageLockIcon {...value2} />;
|
||||
} else if (isGuildStageVoice2) {
|
||||
const StageIcon = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
|
||||
r1 = <StageIcon {...value2} />;
|
||||
} else if (channel.isNSFW()) {
|
||||
const VoiceWarningIcon = (require(6709) /* metro dependency 6709: VoiceWarningIcon */).VoiceWarningIcon;
|
||||
r1 = <VoiceWarningIcon {...value2} />;
|
||||
} else {
|
||||
r1 = ((Component) => <Component {...value2} />)(r1 ? (require(6708) /* metro dependency 6708: VoiceLockIcon */).VoiceLockIcon : (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon);
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun69026() { // fn#69026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9034:349, offset: 0x01c6597d, size: 55 bytes, params: 1, frame: 14
|
||||
return channel.isPrivate() || PermissionStore.can(Permissions.CONNECT, channel);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
/* Metro module 10279; source: modules/user_profile/native/UserProfileVoiceSettings.tsx; dependencies: [31, 27, 4613, 4259, 3784, 661, 482, 33, 4501, 8514, 566, 4802, 9293, 10272, 8899, 6815, 1244, 9252, 10280, 10282, 10284, 10286, 9759, 7684, 4573, 8796, 9322, 7972, 4080, 9279, 9275, 2] */
|
||||
function _fun79755(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:6, offset: 0x01e60d73, size: 367 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const soundboardStore = importDefault(4613) /* metro dependency 4613: SoundboardStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
|
||||
const env0_8 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({card: {paddingBottom: 0},
|
||||
cardTitle: {marginBottom: 0}, volumeSlider: {paddingVertical: 20},
|
||||
disableVideoSublabel: {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileVoiceSettings.tsx');
|
||||
exports.default = UserProfileVoiceSettings;
|
||||
}
|
||||
|
||||
function UserVoiceSettings({user, channel, style}) { // fn#79756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:404, offset: 0x01e60ee2, size: 1543 bytes, params: 2, frame: 35
|
||||
var r2;
|
||||
var r0;
|
||||
var push;
|
||||
const UserProfileFormRow = (require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileFormRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object2;
|
||||
var items2;
|
||||
var UserProfileCard;
|
||||
const styles = useStyles();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_2 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const {localVolume, isLocalMute, isLocalVideoDisabled, isLocalVideoAutoDisabled,
|
||||
supportsDisableLocalVideo} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MediaEngineStore],
|
||||
_fun79757);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun79758);
|
||||
const value4 = (importDefault(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */)(user.id,
|
||||
channel.id);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SoundboardStore], function() {
|
||||
return SoundboardStore.isLocalSoundboardMuted(user.id);
|
||||
});
|
||||
const value6 = (require(9293) /* metro dependency 9293: useIsSecureFramesUIEnabled */).useIsSecureFramesUIEnabled({channelId: channel.id});
|
||||
items3 = [((Component) => <Component style={styles.volumeSlider} value={localVolume} onValueChange={function(a0) {
|
||||
trackUserProfileAction({action: 'SET_VOLUME'});
|
||||
importDefault(dependencyMap[14]).setLocalVolume(user.id, a0);
|
||||
}} key="set-volume" />)(importDefault(10272) /* metro dependency 10272: VolumeSlider */)];
|
||||
if (!(value3 ? channel.isGuildStageVoice() && value4 !== (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).RequestToSpeakStates.ON_STAGE : !value3)) {
|
||||
push = items3.push;
|
||||
string = intl.string;
|
||||
Reflect.apply(push, items3, [<UserProfileFormRow label={isLocalMute ? Reflect.apply(string, intl,
|
||||
[t.NHJxcg]) : Reflect.apply(string, intl,
|
||||
[t.sWmtI6])} icon={isLocalMute ? (require(9252) /* metro dependency 9252: MicrophoneSlashIcon */).MicrophoneSlashIcon : (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon} onPress={function() {
|
||||
trackUserProfileAction({action: 'MUTE'});
|
||||
importDefault(dependencyMap[14]).toggleLocalMute(user.id);
|
||||
}} key="mute" />]);
|
||||
}
|
||||
push = items3.push;
|
||||
string = intl.string;
|
||||
Reflect.apply(push, items3, [<UserProfileFormRow label={value5 ? Reflect.apply(string, intl,
|
||||
[t['639hQT']]) : Reflect.apply(string, intl,
|
||||
[t.LxhEuG])} icon={value5 ? (require(10282) /* metro dependency 10282: SoundboardSlashIcon */).SoundboardSlashIcon : (require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon} onPress={function() {
|
||||
trackUserProfileAction({action: 'MUTE_SOUNDBOARD'});
|
||||
importDefault(dependencyMap[14]).toggleLocalSoundboardMute(user.id);
|
||||
}} key="mute-soundboard" />]);
|
||||
if (supportsDisableLocalVideo) {
|
||||
push = items3.push;
|
||||
object2 = {};
|
||||
string = intl.string;
|
||||
object2.label = isLocalVideoDisabled ? Reflect.apply(string, intl, [t['xc+Psz']]) : Reflect.apply(string, intl,
|
||||
[t['4MMsWF']]);
|
||||
object2.icon = isLocalVideoDisabled ? (require(10286) /* metro dependency 10286: VideoSlashIcon */).VideoSlashIcon : (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
|
||||
if (isLocalVideoAutoDisabled) {
|
||||
var viewBindingProps = {style: styles.disableVideoSublabel};
|
||||
items2 = [((CircleErrorIcon) => <CircleErrorIcon size="xxs" color="text-feedback-warning" />)((require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon)];
|
||||
items2[1] = ((Text) => <Text variant="text-xs/medium" color="text-feedback-warning">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
r2 = <View {...viewBindingProps}>{items2}</View>;
|
||||
} else {
|
||||
r2 = isLocalVideoAutoDisabled;
|
||||
}
|
||||
object2.sublabel = r2;
|
||||
object2.onPress = onPress_79763;
|
||||
Reflect.apply(push, items3, [<UserProfileFormRow {...object2} key="disable-video" />]);
|
||||
}
|
||||
if (value6) {
|
||||
items3.push(<UserProfileFormRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8ErYvY'])} icon={(require(9322) /* metro dependency 9322: ShieldLockIcon */).ShieldLockIcon} hint={(require(7972) /* metro dependency 7972: native */).FormArrow} onPress={function() {
|
||||
trackUserProfileAction({action: 'VIEW_SECURE_FRAMES_VERIFICATION_CODE'});
|
||||
importDefault(dependencyMap[28]).hideActionSheet();
|
||||
importDefault(dependencyMap[29]).openSecureFramesUserVerificationModal(user.id, channel.id, _fun79766);
|
||||
}} key="view-secure-frames-verification-code" />);
|
||||
}
|
||||
if (items3.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
r0 = <UserProfileCard style={[styles.card,
|
||||
style]} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NiTd0e)} titleStyle={styles.cardTitle}>{((UserProfileCardRows) => <UserProfileCardRows>{items3}</UserProfileCardRows>)((require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileCardRows)}</UserProfileCard>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function CurrentUserVoiceSettings({user, channel, style}) { // fn#79767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:3196, offset: 0x01e61828, size: 574 bytes, params: 2, frame: 29
|
||||
var r0;
|
||||
var defaultImport2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const UserProfileCardRows = (require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileCardRows;
|
||||
const UserProfileFormRow = (require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileFormRow;
|
||||
const styles = useStyles();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
|
||||
return MediaEngineStore.isSelfMute();
|
||||
});
|
||||
if ((require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun79769)) {
|
||||
if (channel.isGuildStageVoice()) {
|
||||
if ((importDefault(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */)(user.id,
|
||||
channel.id) !== (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).RequestToSpeakStates.ON_STAGE) {
|
||||
r0 = null;
|
||||
} else {
|
||||
defaultImport2 = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
var defaultImport2Props2 = {style: [styles.card, style], title: intl.string(t.NiTd0e),
|
||||
titleStyle: styles.cardTitle};
|
||||
string = intl.string;
|
||||
r0 = ((Component) => <Component {...defaultImport2Props2}><UserProfileCardRows><UserProfileFormRow label={value2 ? Reflect.apply(string,
|
||||
|
||||
|
||||
|
||||
intl, [t.NHJxcg]) : Reflect.apply(string, intl,
|
||||
[t.sWmtI6])} icon={value2 ? (require(9252) /* metro dependency 9252: MicrophoneSlashIcon */).MicrophoneSlashIcon : (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon} onPress={onPress_79770} key="mute" /></UserProfileCardRows></Component>)(defaultImport2);
|
||||
}
|
||||
} else {
|
||||
defaultImport2 = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
||||
var defaultImport2Props2 = {style: [styles.card, style], title: intl.string(t.NiTd0e),
|
||||
titleStyle: styles.cardTitle};
|
||||
string = intl.string;
|
||||
r0 = ((Component) => <Component {...defaultImport2Props2}><UserProfileCardRows><UserProfileFormRow label={value2 ? Reflect.apply(string,
|
||||
|
||||
|
||||
intl, [t.NHJxcg]) : Reflect.apply(string, intl,
|
||||
[t.sWmtI6])} icon={value2 ? (require(9252) /* metro dependency 9252: MicrophoneSlashIcon */).MicrophoneSlashIcon : (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon} onPress={onPress_79770} key="mute" /></UserProfileCardRows></Component>)(defaultImport2);
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function UserProfileVoiceSettings({user, currentUser, channel, style}) { // fn#79771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:4066, offset: 0x01e61aeb, size: 108 bytes, params: 2, frame: 16
|
||||
return user.id === currentUser.id ? <CurrentUserVoiceSettings user={currentUser} channel={channel} style={style} /> : <UserVoiceSettings user={user} channel={channel} style={style} />;
|
||||
}
|
||||
|
||||
function _fun79757() { // fn#79757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:576, offset: 0x01e614e9, size: 133 bytes, params: 1, frame: 14
|
||||
const object2 = {};
|
||||
const getLocalVolume = MediaEngineStore.getLocalVolume;
|
||||
const userBinding = user;
|
||||
object2.localVolume = Reflect.apply(getLocalVolume, MediaEngineStore, [userBinding.id]);
|
||||
object2.isLocalMute = MediaEngineStore.isLocalMute(userBinding.id);
|
||||
object2.isLocalVideoDisabled = MediaEngineStore.isLocalVideoDisabled(userBinding.id);
|
||||
object2.isLocalVideoAutoDisabled = MediaEngineStore.isLocalVideoAutoDisabled(userBinding.id);
|
||||
object2.supportsDisableLocalVideo = MediaEngineStore.supportsDisableLocalVideo();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun79758() { // fn#79758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:968, offset: 0x01e6156e, size: 55 bytes, params: 1, frame: 14
|
||||
return channel.isPrivate() || PermissionStore.can(Permissions.SPEAK, channel);
|
||||
}
|
||||
|
||||
function UserVoiceSettingsOnPress_79763() { // fn#79763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:2370, owner: UserVoiceSettings.onPress, offset: 0x01e6169c, size: 144 bytes, params: 1, frame: 17
|
||||
var defaultImport;
|
||||
trackUserProfileAction({action: 'DISABLE_VIDEO'});
|
||||
if (isLocalVideoAutoDisabled) {
|
||||
(require(8796) /* metro dependency 8796: UserProfileAlertUtils */).confirmVideoUnstableConnection(function() {
|
||||
return importDefault(dependencyMap[14]).setDisableLocalVideo(user.id, VideoToggleState.MANUAL_ENABLED);
|
||||
});
|
||||
} else {
|
||||
defaultImport = importDefault(8899) /* metro dependency 8899: AudioActionCreators */;
|
||||
defaultImport.setDisableLocalVideo(user.id,
|
||||
isLocalVideoDisabled ? VideoToggleState.MANUAL_ENABLED : VideoToggleState.DISABLED);
|
||||
}
|
||||
}
|
||||
|
||||
function UserVoiceSettingsOnPress_79765() { // fn#79765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:2742, owner: UserVoiceSettings.onPress, offset: 0x01e61769, size: 113 bytes, params: 1, frame: 16
|
||||
trackUserProfileAction({action: 'VIEW_SECURE_FRAMES_VERIFICATION_CODE'});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
const defaultImport2 = importDefault(9279) /* metro dependency 9279: SecureFramesPlatformUtilsNative */;
|
||||
defaultImport2.openSecureFramesUserVerificationModal(user.id, channel.id, _fun79766);
|
||||
}
|
||||
|
||||
function _fun79769() { // fn#79769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:3425, offset: 0x01e61a79, size: 55 bytes, params: 1, frame: 14
|
||||
return channel.isPrivate() || PermissionStore.can(Permissions.SPEAK, channel);
|
||||
}
|
||||
|
||||
function CurrentUserVoiceSettingsOnPress() { // fn#79770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:3901, owner: CurrentUserVoiceSettings.onPress, offset: 0x01e61ab0, size: 59 bytes, params: 1, frame: 12
|
||||
trackUserProfileAction({action: 'MUTE'});
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfMute();
|
||||
}
|
||||
|
||||
function _fun79766() { // fn#79766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10465:2883, offset: 0x01e617da, size: 78 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(9275) /* metro dependency 9275: SecureFramesUtils */;
|
||||
const validateSecureFramesKeyConsistent = value.validateSecureFramesKeyConsistent;
|
||||
const channelBinding = channel;
|
||||
return Reflect.apply(validateSecureFramesKeyConsistent, value, [{userId: user.id, channelId: channelBinding.id,
|
||||
guildId: channelBinding.guild_id}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,940 @@
|
||||
/* Metro module 10373; source: modules/user_profile/native/UserProfileWishlistGrid.tsx; dependencies: [5, 31, 27, 5121, 10374, 10035, 10025, 10038, 10036, 1878, 4279, 5189, 8516, 661, 663, 1880, 33, 3, 4501, 697, 3868, 4002, 8514, 4080, 5120, 6789, 4573, 1244, 4578, 10375, 4068, 10377, 6771, 7943, 566, 10378, 8354, 10344, 10379, 4008, 3857, 10380, 10381, 478, 8463, 6833, 10437, 8743, 3815, 7631, 6906, 3817, 10085, 10473, 1962, 8341, 9646, 10450, 2] */
|
||||
function _fun80354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:6, offset: 0x01e76fda, size: 997 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = WishlistEmptyState;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const sentGiftsStore = importDefault(10374) /* metro dependency 10374: SentGiftsStore */;
|
||||
const wishlistStore = importDefault(10035) /* metro dependency 10035: WishlistStore */;
|
||||
const env0_9 = (require(10025) /* metro dependency 10025: CollectiblesWishlistItemRecord */).isCollectiblesWishlistItemRecord;
|
||||
const env0_10 = (require(10038) /* metro dependency 10038: SKUWishlistItemRecord */).isSKUWishlistItemRecord;
|
||||
const env0_11 = (require(10036) /* metro dependency 10036: WishlistRecord */).getWishlistProductLines;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
let value = require(8516) /* metro dependency 8516: Constants */;
|
||||
const env0_15 = value.TrackUserProfileWishlistActions;
|
||||
const env0_16 = value.UserProfileSections;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_17 = value.Routes;
|
||||
const env0_18 = value.SKUProductLines;
|
||||
const env0_19 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_20 = value.GiftingOrigin;
|
||||
const env0_21 = value.PremiumSubscriptionSKUToPremiumType;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_22 = value.jsx;
|
||||
const env0_23 = value.jsxs;
|
||||
const env0_24 = value.Fragment;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('UserProfileWishlistGrid');
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.headerRow = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
|
||||
marginBottom: PX_12};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.headerButtons = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
|
||||
object2.gridWrapper = {'width': '100%', 'alignItems': 'center'};
|
||||
object2.itemsContainer = {'flexDirection': 'row', 'flexWrap': 'wrap', 'gap': 16, 'justifyContent': 'flex-start'};
|
||||
const object3 = {alignItems: 'center'};
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object3.paddingVertical = PX_48;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object3.paddingHorizontal = PX_32;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.gap = PX_8;
|
||||
object2.emptyState = object3;
|
||||
object2.emptyStateText = {textAlign: 'center'};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.emptyStateCta = {marginTop: PX_24};
|
||||
const object5 = {'padding': null, 'gap': null, 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'justifyContent': 'center', 'borderRadius': null, 'borderWidth': 1};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.padding = PX_8;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.gap = PX_4;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object5.borderColor = BORDER_SUBTLE;
|
||||
object2.disclaimer = object5;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.disclaimerTop = {marginBottom: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.disclaimerBottom = {marginTop: PX_16};
|
||||
const env0_26 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileWishlistGrid.tsx');
|
||||
exports.default = UserProfileWishlistGrid;
|
||||
exports.WishlistEmptyState = closure;
|
||||
}
|
||||
|
||||
function WishlistEmptyState({shouldShowMRNotice}) { // fn#80355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:1503, offset: 0x01e773bf, size: 805 bytes, params: 2, frame: 34
|
||||
var r5;
|
||||
var object8;
|
||||
var items4;
|
||||
const styles = useStyles();
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const r13 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(Reflect.apply(useThemeContext,
|
||||
nativeModule, []).theme) ? 'always-white' : 'mobile-text-heading-primary';
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const value4 = env0_4.useCallback(_fun80356, [Reflect.apply(useUserProfileAnalyticsContext,
|
||||
userProfileAnalyticsContextModule, []).trackUserProfileWishlistAction]);
|
||||
const jsxRuntimeEnv0_24Binding = jsxRuntimeEnv0_24;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const HGnLLT = (require(1244) /* metro dependency 1244: indexNative */).t.HGnLLT;
|
||||
const items2 = [<Text variant="text-md/medium" color={r13} accessibilityRole="header">{Reflect.apply(string, intl,
|
||||
[HGnLLT])}</Text>];
|
||||
items2[1] = <Text variant="text-sm/normal" color="mobile-text-heading-primary" style={styles.emptyStateText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/X1ny6'])}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const object = {'size': 'md', 'variant': 'secondary'};
|
||||
const PlusMediumIcon = (require(10375) /* metro dependency 10375: PlusMediumIcon */).PlusMediumIcon;
|
||||
object.icon = <PlusMediumIcon size="xs" />;
|
||||
string = intl.string;
|
||||
const SDUwM0 = (require(1244) /* metro dependency 1244: indexNative */).t.SDUwM0;
|
||||
object.text = Reflect.apply(string, intl, [SDUwM0]);
|
||||
object.onPress = value4;
|
||||
items2[2] = <View style={styles.emptyStateCta}><Button {...object} /></View>;
|
||||
const view = <View style={styles.emptyState}>{items2}</View>;
|
||||
if (shouldShowMRNotice) {
|
||||
var viewProps = {style: [styles.disclaimer, styles.disclaimerBottom]};
|
||||
items4 = [((CircleInformationIcon) => <CircleInformationIcon size="sm" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)];
|
||||
items4[1] = <Text variant="text-xs/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Wp9bEl)}</Text>;
|
||||
r5 = <View {...viewProps}>{items4}</View>;
|
||||
} else {
|
||||
r5 = shouldShowMRNotice;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileWishlistGrid({wishlistId, containerWidth, maxWidth, isVisible}) { // fn#80357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:2898, offset: 0x01e777ba, size: 2264 bytes, params: 2, frame: 44
|
||||
var object2;
|
||||
var r8;
|
||||
var r12;
|
||||
var length;
|
||||
var jsxRuntimeEnv0_24Binding;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items6;
|
||||
var text;
|
||||
var items7;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var items8;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
var object15;
|
||||
var items11;
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(10377) /* metro dependency 10377: useCardGridLayout */)({containerWidth: containerWidth,
|
||||
maxWidth: maxWidth});
|
||||
const env0_1 = value3.cardWidth;
|
||||
const rowWidth = value3.rowWidth;
|
||||
const r19 = rowWidth != null ? {width: rowWidth} : undefined;
|
||||
const {context,
|
||||
trackUserProfileWishlistAction} = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useUserProfileAnalyticsContext();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const env0_4 = analyticsLocations;
|
||||
const defaultImport2 = importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */;
|
||||
const useNativeIAPPayments = defaultImport2.useNativeIAPPayments;
|
||||
const storeFront = Reflect.apply(useNativeIAPPayments, defaultImport2, []).storeFront;
|
||||
const wishlist = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], function() {
|
||||
return WishlistStore.getWishlist(wishlistId);
|
||||
});
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], function() {
|
||||
return WishlistStore.isFetching(wishlistId);
|
||||
});
|
||||
const error = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], function() {
|
||||
return WishlistStore.getError(wishlistId);
|
||||
});
|
||||
const visibility = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore], _fun80361,
|
||||
[wishlist, wishlistId])?.visibility;
|
||||
const WishlistVisibility = (require(10378) /* metro dependency 10378: WishlistVisibility */).WishlistVisibility;
|
||||
const PRIVATE = WishlistVisibility.PRIVATE;
|
||||
const value8 = visibility === PRIVATE;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const id = currentUser?.id;
|
||||
const userId = wishlist?.userId;
|
||||
const value9 = id === userId;
|
||||
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun80363,
|
||||
[wishlist]);
|
||||
const value11 = value10?.nsfwAllowed === false;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r21 = value8 ? Reflect.apply(string, intl, [t.RX7D9h]) : Reflect.apply(string, intl, [t.d78ChW]);
|
||||
const value14 = (require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'user_profile_wishlist_grid'});
|
||||
const value15 = env0_4.useMemo(_fun80364, [wishlist, value9, value14]);
|
||||
const value18 = env0_4.useMemo(_fun80370,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([SentGiftsStore], _fun80367,
|
||||
[env0_4.useMemo(_fun80366, [wishlist]), value10])]);
|
||||
const value19 = env0_4.useMemo(_fun80371, [value14, wishlist, value9]);
|
||||
const defaultImport3 = importDefault(10379) /* metro dependency 10379: useTrackUserProfileWishlistView */;
|
||||
object2 = {wishlistId: wishlistId, onAction: trackUserProfileWishlistAction};
|
||||
object2.productLines = wishlist != null ? getWishlistProductLines(wishlist) : null;
|
||||
object2.isVisible = isVisible;
|
||||
defaultImport3(object2);
|
||||
const env0_13 = env0_4.useCallback(_fun80372(), [wishlistId, trackUserProfileWishlistAction, value9, value10,
|
||||
value18, storeFront?.country]);
|
||||
const value22 = env0_4.useCallback(_fun80378, [wishlistId, context, analyticsLocations,
|
||||
trackUserProfileWishlistAction, wishlist]);
|
||||
const value23 = env0_4.useCallback(_fun80379, [trackUserProfileWishlistAction, wishlistId]);
|
||||
if (value6) {
|
||||
if (wishlist == null) {
|
||||
return null;
|
||||
}
|
||||
if (error != null) {
|
||||
return null;
|
||||
}
|
||||
if (wishlist == null) {
|
||||
return null;
|
||||
}
|
||||
length = value15.length;
|
||||
if (length === 0) {
|
||||
return <WishlistEmptyState shouldShowMRNotice={value19} />;
|
||||
}
|
||||
length = value15.length;
|
||||
jsxRuntimeEnv0_24Binding = jsxRuntimeEnv0_24;
|
||||
r8 = value9 && (value8 || value11);
|
||||
r8 = r8 && <View style={[styles.disclaimer,
|
||||
styles.disclaimerTop]}>{((CircleInformationIcon) => <CircleInformationIcon size="sm" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)}<Text variant="text-xs/medium" color="text-subtle">{r21}</Text></View>;
|
||||
items6 = [r8];
|
||||
var viewBindingProps = {style: styles.headerRow};
|
||||
items7 = [<Text variant="text-sm/semibold" color="text-muted">{intl.formatToPlainString(t.r6Y1Lg,
|
||||
{count: length})}</Text>];
|
||||
if (value9) {
|
||||
var viewBinding2Props = {style: styles.headerButtons};
|
||||
items8 = [<Button size="sm" variant="secondary" icon={((PlusMediumIcon) => <PlusMediumIcon size="xs" />)((require(10375) /* metro dependency 10375: PlusMediumIcon */).PlusMediumIcon)} text={intl.string(t.SDUwM0)} onPress={value23} />];
|
||||
items8[1] = <IconButton size="sm" variant="secondary" icon={((PencilIcon) => <PencilIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT} />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)} onPress={value22} accessibilityLabel={intl.string(t.bt75uw)} />;
|
||||
r12 = <View {...viewBinding2Props}>{items8}</View>;
|
||||
} else {
|
||||
r12 = value9;
|
||||
}
|
||||
items7[1] = r12;
|
||||
items6[1] = <View {...viewBindingProps}>{items7}</View>;
|
||||
} else {
|
||||
if (error != null) {
|
||||
return null;
|
||||
}
|
||||
if (wishlist == null) {
|
||||
return null;
|
||||
}
|
||||
length = value15.length;
|
||||
if (length === 0) {
|
||||
return <WishlistEmptyState shouldShowMRNotice={value19} />;
|
||||
}
|
||||
length = value15.length;
|
||||
jsxRuntimeEnv0_24Binding = jsxRuntimeEnv0_24;
|
||||
r8 = value9 && (value8 || value11);
|
||||
r8 = r8 && <View style={[styles.disclaimer,
|
||||
styles.disclaimerTop]}>{((CircleInformationIcon) => <CircleInformationIcon size="sm" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)}<Text variant="text-xs/medium" color="text-subtle">{r21}</Text></View>;
|
||||
items6 = [r8];
|
||||
text = <Text variant="text-sm/semibold" color="text-muted">{intl.formatToPlainString(t.r6Y1Lg,
|
||||
{count: length})}</Text>;
|
||||
if (value9) {
|
||||
var viewBinding2Props = {style: styles.headerButtons};
|
||||
items8 = [<Button size="sm" variant="secondary" icon={((PlusMediumIcon) => <PlusMediumIcon size="xs" />)((require(10375) /* metro dependency 10375: PlusMediumIcon */).PlusMediumIcon)} text={intl.string(t.SDUwM0)} onPress={value23} />];
|
||||
items8[1] = <IconButton size="sm" variant="secondary" icon={((PencilIcon) => <PencilIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT} />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)} onPress={value22} accessibilityLabel={intl.string(t.bt75uw)} />;
|
||||
r12 = <View {...viewBinding2Props}>{items8}</View>;
|
||||
} else {
|
||||
r12 = value9;
|
||||
}
|
||||
items6[1] = <View style={styles.headerRow}>{text}{r12}</View>;
|
||||
}
|
||||
items6[2] = <View style={styles.gridWrapper}><View style={[styles.itemsContainer,
|
||||
r19]}>{value15.map(_fun80380)}</View></View>;
|
||||
if (value19) {
|
||||
var viewProps = {style: [styles.disclaimer, styles.disclaimerBottom]};
|
||||
items11 = [((CircleInformationIcon) => <CircleInformationIcon size="sm" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)];
|
||||
items11[1] = <Text variant="text-xs/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Wp9bEl)}</Text>;
|
||||
r8 = <View {...viewProps}>{items11}</View>;
|
||||
} else {
|
||||
r8 = value19;
|
||||
}
|
||||
items6[3] = r8;
|
||||
return (
|
||||
<>
|
||||
{items6}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80356() { // fn#80356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:1763, offset: 0x01e776e4, size: 214 bytes, params: 1, frame: 17
|
||||
const trackUserProfileWishlistActionBinding = trackUserProfileWishlistAction;
|
||||
let object2 = {};
|
||||
const PRESS_ADD_WISHLIST_ITEM = TrackUserProfileWishlistActions.PRESS_ADD_WISHLIST_ITEM;
|
||||
object2.action = PRESS_ADD_WISHLIST_ITEM;
|
||||
const Set = global.Set;
|
||||
const COLLECTIBLES = SKUProductLines.COLLECTIBLES;
|
||||
const items2 = [COLLECTIBLES];
|
||||
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(items2);
|
||||
object2.productLines = set instanceof Object ? set : value2;
|
||||
trackUserProfileWishlistActionBinding(object2);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
|
||||
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
let USER_PROFILE_WISHLIST = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsSource = USER_PROFILE_WISHLIST;
|
||||
USER_PROFILE_WISHLIST = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
object2.screen = FEATURED_PAGE;
|
||||
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule, [object2]);
|
||||
}
|
||||
|
||||
function _fun80361() { // fn#80361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:3466, offset: 0x01e780e3, size: 50 bytes, params: 1, frame: 14
|
||||
const wishlistBinding = wishlist;
|
||||
const value2 = null;
|
||||
return value2 != wishlistBinding ? UserProfileStore.getWishlistSettings(wishlist.userId, wishlistId) : value2;
|
||||
}
|
||||
|
||||
function _fun80363() { // fn#80363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:3742, offset: 0x01e78115, size: 45 bytes, params: 1, frame: 12
|
||||
const wishlistBinding = wishlist;
|
||||
const value2 = null;
|
||||
return value2 != wishlistBinding ? UserStore.getUser(wishlist.userId) : value2;
|
||||
}
|
||||
|
||||
function _fun80364() { // fn#80364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4028, offset: 0x01e78142, size: 57 bytes, params: 1, frame: 13
|
||||
let r0 = wishlist == null ? undefined : wishlist.items.filter(_fun80365);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80366() { // fn#80366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4236, offset: 0x01e781bc, size: 55 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var items2;
|
||||
var filter;
|
||||
var value;
|
||||
if (wishlist == null) {
|
||||
r0 = undefined;
|
||||
} else {
|
||||
items2 = wishlist.items;
|
||||
filter = items2.filter;
|
||||
value = environment.__proto__;
|
||||
value = Reflect.apply(filter, items2, [isCollectiblesWishlistItemRecord]);
|
||||
r0 = value;
|
||||
}
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80367() { // fn#80367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4350, offset: 0x01e781f3, size: 61 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
if (env0_8 == null) {
|
||||
r0 = [];
|
||||
} else {
|
||||
value = env0_10.filter(_fun80368);
|
||||
value = value.map(function(a0) {
|
||||
return a0.skuId;
|
||||
});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80370() { // fn#80370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4450, offset: 0x01e78259, size: 37 bytes, params: 1, frame: 11
|
||||
const Set = global.Set;
|
||||
const binding = env0_11;
|
||||
const value = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(binding);
|
||||
return set instanceof Object ? set : value;
|
||||
}
|
||||
|
||||
function _fun80371() { // fn#80371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4487, offset: 0x01e7827e, size: 78 bytes, params: 1, frame: 15
|
||||
var r2;
|
||||
var r0;
|
||||
const binding = env0_9;
|
||||
if (binding) {
|
||||
r0 = !binding;
|
||||
} else {
|
||||
r2 = wishlist == null ? undefined : wishlist.items.some(isSKUWishlistItemRecord);
|
||||
r2 = r2 && env0_7;
|
||||
r0 = r2 != null && r2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80372() { // fn#80372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4672, offset: 0x01e782cc, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun80374);
|
||||
return _fun80377;
|
||||
}
|
||||
|
||||
function _fun80378() { // fn#80378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:7569, offset: 0x01e78b38, size: 186 bytes, params: 1, frame: 19
|
||||
const trackUserProfileWishlistActionBinding = trackUserProfileWishlistAction;
|
||||
const object2 = {};
|
||||
const PRESS_EDIT_WISHLIST = TrackUserProfileWishlistActions.PRESS_EDIT_WISHLIST;
|
||||
object2.action = PRESS_EDIT_WISHLIST;
|
||||
object2.wishlistId = wishlistId;
|
||||
const wishlistBinding = wishlist;
|
||||
const value3 = undefined;
|
||||
object2.productLines = wishlistBinding != null ? getWishlistProductLines(wishlist) : value3;
|
||||
trackUserProfileWishlistActionBinding(object2);
|
||||
const defaultImport = importDefault(dependencyMap[23]);
|
||||
defaultImport.openLazy(require(dependencyMap[54])(dependencyMap[53], dependencyMap.paths),
|
||||
'EditWishlistActionSheet', {wishlistId: wishlistId, analyticsContext: context,
|
||||
analyticsLocations: analyticsLocations}, 'stack');
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun80379() { // fn#80379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:7819, offset: 0x01e78bf2, size: 223 bytes, params: 1, frame: 17
|
||||
const trackUserProfileWishlistActionBinding = trackUserProfileWishlistAction;
|
||||
let object2 = {};
|
||||
const PRESS_ADD_WISHLIST_ITEM = TrackUserProfileWishlistActions.PRESS_ADD_WISHLIST_ITEM;
|
||||
object2.action = PRESS_ADD_WISHLIST_ITEM;
|
||||
object2.wishlistId = wishlistId;
|
||||
const Set = global.Set;
|
||||
const COLLECTIBLES = SKUProductLines.COLLECTIBLES;
|
||||
let set = new Set([COLLECTIBLES]);
|
||||
object2.productLines = set;
|
||||
trackUserProfileWishlistActionBinding(object2);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
|
||||
set = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
const openCollectiblesShopMobile = set.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
let USER_PROFILE_WISHLIST = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsSource = USER_PROFILE_WISHLIST;
|
||||
USER_PROFILE_WISHLIST = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
object2.screen = FEATURED_PAGE;
|
||||
Reflect.apply(openCollectiblesShopMobile, set, [object2]);
|
||||
}
|
||||
|
||||
function _fun80380(a0) { // fn#80380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:9152, offset: 0x01e78cd1, size: 109 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component item={a0} onPress={onPress_80381} size={cardWidth} wishlistOwnerId={env0_8?.id} key={a0.skuId} />)(importDefault(10450) /* metro dependency 10450: WishlistItemCard */);
|
||||
}
|
||||
|
||||
function _fun80365(a0) { // fn#80365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4086, offset: 0x01e7817b, size: 65 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(10344) /* metro dependency 10344: WishlistUtils */).isEligibleWishlistItemOnMobile(a0,
|
||||
{isWishlistOwner: env1_7, isSocialLayerStorefrontMobilePurchasingEnabled: env1_9});
|
||||
}
|
||||
|
||||
function _fun80368({skuId}) { // fn#80368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4376, offset: 0x01e78230, size: 41 bytes, params: 2, frame: 13
|
||||
return SentGiftsStore.hasSentGift(skuId, env1_8.id);
|
||||
}
|
||||
|
||||
function* _fun80374(a0) { // fn#80374, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:4692, offset: 0x01e782fb, size: 2044 bytes, params: 2, frame: 27
|
||||
var environment;
|
||||
var r10;
|
||||
var r6;
|
||||
var country;
|
||||
var r7;
|
||||
var value3;
|
||||
var binding;
|
||||
var object2;
|
||||
var value4;
|
||||
var WISHLIST_ITEM_CLICKED;
|
||||
var skuId;
|
||||
var Set;
|
||||
var skuProductLine;
|
||||
var items;
|
||||
var prototype;
|
||||
var value5;
|
||||
var set;
|
||||
var value6;
|
||||
var value7;
|
||||
var getRootNavigationRef;
|
||||
var value8;
|
||||
var isReady;
|
||||
var open;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var PREMIUM;
|
||||
var binding3;
|
||||
var value10;
|
||||
var hideAllActionSheets;
|
||||
var binding4;
|
||||
var value11;
|
||||
var openGiftModal;
|
||||
var id;
|
||||
var binding5;
|
||||
var USER_PROFILE_WISHLIST;
|
||||
var binding6;
|
||||
var value12;
|
||||
var value13;
|
||||
var navigateToPremiumHomePage;
|
||||
var SOCIAL_LAYER_GAME_ITEM;
|
||||
var sku;
|
||||
var get;
|
||||
var value14;
|
||||
var value15;
|
||||
var isAndroid;
|
||||
var isAndroid2;
|
||||
var value16;
|
||||
var googleSkuIds;
|
||||
var value17;
|
||||
var value18;
|
||||
var fetchSocialLayerStorefrontSkuForApplication;
|
||||
var applicationId;
|
||||
var value19;
|
||||
var isSlayerSkuAvailableOnThisPlatform;
|
||||
var isSlayerSkuAvailableOnThisPlatform2;
|
||||
var binding7;
|
||||
var value20;
|
||||
var binding8;
|
||||
var value21;
|
||||
var openSocialLayerStorefrontGiftModal;
|
||||
var binding9;
|
||||
var value22;
|
||||
var binding10;
|
||||
var value23;
|
||||
var openSocialLayerStorefrontProductDetailsModal;
|
||||
var isOwned;
|
||||
var has;
|
||||
var binding11;
|
||||
var value24;
|
||||
var value25;
|
||||
var isCollectibleGiftingSupported;
|
||||
var COLLECTIBLES_SHOP;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var value26;
|
||||
var binding12;
|
||||
var property;
|
||||
var value27;
|
||||
var redirectWithHandoffToken;
|
||||
var value28;
|
||||
var value29;
|
||||
var value30;
|
||||
var error;
|
||||
var error2;
|
||||
var JSON;
|
||||
var stringify;
|
||||
var value31;
|
||||
var binding13;
|
||||
var value32;
|
||||
var captureBillingException;
|
||||
var binding14;
|
||||
var value33;
|
||||
var binding15;
|
||||
var value34;
|
||||
var openCollectiblesShopMobile;
|
||||
var binding16;
|
||||
var value35;
|
||||
var openShopGiftModal;
|
||||
var value36;
|
||||
var isCollectiblesShopOpen;
|
||||
var binding17;
|
||||
var value37;
|
||||
var SHOP_ALL;
|
||||
var getProduct;
|
||||
var value38;
|
||||
var value39;
|
||||
var maybeFetchCollectiblesProduct;
|
||||
var value43;
|
||||
var binding18;
|
||||
var value44;
|
||||
var openProductDetailsActionSheet;
|
||||
let value = undefined;
|
||||
if (true) {
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort50: while (true) {
|
||||
exceptionLanding46: while (true) {
|
||||
value = undefined;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
binding = env2_3;
|
||||
object2 = {};
|
||||
value4 = environment.__proto__.__proto__.__proto__;
|
||||
WISHLIST_ITEM_CLICKED = env3_15.WISHLIST_ITEM_CLICKED;
|
||||
object2.action = WISHLIST_ITEM_CLICKED;
|
||||
object2.wishlistId = require;
|
||||
skuId = a0.skuId;
|
||||
object2.skuId = skuId;
|
||||
Set = global.Set;
|
||||
skuProductLine = a0.skuProductLine;
|
||||
items = [skuProductLine];
|
||||
prototype = Set.prototype;
|
||||
value5 = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
value6 = set instanceof Object ? set : value5;
|
||||
object2.productLines = value6;
|
||||
binding(object2);
|
||||
binding = env3_0;
|
||||
value7 = binding(env3_2[39]);
|
||||
getRootNavigationRef = value7.getRootNavigationRef;
|
||||
value8 = Reflect.apply(getRootNavigationRef, value7, []);
|
||||
if (value8 == null) {
|
||||
break reducibleJoin3;
|
||||
}
|
||||
isReady = value8.isReady;
|
||||
if (Reflect.apply(isReady, value8, [])) {
|
||||
skuProductLine = a0.skuProductLine;
|
||||
PREMIUM = env3_18.PREMIUM;
|
||||
if (skuProductLine !== PREMIUM) {
|
||||
skuProductLine = a0.skuProductLine;
|
||||
SOCIAL_LAYER_GAME_ITEM = env3_18.SOCIAL_LAYER_GAME_ITEM;
|
||||
if (skuProductLine !== SOCIAL_LAYER_GAME_ITEM) {
|
||||
if (!SentGiftsStore) {
|
||||
reducibleJoin48: while (true) {
|
||||
if (WishlistStore == null) {
|
||||
break reducibleJoin48;
|
||||
}
|
||||
isOwned = a0.isOwned;
|
||||
if (isOwned) {
|
||||
break reducibleJoin48;
|
||||
}
|
||||
has = UserStore.has;
|
||||
skuId = a0.skuId;
|
||||
if (Reflect.apply(has, UserStore, [skuId])) {
|
||||
break reducibleJoin48;
|
||||
}
|
||||
binding = env3_1;
|
||||
binding11 = env3_2;
|
||||
value24 = binding(binding11[23]);
|
||||
hideAllActionSheets = value24.hideAllActionSheets;
|
||||
Reflect.apply(hideAllActionSheets, value24, []);
|
||||
binding = env3_0;
|
||||
value25 = binding(binding11[48]);
|
||||
isCollectibleGiftingSupported = value25.isCollectibleGiftingSupported;
|
||||
if (Reflect.apply(isCollectibleGiftingSupported, value25, [])) {
|
||||
binding = env3_0;
|
||||
binding15 = env3_2;
|
||||
value34 = binding(binding15[24]);
|
||||
openCollectiblesShopMobile = value34.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
binding16 = env3_1;
|
||||
USER_PROFILE_WISHLIST = binding16(binding15[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
USER_PROFILE_WISHLIST = binding16(binding15[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsSource = USER_PROFILE_WISHLIST;
|
||||
object2.screen = env3_19.FEATURED_PAGE;
|
||||
object2.onNavigateAway = onNavigateAway;
|
||||
Reflect.apply(openCollectiblesShopMobile, value34, [object2]);
|
||||
value35 = binding(binding15[49]);
|
||||
openShopGiftModal = value35.openShopGiftModal;
|
||||
object2 = {};
|
||||
object2.skuId = a0.skuId;
|
||||
USER_PROFILE_WISHLIST = binding16(binding15[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
object2.lockedRecipientUser = WishlistStore;
|
||||
USER_PROFILE_WISHLIST = env3_20.USER_PROFILE_WISHLIST;
|
||||
object2.giftingOrigin = USER_PROFILE_WISHLIST;
|
||||
Reflect.apply(openShopGiftModal, value35, [object2]);
|
||||
return value;
|
||||
}
|
||||
COLLECTIBLES_SHOP = env3_17.COLLECTIBLES_SHOP;
|
||||
skuId = a0.skuId;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
value26 = '' + COLLECTIBLES_SHOP + '#itemSkuId=' + skuId;
|
||||
try {
|
||||
binding = env3_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
try {
|
||||
binding12 = env3_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
try {
|
||||
property = binding12[50];
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
try {
|
||||
value27 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
try {
|
||||
redirectWithHandoffToken = value27.redirectWithHandoffToken;
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
try {
|
||||
object2.forceExternalBrowser = true;
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
try {
|
||||
value28 = Reflect.apply(redirectWithHandoffToken, value27, [value26,
|
||||
object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
yield value28;
|
||||
try {
|
||||
value29 = undefined;
|
||||
value30 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding46;
|
||||
}
|
||||
if (value30) {
|
||||
return value29;
|
||||
}
|
||||
break reduciblePort50;
|
||||
}
|
||||
}
|
||||
binding = env3_0;
|
||||
value36 = binding(env3_2[24]);
|
||||
isCollectiblesShopOpen = value36.isCollectiblesShopOpen;
|
||||
if (Reflect.apply(isCollectiblesShopOpen, value36, [])) {
|
||||
binding = env3_6;
|
||||
getProduct = binding.getProduct;
|
||||
skuId = a0.skuId;
|
||||
value38 = Reflect.apply(getProduct, binding, [skuId]);
|
||||
if (value38 != null) {
|
||||
r7 = value38;
|
||||
} else {
|
||||
binding = env3_0;
|
||||
value39 = binding(env3_2[24]);
|
||||
maybeFetchCollectiblesProduct = value39.maybeFetchCollectiblesProduct;
|
||||
skuId = a0.skuId;
|
||||
yield Reflect.apply(maybeFetchCollectiblesProduct, value39, [skuId]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env3_6;
|
||||
getProduct = binding.getProduct;
|
||||
skuId = a0.skuId;
|
||||
r7 = Reflect.apply(getProduct, binding, [skuId]);
|
||||
}
|
||||
if (r7 != null) {
|
||||
binding = env3_0;
|
||||
binding18 = env3_2;
|
||||
value44 = binding(binding18[52]);
|
||||
openProductDetailsActionSheet = value44.openProductDetailsActionSheet;
|
||||
object2 = {product: r7};
|
||||
binding = env3_1;
|
||||
object2.analyticsLocations = [binding(binding18[25]).USER_PROFILE_WISHLIST];
|
||||
Reflect.apply(openProductDetailsActionSheet, value44, [object2, 'stack']);
|
||||
} else {
|
||||
value43 = env3_1(env3_2[23]);
|
||||
value43.hideAllActionSheets();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
binding = env3_0;
|
||||
binding17 = env3_2;
|
||||
value37 = binding(binding17[24]);
|
||||
openCollectiblesShopMobile = value37.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
binding = env3_1;
|
||||
USER_PROFILE_WISHLIST = binding(binding17[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
USER_PROFILE_WISHLIST = binding(binding17[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsSource = USER_PROFILE_WISHLIST;
|
||||
skuId = a0.skuId;
|
||||
object2.initialProductSkuId = skuId;
|
||||
SHOP_ALL = env3_19.SHOP_ALL;
|
||||
object2.screen = SHOP_ALL;
|
||||
Reflect.apply(openCollectiblesShopMobile, value37, [object2]);
|
||||
break reduciblePort50;
|
||||
}
|
||||
sku = a0.sku;
|
||||
reducibleJoin12: while (true) {
|
||||
if (sku != null) {
|
||||
r10 = sku;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
binding = env3_13;
|
||||
get = binding.get;
|
||||
skuId = a0.skuId;
|
||||
value14 = Reflect.apply(get, binding, [skuId]);
|
||||
r10 = value14;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
binding = env3_0;
|
||||
value15 = binding(env3_2[43]);
|
||||
isAndroid = value15.isAndroid;
|
||||
isAndroid2 = Reflect.apply(isAndroid, value15, []);
|
||||
reducibleJoin14: while (true) {
|
||||
if (isAndroid2) {
|
||||
value16 = r10 != null;
|
||||
r6 = value16;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
r6 = isAndroid2;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
reducibleJoin16: while (true) {
|
||||
if (r6) {
|
||||
googleSkuIds = r10.googleSkuIds;
|
||||
value17 = googleSkuIds == null;
|
||||
r6 = value17;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
break reducibleJoin16;
|
||||
}
|
||||
reducibleJoin20: while (true) {
|
||||
if (r6) {
|
||||
binding = env3_0;
|
||||
value18 = binding(env3_2[44]);
|
||||
fetchSocialLayerStorefrontSkuForApplication = value18.fetchSocialLayerStorefrontSkuForApplication;
|
||||
applicationId = r10.applicationId;
|
||||
skuId = a0.skuId;
|
||||
reducibleJoin19: while (true) {
|
||||
if (View == null) {
|
||||
country = value;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
country = View.country;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
Reflect.apply(fetchSocialLayerStorefrontSkuForApplication, value18, [applicationId,
|
||||
skuId,
|
||||
{withGoogleSkuIds: true,
|
||||
countryCode: country}]);
|
||||
break reducibleJoin20;
|
||||
}
|
||||
break reducibleJoin20;
|
||||
}
|
||||
binding = env3_0;
|
||||
value19 = binding(env3_2[45]);
|
||||
isSlayerSkuAvailableOnThisPlatform = value19.isSlayerSkuAvailableOnThisPlatform;
|
||||
isSlayerSkuAvailableOnThisPlatform2 = Reflect.apply(isSlayerSkuAvailableOnThisPlatform,
|
||||
value19,
|
||||
[r10]);
|
||||
if (!SentGiftsStore) {
|
||||
if (isSlayerSkuAvailableOnThisPlatform2) {
|
||||
if (WishlistStore == null) {
|
||||
break reduciblePort50;
|
||||
}
|
||||
binding = env3_1;
|
||||
binding7 = env3_2;
|
||||
value20 = binding(binding7[23]);
|
||||
value20.hideAllActionSheets();
|
||||
binding8 = env3_0;
|
||||
value21 = binding8(binding7[46]);
|
||||
openSocialLayerStorefrontGiftModal = value21.openSocialLayerStorefrontGiftModal;
|
||||
object2 = {};
|
||||
object2.skuId = a0.skuId;
|
||||
USER_PROFILE_WISHLIST = binding(binding7[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
object2.lockedRecipientUser = WishlistStore;
|
||||
USER_PROFILE_WISHLIST = env3_20.USER_PROFILE_WISHLIST;
|
||||
object2.giftingOrigin = USER_PROFILE_WISHLIST;
|
||||
object2.onGiftModalDismiss = onGiftModalDismiss;
|
||||
Reflect.apply(openSocialLayerStorefrontGiftModal, value21, [object2]);
|
||||
break reduciblePort50;
|
||||
}
|
||||
}
|
||||
binding = env3_1;
|
||||
binding9 = env3_2;
|
||||
value22 = binding(binding9[23]);
|
||||
hideAllActionSheets = value22.hideAllActionSheets;
|
||||
Reflect.apply(hideAllActionSheets, value22, []);
|
||||
binding10 = env3_0;
|
||||
value23 = binding10(binding9[46]);
|
||||
openSocialLayerStorefrontProductDetailsModal = value23.openSocialLayerStorefrontProductDetailsModal;
|
||||
object2 = {};
|
||||
skuId = a0.skuId;
|
||||
object2.skuId = skuId;
|
||||
USER_PROFILE_WISHLIST = binding(binding9[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
Reflect.apply(openSocialLayerStorefrontProductDetailsModal, value23, [object2]);
|
||||
break reduciblePort50;
|
||||
}
|
||||
if (SentGiftsStore) {
|
||||
binding = env3_1;
|
||||
binding6 = env3_2;
|
||||
value12 = binding(binding6[23]);
|
||||
value12.hideAllActionSheets();
|
||||
binding = env3_0;
|
||||
value13 = binding(binding6[41]);
|
||||
navigateToPremiumHomePage = value13.navigateToPremiumHomePage;
|
||||
Reflect.apply(navigateToPremiumHomePage, value13, []);
|
||||
break reduciblePort50;
|
||||
}
|
||||
if (WishlistStore == null) {
|
||||
break reduciblePort50;
|
||||
}
|
||||
binding = env3_1;
|
||||
binding3 = env3_2;
|
||||
value10 = binding(binding3[23]);
|
||||
hideAllActionSheets = value10.hideAllActionSheets;
|
||||
Reflect.apply(hideAllActionSheets, value10, []);
|
||||
binding4 = env3_0;
|
||||
value11 = binding4(binding3[42]);
|
||||
openGiftModal = value11.openGiftModal;
|
||||
object2 = {};
|
||||
id = WishlistStore.id;
|
||||
object2.recipientUserId = id;
|
||||
binding5 = env3_21;
|
||||
skuId = a0.skuId;
|
||||
object2.premiumType = binding5[skuId];
|
||||
USER_PROFILE_WISHLIST = binding(binding3[25]).USER_PROFILE_WISHLIST;
|
||||
object2.analyticsLocations = [USER_PROFILE_WISHLIST];
|
||||
Reflect.apply(openGiftModal, value11, [object2]);
|
||||
break reduciblePort50;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
binding = env3_25;
|
||||
error2 = binding.error;
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
value31 = Reflect.apply(stringify, JSON, [error]);
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
Reflect.apply(error2, binding, ['Error performing web handoff: ' + value31]);
|
||||
binding = env3_0;
|
||||
binding13 = env3_2;
|
||||
value32 = binding(binding13[51]);
|
||||
captureBillingException = value32.captureBillingException;
|
||||
skuId = a0.skuId;
|
||||
Reflect.apply(captureBillingException, value32, [error, {tags: {source: 'UserProfileWishlistGrid',
|
||||
skuId: skuId}}]);
|
||||
binding14 = env3_1;
|
||||
value33 = binding14(binding13[40]);
|
||||
open = value33.open;
|
||||
intl = binding(binding13[27]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding13[27]).t;
|
||||
Reflect.apply(open, value33, [{key: 'WISHLIST_ITEM_PRESS_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['rTU7/z']])}]);
|
||||
break reduciblePort50;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
binding = env3_1;
|
||||
var binding2 = env3_2;
|
||||
var value9 = binding(binding2[40]);
|
||||
open = value9.open;
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[27]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[27]).t;
|
||||
Reflect.apply(open, value9, [{key: 'WISHLIST_ITEM_PRESS_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['rTU7/z']])}]);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function onPress_80381() { // fn#80381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:9182, offset: 0x01e78d3e, size: 23 bytes, params: 1, frame: 11
|
||||
return env1_13(env0_0);
|
||||
}
|
||||
|
||||
function onNavigateAway() { // fn#80375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10559:5761, offset: 0x01e78af7, size: 65 bytes, params: 1, frame: 13
|
||||
const value2 = env4_1(env4_2[47]);
|
||||
const WISHLIST = env4_16.WISHLIST;
|
||||
value2({userId: WishlistStore.id, initialSection: WISHLIST});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
/* Metro module 14921; source: modules/user_profile/native/UserProfileYourFriendsCard.tsx; dependencies: [57, 31, 27, 5221, 3793, 1878, 661, 33, 1305, 4501, 697, 566, 10341, 7693, 22, 1360, 5278, 1244, 4573, 6818, 2] */
|
||||
function _fun112883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:6, offset: 0x023e00df, size: 439 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
Object = global.Object;
|
||||
const freeze = Object.freeze;
|
||||
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
|
||||
const RIGHT = CutoutDirection.RIGHT;
|
||||
const env0_12 = Reflect.apply(freeze, Object, [{direction: RIGHT, inset: -4}]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'padding': 16};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const env0_13 = Reflect.apply(createStyles, value, [{pressable: object, label: {flex: 1},
|
||||
facepile: {'flexDirection': 'row', 'alignItems': 'center', 'marginLeft': 'auto', 'marginRight': 8},
|
||||
avatars: {flexDirection: 'row'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileYourFriendsCard.tsx');
|
||||
exports.default = UserProfileYourFriendsCard;
|
||||
}
|
||||
|
||||
function UserProfileYourFriendsCard({navigateToFriends, style}) { // fn#112884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:648, offset: 0x023e0296, size: 607 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const [property, env0_2] = env0_3(binding.useState([]), 2);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserAffinitiesV2Store],
|
||||
_fun112885);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
|
||||
function() {
|
||||
return RelationshipStore.getFriendIDs();
|
||||
});
|
||||
const gameRelationshipStoreHooksModule = require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */;
|
||||
const useGameRelationshipsByType = gameRelationshipStoreHooksModule.useGameRelationshipsByType;
|
||||
const FRIEND = RelationshipTypes.FRIEND;
|
||||
const value6 = Reflect.apply(useGameRelationshipsByType, gameRelationshipStoreHooksModule, [FRIEND]);
|
||||
binding.useEffect(_fun112888, []);
|
||||
binding.useEffect(_fun112889, [value4, value5, value6]);
|
||||
const value7 = binding.useMemo(_fun112892, [property, styles.avatars, styles.facepile]);
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
object2 = {accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
let TdEu5X = (require(1244) /* metro dependency 1244: indexNative */).t.TdEu5X;
|
||||
object2.accessibilityLabel = Reflect.apply(string, intl, [TdEu5X]);
|
||||
object2.onPress = navigateToFriends;
|
||||
object2.style = [style, styles.pressable];
|
||||
object2.activeOpacity = 0.8;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
TdEu5X = (require(1244) /* metro dependency 1244: indexNative */).t.TdEu5X;
|
||||
const text = <Text accessibilityRole="header" variant="text-sm/semibold" color="text-default" style={styles.label}>{Reflect.apply(string,
|
||||
intl, [TdEu5X])}</Text>;
|
||||
const ChevronSmallRightIcon = (require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon;
|
||||
return (
|
||||
<PressableOpacity {...object2}>
|
||||
{text}
|
||||
{value7}
|
||||
<ChevronSmallRightIcon size="sm" />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112885() { // fn#112885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:805, offset: 0x023e04f5, size: 38 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return UserAffinitiesV2Store.getUserAffinities().map(function(a0) {
|
||||
return a0.otherUserId;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun112888() { // fn#112888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:985, offset: 0x023e052e, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(require(7693) /* metro dependency 7693: UserAffinitiesActionCreators */).fetchUserAffinitiesV2();
|
||||
}
|
||||
|
||||
function _fun112889() { // fn#112889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:1042, offset: 0x023e0553, size: 334 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var defaultImport2;
|
||||
var value12;
|
||||
var value13;
|
||||
var binding;
|
||||
var items2;
|
||||
let value = environment.__proto__;
|
||||
const value3 = (importDefault(22) /* metro dependency 22 */).chain(env0_3);
|
||||
let filter = value3.filter;
|
||||
const value5 = Reflect.apply(filter, value3, [_fun112890]).take(5);
|
||||
const map = value5.map;
|
||||
const getUser = UserStore.getUser;
|
||||
const value6 = Reflect.apply(map, value5, [getUser]);
|
||||
filter = value6.filter;
|
||||
const isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
|
||||
const value9 = Reflect.apply(filter, value6, [isNotNullish]).value();
|
||||
if (value9.length >= 5) {
|
||||
env0_2(value9);
|
||||
} else {
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
value12 = defaultImport2.chain(env0_5).map(function(a0) {
|
||||
return a0.id;
|
||||
}).uniq();
|
||||
value13 = value12.take(5 - value9.length);
|
||||
value = value13.map(UserStore.getUser).filter(isNotNullish);
|
||||
value = value.value();
|
||||
binding = env0_2;
|
||||
items2 = [];
|
||||
arraySpread(items2, value, arraySpread(items2, value9, 0, defaultImport2), defaultImport2);
|
||||
binding(items2);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun112892() { // fn#112892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:1350, offset: 0x023e06b7, size: 89 bytes, params: 1, frame: 16
|
||||
const stylesBinding = styles;
|
||||
return (
|
||||
<View style={stylesBinding.facepile}>
|
||||
<View style={stylesBinding.avatars}>
|
||||
{env0_1.map(_fun112893)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112890(a0) { // fn#112890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:1080, offset: 0x023e06a1, size: 22 bytes, params: 2, frame: 11
|
||||
return env1_4.includes(a0);
|
||||
}
|
||||
|
||||
function _fun112893(a0, a1) { // fn#112893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15118:1422, offset: 0x023e0710, size: 188 bytes, params: 3, frame: 25
|
||||
const object = {};
|
||||
const binding = env1_1;
|
||||
object.transform = [{translateX: 4 * (binding.length - 1 - a1)}];
|
||||
const value3 = undefined;
|
||||
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XSMALL = AvatarSizes.XSMALL;
|
||||
return (
|
||||
<View style={object} key={a0.id}>
|
||||
<CutoutableAvatarImage
|
||||
user={a0}
|
||||
guildId={value3}
|
||||
size={XSMALL}
|
||||
cutout={a1 < binding.length - 1 ? env2_12 : value3}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/* Metro module 10494; source: modules/user_profile/native/WishlistViewerCoachmark.tsx; dependencies: [31, 27, 1376, 33, 4501, 10495, 1244, 8543, 2] */
|
||||
function _fun81187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10680:6, offset: 0x01e9d788, size: 268 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.Image;
|
||||
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({imageContainer: {'alignItems': 'center',
|
||||
'justifyContent': 'center'}, image: {'width': 160, 'height': 106}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/WishlistViewerCoachmark.tsx');
|
||||
exports.default = WishlistViewerCoachmark;
|
||||
}
|
||||
|
||||
function CoachmarkImage() { // fn#81188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10680:300, offset: 0x01e9d894, size: 101 bytes, params: 1, frame: 21
|
||||
const styles = useStyles();
|
||||
const object = {};
|
||||
object.uri = importDefault(10495) /* metro dependency 10495: mobile_wishlist_coachmarkPng */;
|
||||
return (
|
||||
<View style={styles.imageContainer}>
|
||||
<Image source={object} style={styles.image} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function WishlistViewerCoachmark({anchorRef, isVisible, markAsDismissed, onViewWishlist}) { // fn#81189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10680:523, offset: 0x01e9d8f9, size: 150 bytes, params: 2, frame: 18
|
||||
const binding = env0_3;
|
||||
const value2 = binding.useCallback(function() {
|
||||
onViewWishlist();
|
||||
}, [onViewWishlist]);
|
||||
const useMemo = binding.useMemo;
|
||||
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(anchorRef, Reflect.apply(useMemo,
|
||||
binding, [_fun81191, [isVisible, markAsDismissed, value2]]));
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun81191() { // fn#81191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10680:668, offset: 0x01e9d99e, size: 233 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.title = Reflect.apply(string, intl, [t['+b6iUl']]);
|
||||
string = intl.string;
|
||||
const Howsng = t.Howsng;
|
||||
object2.description = Reflect.apply(string, intl, [Howsng]);
|
||||
object2.position = 'bottom';
|
||||
object2.visible = isVisible;
|
||||
object2.onDismiss = function() {
|
||||
return markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
||||
};
|
||||
object2.renderImgComponent = renderImgComponent_81193;
|
||||
string = intl.string;
|
||||
const TxBQzD = t.TxBQzD;
|
||||
object2.buttonLabel = Reflect.apply(string, intl, [TxBQzD]);
|
||||
object2.buttonVariant = 'primary';
|
||||
object2.onButtonPress = env0_3;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function renderImgComponent_81193() { // fn#81193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10680:850, offset: 0x01e9daa4, size: 23 bytes, params: 1, frame: 13
|
||||
return <CoachmarkImage />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
/* Metro module 14916; source: modules/user_profile/native/YouScreenUserProfileContent.tsx; dependencies: [57, 31, 27, 6876, 5189, 8516, 6816, 1376, 33, 14911, 14746, 477, 8510, 8496, 8514, 7013, 1365, 8867, 4578, 9646, 697, 1244, 14917, 1485, 8490, 6882, 8501, 566, 1357, 8494, 8497, 4127, 14918, 10345, 5176, 8524, 14919, 10352, 14239, 10210, 8762, 7331, 10361, 14921, 10327, 10373, 8853, 4017, 6517, 8513, 8695, 9122, 8859, 8861, 2] */
|
||||
function _fun112836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:6, offset: 0x023ddcd5, size: 328 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ScrollView;
|
||||
const env0_6 = value.View;
|
||||
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const env0_9 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
const env0_10 = (require(6816) /* metro dependency 6816: Constants */).UserProfileThemeTypes;
|
||||
const env0_11 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.Fragment;
|
||||
const env0_14 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/YouScreenUserProfileContent.tsx');
|
||||
exports.default = YouScreenUserProfileContent;
|
||||
}
|
||||
|
||||
function YouAvatar_112837(a0) { // fn#112837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:307, offset: 0x023dde1d, size: 153 bytes, params: 2, frame: 16
|
||||
const value2 = env0_4.useCallback(_fun112838, []);
|
||||
const value3 = undefined;
|
||||
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
return ((Component) => <Component {...a0} {...{['onPress']: value2}} {...{['importantForAccessibility']: 'no-hide-descendants'}} {...{['accessibilityElementsHidden']: isAndroid2}} {...{['accessible']: !isAndroid2 && value3}} />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
|
||||
}
|
||||
|
||||
function EditSection_112839({navigateToProfileCustomization}) { // fn#112839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:590, offset: 0x023ddef1, size: 538 bytes, params: 2, frame: 31
|
||||
const value2 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const value3 = env0_4.useRef(null);
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
let DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
|
||||
const value5 = env0_3(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[[DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP]]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
|
||||
const value6 = property === DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
|
||||
const value7 = env0_4.useCallback(_fun112840, [navigateToProfileCustomization, trackUserProfileAction, value6,
|
||||
property2]);
|
||||
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
const UserProfileTextButtonGroup = importDefault(8867) /* metro dependency 8867: UserProfileTextButtonGroup */;
|
||||
const primaryButtons = value2.primaryButtons;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const object = {ref: value3, variant: 'primary'};
|
||||
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object.icon = <PencilIcon size="sm" color={WHITE} />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const AAjhgi = (require(1244) /* metro dependency 1244: indexNative */).t.AAjhgi;
|
||||
object.text = Reflect.apply(string, intl, [AAjhgi]);
|
||||
object.onPress = value7;
|
||||
object.grow = true;
|
||||
return (
|
||||
<>
|
||||
<UserProfileTextButtonGroup style={primaryButtons} secondaryButton={<Button {...object} />} />
|
||||
{((Component) => <Component targetRef={value3} visible={value6} markAsDismissed={property2} />)(importDefault(14917) /* metro dependency 14917: DisplayNameStylesCoachmark */)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function YouScreenUserProfileContent({user, style, navigateToProfileCustomization, navigateToFriends, navigateToPremium, navigateToShop, initialTab, animateAvatar}) { // fn#112841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:1499, offset: 0x023de168, size: 2298 bytes, params: 2, frame: 58
|
||||
var object3;
|
||||
const env0_3 = navigateToShop;
|
||||
const env0_4 = initialTab;
|
||||
animateAvatar = animateAvatar === undefined || animateAvatar;
|
||||
const value4 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value5 = (require(1485) /* metro dependency 1485 */).useNavigation();
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
||||
[]).trackUserProfileAction;
|
||||
const value6 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id);
|
||||
const value7 = (require(6882) /* metro dependency 6882: userSettingToActivity */).useCustomStatusActivity();
|
||||
const value8 = (importDefault(8501) /* metro dependency 8501: useBadges */)(value6);
|
||||
const status = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelfPresenceStore], function() {
|
||||
return SelfPresenceStore.getStatus();
|
||||
});
|
||||
const value9 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('YouScreenUserProfileContent');
|
||||
const {theme, primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
|
||||
displayProfile: value6});
|
||||
const value11 = primaryColor != null;
|
||||
const {containerBackground, containerBorderColor, avatarBackground,
|
||||
statusBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
let binding = env0_4;
|
||||
const value13 = binding.useRef(null);
|
||||
binding = env0_4;
|
||||
let useCallback = binding.useCallback;
|
||||
const value14 = Reflect.apply(useCallback, binding, [_fun112843, [trackUserProfileAction]]);
|
||||
const useVirtualCurrencyMobileEnabledModule = require(4127) /* metro dependency 4127: useVirtualCurrencyMobileEnabled */;
|
||||
const useVirtualCurrencyMobileEnabled = useVirtualCurrencyMobileEnabledModule.useVirtualCurrencyMobileEnabled;
|
||||
const enabled = Reflect.apply(useVirtualCurrencyMobileEnabled, useVirtualCurrencyMobileEnabledModule, []).enabled;
|
||||
binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value16 = env0_3(Reflect.apply(useState, binding, [null]), 2);
|
||||
let property = value16[0];
|
||||
const property2 = value16[1];
|
||||
const value19 = (require(14918) /* metro dependency 14918: useShouldShowExpiringTrialOfferCard */).useShouldShowExpiringTrialOfferCard();
|
||||
const firstWishlistId = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
||||
function() {
|
||||
return UserProfileStore.getFirstWishlistId(user.id);
|
||||
});
|
||||
const [property3, env0_19] = env0_3(env0_4.useState(0), 2);
|
||||
const value22 = env0_4.useCallback(_fun112845, []);
|
||||
const {pageHeights,
|
||||
handlePageContentSize} = (require(10345) /* metro dependency 10345: useSegmentedPagesHeight */).usePageHeights();
|
||||
binding = env0_4;
|
||||
useState = binding.useState;
|
||||
let WISHLIST = UserProfileSections.WISHLIST;
|
||||
const value25 = env0_3(Reflect.apply(useState, binding, [initialTab === WISHLIST]), 2);
|
||||
const property4 = value25[0];
|
||||
const env0_22 = value25[1];
|
||||
const value26 = env0_4.useCallback(_fun112846, [trackUserProfileAction]);
|
||||
const value27 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('YouScreenUserProfileContent');
|
||||
const value28 = env0_4.useCallback(_fun112847, [value7, property2]);
|
||||
const moduleValue11 = require(1485) /* metro dependency 1485 */;
|
||||
let useFocusEffect = moduleValue11.useFocusEffect;
|
||||
binding = env0_4;
|
||||
useCallback = binding.useCallback;
|
||||
Reflect.apply(useFocusEffect, moduleValue11, [Reflect.apply(useCallback, binding, [_fun112848, [value28,
|
||||
value27]])]);
|
||||
env0_4.useEffect(_fun112849, [value28, value27]);
|
||||
const r33 = property?.label();
|
||||
const value32 = env0_4.useMemo(_fun112853, [env0_4.useCallback(_fun112851, [containerBackground,
|
||||
containerBorderColor, value9, value4, navigateToPremium, value19, navigateToShop, value11, enabled, user,
|
||||
value6, navigateToFriends]), env0_4.useCallback(_fun112852, [value4.profileContent, firstWishlistId, property3,
|
||||
property4]), handlePageContentSize]);
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
object3 = {pageWidth: property3};
|
||||
WISHLIST = UserProfileSections.WISHLIST;
|
||||
object3.defaultIndex = initialTab !== WISHLIST ? 0 : 1;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.itemSpacing = PX_24;
|
||||
object3.items = value32;
|
||||
object3.onPageChange = value26;
|
||||
const value33 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object3]);
|
||||
const value34 = (require(10345) /* metro dependency 10345: useSegmentedPagesHeight */).usePagesHeightStyle(value33,
|
||||
pageHeights);
|
||||
const env0_28 = env0_4.useRef(value33.setActiveIndex);
|
||||
env0_4.useEffect(_fun112856, [value33]);
|
||||
const moduleValue14 = moduleValue11;
|
||||
useFocusEffect = moduleValue14.useFocusEffect;
|
||||
binding = env0_4;
|
||||
useCallback = binding.useCallback;
|
||||
Reflect.apply(useFocusEffect, moduleValue14, [Reflect.apply(useCallback, binding, [_fun112857, [initialTab,
|
||||
value5]])]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
const items3 = [value4.profileContentWrapper];
|
||||
items3[1] = {paddingTop: 0};
|
||||
const items2 = [<YouAvatar_112837 user={user} backgroundColor={avatarBackground} statusStyle={{backgroundColor: statusBackground}} animate={animateAvatar} />];
|
||||
items2[1] = ((Component) => <Component ref={value13} customStatusActivity={value7} hasCustomProfileTheme={value11} style={[value4.customStatusBubble,
|
||||
value4.customStatusBubbleInset]} emojiOnlyStyle={value4.emojiOnlyCustomStatusBubble} editEnabled placeholderText={r33} prompt={property} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */);
|
||||
const items4 = [value4.primaryInfo];
|
||||
items4[1] = value4.profileContent;
|
||||
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
||||
const pronouns = value6?.pronouns;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['er+FRD'];
|
||||
const object2 = {};
|
||||
object2.status = (require(9122) /* metro dependency 9122: getChannelA11yLabel */).getStatusLabel(status);
|
||||
const value36 = Reflect.apply(formatToPlainString, intl, [property, object2]);
|
||||
const string = intl.string;
|
||||
const C6COaT = (require(1244) /* metro dependency 1244: indexNative */).t.C6COaT;
|
||||
const value37 = Reflect.apply(string, intl, [C6COaT]);
|
||||
const YOU_SCREEN = UserProfileThemeTypes.YOU_SCREEN;
|
||||
items2[2] = <View style={items4}><UserProfilePrimaryInfo user={user} pronouns={pronouns} badges={value8} badgeContainerBackground={containerBackground} onPressDisplayName={value14} displayNameAccessibilityHint={'' + value36 + ', ' + value37} themeType={YOU_SCREEN} showChevron /><EditSection_112839 navigateToProfileCustomization={navigateToProfileCustomization} /></View>;
|
||||
const profileTablist = value4.profileTablist;
|
||||
const Tabs = (require(8859) /* metro dependency 8859: TabsNative */).Tabs;
|
||||
const view = <View style={profileTablist}><Tabs state={value33} variant={value11 ? 'gradient-background' : undefined} /></View>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
|
||||
items2[3] = <View style={{flex: 1}} onLayout={value22}>{view}<View3 style={value34}><SegmentedControlPages state={value33} /></View3></View>;
|
||||
return (
|
||||
<View2 style={style}>
|
||||
<LayerScope>
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
</LayerScope>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112838() { // fn#112838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:350, offset: 0x023ddeb6, size: 59 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(require(14911) /* metro dependency 14911: Tracking */).trackYouTabAvatarPress();
|
||||
(require(14746) /* metro dependency 14746: showYouAccountActionSheet */).showYouAccountActionSheet();
|
||||
}
|
||||
|
||||
function _fun112840() { // fn#112840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:980, offset: 0x023de10b, size: 93 bytes, params: 1, frame: 14
|
||||
trackUserProfileAction({action: 'EDIT_PROFILE'});
|
||||
(require(14911) /* metro dependency 14911: Tracking */).trackYouTabEditProfilePress();
|
||||
navigateToProfileCustomization();
|
||||
if (result) {
|
||||
env0_2(ContentDismissActionType.TAKE_ACTION);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun112843() { // fn#112843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2246, offset: 0x023dea75, size: 61 bytes, params: 1, frame: 12
|
||||
trackUserProfileAction({action: 'PRESS_SET_STATUS'});
|
||||
const value = environment.__proto__;
|
||||
(require(14746) /* metro dependency 14746: showYouAccountActionSheet */).showYouAccountActionSheet();
|
||||
}
|
||||
|
||||
function _fun112845({nativeEvent}) { // fn#112845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2597, offset: 0x023dead2, size: 36 bytes, params: 2, frame: 11
|
||||
env0_19(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
function _fun112846(a0) { // fn#112846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2798, offset: 0x023deaf6, size: 76 bytes, params: 2, frame: 14
|
||||
const value2 = a0 === 1;
|
||||
env0_22(value2);
|
||||
trackUserProfileAction({action: 'PRESS_SECTION',
|
||||
section: value2 ? UserProfileSections.WISHLIST : UserProfileSections.MAIN});
|
||||
}
|
||||
|
||||
function _fun112847() { // fn#112847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2957, offset: 0x023deb42, size: 58 bytes, params: 1, frame: 13
|
||||
var r1;
|
||||
const binding = env0_15;
|
||||
let value = null;
|
||||
if (value == env0_9) {
|
||||
value = environment.__proto__;
|
||||
value = (importDefault(8524) /* metro dependency 8524: getRandomCustomStatusPrompt */)();
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
binding(r1);
|
||||
}
|
||||
|
||||
function _fun112848() { // fn#112848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3037, offset: 0x023deb7c, size: 24 bytes, params: 1, frame: 9
|
||||
if (!env0_23) {
|
||||
env0_24();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun112849() { // fn#112849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3076, offset: 0x023deb94, size: 38 bytes, params: 1, frame: 11
|
||||
if (env0_23) {
|
||||
global.setImmediate(_fun112850);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun112851() { // fn#112851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3173, offset: 0x023debc9, size: 753 bytes, params: 1, frame: 24
|
||||
const binding = env0_10;
|
||||
const items4 = [env0_5.card];
|
||||
if (binding) {
|
||||
items4[1] = {backgroundColor: containerBackground, borderColor: containerBorderColor, borderWidth: 1};
|
||||
} else {
|
||||
items4[1] = {backgroundColor: containerBackground};
|
||||
}
|
||||
const items2 = [env0_5.cards];
|
||||
items2[1] = env0_5.profileContent;
|
||||
const value3 = undefined;
|
||||
const items3 = [((Component) => <Component navigateToPremium={navigateToPremium} style={items4} />)(importDefault(14919) /* metro dependency 14919: YouExpiringTrialOfferCard */)];
|
||||
items3[1] = !env0_16 && ((Component) => <Component navigateToPremium={navigateToPremium} navigateToShop={navigateToShop} hasCustomProfileTheme={env0_11} />)(importDefault(10352) /* metro dependency 10352: UserProfileDismissibleUpsells */);
|
||||
items3[2] = enabled && ((Component) => <Component style={items4} />)(importDefault(14239) /* metro dependency 14239: BalanceWidgetMenu */);
|
||||
const UserProfileActivity = importDefault(10210) /* metro dependency 10210: UserProfileActivity */;
|
||||
let userBinding = user;
|
||||
items3[3] = <UserProfileActivity user={userBinding} currentUser={userBinding} style={env0_10 ? value3 : items4} />;
|
||||
items3[4] = ((Component) => <Component userId={user.id} displayProfile={env0_8} style={env0_10 ? value3 : items4} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
|
||||
items3[5] = env0_10 && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
||||
const UserProfileAccountConnectionsCard = (require(10361) /* metro dependency 10361: UserProfileConnections */).UserProfileAccountConnectionsCard;
|
||||
items3[6] = <UserProfileAccountConnectionsCard userId={user.id} style={env0_10 ? value3 : items4} />;
|
||||
const UserProfileApplicationRoleConnectionsCard = (require(10361) /* metro dependency 10361: UserProfileConnections */).UserProfileApplicationRoleConnectionsCard;
|
||||
items3[7] = <UserProfileApplicationRoleConnectionsCard userId={user.id} style={env0_10 ? value3 : items4} />;
|
||||
const UserProfileYourFriendsCard = importDefault(14921) /* metro dependency 14921: UserProfileYourFriendsCard */;
|
||||
userBinding = user;
|
||||
items3[8] = <UserProfileYourFriendsCard userId={userBinding.id} navigateToFriends={navigateToFriends} style={items4} />;
|
||||
items3[9] = ((Component) => <Component userId={userBinding.id} style={env0_10 ? value3 : items4} />)(importDefault(10327) /* metro dependency 10327: UserProfileNote */);
|
||||
return (
|
||||
<View style={items2}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112852() { // fn#112852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3912, offset: 0x023deeba, size: 172 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const profileContent = env0_5.profileContent;
|
||||
if (firstWishlistId == null) {
|
||||
const WishlistEmptyState = (require(10373) /* metro dependency 10373: UserProfileWishlistGrid */).WishlistEmptyState;
|
||||
r0 = <WishlistEmptyState />;
|
||||
} else {
|
||||
value = undefined;
|
||||
value = ((Component) => <Component wishlistId={firstWishlistId} containerWidth={env0_18 > 0 ? env0_18 : value} isVisible={env0_21} />)(importDefault(10373) /* metro dependency 10373: UserProfileWishlistGrid */);
|
||||
r0 = value;
|
||||
}
|
||||
return (
|
||||
<View style={profileContent}>
|
||||
{r0}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112853() { // fn#112853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4110, offset: 0x023def66, size: 249 bytes, params: 1, frame: 22
|
||||
let object2 = {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;
|
||||
object2.label = Reflect.apply(string, intl, [LXw470]);
|
||||
object2.page = <ScrollView scrollEnabled={false} onContentSizeChange={function(a0, a1) {
|
||||
return handlePageContentSize(0, a0, a1);
|
||||
}}>{env0_25()}</ScrollView>;
|
||||
const items2 = [object2];
|
||||
object2 = {id: 'wishlist'};
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J']);
|
||||
object2.page = <ScrollView scrollEnabled={false} onContentSizeChange={function(a0, a1) {
|
||||
return handlePageContentSize(1, a0, a1);
|
||||
}}>{env0_26()}</ScrollView>;
|
||||
items2[1] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun112856() { // fn#112856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4645, offset: 0x023df094, size: 27 bytes, params: 1, frame: 2
|
||||
env0_28.current = env0_27.setActiveIndex;
|
||||
}
|
||||
|
||||
function _fun112857() { // fn#112857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4726, offset: 0x023df0af, size: 82 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var r1;
|
||||
var WISHLIST;
|
||||
var value;
|
||||
let initialTabBinding = initialTab;
|
||||
if (initialTabBinding !== undefined) {
|
||||
initialTabBinding = initialTab;
|
||||
value = environment.__proto__;
|
||||
WISHLIST = UserProfileSections.WISHLIST;
|
||||
value = 0;
|
||||
r1 = initialTabBinding !== WISHLIST ? value : 1;
|
||||
var env0_0 = global.setTimeout(_fun112858, 80);
|
||||
}
|
||||
return _fun112859;
|
||||
}
|
||||
|
||||
function _fun112850() { // fn#112850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3099, offset: 0x023debba, size: 15 bytes, params: 1, frame: 9
|
||||
env1_24();
|
||||
}
|
||||
|
||||
function _fun112858() { // fn#112858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4791, offset: 0x023df101, size: 56 bytes, params: 1, frame: 16
|
||||
env1_28.current(env0_1, false, true);
|
||||
env1_6.setParams({initialTab: undefined});
|
||||
}
|
||||
|
||||
function _fun112859() { // fn#112859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4861, offset: 0x023df139, size: 125 bytes, params: 1, frame: 12
|
||||
var parent;
|
||||
var setParams;
|
||||
if (env0_0 != null) {
|
||||
global.clearTimeout(env0_0);
|
||||
}
|
||||
let binding = env1_6;
|
||||
if (!binding.isFocused()) {
|
||||
binding = env1_6;
|
||||
parent = binding.getParent();
|
||||
if (parent != null && parent.isFocused()) {
|
||||
binding = env1_6;
|
||||
setParams = binding.setParams;
|
||||
value = environment.__proto__.__proto__;
|
||||
Reflect.apply(setParams, binding, [{initialTab: UserProfileSections.MAIN}]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 8810; source: modules/user_profile/native/openUserContextMenuCommands.tsx; dependencies: [8515, 4080, 4007, 1909, 2] */
|
||||
function _fun68863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8995:6, offset: 0x01c5fafb, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/openUserContextMenuCommands.tsx');
|
||||
exports.default = openUserContextMenuCommands;
|
||||
}
|
||||
|
||||
function openUserContextMenuCommands({userId, selectedChannel, showUserProfile, analyticsLocations}) { // fn#68864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8995:195, offset: 0x01c5fb62, size: 192 bytes, params: 2, frame: 21
|
||||
var object2;
|
||||
(require(8515) /* metro dependency 8515: UserProfileAnalyticsUtils */).trackUserProfileAction({action: 'PRESS_VIEW_APP_COMMANDS',
|
||||
analyticsLocations: analyticsLocations});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
const navigateToContextMenuCommands = value.navigateToContextMenuCommands;
|
||||
object2 = {channel: selectedChannel};
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const USER = ApplicationCommandType.USER;
|
||||
object2.commandType = USER;
|
||||
object2.commandTargetId = userId;
|
||||
object2.onClose = showUserProfile;
|
||||
object2.onPressAppCommand = onPressAppCommand;
|
||||
Reflect.apply(navigateToContextMenuCommands, value, [object2]);
|
||||
}
|
||||
|
||||
function onPressAppCommand() { // fn#68865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8995:558, owner: openUserContextMenuCommands.onPressAppCommand, offset: 0x01c5fc22, size: 61 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(8515) /* metro dependency 8515: UserProfileAnalyticsUtils */).trackUserProfileAction({action: 'PRESS_APP_COMMAND',
|
||||
analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/* Metro module 14894; source: modules/user_profile/native/profileModalTransition.tsx; dependencies: [31, 1484, 2] */
|
||||
function _fun112670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:6, offset: 0x023d6e22, size: 172 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/profileModalTransition.tsx');
|
||||
exports.useReportProfileModalTransition = useReportProfileModalTransition;
|
||||
exports.useIsProfileModalTransitioning = useIsProfileModalTransitioning;
|
||||
}
|
||||
|
||||
function setTransitioningModalCount(a0) { // fn#112671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:120, offset: 0x023d6ece, size: 66 bytes, params: 2, frame: 13
|
||||
const Math = global.Math;
|
||||
if (Math.max(0, a0) !== env0_3) {
|
||||
env0_4.forEach(function(a0) {
|
||||
return a0();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function useReportProfileModalTransition() { // fn#112673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:334, offset: 0x023d6f10, size: 73 bytes, params: 1, frame: 15
|
||||
env0_2.useEffect(_fun112674, [(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()]);
|
||||
}
|
||||
|
||||
function useIsProfileModalTransitioning() { // fn#112679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:730, offset: 0x023d7049, size: 37 bytes, params: 1, frame: 13
|
||||
return env0_2.useSyncExternalStore(_fun112680, _fun112682);
|
||||
}
|
||||
|
||||
function _fun112674() { // fn#112674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:420, offset: 0x023d6f59, size: 112 bytes, params: 1, frame: 15
|
||||
const env0_0 = false;
|
||||
const closure = leave;
|
||||
const binding = env0_0;
|
||||
const items2 = [binding.addListener('transitionStart', _fun112676)];
|
||||
items2[1] = binding.addListener('transitionEnd', closure);
|
||||
items2[2] = binding.addListener('gestureCancel', closure);
|
||||
return _fun112677;
|
||||
}
|
||||
|
||||
function _fun112680(a0) { // fn#112680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:803, offset: 0x023d706e, size: 35 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
env1_4.add(a0);
|
||||
return _fun112681;
|
||||
}
|
||||
|
||||
function _fun112682() { // fn#112682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:835, offset: 0x023d70ab, size: 15 bytes, params: 1, frame: 2
|
||||
return env1_3 > 0;
|
||||
}
|
||||
|
||||
function leave() { // fn#112675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:440, offset: 0x023d6fc9, size: 45 bytes, params: 1, frame: 11
|
||||
if (env0_0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
setTransitioningModalCount(env2_3 - 1);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun112676() { // fn#112676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:524, offset: 0x023d6ff6, size: 45 bytes, params: 1, frame: 11
|
||||
if (!env0_0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
setTransitioningModalCount(env2_3 + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun112677() { // fn#112677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:655, offset: 0x023d7023, size: 38 bytes, params: 1, frame: 12
|
||||
env0_2.forEach(function(a0) {
|
||||
return a0();
|
||||
});
|
||||
leave();
|
||||
}
|
||||
|
||||
function _fun112681() { // fn#112681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15091:816, offset: 0x023d7091, size: 26 bytes, params: 1, frame: 11
|
||||
return env2_4.delete(env0_0);
|
||||
}
|
||||
|
||||
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user