Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,106 @@
/* Metro module 14435; source: modules/home_drawer/native/HomeDrawerDM.tsx; dependencies: [31, 27, 1383, 3793, 4864, 1878, 482, 33, 566, 4805, 14436, 13775, 14429, 10629, 4573, 10975, 3834, 14407, 4013, 4010, 2] */
function _fun109246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:6, offset: 0x02342f5a, size: 275 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 */).View;
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).isMultiUserDM;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(482) /* metro dependency 482: Constants */).NOOP;
const value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerDM.tsx');
exports.default = HomeDrawerDMExpandedChildrenWrapper;
}
function HomeDrawerDMExpandedChildren({channel}) { // fn#109247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:217, offset: 0x0234306d, size: 379 bytes, params: 2, frame: 21
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, RelationshipStore],
_fun109249);
const useChannelUnreadBadgeStateModule = require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */;
const useBaseChannelUnreadBadgeState = useChannelUnreadBadgeStateModule.useBaseChannelUnreadBadgeState;
const value3 = (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel,
{unread: Reflect.apply(useBaseChannelUnreadBadgeState, useChannelUnreadBadgeStateModule, [channel,
false]).unread});
const env0_3 = value3;
const value4 = env0_3.useMemo(_fun109251,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], function() {
var channelBinding = channel;
return UserGuildSettingsStore.getChannelMuteConfig(channelBinding.guild_id, channelBinding.id);
})]);
const value5 = env0_3.useMemo(_fun109252, [value2, value4]);
const value6 = env0_3.useMemo(_fun109253, [channel, value3, value4]);
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
return <HomeDrawerSharedItem title={value5} subtitle={value6} />;
}
function HomeDrawerDMExpandedChildrenWrapper({channel}) { // fn#109254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:1398, offset: 0x0234342f, size: 126 bytes, params: 2, frame: 17
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'dm-expanded-children'}]).enableHome ? (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList ? null : <HomeDrawerDMExpandedChildren channel={channel} /> : null;
}
function _fun109249() { // fn#109249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:378, offset: 0x0234320d, size: 107 bytes, params: 1, frame: 18
var r1;
var r0;
var value3;
var moduleValue;
const channelBinding = channel;
const value2 = null;
if (value2 == channelBinding) {
r0 = value2;
} else {
value3 = environment.__proto__;
if (isMultiUserDM(channel.type)) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r1 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
} else if (value2 != user) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r1 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
} else {
r1 = value2;
}
r0 = r1;
}
return r0;
}
function _fun109252() { // fn#109252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:774, offset: 0x0234329e, size: 257 bytes, params: 1, frame: 19
const r7 = env0_5 == null ? NOOP : env0_5.isMuted ? env0_5 == null ? (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : env0_5.isTemporary ? (require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon : (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={{'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}}>
<Text variant="text-md/medium" color="text-default">
{env0_2}
</Text>
{((Component) => <Component size="xs" />)(r7)}
</View>
);
}
function _fun109253() { // fn#109253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:1065, offset: 0x0234339f, size: 144 bytes, params: 1, frame: 18
const value2 = null;
if (value2 == env0_3) {
return value2;
} else {
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
return (
<ChannelRowPreview
channel={channel}
message={env0_3}
variant="text-xs/medium"
color="text-strong"
layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COZY}
muted={env0_5.isMuted}
/>
);
}
}
@@ -0,0 +1,42 @@
/* Metro module 14411; source: modules/home_drawer/native/HomeDrawerDirectMessagesRow.tsx; dependencies: [31, 12600, 33, 566, 4573, 1244, 14407, 4013, 4010, 2] */
function _fun109085(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:6, offset: 0x0233caa9, 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 privateChannelReadStateStore = importDefault(12600) /* metro dependency 12600: PrivateChannelReadStateStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerDirectMessagesRow.tsx');
exports.default = HomeDrawerDMsRowWrapper;
}
function HomeDrawerDMsRow() { // fn#109086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:128, offset: 0x0233cb4e, size: 319 bytes, params: 1, frame: 22
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const length = (require(566) /* metro dependency 566: flux */).useStateFromStores([PrivateChannelReadStateStore],
function() {
return PrivateChannelReadStateStore.getUnreadPrivateChannelIds().length;
});
const r4 = length > 0 ? <Text variant="text-xs/medium" color="text-default" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.WCMsy8,
{numPeople: length})}</Text> : null;
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
const string = intl.string;
const YUU0RF = (require(1244) /* metro dependency 1244: indexNative */).t.YUU0RF;
return (
<HomeDrawerSharedItem
title={<Text variant="text-md/medium" color="text-default">{Reflect.apply(string, intl, [YUU0RF])}</Text>}
subtitle={r4}
/>
);
}
function HomeDrawerDMsRowWrapper() { // fn#109088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:657, offset: 0x0233cca5, size: 114 bytes, params: 1, frame: 16
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const enableHome = Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'dm-expanded-children'}]).enableHome;
const isChatBesideChannelList = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
const value2 = null;
return enableHome ? isChatBesideChannelList ? value2 : <HomeDrawerDMsRow /> : value2;
}
@@ -0,0 +1,12 @@
/* Metro module 4013; source: modules/home_drawer/native/HomeDrawerExperiment.tsx; dependencies: [1358, 2] */
function _fun33056(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4171:6, offset: 0x01026a9d, size: 174 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
value = value({'name': '2025-10-mobile-home-drawer', 'kind': 'user', defaultConfig: {'enableHome': false,
'landOnHome': false, 'enablePeekHint': false}, variations: {[1]: {'enableHome': true, 'landOnHome': false,
'enablePeekHint': true}, [2]: {'enableHome': true, 'landOnHome': true, 'enablePeekHint': false}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerExperiment.tsx');
exports.MobileHomeDrawerExperiment = value;
}
@@ -0,0 +1,23 @@
/* Metro module 14414; source: modules/home_drawer/native/HomeDrawerFavoritesRow.tsx; dependencies: [31, 33, 14407, 4573, 1244, 2] */
function _fun109097(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14611:6, offset: 0x0233d2c0, 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/home_drawer/native/HomeDrawerFavoritesRow.tsx');
exports.HomeDrawerFavoritesRowExpandedChildren = HomeDrawerFavoritesRowExpandedChildren;
}
function HomeDrawerFavoritesRowExpandedChildren() { // fn#109098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14611:246, offset: 0x0233d343, size: 144 bytes, params: 1, frame: 20
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HomeDrawerSharedItem
title={<Text variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wMWyci)}</Text>}
subtitle={null}
/>
);
}
@@ -0,0 +1,104 @@
/* Metro module 14406; source: modules/home_drawer/native/HomeDrawerFolderRow.tsx; dependencies: [31, 27, 5214, 4896, 661, 33, 566, 10629, 4573, 1244, 14407, 4013, 4010, 2] */
function _fun109057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:6, offset: 0x0233bbf4, size: 237 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 */).View;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NOOP;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerFolderRow.tsx');
exports.default = HomeDrawerFolderExpandedChildren;
}
function Wrapper_109058({folder}) { // fn#109058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:183, offset: 0x0233bce1, size: 421 bytes, params: 2, frame: 22
const value2 = env0_3.useMemo(function() {
return {isMuted: false};
}, []);
const length = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return folder.guildIds.filter(_fun109061).length;
});
const length2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return folder.guildIds.filter(_fun109063).length;
});
const value3 = env0_3.useMemo(_fun109064, [folder.folderName, value2]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value7 = env0_3.useMemo(_fun109065,
[length > 0 ? 'Mentioned in ' + length + ' servers' : length2 > 0 ? 'Unread messages in ' + length2 + ' servers' : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.knOfkb,
{num: folder.guildIds.length})]);
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
return <HomeDrawerSharedItem title={value3} subtitle={value7} />;
}
function HomeDrawerFolderExpandedChildren({folderId}) { // fn#109066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:1157, offset: 0x0233c048, size: 187 bytes, params: 2, frame: 18
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], _fun109067);
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return value2 == null ? null : Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'folder-expanded-children'}]).enableHome ? (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList ? null : <Wrapper_109058 folder={value2} /> : null;
}
function _fun109060() { // fn#109060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:287, offset: 0x0233be86, size: 39 bytes, params: 1, frame: 11
const guildIds = folder.guildIds;
return guildIds.filter(_fun109061).length;
}
function _fun109062() { // fn#109062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:381, offset: 0x0233beca, size: 39 bytes, params: 1, frame: 11
const guildIds = folder.guildIds;
return guildIds.filter(function(a0) {
return GuildReadStateStore.hasUnread(a0);
}).length;
}
function _fun109064() { // fn#109064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:446, offset: 0x0233bf08, size: 253 bytes, params: 1, frame: 23
var r8;
var intl;
const value3 = ((Component) => <Component size="xs" />)(env0_1.isMuted ? (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const folderName = folder.folderName;
if (folderName != null) {
r8 = folderName;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JQ/1n3']);
}
return (
<View style={{'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}}>
{value3}
<Text variant="text-md/medium" color="text-default">
{r8}
</Text>
</View>
);
}
function _fun109065() { // fn#109065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:906, offset: 0x0233c005, size: 67 bytes, params: 1, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-xs/medium"
color="text-muted"
lineClamp={1}
>
{env0_2}
</Text>
);
}
function _fun109067() { // fn#109067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:1251, offset: 0x0233c103, size: 40 bytes, params: 1, frame: 12
const folderIdBinding = folderId;
const value2 = null;
return value2 != folderIdBinding ? SortedGuildStore.getGuildFolderById(folderId) : value2;
}
function _fun109061(a0) { // fn#109061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:310, offset: 0x0233bead, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return GuildReadStateStore.getMentionCount(a0) > 0;
}
@@ -0,0 +1,235 @@
/* Metro module 14428; source: modules/home_drawer/native/HomeDrawerGuildRow.tsx; dependencies: [31, 27, 1379, 1935, 5214, 1867, 4605, 4864, 4865, 482, 33, 4501, 566, 4013, 4010, 14429, 10629, 4573, 6915, 1305, 14431, 14432, 11566, 1244, 14407, 2] */
function _fun109194(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:6, offset: 0x02341019, size: 380 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 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_11 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_12 = (require(482) /* metro dependency 482: Constants */).NOOP;
const value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
const env0_15 = value.Fragment;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({guildName: {'flexDirection': 'row',
'alignItems': 'center', 'gap': 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerGuildRow.tsx');
exports.default = HomeDrawerGuildRow;
}
function GuildRowWrapper({guild, disableSubtitle}) { // fn#109195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:346, offset: 0x02341195, size: 877 bytes, params: 2, frame: 34
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.hasUnread(guild.id);
});
const env0_3 = value2;
const value3 = env0_3.useMemo(_fun109198,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], function() {
return UserGuildSettingsStore.getMuteConfig(guild.id);
})]);
const value4 = env0_3.useMemo(_fun109199, [guild, value3, styles.guildName]);
const {unreadChannelName,
unreadChannelCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildChannelStore,
ReadStateStore, UserGuildSettingsStore, ChannelStore], _fun109200, [guild.id]);
const {mentionChannelName,
mentionChannelCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildReadStateStore,
ChannelStore], _fun109202, [guild.id]);
const {voiceUsers, streamingUser,
streamingChannelId} = (require(14431) /* metro dependency 14431: HomeDrawerGuildVoiceState */).useVoiceUsers(guild);
const {typingChannelId, typingChannelName,
typingUserIds} = (require(14432) /* metro dependency 14432: useHomeDrawerGuildTyping */).useHomeDrawerGuildTyping(guild.id);
const value9 = (importDefault(11566) /* metro dependency 11566: useTypingText */)({channelId: typingChannelId,
guildId: guild.id, typingUserIds: typingUserIds});
let r2 = value3.isMuted || disableSubtitle;
r2 = !r2 ? voiceUsers.length === 0 : r2;
const value11 = !r2;
const value12 = env0_3.useMemo(_fun109204, [disableSubtitle, value3.isMuted, value2, unreadChannelName,
unreadChannelCount, mentionChannelName, mentionChannelCount, typingChannelId, typingChannelName, value9]);
const value13 = env0_3.useMemo(_fun109207, [value11, voiceUsers]);
const value14 = env0_3.useMemo(_fun109209, [value11, streamingUser]);
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
return (
<HomeDrawerSharedItem
title={value4}
subtitle={r2 ? value12 : streamingUser == null ? value13 : value14}
right={value3.isMuted || disableSubtitle || voiceUsers.length === 0 ? null : ((GuildVoiceState) => <GuildVoiceState voiceUsers={voiceUsers} streamingChannelId={streamingChannelId} streamingUser={streamingUser} guildId={guild.id} />)((require(14431) /* metro dependency 14431: HomeDrawerGuildVoiceState */).GuildVoiceState)}
/>
);
}
function HomeDrawerGuildRow({guildId, disableSubtitle}) { // fn#109210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:3646, offset: 0x02341cf1, size: 196 bytes, params: 2, frame: 19
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return guild == null ? null : Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'guild-row'}]).enableHome ? (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList ? null : <GuildRowWrapper guild={guild} disableSubtitle={disableSubtitle} /> : null;
}
function _fun109199() { // fn#109199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:691, offset: 0x023415d0, size: 308 bytes, params: 1, frame: 23
const items2 = [((Component) => <Component size="xs" />)(env0_5.isMuted ? env0_5.isTemporary ? (require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon : (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const guildBinding = guild;
items2[1] = <Text variant="text-md/medium" style={{flexShrink: 1}} lineClamp={1} color="text-default">{guildBinding.name}</Text>;
const GuildBadgeV2 = importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
items2[2] = <GuildBadgeV2 guild={guildBinding} size={REFRESH_SMALL_16} />;
return (
<View style={styles.guildName}>
{items2}
</View>
);
}
function _fun109200() { // fn#109200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1076, offset: 0x02341704, size: 121 bytes, params: 1, frame: 15
var environment;
var r2;
let value = environment.__proto__;
const getSelectableChannelIds = GuildChannelStore.getSelectableChannelIds;
const value4 = Reflect.apply(getSelectableChannelIds, GuildChannelStore, [guild.id]).filter(_fun109201);
const length = value4.length;
const value5 = undefined;
if (length > 0) {
value = ChannelStore.getChannel(value4[0]);
r2 = value == null ? value5 : value.name;
} else {
r2 = value5;
}
return {unreadChannelName: r2, unreadChannelCount: value4.length};
}
function _fun109202() { // fn#109202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1453, offset: 0x023417cf, size: 174 bytes, params: 1, frame: 16
var environment;
var r2;
var object2;
let value = environment.__proto__;
const property = GuildReadStateStore.getMutableGuildStates()[guild.id];
if (property == null) {
object2 = {mentionChannelName: undefined, mentionChannelCount: 0};
} else {
var Object = global.Object;
var value5 = Object.keys(property.mentionCounts).filter(_fun109203);
object2 = {};
var length = value5.length;
var value6 = undefined;
if (length > 0) {
value = ChannelStore.getChannel(value5[0]);
r2 = value == null ? value6 : value.name;
} else {
r2 = value6;
}
object2.mentionChannelName = r2;
length = value5.length;
object2.mentionChannelCount = length;
}
return object2;
}
function _fun109204() { // fn#109204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2100, offset: 0x0234189e, size: 633 bytes, params: 1, frame: 27
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const disableSubtitleBinding = disableSubtitle;
const value2 = null;
return disableSubtitleBinding ? value2 : value2 == mentionChannelName ? value2 == typingChannelId || value2 == env0_14 || env0_5.isMuted ? env0_3 && value2 != unreadChannelName && unreadChannelCount > 0 ? <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OqlmU6,
{channelName: unreadChannelName, channelHook: channelHook_109206,
count: unreadChannelCount - 1})}</Text> : value2 : <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{value2 != typingChannelName ? <><Text variant="text-xs/semibold">{'#' + typingChannelName}</Text>{' · '}</> : value2}{env0_14}</Text> : mentionChannelCount > 0 ? <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.L9YdGH,
{channelName: mentionChannelName, channelHook: channelHook_109205,
count: mentionChannelCount - 1})}</Text> : value2 == typingChannelId || value2 == env0_14 || env0_5.isMuted ? env0_3 && value2 != unreadChannelName && unreadChannelCount > 0 ? <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OqlmU6,
{channelName: unreadChannelName, channelHook: channelHook_109206,
count: unreadChannelCount - 1})}</Text> : value2 : <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{value2 != typingChannelName ? <><Text variant="text-xs/semibold">{'#' + typingChannelName}</Text>{' · '}</> : value2}{env0_14}</Text>;
}
function _fun109207() { // fn#109207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2866, offset: 0x02341b6a, size: 220 bytes, params: 1, frame: 24
var environment;
var r0;
var value3;
var Text;
var intl;
var format;
var r1Vkoc;
var object;
var voiceUsersBinding;
var Math;
var value;
if (env0_15) {
value3 = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
r1Vkoc = (require(1244) /* metro dependency 1244: indexNative */).t.r1Vkoc;
object = {};
voiceUsersBinding = voiceUsers;
value = voiceUsersBinding.slice(0, 2);
value = value.map(function(a0) {
return a0.username;
});
object.users = value.join(', ');
Math = global.Math;
object.overflowCount = Math.max(voiceUsersBinding.length - 2, 0);
value = <Text variant="text-xs/medium" color="text-feedback-positive" lineClamp={1}>{Reflect.apply(format, intl,
[r1Vkoc, object])}</Text>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun109209() { // fn#109209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:3124, offset: 0x02341c46, size: 171 bytes, params: 1, frame: 22
var username;
var r0;
var value3;
var value4;
var Text;
var intl;
var format;
var k5IKep;
var value;
const value2 = null;
if (env0_15) {
value3 = environment.__proto__;
value4 = undefined;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
k5IKep = (require(1244) /* metro dependency 1244: indexNative */).t.k5IKep;
username = value2 == streamingUser ? value4 : streamingUser.username;
value = '';
value = <Text variant="text-xs/medium" color="text-feedback-positive" lineClamp={1}>{Reflect.apply(format, intl,
[k5IKep, {username: value2 != username ? username : value}])}</Text>;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun109201(a0) { // fn#109201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1129, offset: 0x0234177d, size: 82 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
const basicChannel = ChannelStore.getBasicChannel(a0);
return basicChannel != null && (ReadStateStore.hasUnread(a0) && UserGuildSettingsStore.resolveUnreadSetting(basicChannel) === UnreadSetting.ALL_MESSAGES);
}
function _fun109203(a0) { // fn#109203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1608, offset: 0x0234187d, size: 33 bytes, params: 2, frame: 2
return env0_0.mentionCounts[a0].count > 0;
}
function channelHook_109205(a0) { // fn#109205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2273, offset: 0x02341b17, size: 83 bytes, params: 2, frame: 16
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/semibold">
{'#' + a0}
</Text>
);
}
@@ -0,0 +1,189 @@
/* Metro module 14431; source: modules/home_drawer/native/HomeDrawerGuildVoiceState.tsx; dependencies: [31, 27, 1935, 3793, 4300, 661, 33, 4501, 697, 10251, 1305, 477, 4573, 1244, 10271, 5475, 566, 22, 14420, 2] */
function _fun109215(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:6, offset: 0x02341e85, size: 560 bytes, params: 8, frame: 25
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
const env0_3 = importAll(dependencyMap[value]);
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_6 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_10 = value2.jsx;
const env0_11 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
const object6 = {'width': 72, 'height': 44, 'borderRadius': null, 'overflow': 'hidden'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [{voiceContainer: {'paddingRight': 8, 'height': 40,
'gap': 4, 'justifyContent': 'center'}, streamPreview: object6}]);
const value4 = createStylesModule;
createStyles = value4.createStyles;
object5 = {};
const object7 = {'paddingHorizontal': 5, 'paddingVertical': 1, 'borderBottomRightRadius': null,
'overflow': 'hidden', 'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null,
'position': 'absolute', 'top': 0, 'left': 0};
object7.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object7.backgroundColor = RED_400;
object5.tag = object7;
const object8 = {textAlign: 'center'};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object8.color = WHITE;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object8.marginTop = platformUtilsModule.isAndroid() ? -2 : value;
object5.tagText = object8;
const env0_13 = Reflect.apply(createStyles, value4, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerGuildVoiceState.tsx');
exports.GuildVoiceState = GuildVoiceState;
exports.useVoiceUsers = useVoiceUsers;
}
function VoiceUsers({voiceUsers, guildId}) { // fn#109216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:417, offset: 0x023420b5, size: 227 bytes, params: 2, frame: 23
const r10 = voiceUsers.length > 3 ? voiceUsers.slice(0, 3) : voiceUsers;
return voiceUsers.length === 0 ? null : <View style={{'flexDirection': 'row', 'alignItems': 'center',
'gap': 4}}>{((AvatarPile) => <AvatarPile size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} names={r10.map(function(a0) {
return a0.username;
})} totalCount={voiceUsers.length}>{r10.map(_fun109218)}</AvatarPile>)((require(10251) /* metro dependency 10251: AvatarPileNative */).AvatarPile)}</View>;
}
function LiveTag_109219() { // fn#109219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1165, offset: 0x023421fd, size: 166 bytes, params: 1, frame: 21
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.tag}>
<Text
variant="text-xs/bold"
style={styles.tagText}
lineClamp={1}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI3q4h).toUpperCase()}
</Text>
</View>
);
}
function GuildVoiceState({voiceUsers, streamingChannelId, streamingUser, guildId}) { // fn#109220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1471, offset: 0x023422a3, size: 323 bytes, params: 2, frame: 27
var r5;
var r0;
var object;
var object2;
var streamPreview;
var FastImage;
const styles = useStyles();
const value3 = voiceUsers.length > 0;
const previewUrl = (importDefault(10271) /* metro dependency 10271: useFetchStreamPreview */)(guildId,
streamingChannelId ?? undefined, streamingUser?.id).previewUrl;
if (value3) {
var viewProps = {style: [styles.voiceContainer, {height: streamingUser != null ? 48 : 32}]};
if (previewUrl == null) {
r5 = <VoiceUsers voiceUsers={voiceUsers} guildId={guildId} />;
} else {
object2 = {};
streamPreview = styles.streamPreview;
object2.style = streamPreview;
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
streamPreview = styles.streamPreview;
r5 = <View {...object2}><FastImage style={streamPreview} source={{uri: previewUrl}} /><LiveTag_109219 /></View>;
}
r0 = <View {...viewProps}>{r5}</View>;
} else {
r0 = null;
}
return r0;
}
function useVoiceUsers(a0) { // fn#109221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1891, offset: 0x023423e6, size: 302 bytes, params: 2, frame: 23
const env0_0 = a0;
const id = a0.id;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore],
_fun109222, [id]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
function() {
return SortedVoiceStateStore.getVoiceStates(id);
}, [id]);
const env0_3 = value3;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
function() {
return RelationshipStore.getBlockedOrIgnoredIDs();
});
const binding = env0_3;
const value = binding.useMemo(_fun109227, [value2, value3, a0.afkChannelId, value4]);
const value5 = binding.useMemo(_fun109230, [value3, a0.afkChannelId, value2]);
return {voiceUsers: value, streamingUser: value5.streamingUser, streamingChannelId: value5.streamingChannelId};
}
function _fun109218(a0) { // fn#109218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:708, offset: 0x02342198, size: 101 bytes, params: 2, frame: 18
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
return (
<Avatar
size={XSMALL}
user={a0}
guildId={guildId}
animate={false}
key={a0.id}
/>
);
}
function _fun109222() { // fn#109222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1968, offset: 0x02342514, size: 71 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const getChannels = GuildChannelStore.getChannels;
return Reflect.apply(getChannels, GuildChannelStore, [id])[GUILD_VOCAL_CHANNELS_KEY].filter(function(a0) {
return a0.channel.type === ChannelTypes.GUILD_VOICE;
}).map(function(a0) {
return a0.channel.id;
});
}
function _fun109227() { // fn#109227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2224, offset: 0x023425a9, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.flatMap(env0_2, _fun109228);
}
function _fun109230() { // fn#109230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2431, offset: 0x0234264a, size: 76 bytes, params: 1, frame: 12
const env0_0 = null;
const env0_1 = null;
const Object = global.Object;
Object.keys(env0_3).forEach(_fun109231);
return {streamingUser: env0_0, streamingChannelId: env0_1};
}
function _fun109228(a0) { // fn#109228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2248, offset: 0x023425e0, size: 106 bytes, params: 2, frame: 14
if (a0 === env1_0.afkChannelId) {
return [];
}
return (require(14420) /* metro dependency 14420: BlockedUserUtils */).filterOutBlockedOrIgnoredUsers((env1_3[a0] ?? []).map(function(a0) {
return a0.user;
}), env1_4);
}
function _fun109231(a0) { // fn#109231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2485, offset: 0x02342696, size: 116 bytes, params: 2, frame: 13
var environment;
var binding;
var user;
let value = environment.__proto__;
if (a0 !== env1_0.afkChannelId) {
binding = env1_2;
if (binding.includes(a0)) {
value = (env1_3[a0] ?? []).find(function(a0) {
return a0.voiceState.selfStream;
});
if (value != null && env0_0 == null) {
user = value.user;
env0_1 = a0;
}
}
}
}
@@ -0,0 +1,30 @@
/* Metro module 14407; source: modules/home_drawer/native/HomeDrawerShared.tsx; dependencies: [31, 27, 33, 4501, 2] */
function _fun109068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14604:6, offset: 0x0233c12b, size: 234 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_1 = value.jsxs;
const env0_2 = value.jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'gap': 12},
titleContainer: {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'center'},
rightContainer: {overflow: 'hidden'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerShared.tsx');
exports.HomeDrawerSharedItem = HomeDrawerSharedItem;
}
function HomeDrawerSharedItem({title, subtitle, right}) { // fn#109069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14604:479, offset: 0x0233c215, size: 148 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={styles.container}>
<View style={styles.titleContainer}>
{title}
{subtitle}
</View>
{right != null ? <View style={styles.rightContainer}>{right}</View> : null}
</View>
);
}
@@ -0,0 +1,60 @@
/* Metro module 14375; source: modules/home_drawer/native/HomeDrawerStore.tsx; dependencies: [661, 685, 4017, 3769, 2] */
function _fun108792(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:6, offset: 0x0232ea81, size: 159 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 */).DM_WIDTH;
let value = require(685) /* metro dependency 685 */;
value = value.createWithEqualityFn(_fun108793, (require(3769) /* metro dependency 3769 */).shallow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerStore.tsx');
exports.default = value;
}
function _fun108793(a0, a1) { // fn#108793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:147, offset: 0x0232eb20, size: 181 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const object2 = {};
object2.panelX = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(0);
object2.gestureState = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable({'active': false,
'initialX': 0, 'initialY': 0, 'panelX': 0});
object2.maxX = 0;
object2.lastInteractionAt = {current: 0};
object2.isPanelTouchActive = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(false);
object2.setPanelX = setPanelX;
object2.updateMaxX = updateMaxX;
object2.noteInteraction = function() {
var lastInteractionAt = require().lastInteractionAt;
var Date = global.Date;
lastInteractionAt.current = Date.now();
};
return object2;
}
function setPanelX(a0) { // fn#108794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:343, offset: 0x0232ebd5, size: 107 bytes, params: 2, frame: 15
var set;
let value = require();
const panelX = value.panelX;
const gestureState = value.gestureState;
const maxX = value.maxX;
value = 'open';
if (value === a0) {
panelX.set(maxX);
set = value;
} else {
panelX.set(0);
}
const set2 = gestureState.set;
const object2 = {};
const get = gestureState.get;
copyDataProperties(object2, Reflect.apply(get, gestureState, []), set);
object2['active'] = false;
Reflect.apply(set2, gestureState, [object2]);
}
function updateMaxX({width}, {left, right}) { // fn#108795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:463, offset: 0x0232ec40, size: 74 bytes, params: 3, frame: 12
let value = width - left;
value -= right;
value = value - DM_WIDTH - 8;
env0_0({maxX: value + 8});
}
@@ -0,0 +1,42 @@
/* Metro module 14376; source: modules/home_drawer/native/HomeDrawerSubtitleStore.tsx; dependencies: [629, 2] */
function _fun108797(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:6, offset: 0x0232ecb6, size: 115 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
value = value.create(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return {currentType: 'voice', startTimer: _fun108799, stopTimer: _fun108801};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerSubtitleStore.tsx');
exports.default = value;
}
function _fun108798(a0, a1) { // fn#108798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:121, offset: 0x0232ed29, size: 53 bytes, params: 3, frame: 3
const env0_0 = a0;
const env0_1 = a1;
return {currentType: 'voice', startTimer: startTimer, stopTimer: stopTimer};
}
function startTimer() { // fn#108799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:161, offset: 0x0232ed5e, size: 69 bytes, params: 1, frame: 14
if (env1_0 != null) {
global.clearInterval(env1_0);
}
env1_0 = global.setInterval(_fun108800, 3500);
}
function stopTimer() { // fn#108801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:301, offset: 0x0232edd4, size: 63 bytes, params: 1, frame: 13
if (env1_0 != null) {
global.clearInterval(env1_0);
}
env0_0({currentType: 'voice'});
}
function _fun108800() { // fn#108800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:207, offset: 0x0232eda3, size: 49 bytes, params: 1, frame: 13
let value = environment.__proto__;
const currentType = require().currentType;
const binding = env1_0;
value = 'voice';
binding({currentType: value !== currentType ? value : 'activity'});
}
@@ -0,0 +1,70 @@
/* Metro module 14378; source: modules/home_drawer/native/useDrawerState.tsx; dependencies: [57, 31, 1485, 4007, 2] */
function _fun108817(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:6, offset: 0x0232f7ba, size: 133 bytes, params: 8, frame: 18
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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useDrawerState.tsx');
exports.useDrawerOpen = useDrawerOpen;
}
function useDrawerOpen() { // fn#108818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:214, offset: 0x0232f83f, size: 142 bytes, params: 1, frame: 18
let value = a0;
const r5 = !(value !== undefined) || value;
let env0_2 = undefined;
const value2 = (require(1485) /* metro dependency 1485 */).useNavigation();
const binding = env0_3;
value = env0_2(binding.useState(_fun108819), 2);
const property = value[0];
env0_2 = value[1];
binding.useEffect(_fun108820, [value2, r5]);
return property;
}
function _fun108819() { // fn#108819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:287, offset: 0x0232f8cd, size: 158 bytes, params: 1, frame: 17
var value2;
var value3;
var moduleValue;
var value;
if (env0_0) {
value = env0_1.getState();
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = moduleValue.coerceGuildsRoute(value == null || value.routes == null ? value3 : value.routes[(value == null ? value3 : value.index) ?? 0]);
return (value == null || value.params == null ? value3 : value.params.drawerOpen) === true;
}
return false;
}
function _fun108820() { // fn#108820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:547, offset: 0x0232f96b, size: 56 bytes, params: 1, frame: 14
if (env0_0) {
env0_1.addListener('state', handleStateChange_108821);
return _fun108822;
}
}
function handleStateChange_108821({data}) { // fn#108821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:655, offset: 0x0232f9a3, size: 150 bytes, params: 2, frame: 17
var drawerOpen;
var params;
var value4;
const state = data.state;
let value = environment.__proto__.__proto__;
value = undefined;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const value3 = navigationRouteUtilsNativeModule.coerceGuildsRoute(state == null || state.routes == null ? value : state.routes[(state == null ? value : state.index) ?? 0]);
if (value3 != null) {
params = value3.params;
drawerOpen = params == null ? value : params.drawerOpen;
value4 = environment.__proto__;
env1_2(drawerOpen === true);
}
return value;
}
function _fun108822() { // fn#108822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:605, offset: 0x0232fa39, size: 34 bytes, params: 1, frame: 13
const binding = env1_1;
binding.removeListener('state', handleStateChange_108821);
}
@@ -0,0 +1,560 @@
/* Metro module 14374; source: modules/home_drawer/native/useHomeDrawerGesture.tsx; dependencies: [57, 31, 14375, 14376, 4013, 4017, 1485, 4081, 1478, 1585, 4010, 14377, 4007, 4577, 5321, 8142, 2] */
function _fun108770(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:6, offset: 0x0232d55b, size: 599 bytes, params: 8, frame: 24
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 homeDrawerStore = importDefault(14375) /* metro dependency 14375: HomeDrawerStore */;
const homeDrawerSubtitleStore = importDefault(14376) /* metro dependency 14376: HomeDrawerSubtitleStore */;
const env0_7 = {'mass': 0.3, 'damping': 30, 'stiffness': 400};
const env0_9 = {code: 'function useHomeDrawerGestureTsx1(){const{dragOffsetX,INITIAL_OPEN_WIDTH}=this.__closure;return dragOffsetX.get()>=INITIAL_OPEN_WIDTH;}'};
const env0_10 = {code: 'function useHomeDrawerGestureTsx2(isOpen,wasOpen){const{gestureState,runOnJS,triggerHapticFeedback,HapticFeedbackTypes}=this.__closure;if(!gestureState.get().active||wasOpen===null){return;}if(isOpen===wasOpen){return;}if(isOpen){runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}else{runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.SOFT);}}'};
const env0_11 = {code: 'function useHomeDrawerGestureTsx3(){const{panelX,peekX}=this.__closure;return panelX.get()+peekX.get();}'};
const env0_12 = {code: "function useHomeDrawerGestureTsx4(){const{withSpring,panelX,gestureState,HOME_GESTURE_DRAG_PHYSICS,HOME_DRAWER_FLING_PHYSICS}=this.__closure;return withSpring(panelX.get(),gestureState.get().active?HOME_GESTURE_DRAG_PHYSICS:HOME_DRAWER_FLING_PHYSICS,'animate-always');}"};
const env0_13 = {code: 'function useHomeDrawerGestureTsx5(){const{panelGestureSpringX,peekX}=this.__closure;return panelGestureSpringX.get()+peekX.get();}'};
const env0_14 = {code: 'function useHomeDrawerGestureTsx6(){const{safeAreaInsets,panelSpringTranslateX}=this.__closure;return{flex:1,marginTop:safeAreaInsets.top,transform:[{translateX:panelSpringTranslateX.get()}]};}'};
const env0_15 = {code: 'function useHomeDrawerGestureTsx7(){const{drawerRevealX,MAX_HOME_DRAWER_ANIMATING_WIDTH,GUILD_DESCRIPTION_ANIMATION_DISTANCE,MIN_HOME_DRAWER_TEXT_OPACITY,MIN_HOME_DRAWER_OPEN_WIDTH,withSpring,HOME_DRAWER_FLING_PHYSICS,clamp}=this.__closure;let x=0;if(drawerRevealX.get()<MAX_HOME_DRAWER_ANIMATING_WIDTH){x=Math.min(GUILD_DESCRIPTION_ANIMATION_DISTANCE,drawerRevealX.get()/MAX_HOME_DRAWER_ANIMATING_WIDTH*GUILD_DESCRIPTION_ANIMATION_DISTANCE);}const opacity=MIN_HOME_DRAWER_TEXT_OPACITY+drawerRevealX.get()/MIN_HOME_DRAWER_OPEN_WIDTH*(1-MIN_HOME_DRAWER_TEXT_OPACITY);return{transform:[{translateX:withSpring(x,HOME_DRAWER_FLING_PHYSICS)}],opacity:withSpring(clamp(opacity,0,1),HOME_DRAWER_FLING_PHYSICS)};}'};
const env0_16 = {code: 'function useHomeDrawerGestureTsx8(){const{drawerRevealX,MAX_HOME_DRAWER_ANIMATING_WIDTH,MAX_HOME_DRAWER_ICON_DISTANCE,withSpring,HOME_DRAWER_FLING_PHYSICS}=this.__closure;let x=0;if(drawerRevealX.get()<MAX_HOME_DRAWER_ANIMATING_WIDTH){x=Math.min(MAX_HOME_DRAWER_ICON_DISTANCE,drawerRevealX.get()/MAX_HOME_DRAWER_ANIMATING_WIDTH*MAX_HOME_DRAWER_ICON_DISTANCE);}return{transform:[{translateX:withSpring(x,HOME_DRAWER_FLING_PHYSICS)}]};}'};
const env0_17 = {code: 'function useHomeDrawerGestureTsx9(){const{drawerRevealX,MAX_HOME_DRAWER_ANIMATING_WIDTH,UNREAD_INDICATOR_ANIMATION_DISTANCE,withSpring,HOME_DRAWER_FLING_PHYSICS}=this.__closure;let left=0;if(drawerRevealX.get()<MAX_HOME_DRAWER_ANIMATING_WIDTH){left=-Math.min(UNREAD_INDICATOR_ANIMATION_DISTANCE,drawerRevealX.get()/MAX_HOME_DRAWER_ANIMATING_WIDTH*UNREAD_INDICATOR_ANIMATION_DISTANCE);}return{transform:[{translateX:withSpring(left,HOME_DRAWER_FLING_PHYSICS)}]};}'};
const env0_18 = {code: 'function useHomeDrawerGestureTsx10(){const{isPanelTouchActive,runOnJS,noteInteraction,gestureState,dragOffsetX}=this.__closure;isPanelTouchActive.set(false);runOnJS(noteInteraction)();gestureState.set({active:false,initialX:0,initialY:0,panelX:0});dragOffsetX.set(0);}'};
const env0_19 = {code: 'function useHomeDrawerGestureTsx11(event){const{runOnJS,setHomeDrawerState,dragOffsetX,INITIAL_OPEN_WIDTH,triggerHapticFeedback,HapticFeedbackTypes,panelX,FRACTION_OF_WIDTH_FOR_DRAWER_TO_REMAIN_OPEN,maxX,gestureState}=this.__closure;if(event.velocityX>50){runOnJS(setHomeDrawerState)(true);if(dragOffsetX.get()<INITIAL_OPEN_WIDTH){runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}}else if(event.velocityX<-50){runOnJS(setHomeDrawerState)(false);runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.SOFT);}else{if(panelX.get()===0){runOnJS(setHomeDrawerState)(false);}else if(panelX.get()>FRACTION_OF_WIDTH_FOR_DRAWER_TO_REMAIN_OPEN*maxX){runOnJS(setHomeDrawerState)(true);}else if(panelX.get()>=INITIAL_OPEN_WIDTH&&event.absoluteX-gestureState.get().initialX>0){runOnJS(setHomeDrawerState)(true);}else{runOnJS(setHomeDrawerState)(false);}}}'};
const env0_20 = {code: 'function useHomeDrawerGestureTsx12(event){const{gestureState,dragOffsetX,INITIAL_OPEN_WIDTH,panelX,DRAWER_RESISTANCE}=this.__closure;if(!gestureState.get().active)return;const newXOffset=event.absoluteX-gestureState.get().initialX;dragOffsetX.set(newXOffset);const basePosition=newXOffset+gestureState.get().panelX;if(gestureState.get().panelX===0&&newXOffset>=0&&newXOffset<INITIAL_OPEN_WIDTH){panelX.set(Math.max(basePosition/DRAWER_RESISTANCE,0));}else{panelX.set(Math.max(basePosition,0));}}'};
const env0_21 = {code: 'function useHomeDrawerGestureTsx13(event,manager){const{gestureState,panelX}=this.__closure;if(gestureState.get().active)return;const touchX=event.changedTouches[0].absoluteX;const touchY=event.changedTouches[0].absoluteY;const absoluteXDiff=Math.abs(touchX-gestureState.get().initialX);const absoluteYDiff=Math.abs(touchY-gestureState.get().initialY);if(absoluteYDiff>absoluteXDiff||panelX.get()===0&&touchX<gestureState.get().initialX||panelX.get()>0&&touchX>gestureState.get().initialX){manager.fail();}if(panelX.get()===0&&touchX>gestureState.get().initialX){gestureState.set({...gestureState.get(),active:true,initialX:touchX,panelX:panelX.get()});manager.activate();}else if(touchX<gestureState.get().initialX){gestureState.set({...gestureState.get(),active:true,initialX:touchX,panelX:panelX.get()});manager.activate();}}'};
const env0_22 = {code: 'function useHomeDrawerGestureTsx14(event){const{isPanelTouchActive,gestureState,panelX}=this.__closure;isPanelTouchActive.set(true);gestureState.set({active:false,initialX:event.absoluteX,initialY:event.absoluteY,panelX:panelX.get()});}'};
const createContext = value.createContext;
const object = {};
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
object.gesture = Gesture.Pan();
object.panelStyles = {};
object.gestureState = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'active': false,
'initialX': 0, 'initialY': 0, 'panelX': 0});
object.panelX = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(0);
object.panelSpringTranslateX = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(0);
object.guildsBarLabelDrawerStyle = {};
object.guildsBarIconDrawerStyle = {};
object.guildsBarUnreadDrawerStyle = {};
value = Reflect.apply(createContext, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerGesture.tsx');
exports.HOME_DRAWER_FLING_PHYSICS = {'mass': 0.4, 'damping': 100, 'stiffness': 250};
exports.useHomeGesture = useHomeGesture;
exports.HomeDrawerStateContext = value;
}
function useHomeGesture() { // fn#108771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:6346, offset: 0x0232d7b2, size: 1394 bytes, params: 1, frame: 34
var object2;
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const {enableHome, enablePeekHint} = MobileHomeDrawerExperiment.useConfig({location: 'gesture'});
const value3 = HomeDrawerStore();
const panelX = value3.panelX;
const gestureState = value3.gestureState;
const updateMaxX = value3.updateMaxX;
const maxX = value3.maxX;
const env0_3 = maxX;
const setPanelX = value3.setPanelX;
const env0_4 = setPanelX;
const isPanelTouchActive = value3.isPanelTouchActive;
const noteInteraction = value3.noteInteraction;
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_7 = value4;
const value5 = (require(1485) /* metro dependency 1485 */).useNavigation();
const env0_8 = value5;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = useHomeGestureH;
closure.__closure = {dragOffsetX: value4, INITIAL_OPEN_WIDTH: 144};
closure.__workletHash = 2525772891435;
closure.__initData = env0_9;
const closure2 = useHomeGestureM;
object2 = {gestureState: gestureState};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
object2.HapticFeedbackTypes = HapticFeedbackTypes;
closure2.__closure = object2;
closure2.__workletHash = 11947599708940;
closure2.__initData = env0_10;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value6 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value7 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const r11 = enableHome && !(importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
const env0_11 = r11;
const value9 = reanimatedRexportModule.useSharedValue(0);
const env0_12 = value9;
(require(14377) /* metro dependency 14377: useHomeDrawerPeekHint */).useHomeDrawerPeekHint(r11 && enablePeekHint,
value9);
const moduleValue6 = reanimatedRexportModule;
let useDerivedValue = moduleValue6.useDerivedValue;
closure = useHomeGestureZ;
closure.__closure = {panelX: panelX, peekX: value9};
closure.__workletHash = 4654854314200;
closure.__initData = env0_11;
const value10 = Reflect.apply(useDerivedValue, moduleValue6, [closure]);
const env0_13 = value10;
const binding = env0_4;
binding.useEffect(_fun108775, [value6, value7, updateMaxX, r11]);
binding.useEffect(_fun108776, [value5, setPanelX, r11]);
const moduleValue7 = reanimatedRexportModule;
useDerivedValue = moduleValue7.useDerivedValue;
closure = useHomeGestureK;
const withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
const binding2 = env0_8;
closure.__closure = {withSpring: withSpring, panelX: panelX, gestureState: gestureState,
HOME_GESTURE_DRAG_PHYSICS: env0_7, HOME_DRAWER_FLING_PHYSICS: binding2};
closure.__workletHash = 2174063493497;
closure.__initData = env0_12;
const value11 = Reflect.apply(useDerivedValue, moduleValue7, [closure]);
const env0_14 = value11;
const moduleValue8 = reanimatedRexportModule;
useDerivedValue = moduleValue8.useDerivedValue;
closure = useHomeGestureQ;
closure.__closure = {panelGestureSpringX: value11, peekX: value9};
closure.__workletHash = 2927026959998;
closure.__initData = env0_13;
const value12 = Reflect.apply(useDerivedValue, moduleValue8, [closure]);
const env0_15 = value12;
const moduleValue9 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue9.useAnimatedStyle;
closure = useHomeGestureZ_108781;
closure.__closure = {safeAreaInsets: value7, panelSpringTranslateX: value12};
closure.__workletHash = 13544610996653;
closure.__initData = env0_14;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
const env0_16 = value13;
const moduleValue10 = reanimatedRexportModule;
useAnimatedStyle = moduleValue10.useAnimatedStyle;
closure = useHomeGesture$;
object2 = {'drawerRevealX': null, 'MAX_HOME_DRAWER_ANIMATING_WIDTH': 48, 'GUILD_DESCRIPTION_ANIMATION_DISTANCE': 18,
'MIN_HOME_DRAWER_TEXT_OPACITY': 0.1, 'MIN_HOME_DRAWER_OPEN_WIDTH': 150};
object2.drawerRevealX = value10;
object2.withSpring = withSpring;
object2.HOME_DRAWER_FLING_PHYSICS = binding2;
object2.clamp = reanimatedRexportModule.clamp;
closure.__closure = object2;
closure.__workletHash = 1147372271952;
closure.__initData = env0_15;
const env0_17 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
const moduleValue11 = reanimatedRexportModule;
useAnimatedStyle = moduleValue11.useAnimatedStyle;
closure = useHomeGestureEe;
closure.__closure = {'drawerRevealX': null, 'MAX_HOME_DRAWER_ANIMATING_WIDTH': 48,
'MAX_HOME_DRAWER_ICON_DISTANCE': 12, drawerRevealX: value10, withSpring: withSpring,
HOME_DRAWER_FLING_PHYSICS: binding2};
closure.__workletHash = 16360618332998;
closure.__initData = env0_16;
const env0_18 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
const moduleValue12 = reanimatedRexportModule;
useAnimatedStyle = moduleValue12.useAnimatedStyle;
closure = useHomeGestureTe;
closure.__closure = {'drawerRevealX': null, 'MAX_HOME_DRAWER_ANIMATING_WIDTH': 48,
'UNREAD_INDICATOR_ANIMATION_DISTANCE': 6, drawerRevealX: value10, withSpring: withSpring,
HOME_DRAWER_FLING_PHYSICS: binding2};
closure.__workletHash = 8561772429103;
closure.__initData = env0_17;
const env0_19 = Reflect.apply(useAnimatedStyle, moduleValue12, [closure]);
const useMemo = binding.useMemo;
return {gesture: Reflect.apply(useMemo, binding, [_fun108785, [gestureState, panelX, value4, r11, maxX,
isPanelTouchActive, noteInteraction]]), panelStyles: value13,
homeDrawerState: env0_3(binding.useState(_fun108791), 1)[0]};
}
function useHomeGestureH() { // fn#108772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:6684, owner: useHomeGesture.h, offset: 0x0232dd24, size: 25 bytes, params: 1, frame: 9
return env0_7.get() >= 144;
}
function useHomeGestureM(a0, a1) { // fn#108773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:6799, owner: useHomeGesture.M, offset: 0x0232dd3d, size: 146 bytes, params: 3, frame: 16
var HapticFeedbackTypes;
var value;
const gestureStateBinding = gestureState;
const get = gestureStateBinding.get;
if (Reflect.apply(get, gestureStateBinding, []).active && a1 !== null && a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS((require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback);
HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
if (a0) {
value(HapticFeedbackTypes.IMPACT_MEDIUM);
} else {
value(HapticFeedbackTypes.SOFT);
}
}
}
function useHomeGestureZ() { // fn#108774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:7399, owner: useHomeGesture.z, offset: 0x0232ddcf, size: 35 bytes, params: 1, frame: 10
const panelXBinding = panelX;
let get = panelXBinding.get;
const value2 = Reflect.apply(get, panelXBinding, []);
const binding = env0_12;
get = binding.get;
return value2 + Reflect.apply(get, binding, []);
}
function _fun108775() { // fn#108775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:7511, offset: 0x0232ddf2, size: 64 bytes, params: 1, frame: 14
const binding = env0_11;
const updateMaxXBinding = updateMaxX;
if (binding) {
updateMaxXBinding(env0_9, env0_10);
} else {
updateMaxXBinding({'width': 0, 'height': 0}, {'top': 0, 'bottom': 0, 'left': 0, 'right': 0});
}
}
function _fun108776() { // fn#108776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:7605, offset: 0x0232de32, size: 45 bytes, params: 1, frame: 14
env0_8.addListener('state', handleStateChange_108777);
return _fun108778;
}
function useHomeGestureK() { // fn#108779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:8095, owner: useHomeGesture.K, offset: 0x0232df6b, size: 93 bytes, params: 1, frame: 16
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const panelXBinding = panelX;
let get = panelXBinding.get;
const value3 = Reflect.apply(get, panelXBinding, []);
const gestureStateBinding = gestureState;
get = gestureStateBinding.get;
return Reflect.apply(withSpring, springModule, [value3, Reflect.apply(get, gestureStateBinding,
[]).active ? env1_7 : env1_8, 'animate-always']);
}
function useHomeGestureQ() { // fn#108780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:8368, owner: useHomeGesture.Q, offset: 0x0232dfc8, size: 35 bytes, params: 1, frame: 10
let binding = env0_14;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
binding = env0_12;
get = binding.get;
return value2 + Reflect.apply(get, binding, []);
}
function useHomeGestureZ_108781() { // fn#108781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:8514, owner: useHomeGesture.Z, offset: 0x0232dfeb, size: 59 bytes, params: 1, frame: 11
const object3 = {flex: 1};
object3.marginTop = env0_10.top;
const object4 = {};
object4.translateX = env0_15.get();
object3.transform = [object4];
return object3;
}
function useHomeGesture$() { // fn#108782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:8715, owner: useHomeGesture.$, offset: 0x0232e026, size: 236 bytes, params: 1, frame: 22
let binding = env0_13;
const value2 = binding.get();
const value3 = 0;
const r11 = value2 < 48 ? global.Math.min(18, env0_13.get() / 48 * 18) : value3;
let value = env0_13.get();
value /= 150;
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
binding = env1_8;
object2.transform = [{translateX: Reflect.apply(withSpring, springModule, [r11, binding])}];
const moduleValue2 = springModule;
withSpring = moduleValue2.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = Reflect.apply(withSpring, moduleValue2, [reanimatedRexportModule.clamp(0.1 + value * 0.9, value3,
1), binding]);
return object2;
}
function useHomeGestureEe() { // fn#108783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:9237, owner: useHomeGesture.ee, offset: 0x0232e112, size: 134 bytes, params: 1, frame: 16
var r5;
var Math;
var min;
var value;
let binding = env0_13;
if (binding.get() < 48) {
Math = global.Math;
min = Math.min;
binding = env0_13;
value = binding.get() / 48;
value = Reflect.apply(min, Math, [12, value * 12]);
r5 = value;
} else {
r5 = 0;
}
const object = {};
value = environment.__proto__;
object.translateX = (require(4577) /* metro dependency 4577: spring */).withSpring(r5, env1_8);
return {transform: [object]};
}
function useHomeGestureTe() { // fn#108784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:9597, owner: useHomeGesture.te, offset: 0x0232e198, size: 137 bytes, params: 1, frame: 16
var r5;
var Math;
var min;
var value;
let binding = env0_13;
if (binding.get() < 48) {
Math = global.Math;
min = Math.min;
binding = env0_13;
value = binding.get() / 48;
value = -Reflect.apply(min, Math, [6, value * 6]);
r5 = value;
} else {
r5 = 0;
}
const object = {};
value = environment.__proto__;
object.translateX = (require(4577) /* metro dependency 4577: spring */).withSpring(r5, env1_8);
return {transform: [object]};
}
function _fun108785() { // fn#108785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:9942, offset: 0x0232e221, size: 611 bytes, params: 1, frame: 25
var object2;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value6 = Gesture.Pan().enabled(env0_11).manualActivation(true).shouldCancelWhenOutside(false).maxPointers(1);
const onBegin = value6.onBegin;
let closure = function(a0) {
isPanelTouchActive.set(true);
var gestureStateBinding = gestureState;
var object = {active: false, initialX: a0.absoluteX, initialY: a0.absoluteY};
object.panelX = panelX.get();
gestureStateBinding.set(object);
};
const isPanelTouchActiveBinding = isPanelTouchActive;
let gestureStateBinding = gestureState;
const panelXBinding = panelX;
closure.__closure = {isPanelTouchActive: isPanelTouchActiveBinding, gestureState: gestureStateBinding,
panelX: panelXBinding};
closure.__workletHash = 16505445202158;
closure.__initData = env1_22;
const value7 = Reflect.apply(onBegin, value6, [closure]);
const onTouchesMove = value7.onTouchesMove;
closure = s_108787;
closure.__closure = {gestureState: gestureStateBinding, panelX: panelXBinding};
closure.__workletHash = 14569763728735;
closure.__initData = env1_21;
const value8 = Reflect.apply(onTouchesMove, value7, [closure]);
const onChange = value8.onChange;
closure = n_108788;
const binding = env0_7;
closure.__closure = {gestureState: gestureStateBinding, dragOffsetX: binding, INITIAL_OPEN_WIDTH: 144,
panelX: panelXBinding, DRAWER_RESISTANCE: 3};
closure.__workletHash = 14987365733436;
closure.__initData = env1_20;
const value9 = Reflect.apply(onChange, value8, [closure]);
const onEnd = value9.onEnd;
closure = t_108789;
object2 = {};
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.runOnJS = runOnJS;
object2.setHomeDrawerState = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).setHomeDrawerState;
object2.dragOffsetX = binding;
object2.INITIAL_OPEN_WIDTH = 144;
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
object2.HapticFeedbackTypes = HapticFeedbackTypes;
object2.panelX = panelXBinding;
object2.FRACTION_OF_WIDTH_FOR_DRAWER_TO_REMAIN_OPEN = 0.5;
object2.maxX = maxX;
object2.gestureState = gestureStateBinding;
closure.__closure = object2;
closure.__workletHash = 14661579894802;
closure.__initData = env1_19;
const value10 = Reflect.apply(onEnd, value9, [closure]);
const onFinalize = value10.onFinalize;
closure = e_108790;
closure.__closure = {isPanelTouchActive: isPanelTouchActiveBinding, runOnJS: runOnJS,
noteInteraction: noteInteraction, gestureState: gestureStateBinding, dragOffsetX: binding};
closure.__workletHash = 4660810514744;
closure.__initData = env1_18;
return Reflect.apply(onFinalize, value10, [closure]);
}
function _fun108791() { // fn#108791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:12289, offset: 0x0232ea32, size: 79 bytes, params: 1, frame: 3
return {gesture: env0_20, panelStyles: env0_16, gestureState: gestureState, panelX: panelX,
panelSpringTranslateX: env0_15, guildsBarLabelDrawerStyle: env0_17, guildsBarIconDrawerStyle: env0_18,
guildsBarUnreadDrawerStyle: env0_19};
}
function handleStateChange_108777({data}) { // fn#108777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:7610, offset: 0x0232de5f, size: 207 bytes, params: 2, frame: 18
var value5;
var value6;
const state = data.state;
let value = environment.__proto__.__proto__;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const value4 = navigationRouteUtilsNativeModule.coerceGuildsRoute(state == null || state.routes == null ? undefined : state.routes[state?.index ?? 0]);
if (value4 != null) {
value5 = environment.__proto__;
if (env1_11) {
value6 = value4.params?.drawerOpen === true;
setPanelX(value6 ? 'open' : 'closed');
value = HomeDrawerSubtitleStore.getState();
if (value6) {
value.startTimer();
} else {
value.stopTimer();
}
}
}
}
function _fun108778() { // fn#108778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:7960, offset: 0x0232df2e, size: 61 bytes, params: 1, frame: 13
let value = environment.__proto__;
const binding = env1_8;
binding.removeListener('state', handleStateChange_108777);
value = environment.__proto__.__proto__;
HomeDrawerSubtitleStore.getState().stopTimer();
}
function s_108787(a0, a1) { // fn#108787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:10287, offset: 0x0232e4dd, size: 421 bytes, params: 3, frame: 19
var r0;
var changedTouches;
var absoluteX;
var absoluteY;
var Math;
var abs;
var value2;
var panelXBinding;
var gestureStateBinding6;
var set;
var object2;
const value = environment.__proto__;
let get = gestureState.get;
if (!Reflect.apply(get, gestureStateBinding, []).active) {
changedTouches = a0.changedTouches;
absoluteX = changedTouches[0].absoluteX;
changedTouches = a0.changedTouches;
absoluteY = changedTouches[0].absoluteY;
Math = global.Math;
abs = Math.abs;
gestureStateBinding = gestureState;
get = gestureStateBinding.get;
value2 = Reflect.apply(abs, Math, [absoluteX - Reflect.apply(get, gestureStateBinding, []).initialX]);
Math = global.Math;
abs = Math.abs;
get = gestureStateBinding.get;
r0 = Reflect.apply(abs, Math, [absoluteY - Reflect.apply(get, gestureStateBinding,
[]).initialY]) > value2 || panelX.get() === 0 && absoluteX < gestureState.get().initialX;
r0 = !r0 ? panelX.get() > 0 && absoluteX > gestureState.get().initialX : r0;
if (r0) {
a1.fail();
}
panelXBinding = panelX;
get = panelXBinding.get;
r0 = Reflect.apply(get, panelXBinding, []) === 0 && absoluteX > gestureState.get().initialX;
r0 = !r0 ? absoluteX < gestureState.get().initialX : r0;
if (r0) {
gestureStateBinding6 = gestureState;
set = gestureStateBinding6.set;
object2 = {};
copyDataProperties(object2, gestureStateBinding6.get(), gestureStateBinding);
object2['active'] = true;
object2['initialX'] = absoluteX;
object2['panelX'] = panelX.get();
Reflect.apply(set, gestureStateBinding6, [object2]);
a1.activate();
}
}
}
function n_108788(a0) { // fn#108788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:10754, offset: 0x0232e682, size: 204 bytes, params: 2, frame: 16
var absoluteX;
var value2;
var set;
var value3;
var panelXBinding;
var Math;
let get = gestureState.get;
if (Reflect.apply(get, gestureStateBinding, []).active) {
absoluteX = a0.absoluteX;
gestureStateBinding = gestureState;
get = gestureStateBinding.get;
value2 = absoluteX - Reflect.apply(get, gestureStateBinding, []).initialX;
env1_7.set(value2);
get = gestureStateBinding.get;
value3 = value2 + Reflect.apply(get, gestureStateBinding, []).panelX;
get = gestureStateBinding.get;
if (Reflect.apply(get, gestureStateBinding, []).panelX !== 0) {
panelXBinding = panelX;
set = panelXBinding.set;
Math = global.Math;
Reflect.apply(set, panelXBinding, [Math.max(value3, 0)]);
} else if (value2 >= 0) {
if (value2 < 144) {
panelXBinding = panelX;
set = panelXBinding.set;
Math = global.Math;
Reflect.apply(set, panelXBinding, [Math.max(value3 / 3, 0)]);
} else {
panelXBinding = panelX;
set = panelXBinding.set;
Math = global.Math;
Reflect.apply(set, panelXBinding, [Math.max(value3, 0)]);
}
} else {
panelXBinding = panelX;
set = panelXBinding.set;
Math = global.Math;
Reflect.apply(set, panelXBinding, [Math.max(value3, 0)]);
}
}
}
function t_108789(a0) { // fn#108789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:11079, offset: 0x0232e74e, size: 632 bytes, params: 2, frame: 16
var value;
var absoluteX;
var gestureStateBinding;
const setHomeDrawerState = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).setHomeDrawerState;
const triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
var value6;
if (a0.velocityX > 50) {
value = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(setHomeDrawerState)(true);
value6 = environment.__proto__;
if (env1_7.get() < 144) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(triggerHapticFeedback);
value(HapticFeedbackTypes.IMPACT_MEDIUM);
}
} else if (a0.velocityX < -50) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(setHomeDrawerState);
value(false);
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(triggerHapticFeedback);
value(HapticFeedbackTypes.SOFT);
} else {
value = environment.__proto__;
if (panelX.get() === 0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(setHomeDrawerState);
value(false);
} else if (panelX.get() > 0.5 * maxX) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(setHomeDrawerState);
value(true);
} else if (panelX.get() >= 144) {
absoluteX = a0.absoluteX;
gestureStateBinding = gestureState;
if (absoluteX - gestureStateBinding.get().initialX > 0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(setHomeDrawerState);
value(true);
} else {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(setHomeDrawerState);
value(false);
}
} else {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(setHomeDrawerState);
value(false);
}
}
}
function e_108790() { // fn#108790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14571:11985, offset: 0x0232e9c6, size: 108 bytes, params: 1, frame: 14
isPanelTouchActive.set(false);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS(noteInteraction)();
gestureState.set({'active': false, 'initialX': 0, 'initialY': 0, 'panelX': 0});
env1_7.set(0);
}
@@ -0,0 +1,51 @@
/* Metro module 14432; source: modules/home_drawer/native/useHomeDrawerGuildTyping.tsx; dependencies: [1379, 11532, 628, 566, 2] */
function _fun109233(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:6, offset: 0x0234270a, size: 166 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const typingStore = importDefault(11532) /* metro dependency 11532: TypingStore */;
object = {typingChannelId: undefined, typingChannelName: undefined, typingUserIds: []};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerGuildTyping.tsx');
exports.useHomeDrawerGuildTyping = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([TypingStore, ChannelStore], _fun109236, [a0],
areHomeDrawerGuildTypingStatesEqual);
};
}
function areHomeDrawerGuildTypingStatesEqual(a0, a1) { // fn#109234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:185, offset: 0x023427b0, size: 95 bytes, params: 3, frame: 15
let value = a0.typingChannelId === a1.typingChannelId;
let r0 = value && a0.typingChannelName === a1.typingChannelName;
if (r0) {
value = require(628) /* metro dependency 628: shallowEqual */;
value = value.areArraysShallowEqual(a0.typingUserIds, a1.typingUserIds);
r0 = value;
}
return r0;
}
function useHomeDrawerGuildTyping(a0) { // fn#109235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:503, offset: 0x0234280f, size: 93 bytes, params: 2, frame: 18
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([TypingStore, ChannelStore], _fun109236,
[a0], areHomeDrawerGuildTypingStatesEqual);
}
function _fun109236() { // fn#109236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:581, offset: 0x0234286c, size: 130 bytes, params: 1, frame: 16
var r0;
var object2;
const value = environment.__proto__;
const typingUsersByGuild = TypingStore.getTypingUsersByGuild(env0_0);
const Object = global.Object;
const property = Object.keys(typingUsersByGuild)[0];
if (property == null) {
r0 = env1_4;
} else {
object2 = {typingChannelId: property};
object2.typingChannelName = ChannelStore.getChannel(property)?.name;
object2.typingUserIds = global.Object.keys(typingUsersByGuild[property]);
r0 = object2;
}
return r0;
}
@@ -0,0 +1,258 @@
/* Metro module 14377; source: modules/home_drawer/native/useHomeDrawerPeekHint.tsx; dependencies: [57, 31, 4502, 14375, 661, 1376, 4017, 1365, 1485, 14378, 566, 14373, 3968, 7013, 4504, 4577, 14374, 2] */
function _fun108802(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:6, offset: 0x0232ee13, size: 350 bytes, params: 8, frame: 19
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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const homeDrawerStore = importDefault(14375) /* metro dependency 14375: HomeDrawerStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const env0_8 = Reflect.apply(inOut, Easing, [Easing2.cubic]);
const env0_9 = [];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
object = [HOME_DRAWER_SWIPE_PEEK_NUX];
object = {code: 'function useHomeDrawerPeekHintTsx1(){const{gestureState,panelX,PEEK_HINT_DRAWER_DRAG_THRESHOLD}=this.__closure;return gestureState.get().active&&panelX.get()>PEEK_HINT_DRAWER_DRAG_THRESHOLD;}'};
object = {code: 'function useHomeDrawerPeekHintTsx2(isDragged,wasDragged){const{isPeekGranted,runOnJS,handleDrawerDragged}=this.__closure;if(!isPeekGranted||wasDragged==null)return;if(isDragged&&!wasDragged){runOnJS(handleDrawerDragged)();}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerPeekHint.tsx');
exports.PEEK_HINT_DISTANCE = 40;
exports.useHomeDrawerPeekHint = useHomeDrawerPeekHint;
}
function useHomeDrawerPeekHint(a0, a1) { // fn#108803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:872, offset: 0x0232ef71, size: 944 bytes, params: 3, frame: 32
var object2;
let value = a0;
const env0_0 = a1;
const value3 = HomeDrawerStore();
const panelX = value3.panelX;
const gestureState = value3.gestureState;
const env0_2 = gestureState;
const lastInteractionAt = value3.lastInteractionAt;
const env0_3 = lastInteractionAt;
const isPanelTouchActive = value3.isPanelTouchActive;
const noteInteraction = value3.noteInteraction;
const value4 = (require(1485) /* metro dependency 1485 */).useIsFocused();
const value5 = (require(14378) /* metro dependency 14378: useDrawerState */).useDrawerOpen(value);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let property = env0_2((require(14373) /* metro dependency 14373: useGuildsRouteGuildId */).useGuildsRouteGuildAndChannelId(),
1)[0];
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
let HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
const value8 = !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
[HOME_DRAWER_SWIPE_PEEK_NUX]);
let r3 = value && value4 && property != null;
r3 = r3 && property !== ME && !value5;
r3 = r3 && !useReducedMotion && value8;
let binding = env0_3;
const env0_8 = binding.useRef(false);
value = binding.useState(false);
value = env0_2(value, 2);
property = value[0];
const env0_9 = property;
const property2 = value[1];
const env0_10 = property2;
if (property && !r3) {
property2(false);
}
const useSelectedDismissibleContent = (require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent;
value = Reflect.apply(useSelectedDismissibleContent, value, [property && r3 ? env0_10 : env0_9, undefined, true]);
value = env0_2(value, 2);
const property3 = value[0];
const property4 = value[1];
const env0_11 = property4;
binding = env0_3;
const env0_12 = binding.useRef(null);
const env0_13 = binding.useRef(null);
const env0_14 = binding.useRef(false);
const env0_15 = binding.useRef(null);
value = binding.useCallback(_fun108805, [a1]);
HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
const value9 = property3 === HOME_DRAWER_SWIPE_PEEK_NUX;
binding.useEffect(_fun108807, [value9, value, property4]);
value = binding.useCallback(_fun108808, [a1]);
binding.useEffect(_fun108809, [r3, property, noteInteraction, lastInteractionAt, isPanelTouchActive]);
binding.useEffect(_fun108812, [value5, value]);
binding.useEffect(_fun108813, [r3, value]);
value = binding.useCallback(_fun108814, [value]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useHomeDrawerPeekHintV;
closure.__closure = {gestureState: gestureState, panelX: panelX, PEEK_HINT_DRAWER_DRAG_THRESHOLD: 8};
closure.__workletHash = 15765003051494;
closure.__initData = env0_11;
const closure2 = useHomeDrawerPeekHintQ;
object2 = {isPeekGranted: value9};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.handleDrawerDragged = value;
closure2.__closure = object2;
closure2.__workletHash = 10054961085184;
closure2.__initData = env0_12;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
}
function _fun108805() { // fn#108805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1560, offset: 0x0232f321, size: 179 bytes, params: 1, frame: 18
if (env0_12.current != null) {
global.clearTimeout(env0_12.current);
env0_12.current = null;
}
env0_14.current = true;
const set = require.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, require, [timingModule.withTiming(40, {duration: 1500, easing: env1_8})]);
env0_13.current = global.setTimeout(_fun108806, 2500);
}
function _fun108807() { // fn#108807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1949, offset: 0x0232f465, size: 53 bytes, params: 1, frame: 10
if (result && !env0_14.current) {
env0_15.current = env0_11;
env0_16();
}
}
function _fun108808() { // fn#108808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2019, offset: 0x0232f49a, size: 197 bytes, params: 1, frame: 17
var set;
var value;
if (env0_12.current != null) {
global.clearTimeout(env0_12.current);
env0_12.current = null;
}
if (env0_13.current != null) {
global.clearTimeout(env0_13.current);
env0_13.current = null;
}
if (env0_14.current) {
env0_14.current = false;
set = require.set;
value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, require, [value.withSpring(0,
(require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS)]);
}
}
function _fun108809() { // fn#108809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2251, offset: 0x0232f55f, size: 95 bytes, params: 1, frame: 15
if (env0_7) {
if (env0_9) {
return undefined;
}
if (env0_8.current) {
return undefined;
}
noteInteraction();
env0_12.current = global.setTimeout(checkIdle, 2000);
return _fun108811;
}
}
function _fun108812() { // fn#108812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2541, offset: 0x0232f67e, size: 36 bytes, params: 1, frame: 10
if (env0_6) {
env0_8.current = true;
env0_18();
}
}
function _fun108813() { // fn#108813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2590, offset: 0x0232f6a2, size: 81 bytes, params: 1, frame: 11
var current;
let binding = env0_7;
if (!binding && env0_14.current) {
env0_18();
current = env0_15.current;
if (current != null) {
binding = env0_15;
current = binding.current;
value = environment.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
}
}
}
function _fun108814() { // fn#108814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2693, offset: 0x0232f6f3, size: 68 bytes, params: 1, frame: 13
var binding;
var value2;
env0_18();
let current = env0_15.current;
if (current != null) {
binding = env0_15;
current = binding.current;
value2 = environment.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.INDIRECT_ACTION]);
}
env0_10(false);
}
function useHomeDrawerPeekHintV() { // fn#108815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2793, owner: useHomeDrawerPeekHint.V, offset: 0x0232f737, size: 47 bytes, params: 1, frame: 10
var r0;
var value;
const gestureStateBinding = gestureState;
const get = gestureStateBinding.get;
const active = Reflect.apply(get, gestureStateBinding, []).active;
if (active) {
value = panelX.get();
value = value > 8;
r0 = value;
} else {
r0 = active;
}
return r0;
}
function useHomeDrawerPeekHintQ(a0, a1) { // fn#108816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2946, owner: useHomeDrawerPeekHint.Q, offset: 0x0232f766, size: 84 bytes, params: 3, frame: 13
let value = a0;
if (result && a1 != null && value && !a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_19)();
}
}
function _fun108806() { // fn#108806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1714, offset: 0x0232f3d4, size: 145 bytes, params: 1, frame: 21
var binding;
env1_13.current = null;
env1_14.current = false;
const set = require.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const HOME_DRAWER_FLING_PHYSICS = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS;
Reflect.apply(set, require, [Reflect.apply(withSpring, springModule, [0, HOME_DRAWER_FLING_PHYSICS])]);
if (env1_15.current != null) {
binding = env1_15;
binding.current(ContentDismissActionType.AUTO_DISMISS);
}
env1_10(false);
}
function checkIdle() { // fn#108810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2296, offset: 0x0232f5be, size: 136 bytes, params: 1, frame: 16
env1_12.current = null;
const Date = global.Date;
const value2 = Date.now();
const current = lastInteractionAt.current;
const value3 = 2000;
const value4 = value3 - (value2 - current);
const isPanelTouchActiveBinding = isPanelTouchActive;
const get = isPanelTouchActiveBinding.get;
if (Reflect.apply(get, isPanelTouchActiveBinding, [])) {
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
} else if (value4 > 0) {
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
} else {
env1_10(true);
}
}
function _fun108811() { // fn#108811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2448, offset: 0x0232f646, size: 56 bytes, params: 1, frame: 13
if (env1_12.current != null) {
global.clearTimeout(env1_12.current);
env1_12.current = null;
}
}