/* 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] */
import SnowflakeUtils from '../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UserProfileCard from './UserProfileCard.tsx'; /* Metro dependency 6815 */
import UseBotProfileCommands from '../useBotProfileCommands.tsx'; /* Metro dependency 8767 */
import UserProfileAboutMeCardCommand from './UserProfileAboutMeCardCommand.tsx'; /* Metro dependency 8768 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as AppLauncherNativeConstantsModule from '../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ChatInputUtilsModule from '../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
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 */
import * as ConnectionsUtilsModule from '../../connections/ConnectionsUtils.tsx'; /* Metro dependency 5043 */
import * as ConstantsModule2 from './Constants.tsx'; /* Metro dependency 6816 */
import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */
import * as ClydeIconModule from '../../../design/components/Icon/native/redesign/generated/ClydeIcon.tsx'; /* Metro dependency 8765 */
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
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ConstantsModule2;
const env0_8 = value.DIVIDER_DOT;
const UserProfileThemeTypes = value.UserProfileThemeTypes;
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};
object = {};
const PREVIEW = UserProfileThemeTypes.PREVIEW;
object[PREVIEW] = {'headingVariant': 'text-xs/semibold', 'textVariant': 'text-sm/normal', 'headingSpacing': 4,
'rowGap': 12, 'columnGap': 3};
const env0_17 = (CreateStylesModule).createStyles({card: {flexDirection: 'column'},
textWithIcon: {'flexDirection': 'row', 'alignItems': 'center'}, memberJoinDates: {'flexDirection': 'row',
'flexWrap': 'wrap'}, slashCommands: {'flex': 1, 'flexDirection': 'row', 'flexWrap': 'wrap',
'marginBottom': 12}});
(FileImportTrackerModule).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 useToken = UseTokenModule.useToken;
const USER_PROFILE_ABOUT_ME_HEADING_TEXT_STYLE = (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 = (TextModule).Text;
return (
{children}
);
}
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 = (TextModule).Text;
return (
{icon}
{children}
);
}
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 object2;
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 {
object2 = {themeType: themeType};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2 = [
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZzAR2Y)}
,
];
value = importDefault(8763) /* metro dependency 8763: BioText */;
items2[1] = ((Component) => )(value);
value = (
{items2}
);
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 object3;
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 getCreatedAtDate = ConnectionsUtilsModule.getCreatedAtDate;
const defaultImport = 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 = (
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a6XYD9)}
);
const items2 = [styles.memberJoinDates];
items2[1] = {columnGap: columnGap};
const object4 = {themeType: themeType};
const ClydeIcon = (ClydeIconModule).ClydeIcon;
object4.icon = ;
object4.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9t7w53'],
{date: value6});
const textWithIcon = (
{value6}
);
let r9 = value4 != null && createdAtDate != null;
if (r9) {
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items4 = [
{DIVIDER_DOT}
,
];
object3 = {themeType: themeType};
value = importDefault(6819) /* metro dependency 6819: GuildIcon */;
object3.icon = ((Component) => )(value);
object3.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FdLNDK,
{guildName: value4.name, date: createdAtDate});
items4[1] = (
{createdAtDate}
);
value = (
<>
{items4}
>
);
r9 = value;
}
return (
{heading}
{textWithIcon}
{r9}
);
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 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 = (UseAnalyticsLocations)().analyticsLocations;
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const context = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule, []).context;
const {commands, application} = (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 = [
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0hKkS+'])}
,
];
items2[1] = (
{commands.map(_fun68573)}
);
r6 = application != null && application.bot != null;
r6 = r6 && ((Button) => )((require(4578) /* metro dependency 4578: ButtonNative */).Button);
items2[2] = r6;
r0 = (
{items2}
);
}
return r0;
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 _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 object;
const bestActiveInput = (ChatInputUtilsModule).getBestActiveInput();
if (bestActiveInput != null) {
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
object = {};
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
value = environment.__proto__;
object.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
application: application, onPressBack: onPressBack};
Reflect.apply(openCustomKeyboard, bestActiveInput, [object]);
}
function onPressBack() { // 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 object = {};
copyDataProperties(object, context, undefined);
object['userId'] = id;
object['channelId'] = channel.id;
object['sourceAnalyticsLocations'] = analyticsLocations;
value(object);
}
}
}
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) => )(UserProfileAboutMeCardCommand);
}
}
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 items3 = [styles.card];
items3[1] = {rowGap: rowGap};
items3[2] = style;
const items2 = [
,
];
items2[1] = (
);
items2[2] = application?.popularApplicationCommandIds != null && channel != null && ;
return (
{items2}
);
}
}
global.__d(_fun68561, 8762, [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]) /* metro module 8762, 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] */;