This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,38 +1,44 @@
/* Metro module 8508; source: modules/profile_customization/native/Banner.tsx; dependencies: [31, 27, 661, 33, 4501, 673, 5475, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun67448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8693:6, offset: 0x01c230bc, size: 245 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 */).BANNER_HEIGHT;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({root: {width: '100%'},
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({root: {width: '100%'},
image: {'width': '100%', 'height': '100%'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/profile_customization/native/Banner.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/profile_customization/native/Banner.tsx');
exports.default = ProfileBanner;
}
function ProfileBanner({style, bannerSource, backgroundColor, bannerSafeArea, bannerHeight = BANNER_HEIGHT}) { // fn#67449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8693:329, offset: 0x01c231b1, size: 209 bytes, params: 2, frame: 21
var r4;
bannerSafeArea = bannerSafeArea === undefined ? 0 : bannerSafeArea;
var value;
const styles = useStyles();
const object2 = {};
object2.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(backgroundColor);
object2.height = bannerHeight + bannerSafeArea;
const items2 = [styles.root, object2, style];
if (bannerSource != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.image} source={bannerSource} />)(value);
r4 = value;
} else {
r4 = null;
function ProfileBanner({style, bannerSource, backgroundColor, bannerSafeArea, bannerHeight = BANNER_HEIGHT}) { // fn#67449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8693:329, offset: 0x01c231b1, size: 209 bytes, params: 2, frame: 21
var r4;
bannerSafeArea = bannerSafeArea === undefined ? 0 : bannerSafeArea;
var value;
const styles = useStyles();
const object = {};
object.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(backgroundColor);
object.height = bannerHeight + bannerSafeArea;
const items2 = [styles.root, object, style];
if (bannerSource != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.image} source={bannerSource} />)(value);
r4 = value;
} else {
r4 = null;
}
return (
<View style={items2}>
{r4}
</View>
);
}
return (
<View style={items2}>
{r4}
</View>
);
}
global.__d(_fun67448, 8508, [31, 27, 661, 33, 4501, 673, 5475,
2]) /* metro module 8508, dependencies: [31, 27, 661, 33, 4501, 673, 5475, 2] */;
@@ -1,105 +1,150 @@
/* Metro module 8763; source: modules/profile_customization/native/BioText.tsx; dependencies: [31, 27, 661, 1933, 33, 4501, 3853, 683, 4573, 8764, 1932, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ChangelogConstantsModule from '../../changelog/ChangelogConstants.tsx'; /* Metro dependency 1933 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun68576(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:6, offset: 0x01c54b81, size: 322 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 env0_4 = (require(27) /* metro dependency 27 */).Pressable;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_6 = (require(1933) /* metro dependency 1933: ChangelogConstants */).CHANGELOG_URL;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsxs;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({text: {'alignSelf': 'stretch',
const env0_10 = (CreateStylesModule).createStyles({text: {'alignSelf': 'stretch',
'textAlignVertical': 'top', 'width': '100%', 'flexGrow': 1, 'paddingTop': 2, 'lineHeight': 24},
span: {'alignSelf': 'stretch', 'textAlignVertical': 'bottom', 'width': '100%', 'flexGrow': 1, 'display': 'flex',
'paddingBottom': 2}, link: {'alignSelf': 'stretch', 'textAlignVertical': 'bottom', 'width': '100%',
'flexGrow': 1, 'bottom': -4, 'position': 'relative'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/profile_customization/native/BioText.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/profile_customization/native/BioText.tsx');
exports.default = BioText;
}
function LinkButton_68577({lineClamp, text}) { // fn#68577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:560, offset: 0x01c54cc3, size: 154 bytes, params: 2, frame: 20
const styles = useStyles();
const pressableBindingProps = {onPress: function() {
importDefault(dependencyMap[6]).openURL(CHANGELOG_URL);
var defaultImport2 = importDefault(dependencyMap[7]);
var CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
defaultImport2.track(CHANGE_LOG_CTA_CLICKED, {cta_type: 'profile_bio', target: CHANGELOG_URL});
}, style: styles.link};
const Text = (TextModule).Text;
return (
<Pressable {...pressableBindingProps}>
<Text
variant="text-md/normal"
color="text-link"
lineClamp={lineClamp}
style={styles.link}
>
{'\n'}
{text}
</Text>
</Pressable>
);
}
function LinkButton_68577({lineClamp, text}) { // fn#68577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:560, offset: 0x01c54cc3, size: 154 bytes, params: 2, frame: 20
const styles = useStyles();
const pressableBindingProps = {onPress: function() {
importDefault(dependencyMap[6]).openURL(CHANGELOG_URL);
var defaultImport2 = importDefault(dependencyMap[7]);
var CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
defaultImport2.track(CHANGE_LOG_CTA_CLICKED, {cta_type: 'profile_bio', target: CHANGELOG_URL});
}, style: styles.link};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Pressable {...pressableBindingProps}>
<Text
variant="text-md/normal"
color="text-link"
lineClamp={lineClamp}
style={styles.link}
>
{'\n'}
{text}
</Text>
</Pressable>
);
}
function BioText({placeholder, bio, lineClamp, userId, textVariant}) { // fn#68579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:952, offset: 0x01c54dbe, size: 605 bytes, params: 2, frame: 31
var r0;
var value5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var jsxRuntimeEnv0_9Binding;
var value6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
textVariant = textVariant === undefined ? 'text-md/normal' : textVariant;
var value;
const styles = useStyles();
const value2 = env0_3.useMemo(_fun68580, [bio, textVariant]);
const r15 = bio.length === 0 && !(importDefault(1932) /* metro dependency 1932: isChangelogUser */)(userId);
if ((importDefault(1932) /* metro dependency 1932: isChangelogUser */)(userId)) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
value6 = 'text-default';
items2 = [<Text variant={textVariant} color={r15 ? 'text-muted' : value6} lineClamp={lineClamp} style={styles.text} key="changelog-bio">{intl.string(t.OJmNR9)}{'\n'}</Text>];
items2[1] = <Text variant={textVariant} color={r15 ? 'text-muted' : value6} lineClamp={lineClamp} style={styles.span} key="changelog-cta">{intl.format(t.RCYeBL,
{blogHook: blogHook})}</Text>;
r0 = <>{items2}</>;
} else if (r15) {
value5 = null;
if (value5 == placeholder) {
r0 = value5;
function BioText({placeholder, bio, lineClamp, userId, textVariant}) { // fn#68579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:952, offset: 0x01c54dbe, size: 605 bytes, params: 2, frame: 31
var r0;
var value5;
const Text = (TextModule).Text;
var jsxRuntimeEnv0_9Binding;
var value6;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
textVariant = textVariant === undefined ? 'text-md/normal' : textVariant;
var value;
const styles = useStyles();
const value2 = ReactModule.useMemo(_fun68580, [bio, textVariant]);
const r15 = bio.length === 0 && !(importDefault(1932) /* metro dependency 1932: isChangelogUser */)(userId);
if ((importDefault(1932) /* metro dependency 1932: isChangelogUser */)(userId)) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
value6 = 'text-default';
items2 = [
<Text
variant={textVariant}
color={r15 ? 'text-muted' : value6}
lineClamp={lineClamp}
style={styles.text}
key="changelog-bio"
>
{intl.string(t.OJmNR9)}
{'\n'}
</Text>,
];
items2[1] = (
<Text
variant={textVariant}
color={r15 ? 'text-muted' : value6}
lineClamp={lineClamp}
style={styles.span}
key="changelog-cta"
>
{intl.format(t.RCYeBL, {blogHook: blogHook})}
</Text>
);
r0 = (
<>
{items2}
</>
);
} else if (r15) {
value5 = null;
if (value5 == placeholder) {
r0 = value5;
} else {
value = 'text-default';
value = (
<Text
variant={textVariant}
color={r15 ? 'text-muted' : value}
lineClamp={lineClamp}
style={styles.text}
>
{r15 ? placeholder : value2}
</Text>
);
r0 = value;
}
} else {
value = 'text-default';
value = <Text variant={textVariant} color={r15 ? 'text-muted' : value} lineClamp={lineClamp} style={styles.text}>{r15 ? placeholder : value2}</Text>;
value = (
<Text
variant={textVariant}
color={r15 ? 'text-muted' : value}
lineClamp={lineClamp}
style={styles.text}
>
{r15 ? placeholder : value2}
</Text>
);
r0 = value;
}
} else {
value = 'text-default';
value = <Text variant={textVariant} color={r15 ? 'text-muted' : value} lineClamp={lineClamp} style={styles.text}>{r15 ? placeholder : value2}</Text>;
r0 = value;
return r0;
function _fun68580() { // fn#68580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:1067, offset: 0x01c5501b, size: 63 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(8764) /* metro dependency 8764: BioMarkupUtils */;
const parseBioReact = value.parseBioReact;
const bioBinding = bio;
const textVariantBinding = textVariant;
return Reflect.apply(parseBioReact, value, [bioBinding, undefined, {linkVariant: textVariantBinding,
textVariant: textVariantBinding}]);
}
function blogHook(a0, a1) { // fn#68581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:1510, owner: BioText.blogHook, offset: 0x01c5505a, size: 46 bytes, params: 3, frame: 15
return (
<LinkButton_68577
lineClamp={lineClamp}
text={a0}
key={a1}
/>
);
}
}
return r0;
}
function _fun68580() { // fn#68580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:1067, offset: 0x01c5501b, size: 63 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(8764) /* metro dependency 8764: BioMarkupUtils */;
const parseBioReact = value.parseBioReact;
const bioBinding = bio;
const textVariantBinding = textVariant;
return Reflect.apply(parseBioReact, value, [bioBinding, undefined, {linkVariant: textVariantBinding,
textVariant: textVariantBinding}]);
}
function blogHook(a0, a1) { // fn#68581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:1510, owner: BioText.blogHook, offset: 0x01c5505a, size: 46 bytes, params: 3, frame: 15
return (
<LinkButton_68577
lineClamp={lineClamp}
text={a0}
key={a1}
/>
);
}
global.__d(_fun68576, 8763, [31, 27, 661, 1933, 33, 4501, 3853, 683, 4573, 8764, 1932, 1244,
2]) /* metro module 8763, dependencies: [31, 27, 661, 1933, 33, 4501, 3853, 683, 4573, 8764, 1932, 1244, 2] */;
@@ -1,41 +1,45 @@
/* Metro module 13204; source: modules/profile_customization/native/EditIcon.tsx; dependencies: [31, 27, 33, 4501, 697, 9646, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PencilIconModule from '../../../design/components/Icon/native/redesign/generated/PencilIcon.tsx'; /* Metro dependency 9646 */
function _fun100761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13394:6, offset: 0x021f73d9, size: 315 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.editIcon = {'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_SURFACE_HIGH};
const object5 = {'width': 24, 'height': 24};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.xs = object5;
const object6 = {'width': 32, 'height': 32};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.sm = object6;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/profile_customization/native/EditIcon.tsx');
object.editIcon = {'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_SURFACE_HIGH};
const object3 = {'width': 24, 'height': 24};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.xs = object3;
const object4 = {'width': 32, 'height': 32};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.sm = object4;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/profile_customization/native/EditIcon.tsx');
exports.default = EditIcon;
function EditIcon({style, size}) { // fn#100762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13394:472, offset: 0x021f7514, size: 160 bytes, params: 2, frame: 18
size = size === undefined ? 'xs' : size;
const styles = useStyles();
const binding = styles;
const useMemo = binding.useMemo;
const iconContainerStyle = Reflect.apply(useMemo, binding, [function() {
return {iconContainerStyle: [styles.editIcon, size === 'sm' ? styles.sm : styles.xs, style]};
}, [styles, style, size]]).iconContainerStyle;
const PencilIcon = (PencilIconModule).PencilIcon;
return (
<View style={iconContainerStyle}>
<PencilIcon size={size} />
</View>
);
}
}
function EditIcon({style, size}) { // fn#100762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13394:472, offset: 0x021f7514, size: 160 bytes, params: 2, frame: 18
size = size === undefined ? 'xs' : size;
const styles = useStyles();
const binding = styles;
const useMemo = binding.useMemo;
const iconContainerStyle = Reflect.apply(useMemo, binding, [function() {
return {iconContainerStyle: [styles.editIcon, size === 'sm' ? styles.sm : styles.xs, style]};
}, [styles, style, size]]).iconContainerStyle;
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
return (
<View style={iconContainerStyle}>
<PencilIcon size={size} />
</View>
);
}
global.__d(_fun100761, 13204, [31, 27, 33, 4501, 697, 9646,
2]) /* metro module 13204, dependencies: [31, 27, 33, 4501, 697, 9646, 2] */;
@@ -1,144 +1,159 @@
/* Metro module 8417; source: modules/profile_customization/native/HeaderAvatar.tsx; dependencies: [31, 27, 4502, 1945, 4396, 661, 33, 4501, 697, 1305, 566, 8418, 8402, 8419, 8420, 5278, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseAvatarDecorationIfNotExpired from '../../collectibles/avatar_decorations/useAvatarDecorationIfNotExpired.tsx'; /* Metro dependency 8418 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ProfileCustomizationUtilsModule from '../ProfileCustomizationUtils.tsx'; /* Metro dependency 8402 */
function _fun66858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:6, offset: 0x01c0d012, size: 291 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_9 = Reflect.apply(createStyles, createStylesModule,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule,
[{avatarStatusStyle: {backgroundColor: BACKGROUND_SURFACE_HIGH}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/profile_customization/native/HeaderAvatar.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/profile_customization/native/HeaderAvatar.tsx');
exports.default = HeaderAvatar;
}
function HeaderAvatar(a0) { // fn#66859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:386, offset: 0x01c0d135, size: 705 bytes, params: 2, frame: 35
const user = a0.user;
const guildId = a0.guildId;
const disableStatus = a0.disableStatus;
const env0_2 = a0.pendingAvatarSrc;
const pendingAvatarDecoration = a0.pendingAvatarDecoration;
const style = a0.style;
const statusStyle = a0.statusStyle;
const onPress = a0.onPress;
const size = a0.size;
const value = undefined;
const r14 = size !== value ? size : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XXLARGE;
let animate = a0.animate;
animate = animate === value || animate;
let object = {'user': 0, 'guildId': 0, 'disableStatus': 0, 'pendingAvatarSrc': 0, 'pendingAvatarDecoration': 0,
'style': 0, 'statusStyle': 0, 'onPress': 0, 'size': 0, 'animate': 0};
const value4 = null;
silentSetPrototypeOf(object, value4, undefined);
const value5 = copyDataProperties({}, a0, object, undefined);
const styles = useStyles();
const id = user.id;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const {isMobileOnline, status,
activities} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore],
function() {
var object = {};
var presenceStoreBinding = PresenceStore;
object.isMobileOnline = presenceStoreBinding.isMobileOnline(id);
object.status = presenceStoreBinding.getStatus(id);
object.activities = presenceStoreBinding.getActivities(id);
object.customStatusActivity = presenceStoreBinding.findActivity(id, _fun66862);
return object;
}, [id]);
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun66863);
const defaultImport = UseAvatarDecorationIfNotExpired;
const getProfilePreviewValue = ProfileCustomizationUtilsModule.getProfilePreviewValue;
const value9 = defaultImport(Reflect.apply(getProfilePreviewValue, ProfileCustomizationUtilsModule,
[{pendingValue: pendingAvatarDecoration, userValue: value4 == user ? value : user.avatarDecoration,
guildValue: value4 == value8 ? value : value8.avatarDecoration, guildId: guildId}]));
const object3 = {isMobileOnline: isMobileOnline, size: r14};
object3.status = disableStatus ? value4 : status;
object3.statusStyle = [styles.avatarStatusStyle, statusStyle];
object3.streaming = (importDefault(8419) /* metro dependency 8419: isStreaming */)(activities);
object3.animate = animate && !useReducedMotion;
object3.avatarDecoration = value9;
const renderAvatar2 = renderAvatar;
if (value4 != onPress) {
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
onPress={onPress}
onLongPress={onPress}
style={style}
activeOpacity={0.8}
accessibilityRole="imagebutton"
{...value5}
>
{renderAvatar2()}
</PressableOpacity>
);
} else {
return (
<View
style={style}
accessibilityRole="image"
accessible
{...value5}
>
{renderAvatar2()}
</View>
);
}
function _fun66861() { // fn#66861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:692, offset: 0x01c0d3f6, size: 103 bytes, params: 1, frame: 14
const presenceStoreBinding = PresenceStore;
const getStatus = presenceStoreBinding.getStatus;
const getActivities = presenceStoreBinding.getActivities;
return {isMobileOnline: presenceStoreBinding.isMobileOnline(id), status: Reflect.apply(getStatus,
presenceStoreBinding, [id]), activities: Reflect.apply(getActivities, presenceStoreBinding, [id]),
customStatusActivity: presenceStoreBinding.findActivity(id, function({type}) {
return type === ActivityTypes.CUSTOM_STATUS;
})};
function _fun66862({type}) { // fn#66862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:824, offset: 0x01c0d45d, size: 27 bytes, params: 2, frame: 2
const CUSTOM_STATUS = ActivityTypes.CUSTOM_STATUS;
return type === CUSTOM_STATUS;
}
}
function _fun66863() { // fn#66863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:942, offset: 0x01c0d478, size: 45 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding ? GuildMemberStore.getMember(guildId, id) : value2;
}
function renderAvatar() { // fn#66864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:1287, owner: HeaderAvatar.renderAvatar, offset: 0x01c0d4a5, size: 154 bytes, params: 1, frame: 23
var r0;
var object;
var userBinding;
var guildIdBinding;
var getAvatarSource;
let value = environment.__proto__;
const Avatar = (NativeModule).Avatar;
let pendingAvatarSrcBinding = pendingAvatarSrc;
if (pendingAvatarSrcBinding !== undefined) {
object = {};
value = require(8420) /* metro dependency 8420: ProfileCustomizationUtils */;
getAvatarSource = value.getAvatarSource;
userBinding = user;
guildIdBinding = guildId;
pendingAvatarSrcBinding = pendingAvatarSrc;
object.source = Reflect.apply(getAvatarSource, value, [userBinding, guildIdBinding, pendingAvatarSrcBinding,
useReducedMotion]);
copyDataProperties(object, env0_5, pendingAvatarSrcBinding);
r0 = object;
} else {
object = {};
object.user = user;
object.guildId = guildId;
copyDataProperties(object, env0_5, undefined);
r0 = object;
}
return <Avatar {...r0} />;
}
function HeaderAvatar(a0) { // fn#66859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:386, offset: 0x01c0d135, size: 705 bytes, params: 2, frame: 35
const user = a0.user;
const guildId = a0.guildId;
const disableStatus = a0.disableStatus;
const env0_2 = a0.pendingAvatarSrc;
const pendingAvatarDecoration = a0.pendingAvatarDecoration;
const style = a0.style;
const statusStyle = a0.statusStyle;
const onPress = a0.onPress;
const size = a0.size;
const value = undefined;
const r14 = size !== value ? size : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XXLARGE;
let animate = a0.animate;
animate = animate === value || animate;
const object2 = {'user': 0, 'guildId': 0, 'disableStatus': 0, 'pendingAvatarSrc': 0, 'pendingAvatarDecoration': 0,
'style': 0, 'statusStyle': 0, 'onPress': 0, 'size': 0, 'animate': 0};
const value4 = null;
silentSetPrototypeOf(object2, value4, undefined);
const value5 = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles();
const id = user.id;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const {isMobileOnline, status,
activities} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore],
function() {
var object = {};
object.isMobileOnline = PresenceStore.isMobileOnline(id);
object.status = PresenceStore.getStatus(id);
object.activities = PresenceStore.getActivities(id);
object.customStatusActivity = PresenceStore.findActivity(id, _fun66862);
return object;
}, [id]);
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun66863);
const defaultImport = importDefault(8418) /* metro dependency 8418: useAvatarDecorationIfNotExpired */;
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
const value9 = defaultImport(Reflect.apply(getProfilePreviewValue, profileCustomizationUtilsModule,
[{pendingValue: pendingAvatarDecoration, userValue: value4 == user ? value : user.avatarDecoration,
guildValue: value4 == value8 ? value : value8.avatarDecoration, guildId: guildId}]));
const object4 = {isMobileOnline: isMobileOnline, size: r14};
object4.status = disableStatus ? value4 : status;
object4.statusStyle = [styles.avatarStatusStyle, statusStyle];
object4.streaming = (importDefault(8419) /* metro dependency 8419: isStreaming */)(activities);
object4.animate = animate && !useReducedMotion;
object4.avatarDecoration = value9;
const closure = renderAvatar;
if (value4 != onPress) {
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
onPress={onPress}
onLongPress={onPress}
style={style}
activeOpacity={0.8}
accessibilityRole="imagebutton"
{...value5}
>
{closure()}
</PressableOpacity>
);
} else {
return (
<View
style={style}
accessibilityRole="image"
accessible
{...value5}
>
{closure()}
</View>
);
}
}
function _fun66861() { // fn#66861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:692, offset: 0x01c0d3f6, size: 103 bytes, params: 1, frame: 14
const getStatus = PresenceStore.getStatus;
const getActivities = PresenceStore.getActivities;
return {isMobileOnline: PresenceStore.isMobileOnline(id), status: Reflect.apply(getStatus, PresenceStore, [id]),
activities: Reflect.apply(getActivities, PresenceStore, [id]),
customStatusActivity: PresenceStore.findActivity(id, function({type}) {
return type === ActivityTypes.CUSTOM_STATUS;
})};
}
function _fun66863() { // fn#66863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:942, offset: 0x01c0d478, size: 45 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding ? GuildMemberStore.getMember(guildId, id) : value2;
}
function renderAvatar() { // fn#66864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8602:1287, owner: HeaderAvatar.renderAvatar, offset: 0x01c0d4a5, size: 154 bytes, params: 1, frame: 23
var r0;
var object2;
var userBinding;
var guildIdBinding;
var getAvatarSource;
let value = environment.__proto__;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
let pendingAvatarSrcBinding = pendingAvatarSrc;
if (pendingAvatarSrcBinding !== undefined) {
object2 = {};
value = require(8420) /* metro dependency 8420: ProfileCustomizationUtils */;
getAvatarSource = value.getAvatarSource;
userBinding = user;
guildIdBinding = guildId;
pendingAvatarSrcBinding = pendingAvatarSrc;
object2.source = Reflect.apply(getAvatarSource, value, [userBinding, guildIdBinding, pendingAvatarSrcBinding,
useReducedMotion]);
copyDataProperties(object2, env0_5, pendingAvatarSrcBinding);
r0 = object2;
} else {
object2 = {};
object2.user = user;
object2.guildId = guildId;
copyDataProperties(object2, env0_5, undefined);
r0 = object2;
}
return <Avatar {...r0} />;
}
global.__d(_fun66858, 8417, [31, 27, 4502, 1945, 4396, 661, 33, 4501, 697, 1305, 566, 8418, 8402, 8419, 8420, 5278,
2]) /* metro module 8417, dependencies: [31, 27, 4502, 1945, 4396, 661, 33, 4501, 697, 1305, 566, 8418, 8402, 8419, 8420, 5278, 2] */;
@@ -1,47 +1,26 @@
/* Metro module 8420; source: modules/profile_customization/native/ProfileCustomizationUtils.tsx; dependencies: [8421, 1423, 673, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ColorUtilsModule from '../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as VideoBackgroundModule from '../../calls/native/VideoBackground.tsx'; /* Metro dependency 8421 */
function _fun66875(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8605:6, offset: 0x01c0d8f0, size: 124 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/profile_customization/native/ProfileCustomizationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/profile_customization/native/ProfileCustomizationUtils.tsx');
exports.useEditBannerSource = useEditBannerSource;
exports.useUserProfileBannerBackgroundColor = useUserProfileBannerBackgroundColor;
exports.getAvatarSource = getAvatarSource;
}
function useEditBannerSource({displayProfile, pendingBanner}) { // fn#66876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8605:214, offset: 0x01c0d96c, size: 254 bytes, params: 2, frame: 19
var r4;
var r0;
var value4;
var moduleValue;
let value = null;
if (value != pendingBanner) {
return (require(8421) /* metro dependency 8421: VideoBackground */).memoizedImageSource(pendingBanner);
}
if (value !== pendingBanner) {
r4 = value == displayProfile ? undefined : displayProfile.getPreviewBanner(pendingBanner, true, 600);
if (value != r4) {
value = require(1423) /* metro dependency 1423: AvatarUtils */;
value = value.makeSource(r4);
r0 = value;
} else {
r0 = value;
function useEditBannerSource({displayProfile, pendingBanner}) { // fn#66876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8605:214, offset: 0x01c0d96c, size: 254 bytes, params: 2, frame: 19
var r4;
var r0;
var value4;
var moduleValue;
let value = null;
if (value != pendingBanner) {
return (require(8421) /* metro dependency 8421: VideoBackground */).memoizedImageSource(pendingBanner);
}
} else {
if (value == displayProfile) {
value4 = undefined;
if (value != (value == displayProfile ? value4 : displayProfile.guildId)) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
value = moduleValue.makeSource(value == displayProfile ? value4 : displayProfile.getBannerURL({'size': 600,
'canAnimate': true}));
r0 = value;
} else {
r0 = value;
}
return r0;
}
if (displayProfile.isUsingGuildMemberBanner()) {
if (value !== pendingBanner) {
r4 = value == displayProfile ? undefined : displayProfile.getPreviewBanner(pendingBanner, true, 600);
if (value != r4) {
value = require(1423) /* metro dependency 1423: AvatarUtils */;
@@ -50,89 +29,113 @@ function useEditBannerSource({displayProfile, pendingBanner}) { // fn#66876, sou
} else {
r0 = value;
}
return r0;
}
value4 = undefined;
if (value != (value == displayProfile ? value4 : displayProfile.guildId)) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
value = moduleValue.makeSource(value == displayProfile ? value4 : displayProfile.getBannerURL({'size': 600,
'canAnimate': true}));
r0 = value;
} else {
r0 = value;
}
}
return r0;
}
function useUserProfileBannerBackgroundColor({user, guildId, pendingAvatarSrc, displayProfile}) { // fn#66877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8605:634, offset: 0x01c0da6a, size: 222 bytes, params: 2, frame: 19
var r0;
var r8;
var moduleValue;
var getUserAvatarURL;
var object2;
if (user == null) {
r8 = null;
} else {
if (pendingAvatarSrc == null) {
r0 = user.getAvatarURL(guildId, 80);
} else if (pendingAvatarSrc != null) {
r0 = pendingAvatarSrc;
} else {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
getUserAvatarURL = moduleValue.getUserAvatarURL;
object2 = {};
copyDataProperties(object2, user, undefined);
object2['avatar'] = null;
r0 = Reflect.apply(getUserAvatarURL, moduleValue, [object2]);
}
r8 = r0;
}
const value7 = (require(8421) /* metro dependency 8421: VideoBackground */).memoizedImageSource(r8);
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const rgb2int = colorUtilsModule.rgb2int;
const videoBackgroundModule = require(8421) /* metro dependency 8421: VideoBackground */;
const useDominantColorFromImage = videoBackgroundModule.useDominantColorFromImage;
return displayProfile?.primaryColor ?? Reflect.apply(rgb2int, colorUtilsModule,
[Reflect.apply(useDominantColorFromImage, videoBackgroundModule, [r8, value7])]);
}
function getAvatarSource(a0, a1, a2, a3) { // fn#66878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8605:1007, offset: 0x01c0db48, size: 180 bytes, params: 5, frame: 21
var r3;
var r1;
var r0;
var moduleValue;
var memoizedImageSource;
var getUserAvatarURL;
var object2;
let value = a2;
const value2 = null;
if (value2 == a0) {
r0 = value2;
} else {
if (value === undefined) {
value = require(8421) /* metro dependency 8421: VideoBackground */;
value = value.memoizedImageSource(a0.getAvatarURL(a1, 80, !a3));
r1 = value;
} else {
moduleValue = require(8421) /* metro dependency 8421: VideoBackground */;
memoizedImageSource = moduleValue.memoizedImageSource;
if (value2 != value) {
r3 = value;
if (value == displayProfile) {
value4 = undefined;
if (value != (value == displayProfile ? value4 : displayProfile.guildId)) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
value = moduleValue.makeSource(value == displayProfile ? value4 : displayProfile.getBannerURL({'size': 600,
'canAnimate': true}));
r0 = value;
} else {
r0 = value;
}
return r0;
}
if (displayProfile.isUsingGuildMemberBanner()) {
r4 = value == displayProfile ? undefined : displayProfile.getPreviewBanner(pendingBanner, true, 600);
if (value != r4) {
value = require(1423) /* metro dependency 1423: AvatarUtils */;
value = value.makeSource(r4);
r0 = value;
} else {
r0 = value;
}
return r0;
}
value4 = undefined;
if (value != (value == displayProfile ? value4 : displayProfile.guildId)) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
value = moduleValue.makeSource(value == displayProfile ? value4 : displayProfile.getBannerURL({'size': 600,
'canAnimate': true}));
r0 = value;
} else {
value = require(1423) /* metro dependency 1423: AvatarUtils */;
getUserAvatarURL = value.getUserAvatarURL;
object2 = {};
copyDataProperties(object2, a0, undefined);
object2['avatar'] = value2;
value = Reflect.apply(getUserAvatarURL, value, [object2]);
r3 = value;
r0 = value;
}
value = Reflect.apply(memoizedImageSource, moduleValue, [r3]);
r1 = value;
}
r0 = r1;
return r0;
}
return r0;
function useUserProfileBannerBackgroundColor({user, guildId, pendingAvatarSrc, displayProfile}) { // fn#66877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8605:634, offset: 0x01c0da6a, size: 222 bytes, params: 2, frame: 19
var r0;
var r8;
var moduleValue;
var getUserAvatarURL;
var object;
if (user == null) {
r8 = null;
} else {
if (pendingAvatarSrc == null) {
r0 = user.getAvatarURL(guildId, 80);
} else if (pendingAvatarSrc != null) {
r0 = pendingAvatarSrc;
} else {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
getUserAvatarURL = moduleValue.getUserAvatarURL;
object = {};
copyDataProperties(object, user, undefined);
object['avatar'] = null;
r0 = Reflect.apply(getUserAvatarURL, moduleValue, [object]);
}
r8 = r0;
}
const value7 = (VideoBackgroundModule).memoizedImageSource(r8);
const rgb2int = ColorUtilsModule.rgb2int;
const useDominantColorFromImage = VideoBackgroundModule.useDominantColorFromImage;
return displayProfile?.primaryColor ?? Reflect.apply(rgb2int, ColorUtilsModule,
[Reflect.apply(useDominantColorFromImage, VideoBackgroundModule, [r8, value7])]);
}
function getAvatarSource(a0, a1, a2, a3) { // fn#66878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8605:1007, offset: 0x01c0db48, size: 180 bytes, params: 5, frame: 21
var r3;
var r1;
var r0;
var moduleValue;
var memoizedImageSource;
var getUserAvatarURL;
var object;
let value = a2;
const value2 = null;
if (value2 == a0) {
r0 = value2;
} else {
if (value === undefined) {
value = require(8421) /* metro dependency 8421: VideoBackground */;
value = value.memoizedImageSource(a0.getAvatarURL(a1, 80, !a3));
r1 = value;
} else {
moduleValue = require(8421) /* metro dependency 8421: VideoBackground */;
memoizedImageSource = moduleValue.memoizedImageSource;
if (value2 != value) {
r3 = value;
} else {
value = require(1423) /* metro dependency 1423: AvatarUtils */;
getUserAvatarURL = value.getUserAvatarURL;
object = {};
copyDataProperties(object, a0, undefined);
object['avatar'] = value2;
value = Reflect.apply(getUserAvatarURL, value, [object]);
r3 = value;
}
value = Reflect.apply(memoizedImageSource, moduleValue, [r3]);
r1 = value;
}
r0 = r1;
}
return r0;
}
}
global.__d(_fun66875, 8420, [8421, 1423, 673, 2]) /* metro module 8420, dependencies: [8421, 1423, 673, 2] */;