/* Metro module 15322; source: modules/launchpad/native/LaunchPad.tsx; dependencies: [57, 31, 27, 3849, 5070, 6936, 5071, 1383, 1226, 1379, 7112, 5214, 12600, 4605, 4896, 4864, 4297, 661, 33, 697, 4501, 5278, 4573, 566, 4017, 4015, 6984, 1244, 10231, 9216, 13969, 477, 13121, 15323, 7242, 4007, 7243, 7234, 1478, 1585, 7235, 12080, 683, 15324, 15331, 13122, 15350, 15351, 2] */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */ import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import ActionSheetStore from '../../action_sheet/native/ActionSheetStore.tsx'; /* Metro dependency 3849 */ import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */ import ReadStateStore from '../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */ import UserGuildSettingsStore from '../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */ import SortedGuildStore from '../../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */ import ChannelListStore from '../../guild_sidebar/ChannelListStore.tsx'; /* Metro dependency 5070 */ import ActiveJoinedThreadsStore from '../../threads/ActiveJoinedThreadsStore.tsx'; /* Metro dependency 5071 */ import GuildReadStateStore from '../../../stores/GuildReadStateStore.tsx'; /* Metro dependency 5214 */ import DeveloperExperimentStore from '../../../stores/DeveloperExperimentStore.tsx'; /* Metro dependency 7112 */ import Autocompleter from '../../autocompleter/Autocompleter.tsx'; /* Metro dependency 7235 */ import RouteManager from '../../routing/RouteManager.tsx'; /* Metro dependency 12080 */ import PrivateChannelReadStateStore from '../../../stores/PrivateChannelReadStateStore.tsx'; /* Metro dependency 12600 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */ import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */ import * as NavigationRouteUtilsNativeModule from '../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as NavigationHistoryStoreModule from '../../main_tabs_v2/native/NavigationHistoryStore.tsx'; /* Metro dependency 6936 */ import * as AutocompleterModule from '../../autocompleter/index.tsx'; /* Metro dependency 7234 */ import * as BellIconModule from '../../../design/components/Icon/native/redesign/generated/BellIcon.tsx'; /* Metro dependency 9216 */ import * as FlashIconModule from '../../../design/components/Icon/native/redesign/generated/FlashIcon.tsx'; /* Metro dependency 10231 */ import * as StaffBadgeIconModule from '../../../design/components/Icon/native/redesign/generated/StaffBadgeIcon.tsx'; /* Metro dependency 13969 */ function _fun117129(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:6, offset: 0x024a5413, size: 1141 bytes, params: 8, frame: 29 const env0_0 = require; const _arrayLikeToArray_117132 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; let value4 = JsxRuntimeModule; const env0_25 = value4.jsx; const env0_26 = value4.jsxs; const md = (importDefault(697) /* metro dependency 697: native */).radii.md; const createStyles = CreateStylesModule.createStyles; object = {}; let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; object.wrapper = {'flexGrow': 0, 'marginHorizontal': 16, 'marginBottom': 16, 'flexShrink': 1, 'borderRadius': 24, 'backgroundColor': null, 'flexDirection': 'column', 'justifyContent': 'flex-start', 'alignItems': 'stretch', 'overflow': 'hidden', backgroundColor: BACKGROUND_BASE_LOW}; object.launchPadContent = {'flex': -1, 'overflow': 'hidden', 'borderBottomLeftRadius': 24, 'borderBottomRightRadius': 24}; object.header = {'paddingHorizontal': 16, 'paddingTop': 16, 'flexDirection': 'row', 'flexShrink': 0, 'flexGrow': 0}; object.subheader = {'flexGrow': 1, 'flexShrink': 1, 'flexDirection': 'row', 'alignItems': 'center', 'alignSelf': 'center', 'paddingStart': 8}; const object3 = {'marginStart': 8, 'flexDirection': 'row', 'flexShrink': 0, 'backgroundColor': null, 'borderRadius': null, 'padding': 5, 'alignItems': 'stretch', 'justifyContent': 'center', 'gap': 5, 'borderWidth': 1}; const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT; object3.backgroundColor = INPUT_BACKGROUND_DEFAULT; object3.borderRadius = md; const INPUT_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BORDER_DEFAULT; object3.borderColor = INPUT_BORDER_DEFAULT; object.tabs = object3; object.tab = {'width': 32, 'height': 32, 'borderRadius': null, 'alignItems': 'center', 'justifyContent': 'center', borderRadius: md - 5}; BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; object.tabSelected = {backgroundColor: BACKGROUND_BASE_LOW}; const env0_27 = Reflect.apply(createStyles, CreateStylesModule, [object]); object = {SEARCH: 0}; object[0] = 'SEARCH'; object.MEMBERS = 1; object[1] = 'MEMBERS'; object.NOTIFICATIONS = 2; object[2] = 'NOTIFICATIONS'; object.DEV_TOOLS = 3; object[3] = 'DEV_TOOLS'; object = {code: 'function LaunchPadTsx1(){const{sharedState}=this.__closure;return sharedState.get();}'}; object = {code: 'function LaunchPadTsx2(sharedState){const{keyboardShown,runOnJS,setFocused}=this.__closure;if(!keyboardShown.get()&&sharedState>0.75){runOnJS(setFocused)(true);}else if(keyboardShown.get()&&sharedState<=0){runOnJS(setFocused)(false);}}'}; const env0_31 = value.memo(_fun117149); const env0_32 = []; const AutocompleterResultTypes = (AutocompleterModule).AutocompleterResultTypes; const GUILD = AutocompleterResultTypes.GUILD; object = [GUILD]; const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL; object[1] = TEXT_CHANNEL; const GROUP_DM = AutocompleterResultTypes.GROUP_DM; object[2] = GROUP_DM; const VOICE_CHANNEL = AutocompleterResultTypes.VOICE_CHANNEL; object[3] = VOICE_CHANNEL; const USER = AutocompleterResultTypes.USER; object[4] = USER; object = {code: 'function LaunchPadTsx3(){const{sharedState}=this.__closure;return sharedState.get()===0;}'}; object = {code: 'function LaunchPadTsx4(hidden,prevHidden){const{runOnJS,clearQuery,cancelTimeout}=this.__closure;if(hidden===prevHidden)return;if(hidden&&hidden!==prevHidden){runOnJS(clearQuery)();}else if(!hidden&&hidden!==prevHidden){runOnJS(cancelTimeout)();}}'}; value = value.memo(LaunchPad); (FileImportTrackerModule).fileFinishedImporting('modules/launchpad/native/LaunchPad.tsx'); exports.default = value; function _createForOfIteratorHelperLoose_117130(a0, a1) { // fn#117130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:517, offset: 0x024a5888, size: 372 bytes, params: 3, frame: 20 var r6; var r9; var r5; var value3; var regexp; const env0_0 = a0; const Symbol = global.Symbol; let value = typeof Symbol !== 'undefined'; let r1 = value && a0[global.Symbol.iterator]; r1 = !r1 ? a0['@@iterator'] : r1; if (r1) { value = r1.call(a0); return value.next.bind(value); } const Array = global.Array; if (Array.isArray(a0)) { if (r1) { } return _fun117131; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_117132(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_117132(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_117132(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun117131; } const TypeError = global.TypeError; throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); function _fun117131() { // fn#117131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:1088, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return env0_1 >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]}; } } function TabButton({onPress, icon, accessibilityLabel, selected, style}) { // fn#117133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:2415, offset: 0x024a59fc, size: 198 bytes, params: 2, frame: 21 const styles = useStyles(); const PressableHighlight = (PressablesModule).PressableHighlight; const items2 = [styles.tab, style]; items2[2] = selected ? styles.tabSelected : undefined; const object2 = {selected: selected}; const colors = (Native).colors; return ( {icon(selected ? colors.INTERACTIVE_TEXT_ACTIVE : colors.INTERACTIVE_TEXT_DEFAULT)} ); } function TabHeader({text}) { // fn#117134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:2770, offset: 0x024a5ac2, size: 88 bytes, params: 2, frame: 16 const styles = useStyles(); const Text = (TextModule).Text; return ( {text} ); } function createAndAppendChannel(a0, a1, a2) { // fn#117135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5628, offset: 0x024a5b1a, size: 82 bytes, params: 4, frame: 14 var value; if (!a1.has(a0)) { value = (importDefault(7242) /* metro dependency 7242: createAutocompleterResultForChannelId */)(a0); if (value != null) { a2.push(value); a1.add(a0); } } } function useInitialResults({disabled, visible}) { // fn#117136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5732, offset: 0x024a5b6c, size: 728 bytes, params: 2, frame: 28 const selectedGuildFromRoute = (NavigationRouteUtilsNativeModule).getSelectedGuildFromRoute(); const selectedChannelFromRoute = (NavigationRouteUtilsNativeModule).getSelectedChannelFromRoute(); const value5 = selectedChannelFromRoute(property3.useState(undefined), 2); const property = value5[0]; var property3 = property; const property2 = value5[1]; property3.useEffect(_fun117137, [visible]); const env0_6 = property3.useRef([]); const value6 = (FluxModule).useStateFromStores([PrivateChannelReadStateStore], _fun117138); property3.useEffect(_fun117139); const env0_8 = property3.useRef([]); const value7 = (FluxModule).useStateFromStoresArray([GuildReadStateStore, SortedGuildStore], _fun117140, [visible, selectedGuildFromRoute]); property3.useEffect(_fun117141); const env0_10 = property3.useRef([]); const value8 = (FluxModule).useStateFromStoresArray([ChannelListStore, VoiceStateStore, ReadStateStore, UserGuildSettingsStore, ActiveJoinedThreadsStore], _fun117142, [disabled, selectedGuildFromRoute, visible, property]); property3.useEffect(_fun117144); const env0_12 = property3.useRef([]); const value9 = property3.useMemo(_fun117145, [disabled, visible, selectedGuildFromRoute, value7]); property3.useEffect(_fun117146); const env0_14 = property3.useRef(undefined); const value10 = property3.useMemo(_fun117147, [disabled, visible, value8, selectedChannelFromRoute, property]); property3.useEffect(_fun117148); object = {}; object.initialResults = property3.useDeferredValue(value10); object.unreadPrivateChannelIds = value6; object.unreadGuilds = value7; object.guildHistory = value9; object.selectedUnreadGuild = property; object.setSelectedUnreadGuild = property2; return object; function _fun117137() { // fn#117137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5926, offset: 0x024a5e44, size: 25 bytes, params: 1, frame: 10 if (!visible) { (0, ReactNativeModule.View)(undefined); } } function _fun117138() { // fn#117138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:6006, offset: 0x024a5e5d, size: 40 bytes, params: 1, frame: 10 var r0; var value; if (visible) { value = environment.__proto__; value = PrivateChannelReadStateStore.getUnreadPrivateChannelIds(); r0 = value; } else { r0 = env0_6.current; } return r0; } function _fun117139() { // fn#117139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:6068, offset: 0x024a5e85, size: 21 bytes, params: 1, frame: 2 env0_6.current = env0_7; } function _fun117140() { // fn#117140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:6150, offset: 0x024a5e9a, size: 194 bytes, params: 1, frame: 21 var r10; var r2; var items4; var items2; var value2; var value4; var value5; var done; var value6; var guildReadStateStoreBinding; var getMentionCount; var hasUnread; var push; var value7; var items3; if (visible) { items4 = []; items2 = []; value2 = environment.__proto__; value4 = _createForOfIteratorHelperLoose_117130(SortedGuildStore.getFlattenedGuildIds()); value5 = value4(); done = value5.done; if (!done) { r2 = value5; while (true) { value6 = r2.value; if (value6 !== env0_2) { getMentionCount = GuildReadStateStore.getMentionCount; if (Reflect.apply(getMentionCount, guildReadStateStoreBinding, [value6]) > 0) { items4.push(value6); r10 = guildReadStateStoreBinding; break; } guildReadStateStoreBinding = GuildReadStateStore; hasUnread = guildReadStateStoreBinding.hasUnread; if (Reflect.apply(hasUnread, guildReadStateStoreBinding, [value6])) { items2.push(value6); r10 = guildReadStateStoreBinding; break; } r10 = guildReadStateStoreBinding; break; } value7 = value4(); done = value7.done; if (done) { break; } r2 = value7; continue; } } push = items4.push; items3 = []; arraySpread(items3, items2, 0, r10); apply(push, items3, items4, r10); return items4; } return env0_8.current; } function _fun117141() { // fn#117141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:6400, offset: 0x024a5f5c, size: 21 bytes, params: 1, frame: 2 env0_8.current = NavigationHistoryStoreModule.getIdFromHistoryItem; } function _fun117142() { // fn#117142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:6488, offset: 0x024a5f71, size: 359 bytes, params: 1, frame: 27 var r16; var environment; var r9; var items3; var items2; var Object; var values; var activeJoinedThreadsStoreBinding; var value2; var length; var value3; var property; var propertyName; var push; var value4; var channelListStoreBinding; var items5; var items6; var items7; const r8 = env0_4 ?? env0_2; if (disabled) { return []; } if (r8 == null) { return []; } if (visible) { items3 = []; items2 = []; Object = global.Object; values = Object.values; value = environment.__proto__; activeJoinedThreadsStoreBinding = ActiveJoinedThreadsStore; value2 = Reflect.apply(values, Object, [activeJoinedThreadsStoreBinding.getActiveJoinedUnreadThreadsForGuild(r8)]); length = value2.length; value3 = 0; if (value3 < length) { r9 = value3; while (true) { property = value2[r9]; for (propertyName in property) { items2.push(propertyName); r16 = propertyName; } value4 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1; length = value2.length; if (value4 < length) { r9 = value4; continue; } break; } } channelListStoreBinding = ChannelListStore; channelListStoreBinding.getGuild(r8).guildChannels.forEachChannel(_fun117143, {'ignoreRecents': true, 'withThreads': true}); push = items3.push; items5 = []; arraySpread(items5, items2, value3, r16); apply(push, items5, items3, r16); push = items3.push; items6 = []; arraySpread(items6, [], value3, r16); apply(push, items6, items3, r16); push = items3.push; items7 = []; arraySpread(items7, [], value3, r16); apply(push, items7, items3, r16); return items3; } return env0_10.current; function _fun117143(a0) { // fn#117143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:6751, offset: 0x024a60d8, size: 350 bytes, params: 2, frame: 18 var userGuildSettingsStoreBinding; var readStateStoreBinding; var moduleValue; var binding; var voiceStateStoreBinding; var properties; var properties2; var properties3; var propertyName; const value = environment.__proto__.__proto__; const isGuildVocalChannelType2 = isGuildVocalChannelType(a0.type); if (isGuildVocalChannelType2) { if (!Reflect.apply(UserGuildSettingsStore.isChannelMuted, userGuildSettingsStoreBinding, [a0.guild_id, a0.id])) { if (a0.parent_id == null) { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.getMentionCount(a0.id) > 0) { binding = env0_0; binding.push(a0.id); } else if (isGuildVocalChannelType2) { if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } else { moduleValue = require(7243) /* metro dependency 7243: ReadStateUtils */; if (moduleValue.getHasImportantUnread(a0)) { binding = env0_1; binding.push(a0.id); } else if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } } else { userGuildSettingsStoreBinding = UserGuildSettingsStore; if (!userGuildSettingsStoreBinding.isChannelMuted(a0.guild_id, a0.parent_id)) { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.getMentionCount(a0.id) > 0) { binding = env0_0; binding.push(a0.id); } else if (isGuildVocalChannelType2) { if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } else { moduleValue = require(7243) /* metro dependency 7243: ReadStateUtils */; if (moduleValue.getHasImportantUnread(a0)) { binding = env0_1; binding.push(a0.id); } else if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } } } } } else if (isGuildSelectableChannelType(a0.type)) { if (!Reflect.apply(UserGuildSettingsStore.isChannelMuted, userGuildSettingsStoreBinding, [a0.guild_id, a0.id])) { if (a0.parent_id == null) { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.getMentionCount(a0.id) > 0) { binding = env0_0; binding.push(a0.id); } else if (isGuildVocalChannelType2) { if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } else { moduleValue = require(7243) /* metro dependency 7243: ReadStateUtils */; if (moduleValue.getHasImportantUnread(a0)) { binding = env0_1; binding.push(a0.id); } else if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } } else { userGuildSettingsStoreBinding = UserGuildSettingsStore; if (!userGuildSettingsStoreBinding.isChannelMuted(a0.guild_id, a0.parent_id)) { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.getMentionCount(a0.id) > 0) { binding = env0_0; binding.push(a0.id); } else if (isGuildVocalChannelType2) { if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } else { moduleValue = require(7243) /* metro dependency 7243: ReadStateUtils */; if (moduleValue.getHasImportantUnread(a0)) { binding = env0_1; binding.push(a0.id); } else if (isGuildVocalChannelType2) { voiceStateStoreBinding = VoiceStateStore; properties = Object.keys(voiceStateStoreBinding.getVoiceStatesForChannel(a0.id)); properties2 = 0; properties3 = properties.length; if (properties !== undefined) { propertyName = properties[properties2]; propertyName = properties2 + 1; if (propertyName !== undefined) { binding = Module00057; binding.push(a0.id); } } } else { readStateStoreBinding = ReadStateStore; if (readStateStoreBinding.hasUnread(a0.id)) { binding = env0_2; binding.push(a0.id); } } } } } } } } } function _fun117144() { // fn#117144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:7207, offset: 0x024a6236, size: 21 bytes, params: 1, frame: 2 env0_10.current = NavigationHistoryStoreModule.GUILD_PREFIX; } function _fun117145() { // fn#117145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:7259, offset: 0x024a624b, size: 316 bytes, params: 1, frame: 25 var r5; var guild_id; var r13; var r12; var Set; var binding; var prototype; var value2; var set; var value3; var getNavigationHistoryBinding; var value4; var navigationHistoryBinding; var items2; var value6; var value7; var length; var value8; var property; var startsWith; var idFromHistoryItem; var channel; var value11; var value12; var value13; var value14; if (!disabled) { if (visible) { Set = global.Set; binding = NavigationHistoryStoreModule.getIdFromHistoryItem; prototype = Set.prototype; value2 = Object.create(prototype, {constructor: {value: Set}}); set = new Set(); value3 = set instanceof Object ? set : value2; if (env0_2 != null) { value3.add(env0_2); } value = environment.__proto__; getNavigationHistoryBinding = getNavigationHistory; value4 = undefined; navigationHistoryBinding = getNavigationHistoryBinding(); items2 = []; Set = global.Set; prototype = Set.prototype; value6 = Object.create(prototype, {constructor: {value: Set}}); set = new Set(); value7 = set instanceof Object ? set : value6; length = navigationHistoryBinding.length; value8 = length - 1; if (value8 >= 0) { r5 = value8; while (true) { property = navigationHistoryBinding[r5]; if (property == null) { break; } startsWith = property.startsWith; if (Reflect.apply(startsWith, property, [CHANNEL_PREFIX])) { channel = ChannelStore.getChannel(getIdFromHistoryItem(property)); if (channel == null) { guild_id = value4; continue; } guild_id = channel.guild_id; r13 = guild_id; } else { idFromHistoryItem = getIdFromHistoryItem(property); r13 = idFromHistoryItem; } value11 = r13 == null; if (value11) { r12 = value11; continue; } value12 = value3.has(r13); r12 = value12; if (r12) { continue; } value13 = value7.has(r13); r12 = value13; if (r12) { continue; } value7.add(r13); items2.push(r13); length = items2.length; if (length >= 20) { break; } value14 = typeof r5 === 'bigint' ? r5 - 1n : +r5 - 1; if (value14 >= 0) { r5 = value14; continue; } break; } } return items2; } } return env0_12.current; } function _fun117146() { // fn#117146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:7627, offset: 0x024a6387, size: 21 bytes, params: 1, frame: 2 env0_12.current = ChannelRecordModule.isGuildSelectableChannelType; } function _fun117147() { // fn#117147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:7683, offset: 0x024a639c, size: 422 bytes, params: 1, frame: 23 var r5; var r3; var r6; var r0; var binding; var value2; var getNavigationHistoryBinding; var value3; var navigationHistoryBinding; var HermesInternal; var concat; var value5; var items3; var length; var value6; var property; var startsWith; var push; var value7; var items4; var items2; var Set; var prototype; var value8; var set; var value9; var value10; var value11; var done; var value12; var createAndAppendChannelBinding; var value13; var value14; var value15; var value16; var value17; var value18; let value = environment; if (disabled) { return undefined; } if (visible) { binding = Module00057; value2 = environment.__proto__; getNavigationHistoryBinding = getNavigationHistory; value3 = undefined; navigationHistoryBinding = getNavigationHistoryBinding(); reducibleJoin5: while (true) { if (binding != null) { HermesInternal = global.HermesInternal; concat = HermesInternal.concat; value5 = '' + CHANNEL_PREFIX + binding; r5 = value5; break reducibleJoin5; } r5 = value3; break reducibleJoin5; } items3 = []; length = navigationHistoryBinding.length; value6 = length - 1; if (value6 >= 0) { r3 = value6; reducibleLoop6: while (true) { property = navigationHistoryBinding[r3]; if (property == null) { break reducibleLoop6; } startsWith = property.startsWith; if (!Reflect.apply(startsWith, property, [GUILD_PREFIX])) { reducibleJoin10: while (true) { if (property === r5) { break reducibleJoin10; } push = items3.push; Reflect.apply(push, items3, [getIdFromHistoryItem(property)]); length = items3.length; if (length >= 20) { break reducibleLoop6; } break reducibleJoin10; } } value7 = typeof r3 === 'bigint' ? r3 - 1n : +r3 - 1; if (value7 >= 0) { r3 = value7; continue reducibleLoop6; } break reducibleLoop6; } } items4 = []; items2 = []; reducibleJoin14: while (true) { if (env0_4 != null) { break reducibleJoin14; } Set = global.Set; prototype = Set.prototype; value8 = Object.create(prototype, {constructor: {value: Set}}); set = new Set(); value9 = set instanceof Object ? set : value8; value10 = _createForOfIteratorHelperLoose_117130(items3); value11 = value10(); done = value11.done; if (done) { break reducibleJoin14; } r6 = value11; reducibleLoop13: while (true) { value12 = r6.value; createAndAppendChannel(getIdFromHistoryItem(value12), value9, items2); value13 = value10(); done = value13.done; if (done) { break reducibleJoin14; } r6 = value13; continue reducibleLoop13; } } Set = global.Set; prototype = Set.prototype; value14 = Object.create(prototype, {constructor: {value: Set}}); set = new Set(); value15 = set instanceof Object ? set : value14; length = NavigationHistoryStoreModule.GUILD_PREFIX.length; reducibleJoin17: while (true) { if (!(length > 0)) { break reducibleJoin17; } value = _createForOfIteratorHelperLoose_117130(NavigationHistoryStoreModule.GUILD_PREFIX); value16 = value(); done = value16.done; if (done) { break reducibleJoin17; } r5 = value16; reducibleLoop16: while (true) { createAndAppendChannelBinding = createAndAppendChannel; value17 = r5.value; createAndAppendChannelBinding(value17, value15, items4); value18 = value(); done = value18.done; if (done) { break reducibleJoin17; } r5 = value18; continue reducibleLoop16; } } length = items2.length; reducibleJoin20: while (true) { reducibleJoin19: while (true) { if (length > 0) { break reducibleJoin19; } length = items4.length; if (length > 0) { break reducibleJoin19; } r0 = value3; break reducibleJoin20; } r0 = {channelHistory: items2, unreads: items4}; break reducibleJoin20; } return r0; } return env0_14.current; } function _fun117148() { // fn#117148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:8297, offset: 0x024a6542, size: 21 bytes, params: 1, frame: 2 env0_14.current = env0_15; } } function _fun117149({tab, setTab, updateQuery, sharedState, searchRef}) { // fn#117149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:3453, offset: 0x024a6557, size: 1154 bytes, params: 2, frame: 31 var object6; var r5; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const styles = useStyles(); const isDeveloper = (require(566) /* metro dependency 566: flux */).useStateFromStores([DeveloperExperimentStore], function() { return DeveloperExperimentStore.isDeveloper; }); let binding = env0_4; var env0_4 = binding.useRef(false); const value2 = (ReanimatedRexportModule).useSharedValue(false); const env0_6 = env0_4.useRef(tab); env0_4.useEffect(_fun117151); const value3 = env0_4.useCallback(_fun117152, [value2, searchRef]); env0_4.useEffect(_fun117154, [(require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore], function() { return ActionSheetStore.isOpen(); }), value3]); env0_4.useEffect(_fun117155, [tab, sharedState, value3]); const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; const closure = function() { return sharedState.get(); }; closure.__closure = {sharedState: sharedState}; closure.__workletHash = 17067823098320; closure.__initData = env0_29; const S_1171572 = S_117157; object6 = {keyboardShown: value2}; object6.runOnJS = ReanimatedRexportModule.runOnJS; object6.setFocused = value3; S_1171572.__closure = object6; S_1171572.__workletHash = 3784684686013; S_1171572.__initData = env0_30; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, S_1171572]); let SEARCH = env0_28.SEARCH; if (tab === SEARCH) { const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField; r5 = ( ); } else { r5 = ( tab === env0_28.MEMBERS ? ( ) : ( tab === env0_28.NOTIFICATIONS ? ( ) : ( ) ) ); } const object = {icon: icon_117158}; let string = intl.string; const JqV7IC = (require(1244) /* metro dependency 1244: indexNative */).t.JqV7IC; object.accessibilityLabel = Reflect.apply(string, intl, [JqV7IC]); object.onPress = onPress_117159; binding = env0_28; SEARCH = binding.SEARCH; object.selected = tab === SEARCH; const items2 = [ , ]; const object5 = {icon: icon_117160}; string = intl.string; const HcoRu0 = (require(1244) /* metro dependency 1244: indexNative */).t.HcoRu0; object5.accessibilityLabel = Reflect.apply(string, intl, [HcoRu0]); object5.onPress = onPress_117161; const NOTIFICATIONS = binding.NOTIFICATIONS; object5.selected = tab === NOTIFICATIONS; items2[1] = ; items2[2] = ( isDeveloper ? ( ) : null ); return ( {r5} {items2} ); function _fun117151() { // fn#117151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:3659, offset: 0x024a69e8, size: 21 bytes, params: 1, frame: 2 env0_6.current = tab; } function _fun117152(a0, a1) { // fn#117152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:3704, offset: 0x024a69fd, size: 290 bytes, params: 3, frame: 14 var current; var value2; var value3; var bestActiveInput; var binding; var value5; var bestActiveInput2; if (a0) { current = env0_6.current; value2 = environment.__proto__; if (current === env1_28.SEARCH) { binding = env0_4; value5 = undefined; bestActiveInput2 = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput(); binding.current = (bestActiveInput2 == null ? value5 : bestActiveInput2.isFocused()) === true; current = searchRef.current; if (current != null) { ReactNativeModule.View.set(true); current = searchRef.current; if (current != null) { current.focus(); } } } else if (!a0) { current = env0_4.current; if (current) { if (!a1) { value3 = environment.__proto__; bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput(); if (bestActiveInput != null) { bestActiveInput.focus(); } } } current = searchRef.current; if (current != null) { current.blur(); } env0_4.current = false; ReactNativeModule.View.set(false); } } else if (!a0) { current = env0_4.current; if (current) { if (!a1) { value3 = environment.__proto__; bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput(); if (bestActiveInput != null) { bestActiveInput.focus(); } } } current = searchRef.current; if (current != null) { current.blur(); } env0_4.current = false; ReactNativeModule.View.set(false); } } function _fun117154() { // fn#117154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:4111, offset: 0x024a6b1f, size: 24 bytes, params: 1, frame: 13 const binding = env0_7; binding(!NavigationHistoryStoreModule.CHANNEL_PREFIX, NavigationHistoryStoreModule.CHANNEL_PREFIX); } function _fun117155() { // fn#117155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:4146, offset: 0x024a6b37, size: 67 bytes, params: 1, frame: 12 const tabBinding = tab; const SEARCH = env1_28.SEARCH; if (tabBinding === SEARCH && sharedState.get() === 1) { env0_7(true); } } function S_117157(a0) { // fn#117157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:4319, offset: 0x024a6b7a, size: 159 bytes, params: 2, frame: 14 var value2; var value5; const get = ReactNativeModule.View.get; if (Reflect.apply(get, ReactNativeModule.View, [])) { if (ReactNativeModule.View.get() && a0 <= 0) { value5 = environment.__proto__; (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_7)(false); } } else if (a0 > 0.75) { value2 = environment.__proto__; (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_7)(true); } else if (ReactNativeModule.View.get() && a0 <= 0) { value5 = environment.__proto__; (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_7)(false); } } function icon_117158(a0) { // fn#117158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:4934, offset: 0x024a6c19, size: 60 bytes, params: 2, frame: 14 const FlashIcon = (FlashIconModule).FlashIcon; return ; } function onPress_117159() { // fn#117159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5049, offset: 0x024a6c55, size: 54 bytes, params: 1, frame: 12 const setTabBinding = setTab; const SEARCH = env1_28.SEARCH; setTabBinding(SEARCH); const current = searchRef.current; if (current != null) { current.focus(); } } function icon_117160(a0) { // fn#117160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5146, offset: 0x024a6c8b, size: 60 bytes, params: 2, frame: 14 const BellIcon = (BellIconModule).BellIcon; return ; } function onPress_117161() { // fn#117161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5260, offset: 0x024a6cc7, size: 54 bytes, params: 1, frame: 12 const setTabBinding = setTab; const NOTIFICATIONS = env1_28.NOTIFICATIONS; setTabBinding(NOTIFICATIONS); const current = searchRef.current; if (current != null) { current.blur(); } } function icon_117162(a0) { // fn#117162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5372, offset: 0x024a6cfd, size: 60 bytes, params: 2, frame: 14 const StaffBadgeIcon = (StaffBadgeIconModule).StaffBadgeIcon; return ; } function onPress_117163() { // fn#117163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:5487, offset: 0x024a6d39, size: 142 bytes, params: 1, frame: 13 if (PlatformUtilsModule.isAndroid()) { (require(13121) /* metro dependency 13121: DevToolsNavigator */).navigateToDevTools(); (importDefault(15323) /* metro dependency 15323: hideLaunchPad */)(); } else { setTab(env1_28.DEV_TOOLS); } const current = searchRef.current; if (current != null) { current.blur(); } } } function LaunchPad({visible, sharedState}) { // fn#117164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9072, offset: 0x024a6dc7, size: 939 bytes, params: 2, frame: 39 var r8; var r18; const InitialResults = (require(15331) /* metro dependency 15331: LaunchPadSearchResults */).InitialResults; var object2; var value; const styles = useStyles(); let binding = env0_4; let useState = binding.useState; const value4 = property32(Reflect.apply(useState, binding, [false]), 2); const property = value4[0]; const env0_0 = value4[1]; const value5 = env0_4.useCallback(_fun117165, []); const value6 = env0_4.useRef(null); const {query, updateQuery, queryResults} = useAutocompleterResults(visible); const {initialResults, unreadPrivateChannelIds, unreadGuilds, guildHistory, selectedUnreadGuild, setSelectedUnreadGuild} = useInitialResults({disabled: query.trim().length > 0, visible: visible}); const [property2, property3] = property32(env0_4.useState(false), 2); var property32 = property3; binding = env0_4; useState = binding.useState; let SEARCH = env0_28.SEARCH; const value12 = property32(Reflect.apply(useState, binding, [SEARCH]), 2); const property4 = value12[0]; const property5 = value12[1]; const value13 = useWrapperStyles(); env0_4.useEffect(_fun117178, [query, property3, property2]); useDeferredQueryClear(updateQuery, value6, sharedState); const value14 = query.trim().length > 0; const env0_313 = ((Component) => )(env0_31); const r5 = query.trim().length === 0 && property4 === env0_28.SEARCH && ((Component) => )(importDefault(15324) /* metro dependency 15324: LaunchPadUnreadServers */); SEARCH = env0_28.SEARCH; if (property4 !== SEARCH) { if (property4 === env0_28.SEARCH) { object2 = {selectedGuildId: selectedUnreadGuild}; r18 = initialResults?.unreads ?? env0_32; object2.unreads = r18; r18 = initialResults?.channelHistory ?? env0_32; object2.history = r18; object2.expandedHistory = property; object2.toggleExpandedHistory = value5; r8 = ; } else if (property4 === env0_28.DEV_TOOLS) { value = importDefault(13122) /* metro dependency 13122: DevToolsContent */; value = ((Component) => )(value); r8 = value; } else if (property4 === env0_28.MEMBERS) { value = importDefault(15350) /* metro dependency 15350: LaunchPadMembers */; value = ((Component) => )(value); r8 = value; } else { value = importDefault(15351) /* metro dependency 15351: LaunchPadNotificationCenter */; value = ((Component) => )(value); r8 = value; } } else if (value14) { const SearchResults = (require(15331) /* metro dependency 15331: LaunchPadSearchResults */).SearchResults; r8 = ; } else if (property4 === env0_28.SEARCH) { object2 = {selectedGuildId: selectedUnreadGuild}; r18 = initialResults?.unreads ?? env0_32; object2.unreads = r18; r18 = initialResults?.channelHistory ?? env0_32; object2.history = r18; object2.expandedHistory = property; object2.toggleExpandedHistory = value5; r8 = ; } else if (property4 === env0_28.DEV_TOOLS) { value = importDefault(13122) /* metro dependency 13122: DevToolsContent */; value = ((Component) => )(value); r8 = value; } else if (property4 === env0_28.MEMBERS) { value = importDefault(15350) /* metro dependency 15350: LaunchPadMembers */; value = ((Component) => )(value); r8 = value; } else { value = importDefault(15351) /* metro dependency 15351: LaunchPadNotificationCenter */; value = ((Component) => )(value); r8 = value; } return ( {env0_313} {r5} {r8} ); function _fun117165() { // fn#117165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9189, offset: 0x024a7172, size: 25 bytes, params: 1, frame: 11 return env0_0(function(a0) { return !a0; }); } function useAutocompleterResults(a0) { // fn#117167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9228, owner: LaunchPad.useAutocompleterResults, offset: 0x024a718b, size: 284 bytes, params: 2, frame: 20 var environment; const env0_0 = a0; const value = environment.__proto__; let binding = env1_4; const [property, env0_1] = env1_3(binding.useState(''), 2); const [property2, env0_2] = env1_3(env1_4.useState(env1_32), 2); const property3 = env1_3(env1_4.useState(_fun117168), 1)[0]; env1_4.useEffect(function() { return _fun117171; }, [property3]); env1_4.useEffect(_fun117172, [property3]); env1_4.useEffect(_fun117174, [a0, property3]); binding = env1_4; const useCallback = binding.useCallback; return {queryResults: property2, query: property, updateQuery: Reflect.apply(useCallback, binding, [_fun117175, [property3]])}; function _fun117168() { // fn#117168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9361, offset: 0x024a72a7, size: 74 bytes, params: 1, frame: 17 var environment; let value = environment.__proto__.__proto__; const defaultImport = Autocompleter; const binding = env2_33; value = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}}); const defaultImport2 = new defaultImport(_fun117169, binding, undefined, {frecencyBoosters: true}); return defaultImport2 instanceof Object ? defaultImport2 : value; function _fun117169(a0, a1) { // fn#117169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9382, offset: 0x024a72f1, size: 75 bytes, params: 3, frame: 11 var binding; let value = a1.trim(); value = value.trim(); if (value === '') { value = environment.__proto__; binding = env1_2; value = environment.__proto__.__proto__.__proto__; binding(env3_32); } else { value = environment.__proto__; env1_2(a0); } } } function _fun117170() { // fn#117170, offset: 0x024a733c, size: 11 bytes, params: 1, frame: 1 return _fun117171; function _fun117171() { // fn#117171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9490, offset: 0x024a7347, size: 19 bytes, params: 1, frame: 9 return env1_3.clean(); } } function _fun117172() { // fn#117172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9523, offset: 0x024a735a, size: 47 bytes, params: 1, frame: 11 var environment; const value = environment.__proto__.__proto__; return (RouteManager).addRouteChangeListener(_fun117173); function _fun117173() { // fn#117173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9562, offset: 0x024a7389, size: 178 bytes, params: 1, frame: 15 const Set = global.Set; let value = environment.__proto__.__proto__.__proto__; const set = new Set(['user:' + AuthenticationStore.getId()]); value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */; value = value.getSelectedGuildFromRoute(); if (value != null) { set.add('guild:' + value); } value = environment.__proto__; const binding = env1_3; binding.setOptions({blacklist: set}, true); } } function _fun117174() { // fn#117174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9726, offset: 0x024a743b, size: 40 bytes, params: 1, frame: 9 const binding = env0_0; if (binding) { Module00057.resume(); } else { Module00057.pause(); } } function _fun117175(a0) { // fn#117175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:9784, offset: 0x024a7463, size: 34 bytes, params: 2, frame: 12 env0_1(a0); Module00057.search(a0); } } function useWrapperStyles() { // fn#117176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10184, owner: LaunchPad.useWrapperStyles, offset: 0x024a7485, size: 130 bytes, params: 1, frame: 17 const styles = useStyles(); const height = (UseWindowDimensionsNative)().height; const {top, bottom} = (UseSafeAreaInsetsNative)(); return env1_4.useMemo(function() { return [styles.wrapper, {maxHeight: height - top - bottom - 16}]; }, [height, top, bottom, styles]); } function _fun117178() { // fn#117178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10361, offset: 0x024a7544, size: 113 bytes, params: 1, frame: 14 var value2; var defaultImport; if (query.length > 0) { if (env0_2) { if (query.length === 0) { Module00057(false); } } else { value2 = environment.__proto__; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.LAUNCHPAD_SEARCHED); Module00057(true); } } else if (query.length === 0) { Module00057(false); } } function useDeferredQueryClear(a0, a1, a2) { // fn#117179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10459, owner: LaunchPad.useDeferredQueryClear, offset: 0x024a75b5, size: 297 bytes, params: 4, frame: 22 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; let binding = env1_4; const env0_3 = binding.useRef(-1); const value2 = env1_4.useCallback(_fun117180, [a0, a1]); binding = env1_4; let closure = _fun117182; const value3 = binding.useCallback(closure, []); env1_4.useEffect(function() { return _fun117184; }, []); const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; closure = useDeferredQueryClearU; closure.__closure = {sharedState: a2}; closure.__workletHash = 7315121230879; closure.__initData = env1_34; const useDeferredQueryClearA2 = useDeferredQueryClearA; object = {}; object.runOnJS = ReanimatedRexportModule.runOnJS; object.clearQuery = value2; object.cancelTimeout = value3; useDeferredQueryClearA2.__closure = object; useDeferredQueryClearA2.__workletHash = 6379173436444; useDeferredQueryClearA2.__initData = env1_35; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useDeferredQueryClearA2]); function _fun117180() { // fn#117180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10537, offset: 0x024a76de, size: 59 bytes, params: 1, frame: 14 const clearTimeout = global.clearTimeout; const binding = env0_3; clearTimeout(binding.current); binding.current = global.setTimeout(_fun117181, 100); function _fun117181() { // fn#117181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10588, offset: 0x024a7719, size: 68 bytes, params: 1, frame: 12 const clearTimeout = global.clearTimeout; let current = env1_3.current; clearTimeout(current); env1_0(''); current = require.current; if (current != null) { current.setText(''); } } } function _fun117182() { // fn#117182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10697, offset: 0x024a775d, size: 29 bytes, params: 1, frame: 11 global.clearTimeout(env0_3.current); } function _fun117183() { // fn#117183, offset: 0x024a777a, size: 11 bytes, params: 1, frame: 1 return _fun117184; function _fun117184() { // fn#117184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10749, offset: 0x024a7785, size: 29 bytes, params: 1, frame: 11 return global.clearTimeout(env1_3.current); } } function useDeferredQueryClearU() { // fn#117185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10816, owner: LaunchPad.useDeferredQueryClear.u, offset: 0x024a77a2, size: 24 bytes, params: 1, frame: 9 return importDefault.get() === 0; } function useDeferredQueryClearA(a0, a1) { // fn#117186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15519:10911, owner: LaunchPad.useDeferredQueryClear.a, offset: 0x024a77ba, size: 130 bytes, params: 3, frame: 12 var r0; let value = a0; const value2 = value !== a1; if (value2) { if (value) { if (value2) { value = environment.__proto__.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value.runOnJS(env0_4)(); } else { if (value) { r0 = value; } else { value = value === a1; r0 = value; } if (!r0) { value = environment.__proto__.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value.runOnJS(ReactNativeModule.View)(); } } } else { if (value) { r0 = value; } else { value = value === a1; r0 = value; } if (!r0) { value = environment.__proto__.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value.runOnJS(ReactNativeModule.View)(); } } } } } } } global.__d(_fun117129, 15322, [57, 31, 27, 3849, 5070, 6936, 5071, 1383, 1226, 1379, 7112, 5214, 12600, 4605, 4896, 4864, 4297, 661, 33, 697, 4501, 5278, 4573, 566, 4017, 4015, 6984, 1244, 10231, 9216, 13969, 477, 13121, 15323, 7242, 4007, 7243, 7234, 1478, 1585, 7235, 12080, 683, 15324, 15331, 13122, 15350, 15351, 2]) /* metro module 15322, dependencies: [57, 31, 27, 3849, 5070, 6936, 5071, 1383, 1226, 1379, 7112, 5214, 12600, 4605, 4896, 4864, 4297, 661, 33, 697, 4501, 5278, 4573, 566, 4017, 4015, 6984, 1244, 10231, 9216, 13969, 477, 13121, 15323, 7242, 4007, 7243, 7234, 1478, 1585, 7235, 12080, 683, 15324, 15331, 13122, 15350, 15351, 2] */;