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,256 @@
/* Metro module 9682; source: modules/search/SearchActionCreators.tsx; dependencies: [9675, 9683, 694, 22, 7170, 9686, 1362, 2] */
function _fun76068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:6, offset: 0x01dc306e, size: 196 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {fetchTabMessages: fetchTabMessages, fetchMessages: fetchMessages_76078,
clearSearchRecentMessages: clearSearchRecentMessages, clearAllSearchMesssages: clearAllSearchMesssages,
clearSearchMessages: clearSearchMessages, initializeAutocomplete: initializeAutocomplete,
updateAutocompleteQuery: updateAutocompleteQuery, markSearchTokensRefreshed: markSearchTokensRefreshed};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/SearchActionCreators.tsx');
exports.default = object2;
}
function fetchTabMessages({searchContext, searchTabs, searchQueryString, pagination, trackExactTotalHits, getId, getLimit, onFetchStart, onFetchSuccess, searchMode}) { // fn#76069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:116, offset: 0x01dc3132, size: 471 bytes, params: 2, frame: 28
const searchQueryFromTokens = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchQueryFromTokens((require(9675) /* metro dependency 9675: SearchUtils */).tokenizeQuery(searchQueryString));
((a0) => {
if (global.Array.isArray(a0.pinned)) {
a0.pinned = a0.pinned.some(_fun76071);
}
})(searchQueryFromTokens);
const value4 = (require(9675) /* metro dependency 9675: SearchUtils */).searchModeToSearchQueryParams(searchMode);
const object3 = {};
copyDataProperties(object3, searchQueryFromTokens, undefined);
copyDataProperties(object3, value4, undefined);
const guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(searchContext);
if (guildIdFromSearchContext != null) {
(require(9675) /* metro dependency 9675: SearchUtils */).setIncludeNSFW(object3, guildIdFromSearchContext);
}
const defaultImport = importDefault(9683) /* metro dependency 9683: SearchTabsFetchManager */;
const create = defaultImport.create;
const object4 = {};
object4.id = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
object4.searchContext = searchContext;
object4.searchQuery = object3;
object4.searchTabs = searchTabs;
object4.getLimit = getLimit;
object4.pagination = pagination;
object4.trackExactTotalHits = trackExactTotalHits;
const value6 = Reflect.apply(create, defaultImport, [object4]);
if (onFetchStart != null) {
onFetchStart({searchContext: searchContext, searchQueryString: searchQueryString, searchQuery: object3});
}
const value7 = searchTabs.map(function(a0) {
return getId(a0);
});
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'SEARCH_MESSAGES_START', ids: value7});
value6.fetch(_fun76073, _fun76076, _fun76077);
return true;
}
function fetchMessages_76078({searchContext, searchQueryString, pagination, searchMode, searchEverywhere, onFetchStart}) { // fn#76078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:1617, offset: 0x01dc35a2, size: 421 bytes, params: 2, frame: 26
const value2 = (require(9675) /* metro dependency 9675: SearchUtils */).tokenizeQuery(searchQueryString);
const object2 = {};
const searchUtilsModule = require(9675) /* metro dependency 9675: SearchUtils */;
const getSearchQueryFromTokens = searchUtilsModule.getSearchQueryFromTokens;
copyDataProperties(object2, Reflect.apply(getSearchQueryFromTokens, searchUtilsModule, [value2]), undefined);
const moduleValue3 = searchUtilsModule;
copyDataProperties(object2, moduleValue3.searchModeToSearchQueryParams(searchMode), undefined);
object2['offset'] = pagination.offset;
const guildIdFromSearchContext = searchUtilsModule.getGuildIdFromSearchContext(searchContext);
if (guildIdFromSearchContext != null) {
searchUtilsModule.setIncludeNSFW(object2, guildIdFromSearchContext);
}
if (searchEverywhere) {
object2.search_everywhere = true;
}
const searchContextId = searchUtilsModule.getSearchContextId(searchContext);
const value5 = (importDefault(9686) /* metro dependency 9686: SearchFetchManager */).create({id: searchContextId,
searchType: searchContext.type, searchQuery: object2});
if (onFetchStart != null) {
onFetchStart({searchContext: searchContext, searchQueryString: searchQueryString, searchQuery: object2});
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_MESSAGES_START',
ids: [searchContextId]});
value5.fetch(_fun76079, _fun76081, _fun76082);
}
function clearSearchRecentMessages() { // fn#76083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:2803, offset: 0x01dc38ff, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_RECENT_MESSAGES_CLEAR'});
}
function clearAllSearchMesssages() { // fn#76084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:2921, offset: 0x01dc3930, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_MESSAGES_CLEAR_ALL'});
}
function clearSearchMessages(a0) { // fn#76085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:3030, offset: 0x01dc3961, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_MESSAGES_CLEAR', id: a0});
}
function initializeAutocomplete(a0) { // fn#76086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:3140, offset: 0x01dc3999, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_AUTOCOMPLETE_INITIALIZE',
searchContext: a0});
}
function updateAutocompleteQuery({searchContext, tokens, queryString, cursorScope}) { // fn#76087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:3274, offset: 0x01dc39d2, size: 153 bytes, params: 2, frame: 16
if (queryString.trim().length > 0) {
(require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators.loadIfNecessary();
}
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'SEARCH_AUTOCOMPLETE_QUERY_UPDATE', searchContext: searchContext, tokens: tokens,
cursorScope: cursorScope});
}
function markSearchTokensRefreshed() { // fn#76088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:3569, offset: 0x01dc3a6b, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_TOKENS_REFRESHED'});
}
function fixSearchQueryPinned(a0) { // fn#76070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:363, owner: fetchTabMessages.fixSearchQueryPinned, offset: 0x01dc3309, size: 66 bytes, params: 2, frame: 12
const Array = global.Array;
const isArray = Array.isArray;
let pinned = a0.pinned;
if (Reflect.apply(isArray, Array, [pinned])) {
pinned = a0.pinned;
a0.pinned = pinned.some(function(a0) {
return a0 === true;
});
}
}
function _fun76073({body}) { // fn#76073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:916, offset: 0x01dc334b, size: 153 bytes, params: 2, frame: 16
const Object = global.Object;
const value = Object.entries(body.tabs);
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = defaultImport.dispatch;
const object2 = {type: 'SEARCH_MESSAGES_SUCCESS'};
object2.guildId = env0_3;
object2.data = value.map(_fun76074);
Reflect.apply(dispatch, defaultImport, [object2]);
if (onFetchSuccess != null) {
onFetchSuccess({searchContext: searchContext, tabEntries: value});
}
}
function _fun76076() { // fn#76076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:1461, offset: 0x01dc3521, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_MESSAGES_INDEXING',
ids: env0_4});
}
function _fun76077(a0) { // fn#76077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:1527, offset: 0x01dc355e, size: 68 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_MESSAGES_FAILURE', ids: env0_4,
error: a0});
}
function _fun76079(a0) { // fn#76079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:2202, offset: 0x01dc3747, size: 260 bytes, params: 2, frame: 18
var environment;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object3 = {type: 'SEARCH_MESSAGES_SUCCESS'};
object3.guildId = env0_0;
const object4 = {id: env0_1};
object4.analyticsId = a0.body.analytics_id;
object4.totalResults = a0.body.total_results;
object4.messages = a0.body.messages;
object4.threads = a0.body.threads ?? [];
object4.members = (a0.body.members ?? []).map(_fun76080);
object4.doingHistoricalIndex = a0.body.doing_deep_historical_index;
object4.documentsIndexed = a0.body.documents_indexed;
object4.channels = a0.body.channels ?? [];
object4.cursor = null;
object3.data = [object4];
Reflect.apply(dispatch, value, [object3]);
}
function _fun76081() { // fn#76081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:2634, offset: 0x01dc386e, size: 69 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_MESSAGES_INDEXING',
ids: [env0_1]});
}
function _fun76082(a0) { // fn#76082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:2702, offset: 0x01dc38b3, size: 76 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SEARCH_MESSAGES_FAILURE',
ids: [env0_1], error: a0});
}
function _fun76074(a0) { // fn#76074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:1029, offset: 0x01dc33e4, size: 282 bytes, params: 2, frame: 17
var environment;
var r0;
var r2;
var r3;
var r4;
var item3;
var value3;
var value8;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (value2) {
r0 = item2;
r2 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r2 = value3;
r3 = value;
} else {
r0 = item3;
r2 = value3;
r3 = item;
}
}
if (!r2) {
r0.return();
}
const id = getId(r1);
const cursor = r3.cursor;
const object2 = {id: id};
object2.analyticsId = body.analytics_id;
object2.totalResults = r3.total_results;
const value7 = null;
if (value7 == cursor) {
r4 = cursor;
} else {
value8 = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
r4 = value.isEmpty(cursor) ? value7 : cursor;
}
object2.cursor = r4;
object2.messages = r3.messages;
const channels = r3.channels;
object2.channels = value7 != channels ? channels : [];
const threads = r3.threads;
object2.threads = value7 != threads ? threads : [];
const members = r3.members;
object2.members = (value7 != members ? members : []).map(_fun76075);
bodyBinding = body;
object2.doingHistoricalIndex = bodyBinding.doing_deep_historical_index;
object2.documentsIndexed = bodyBinding.documents_indexed;
return object2;
}
function _fun76080(a0) { // fn#76080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:2461, offset: 0x01dc384b, size: 35 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(7170) /* metro dependency 7170: convertServerThreadMember */)(a0);
}
function _fun76075(a0) { // fn#76075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9868:1305, offset: 0x01dc34fe, size: 35 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (importDefault(7170) /* metro dependency 7170: convertServerThreadMember */)(a0);
}
@@ -0,0 +1,610 @@
/* Metro module 9677; source: modules/search/SearchAutocompleteStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1945, 1867, 1934, 3996, 1878, 661, 6587, 9675, 7238, 3995, 5062, 6592, 6526, 9676, 566, 694, 2] */
function _fun75995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:6, offset: 0x01dc0f40, size: 756 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_76001 = 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 stateFactory = function({searchContext, query, mode, tokens, cursorScope, autocompletes}) {
getOrCreateUserSearchContext(searchContext);
return {searchContext: searchContext, query: query, mode: mode, tokens: tokens, cursorScope: cursorScope,
autocompletes: autocompletes};
};
const isUserAutocompleteFilter = function(a0) {
return a0 != null && (a0 === SearchTokenTypes.FILTER_FROM || a0 === SearchTokenTypes.FILTER_MENTIONS);
};
const closure = CHANNEL_CREATE_76011;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const streamerModeStore = importDefault(3996) /* metro dependency 3996: StreamerModeStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_14 = constantsModule.SearchPopoutModes;
const SearchTokenTypes = constantsModule.SearchTokenTypes;
const env0_16 = constantsModule.ME;
const env0_17 = (require(6587) /* metro dependency 6587: AutocompleterConstants */).AutocompleterResultTypes;
const env0_19 = [];
let Map = global.Map;
let map = new Map();
Map = global.Map;
map = new Map();
const Set = global.Set;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
items = [FILTER_FROM];
const FILTER_IN = SearchTokenTypes.FILTER_IN;
items[1] = FILTER_IN;
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
items[2] = FILTER_MENTIONS;
Object.create(Set.prototype, {constructor: {value: Set}});
new Set(items);
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun76013(Store).displayName = 'SearchAutocompleteStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{SEARCH_AUTOCOMPLETE_INITIALIZE: function({searchContext}) {
setSelectedSearchContext(searchContext);
rebuildAutocompleteResults(searchContext);
}, SEARCH_AUTOCOMPLETE_QUERY_UPDATE: SEARCH_AUTOCOMPLETE_QUERY_UPDATE,
SEARCH_EDITOR_STATE_CLEAR: SEARCH_EDITOR_STATE_CLEAR, CHANNEL_CREATE: closure, CHANNEL_DELETE: closure,
STREAMER_MODE_UPDATE: STREAMER_MODE_UPDATE_76021, CHANNEL_SELECT: CHANNEL_SELECT_76022});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/SearchAutocompleteStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_75996() { // fn#75996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:310, offset: 0x01dc1234, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_75996_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_75999(a0, a1) { // fn#75999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:503, offset: 0x01dc1296, 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 _fun76000;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_76001(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_76001(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_76001(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun76000;
}
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 getOrCreateUserSearchContext(a0) { // fn#76002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:1509, offset: 0x01dc140a, size: 140 bytes, params: 2, frame: 19
var r0;
var defaultImport;
var getUserSearchContext;
var handleUserSearchResultsBinding;
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value3 = env0_21.get(searchContextId);
if (value3 != null) {
r0 = value3;
} else {
defaultImport = importDefault(7238) /* metro dependency 7238: UserSearchManager */;
getUserSearchContext = defaultImport.getUserSearchContext;
handleUserSearchResultsBinding = handleUserSearchResults;
r0 = {results: [], context: Reflect.apply(getUserSearchContext, defaultImport,
[handleUserSearchResultsBinding.bind(null, a0)])};
}
env0_21.set(searchContextId, r0);
return r0;
}
function isUserAutocompleteMode(a0) { // fn#76005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:2024, offset: 0x01dc151e, size: 46 bytes, params: 2, frame: 12
const type = a0.type;
const FILTER = SearchPopoutModes.FILTER;
return type === FILTER && isUserAutocompleteFilter(a0.filter);
}
function handleUserSearchResults(a0, {results}) { // fn#76006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:2120, offset: 0x01dc154c, size: 404 bytes, params: 3, frame: 28
var r12;
var r9;
var isUserAutocompleteModeBinding;
var mode;
var object;
var value8;
var value9;
var done;
var value10;
var length;
var getUser;
var id;
var value11;
var defaultImport;
var userTag;
var value13;
var query;
var tokens;
var stateFactoryBinding;
var value14;
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
let binding = env0_21;
const value3 = binding.get(searchContextId);
const value4 = env0_20.get(searchContextId);
if (value3 != null) {
if (value4 != null) {
isUserAutocompleteModeBinding = isUserAutocompleteMode;
mode = value4.mode;
if (isUserAutocompleteModeBinding(mode)) {
mode = value4.mode;
r12 = mode.type !== SearchPopoutModes.FILTER ? 3 : 10;
r12 = r12 === undefined ? 10 : r12;
object = [];
value8 = _createForOfIteratorHelperLoose_75999(results);
value9 = value8();
done = value9.done;
if (!done) {
r9 = value9;
while (true) {
value10 = r9.value;
length = object.length;
if (length >= r12) {
break;
}
getUser = UserStore.getUser;
id = value10.id;
value11 = Reflect.apply(getUser, UserStore, [id]);
if (value11 == null) {
continue;
}
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
userTag = defaultImport.getUserTag(value11);
if (userTag == null) {
continue;
}
object.push({text: userTag, user: value11});
value13 = value8();
done = value13.done;
if (done) {
break;
}
r9 = value13;
continue;
}
}
value3.results = object;
query = value4.query;
mode = value4.mode;
tokens = value4.tokens;
stateFactoryBinding = stateFactory;
object = {searchContext: a0, query: query, mode: mode, tokens: tokens};
object.cursorScope = value4.cursorScope;
object.autocompletes = getAutocompleteList(a0, mode, tokens);
value14 = stateFactoryBinding(object);
binding = env0_20;
binding.set(searchContextId, value14);
binding = env0_23;
binding.emitChange();
}
}
}
}
function setSelectedSearchContext(a0) { // fn#76007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:2758, offset: 0x01dc16e0, size: 77 bytes, params: 2, frame: 14
if (!(importDefault(5062) /* metro dependency 5062 */)(env0_18, a0)) {
env0_18 = a0;
(require(9675) /* metro dependency 9675: SearchUtils */).clearTokenCache();
}
}
function getAutocompleteList(a0, a1, a2) { // fn#76008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:2844, offset: 0x01dc172d, size: 151 bytes, params: 4, frame: 12
var value2;
const type = a1.type;
const FILTER = SearchPopoutModes.FILTER;
if (FILTER === type) {
value2 = generateFilterResults({filter: a1.filter, currentToken: a1.token, searchContext: a0,
maxResults: env0_22,
tokens: a2});
return value2 != null ? [value2] : env0_19;
}
const FILTER_ALL = SearchPopoutModes.FILTER_ALL;
if (FILTER_ALL === type) {
return env0_19;
}
const EMPTY = SearchPopoutModes.EMPTY;
if (EMPTY === type) {
return env0_19;
}
}
function CHANNEL_CREATE_76011() { // fn#76011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:3771, offset: 0x01dc19a2, size: 37 bytes, params: 1, frame: 11
(require(9675) /* metro dependency 9675: SearchUtils */).clearTokenCache();
}
function rebuildAutocompleteResults(a0) { // fn#76012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:3838, offset: 0x01dc19c7, size: 154 bytes, params: 2, frame: 21
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value3 = env0_20.get(searchContextId);
if (value3 == null) {
return false;
}
const query = value3.query;
const mode = value3.mode;
const tokens = value3.tokens;
const stateFactoryBinding = stateFactory;
const object2 = {searchContext: a0, query: query, mode: mode, tokens: tokens};
object2.cursorScope = value3.cursorScope;
object2.autocompletes = getAutocompleteList(a0, mode, tokens);
env0_20.set(searchContextId, stateFactoryBinding(object2));
}
function _fun76013(a0) { // fn#76013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:4122, offset: 0x01dc1a61, size: 122 bytes, params: 2, frame: 16
const closure = SearchAutocompleteStoreClass;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildMemberStore, GuildStore, SelectedChannelStore, StreamerModeStore, UserStore);
}}, {key: 'getState', value: value_76016}, {key: 'getSelectedSearchContext', value: value_76017}]);
}
function SEARCH_AUTOCOMPLETE_QUERY_UPDATE({searchContext, tokens, cursorScope}) { // fn#76019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:5127, offset: 0x01dc1bb5, size: 601 bytes, params: 2, frame: 29
var r15;
var autocompletes;
var r12;
var r0;
var r6;
var value7;
var context;
var autocompleteList;
var orCreateUserSearchContext;
var token;
var autocompleteList2;
var guildIdFromSearchContext;
var setQuery;
var object2;
var moduleValue5;
setSelectedSearchContext(searchContext);
const queryFromTokens = (require(9675) /* metro dependency 9675: SearchUtils */).getQueryFromTokens(tokens);
const autocompleteMode = (require(9675) /* metro dependency 9675: SearchUtils */).getAutocompleteMode(cursorScope,
tokens);
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const value6 = env0_20.get(searchContextId);
if (value6 == null) {
if (isUserAutocompleteMode(autocompleteMode)) {
orCreateUserSearchContext = getOrCreateUserSearchContext(searchContext);
token = autocompleteMode.token;
r15 = token == null ? undefined : token.getFullMatch()?.trim();
if (r15 == null) {
orCreateUserSearchContext.context.clearQuery();
autocompleteList2 = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList2;
} else if (r15.length > 0) {
guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(searchContext);
if (guildIdFromSearchContext != null) {
(importDefault(6592) /* metro dependency 6592: GuildUtils */).requestMembers(guildIdFromSearchContext,
r15,
env0_22);
}
context = orCreateUserSearchContext.context;
setQuery = context.setQuery;
object2 = {query: r15};
object2.filters = {guild: guildIdFromSearchContext ?? undefined};
moduleValue5 = require(6526) /* metro dependency 6526: AutocompleteUtils */;
object2.boosters = moduleValue5.getBoosterMap(AutocompleterResultTypes.USER);
Reflect.apply(setQuery, context, [object2]);
r12 = value6?.autocompletes ?? [];
r0 = false;
r6 = r12;
} else {
orCreateUserSearchContext.context.clearQuery();
autocompleteList2 = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList2;
}
} else {
value7 = env0_21.get(searchContextId);
if (value7 != null) {
value7.context.clearQuery();
value7.results = [];
}
autocompleteList = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList;
}
} else if (queryFromTokens !== value6.query) {
if (isUserAutocompleteMode(autocompleteMode)) {
orCreateUserSearchContext = getOrCreateUserSearchContext(searchContext);
token = autocompleteMode.token;
r15 = token == null ? undefined : token.getFullMatch()?.trim();
if (r15 == null) {
orCreateUserSearchContext.context.clearQuery();
autocompleteList2 = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList2;
} else if (r15.length > 0) {
guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(searchContext);
if (guildIdFromSearchContext != null) {
(importDefault(6592) /* metro dependency 6592: GuildUtils */).requestMembers(guildIdFromSearchContext,
r15,
env0_22);
}
context = orCreateUserSearchContext.context;
setQuery = context.setQuery;
object2 = {query: r15};
object2.filters = {guild: guildIdFromSearchContext ?? undefined};
moduleValue5 = require(6526) /* metro dependency 6526: AutocompleteUtils */;
object2.boosters = moduleValue5.getBoosterMap(AutocompleterResultTypes.USER);
Reflect.apply(setQuery, context, [object2]);
r12 = value6?.autocompletes ?? [];
r0 = false;
r6 = r12;
} else {
orCreateUserSearchContext.context.clearQuery();
autocompleteList2 = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList2;
}
} else {
value7 = env0_21.get(searchContextId);
if (value7 != null) {
value7.context.clearQuery();
value7.results = [];
}
autocompleteList = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList;
}
} else if (value6.mode == null) {
autocompletes = value6.autocompletes;
r0 = false;
r6 = autocompletes;
} else if (value6.mode.filter === autocompleteMode.filter) {
autocompletes = value6.autocompletes;
r0 = false;
r6 = autocompletes;
} else if (isUserAutocompleteMode(autocompleteMode)) {
orCreateUserSearchContext = getOrCreateUserSearchContext(searchContext);
token = autocompleteMode.token;
r15 = token == null ? undefined : token.getFullMatch()?.trim();
if (r15 == null) {
orCreateUserSearchContext.context.clearQuery();
autocompleteList2 = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList2;
} else if (r15.length > 0) {
guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(searchContext);
if (guildIdFromSearchContext != null) {
(importDefault(6592) /* metro dependency 6592: GuildUtils */).requestMembers(guildIdFromSearchContext,
r15,
env0_22);
}
context = orCreateUserSearchContext.context;
setQuery = context.setQuery;
object2 = {query: r15};
object2.filters = {guild: guildIdFromSearchContext ?? undefined};
moduleValue5 = require(6526) /* metro dependency 6526: AutocompleteUtils */;
object2.boosters = moduleValue5.getBoosterMap(AutocompleterResultTypes.USER);
Reflect.apply(setQuery, context, [object2]);
r12 = value6?.autocompletes ?? [];
r0 = false;
r6 = r12;
} else {
orCreateUserSearchContext.context.clearQuery();
autocompleteList2 = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList2;
}
} else {
value7 = env0_21.get(searchContextId);
if (value7 != null) {
value7.context.clearQuery();
value7.results = [];
}
autocompleteList = getAutocompleteList(searchContext, autocompleteMode, tokens);
r0 = true;
r6 = autocompleteList;
}
env0_20.set(searchContextId, stateFactory({searchContext: searchContext, query: queryFromTokens,
mode: autocompleteMode, tokens: tokens, cursorScope: cursorScope, autocompletes: r6}));
return r0;
}
function SEARCH_EDITOR_STATE_CLEAR({id}) { // fn#76020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:6159, offset: 0x01dc1e0e, size: 92 bytes, params: 2, frame: 14
const value2 = env0_21.get(id);
if (value2 != null) {
value2.context.destroy();
value2.results = [];
env0_21.delete(id);
}
env0_20.delete(id);
}
function STREAMER_MODE_UPDATE_76021() { // fn#76021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:6403, offset: 0x01dc1e6a, size: 33 bytes, params: 1, frame: 12
return env0_18 != null && rebuildAutocompleteResults(env0_18);
}
function generateFilterResults({filter, currentToken, searchContext, maxResults, tokens}) { // fn#76009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:2915, owner: getAutocompleteList.generateFilterResults, offset: 0x01dc17c4, size: 436 bytes, params: 2, frame: 22
var r2;
var getAutocompletions;
var r5;
var r3;
var fullMatch;
var property;
var value9;
let value = undefined;
maxResults = maxResults === value ? 10 : maxResults;
if (filter == null) {
return null;
}
if (currentToken == null) {
r2 = value;
} else {
fullMatch = currentToken.getFullMatch();
r2 = fullMatch == null ? value : fullMatch.trim();
}
const r8 = r2 ?? '';
const length = r8.length;
const searchUtilsModule = require(9675) /* metro dependency 9675: SearchUtils */;
if (searchUtilsModule.isGuildLikeSearchContext(searchContext)) {
if (isUserAutocompleteFilter(filter)) {
if (length === 0) {
property = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[filter];
getAutocompletions = property == null ? value : property.getAutocompletions;
r5 = getAutocompletions != null ? getAutocompletions({query: r8, searchContext: searchContext,
maxResults: maxResults, tokens: tokens}) : [];
} else {
r5 = getOrCreateUserSearchContext(searchContext).results;
}
} else {
property = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[filter];
getAutocompletions = property == null ? value : property.getAutocompletions;
r5 = getAutocompletions != null ? getAutocompletions({query: r8, searchContext: searchContext,
maxResults: maxResults, tokens: tokens}) : [];
}
} else {
property = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[filter];
getAutocompletions = property == null ? value : property.getAutocompletions;
r5 = getAutocompletions != null ? getAutocompletions({query: r8, searchContext: searchContext,
maxResults: maxResults, tokens: tokens}) : [];
}
if (r5 == null) {
r3 = r5;
} else if (isUserAutocompleteFilter(filter)) {
value = require(9676) /* metro dependency 9676: SearchTokens */;
if (value.isMeAutcompleteAnswer(r8)) {
value = UserStore.getCurrentUser();
if (value == null) {
r3 = r5;
} else {
value9 = r5.filter(_fun76010);
value9.unshift({text: ME, user: value});
r3 = value9;
}
} else {
r3 = r5;
}
} else {
r3 = r5;
}
return r3 == null || r3.length === 0 ? null : {group: filter, results: r3};
}
function value_76016(a0) { // fn#76016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:4553, offset: 0x01dc1b0a, size: 137 bytes, params: 2, frame: 13
return env1_20.get((require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0)) ?? ({searchContext: a0,
query: '', mode: {'type': null, 'filter': null, 'token': null, type: SearchPopoutModes.EMPTY}, tokens: [],
cursorScope: null, autocompletes: []});
}
function _fun76010({user}) { // fn#76010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9863:3507, offset: 0x01dc1978, size: 42 bytes, params: 2, frame: 3
return user?.id !== env0_0.id;
}
+291
View File
@@ -0,0 +1,291 @@
/* Metro module 9615; source: modules/search/SearchConstants.tsx; dependencies: [661, 3834, 2] */
function _fun75338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9801:6, offset: 0x01daa81e, size: 2321 bytes, params: 8, frame: 43
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const SearchTypes = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const object = {Messages: 0};
object[0] = 'Messages';
object.Media = 1;
object[1] = 'Media';
object.Link = 2;
object[2] = 'Link';
object.File = 3;
object[3] = 'File';
object.Pins = 4;
object[4] = 'Pins';
const object4 = {};
let Media = object.Media;
object4[Media] = {has: ['image', 'video']};
let File = object.File;
object4[File] = {has: ['file']};
let Messages = object.Messages;
object4[Messages] = {};
let Link = object.Link;
object4[Link] = {has: ['link']};
let Pins = object.Pins;
object4[Pins] = {pinned: true};
const object5 = {RECENT: 'recent', MEMBERS: 'members', PEOPLE: 'people', MEDIA: 'media', PINS: 'pins',
MESSAGES: 'messages', LINKS: 'links', FILES: 'files', GUILD_CHANNELS: 'guild_channels', THREADS: 'threads'};
const object6 = {};
let MEDIA = object5.MEDIA;
object6[MEDIA] = 15;
let MESSAGES = object5.MESSAGES;
object6[MESSAGES] = 15;
let PINS = object5.PINS;
object6[PINS] = 15;
let LINKS = object5.LINKS;
object6[LINKS] = 10;
let FILES = object5.FILES;
object6[FILES] = 10;
MESSAGES = object5.MESSAGES;
const items14 = [MESSAGES];
MEDIA = object5.MEDIA;
items14[1] = MEDIA;
PINS = object5.PINS;
items14[2] = PINS;
LINKS = object5.LINKS;
items14[3] = LINKS;
FILES = object5.FILES;
items14[4] = FILES;
const Set = global.Set;
const set = new Set(items14);
MEDIA = object5.MEDIA;
const items2 = [MEDIA];
LINKS = object5.LINKS;
items2[1] = LINKS;
FILES = object5.FILES;
items2[2] = FILES;
MEDIA = object5.MEDIA;
const items3 = [MEDIA];
LINKS = object5.LINKS;
items3[1] = LINKS;
PINS = object5.PINS;
items3[2] = PINS;
FILES = object5.FILES;
items3[3] = FILES;
const object7 = {};
let RECENT = object5.RECENT;
Media = object.Media;
object7[RECENT] = Media;
MEDIA = object5.MEDIA;
Media = object.Media;
object7[MEDIA] = Media;
PINS = object5.PINS;
Pins = object.Pins;
object7[PINS] = Pins;
MESSAGES = object5.MESSAGES;
Messages = object.Messages;
object7[MESSAGES] = Messages;
LINKS = object5.LINKS;
Link = object.Link;
object7[LINKS] = Link;
FILES = object5.FILES;
File = object.File;
object7[FILES] = File;
RECENT = object5.RECENT;
const items4 = [RECENT];
let PEOPLE = object5.PEOPLE;
items4[1] = PEOPLE;
MEDIA = object5.MEDIA;
items4[2] = MEDIA;
PINS = object5.PINS;
items4[3] = PINS;
LINKS = object5.LINKS;
items4[4] = LINKS;
FILES = object5.FILES;
items4[5] = FILES;
PEOPLE = object5.PEOPLE;
const items5 = [PEOPLE];
MESSAGES = object5.MESSAGES;
items5[1] = MESSAGES;
MEDIA = object5.MEDIA;
items5[2] = MEDIA;
PINS = object5.PINS;
items5[3] = PINS;
LINKS = object5.LINKS;
items5[4] = LINKS;
FILES = object5.FILES;
items5[5] = FILES;
RECENT = object5.RECENT;
const items6 = [RECENT];
let MEMBERS = object5.MEMBERS;
items6[1] = MEMBERS;
let GUILD_CHANNELS = object5.GUILD_CHANNELS;
items6[2] = GUILD_CHANNELS;
MEDIA = object5.MEDIA;
items6[3] = MEDIA;
PINS = object5.PINS;
items6[4] = PINS;
LINKS = object5.LINKS;
items6[5] = LINKS;
FILES = object5.FILES;
items6[6] = FILES;
MEMBERS = object5.MEMBERS;
const items7 = [MEMBERS];
GUILD_CHANNELS = object5.GUILD_CHANNELS;
items7[1] = GUILD_CHANNELS;
MESSAGES = object5.MESSAGES;
items7[2] = MESSAGES;
MEDIA = object5.MEDIA;
items7[3] = MEDIA;
PINS = object5.PINS;
items7[4] = PINS;
LINKS = object5.LINKS;
items7[5] = LINKS;
FILES = object5.FILES;
items7[6] = FILES;
MEMBERS = object5.MEMBERS;
const items8 = [MEMBERS];
MEDIA = object5.MEDIA;
items8[1] = MEDIA;
PINS = object5.PINS;
items8[2] = PINS;
LINKS = object5.LINKS;
items8[3] = LINKS;
FILES = object5.FILES;
items8[4] = FILES;
MESSAGES = object5.MESSAGES;
const items9 = [MESSAGES];
MEDIA = object5.MEDIA;
items9[1] = MEDIA;
PINS = object5.PINS;
items9[2] = PINS;
LINKS = object5.LINKS;
items9[3] = LINKS;
FILES = object5.FILES;
items9[4] = FILES;
MEMBERS = object5.MEMBERS;
const items10 = [MEMBERS];
GUILD_CHANNELS = object5.GUILD_CHANNELS;
items10[1] = GUILD_CHANNELS;
MEDIA = object5.MEDIA;
items10[2] = MEDIA;
PINS = object5.PINS;
items10[3] = PINS;
const THREADS = object5.THREADS;
items10[4] = THREADS;
LINKS = object5.LINKS;
items10[5] = LINKS;
FILES = object5.FILES;
items10[6] = FILES;
MEMBERS = object5.MEMBERS;
const items11 = [MEMBERS];
GUILD_CHANNELS = object5.GUILD_CHANNELS;
items11[1] = GUILD_CHANNELS;
MESSAGES = object5.MESSAGES;
items11[2] = MESSAGES;
MEDIA = object5.MEDIA;
items11[3] = MEDIA;
PINS = object5.PINS;
items11[4] = PINS;
LINKS = object5.LINKS;
items11[5] = LINKS;
FILES = object5.FILES;
items11[6] = FILES;
MEMBERS = object5.MEMBERS;
const items12 = [MEMBERS];
MEDIA = object5.MEDIA;
items12[1] = MEDIA;
PINS = object5.PINS;
items12[2] = PINS;
LINKS = object5.LINKS;
items12[3] = LINKS;
FILES = object5.FILES;
items12[4] = FILES;
MEMBERS = object5.MEMBERS;
const items13 = [MEMBERS];
MESSAGES = object5.MESSAGES;
items13[1] = MESSAGES;
MEDIA = object5.MEDIA;
items13[2] = MEDIA;
PINS = object5.PINS;
items13[3] = PINS;
LINKS = object5.LINKS;
items13[4] = LINKS;
FILES = object5.FILES;
items13[5] = FILES;
const object13 = {};
let THREAD = SearchTypes.THREAD;
object13[THREAD] = items12;
let CHANNEL = SearchTypes.CHANNEL;
object13[CHANNEL] = items8;
let GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
object13[GUILD_CHANNEL] = items10;
let GUILD = SearchTypes.GUILD;
object13[GUILD] = items6;
let DMS = SearchTypes.DMS;
object13[DMS] = items4;
const object14 = {};
THREAD = SearchTypes.THREAD;
object14[THREAD] = items13;
CHANNEL = SearchTypes.CHANNEL;
object14[CHANNEL] = items9;
GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
object14[GUILD_CHANNEL] = items11;
GUILD = SearchTypes.GUILD;
object14[GUILD] = items7;
DMS = SearchTypes.DMS;
object14[DMS] = items5;
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
const COZY = ChannelListLayoutTypes.COZY;
FILES = object5.FILES;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/SearchConstants.tsx');
exports.SearchAutocompleteSelectAnalyticsActions = {KEY_PRESS: 'key_press', CLICK: 'click'};
exports.WEB_SEARCH_HISTORY_STORAGE_KEY = 'SearchStore';
exports.NATIVE_SEARCH_HISTORY_STORAGE_KEY = 'SearchHistoryStore';
exports.WEB_SEARCH_HISTORY_STORE_DISPLAY_NAME = 'SearchHistoryStore_Web';
exports.NATIVE_SEARCH_HISTORY_STORE_DISPLAY_NAME = 'SearchHistoryStore';
exports.SearchFilter = object;
exports.SEARCH_QUERY_DEFAULT_FILTERS = {'sort_by': 'timestamp', 'sort_order': 'desc'};
exports.SEARCH_QUERY_BY_SEARCH_FILTER = object4;
exports.SEARCH_PINNED_MESSAGES_LINE_CLAMP = 10;
exports.SEARCH_MESSAGES_DEFAULT_LINE_CLAMP = 4;
exports.SearchTabs = object5;
exports.SEARCH_TABS_TO_SEARCH_QUERY_LIMITS = object6;
exports.MESSAGE_SEARCH_RESULT_TABS = items14;
exports.MESSAGE_SEARCH_RESULT_TABS_SET = set;
exports.CHANNEL_SEARCH_INITIAL_MESSAGE_TABS = items2;
exports.SEARCH_INITIAL_MESSAGE_TABS = items3;
exports.SEARCH_FILTERS_BY_TAB = object7;
exports.SEARCH_TYPE_TO_SEARCH_INITIAL_TABS = object13;
exports.SEARCH_TYPE_TO_SEARCH_RESULT_TABS = object14;
exports.SearchHistoryItemTypes = {GUILD_TEXT_CHANNEL: 'guild_text_channel',
GUILD_VOICE_CHANNEL: 'guild_voice_channel', GROUP_DM: 'group_dm', DM: 'dm', TEXT: 'text'};
exports.SearchListItemTypes = {DM: 'dm', GENERIC: 'generic', GROUP_DM: 'group_dm',
GUILD_TEXT_CHANNEL: 'guild_text_channel', GUILD_VOICE_CHANNEL: 'guild_voice_channel',
SEARCH_HISTORY_ITEM: 'search_history_item', MEDIA: 'media', MEDIA_PLACEHOLDER: 'media_placeholder',
MEDIA_GRID: 'media_grid', MESSAGE: 'message', MESSAGE_PLACEHOLDER: 'message_placeholder', FILE: 'file',
LINK: 'link', FILE_OR_LINK_PLACEHOLDER: 'file_or_link_placeholder', SECTION: 'section',
GUILD_CHANNEL_MEMBER_PLACEHOLDER: 'guild_channel_member_placeholder',
GUILD_CHANNEL_MEMBER: 'guild_channel_member'};
exports.SEARCH_LIST_SECTION_TOP_PADDING = 16;
exports.SEARCH_LIST_HORIZONTAL_PADDING = 16;
exports.FILES_OR_LINKS_GAP_WIDTH = 8;
exports.MEDIA_ITEM_GAP_WIDTH = 4;
exports.SEARCH_ROW_TAP_STATE_PADDING = 8;
exports.FILE_OR_LINK_IMAGE_RATIO = 0.72;
exports.FILE_OR_LINK_IMAGE_BUFFER = 50;
exports.FILES_OR_LINKS_NUM_COLUMNS = 2;
exports.MEDIA_NUM_COLUMNS = 3;
exports.CHANNELS_ESTIMATED_ITEM_SIZE = 64;
exports.USER_ESTIMATED_ITEM_SIZE = 56;
exports.MESSAGE_ESTIMATED_ITEM_SIZE = 110;
exports.CARD_ESTIMATED_ITEM_SIZE = 150;
exports.RECENTS_ESTIMATED_ITEM_SIZE = 64;
exports.MESSAGE_PLACEHOLDER_ITEM_SIZE = 64;
exports.CHANNEL_LIST_SEARCH_LAYOUT = COZY;
exports.EMPTY_VOICE_STATES = [];
exports.EMPTY_SEARCH_TAB_COUNTS = {};
exports.FADE_LAYOUT_ANIMATION_DURATION = 350;
exports.EMPTY_SEARCH_QUERY_STRING = '';
exports.SEARCH_MESSAGE_TAB_SENTINEL = FILES;
exports.MAX_SEARCH_RESULTS_LIMIT = 25;
exports.SearchMediaTypes = {AUDIO: 'audio', EMBED: 'embed', ATTACHMENT: 'attachment', COMPONENT: 'component'};
exports.SearchLinkTypes = {TEXT: 'text', EMBED: 'embed'};
exports.SearchFileTypes = {AUDIO: 'audio', MEDIA_ATTACHMENT: 'media_attachment', ATTACHMENT: 'attachment'};
exports.SEARCH_BAR_HEIGHT = 40;
exports.SearchQueryTagTypes = {COMPLETE: 'complete', PREFIX: 'prefix', ANSWER: 'answer'};
exports.SearchQuerySource = {SEARCH_TEXT_INPUT: 'search_text_input', SEARCH_POPOUT: 'search_popout',
SEARCH_FILTERS_MODAL: 'search_filters_modal', SEARCH_XDM_SETTINGS: 'search_xdm_settings'};
}
+600
View File
@@ -0,0 +1,600 @@
/* Metro module 9684; source: modules/search/SearchFetcher.tsx; dependencies: [15, 17, 18, 5, 6, 7, 1379, 661, 672, 3, 507, 1468, 2] */
function _fun76099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:6, offset: 0x01dc4100, size: 310 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(15) /* metro dependency 15 */;
const env0_4 = importDefault(17) /* metro dependency 17 */;
const env0_5 = importDefault(18) /* metro dependency 18 */;
const env0_6 = importDefault(5) /* metro dependency 5 */;
const env0_7 = importDefault(6) /* metro dependency 6 */;
const env0_8 = importDefault(7) /* metro dependency 7 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.SearchTypes;
const env0_11 = value.Endpoints;
value = _fun76104();
const value2 = _fun76111(value);
const value3 = _fun76115(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/SearchFetcher.tsx');
exports.SearchFetcher = value;
exports.SearchFetcherImpl = value2;
exports.SearchTabFetcherImpl = value3;
}
function _callSuper_76100(a0, a1, a2) { // fn#76100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:208, offset: 0x01dc4236, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_4(a1);
const binding = env0_3;
if (_isNativeReflectConstruct_76101()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_4(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_76101() { // fn#76101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:339, offset: 0x01dc429a, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_76101_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun76104() { // fn#76104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:538, offset: 0x01dc42fc, size: 131 bytes, params: 1, frame: 16
const binding = env0_8;
const closure = SearchFetcher;
const env0_0 = env0_6(_fun76107);
return binding(closure, [{key: 'fetch', value: value_76108}, {key: 'cancel', value: function() {
this.isCanceled = true;
if (this.indexingPollId != null) {
global.clearTimeout(this.indexingPollId);
}
}}, {key: 'retryLater', value: function(a0, a1, a2) {
if (this.indexingPollId != null) {
global.clearTimeout(this.indexingPollId);
}
this.indexingPollId = global.setTimeout(this.fetch.bind(this, a0, a1, a2), this.retryDelay);
}}]);
}
function _fun76111(a0) { // fn#76111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:1527, offset: 0x01dc4613, size: 99 bytes, params: 2, frame: 16
const closure = SearchFetcherImpl;
env0_5(closure, a0);
return env0_8(closure, [{key: 'getEndpoint', value: value_76113}, {key: 'makeRequest', value: value_76114}]);
}
function _fun76115(a0) { // fn#76115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:2438, offset: 0x01dc485d, size: 99 bytes, params: 2, frame: 16
const closure = SearchTabFetcherImpl;
env0_5(closure, a0);
return env0_8(closure, [{key: 'getEndpoint', value: value_76117}, {key: 'makeRequest', value: value_76118}]);
}
function SearchFetcher(a0, a1, a2) { // fn#76105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:559, offset: 0x01dc437f, size: 62 bytes, params: 4, frame: 13
env1_7(this, SearchFetcher);
this.isCanceled = false;
this.searchId = a0;
this.searchType = a1;
this.query = a2;
}
function* _fun76107(a0, a1, a2) { // fn#76107, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:705, offset: 0x01dc43c8, size: 443 bytes, params: 4, frame: 24
var r12;
var r7;
var isCanceled;
var makeRequest;
var object2;
var value3;
var value4;
var status;
var value5;
var value6;
var query;
var query2;
var attempts;
var value7;
var value8;
var value9;
var value10;
var parseInt;
var headers;
var property;
var int;
var isNaN;
var isNaN2;
var value11;
var value12;
var value13;
var binding;
var binding2;
var value14;
var Millis;
var SECOND;
var value15;
var retryLater;
var error;
var prototype;
var value16;
var error2;
let value = undefined;
if (false) {
return value;
}
reduciblePort70: while (true) {
exceptionLanding69: while (true) {
isCanceled = this.isCanceled;
if (isCanceled) {
break reduciblePort70;
}
try {
makeRequest = this.makeRequest;
} catch (error) {
break exceptionLanding69;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding69;
}
try {
object2.rejectWithError = false;
} catch (error) {
break exceptionLanding69;
}
try {
value = Reflect.apply(makeRequest, this, [object2]);
} catch (error) {
break exceptionLanding69;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
break exceptionLanding69;
}
if (value3) {
return value;
}
try {
value4 = value == null;
} catch (error) {
break exceptionLanding69;
}
if (value4) {
return undefined;
}
try {
isCanceled = this.isCanceled;
} catch (error) {
break exceptionLanding69;
}
if (isCanceled) {
return undefined;
}
try {
status = value.status;
} catch (error) {
break exceptionLanding69;
}
try {
value5 = status === 200;
} catch (error) {
break exceptionLanding69;
}
if (value5) {
try {
a0(value);
} catch (error) {
break exceptionLanding69;
}
break reduciblePort70;
}
try {
status = value.status;
} catch (error) {
break exceptionLanding69;
}
try {
value6 = status !== 202;
} catch (error) {
break exceptionLanding69;
}
if (value6) {
break reduciblePort70;
}
try {
query = this.query;
} catch (error) {
break exceptionLanding69;
}
try {
query2 = this.query;
} catch (error) {
break exceptionLanding69;
}
try {
attempts = query2.attempts;
} catch (error) {
break exceptionLanding69;
}
try {
value7 = attempts != null;
} catch (error) {
break exceptionLanding69;
}
value8 = 0;
reducibleJoin29: while (true) {
if (value7) {
r12 = attempts;
break reducibleJoin29;
}
r12 = value8;
break reducibleJoin29;
}
try {
value9 = r12 + 1;
} catch (error) {
break exceptionLanding69;
}
try {
query.attempts = value9;
} catch (error) {
break exceptionLanding69;
}
try {
query = this.query;
} catch (error) {
break exceptionLanding69;
}
try {
attempts = query.attempts;
} catch (error) {
break exceptionLanding69;
}
try {
value10 = attempts > 5;
} catch (error) {
break exceptionLanding69;
}
if (value10) {
return undefined;
}
try {
parseInt = global.parseInt;
} catch (error) {
break exceptionLanding69;
}
try {
headers = value.headers;
} catch (error) {
break exceptionLanding69;
}
try {
property = headers['retry-after'];
} catch (error) {
break exceptionLanding69;
}
try {
int = parseInt(property);
} catch (error) {
break exceptionLanding69;
}
try {
isNaN = global.isNaN;
} catch (error) {
break exceptionLanding69;
}
try {
isNaN2 = isNaN(int);
} catch (error) {
break exceptionLanding69;
}
value11 = 5000;
reducibleJoin57: while (true) {
if (isNaN2) {
r7 = value11;
break reducibleJoin57;
}
try {
value12 = value8 === int;
} catch (error) {
break exceptionLanding69;
}
if (value12) {
r7 = value11;
break reducibleJoin57;
}
value13 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding69;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding69;
}
try {
property = binding2[8];
} catch (error) {
break exceptionLanding69;
}
try {
value14 = binding(property);
} catch (error) {
break exceptionLanding69;
}
try {
Millis = value14.Millis;
} catch (error) {
break exceptionLanding69;
}
try {
SECOND = Millis.SECOND;
} catch (error) {
break exceptionLanding69;
}
try {
value15 = int * SECOND;
} catch (error) {
break exceptionLanding69;
}
r7 = value15;
break reducibleJoin57;
}
try {
this.retryDelay = r7;
} catch (error) {
break exceptionLanding69;
}
try {
retryLater = this.retryLater;
} catch (error) {
break exceptionLanding69;
}
try {
Reflect.apply(retryLater, this, [a0, a1, a2]);
} catch (error) {
break exceptionLanding69;
}
try {
a1(value);
} catch (error) {
break exceptionLanding69;
}
break reduciblePort70;
}
value = environment.__proto__.__proto__;
binding = env2_1;
value = binding(env2_2[9]);
prototype = value.prototype;
value16 = Object.create(prototype, {constructor: {value: value}});
value = new value('SearchFetcher');
value = value instanceof Object ? value : value16;
error2 = value.error;
Reflect.apply(error2, value, [error]);
a2(error);
break reduciblePort70;
}
}
function SearchFetcherImpl() { // fn#76112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:1539, offset: 0x01dc4676, size: 42 bytes, params: 1, frame: 16
env1_7(this, SearchFetcherImpl);
return _callSuper_76100(this, SearchFetcherImpl, arguments);
}
function value_76113() { // fn#76113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:1722, offset: 0x01dc46a0, size: 318 bytes, params: 1, frame: 15
var r5;
var searchId;
var SEARCH_CHANNEL;
var getChannel;
var value3;
var value4;
var SEARCH_GUILD;
const searchType = this.searchType;
let value = environment.__proto__;
const GUILD = SearchTypes.GUILD;
if (GUILD === searchType) {
searchId = this.searchId;
if (searchId == null) {
return undefined;
}
searchId = this.searchId;
if (searchId === '') {
return undefined;
}
SEARCH_GUILD = Endpoints.SEARCH_GUILD;
searchId = this.searchId;
return Reflect.apply(SEARCH_GUILD, Endpoints, [searchId]);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === searchType) {
searchId = this.searchId;
if (searchId == null) {
return undefined;
}
searchId = this.searchId;
if (searchId === '') {
return undefined;
}
getChannel = ChannelStore.getChannel;
searchId = this.searchId;
value3 = Reflect.apply(getChannel, ChannelStore, [searchId]);
value4 = undefined;
r5 = value3 == null ? value4 : value3.getGuildId();
if (r5 == null) {
return value4;
}
return Endpoints.SEARCH_GUILD(r5);
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === searchType) {
searchId = this.searchId;
if (searchId == null) {
return undefined;
}
searchId = this.searchId;
if (searchId === '') {
return undefined;
}
SEARCH_CHANNEL = Endpoints.SEARCH_CHANNEL;
searchId = this.searchId;
return Reflect.apply(SEARCH_CHANNEL, Endpoints, [searchId]);
}
const Error = global.Error;
value = '[SearchFetcher] Unhandled search type: ' + this.searchType;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value2;
}
function value_76114({rejectWithError}) { // fn#76114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:2254, offset: 0x01dc47de, size: 127 bytes, params: 2, frame: 18
var r0;
var value3;
var HTTP;
var get;
var object2;
let value = this.getEndpoint();
if (value == null) {
r0 = null;
} else {
value3 = environment.__proto__;
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
get = HTTP.get;
object2 = {url: value};
value = importDefault(1468) /* metro dependency 1468 */;
object2.query = value.stringify(this.query);
object2.oldFormErrors = true;
object2.rejectWithError = rejectWithError;
value = Reflect.apply(get, HTTP, [object2]);
r0 = value;
}
return r0;
}
function SearchTabFetcherImpl(a0, a1, a2, a3) { // fn#76116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:2450, offset: 0x01dc48c0, size: 72 bytes, params: 5, frame: 16
let value = environment.__proto__;
env1_7(this, SearchTabFetcherImpl);
value = _callSuper_76100(this, SearchTabFetcherImpl, [a0, a1, a2]);
value.payload = a3;
return value;
}
function value_76117() { // fn#76117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:2675, offset: 0x01dc4908, size: 270 bytes, params: 1, frame: 14
var searchId;
var SEARCH_TABS_CHANNEL;
var SEARCH_TABS_GUILD;
const searchType = this.searchType;
let value = environment.__proto__;
const DMS = SearchTypes.DMS;
if (DMS === searchType) {
return Endpoints.SEARCH_TABS_DMS;
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === searchType) {
searchId = this.searchId;
if (searchId == null) {
return undefined;
}
searchId = this.searchId;
if (searchId === '') {
return undefined;
}
SEARCH_TABS_GUILD = Endpoints.SEARCH_TABS_GUILD;
searchId = this.searchId;
return Reflect.apply(SEARCH_TABS_GUILD, Endpoints, [searchId]);
}
const GUILD = SearchTypes.GUILD;
if (GUILD === searchType) {
searchId = this.searchId;
if (searchId == null) {
return undefined;
}
searchId = this.searchId;
if (searchId === '') {
return undefined;
}
SEARCH_TABS_GUILD = Endpoints.SEARCH_TABS_GUILD;
searchId = this.searchId;
return Reflect.apply(SEARCH_TABS_GUILD, Endpoints, [searchId]);
}
const THREAD = SearchTypes.THREAD;
if (THREAD === searchType) {
searchId = this.searchId;
if (searchId == null) {
return undefined;
}
searchId = this.searchId;
if (searchId === '') {
return undefined;
}
SEARCH_TABS_GUILD = Endpoints.SEARCH_TABS_GUILD;
searchId = this.searchId;
return Reflect.apply(SEARCH_TABS_GUILD, Endpoints, [searchId]);
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === searchType) {
searchId = this.searchId;
if (searchId == null) {
return undefined;
}
searchId = this.searchId;
if (searchId === '') {
return undefined;
}
SEARCH_TABS_CHANNEL = Endpoints.SEARCH_TABS_CHANNEL;
searchId = this.searchId;
return Reflect.apply(SEARCH_TABS_CHANNEL, Endpoints, [searchId]);
}
const Error = global.Error;
value = '[SearchFetcher] Unhandled search type: ' + this.searchType;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value2;
}
function value_76118({rejectWithError}) { // fn#76118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9870:3108, offset: 0x01dc4a16, size: 100 bytes, params: 2, frame: 15
var r0;
var value3;
let value = this.getEndpoint();
if (value == null) {
r0 = null;
} else {
value3 = environment.__proto__;
value = (require(507) /* metro dependency 507: HTTPUtils */).HTTP.post({url: value, body: this.payload,
oldFormErrors: true, rejectWithError: rejectWithError});
r0 = value;
}
return r0;
}
@@ -0,0 +1,422 @@
/* Metro module 4792; source: modules/search/SearchMessageStore.tsx; dependencies: [15, 17, 18, 6, 7, 1226, 3793, 4131, 4625, 3795, 566, 694, 2] */
function _fun41434(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:6, offset: 0x0111ee0d, size: 563 bytes, params: 8, frame: 21
let env0_0 = require;
const closure = function(a0) {
var env0_0 = a0;
var env0_1 = a0.type;
var messageId = a0.messageId;
var userId = a0.userId;
var env0_2 = a0.emoji;
if (require(dependencyMap[9]).shouldApplyReaction(a0)) {
var env0_3 = AuthenticationStore.getId() === userId;
return updateMessage(messageId, _fun41443);
}
return false;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_2 = importDefault(15) /* metro dependency 15 */;
let env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_9 = _fun41444();
let Map = global.Map;
let map = new Map();
Map = global.Map;
map = new Map();
Map = global.Map;
map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun41451(Store).displayName = 'SearchMessageStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {SEARCH_MESSAGES_START: function({ids}) {
ids.forEach(_fun41477);
}, SEARCH_MESSAGES_SUCCESS: function({data}) {
data.forEach(_fun41479);
}, SEARCH_MESSAGES_INDEXING: function({ids}) {
ids.forEach(_fun41483);
}, SEARCH_MESSAGES_FAILURE: function(a0) {
var env0_0 = a0;
a0.ids.forEach(_fun41485);
}, SEARCH_MESSAGES_CLEAR: SEARCH_MESSAGES_CLEAR, SEARCH_MESSAGES_CLEAR_ALL: function() {
var Map = global.Map;
env0_10 = new Map();
Map = global.Map;
env0_11 = new Map();
Map = global.Map;
env0_12 = new Map();
}, MESSAGE_UPDATE: MESSAGE_UPDATE, MESSAGE_REACTION_ADD: closure, MESSAGE_REACTION_ADD_MANY: function({messageId,
reactions}) {
var env0_1 = AuthenticationStore.getId();
return updateMessage(messageId, _fun41491);
}, MESSAGE_REACTION_REMOVE: closure, MESSAGE_REACTION_REMOVE_ALL: function({messageId}) {
return updateMessage(messageId, _fun41493);
}, MESSAGE_REACTION_REMOVE_EMOJI: function({messageId, emoji}) {
return updateMessage(messageId, _fun41495);
}, CONNECTION_OPEN: function() {
var Map = global.Map;
env0_10 = new Map();
Map = global.Map;
env0_11 = new Map();
Map = global.Map;
env0_12 = new Map();
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/SearchMessageStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_41435() { // fn#41435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:168, offset: 0x0111f040, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_41435_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getSearchStateOrDefault(a0) { // fn#41438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:1743, offset: 0x0111f09e, size: 52 bytes, params: 2, frame: 12
return env0_10.get(a0) ?? new env0_9();
}
function getOrCreateSearchState(a0) { // fn#41439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:1819, offset: 0x0111f0d2, size: 34 bytes, params: 2, frame: 13
const searchStateOrDefault = getSearchStateOrDefault(a0);
env0_10.set(a0, searchStateOrDefault);
return searchStateOrDefault;
}
function updateMessage(a0, a1) { // fn#41440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:1907, offset: 0x0111f0f4, size: 59 bytes, params: 3, frame: 14
const value2 = env0_11.get(a0);
if (value2 == null) {
return false;
}
env0_11.set(a0, a1(value2));
return true;
}
function withSearchState(a0, a1) { // fn#41441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:2002, offset: 0x0111f12f, size: 27 bytes, params: 3, frame: 11
return a1(getSearchStateOrDefault(a0));
}
function MESSAGE_REACTION_ADD(a0) { // fn#41442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:2069, offset: 0x0111f14a, size: 120 bytes, params: 2, frame: 17
const env0_0 = a0;
const env0_1 = a0.type;
const messageId = a0.messageId;
const userId = a0.userId;
const env0_2 = a0.emoji;
const reactionUtilsModule = require(3795) /* metro dependency 3795: ReactionUtils */;
if (reactionUtilsModule.shouldApplyReaction(a0)) {
var result = AuthenticationStore.getId() === userId;
return updateMessage(messageId, _fun41443);
}
return false;
}
function _fun41444() { // fn#41444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:367, offset: 0x0111f218, size: 126 bytes, params: 1, frame: 15
return env0_6(SearchState, [{key: 'handleSearchStart', value: function() {
this.isFetching = true;
this.isIndexing = false;
this.analyticsId = null;
this.error = null;
}}, {key: 'handleSearchIndexing', value: function() {
this.isInitialFetchComplete = true;
this.isIndexing = true;
this.isHistoricalIndexing = true;
this.isFetching = false;
this.error = null;
}}, {key: 'handleSearchFailure', value: value_41448}, {key: 'handleSearchSuccess', value: value_41449}]);
}
function _fun41451(a0) { // fn#41451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:2353, offset: 0x0111f4f5, size: 352 bytes, params: 2, frame: 16
const closure = SearchMessageStore;
env0_4(closure, a0);
return env0_6(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, RelationshipStore);
}}, {key: 'getMessage', value: value_41454}, {key: 'getTotalCount', value: function(a0) {
return withSearchState(a0, _fun41456);
}}, {key: 'getIsInitialFetchComplete', value: function(a0) {
return withSearchState(a0, _fun41458);
}}, {key: 'getIsIndexing', value: function(a0) {
return withSearchState(a0, _fun41460);
}}, {key: 'getIsHistoricalIndexing', value: function(a0) {
return withSearchState(a0, _fun41462);
}}, {key: 'getDocumentsIndexed', value: function(a0) {
return withSearchState(a0, _fun41464);
}}, {key: 'getIsFetching', value: function(a0) {
return withSearchState(a0, _fun41466);
}}, {key: 'getError', value: function(a0) {
return withSearchState(a0, _fun41468);
}}, {key: 'getMessages', value: function(a0) {
return withSearchState(a0, _fun41470);
}}, {key: 'getCursor', value: function(a0) {
return withSearchState(a0, _fun41472);
}}, {key: 'getAnalyticsId', value: function(a0) {
return withSearchState(a0, _fun41474);
}}, {key: 'hasSearchState', value: value_41475}]);
}
function SEARCH_MESSAGES_START({ids}) { // fn#41476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3802, offset: 0x0111f840, size: 30 bytes, params: 2, frame: 11
ids.forEach(_fun41477);
}
function SEARCH_MESSAGES_SUCCESS({data}) { // fn#41478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3933, offset: 0x0111f87b, size: 29 bytes, params: 2, frame: 11
data.forEach(_fun41479);
}
function SEARCH_MESSAGES_INDEXING({ids}) { // fn#41482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4226, offset: 0x0111f981, size: 30 bytes, params: 2, frame: 11
ids.forEach(_fun41483);
}
function SEARCH_MESSAGES_FAILURE(a0) { // fn#41484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4363, offset: 0x0111f9be, size: 34 bytes, params: 2, frame: 11
const env0_0 = a0;
a0.ids.forEach(_fun41485);
}
function SEARCH_MESSAGES_CLEAR(a0) { // fn#41486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4503, offset: 0x0111fa0a, size: 81 bytes, params: 2, frame: 13
const value2 = env0_10.get(a0.id);
if (value2 == null) {
return false;
}
value2.messageIds.forEach(_fun41487);
env0_10.delete(a0.id);
}
function MESSAGE_UPDATE(a0) { // fn#41489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4811, offset: 0x0111fb1c, size: 104 bytes, params: 2, frame: 16
const id = a0.message.id;
if (id == null) {
return false;
}
const value2 = env0_11.get(id);
if (value2 == null) {
return false;
}
const messageRecordUtilsModule = require(4625) /* metro dependency 4625: MessageRecordUtils */;
env0_11.set(id, messageRecordUtilsModule.updateMessageRecord(value2, a0.message));
}
function MESSAGE_REACTION_ADD_MANY({messageId, reactions}) { // fn#41490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:5038, offset: 0x0111fb84, size: 60 bytes, params: 2, frame: 14
const env0_1 = AuthenticationStore.getId();
return updateMessage(messageId, _fun41491);
}
function MESSAGE_REACTION_REMOVE_ALL({messageId}) { // fn#41492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:5231, offset: 0x0111fbdc, size: 32 bytes, params: 2, frame: 13
return updateMessage(messageId, function(a0) {
return a0.set('reactions', []);
});
}
function MESSAGE_REACTION_REMOVE_EMOJI({messageId, emoji}) { // fn#41494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:5362, offset: 0x0111fc14, size: 42 bytes, params: 2, frame: 13
return updateMessage(messageId, function(a0) {
return a0.removeReactionsForEmoji(emoji);
});
}
function _fun41443(a0) { // fn#41443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:2232, offset: 0x0111f1c2, size: 86 bytes, params: 2, frame: 18
const reactionType = env0_0.reactionType;
return type === 'MESSAGE_REACTION_ADD' ? a0.addReaction(emoji, result, env0_0.colors,
reactionType) : a0.removeReaction(emoji, result, reactionType);
}
function SearchState() { // fn#41445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:388, offset: 0x0111f296, size: 127 bytes, params: 1, frame: 15
const value = environment.__proto__;
env1_5(this, SearchState);
this.isIndexing = false;
this.isHistoricalIndexing = false;
this.isFetching = false;
this.analyticsId = null;
this.error = null;
this.messages = null;
this.documentsIndexed = 0;
this.totalResults = null;
const Set = global.Set;
this.messageIds = new Set();
this.isInitialFetchComplete = false;
this.cursor = null;
}
function value_41448(a0) { // fn#41448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:991, offset: 0x0111f365, size: 109 bytes, params: 2, frame: 13
this.isFetching = false;
this.isIndexing = false;
this.isInitialFetchComplete = true;
this.isHistoricalIndexing = false;
const value = environment.__proto__;
const APIError = (require(4131) /* metro dependency 4131: errors */).APIError;
this.error = new APIError(a0);
this.analyticsId = null;
this.documentsIndexed = 0;
}
function value_41449({analyticsId, cursor, totalResults, doingHistoricalIndex, documentsIndexed}, a1) { // fn#41449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:1218, offset: 0x0111f3d2, size: 179 bytes, params: 3, frame: 20
this.analyticsId = analyticsId;
this.isFetching = false;
this.isIndexing = false;
this.isInitialFetchComplete = true;
this.isHistoricalIndexing = doingHistoricalIndex;
this.error = null;
this.documentsIndexed = documentsIndexed;
this.cursor = cursor;
const r5 = this.messages ?? [];
const items2 = [];
arraySpread(items2, r5, 0, undefined);
a1.forEach(_fun41450);
this.messages = items2;
this.totalResults = totalResults;
return [];
}
function value_41455(a0) { // fn#41455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:2785, offset: 0x0111f6c6, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.totalResults;
});
}
function value_41457(a0) { // fn#41457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:2884, offset: 0x0111f6ec, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.isInitialFetchComplete;
});
}
function value_41459(a0) { // fn#41459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:2981, offset: 0x0111f712, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.isIndexing;
});
}
function value_41461(a0) { // fn#41461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3076, offset: 0x0111f738, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.isHistoricalIndexing;
});
}
function value_41463(a0) { // fn#41463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3177, offset: 0x0111f75e, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.documentsIndexed;
});
}
function value_41465(a0) { // fn#41465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3268, offset: 0x0111f784, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.isFetching;
});
}
function value_41467(a0) { // fn#41467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3348, offset: 0x0111f7aa, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.error;
});
}
function value_41469(a0) { // fn#41469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3426, offset: 0x0111f7cf, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.messages;
});
}
function value_41471(a0) { // fn#41471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3505, offset: 0x0111f7f5, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.cursor;
});
}
function value_41473(a0) { // fn#41473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3587, offset: 0x0111f81a, size: 27 bytes, params: 2, frame: 13
return withSearchState(a0, function(a0) {
return a0.analyticsId;
});
}
function _fun41477(a0) { // fn#41477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3855, offset: 0x0111f85e, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__;
getOrCreateSearchState(a0).handleSearchStart();
}
function _fun41479(a0) { // fn#41479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:3989, offset: 0x0111f898, size: 74 bytes, params: 2, frame: 16
var environment;
let value = environment.__proto__;
value = getOrCreateSearchState(a0.id);
value = value.handleSearchSuccess(a0, a0.messages.map(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r2 = value2 ? value : item;
if (!value2) {
item2.return();
}
return require(dependencyMap[8]).createMessageRecord(r2);
}));
value.forEach(_fun41481);
}
function _fun41483(a0) { // fn#41483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4282, offset: 0x0111f99f, size: 31 bytes, params: 2, frame: 11
const value = environment.__proto__;
getOrCreateSearchState(a0).handleSearchIndexing();
}
function _fun41485(a0) { // fn#41485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4418, offset: 0x0111f9e0, size: 42 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = getOrCreateSearchState(a0);
value.handleSearchFailure(env0_0.error);
}
function _fun41487(a0) { // fn#41487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4601, offset: 0x0111fa5b, size: 94 bytes, params: 2, frame: 15
let binding = env1_12;
const r5 = binding.get(a0) ?? 0;
if (r5 <= 1) {
binding = env1_11;
binding.delete(a0);
binding = env1_12;
binding.delete(a0);
} else {
env1_12.set(a0, r5 - 1);
}
}
function _fun41491(a0) { // fn#41491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:5134, offset: 0x0111fbc0, size: 28 bytes, params: 2, frame: 13
return a0.addReactionBatch(reactions, env0_1);
}
function _fun41450(a0) { // fn#41450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:1551, offset: 0x0111f485, size: 112 bytes, params: 2, frame: 13
var binding;
let messageIds = env0_0.messageIds;
if (!(messageIds.has(a0.id) || RelationshipStore.isBlockedOrIgnoredForMessage(a0))) {
messageIds = env0_0.messageIds;
messageIds.add(a0.id);
binding = env0_1;
binding.push(a0);
binding = env0_2;
binding.push(a0);
}
}
function _fun41481(a0) { // fn#41481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4970:4122, offset: 0x0111f927, size: 90 bytes, params: 2, frame: 14
let binding = env2_11;
binding.set(a0.id, a0);
const r4 = env2_12.get(a0.id) ?? 0;
binding = env2_12;
binding.set(a0.id, r4 + 1);
}
@@ -0,0 +1,120 @@
/* Metro module 9678; source: modules/search/SearchRecentMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 4625, 566, 694, 2] */
function _fun76023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9864:6, offset: 0x01dc1e8b, size: 330 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function() {
var Map = global.Map;
env0_7 = new Map();
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let Map = global.Map;
let map = new Map();
const env0_8 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun76028(Store).displayName = 'SearchRecentMessageStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{SEARCH_MESSAGES_SUCCESS: SEARCH_MESSAGES_SUCCESS_76031, SEARCH_RECENT_MESSAGES_CLEAR: closure,
CONNECTION_OPEN: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/SearchRecentMessageStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_76024() { // fn#76024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9864:148, offset: 0x01dc1fd5, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_76024_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun76028(a0) { // fn#76028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9864:399, offset: 0x01dc205e, size: 74 bytes, params: 2, frame: 15
const closure = SearchRecentMessageStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getRecentMessageAuthorIds', value: value_76030}]);
}
function SEARCH_MESSAGES_SUCCESS_76031({guildId, data}) { // fn#76031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9864:918, offset: 0x01dc20c8, size: 173 bytes, params: 2, frame: 17
if (guildId != null) {
var r5 = env0_7.get(guildId) ?? [];
var items2 = [];
arraySpread(items2, r5, 0, data);
var Set = global.Set;
var set = new Set(items2);
data.forEach(function({messages}) {
messages.forEach(_fun76033);
});
if (false) {
env0_7.set(guildId, items2);
}
}
return false;
}
function value_76030(a0) { // fn#76030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9864:764, offset: 0x01dc20a8, size: 32 bytes, params: 2, frame: 12
return env1_7.get(a0) ?? env1_8;
}
function _fun76032({messages}) { // fn#76032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9864:1072, offset: 0x01dc2175, size: 32 bytes, params: 2, frame: 11
messages.forEach(_fun76033);
}
function _fun76033(a0) { // fn#76033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9864:1096, offset: 0x01dc2195, size: 178 bytes, params: 2, frame: 14
var add;
var push;
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r3 = value2 ? value : item;
if (!value2) {
item2.return();
}
const messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(r3);
let binding = env1_2;
const has = binding.has;
let author = messageRecord.author;
let id = author.id;
if (!Reflect.apply(has, binding, [id]) && env1_2.size < 15) {
binding = env1_2;
add = binding.add;
author = messageRecord.author;
id = author.id;
Reflect.apply(add, binding, [id]);
binding = env1_1;
push = binding.push;
author = messageRecord.author;
id = author.id;
Reflect.apply(push, binding, [id]);
}
return value;
}
File diff suppressed because it is too large. Load diff
+305
View File
@@ -0,0 +1,305 @@
/* Metro module 14153; source: modules/search/StringMatchUtils.tsx; dependencies: [2] */
function _fun107106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14350:6, offset: 0x022f356f, size: 131 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const _prefix = function(a0, a1) {
var property;
var value = 0;
var r3 = value;
loopExit1: while (true) {
property = a0[r3];
if (property !== a1[r3]) {
return r3;
}
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (value < 4) {
r3 = value;
continue;
}
break loopExit1;
}
return typeof value === 'bigint' ? value + 1n : +value + 1;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/StringMatchUtils.tsx');
exports.calculateJaroWinklerSimilarity = calculateJaroWinklerSimilarity;
}
function calculateJaroWinklerDistance(a0, a1) { // fn#107107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14350:129, offset: 0x022f35f2, size: 138 bytes, params: 3, frame: 17
var r0;
var value3;
var length;
var value4;
var value6;
var value;
const value2 = _matching(a0, a1);
if (value2 > 0) {
value3 = _transpositions(a0, a1);
length = a0.length;
value4 = value2 / length;
length = a1.length;
value6 = (value4 + value2 / length + (value2 - value3) / value2) / 3;
if (value6 < 0.7) {
r0 = value6;
} else {
value = _prefix(a0, a1);
value = 0.1 * value;
value = value6 + value * (1 - value6);
r0 = value;
}
return r0;
}
return 0;
}
function _matching(a0, a1) { // fn#107108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14350:291, offset: 0x022f367c, size: 236 bytes, params: 3, frame: 25
var r2;
var r3;
var r12;
var r11;
var r0;
var value3;
var min;
var property;
var value4;
var value5;
var value6;
let Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
let max = Math2.max;
let length = a0.length;
let value = Reflect.apply(max, Math2, [length, a1.length]);
value = Reflect.apply(floor, Math, [value / 2]);
value -= 1;
const items2 = [];
length = a0.length;
const value2 = 0;
if (value2 < length) {
r2 = value2;
r3 = value2;
reducibleLoop1: while (true) {
Math = global.Math;
max = Math.max;
value3 = Reflect.apply(max, Math, [value2, r2 - value]);
Math = global.Math;
min = Math.min;
length = a1.length;
if (value3 <= Reflect.apply(min, Math, [length, r2 + value])) {
r12 = value3;
reducibleLoop2: while (true) {
property = a0[r2];
if (property === a1[r12]) {
reducibleJoin5: while (true) {
if (items2[r12]) {
break reducibleJoin5;
}
items2[r12] = true;
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
r11 = value4;
break reducibleLoop2;
}
}
value5 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
Math = global.Math;
min = Math.min;
length = a1.length;
if (value5 <= Reflect.apply(min, Math, [length, r2 + value])) {
r12 = value5;
continue reducibleLoop2;
}
r11 = r3;
break reducibleLoop2;
}
} else {
r11 = r3;
}
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = a0.length;
if (value6 < length) {
r2 = value6;
r3 = r11;
continue reducibleLoop1;
}
r0 = r11;
break reducibleLoop1;
}
} else {
r0 = value2;
}
return r0;
}
function _transpositions(a0, a1) { // fn#107109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14350:504, offset: 0x022f3768, size: 507 bytes, params: 3, frame: 24
var r4;
var r11;
var r5;
var r7;
var r0;
var value3;
var min;
var property;
var a;
var value4;
var value5;
var value6;
var b;
var value7;
var value8;
let Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
let max = Math2.max;
let length = a0.length;
let value = Reflect.apply(max, Math2, [length, a1.length]);
value = Reflect.apply(floor, Math, [value / 2]);
value -= 1;
const object2 = {'a': '', 'b': ''};
const items3 = [];
length = a0.length;
const value2 = 0;
if (value2 < length) {
r4 = value2;
reducibleLoop1: while (true) {
Math = global.Math;
max = Math.max;
value3 = Reflect.apply(max, Math, [value2, r4 - value]);
Math = global.Math;
min = Math.min;
length = a1.length;
if (value3 <= Reflect.apply(min, Math, [length, r4 + value])) {
r11 = value3;
reducibleLoop2: while (true) {
property = a0[r4];
if (property === a1[r11]) {
reducibleJoin5: while (true) {
if (items3[r11]) {
break reducibleJoin5;
}
a = object2.a;
object2.a = a + a0[r4];
items3[r11] = true;
break reducibleLoop2;
}
}
value4 = typeof r11 === 'bigint' ? r11 + 1n : +r11 + 1;
Math = global.Math;
min = Math.min;
length = a1.length;
if (value4 <= Reflect.apply(min, Math, [length, r4 + value])) {
r11 = value4;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
value5 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = a0.length;
if (value5 < length) {
r4 = value5;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
const items2 = [];
length = a1.length;
if (value2 < length) {
r4 = value2;
reducibleLoop8: while (true) {
Math = global.Math;
max = Math.max;
value6 = Reflect.apply(max, Math, [value2, r4 - value]);
Math = global.Math;
min = Math.min;
length = a0.length;
if (value6 <= Reflect.apply(min, Math, [length, r4 + value])) {
r11 = value6;
reducibleLoop9: while (true) {
property = a1[r4];
if (property === a0[r11]) {
reducibleJoin12: while (true) {
if (items2[r11]) {
break reducibleJoin12;
}
b = object2.b;
object2.b = b + a1[r4];
items2[r11] = true;
break reducibleLoop9;
}
}
value7 = typeof r11 === 'bigint' ? r11 + 1n : +r11 + 1;
Math = global.Math;
min = Math.min;
length = a0.length;
if (value7 <= Reflect.apply(min, Math, [length, r4 + value])) {
r11 = value7;
continue reducibleLoop9;
}
break reducibleLoop9;
}
}
value8 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = a1.length;
if (value8 < length) {
r4 = value8;
continue reducibleLoop8;
}
break reducibleLoop8;
}
}
length = object2.a.length;
if (value2 < length) {
r4 = value2;
r5 = value2;
reducibleLoop15: while (true) {
a = object2.a;
property = a[r4];
b = object2.b;
reducibleJoin17: while (true) {
if (property === b[r4]) {
r7 = r5;
break reducibleJoin17;
}
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
r7 = value;
break reducibleJoin17;
}
value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
a = object2.a;
length = a.length;
if (value < length) {
r4 = value;
r5 = r7;
continue reducibleLoop15;
}
r0 = r7;
break reducibleLoop15;
}
} else {
r0 = value2;
}
Math = global.Math;
return Math.floor(r0 / 2);
}
function calculateJaroWinklerSimilarity(a0, a1, a2) { // fn#107111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14350:1093, offset: 0x022f398e, size: 84 bytes, params: 4, frame: 15
var calculateJaroWinklerDistanceBinding;
let value = a2;
let r0 = value ?? ({});
const caseSensitive = r0.caseSensitive;
if (caseSensitive === undefined) {
calculateJaroWinklerDistanceBinding = calculateJaroWinklerDistance;
value = a0.toLowerCase();
value = calculateJaroWinklerDistanceBinding(value, a1.toLowerCase());
r0 = value;
} else if (caseSensitive) {
r0 = calculateJaroWinklerDistance(a0, a1);
} else {
calculateJaroWinklerDistanceBinding = calculateJaroWinklerDistance;
value = a0.toLowerCase();
value = calculateJaroWinklerDistanceBinding(value, a1.toLowerCase());
r0 = value;
}
return r0;
}
@@ -0,0 +1,11 @@
/* Metro module 15713; source: modules/search/experiments/SearchResultsFeedbackExperiment.tsx; dependencies: [1854, 2] */
function _fun120590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15921:6, offset: 0x02530916, size: 173 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2025-05-search-results-feedback',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/experiments/SearchResultsFeedbackExperiment.tsx');
exports.useIsSearchResultsFeedbackExperimentEnabled = useIsSearchResultsFeedbackExperimentEnabled;
exports.getIsSearchResultsFeedbackExperimentEnabled = getIsSearchResultsFeedbackExperimentEnabled;
}
@@ -0,0 +1,36 @@
/* Metro module 9685; source: modules/search/managers/AbstractSearchFetchManager.tsx; dependencies: [6, 7, 2] */
function _fun76119(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9871:6, offset: 0x01dc4a7a, size: 126 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun76120();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/managers/AbstractSearchFetchManager.tsx');
exports.AbstractSearchFetchManager = value;
}
function _fun76120() { // fn#76120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9871:118, offset: 0x01dc4af8, size: 159 bytes, params: 1, frame: 15
return env0_1(AbstractSearchFetchManager, [{key: 'cleanUp', value: function(a0) {
this.cancel(a0);
this.delete(a0);
}}, {key: 'cancel', value: function(a0) {
var value = this.searchFetchers.get(a0);
if (value != null) {
value.cancel();
}
}}, {key: 'delete', value: function(a0) {
this.searchFetchers.delete(a0);
}}, {key: 'get', value: function(a0) {
return this.searchFetchers.get(a0);
}}, {key: 'set', value: function(a0, a1) {
this.searchFetchers.set(a0, a1);
}}]);
}
function AbstractSearchFetchManager() { // fn#76121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9871:139, offset: 0x01dc4b97, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_0(this, AbstractSearchFetchManager);
const Map = global.Map;
this.searchFetchers = new Map();
}
@@ -0,0 +1,105 @@
/* Metro module 9689; source: modules/search/managers/AbstractSearchSessionAnalyticsManager.tsx; dependencies: [6, 7, 491, 9675, 2] */
function _fun76177(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:6, offset: 0x01dc5b43, size: 145 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun76179();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/managers/AbstractSearchSessionAnalyticsManager.tsx');
exports.default = value;
}
function createDefaultSessionState() { // fn#76178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:116, offset: 0x01dc5bd4, size: 51 bytes, params: 1, frame: 12
const object2 = {};
object2.sessionId = (require(491) /* metro dependency 491 */).v4();
object2.searchQueryId = null;
return object2;
}
function _fun76179() { // fn#76179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:209, offset: 0x01dc5c07, size: 263 bytes, params: 1, frame: 15
return env0_3(AbstractSearchSessionAnalyticsManager, [{key: 'getSession', value: value_76181}, {key: 'setSession',
value: value_76182}, {key: 'deleteSession', value: value_76183}, {key: 'getSessionId', value: function(a0) {
var r1;
var value = this.getSession(a0);
var value2 = null;
r1 = value2 == value ? undefined : value.sessionId;
return value2 != r1 ? r1 : value2;
}}, {key: 'getQueryId', value: function(a0) {
var r1;
var value = this.getSession(a0);
var value2 = null;
r1 = value2 == value ? undefined : value.searchQueryId;
return value2 != r1 ? r1 : value2;
}}, {key: 'refreshQueryId', value: value_76186}, {key: 'initialize', value: value_76187}, {key: 'terminate',
value: function(a0) {
this._terminate(a0);
this.deleteSession(a0);
}}, {key: 'transferSession', value: function(a0, a1) {
this._transferSession(a0, a1);
var value = this.getSession(a0);
var sessions = this.sessions;
sessions.set(require(dependencyMap[3]).getSearchContextId(a1), value ?? createDefaultSessionState());
this.deleteSession(a0);
}}]);
}
function AbstractSearchSessionAnalyticsManager() { // fn#76180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:230, offset: 0x01dc5d0e, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_2(this, AbstractSearchSessionAnalyticsManager);
const Map = global.Map;
this.sessions = new Map();
}
function value_76181(a0) { // fn#76181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:374, offset: 0x01dc5d4b, size: 72 bytes, params: 2, frame: 13
const sessions = this.sessions;
const get = sessions.get;
let value = environment.__proto__;
const getSearchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId;
value = Reflect.apply(get, sessions, [Reflect.apply(getSearchContextId, value, [a0])]);
const value2 = null;
return value2 != value ? value : value2;
}
function value_76182(a0, a1) { // fn#76182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:491, offset: 0x01dc5d93, size: 113 bytes, params: 3, frame: 15
const value = environment.__proto__;
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
let sessions = this.sessions;
const r5 = sessions.get(searchContextId) ?? createDefaultSessionState();
sessions = this.sessions;
const set = sessions.set;
const object2 = {};
copyDataProperties(object2, a1, copyDataProperties(object2, r5, r5));
Reflect.apply(set, sessions, [searchContextId, object2]);
}
function value_76183(a0) { // fn#76183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:668, offset: 0x01dc5e04, size: 60 bytes, params: 2, frame: 14
const sessions = this.sessions;
let value = environment.__proto__;
value = require(9675) /* metro dependency 9675: SearchUtils */;
const getSearchContextId = value.getSearchContextId;
sessions.delete(Reflect.apply(getSearchContextId, value, [a0]));
}
function value_76186(a0) { // fn#76186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:1004, offset: 0x01dc5ea0, size: 62 bytes, params: 2, frame: 15
const setSession = this.setSession;
const object2 = {};
const value = environment.__proto__;
object2.searchQueryId = (require(491) /* metro dependency 491 */).v4();
Reflect.apply(setSession, this, [a0, object2]);
}
function value_76187(a0, a1) { // fn#76187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:1090, offset: 0x01dc5ede, size: 116 bytes, params: 3, frame: 17
let value = copyRestArgs(1, undefined);
const _initialize = this._initialize;
let object = [a0];
arraySpread(object, value, 1, undefined);
apply(_initialize, object, this, undefined);
const setSession = this.setSession;
object = {};
value = environment.__proto__;
object.sessionId = (require(491) /* metro dependency 491 */).v4();
object.searchQueryId = null;
Reflect.apply(setSession, this, [a0, object]);
}
@@ -0,0 +1,62 @@
/* Metro module 9686; source: modules/search/managers/SearchFetchManager.tsx; dependencies: [6, 7, 15, 17, 18, 9684, 9685, 2] */
function _fun76127(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9872:6, offset: 0x01dc4c6d, size: 232 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const AbstractSearchFetchManager = (require(9685) /* metro dependency 9685: AbstractSearchFetchManager */).AbstractSearchFetchManager;
let value = _fun76131(AbstractSearchFetchManager);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/managers/SearchFetchManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_76128() { // fn#76128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9872:148, offset: 0x01dc4d55, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_76128_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun76131(a0) { // fn#76131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9872:347, offset: 0x01dc4db7, size: 72 bytes, params: 2, frame: 15
const closure = SearchFetchManager;
env0_6(closure, a0);
return env0_3(closure, [{key: 'create', value: value_76133}]);
}
function value_76133({id, searchType, searchQuery}) { // fn#76133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9872:663, offset: 0x01dc4dff, size: 101 bytes, params: 2, frame: 17
this.cancel(id);
const value = environment.__proto__;
const SearchFetcherImpl = (require(9684) /* metro dependency 9684: SearchFetcher */).SearchFetcherImpl;
const searchFetcherImpl = new SearchFetcherImpl(id, searchType, searchQuery);
this.set(id, searchFetcherImpl);
return searchFetcherImpl;
}
@@ -0,0 +1,176 @@
/* Metro module 9683; source: modules/search/managers/SearchTabsFetchManager.tsx; dependencies: [29, 6, 7, 15, 17, 18, 9615, 661, 9684, 9685, 2] */
function _fun76089(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9869:6, offset: 0x01dc3a9c, size: 354 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_2 = ['include_nsfw', 'channel_id'];
const env0_3 = ['has'];
const env0_4 = ['has'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_5 = importDefault(29) /* metro dependency 29 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const env0_8 = importDefault(15) /* metro dependency 15 */;
const env0_9 = importDefault(17) /* metro dependency 17 */;
const env0_10 = importDefault(18) /* metro dependency 18 */;
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_11 = value.SEARCH_FILTERS_BY_TAB;
const env0_12 = value.SEARCH_QUERY_BY_SEARCH_FILTER;
const env0_13 = value.SEARCH_QUERY_DEFAULT_FILTERS;
const env0_14 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const AbstractSearchFetchManager = (require(9685) /* metro dependency 9685: AbstractSearchFetchManager */).AbstractSearchFetchManager;
value = _fun76093(AbstractSearchFetchManager);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/managers/SearchTabsFetchManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_76090() { // fn#76090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9869:339, offset: 0x01dc3bfe, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_76090_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun76093(a0) { // fn#76093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9869:538, offset: 0x01dc3c60, size: 126 bytes, params: 2, frame: 16
const closure = SearchTabsFetchManager;
env0_10(closure, a0);
return env0_7(closure, [{key: 'createRequestPayload', value: value_76095}, {key: 'createWithPayload',
value: value_76097}, {key: 'create', value: function({id, searchContext, searchQuery, searchTabs, getLimit,
pagination, trackExactTotalHits}) {
this.cancel(id);
var withPayload = this.createWithPayload({searchContext: searchContext, searchQuery: searchQuery,
searchTabs: searchTabs, getLimit: getLimit, pagination: pagination,
trackExactTotalHits: trackExactTotalHits});
this.set(id, withPayload);
return withPayload;
}}]);
}
function SearchTabsFetchManager() { // fn#76094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9869:550, offset: 0x01dc3cde, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_6(this, SearchTabsFetchManager);
const value3 = env1_9(SearchTabsFetchManager);
return env1_8(this, _isNativeReflectConstruct_76090() ? global.Reflect.construct(value3, arguments,
env1_9(this).constructor) : value3.apply(this, arguments));
}
function value_76095({searchQuery, searchTabs, getLimit, pagination, trackExactTotalHits}) { // fn#76095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9869:888, offset: 0x01dc3d4f, size: 126 bytes, params: 2, frame: 18
const include_nsfw = searchQuery.include_nsfw;
const channel_id = searchQuery.channel_id;
const env0_2 = env1_5(searchQuery, env1_2);
const object2 = {include_nsfw: include_nsfw, channel_ids: channel_id, tabs: {},
track_exact_total_hits: trackExactTotalHits};
searchTabs.forEach(_fun76096);
return object2;
}
function value_76097({searchContext, searchQuery, searchTabs, getLimit, pagination, trackExactTotalHits}) { // fn#76097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9869:1329, offset: 0x01dc3ee1, size: 427 bytes, params: 2, frame: 21
const SearchTabFetcherImpl = (require(9684) /* metro dependency 9684: SearchFetcher */).SearchTabFetcherImpl;
var type2;
var value4;
var searchTabFetcherImpl;
var channelId;
var value5;
var guildId;
var value6;
let value = this.createRequestPayload({searchQuery: searchQuery, searchTabs: searchTabs, getLimit: getLimit,
pagination: pagination, trackExactTotalHits: trackExactTotalHits});
let type = searchContext.type;
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
guildId = searchContext.guildId;
type = searchContext.type;
value6 = Object.create(SearchTabFetcherImpl.prototype, {constructor: {value: SearchTabFetcherImpl}});
searchTabFetcherImpl = new SearchTabFetcherImpl(guildId, type, searchQuery, value);
return searchTabFetcherImpl instanceof Object ? searchTabFetcherImpl : value6;
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
guildId = searchContext.guildId;
type = searchContext.type;
value6 = Object.create(SearchTabFetcherImpl.prototype, {constructor: {value: SearchTabFetcherImpl}});
searchTabFetcherImpl = new SearchTabFetcherImpl(guildId, type, searchQuery, value);
return searchTabFetcherImpl instanceof Object ? searchTabFetcherImpl : value6;
}
const THREAD = SearchTypes.THREAD;
if (THREAD === type) {
guildId = searchContext.guildId;
type = searchContext.type;
value6 = Object.create(SearchTabFetcherImpl.prototype, {constructor: {value: SearchTabFetcherImpl}});
searchTabFetcherImpl = new SearchTabFetcherImpl(guildId, type, searchQuery, value);
return searchTabFetcherImpl instanceof Object ? searchTabFetcherImpl : value6;
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
channelId = searchContext.channelId;
type = searchContext.type;
value5 = Object.create(SearchTabFetcherImpl.prototype, {constructor: {value: SearchTabFetcherImpl}});
searchTabFetcherImpl = new SearchTabFetcherImpl(channelId, type, searchQuery, value);
return searchTabFetcherImpl instanceof Object ? searchTabFetcherImpl : value5;
}
const DMS = SearchTypes.DMS;
if (DMS === type) {
type = searchContext.type;
type2 = searchContext.type;
value4 = Object.create(SearchTabFetcherImpl.prototype, {constructor: {value: SearchTabFetcherImpl}});
searchTabFetcherImpl = new SearchTabFetcherImpl(type, type2, searchQuery, value);
return searchTabFetcherImpl instanceof Object ? searchTabFetcherImpl : value4;
}
const Error = global.Error;
value = '[SearchFetchManager] Unsupported search context type: ' + searchContext.type;
const value3 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value3;
}
function _fun76096(a0) { // fn#76096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9869:1102, offset: 0x01dc3dcd, size: 276 bytes, params: 2, frame: 23
const limit = getLimit(a0);
const property = SEARCH_FILTERS_BY_TAB[a0];
const r6 = property != null ? SEARCH_QUERY_BY_SEARCH_FILTER[property] : {};
const has = r6.has;
const binding = env2_5;
const value4 = binding(r6, env2_3);
const binding2 = env0_2;
const has2 = binding2.has;
const value5 = binding(binding2, env2_4);
const Set = global.Set;
const r2 = has ?? [];
let items = [];
arraySpread(items, has2 ?? [], arraySpread(items, r2, 0, null), null);
const set = new Set(items);
items = [];
arraySpread(items, set, 0, null);
const tabs = env0_3.tabs;
const object3 = {};
copyDataProperties(object3, SEARCH_QUERY_DEFAULT_FILTERS, 0);
copyDataProperties(object3, value4, 0);
copyDataProperties(object3, value5, 0);
copyDataProperties(object3, items.length > 0 ? {has: items} : {}, 0);
copyDataProperties(object3, pagination, 0);
object3['limit'] = limit;
tabs[a0] = object3;
}
@@ -0,0 +1,88 @@
/* Metro module 15822; source: modules/search/managers/SearchTokensManager.tsx; dependencies: [6, 7, 15, 17, 18, 1950, 9675, 4860, 2] */
function _fun121603(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16030:6, offset: 0x0254bd17, size: 248 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(1950) /* metro dependency 1950: IntlLoaderStore */).subscribeToIntlLoadingSuccess;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121607(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/managers/SearchTokensManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121604() { // fn#121604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16030:188, offset: 0x0254be0f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_121604_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121607(a0) { // fn#121607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16030:391, offset: 0x0254be71, size: 97 bytes, params: 2, frame: 16
const closure = SearchTokensManager;
env0_6(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_121609}, {key: '_terminate', value: function() {
var _unsubscribeIntlLoadingStore = this._unsubscribeIntlLoadingStore;
if (_unsubscribeIntlLoadingStore != null) {
_unsubscribeIntlLoadingStore.call(this);
}
}}]);
}
function SearchTokensManager(a0) { // fn#121608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16030:403, offset: 0x0254bed2, size: 185 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, SearchTokensManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(SearchTokensManager);
binding = env1_4;
if (_isNativeReflectConstruct_121604()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
const refreshSearchTokens = (require(9675) /* metro dependency 9675: SearchUtils */).refreshSearchTokens;
value.actions = {USER_SETTINGS_PROTO_UPDATE: refreshSearchTokens, POST_CONNECTION_OPEN: refreshSearchTokens};
return value;
}
function value_121609() { // fn#121609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16030:844, offset: 0x0254bf8b, size: 51 bytes, params: 1, frame: 12
const value = environment.__proto__;
this._unsubscribeIntlLoadingStore = subscribeToIntlLoadingSuccess((require(9675) /* metro dependency 9675: SearchUtils */).refreshSearchTokens);
}
@@ -0,0 +1,118 @@
/* Metro module 9688; source: modules/search/managers/native/SearchSessionAnalyticsManager.tsx; dependencies: [6, 7, 15, 17, 18, 9614, 9675, 9689, 2] */
function _fun76165(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:6, offset: 0x01dc5714, size: 248 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(9614) /* metro dependency 9614: TrackingConstants */).SEARCH_TAB_TO_ANALYTICS_SEARCH_TAB;
let value = importDefault(9689) /* metro dependency 9689: AbstractSearchSessionAnalyticsManager */;
value = _fun76169(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/managers/native/SearchSessionAnalyticsManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_76166() { // fn#76166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:193, offset: 0x01dc580c, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_76166_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun76169(a0) { // fn#76169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:396, offset: 0x01dc586e, size: 201 bytes, params: 2, frame: 16
const closure = SearchSessionAnalyticsManager;
env0_6(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_76171}, {key: '_terminate', value: value_76172},
{key: '_transferSession', value: function() {
}}, {key: 'getLocation', value: value_76174}, {key: 'getSelectedTab', value: value_76175}, {key: 'setSelectedTab',
value: function(a0, a1) {
this.selectedTabs.set(require(dependencyMap[6]).getSearchContextId(a0), SEARCH_TAB_TO_ANALYTICS_SEARCH_TAB[a1]);
}}]);
}
function SearchSessionAnalyticsManager(a0) { // fn#76170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:408, offset: 0x01dc5937, size: 192 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, SearchSessionAnalyticsManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SearchSessionAnalyticsManager);
binding = env1_4;
if (_isNativeReflectConstruct_76166()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
let Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
let map = new Map();
value.locations = map instanceof Object ? map : value4;
Map = global.Map;
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
value.selectedTabs = map instanceof Object ? map : value6;
return value;
}
function value_76171(a0, a1) { // fn#76171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:826, offset: 0x01dc59f7, size: 64 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(a0);
this.locations.set(value, a1);
}
function value_76172(a0) { // fn#76172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:926, offset: 0x01dc5a37, size: 76 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(a0);
this.locations.delete(value);
this.selectedTabs.delete(value);
}
function value_76174(a0) { // fn#76174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:1098, offset: 0x01dc5a83, size: 60 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(a0);
return this.locations.get(value);
}
function value_76175(a0) { // fn#76175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9874:1205, offset: 0x01dc5abf, size: 60 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(a0);
return this.selectedTabs.get(value);
}
@@ -0,0 +1,103 @@
/* Metro module 11828; source: modules/search/native/SearchPlatformActionCreators.tsx; dependencies: [661, 11829, 9674, 9675, 694, 2] */
function _fun90596(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:6, offset: 0x0203fa18, size: 287 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
require(11829) /* metro dependency 11829: SearchTabsLayoutStore */;
require(9674) /* metro dependency 9674: SearchQueryStore */;
object2 = {searchPeopleTab: searchPeopleTab, cleanupPeopleTab: cleanupPeopleTab,
searchGuildMemberTab: searchGuildMemberTab, cleanupGuildMemberTab: cleanupGuildMemberTab,
searchGuildChannelTab: searchGuildChannelTab, cleanupGuildChannelTab: cleanupGuildChannelTab,
addSearchHistoryItem: addSearchHistoryItem, removeSearchHistoryItem: removeSearchHistoryItem,
clearSearchHistory: clearSearchHistory, updateSearchQuery: updateSearchQuery,
deleteSearchQuery: deleteSearchQuery, initializeSearchQuery: initializeSearchQuery};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/SearchPlatformActionCreators.tsx');
exports.default = object2;
}
function searchPeopleTab(a0, a1) { // fn#90597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:157, offset: 0x0203fb37, size: 91 bytes, params: 3, frame: 14
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_PEOPLE_TAB_SEARCH', id: searchContextId, searchQueryString: a1});
}
function cleanupPeopleTab(a0) { // fn#90598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:318, offset: 0x0203fb92, size: 83 bytes, params: 2, frame: 14
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_PEOPLE_TAB_CLEANUP', id: searchContextId});
}
function searchGuildMemberTab({searchContext, searchQueryString, guildId, channelId, threadId}) { // fn#90599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:463, offset: 0x0203fbe5, size: 129 bytes, params: 2, frame: 18
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'SEARCH_GUILD_MEMBER_TAB_SEARCH', id: searchContextId,
searchQueryString: searchQueryString, guildId: guildId, channelId: channelId, threadId: threadId});
}
function cleanupGuildMemberTab(a0) { // fn#90600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:740, offset: 0x0203fc66, size: 83 bytes, params: 2, frame: 14
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_GUILD_MEMBER_TAB_CLEANUP', id: searchContextId});
}
function searchGuildChannelTab({searchContext, searchQueryString, guildId}) { // fn#90601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:897, offset: 0x0203fcb9, size: 109 bytes, params: 2, frame: 16
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'SEARCH_GUILD_CHANNEL_TAB_SEARCH', id: searchContextId,
searchQueryString: searchQueryString, guildId: guildId});
}
function cleanupGuildChannelTab(a0) { // fn#90602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:1131, offset: 0x0203fd26, size: 83 bytes, params: 2, frame: 14
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_GUILD_CHANNEL_TAB_CLEANUP', id: searchContextId});
}
function addSearchHistoryItem(a0, a1) { // fn#90603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:1289, offset: 0x0203fd79, size: 130 bytes, params: 3, frame: 14
var searchContextId;
const type = a0.type;
var value;
const DMS = SearchTypes.DMS;
if (type === DMS) {
searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_HISTORY_NATIVE_ADD_ITEM', id: searchContextId, item: a1});
} else if (a0.type === SearchTypes.GUILD) {
searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_HISTORY_NATIVE_ADD_ITEM', id: searchContextId, item: a1});
}
}
function removeSearchHistoryItem(a0, a1) { // fn#90604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:1493, offset: 0x0203fdfb, size: 90 bytes, params: 3, frame: 14
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_HISTORY_NATIVE_REMOVE_ITEM', id: searchContextId, item: a1});
}
function clearSearchHistory(a0) { // fn#90605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:1660, offset: 0x0203fe55, size: 83 bytes, params: 2, frame: 14
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_HISTORY_NATIVE_CLEAR_ITEMS', id: searchContextId});
}
function updateSearchQuery(a0, a1) { // fn#90606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:1812, offset: 0x0203fea8, size: 94 bytes, params: 3, frame: 15
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_QUERY_NATIVE_UPDATE', id: searchContextId, searchContext: a0, updater: a1});
}
function deleteSearchQuery(a0) { // fn#90607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:1984, offset: 0x0203ff06, size: 81 bytes, params: 2, frame: 14
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_QUERY_NATIVE_DELETE', id: searchContextId});
}
function initializeSearchQuery(a0) { // fn#90608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12014:2132, offset: 0x0203ff57, size: 88 bytes, params: 2, frame: 15
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'SEARCH_QUERY_NATIVE_INITIALIZE', id: searchContextId, searchContext: a0});
}
@@ -0,0 +1,37 @@
/* Metro module 11823; source: modules/search/native/SearchPlatformConstants.tsx; dependencies: [3854, 11824, 11826, 8347, 8345, 10169, 2] */
function _fun90589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12009:6, offset: 0x0203f6e1, size: 407 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const LINKING_WHITELIST = (require(3854) /* metro dependency 3854: LinkingWhitelist */).LINKING_WHITELIST;
object2.REGEX = LINKING_WHITELIST.tiktok.regex;
const TiktokNeutralIcon = (require(11824) /* metro dependency 11824: TiktokNeutralIcon */).TiktokNeutralIcon;
object2.Icon = TiktokNeutralIcon;
const items2 = [object2];
object2 = {};
object2.REGEX = LINKING_WHITELIST.twitter.regex;
const TwitterNeutralIcon = (require(11826) /* metro dependency 11826: TwitterNeutralIcon */).TwitterNeutralIcon;
object2.Icon = TwitterNeutralIcon;
items2[1] = object2;
object2 = {};
object2.REGEX = LINKING_WHITELIST.instagram.regex;
const InstagramNeutralIcon = (require(8347) /* metro dependency 8347: InstagramNeutralIcon */).InstagramNeutralIcon;
object2.Icon = InstagramNeutralIcon;
items2[2] = object2;
object2 = {};
object2.REGEX = LINKING_WHITELIST.facebook.regex;
const FacebookNeutralIcon = (require(8345) /* metro dependency 8345: FacebookNeutralIcon */).FacebookNeutralIcon;
object2.Icon = FacebookNeutralIcon;
items2[3] = object2;
object2 = {};
object2.REGEX = LINKING_WHITELIST.youtube.regex;
const YoutubeNeutralIcon = (require(10169) /* metro dependency 10169: YoutubeNeutralIcon */).YoutubeNeutralIcon;
object2.Icon = YoutubeNeutralIcon;
items2[4] = object2;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/SearchPlatformConstants.tsx');
exports.SEARCH_TEXT_INPUT_DEBOUNCE_TIME = 500;
exports.EMPTY_MEDIA_RESULTS = [];
exports.PLATFORM_REGEX_ICON_PAIRS = items2;
}
@@ -0,0 +1,830 @@
/* Metro module 11822; source: modules/search/native/SearchPlatformUtils.tsx; dependencies: [4792, 9674, 9615, 11823, 661, 9675, 9546, 1391, 6996, 477, 1848, 4056, 1471, 8765, 697, 3829, 9673, 11828, 9682, 22, 628, 2] */
function _fun90549(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:6, offset: 0x0203e054, size: 676 bytes, params: 8, frame: 31
var object2;
let env0_0 = require;
const _arrayLikeToArray_90552 = 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 closure = performKeyboardAwareNavigation;
const closure2 = function(a0) {
var env0_0 = a0;
global.setTimeout(_fun90556, 200);
};
const closure3 = getUrlIcon;
const closure4 = getGridItemBorderStyles;
const closure5 = function({itemIndex, numItems, numColumns, spacing}) {
var r8;
var object = {};
copyDataProperties(object, getGridItemBorderStyles({itemIndex: itemIndex, numItems: numItems,
numColumns: numColumns}), r8);
copyDataProperties(object, getGridItemSpacingStyles({itemIndex: itemIndex, spacing: spacing,
numColumns: numColumns}), r8);
return object;
};
const closure6 = function({itemIndex, spacing, numColumns}) {
var value = spacing * (numColumns - 1) / numColumns;
var value2 = itemIndex % numColumns;
if (value2 === 0) {
return {marginEnd: value};
}
if (numColumns - 1 === value2) {
return {marginStart: value};
}
return {marginHorizontal: value / 2};
};
const closure7 = function(a0) {
return {id: a0.text, text: a0.text};
};
const _getLimit = function(a0) {
var Math = global.Math;
return Math.min(a0, MAX_SEARCH_RESULTS_LIMIT);
};
const getInitialFetchLimit = function(a0) {
return _getLimit(SEARCH_TABS_TO_SEARCH_QUERY_LIMITS[a0]);
};
const getNextFetchLimit = function(a0) {
return _getLimit(2 * SEARCH_TABS_TO_SEARCH_QUERY_LIMITS[a0]);
};
const closure8 = fetchInitialMessages;
const closure9 = syncAutocomplete;
const closure10 = subscribeSearchQueryState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_5 = value.CHANNEL_SEARCH_INITIAL_MESSAGE_TABS;
const env0_6 = value.MAX_SEARCH_RESULTS_LIMIT;
const env0_7 = value.MESSAGE_SEARCH_RESULT_TABS;
const env0_8 = value.SEARCH_INITIAL_MESSAGE_TABS;
const env0_9 = value.SEARCH_TABS_TO_SEARCH_QUERY_LIMITS;
const env0_10 = value.SearchFileTypes;
const env0_11 = value.SearchLinkTypes;
const env0_12 = value.SearchMediaTypes;
value = require(11823) /* metro dependency 11823: SearchPlatformConstants */;
const env0_13 = value.PLATFORM_REGEX_ICON_PAIRS;
const SEARCH_TEXT_INPUT_DEBOUNCE_TIME = value.SEARCH_TEXT_INPUT_DEBOUNCE_TIME;
value = require(661) /* metro dependency 661: Constants */;
const env0_14 = value.MessageFlags;
const env0_15 = value.SearchModes;
const env0_16 = value.SearchTypes;
object2 = {performKeyboardAwareNavigation: closure, delayUntilNavigationComplete: closure2, getUrlIcon: closure3,
getGridItemBorderStyles: closure4, getMediaGridItemStyles: closure5, getGridItemSpacingStyles: closure6,
toSearchBarTag: closure7, fetchInitialMessages: closure8};
object2.fetchInitialMessagesDebounced = (importDefault(22) /* metro dependency 22 */).debounce(closure8,
SEARCH_TEXT_INPUT_DEBOUNCE_TIME);
object2.fetchNextMessages = fetchNextMessages;
object2.syncAutocomplete = closure9;
object2.syncAutocompleteDebounced = (importDefault(22) /* metro dependency 22 */).debounce(closure9,
SEARCH_TEXT_INPUT_DEBOUNCE_TIME);
object2.navigateToSearchWithPrefetch = function(a0, a1) {
importDefault(dependencyMap[18]).initializeAutocomplete(a1);
importDefault(dependencyMap[17]).initializeSearchQuery(a1);
fetchInitialMessages(a1);
a0.navigate('search', {searchContext: a1});
};
object2.subscribeSearchQueryState = closure10;
object2.subscribeTextInputValue = function(a0, a1, a2) {
var env0_0 = a1;
return subscribeSearchQueryState(a0, _fun90579, _fun90580, a2);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/SearchPlatformUtils.tsx');
exports.default = object2;
exports.getMedia = getMedia;
exports.getFiles = function(a0) {
var env0_0 = a0;
var value = a0.getContentMessage();
var env0_2 = value;
var attachments = value.attachments;
if (attachments != null) {
attachments.forEach(_fun90586);
}
return [];
};
exports.getLinks = getLinks;
exports.performKeyboardAwareNavigation = closure;
exports.delayUntilNavigationComplete = closure2;
exports.getUrlIcon = closure3;
exports.getGridItemBorderStyles = closure4;
exports.getMediaGridItemStyles = closure5;
exports.getGridItemSpacingStyles = closure6;
exports.toSearchBarTag = closure7;
}
function _createForOfIteratorHelperLoose_90550(a0, a1) { // fn#90550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:503, offset: 0x0203e2f8, 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 _fun90551;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_90552(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_90552(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_90552(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun90551;
}
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 performKeyboardAwareNavigation(a0) { // fn#90553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:1413, offset: 0x0203e46c, size: 142 bytes, params: 2, frame: 16
var moduleValue2;
const env0_0 = a0;
const useKeyboardIsOpenModule = require(6996) /* metro dependency 6996: useKeyboardIsOpen */;
const getKeyboardIsOpen = useKeyboardIsOpenModule.getKeyboardIsOpen;
if (Reflect.apply(getKeyboardIsOpen, useKeyboardIsOpenModule, [])) {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isIOS()) {
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
global.setTimeout(_fun90554, 100);
} else {
a0();
}
} else {
a0();
}
}
function delayUntilNavigationComplete(a0) { // fn#90555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:1569, offset: 0x0203e4fa, size: 37 bytes, params: 2, frame: 13
const env0_0 = a0;
global.setTimeout(_fun90556, 200);
}
function getUrlIcon(a0) { // fn#90557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:1636, offset: 0x0203e51f, size: 273 bytes, params: 2, frame: 16
var r4;
var property;
var REGEX;
var Icon;
var exec;
var value3;
if (a0 != null) {
var defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
if (defaultImport.safeParseWithQuery(a0) == null) {
return (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
}
var defaultImport2 = importDefault(1471) /* metro dependency 1471: URLUtils */;
if (defaultImport2.isDiscordUrl(a0)) {
return (require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon;
}
var length = PLATFORM_REGEX_ICON_PAIRS.length;
var value2 = 0;
if (value2 < length) {
r4 = value2;
loopExit4: while (true) {
property = PLATFORM_REGEX_ICON_PAIRS[r4];
REGEX = property.REGEX;
Icon = property.Icon;
exec = REGEX.exec;
if (Reflect.apply(exec, REGEX, [a0]) != null) {
return Icon;
}
value3 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = PLATFORM_REGEX_ICON_PAIRS.length;
if (value3 < length) {
r4 = value3;
continue;
}
break loopExit4;
}
return (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
}
}
return (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
}
function getGridItemBorderStyles({itemIndex, numItems, numColumns}) { // fn#90558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:1931, offset: 0x0203e630, size: 310 bytes, params: 2, frame: 16
var r0;
var object2;
let Math = global.Math;
let value = Math.ceil(numItems / numColumns);
Math = global.Math;
if (itemIndex === 0) {
object2 = {};
object2.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
r0 = object2;
} else if (itemIndex === numColumns - 1) {
object2 = {};
object2.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
r0 = object2;
} else if (itemIndex % numColumns != 0) {
value = undefined;
if (itemIndex !== value * numColumns - 1) {
r0 = value;
} else {
object2 = {};
object2.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
r0 = object2;
}
} else if (Math.floor(itemIndex / numColumns) === value - 1) {
object2 = {};
object2.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
r0 = object2;
} else {
value = undefined;
if (itemIndex !== value * numColumns - 1) {
r0 = value;
} else {
object2 = {};
object2.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
r0 = object2;
}
}
return r0;
}
function onInitialFetchMessagesSuccess({searchContext, tabEntries}) { // fn#90565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:2896, offset: 0x0203e899, size: 85 bytes, params: 2, frame: 12
var value;
if (tabEntries.every(function(a0) {
var r0;
var r1;
var r2;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
if (value2) {
r0 = item2;
r1 = value;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value;
r2 = value3;
} else {
r0 = item3;
r1 = item;
r2 = value3;
}
}
if (!r2) {
r0.return();
}
return r1.total_results === 0 || r1.total_results == null;
})) {
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchEmptyMessageResult({searchContext: searchContext});
}
}
function onFetchMessagesStart({searchContext, searchQueryString}) { // fn#90567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:3090, offset: 0x0203e942, size: 67 bytes, params: 2, frame: 14
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).updateSearchQuery(searchContext,
function(a0) {
return a0.setSearchResultsQuery(searchQueryString);
});
}
function fetchInitialMessages(a0) { // fn#90569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:3222, offset: 0x0203e99c, size: 395 bytes, params: 2, frame: 24
var object2;
var defaultImport3;
var fetchTabMessages;
var cursor;
var value5;
const env0_0 = a0;
const isInitialSearchQuery2 = SearchQueryStore.isInitialSearchQuery(a0);
const queryString = SearchQueryStore.getQueryString(a0);
const r7 = isInitialSearchQuery2 ? SearchTypes.GUILD_CHANNEL === a0.type || SearchTypes.CHANNEL === a0.type ? CHANNEL_SEARCH_INITIAL_MESSAGE_TABS : SEARCH_INITIAL_MESSAGE_TABS : MESSAGE_SEARCH_RESULT_TABS;
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(a0, r7[0],
queryString);
const getIsFetching = SearchMessageStore.getIsFetching;
if (!Reflect.apply(getIsFetching, SearchMessageStore, [searchTabFetchId])) {
(importDefault(9682) /* metro dependency 9682: SearchActionCreators */).clearAllSearchMesssages();
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchStarted({searchContext: a0});
defaultImport3 = importDefault(9682) /* metro dependency 9682: SearchActionCreators */;
fetchTabMessages = defaultImport3.fetchTabMessages;
object2 = {searchContext: a0, searchTabs: r7, searchQueryString: queryString, getId: getId_90570};
object2.getLimit = getInitialFetchLimit;
object2.onFetchStart = onFetchMessagesStart;
object2.onFetchSuccess = onInitialFetchMessagesSuccess;
cursor = SearchMessageStore.getCursor(searchTabFetchId);
value5 = null;
object2.pagination = {cursor: value5 != cursor ? cursor : value5};
object2.trackExactTotalHits = (require(3829) /* metro dependency 3829: UserSettings */).SearchResultExactCountEnabled.getSetting();
object2.searchMode = SearchModes.NEWEST;
Reflect.apply(fetchTabMessages, defaultImport3, [object2]);
}
}
function syncAutocomplete(a0) { // fn#90571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:3964, offset: 0x0203eb5d, size: 151 bytes, params: 2, frame: 21
const queryString = SearchQueryStore.getQueryString(a0, true);
const value3 = (require(9675) /* metro dependency 9675: SearchUtils */).tokenizeQuery(queryString);
const selectionScope = (require(9675) /* metro dependency 9675: SearchUtils */).getSelectionScope(value3,
queryString.length - 1, queryString.length - 1);
const value = importDefault(9682) /* metro dependency 9682: SearchActionCreators */;
value.updateAutocompleteQuery({searchContext: a0, tokens: value3, cursorScope: selectionScope,
queryString: queryString});
}
function subscribeSearchQueryState(a0, a1, a2, a3) { // fn#90572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:4194, offset: 0x0203ebf4, size: 116 bytes, params: 5, frame: 17
const value = a3;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a1(SearchQueryStore.getManager(a0));
if (value && env0_3 != null) {
a2(env0_3, undefined);
}
SearchQueryStore.addChangeListener(subscribeSearchQueryStateCallback);
return function() {
return SearchQueryStore.removeChangeListener(subscribeSearchQueryStateCallback);
};
}
function fetchNextMessages(a0, a1, a2) { // fn#90575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:4918, offset: 0x0203ece6, size: 505 bytes, params: 4, frame: 25
var r1;
var r0;
var r3;
var cursor;
var totalCount;
var messages;
const SearchResultExactCountEnabled = (require(3829) /* metro dependency 3829: UserSettings */).SearchResultExactCountEnabled;
var defaultImport;
var fetchTabMessages;
var object2;
var cursor2;
var value22;
const env0_0 = a0;
const queryString = SearchQueryStore.getQueryString(a0);
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(a0, a1,
queryString);
const initialFetchLimit = getInitialFetchLimit(a1);
const searchTabFetchId2 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(a0, a1,
queryString);
if (SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId2)) {
cursor = SearchMessageStore.getCursor(searchTabFetchId2);
totalCount = SearchMessageStore.getTotalCount(searchTabFetchId2);
messages = SearchMessageStore.getMessages(searchTabFetchId2);
if (SearchResultExactCountEnabled.getSetting()) {
r1 = cursor != null && totalCount != null;
r1 = r1 && messages != null;
r1 = r1 && messages.length < totalCount;
r0 = r1;
} else if (totalCount == null) {
r0 = cursor != null;
} else if (totalCount < initialFetchLimit) {
r1 = cursor != null && totalCount != null;
r1 = r1 && messages != null;
r1 = r1 && messages.length < totalCount;
r0 = r1;
} else {
r0 = cursor != null;
}
r3 = r0;
} else {
r3 = true;
}
const isFetching = SearchMessageStore.getIsFetching(searchTabFetchId);
r0 = r3 ? !SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId) : !r3;
r0 = !r0 ? isFetching : r0;
if (r0) {
r0 = !r0;
} else {
defaultImport = importDefault(9682) /* metro dependency 9682: SearchActionCreators */;
fetchTabMessages = defaultImport.fetchTabMessages;
object2 = {searchContext: a0};
object2.searchTabs = [a1];
object2.searchQueryString = queryString;
object2.getLimit = getNextFetchLimit;
object2.getId = getId_90576;
object2.onFetchStart = onFetchMessagesStart;
object2.onFetchSuccess = a2;
cursor2 = SearchMessageStore.getCursor(searchTabFetchId);
value22 = null;
object2.pagination = {cursor: value22 != cursor2 ? cursor2 : value22};
object2.trackExactTotalHits = SearchResultExactCountEnabled.getSetting();
object2.searchMode = SearchModes.NEWEST;
r0 = Reflect.apply(fetchTabMessages, defaultImport, [object2]);
}
return r0;
}
function subscribeTextInputValue(a0, a1, a2) { // fn#90578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:6162, offset: 0x0203ef42, size: 44 bytes, params: 4, frame: 17
const env0_0 = a1;
return subscribeSearchQueryState(a0, function(a0) {
return {textInputValue: a0.getTextInputValue(), textInputChangedFromInput: a0.getTextValueChangedFromInput()};
}, _fun90580, a2);
}
function getMedia(a0, a1) { // fn#90581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:6544, offset: 0x0203efc8, size: 87 bytes, params: 3, frame: 14
const env0_0 = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(a0) ?? undefined;
a1.forEach(_fun90582);
return [];
}
function getFiles(a0) { // fn#90585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:7760, offset: 0x0203f39e, size: 62 bytes, params: 2, frame: 12
const env0_0 = a0;
const attachments = a0.getContentMessage().attachments;
if (attachments != null) {
attachments.forEach(_fun90586);
}
return [];
}
function getLinks(a0, a1) { // fn#90587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:8323, offset: 0x0203f53f, size: 190 bytes, params: 3, frame: 16
const env0_0 = a1;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(a0) ?? undefined;
const items2 = [];
const embeds = a1.getContentMessage().embeds;
if (embeds != null) {
embeds.forEach(_fun90588);
}
if (items2.length === 0) {
items2.push({type: SearchLinkTypes.TEXT, messageId: a1.id, channelId: a1.channel_id, author: a1.author,
linkIndex: 0});
}
return items2;
}
function fetchInitialMessagesGetId(a0) { // fn#90570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:3668, owner: fetchInitialMessages.getId, offset: 0x0203eb27, size: 54 bytes, params: 2, frame: 15
const value = environment.__proto__;
return (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(env0_0, a0, env0_1);
}
function subscribeSearchQueryStateCallback() { // fn#90573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:4304, owner: subscribeSearchQueryState.callback, offset: 0x0203ec68, size: 99 bytes, params: 1, frame: 15
const value = environment.__proto__;
const moduleValue = require(SearchQueryStore.getManager(env0_0));
if (env0_3 == null) {
importDefault(moduleValue, env0_3);
} else if (!(importDefault(628) /* metro dependency 628: shallowEqual */)(env0_3, moduleValue)) {
importDefault(moduleValue, env0_3);
}
}
function _fun90580({textInputValue, textInputChangedFromInput}, a1) { // fn#90580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:6343, offset: 0x0203ef93, size: 53 bytes, params: 3, frame: 17
const textInputValue = a1?.textInputValue;
require(textInputValue, textInputValue, textInputChangedFromInput);
}
function _fun90582(a0) { // fn#90582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:6657, offset: 0x0203f01f, size: 403 bytes, params: 2, frame: 23
var r7;
var forEach;
var value6;
var binding;
var push;
var COMPONENT;
var id;
var channel_id;
var author;
var sources;
var unfurledMediaItem;
var value7;
var AUDIO;
const env0_0 = a0;
let env0_1 = 0;
const contentMessage = a0.getContentMessage();
const attachments = contentMessage.attachments;
reducibleJoin2: while (true) {
if (attachments == null) {
break reducibleJoin2;
}
forEach = attachments.forEach;
Reflect.apply(forEach, attachments, [_fun90583]);
break reducibleJoin2;
}
const embeds = contentMessage.embeds;
reducibleJoin4: while (true) {
if (embeds == null) {
break reducibleJoin4;
}
forEach = embeds.forEach;
Reflect.apply(forEach, embeds, [_fun90584]);
break reducibleJoin4;
}
const _createForOfIteratorHelperLoose_90550Binding = _createForOfIteratorHelperLoose_90550;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
const value4 = _createForOfIteratorHelperLoose_90550Binding(mediaSourceUtilModule.extractMediaFromMessageComponents(a0,
contentMessage, env0_0));
const value5 = value4();
let done = value5.done;
if (!done) {
r7 = value5;
reducibleLoop5: while (true) {
value6 = r7.value;
binding = env0_1;
push = binding.push;
COMPONENT = SearchMediaTypes.COMPONENT;
id = a0.id;
channel_id = a0.channel_id;
author = a0.author;
sources = value6.sources;
unfurledMediaItem = value6.unfurledMediaItem;
Reflect.apply(push, binding, [{type: COMPONENT, messageId: id, channelId: channel_id, author: author,
mediaIndex: env0_1, sources: sources, unfurledMediaItem: unfurledMediaItem}]);
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop5;
}
r7 = value7;
continue reducibleLoop5;
}
}
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = contentMessage.flags;
const IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
reducibleJoin8: while (true) {
if (Reflect.apply(hasFlag, flagUtilsModule, [flags, IS_VOICE_MESSAGE])) {
binding = env0_1;
push = binding.push;
AUDIO = SearchMediaTypes.AUDIO;
id = a0.id;
channel_id = a0.channel_id;
author = a0.author;
Reflect.apply(push, binding, [{type: AUDIO, messageId: id, channelId: channel_id, author: author,
mediaIndex: env0_1}]);
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
break reducibleJoin8;
}
break reducibleJoin8;
}
}
function _fun90586(a0, a1) { // fn#90586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:7859, offset: 0x0203f3dc, size: 355 bytes, params: 3, frame: 20
var moduleValue2;
var moduleValue3;
var hasFlag2;
var binding;
var push;
var object2;
var binding2;
var binding3;
var binding4;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
if (mediaSourceUtilModule.isValidImageAttachment(a0)) {
binding = env0_1;
push = binding.push;
binding4 = env0_0;
Reflect.apply(push, binding, [{type: SearchFileTypes.MEDIA_ATTACHMENT, messageId: binding4.id,
channelId: binding4.channel_id, author: binding4.author, fileIndex: a1, attachment: a0}]);
} else {
moduleValue2 = mediaSourceUtilModule;
if (moduleValue2.isValidVideoAttachment(a0)) {
binding = env0_1;
push = binding.push;
binding4 = env0_0;
Reflect.apply(push, binding, [{type: SearchFileTypes.MEDIA_ATTACHMENT, messageId: binding4.id,
channelId: binding4.channel_id, author: binding4.author, fileIndex: a1, attachment: a0}]);
} else {
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag2 = moduleValue3.hasFlag(env0_2.flags, MessageFlags.IS_VOICE_MESSAGE);
binding = env0_1;
push = binding.push;
object2 = {};
if (hasFlag2) {
object2.type = SearchFileTypes.AUDIO;
binding3 = env0_0;
object2.messageId = binding3.id;
object2.channelId = binding3.channel_id;
object2.author = binding3.author;
object2.fileIndex = a1;
object2.attachment = a0;
Reflect.apply(push, binding, [object2]);
} else {
object2.type = SearchFileTypes.ATTACHMENT;
binding2 = env0_0;
object2.messageId = binding2.id;
object2.channelId = binding2.channel_id;
object2.author = binding2.author;
object2.fileIndex = a1;
object2.attachment = a0;
Reflect.apply(push, binding, [object2]);
}
}
}
}
function _fun90588(a0, a1) { // fn#90588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:8486, offset: 0x0203f5fd, size: 228 bytes, params: 3, frame: 22
var moduleValue2;
var moduleValue3;
var extractMediaFromEmbed;
var binding;
var value3;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
if (mediaSourceUtilModule.isValidImageEmbed(a0)) {
moduleValue3 = mediaSourceUtilModule;
extractMediaFromEmbed = moduleValue3.extractMediaFromEmbed;
binding = env0_3;
value3 = Reflect.apply(extractMediaFromEmbed, moduleValue3, [a0, require, binding, a1, env0_1]);
if (value3 != null) {
binding = env0_2;
binding.push({type: SearchLinkTypes.EMBED, messageId: require.id, channelId: require.channel_id,
author: require.author, linkIndex: env0_4, sources: value3, embed: a0});
binding = env0_4;
env0_4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
} else {
moduleValue2 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
if (moduleValue2.isValidVideoEmbed(a0)) {
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromEmbed = moduleValue3.extractMediaFromEmbed;
binding = env0_3;
value3 = Reflect.apply(extractMediaFromEmbed, moduleValue3, [a0, require, binding, a1, env0_1]);
if (value3 != null) {
binding = env0_2;
binding.push({type: SearchLinkTypes.EMBED, messageId: require.id, channelId: require.channel_id,
author: require.author, linkIndex: env0_4, sources: value3, embed: a0});
binding = env0_4;
env0_4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
}
}
function _fun90583(a0, a1) { // fn#90583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:6733, offset: 0x0203f1b2, size: 261 bytes, params: 3, frame: 21
var moduleValue2;
var moduleValue3;
var moduleValue4;
var extractMediaFromAttachment;
var binding;
var value3;
var value4;
var push;
var binding2;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
if (!mediaSourceUtilModule.isThumbnailAttachment(a0)) {
moduleValue2 = mediaSourceUtilModule;
if (moduleValue2.isValidImageAttachment(a0)) {
moduleValue4 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromAttachment = moduleValue4.extractMediaFromAttachment;
binding = env0_0;
value3 = environment.__proto__;
value4 = Reflect.apply(extractMediaFromAttachment, moduleValue4, [a0, binding, a1, env1_0]);
if (value4 != null) {
binding = env1_1;
push = binding.push;
binding2 = env0_0;
Reflect.apply(push, binding, [{type: SearchMediaTypes.ATTACHMENT, attachment: a0,
messageId: binding2.id,
channelId: binding2.channel_id, author: binding2.author, mediaIndex: env0_1, sources: value4}]);
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
} else {
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
if (moduleValue3.isValidVideoAttachment(a0)) {
moduleValue4 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromAttachment = moduleValue4.extractMediaFromAttachment;
binding = env0_0;
value3 = environment.__proto__;
value4 = Reflect.apply(extractMediaFromAttachment, moduleValue4, [a0, binding, a1, env1_0]);
if (value4 != null) {
binding = env1_1;
push = binding.push;
binding2 = env0_0;
Reflect.apply(push, binding, [{type: SearchMediaTypes.ATTACHMENT, attachment: a0,
messageId: binding2.id,
channelId: binding2.channel_id, author: binding2.author, mediaIndex: env0_1, sources: value4}]);
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
}
}
}
function _fun90584(a0, a1) { // fn#90584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12008:7073, offset: 0x0203f2b7, size: 231 bytes, params: 3, frame: 23
var moduleValue2;
var moduleValue3;
var extractMediaFromEmbed;
var binding;
var binding2;
var value3;
var value4;
var push;
var binding3;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
if (mediaSourceUtilModule.isValidImageEmbed(a0)) {
moduleValue3 = mediaSourceUtilModule;
extractMediaFromEmbed = moduleValue3.extractMediaFromEmbed;
binding = env0_0;
binding2 = env0_2;
value3 = environment.__proto__;
value4 = Reflect.apply(extractMediaFromEmbed, moduleValue3, [a0, binding, binding2, a1, env1_0]);
if (value4 != null) {
binding = env1_1;
push = binding.push;
binding3 = env0_0;
Reflect.apply(push, binding, [{type: SearchMediaTypes.EMBED, embed: a0, messageId: binding3.id,
channelId: binding3.channel_id, author: binding3.author, mediaIndex: env0_1, sources: value4}]);
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
} else {
moduleValue2 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
if (moduleValue2.isValidVideoEmbed(a0)) {
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromEmbed = moduleValue3.extractMediaFromEmbed;
binding = env0_0;
binding2 = env0_2;
value3 = environment.__proto__;
value4 = Reflect.apply(extractMediaFromEmbed, moduleValue3, [a0, binding, binding2, a1, env1_0]);
if (value4 != null) {
binding = env1_1;
push = binding.push;
binding3 = env0_0;
Reflect.apply(push, binding, [{type: SearchMediaTypes.EMBED, embed: a0, messageId: binding3.id,
channelId: binding3.channel_id, author: binding3.author, mediaIndex: env0_1, sources: value4}]);
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
}
}
@@ -0,0 +1,15 @@
/* Metro module 15069; source: modules/search/native/SearchResultLinkPreviewMarkup.tsx; dependencies: [6623, 6624, 15070, 6713, 2] */
function _fun114020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15266:6, offset: 0x024112c9, size: 176 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(6623) /* metro dependency 6623: combineMarkupRules */;
const NATIVE_SEARCH_RESULT_LINK_RULES = (importDefault(6624) /* metro dependency 6624: MarkupRules */).NATIVE_SEARCH_RESULT_LINK_RULES;
items = [NATIVE_SEARCH_RESULT_LINK_RULES];
const markupSearchResultLinkPreviewReactRulesModule = require(15070) /* metro dependency 15070: MarkupSearchResultLinkPreviewReactRules */;
items[1] = markupSearchResultLinkPreviewReactRulesModule.createSearchResultLinkPreviewReactRules();
value = value(items);
value = (importAll(6713) /* metro dependency 6713: MarkupParser */).reactParserFor(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/SearchResultLinkPreviewMarkup.tsx');
exports.NativeSearchResultLinkPreviewParser = value;
}
@@ -0,0 +1,34 @@
/* Metro module 10987; source: modules/search/native/components/HighlightText.tsx; dependencies: [31, 661, 33, 4501, 4000, 697, 1305, 2] */
function _fun84088(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11173:6, offset: 0x01f38916, size: 282 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object.fontFamily = PRIMARY_BOLD;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexOpacityToRgba = colorUtilsModule.hexOpacityToRgba;
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object.backgroundColor = Reflect.apply(hexOpacityToRgba, colorUtilsModule, [YELLOW_300, 0.3]);
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object.color = TEXT_STRONG;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{text: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/HighlightText.tsx');
exports.default = _default_84089;
}
function _default_84089({children}) { // fn#84089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11173:316, offset: 0x01f38a30, size: 74 bytes, params: 2, frame: 16
const styles = useStyles();
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={styles.text}>
{children}
</LegacyText>
);
}
@@ -0,0 +1,427 @@
/* Metro module 15020; source: modules/search/native/components/layout/SearchBar.tsx; dependencies: [31, 27, 1379, 1867, 3793, 1878, 9674, 9615, 9614, 661, 33, 4501, 697, 1244, 4805, 566, 4017, 4589, 1357, 11822, 11828, 3869, 9673, 9676, 4577, 4581, 3860, 674, 9100, 15021, 2] */
function _fun113571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:6, offset: 0x023ff4d2, size: 458 bytes, params: 8, frame: 20
let env0_0 = require;
const useSearchPlaceholder = function(a0) {
var env0_0 = a0;
return require(dependencyMap[15]).useStateFromStores([SearchQueryStore], _fun113573, [a0]);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_10 = searchConstantsModule.SEARCH_BAR_HEIGHT;
const env0_11 = searchConstantsModule.SearchQueryTagTypes;
const env0_12 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.HorizontalGradient;
const env0_14 = constantsModule.SearchTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_15 = value4.jsx;
const env0_16 = value4.jsxs;
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun113574);
const env0_18 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4589) /* metro dependency 4589 */);
object = {code: 'function SearchBarTsx1(){const{withSpring,gradientVisible,springStandard}=this.__closure;return{opacity:withSpring(gradientVisible.get()?1:0,springStandard)};}'};
value = value.memo(value.forwardRef(_fun113575));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchBar.tsx');
exports.default = value;
}
function useSearchPlaceholder(a0) { // fn#113572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:675, offset: 0x023ff69c, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], _fun113573, [a0]);
}
function _fun113574(a0) { // fn#113574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:366, offset: 0x023ff973, size: 192 bytes, params: 2, frame: 16
var r6;
var r2;
var object;
const object4 = {};
if (a0) {
r2 = {height: SEARCH_BAR_HEIGHT + 2, overflow: 'hidden'};
} else {
object = {};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.height = SEARCH_BAR_HEIGHT;
object.overflow = 'hidden';
r2 = object;
r6 = importDefault;
}
copyDataProperties(object4, r2, r6);
return {searchBar: object4, icon: {'width': 32, 'height': null, 'justifyContent': 'center', 'zIndex': 10,
height: SEARCH_BAR_HEIGHT}, gradientContainer: {'position': 'absolute', 'right': 0, height: SEARCH_BAR_HEIGHT},
gradient: {'width': 32, 'position': 'absolute', 'left': 0, 'top': 1, 'bottom': 1, 'zIndex': 100}};
}
function _fun113575({searchContext, setSuggestionsDismissed}, a1) { // fn#113575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1746, offset: 0x023ffa33, size: 856 bytes, params: 3, frame: 33
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SearchBar'));
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getTags(searchContext);
}, [searchContext]);
let binding = env0_3;
const value4 = binding.useMemo(_fun113577, [value3]);
const value5 = binding.useMemo(_fun113578, [value3]);
const value6 = binding.useRef(null);
const value7 = useSearchPlaceholder(searchContext);
binding.useImperativeHandle(a1, function() {
return {setText: _fun113581, getText: _fun113582, blur: _fun113583, focus: _fun113584, isFocused: _fun113585,
measure: _fun113586, measureInWindow: _fun113587, measureLayout: _fun113588};
});
binding.useEffect(_fun113589, [searchContext]);
const value8 = binding.useCallback(_fun113591, [searchContext]);
const value9 = binding.useCallback(_fun113593, [searchContext]);
const value10 = binding.useMemo(function() {
return _fun113596;
}, [searchContext, setSuggestionsDismissed]);
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = D_113599;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
gradientVisible: value11,
springStandard: (require(4581) /* metro dependency 4581: springPresets */).springStandard};
closure.__workletHash = 14270272447339;
closure.__initData = env0_19;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value13 = binding.useCallback(_fun113600, [value11]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const MOBILE_SEARCHBAR_GRADIENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_SEARCHBAR_GRADIENT_BACKGROUND;
const value15 = binding.useMemo(_fun113601, [Reflect.apply(useToken, useTokenModule,
[MOBILE_SEARCHBAR_GRADIENT_BACKGROUND])]);
const textInputValue = SearchQueryStore.getTextInputValue(searchContext);
const TagListInputNative = importDefault(9100) /* metro dependency 9100: TagListInputNative */;
const value17 = ((Component) => <Component searchContext={searchContext} />)(importDefault(15021) /* metro dependency 15021: SearchBarActivityIcon */);
binding = env0_18;
const {START, END} = HorizontalGradient;
return (
<TagListInputNative
ref={value6}
accessibilityHint={value5}
autoFocus
defaultValue={textInputValue}
style={styles.searchBar}
tags={value4}
icon={<View style={styles.icon}>{value17}<View style={styles.gradientContainer}>{((Component) => <Component start={START} end={END} colors={value15} style={[styles.gradient,
value12]} pointerEvents="none" />)(binding)}</View></View>}
onChangeText={value8}
onRemove={value9}
placeholder={value7}
onSubmitEditing={value10}
onScroll={value13}
horizontal
autoClearInputOnTagAdd={false}
/>
);
}
function _fun113573() { // fn#113573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:748, offset: 0x023ff6e7, size: 652 bytes, params: 1, frame: 23
var r3;
var name;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var channel;
let value = environment.__proto__;
const getChannelIds = SearchQueryStore.getChannelIds;
const binding = env0_0;
const value3 = Reflect.apply(getChannelIds, SearchQueryStore, [binding]);
const type = binding.type;
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
if (value3.size === 0) {
name = GuildStore.getGuild(env0_0.guildId)?.name;
r0 = name == null ? intl.string(t['5h0QOP']) : intl.formatToPlainString(t.LDpotA, {guildName: name});
} else {
r0 = intl.string(t['5h0QOP']);
}
return r0;
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
if (value3.size === 0) {
name = GuildStore.getGuild(env0_0.guildId)?.name;
r0 = name == null ? intl.string(t['5h0QOP']) : intl.formatToPlainString(t.LDpotA, {guildName: name});
} else {
r0 = intl.string(t['5h0QOP']);
}
return r0;
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
channel = ChannelStore.getChannel(env0_0.channelId);
if (channel == null) {
r3 = intl.string(t['5h0QOP']);
} else {
value = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore, true);
value = intl.formatToPlainString(t.LDpotA, {guildName: value});
r3 = value;
}
return r3;
}
const DMS = SearchTypes.DMS;
if (DMS === type) {
return intl.string(t.m7OrlR);
}
return intl.string(t['5h0QOP']);
}
function _fun113577() { // fn#113577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1908, offset: 0x023ffda6, size: 50 bytes, params: 1, frame: 13
const binding = env0_2;
return binding.map((require(11822) /* metro dependency 11822: SearchPlatformUtils */).toSearchBarTag);
}
function _fun113578() { // fn#113578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1962, offset: 0x023ffdd8, size: 132 bytes, params: 1, frame: 16
var environment;
var value2;
var intl;
var value;
if (env0_2.length !== 0) {
value = env0_2.map(function(a0) {
return a0.text;
});
value = value.join(', ');
value2 = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0zoRaK'],
{text: value});
}
}
function _fun113580() { // fn#113580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2168, offset: 0x023ffe5c, size: 102 bytes, params: 1, frame: 3
return {setText: setText_113581, getText: getText_113582, blur: blur_113583, focus: focus_113584,
isFocused: isFocused_113585, measure: measure_113586, measureInWindow: measureInWindow_113587,
measureLayout: measureLayout_113588};
}
function _fun113589() { // fn#113589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2783, offset: 0x0240000a, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(searchContext, _fun113590);
}
function _fun113591(a0) { // fn#113591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2917, offset: 0x0240007c, size: 202 bytes, params: 2, frame: 18
var environment;
var defaultImport;
var updateSearchQuery;
var isInitialSearchQuery2;
const env0_0 = a0;
let value = environment.__proto__;
const getTextInputValue = SearchQueryStore.getTextInputValue;
let searchContextBinding = searchContext;
if (Reflect.apply(getTextInputValue, SearchQueryStore, [searchContextBinding]) !== a0) {
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport, [searchContextBinding, _fun113592]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocompleteDebounced(searchContextBinding);
if (!SearchQueryStore.isAutocompleteVisible(searchContextBinding)) {
isInitialSearchQuery2 = SearchQueryStore.isInitialSearchQuery(searchContext);
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (isInitialSearchQuery2) {
value.fetchInitialMessages(searchContext);
} else {
value.fetchInitialMessagesDebounced(searchContext);
}
}
}
}
function _fun113593(a0) { // fn#113593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3207, offset: 0x02400162, size: 416 bytes, params: 2, frame: 21
var environment;
var AccessibilityAnnouncer;
var announce;
var intl;
var defaultImport2;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const getTags = SearchQueryStore.getTags;
const property = Reflect.apply(getTags, SearchQueryStore, [searchContext])[a0];
if (property != null) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.srlxB8,
{text: property.text})]);
if (property.type === SearchQueryTagTypes.COMPLETE) {
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterRemove({searchContext: searchContext,
searchTokenType: property.searchTokenType,
isDefault: property.location === SearchFilterAddLocations.CLIENT_AUTO_ADD});
}
defaultImport2 = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport2.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport2, [searchContextBinding, _fun113594]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocompleteDebounced(searchContextBinding);
if (SearchQueryStore.getQueryString(searchContextBinding) !== SearchQueryStore.getSearchResultsQuery(searchContextBinding)) {
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (SearchQueryStore.isInitialSearchQuery(searchContextBinding)) {
value.fetchInitialMessages(searchContext);
} else {
value.fetchInitialMessagesDebounced(searchContext);
}
}
}
}
function _fun113595() { // fn#113595, offset: 0x0240033f, size: 11 bytes, params: 1, frame: 1
return _fun113596;
}
function D_113599() { // fn#113599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4402, offset: 0x024004d8, size: 94 bytes, params: 1, frame: 17
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
object2.opacity = springModule.withSpring(env0_4.get() ? 1 : 0,
(require(4581) /* metro dependency 4581: springPresets */).springStandard);
return object2;
}
function _fun113600({nativeEvent}) { // fn#113600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4642, offset: 0x02400536, size: 66 bytes, params: 2, frame: 13
const binding = env0_4;
const set = binding.set;
const Math = global.Math;
Reflect.apply(set, binding, [Math.round(nativeEvent.contentOffset.x) > 5]);
}
function _fun113601() { // fn#113601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4791, offset: 0x02400578, size: 74 bytes, params: 1, frame: 13
const binding = env0_5;
const items2 = [binding];
let value = environment.__proto__;
value = (importDefault(674) /* metro dependency 674 */)(binding);
value = value.alpha(0);
items2[1] = value.hex();
return items2;
}
function setText_113581(a0) { // fn#113581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2182, offset: 0x023ffec2, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.setText(a0);
}
function getText_113582() { // fn#113582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2248, offset: 0x023ffee9, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return env1_3.current?.getText() ?? '';
}
function blur_113583() { // fn#113583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2328, offset: 0x023fff1a, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.blur();
}
function focus_113584() { // fn#113584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2389, offset: 0x023fff3d, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.focus();
}
function isFocused_113585() { // fn#113585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2455, offset: 0x023fff60, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const isFocused = env1_3.current?.isFocused();
return isFocused != null && isFocused;
}
function measure_113586(a0) { // fn#113586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2538, offset: 0x023fff8d, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.measure(a0);
}
function measureInWindow_113587(a0) { // fn#113587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2612, offset: 0x023fffb4, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.measureInWindow(a0);
}
function measureLayout_113588(a0, a1, a2) { // fn#113588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2692, offset: 0x023fffdb, size: 47 bytes, params: 4, frame: 16
const value = environment.__proto__;
return env1_3.current?.measureLayout(a0, a1, a2);
}
function _fun113590(a0, a1, a2) { // fn#113590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2823, offset: 0x02400041, size: 59 bytes, params: 4, frame: 14
var r2;
var value2;
var current;
let r1 = a2 || a0 == null;
value = undefined;
if (r1) {
r2 = value;
} else {
value2 = environment.__proto__;
current = env1_3.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.setText(a0);
}
return value;
}
function _fun113592(a0) { // fn#113592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2980, offset: 0x02400146, size: 28 bytes, params: 2, frame: 13
a0.setTextInputValue(env0_0, true);
}
function _fun113594(a0) { // fn#113594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3532, offset: 0x02400302, size: 61 bytes, params: 2, frame: 12
a0.removeTag(env0_0);
const type = env0_1.type;
const PREFIX = SearchQueryTagTypes.PREFIX;
if (type === PREFIX) {
a0.restoreDraftTextInputValue();
}
}
function _fun113596() { // fn#113596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3832, offset: 0x0240034a, size: 310 bytes, params: 1, frame: 20
var environment;
var moduleValue;
var defaultImport;
var updateSearchQuery;
var defaultImport3;
const value = environment.__proto__;
setSuggestionsDismissed();
const getPrefixTag = SearchQueryStore.getPrefixTag;
let searchContextBinding = searchContext;
const value3 = Reflect.apply(getPrefixTag, SearchQueryStore, [searchContextBinding]);
const value5 = SearchQueryStore.getTextInputValue(searchContextBinding).trim();
let r2 = value3 != null && value5 !== '';
if (r2) {
moduleValue = require(9676) /* metro dependency 9676: SearchTokens */;
r2 = moduleValue.isValidFilterAnswerForSubmit(value3.searchTokenType, value5);
}
if (r2) {
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport, [searchContextBinding, _fun113597]);
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterAdd({searchContext: searchContextBinding,
searchTokenType: value3.searchTokenType, location: value3.location});
}
const isQueryStringEmpty = SearchQueryStore.isQueryStringEmpty;
searchContextBinding = searchContext;
if (!Reflect.apply(isQueryStringEmpty, SearchQueryStore, [searchContextBinding])) {
defaultImport3 = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport3.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport3, [searchContextBinding, function(a0) {
return a0.markExplicitSearchSubmitted();
}]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
}
}
function _fun113597(a0) { // fn#113597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4005, offset: 0x02400480, size: 73 bytes, params: 2, frame: 12
a0.setTextInputValue('');
const addTag = a0.addTag;
const ANSWER = SearchQueryTagTypes.ANSWER;
Reflect.apply(addTag, a0, [{type: ANSWER, text: env0_0}]);
a0.restoreDraftTextInputValue();
}
@@ -0,0 +1,120 @@
/* Metro module 15021; source: modules/search/native/components/layout/SearchBarActivityIcon.tsx; dependencies: [31, 27, 4792, 9674, 9615, 33, 4501, 697, 632, 9675, 4017, 4504, 6998, 477, 2] */
function _fun113602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:6, offset: 0x024005c2, size: 440 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ActivityIndicator;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_MESSAGE_TAB_SENTINEL;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.Fragment;
const env0_10 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [{spinnerColor: {color: INTERACTIVE_TEXT_DEFAULT},
spinner: {'width': 18, 'height': 18, 'alignItems': 'center', 'justifyContent': 'center',
'position': 'absolute'}, icon: {'marginLeft': 12, 'marginRight': 4}}]);
object2 = {START: 0};
object2[0] = 'START';
object2.END = 1;
object2[1] = 'END';
const START = object2.START;
const items2 = [START];
const END = object2.END;
items2[1] = END;
object2 = {code: 'function SearchBarActivityIconTsx1(){const{interpolate,fadeAnimationState,ANIMATION_STATE_INPUT}=this.__closure;return{opacity:interpolate(fadeAnimationState.get(),ANIMATION_STATE_INPUT,[0,0.5])};}'};
object2 = {code: 'function SearchBarActivityIconTsx2(){const{interpolate,fadeAnimationState,ANIMATION_STATE_INPUT}=this.__closure;return{opacity:interpolate(fadeAnimationState.get(),ANIMATION_STATE_INPUT,[1,0])};}'};
value = value.memo(SearchBarActivityIcon);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchBarActivityIcon.tsx');
exports.default = value;
}
function SearchBarActivityIcon({searchContext}) { // fn#113603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:964, offset: 0x0240077a, size: 594 bytes, params: 2, frame: 27
var object2;
const styles = useStyles();
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore,
SearchMessageStore], _fun113604, [searchContext]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const START = env0_12.START;
const value3 = Reflect.apply(useSharedValue, reanimatedRexportModule, [START]);
let binding = env0_3;
binding.useEffect(_fun113605, [value2, value3]);
const moduleValue3 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
let closure = SearchBarActivityIconE;
object2 = {interpolate: reanimatedRexportModule.interpolate, fadeAnimationState: value3};
binding = env0_13;
object2.ANIMATION_STATE_INPUT = binding;
closure.__closure = object2;
closure.__workletHash = 12880513119188;
closure.__initData = env0_14;
const value4 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = SearchBarActivityIconV;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, fadeAnimationState: value3,
ANIMATION_STATE_INPUT: binding};
closure.__workletHash = 11061952032557;
closure.__initData = env0_15;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
let View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const color = styles.spinnerColor.color;
let icon = styles.icon;
const items3 = [<View style={value4}><ActivityIndicator color={color} style={[icon, styles.spinner]} /></View>];
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const MagnifyingGlassIcon = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
icon = styles.icon;
let value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = <View style={value5}><MagnifyingGlassIcon style={icon} size={value ? 'sm' : 'xs'} color="interactive-text-default" /></View>;
return (
<>
{items3}
</>
);
}
function _fun113604() { // fn#113604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1060, offset: 0x024009cc, size: 118 bytes, params: 1, frame: 17
const value = environment.__proto__;
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
return !SearchMessageStore.getIsInitialFetchComplete((require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, Reflect.apply(getSearchResultsQuery, SearchQueryStore,
[searchContextBinding]))) && !SearchQueryStore.isInitialSearchQuery(searchContextBinding) && !SearchQueryStore.isAutocompleteVisible(searchContextBinding);
}
function _fun113605() { // fn#113605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1298, offset: 0x02400a42, size: 89 bytes, params: 1, frame: 15
const binding = env0_1;
const binding2 = env0_2;
const set = binding2.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding3 = env1_12;
if (binding) {
Reflect.apply(set, binding2, [Reflect.apply(withTiming, timingModule, [binding3.END])]);
} else {
Reflect.apply(set, binding2, [Reflect.apply(withTiming, timingModule, [binding3.START])]);
}
}
function SearchBarActivityIconE() { // fn#113606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1424, owner: SearchBarActivityIcon.E, offset: 0x02400a9b, size: 76 bytes, params: 1, frame: 16
const object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = reanimatedRexportModule.interpolate(env0_2.get(), env1_13, [0, 0.5]);
return object2;
}
function SearchBarActivityIconV() { // fn#113607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1663, owner: SearchBarActivityIcon.v, offset: 0x02400ae7, size: 76 bytes, params: 1, frame: 16
const object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = reanimatedRexportModule.interpolate(env0_2.get(), env1_13, [1, 0]);
return object2;
}
@@ -0,0 +1,48 @@
/* Metro module 15030; source: modules/search/native/components/layout/SearchScreenLayout.tsx; dependencies: [31, 27, 9674, 33, 4501, 14885, 566, 15031, 15115, 2] */
function _fun113666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:6, offset: 0x02402b22, size: 265 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.Fragment;
const env0_7 = value2.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({hidden: {opacity: 0},
visible: {flex: 1}});
value = value.memo(_fun113668);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchScreenLayout.tsx');
exports.default = value;
}
function SearchFreezeContainer({visible, children, containerStyle}) { // fn#113667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:233, offset: 0x02402c2b, size: 147 bytes, params: 2, frame: 22
const styles = useStyles();
const AppFreezer = importDefault(14885) /* metro dependency 14885: AppFreezer */;
const value2 = !visible;
return (
<AppFreezer manualFreeze={value2} placeholder={null}>
<View style={[containerStyle, visible ? styles.visible : styles.hidden]} {...{['aria-hidden']: value2}}>
{children}
</View>
</AppFreezer>
);
}
function _fun113668({searchContext, containerStyle, width}) { // fn#113668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:457, offset: 0x02402cbe, size: 249 bytes, params: 2, frame: 28
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isAutocompleteVisible(searchContext);
}, [searchContext]);
return (
<>
<SearchFreezeContainer visible={!value2} containerStyle={containerStyle}>
{((Component) => <Component searchContext={searchContext} width={width} />)(importDefault(15031) /* metro dependency 15031: SearchTabsLayout */)}
</SearchFreezeContainer>
<SearchFreezeContainer visible={value2} containerStyle={containerStyle}>
{((Component) => <Component searchContext={searchContext} />)(importDefault(15115) /* metro dependency 15115: AutocompleteScreen */)}
</SearchFreezeContainer>
</>
);
}
@@ -0,0 +1,38 @@
/* Metro module 15019; source: modules/search/native/components/layout/SearchScreenSearchBar.tsx; dependencies: [31, 27, 33, 4501, 15020, 15022, 15029, 2] */
function _fun113569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15216:6, offset: 0x023ff21f, size: 324 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'flexDirection': 'row',
'alignItems': 'center', 'paddingLeft': 16, 'zIndex': 10}, headerWithBackButton: {paddingLeft: 0},
headerSearch: {'flex': 1, 'flexGrow': 1}, headerControlsRight: {'paddingRight': 16, 'paddingLeft': 12},
suggestionsAnchor: {height: 0}, suggestions: {'position': 'absolute', 'left': 0, 'right': -50, 'top': 8},
suggestionsWithBackButton: {left: -28}});
value = value.memo(value.forwardRef(_fun113570));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchScreenSearchBar.tsx');
exports.default = value;
}
function _fun113570({searchContext, onSuggestionsLayoutMesure, suggestionsDismissed, setSuggestionsDismissed, backButton}, a1) { // fn#113570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15216:510, offset: 0x023ff363, size: 367 bytes, params: 3, frame: 31
const styles = useStyles();
return (
<View style={[styles.header, backButton != null && styles.headerWithBackButton]}>
{backButton}
<View style={styles.headerSearch}>
{((Component) => <Component ref={a1} searchContext={searchContext} setSuggestionsDismissed={setSuggestionsDismissed} />)(importDefault(15020) /* metro dependency 15020: SearchBar */)}
<View style={styles.suggestionsAnchor}>
{((Component) => <Component searchContext={searchContext} onLayoutMeasure={onSuggestionsLayoutMesure} dismissed={suggestionsDismissed} containerStyle={[styles.suggestions,
backButton != null && styles.suggestionsWithBackButton]} />)(importDefault(15022) /* metro dependency 15022: SearchFilterSuggestions */)}
</View>
</View>
<View style={styles.headerControlsRight}>
{((Component) => <Component searchContext={searchContext} />)(importDefault(15029) /* metro dependency 15029: SearchFilterButton */)}
</View>
</View>
);
}
@@ -0,0 +1,476 @@
/* Metro module 15115; source: modules/search/native/components/layout/autocomplete/AutocompleteScreen.tsx; dependencies: [57, 31, 1379, 3793, 1878, 9677, 9674, 9615, 661, 33, 566, 15040, 11822, 11828, 9673, 3995, 4805, 9675, 15116, 9681, 9676, 15077, 15032, 1244, 15044, 2] */
function _fun115190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:6, offset: 0x02456b59, size: 330 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const searchAutocompleteStore = importDefault(9677) /* metro dependency 9677: SearchAutocompleteStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_10 = searchConstantsModule.SearchListItemTypes;
const env0_11 = searchConstantsModule.SearchQueryTagTypes;
const env0_12 = searchConstantsModule.USER_ESTIMATED_ITEM_SIZE;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.SearchPopoutModes;
const env0_14 = constantsModule.SearchTokenTypes;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
const env0_16 = [];
value = value.memo(AutocompleteScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/AutocompleteScreen.tsx');
exports.default = value;
}
function AutocompleteScreen({searchContext}) { // fn#115191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:346, offset: 0x02456ca3, size: 821 bytes, params: 2, frame: 29
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchAutocompleteStore],
function() {
return SearchAutocompleteStore.getState(searchContext);
}, [searchContext], (require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
const binding = env0_4;
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isTextInputValueEmpty(searchContext);
}, [searchContext]);
const value6 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: USER_ESTIMATED_ITEM_SIZE,
numColumns: 1});
const value7 = binding.useCallback(_fun115194, [searchContext]);
const value8 = binding.useCallback(_fun115195, [value7, searchContext]);
const value9 = binding.useCallback(_fun115197, [value7, searchContext]);
const value10 = binding.useCallback(_fun115199, [value7, searchContext]);
binding.useEffect(_fun115201, [searchContext]);
binding.useEffect(_fun115204, [value2.autocompletes]);
const value11 = binding.useMemo(_fun115205, [property, searchContext, value6, value2, value9, value10, value8]);
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else {
r0 = value5 && value11.length === 0 ? ((Component) => <Component text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['E4HqQ+'])} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */) : value5 || value11.length !== 0 || property ? ((Component) => <Component estimatedItemSize={USER_ESTIMATED_ITEM_SIZE} data={value11} />)(importDefault(15044) /* metro dependency 15044: SearchList */) : ((Component) => <Component text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Dr1vko)} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */);
}
return r0;
}
function _fun115194() { // fn#115194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:694, offset: 0x0245700e, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
const syncAutocomplete = value.syncAutocomplete;
const searchContextBinding = searchContext;
Reflect.apply(syncAutocomplete, value, [searchContextBinding]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
}
function _fun115195(a0) { // fn#115195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:787, offset: 0x0245704f, size: 147 bytes, params: 2, frame: 18
var environment;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const prefixTag = SearchQueryStore.getPrefixTag(searchContext);
if (prefixTag != null) {
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115196]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
}
}
function _fun115197(a0) { // fn#115197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1086, offset: 0x0245712b, size: 169 bytes, params: 2, frame: 18
var environment;
var searchContextBinding;
var value4;
var updateSearchQuery;
let value = environment.__proto__;
if (UserStore.getUser(a0) != null) {
value4 = SearchQueryStore.getPrefixTag(searchContext);
if (value4 != null) {
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115198]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: value4.searchTokenType,
location: value4.location});
env0_5();
}
}
}
function _fun115199(a0) { // fn#115199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1451, offset: 0x02457245, size: 298 bytes, params: 2, frame: 21
var environment;
var user;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
var prefixTag = SearchQueryStore.getPrefixTag(searchContext);
if (prefixTag == null) {
return undefined;
}
var env0_1 = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore);
if (channel.isDM()) {
user = UserStore.getUser(channel.getRecipientId());
if (user == null) {
return undefined;
}
env0_1 = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115200]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
return undefined;
}
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115200]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
}
}
function _fun115201() { // fn#115201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1960, offset: 0x024573df, size: 65 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeSearchQueryState(searchContext, function(a0) {
var object = {isAutocompleteVisible: a0.isAutocompleteVisible(), textInputValue: a0.getTextInputValue()};
var value = a0.getPrefixTag();
var value2 = null;
object.prefixTag = value2 != value ? value : value2;
return object;
}, _fun115203, true);
}
function _fun115205() { // fn#115205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2378, offset: 0x024574bd, size: 681 bytes, params: 1, frame: 24
var environment;
var id;
var r1;
var r5;
var type;
var FILTER;
var property;
var Token;
var value10;
var token;
var value11;
var ANSWER_USERNAME_FROM;
var ANSWER_USERNAME_MENTIONS;
var moduleValue3;
var isValidUserAutocomplete;
var getData;
var value12;
var getUser;
var value13;
var moduleValue4;
var toSearchListUserItem;
var value14;
var ANSWER_IN;
var moduleValue5;
var isValidChannelAutocomplete;
var value15;
var value16;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value17;
const items2 = [];
let value = environment;
if (env0_2) {
value15 = 0;
value16 = environment.__proto__;
if (value15 < env0_4) {
r5 = value15;
reducibleLoop19: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value17 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value17 < env0_4) {
r5 = value17;
continue reducibleLoop19;
}
break reducibleLoop19;
}
}
return items2;
}
let Set = global.Set;
const value3 = undefined;
const autocompleteScreenUtilsModule = require(15116) /* metro dependency 15116: AutocompleteScreenUtils */;
const getSearchQueryUserIds = autocompleteScreenUtilsModule.getSearchQueryUserIds;
const searchContextBinding = searchContext;
const value4 = Reflect.apply(getSearchQueryUserIds, autocompleteScreenUtilsModule, [searchContextBinding]);
let prototype = Set.prototype;
const value5 = Object.create(prototype, {constructor: {value: Set}});
let set = new Set(value4);
const env0_1 = set instanceof Object ? set : value5;
Set = global.Set;
set = new Set(autocompleteScreenUtilsModule.getSearchQueryChannelIds(searchContextBinding));
const closure = maybeAddUserItem;
let binding = env0_1;
const autocompletes = binding.autocompletes;
const tokens = binding.tokens;
const mode = binding.mode;
let forEach = autocompletes.forEach;
Reflect.apply(forEach, autocompletes, [function(a0) {
var property = mode.type;
if (property === SearchPopoutModes.FILTER) {
property = a0.results;
var env0_0 = a0.group;
if (property.length !== 0) {
property.forEach(_fun115209);
}
}
}]);
let length = items2.length;
reducibleJoin15: while (true) {
if (length !== 0) {
break reducibleJoin15;
}
type = mode.type;
FILTER = SearchPopoutModes.FILTER;
if (type === FILTER) {
break reducibleJoin15;
}
length = tokens.length;
property = tokens[length - 1];
if (property == null) {
break reducibleJoin15;
}
Token = (require(9681) /* metro dependency 9681: QueryTokenizer */).Token;
prototype = Token.prototype;
value10 = Object.create(prototype, {constructor: {value: Token}});
token = new Token();
value11 = token instanceof Object ? token : value10;
type = value11.type;
ANSWER_USERNAME_FROM = SearchTokenTypes.ANSWER_USERNAME_FROM;
reducibleJoin11: while (true) {
reducibleJoin6: while (true) {
if (type === ANSWER_USERNAME_FROM) {
break reducibleJoin6;
}
type = value11.type;
ANSWER_USERNAME_MENTIONS = SearchTokenTypes.ANSWER_USERNAME_MENTIONS;
if (type !== ANSWER_USERNAME_MENTIONS) {
break reducibleJoin11;
}
break reducibleJoin6;
}
moduleValue3 = require(9676) /* metro dependency 9676: SearchTokens */;
isValidUserAutocomplete = moduleValue3.isValidUserAutocomplete;
if (Reflect.apply(isValidUserAutocomplete, moduleValue3, [value11])) {
getData = value11.getData;
value12 = Reflect.apply(getData, value11, ['userId']);
if (value12 == null) {
break reducibleJoin11;
}
getUser = UserStore.getUser;
value13 = Reflect.apply(getUser, UserStore, [value12]);
moduleValue4 = autocompleteScreenUtilsModule;
toSearchListUserItem = moduleValue4.toSearchListUserItem;
value14 = Reflect.apply(toSearchListUserItem, moduleValue4, [searchContext, value13, env0_7]);
reducibleJoin10: while (true) {
if (value13 == null) {
id = value3;
break reducibleJoin10;
}
id = value13.id;
break reducibleJoin10;
}
closure(id, value14);
break reducibleJoin11;
}
break reducibleJoin11;
}
type = value11.type;
ANSWER_IN = SearchTokenTypes.ANSWER_IN;
if (type !== ANSWER_IN) {
break reducibleJoin15;
}
moduleValue5 = require(9676) /* metro dependency 9676: SearchTokens */;
isValidChannelAutocomplete = moduleValue5.isValidChannelAutocomplete;
if (Reflect.apply(isValidChannelAutocomplete, moduleValue5, [value11, searchContext])) {
getData = value11.getData;
value = Reflect.apply(getData, value11, ['channelIds']);
if (value == null) {
break reducibleJoin15;
}
forEach = value.forEach;
Reflect.apply(forEach, value, [_fun115210]);
break reducibleJoin15;
}
break reducibleJoin15;
}
reducibleJoin17: while (true) {
if (items2.length > 0) {
r1 = items2;
break reducibleJoin17;
}
binding = env1_16;
r1 = binding;
break reducibleJoin17;
}
return r1;
}
function _fun115196(a0) { // fn#115196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:856, offset: 0x024570e2, size: 73 bytes, params: 2, frame: 12
a0.setTextInputValue('');
const addTag = a0.addTag;
const ANSWER = SearchQueryTagTypes.ANSWER;
Reflect.apply(addTag, a0, [{type: ANSWER, text: env0_0}]);
a0.restoreDraftTextInputValue();
}
function _fun115198(a0) { // fn#115198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1186, offset: 0x024571d4, size: 113 bytes, params: 2, frame: 15
a0.setTextInputValue('');
const addTag = a0.addTag;
const object2 = {};
let value = environment.__proto__.__proto__;
const ANSWER = SearchQueryTagTypes.ANSWER;
object2.type = ANSWER;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getUserTag = value.getUserTag;
const binding = env0_0;
object2.text = Reflect.apply(getUserTag, value, [binding]);
object2.userId = binding.id;
Reflect.apply(addTag, a0, [object2]);
a0.restoreDraftTextInputValue();
}
function _fun115200(a0) { // fn#115200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1694, offset: 0x0245736f, size: 112 bytes, params: 2, frame: 16
a0.setTextInputValue('');
const addTag = a0.addTag;
const object2 = {};
const value = environment.__proto__.__proto__;
const ANSWER = SearchQueryTagTypes.ANSWER;
object2.type = ANSWER;
object2.text = (require(9675) /* metro dependency 9675: SearchUtils */).quoteChannelName(env0_1);
object2.channelId = env0_0;
Reflect.apply(addTag, a0, [object2]);
a0.restoreDraftTextInputValue();
}
function _fun115203(a0, a1) { // fn#115203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2153, offset: 0x02457460, size: 93 bytes, params: 3, frame: 15
var value;
var value4;
if (a0.isAutocompleteVisible) {
value = undefined;
if (!(a0.textInputValue === (a1 == null ? value : a1.textInputValue) && a0.prefixTag === (a1 == null ? value : a1.prefixTag))) {
value4 = environment.__proto__;
env1_3(true);
}
}
}
function maybeAddUserItem(a0, a1) { // fn#115206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2609, offset: 0x02457766, size: 98 bytes, params: 3, frame: 13
var binding;
let value = a1 == null;
let r0 = value || a0 == null;
r0 = !r0 ? env0_1.has(a0) : r0;
if (!r0) {
value = environment.__proto__.__proto__;
value = RelationshipStore.isBlockedOrIgnored(a0);
r0 = value;
}
if (!r0) {
binding = env0_1;
binding.add(a0);
binding = env0_0;
binding.push(a1);
}
}
function maybeAddChannelItem(a0, a1) { // fn#115207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2712, offset: 0x024577c8, size: 77 bytes, params: 3, frame: 13
var binding;
let r0 = a1 == null || a0 == null;
r0 = !r0 ? env0_2.has(a0) : r0;
if (!r0) {
binding = env0_2;
binding.add(a0);
binding = env0_0;
binding.push(a1);
}
}
function _fun115208(a0) { // fn#115208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2822, offset: 0x02457815, size: 82 bytes, params: 2, frame: 12
var results;
var group;
const type = mode.type;
const FILTER = SearchPopoutModes.FILTER;
if (type === FILTER) {
results = a0.results;
group = a0.group;
if (results.length !== 0) {
results.forEach(_fun115209);
}
}
}
function _fun115210(a0) { // fn#115210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:3815, offset: 0x024579dd, size: 92 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(a0);
value = undefined;
maybeAddChannelItem(channel == null ? value : channel.id,
(require(15116) /* metro dependency 15116: AutocompleteScreenUtils */).toSearchListChannelItem(channel, env1_8));
return value;
}
function _fun115209({user, channel, text}) { // fn#115209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2899, offset: 0x02457867, size: 374 bytes, params: 2, frame: 24
var binding;
var push;
var object4;
var object5;
var object6;
const value = environment.__proto__.__proto__.__proto__;
const autocompleteScreenUtilsModule = require(15116) /* metro dependency 15116: AutocompleteScreenUtils */;
maybeAddUserItem(user?.id, autocompleteScreenUtilsModule.toSearchListUserItem(searchContext, user, env2_7));
maybeAddChannelItem(channel?.id, autocompleteScreenUtilsModule.toSearchListChannelItem(channel, env2_8));
let groupBinding = group;
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (groupBinding === FILTER_HAS && text != null) {
binding = env1_0;
push = binding.push;
object4 = {};
object4.type = SearchListItemTypes.GENERIC;
object5 = {text: text};
object5.icon = autocompleteScreenUtilsModule.getSearchFilterHasIcon(text);
object5.onPress = env2_6;
object4.props = object5;
Reflect.apply(push, binding, [object4]);
}
groupBinding = group;
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (groupBinding === FILTER_AUTHOR_TYPE && text != null) {
binding = env1_0;
push = binding.push;
object4 = {};
object4.type = SearchListItemTypes.GENERIC;
object6 = {text: text};
object6.icon = autocompleteScreenUtilsModule.getSearchFilterAuthorTypeIcon(text);
object6.onPress = env2_6;
object4.props = object6;
Reflect.apply(push, binding, [object4]);
}
}
@@ -0,0 +1,174 @@
/* Metro module 15116; source: modules/search/native/components/layout/autocomplete/AutocompleteScreenUtils.tsx; dependencies: [1945, 3793, 1878, 9674, 9615, 661, 1244, 9600, 4056, 9406, 11098, 9786, 9759, 6697, 10284, 10976, 11441, 9411, 15117, 9675, 3995, 2] */
function _fun115211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:6, offset: 0x02457a39, size: 275 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchListItemTypes;
const env0_8 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/AutocompleteScreenUtils.tsx');
exports.getSearchQueryChannelIds = getSearchQueryChannelIds;
exports.getSearchQueryUserIds = getSearchQueryUserIds;
exports.getSearchFilterHasIcon = getSearchFilterHasIcon;
exports.getSearchFilterAuthorTypeIcon = getSearchFilterAuthorTypeIcon;
exports.toSearchListUserItem = toSearchListUserItem;
exports.toSearchListChannelItem = toSearchListChannelItem;
}
function getSearchQueryChannelIds(a0) { // fn#115212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:336, offset: 0x02457b4c, size: 51 bytes, params: 2, frame: 11
const value = SearchQueryStore.getChannelIds(a0);
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
return set instanceof Object ? set : value2;
}
function getSearchQueryUserIds(a0) { // fn#115213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:441, offset: 0x02457b7f, size: 109 bytes, params: 2, frame: 13
var Set;
var set;
var value;
const prefixTag = SearchQueryStore.getPrefixTag(a0);
if (prefixTag == null) {
Set = global.Set;
value = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
value = SearchQueryStore.getUserIds(a0, prefixTag.searchTokenType);
Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value3;
}
function getSearchFilterHasIcon(a0) { // fn#115214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:609, offset: 0x02457bec, size: 784 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (Reflect.apply(string, intl, [t.nrpA5E]) === a0) {
return importDefault(9600) /* metro dependency 9600: ForwardingIcon */;
}
string = intl.string;
const ZNR2fi = t.ZNR2fi;
if (Reflect.apply(string, intl, [ZNR2fi]) === a0) {
return (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
}
if (intl.string(t['20uQR3']) === a0) {
return (require(9406) /* metro dependency 9406: EmbedIcon */).EmbedIcon;
}
string = intl.string;
const L4lxyE = t.L4lxyE;
if (Reflect.apply(string, intl, [L4lxyE]) === a0) {
return (require(11098) /* metro dependency 11098: PollsIcon */).PollsIcon;
}
if (intl.string(t['AV/v6i']) === a0) {
return (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
}
string = intl.string;
const XM9XGP = t.XM9XGP;
if (Reflect.apply(string, intl, [XM9XGP]) === a0) {
return (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
}
string = intl.string;
const TNLcpx = t.TNLcpx;
if (Reflect.apply(string, intl, [TNLcpx]) === a0) {
return (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
}
string = intl.string;
const F8Wf0e = t.F8Wf0e;
if (Reflect.apply(string, intl, [F8Wf0e]) === a0) {
return (require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon;
}
string = intl.string;
const PJgX2h = t.PJgX2h;
if (Reflect.apply(string, intl, [PJgX2h]) === a0) {
return (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
}
}
function getSearchFilterAuthorTypeIcon(a0) { // fn#115215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1328, offset: 0x02457efc, size: 268 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (Reflect.apply(string, intl, [t.tPZo4p]) === a0) {
return (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
}
string = intl.string;
const JL7sRS = t.JL7sRS;
if (Reflect.apply(string, intl, [JL7sRS]) === a0) {
return (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
}
string = intl.string;
const WjkIKU = t.WjkIKU;
if (Reflect.apply(string, intl, [WjkIKU]) === a0) {
return (require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon;
}
}
function toSearchListUserItem(a0, a1, a2) { // fn#115216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1628, offset: 0x02458008, size: 196 bytes, params: 4, frame: 18
const guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(a0);
const value3 = null;
if (value3 == a1) {
return value3;
}
let r3 = value3 == guildIdFromSearchContext ? RelationshipStore.getNickname(a1.id) : value3;
r3 = value3 == r3 ? GuildMemberStore.getNick(guildIdFromSearchContext, a1.id) : r3;
r3 = value3 == r3 ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(a1) : r3;
const DM = SearchListItemTypes.DM;
const NONE = RelationshipTypes.NONE;
return {type: DM, props: {type: NONE, user: a1, nickname: r3, onPress: a2}};
}
function toSearchListChannelItem(a0, a1) { // fn#115217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1930, offset: 0x024580cc, size: 275 bytes, params: 3, frame: 18
var r5;
var r1;
var object2;
var user;
var object3;
var value6;
const env0_0 = a0;
const env0_1 = a1;
let value = null;
if (value == a0) {
return value;
}
if (a0.isDM()) {
user = UserStore.getUser(a0.getRecipientId());
if (value == user) {
r1 = value;
} else {
object2 = {};
object2.type = SearchListItemTypes.DM;
object3 = {};
object3.type = RelationshipTypes.NONE;
object3.user = user;
value6 = RelationshipStore.getNickname(user.id);
if (value != value6) {
r5 = value6;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r5 = value;
}
object3.nickname = r5;
object3.onPress = onPress_115218;
object2.props = object3;
r1 = object2;
}
return r1;
}
value = a0.isGroupDM();
object2 = {};
if (value) {
object2.type = SearchListItemTypes.GROUP_DM;
object2.props = {channel: a0, onPress: a1};
} else {
object2.type = SearchListItemTypes.GUILD_TEXT_CHANNEL;
object2.props = {channel: a0, onPress: a1};
}
return object2;
}
@@ -0,0 +1,60 @@
/* Metro module 15029; source: modules/search/native/components/layout/autocomplete/SearchFilterButton.tsx; dependencies: [31, 9614, 33, 15028, 15023, 1357, 8811, 1244, 8341, 13512, 2] */
function _fun113661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:6, offset: 0x02402804, size: 174 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun113662);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterButton.tsx');
exports.default = value;
}
function _fun113662({searchContext}) { // fn#113662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:165, offset: 0x024028b2, size: 239 bytes, params: 2, frame: 19
const value3 = env0_3.useMemo(_fun113663, [searchContext,
(require(15028) /* metro dependency 15028: useValidFilterTokens */).useValidOrderedFilterTokens(searchContext)]);
const env0_2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SearchFilterButton');
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ContextMenu
items={value3}
align="below"
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oYEmhB)}
keyboardShouldPersistTaps="handled"
>
{children_113665}
</ContextMenu>
);
}
function _fun113663() { // fn#113663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:251, offset: 0x024029a1, size: 28 bytes, params: 1, frame: 11
return env0_1.map(function(a0) {
var object = {};
var moduleValue = require(dependencyMap[4]);
var searchContextBinding = searchContext;
object.label = moduleValue.getSearchTokenLabel(searchContextBinding, a0);
object.IconComponent = require(dependencyMap[4]).getSearchTokenIcon(a0);
object.action = require(dependencyMap[4]).getSearchTokenPressHandler(searchContextBinding, a0,
SearchFilterAddLocations.CONTEXT_MENU);
return object;
});
}
function children_113665(a0) { // fn#113665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:597, offset: 0x02402a30, size: 242 bytes, params: 2, frame: 20
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['variant'] = 'tertiary';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kP6oFy);
iconButtonProps['size'] = env0_2 ? 'md' : 'sm';
const FiltersHorizontalIcon = (require(13512) /* metro dependency 13512: FiltersHorizontalIcon */).FiltersHorizontalIcon;
iconButtonProps['icon'] = <FiltersHorizontalIcon size="sm" color="redesign-button-tertiary-text" />;
return <IconButton {...iconButtonProps} />;
}
@@ -0,0 +1,318 @@
/* Metro module 15022; source: modules/search/native/components/layout/autocomplete/SearchFilterSuggestions.tsx; dependencies: [57, 31, 27, 9614, 33, 4501, 697, 15023, 6238, 4573, 4017, 4577, 4581, 4508, 15028, 11822, 2] */
function _fun113608(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:6, offset: 0x02400b33, size: 460 bytes, params: 8, frame: 24
const env0_0 = require;
const getSuggestionsKey = function(a0) {
return a0.map(_fun113614).join(' ');
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object3.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object3.borderWidth = 1;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object3, SHADOW_LOW, undefined);
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{card: object3}]);
object = {code: "function SearchFilterSuggestionsTsx1(){const{withSpring,opacity,springStandard,state,TransitionStates,runOnJS,cleanUp}=this.__closure;return{opacity:withSpring(opacity.get(),springStandard,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}),transform:[{translateY:withSpring(opacity.get()===1?0:-15,springStandard)}]};}"};
object = {code: 'function SearchFilterSuggestionsTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
const env0_11 = [];
object = {code: 'function SearchFilterSuggestionsTsx3(){const{dismissed}=this.__closure;return dismissed.get();}'};
object = {code: 'function SearchFilterSuggestionsTsx4(isDismissed){const{runOnJS,setSuggestions,EMPTY_SEARCH_FILTER_ROWS}=this.__closure;if(isDismissed){runOnJS(setSuggestions)(EMPTY_SEARCH_FILTER_ROWS);}}'};
value = value.memo(SearchFilterSuggestions);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterSuggestions.tsx');
exports.default = value;
}
function SearchFilterPrefixRow(a0) { // fn#113609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:386, offset: 0x02400cff, size: 279 bytes, params: 2, frame: 22
const text = a0.text;
const searchTokenType = a0.searchTokenType;
const onPress = a0.onPress;
const object2 = {'text': 0, 'searchTokenType': 0, 'onPress': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const value3 = env0_4.useMemo(_fun113610, [searchTokenType]);
const value4 = env0_4.useMemo(_fun113611, [searchTokenType]);
const value5 = env0_4.useCallback(function() {
onPress(text);
}, [onPress, text]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<TableRow
icon={value3}
onPress={value5}
label={<Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{text}</Text>}
subLabel={value4}
{...value}
/>
);
}
function getSuggestionsKey(a0) { // fn#113613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:827, offset: 0x02400e8d, size: 40 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return a0.text;
}).join(' ');
}
function AnimatedEnterExitContainer({children, state, cleanUp}) { // fn#113615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1481, offset: 0x02400eb5, size: 304 bytes, params: 2, frame: 24
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = AnimatedEnterExitContainerL;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.opacity = value2;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object2.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 334512108462;
closure.__initData = env0_9;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
env0_4.useEffect(_fun113618, [value2, state]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={value3}>
{children}
</View>
);
}
function SearchFilterSuggestions({searchContext, onLayoutMeasure, containerStyle, dismissed}) { // fn#113619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2715, offset: 0x024011ae, size: 545 bytes, params: 2, frame: 25
const env0_3 = dismissed;
const styles = useStyles();
const env0_4 = styles;
const value2 = (require(15028) /* metro dependency 15028: useValidFilterTokens */).useValidFilterTokens(searchContext);
const [property, property2] = env0_3(env0_4.useState([]), 2);
env0_4.useEffect(_fun113620, [value2, searchContext, property2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return dismissed.get();
};
closure.__closure = {dismissed: dismissed};
closure.__workletHash = 17191989548971;
closure.__initData = env0_12;
const closure2 = SearchFilterSuggestionsE;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setSuggestions: property2,
EMPTY_SEARCH_FILTER_ROWS: env0_11};
closure2.__workletHash = 8991360021943;
closure2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value5 = env0_4.useMemo(function() {
return [styles.card, containerStyle];
}, [containerStyle, styles.card]);
const env0_9 = env0_4.useRef(null);
const value6 = env0_4.useCallback(function() {
global.setTimeout(_fun113629);
}, [onLayoutMeasure]);
const value7 = env0_4.useMemo(_fun113631, [property]);
const value8 = env0_4.useCallback(_fun113632, [value5, value6]);
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={value7}
renderItem={value8}
getItemKey={getSuggestionsKey}
/>
);
}
function _fun113610() { // fn#113610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:477, offset: 0x02400e16, size: 74 bytes, params: 1, frame: 15
const value = environment.__proto__;
const searchTokenIcon = (require(15023) /* metro dependency 15023: SearchFilterUtils */).getSearchTokenIcon(searchTokenType);
const value4 = null;
return value4 != searchTokenIcon ? ((Component) => <Component size="sm" />)(searchTokenIcon) : value4;
}
function _fun113611() { // fn#113611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:575, offset: 0x02400e60, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(15023) /* metro dependency 15023: SearchFilterUtils */).getSearchTokenSubLabel(searchTokenType);
}
function AnimatedEnterExitContainerL() { // fn#113616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1616, owner: AnimatedEnterExitContainer.l, offset: 0x02400fe5, size: 281 bytes, params: 1, frame: 27
const object4 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_2;
const value3 = binding.get();
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = lT;
const object5 = {};
object5.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object5.TransitionStates = TransitionStates;
object5.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object5.cleanUp = cleanUp;
closure.__closure = object5;
closure.__workletHash = 10696166249954;
closure.__initData = env1_10;
object4.opacity = Reflect.apply(withSpring, springModule, [value3, springStandard, 'respect-motion-settings',
closure]);
const object6 = {};
const moduleValue2 = springModule;
object6.translateY = moduleValue2.withSpring(binding.get() !== 1 ? -15 : 0, springStandard);
object4.transform = [object6];
return object4;
}
function _fun113618() { // fn#113618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2285, offset: 0x02401169, size: 69 bytes, params: 1, frame: 14
const binding = env0_2;
const set = binding.set;
const stateBinding = state;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED ? 1 : 0]);
}
function _fun113620() { // fn#113620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2916, offset: 0x024013cf, size: 63 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeSearchQueryState(searchContext, function(a0) {
return {textInputValue: a0.getTextInputValue(), isAutocompleteVisible: a0.isAutocompleteVisible()};
}, _fun113622);
}
function SearchFilterSuggestionsE(a0) { // fn#113626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3609, owner: SearchFilterSuggestions.E, offset: 0x024015ab, size: 61 bytes, params: 2, frame: 13
var value;
if (a0) {
value = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_7)(env1_11);
}
}
function _fun113628() { // fn#113628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3858, offset: 0x02401607, size: 26 bytes, params: 1, frame: 11
global.setTimeout(_fun113629);
}
function _fun113631() { // fn#113631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3999, offset: 0x02401681, size: 41 bytes, params: 1, frame: 3
return env0_6.length > 0 ? [env0_6] : [];
}
function _fun113632(a0, a1, a2, a3) { // fn#113632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:4044, offset: 0x024016aa, size: 123 bytes, params: 5, frame: 19
return (
<AnimatedEnterExitContainer
state={a2}
cleanUp={a3}
key={a0}
>
<View
ref={env0_9}
style={env0_8}
collapsable={false}
onLayout={env0_10}
>
{a1.map(_fun113633)}
</View>
</AnimatedEnterExitContainer>
);
}
function lT(a0) { // fn#113617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1717, owner: AnimatedEnterExitContainer.l.t, offset: 0x024010fe, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun113622({textInputValue, isAutocompleteVisible}) { // fn#113622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3059, offset: 0x02401433, size: 178 bytes, params: 2, frame: 14
var environment;
var searchFilterSuggestions;
var value3;
var binding;
let value = textInputValue.trim();
if (value === '') {
value = environment.__proto__;
binding = env1_7;
value = environment.__proto__.__proto__;
binding(env2_11);
} else if (isAutocompleteVisible) {
value = environment.__proto__;
binding = env1_7;
value = environment.__proto__.__proto__;
binding(env2_11);
} else {
value = environment.__proto__.__proto__;
searchFilterSuggestions = (require(15023) /* metro dependency 15023: SearchFilterUtils */).getSearchFilterSuggestions(textInputValue);
if (searchFilterSuggestions.length !== 0) {
var env0_1 = [];
searchFilterSuggestions.forEach(_fun113623);
value = environment.__proto__;
env1_7(_fun113624);
} else {
value3 = environment.__proto__;
env1_7(env2_11);
}
}
}
function _fun113629() { // fn#113629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3875, offset: 0x02401621, size: 42 bytes, params: 1, frame: 11
const current = env1_9.current;
if (current != null) {
current.measure(function(a0, a1, a2, a3, a4, a5) {
onLayoutMeasure({top: a5, bottom: a5 + a3, left: a4, right: a4 + a2});
});
}
}
function _fun113633(a0) { // fn#113633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:4173, offset: 0x02401725, size: 42 bytes, params: 2, frame: 15
return <SearchFilterPrefixRow {...a0} key={a0.text} />;
}
function _fun113623({text, token}, a1) { // fn#113623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3223, offset: 0x024014e5, size: 159 bytes, params: 3, frame: 19
var push;
var object2;
var value3;
var moduleValue;
let binding = env2_5;
if (binding.has(token)) {
binding = env0_1;
push = binding.push;
object2 = {text: text, searchTokenType: token, start: a1 === 0};
object2.end = a1 === env0_0.length - 1;
value3 = environment.__proto__.__proto__.__proto__;
moduleValue = require(15023) /* metro dependency 15023: SearchFilterUtils */;
object2.onPress = moduleValue.getSearchTokenPressHandler(searchContext, token,
SearchFilterAddLocations.SEARCH_INPUT_DROPDOWN);
Reflect.apply(push, binding, [object2]);
}
}
function _fun113624(a0) { // fn#113624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3400, offset: 0x02401584, size: 39 bytes, params: 2, frame: 14
const value = a0;
const getSuggestionsKeyBinding = getSuggestionsKey;
return getSuggestionsKeyBinding(value) === getSuggestionsKeyBinding(env0_1) ? value : env0_1;
}
@@ -0,0 +1,304 @@
/* Metro module 15023; source: modules/search/native/components/layout/autocomplete/SearchFilterUtils.tsx; dependencies: [9615, 9614, 661, 1244, 11441, 9786, 12376, 6700, 9133, 15024, 15026, 9411, 9676, 11828, 11822, 4080, 9066, 1962, 9673, 2] */
function _fun113634(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:6, offset: 0x0240174f, size: 261 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_3 = value.EMPTY_SEARCH_QUERY_STRING;
const env0_4 = value.SearchQueryTagTypes;
const env0_5 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
value = require(661) /* metro dependency 661: Constants */;
const env0_6 = value.SEARCH_DATE_FORMAT;
const env0_7 = value.SearchTokenTypes;
const env0_8 = value.SearchTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterUtils.tsx');
exports.getSearchTokenLabel = getSearchTokenLabel;
exports.getSearchTokenSubLabel = getSearchTokenSubLabel;
exports.getSearchTokenIcon = getSearchTokenIcon;
exports.getSearchTokenPressHandler = getSearchTokenPressHandler;
exports.getSearchFilterSuggestions = getSearchFilterSuggestions;
}
function getSearchTokenText(a0) { // fn#113635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:265, offset: 0x02401854, size: 111 bytes, params: 2, frame: 17
var r3;
const value2 = undefined;
const property = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0];
if (property != null) {
r3 = property;
} else {
(require(9676) /* metro dependency 9676: SearchTokens */).rebuildSearchTokenConfigs();
r3 = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0];
}
return (r3 == null ? value2 : r3.key) ?? a0.toString();
}
function getSearchTokenLabel(a0, a1) { // fn#113636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:568, offset: 0x024018c3, size: 762 bytes, params: 3, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a1) {
return intl.string(t['6iuVMn']);
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a1) {
return intl.string(t.DMAzx8);
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a1) {
return intl.string(t.CMKzQx);
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a1) {
return a0.type === SearchTypes.DMS ? intl.string(t['8Fmo42']) : intl.string(t.cdPmq8);
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a1) {
return intl.string(t.h4qGfp);
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a1) {
return intl.string(t.c9qSBR);
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a1) {
return intl.string(t.hcMwDW);
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a1) {
return intl.string(t.C4r6xL);
}
const Error = global.Error;
const value = '[getSearchTokenLabel] Unhandled search token type: ' + a1;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getSearchTokenSubLabel(a0) { // fn#113637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:1302, offset: 0x02401bbd, size: 679 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a0) {
return intl.string(t.kkGlww);
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a0) {
return intl.string(t.gUfZa2);
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a0) {
return intl.string(t.qDUdlT);
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a0) {
return intl.string(t.ILtwK5);
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a0) {
return intl.string(t.t8bWvr);
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a0) {
return intl.string(t.YEN3uU);
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a0) {
return intl.string(t.hwbB7s);
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a0) {
return intl.string(t.tJPdhZ);
}
const Error = global.Error;
const value = '[getSearchTokenSubLabel] Unhandled search token type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getSearchTokenIcon(a0) { // fn#113638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:1977, offset: 0x02401e64, size: 428 bytes, params: 2, frame: 13
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a0) {
return (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a0) {
return (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a0) {
return (require(12376) /* metro dependency 12376: ChannelListMagnifyingGlassIcon */).ChannelListMagnifyingGlassIcon;
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a0) {
return (require(6700) /* metro dependency 6700: AtIcon */).AtIcon;
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a0) {
return (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a0) {
return (require(15024) /* metro dependency 15024: CalendarMinusIcon */).CalendarMinusIcon;
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a0) {
return (require(15026) /* metro dependency 15026: CalendarPlusIcon */).CalendarPlusIcon;
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a0) {
return (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
}
const Error = global.Error;
const value = '[getSearchTokenIcon] Unhandled search token type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getSearchTokenPressHandler(a0, a1, a2) { // fn#113639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2534, offset: 0x02402010, size: 217 bytes, params: 4, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a1) {
return _fun113640;
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a1) {
return _fun113640;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a1) {
return _fun113640;
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a1) {
return _fun113640;
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a1) {
return _fun113640;
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a1) {
return _fun113643;
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a1) {
return _fun113643;
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a1) {
return _fun113643;
}
const Error = global.Error;
const value = '[getSearchTokenPressHandler] Unhandled search token type: ' + a1;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getSearchFilterSuggestions(a0) { // fn#113648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3660, offset: 0x024023c4, size: 79 bytes, params: 2, frame: 15
const env0_0 = a0;
const Object = global.Object;
Object.keys(importDefault(9676) /* metro dependency 9676: SearchTokens */).forEach(_fun113649);
return [];
}
function _fun113640() { // fn#113640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2696, offset: 0x024020e9, size: 35 bytes, params: 1, frame: 15
handleSearchTokenPress(env0_0, require, importDefault);
}
function _fun113643() { // fn#113643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3030, offset: 0x024021d5, size: 35 bytes, params: 1, frame: 15
handleSearchDateTokenPress(env0_0, require, importDefault);
}
function _fun113649(a0) { // fn#113649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3746, offset: 0x02402413, size: 184 bytes, params: 2, frame: 16
var plainText;
var regExp;
var binding;
const value = environment.__proto__;
const searchTokensModule = require(9676) /* metro dependency 9676: SearchTokens */;
if (searchTokensModule.isSearchFilterTokenType(a0)) {
plainText = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0].plainText;
if (plainText != null) {
regExp = new global.RegExp('^' + plainText + '(?:: ?)?$', 'i');
if (regExp.test(env0_0)) {
binding = env0_1;
binding.push({token: a0, text: plainText});
}
}
}
}
function handleSearchTokenPress(a0, a1, a2) { // fn#113641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2700, offset: 0x0240210c, size: 88 bytes, params: 4, frame: 16
var environment;
const env0_0 = a1;
const env0_1 = a2;
const value = environment.__proto__.__proto__;
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).updateSearchQuery(a0,
function(a0) {
if (importDefault === SearchFilterAddLocations.CONTEXT_MENU) {
a0.saveDraftTextInputValue();
}
a0.setTextInputValue(EMPTY_SEARCH_QUERY_STRING);
var object = {};
object.type = SearchQueryTagTypes.PREFIX;
object.searchTokenType = require;
object.location = importDefault;
object.text = getSearchTokenText(require);
a0.addTag(object);
});
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocomplete(a0);
}
function handleSearchDateTokenPress(a0, a1, a2) { // fn#113644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3034, offset: 0x024021f8, size: 68 bytes, params: 4, frame: 12
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value = environment.__proto__.__proto__;
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113645);
}
function _fun113645() { // fn#113645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3118, offset: 0x0240223c, size: 96 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[17]);
value = value(dependencyMap[16], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'DatePicker', {onSubmit: onSubmit_113646}]);
}
function onSubmit_113646(a0) { // fn#113646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3188, offset: 0x0240229c, size: 146 bytes, params: 2, frame: 18
var environment;
const format = a0.format;
let value = environment.__proto__.__proto__.__proto__.__proto__;
const env0_0 = Reflect.apply(format, a0, [SEARCH_DATE_FORMAT]);
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
const updateSearchQuery = value.updateSearchQuery;
const binding = env1_0;
Reflect.apply(updateSearchQuery, value, [binding, _fun113647]);
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterAdd({searchContext: binding,
searchTokenType: require, location: importDefault});
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(binding);
}
function _fun113647(a0) { // fn#113647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3240, offset: 0x0240232e, size: 150 bytes, params: 2, frame: 21
const SEARCH_INPUT_DROPDOWN = SearchFilterAddLocations.SEARCH_INPUT_DROPDOWN;
if (importDefault === SEARCH_INPUT_DROPDOWN) {
a0.setTextInputValue(EMPTY_SEARCH_QUERY_STRING);
}
a0.removePrefixTags();
const addTag = a0.addTag;
const object2 = {};
const COMPLETE = SearchQueryTagTypes.COMPLETE;
object2.type = COMPLETE;
object2.text = '' + getSearchTokenText(require) + ' ' + env0_0;
object2.searchTokenType = require;
object2.location = importDefault;
Reflect.apply(addTag, a0, [object2]);
}
@@ -0,0 +1,83 @@
/* Metro module 15017; source: modules/search/native/components/layout/autocomplete/useSearchSuggestionsGesture.tsx; dependencies: [31, 4017, 11822, 1585, 477, 5321, 2] */
function _fun113550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:6, offset: 0x023fea51, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
object = {code: 'function inBoundingBox_useSearchSuggestionsGestureTsx1(e,coordinates,safeAreaTop){const touch=e.allTouches[0];if(touch==null)return false;return coordinates.left<touch.absoluteX&&touch.absoluteX<coordinates.right&&coordinates.top<touch.absoluteY+safeAreaTop&&touch.absoluteY+safeAreaTop<coordinates.bottom;}'};
const env0_5 = _fun113551();
object = {code: 'function useSearchSuggestionsGestureTsx2(e,manager){const{coordinates,inBoundingBox,safeAreaTop,dismissed}=this.__closure;manager.fail();const _coordinates=coordinates.get();if(_coordinates==null||inBoundingBox(e,_coordinates,safeAreaTop))return;dismissed.set(true);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/useSearchSuggestionsGesture.tsx');
exports.useSearchSuggestionsGesture = useSearchSuggestionsGesture;
}
function _fun113551() { // fn#113551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:429, offset: 0x023feaf9, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var r1;
var r0;
var property = a0.allTouches[0];
var value = property != null;
if (value) {
value = a1.left < property.absoluteX;
r1 = value && property.absoluteX < a1.right;
r1 = r1 && a1.top < property.absoluteY + a2;
if (r1) {
value = property.absoluteY + a2;
value = value < a1.bottom;
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
};
closure.__closure = {};
closure.__workletHash = 14606221606756;
closure.__initData = env0_4;
return closure;
}
function useSearchSuggestionsGesture(a0) { // fn#113553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1148, offset: 0x023feb99, size: 346 bytes, params: 2, frame: 22
const env0_0 = a0;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(null);
let binding = env0_3;
const value4 = binding.useCallback(_fun113554, [value2]);
var env0_3 = value4;
binding.useEffect(_fun113555, [value2, a0, value4]);
const r2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top : 0;
binding = env0_3;
return binding.useMemo(_fun113560, [value2, binding.useCallback(_fun113559, [value2]), binding.useMemo(_fun113556,
[value3, r2, value2]), binding.useCallback(_fun113558, [value3])]);
}
function _fun113555() { // fn#113555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1314, offset: 0x023fecf3, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(env0_0, env0_3);
}
function _fun113556() { // fn#113556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1424, offset: 0x023fed25, size: 153 bytes, params: 1, frame: 15
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value3 = Gesture.Manual().manualActivation(true);
const onTouchesDown = value3.onTouchesDown;
const closure = e_113557;
closure.__closure = {coordinates: env0_2, inBoundingBox: env1_5, safeAreaTop: env0_4, dismissed: env0_1};
closure.__workletHash = 2369649298113;
closure.__initData = env1_6;
return Reflect.apply(onTouchesDown, value3, [closure]);
}
function _fun113560() { // fn#113560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1796, offset: 0x023fee12, size: 43 bytes, params: 1, frame: 3
return {gesture: env0_5, dismissed: env0_1, onLayoutMeasure: env0_6, setDismissed: env0_7};
}
function e_113557(a0, a1) { // fn#113557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1500, offset: 0x023fedbe, size: 84 bytes, params: 3, frame: 17
a1.fail();
const value2 = env1_2.get();
if (!(value2 == null || env2_5(a0, value2, env1_4))) {
env1_1.set(true);
}
}
@@ -0,0 +1,289 @@
/* Metro module 15044; source: modules/search/native/components/list/SearchList.tsx; dependencies: [31, 27, 9615, 33, 4501, 15045, 15047, 15048, 15058, 15041, 15060, 15062, 15057, 15049, 15063, 15067, 15068, 15071, 15072, 15073, 15074, 15075, 1585, 15032, 1244, 8416, 2] */
function _fun113840(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:6, offset: 0x02407dc2, size: 306 bytes, params: 8, frame: 21
const env0_0 = require;
const getItemType_113846 = function(a0) {
return a0.type;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.StyleSheet;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.SearchHistoryItemTypes;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_8 = value4.jsx;
const env0_9 = value4.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
value = value.memo(SearchList);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchList.tsx');
exports.default = value;
}
function getItemKey_113841(a0) { // fn#113841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:273, offset: 0x02407ef4, size: 876 bytes, params: 2, frame: 19
var props;
var data;
var messageId;
var id;
var section;
var media;
const type = a0.type;
const DM = SearchListItemTypes.DM;
if (DM === type) {
section = a0.section;
props = a0.props;
id = props.user.id;
props = a0.props;
return '' + section + '-' + id + '-' + props.guildId;
}
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
if (GUILD_CHANNEL_MEMBER === type) {
props = a0.props;
id = props.user.id;
props = a0.props;
return '' + id + '-' + props.guildId;
}
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
if (SEARCH_HISTORY_ITEM === type) {
return searchHistoryKeyExtractor(a0.props.searchHistoryItem);
}
const MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
if (MEDIA_GRID === type) {
return a0.props.media.map(function({messageId, mediaIndex}) {
return '' + messageId + '-' + mediaIndex;
}).join('-');
}
const MEDIA = SearchListItemTypes.MEDIA;
if (MEDIA === type) {
props = a0.props;
media = props.media;
messageId = media.messageId;
props = a0.props;
media = props.media;
return '' + messageId + '-' + media.mediaIndex;
}
const MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
if (MEDIA_PLACEHOLDER === type) {
return a0.key;
}
const FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
if (FILE_OR_LINK_PLACEHOLDER === type) {
return a0.key;
}
const MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
if (MESSAGE_PLACEHOLDER === type) {
return a0.key;
}
const GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
if (GUILD_CHANNEL_MEMBER_PLACEHOLDER === type) {
return a0.key;
}
const GROUP_DM = SearchListItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return '' + a0.section + '-' + a0.props.channel.id;
}
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return '' + a0.props.channel.id;
}
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return '' + a0.props.channel.id;
}
const MESSAGE = SearchListItemTypes.MESSAGE;
if (MESSAGE === type) {
return '' + a0.props.message.id;
}
const LINK = SearchListItemTypes.LINK;
if (LINK === type) {
props = a0.props;
data = props.data;
messageId = data.messageId;
props = a0.props;
data = props.data;
return '' + messageId + '-' + data.linkIndex;
}
const FILE = SearchListItemTypes.FILE;
if (FILE === type) {
props = a0.props;
data = props.data;
messageId = data.messageId;
props = a0.props;
data = props.data;
return '' + messageId + '-' + data.fileIndex;
}
const GENERIC = SearchListItemTypes.GENERIC;
if (GENERIC === type) {
return '' + a0.props.text;
}
const SECTION = SearchListItemTypes.SECTION;
if (SECTION === type) {
return '' + a0.props.title;
}
}
function keyExtractor_113845(a0) { // fn#113845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:1500, offset: 0x02408374, size: 52 bytes, params: 2, frame: 15
return '' + a0.type + '-' + getItemKey_113841(a0);
}
function renderItem_113847({item}) { // fn#113847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:1598, offset: 0x024083a8, size: 1095 bytes, params: 2, frame: 16
const type = item.type;
const DM = SearchListItemTypes.DM;
if (DM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15045) /* metro dependency 15045: DMRow */);
}
const GROUP_DM = SearchListItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15047) /* metro dependency 15047: GroupDMRow */);
}
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
if (SEARCH_HISTORY_ITEM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15048) /* metro dependency 15048: SearchHistoryRow */);
}
const MEDIA = SearchListItemTypes.MEDIA;
if (MEDIA === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15058) /* metro dependency 15058: MediaGridItem */);
}
const MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
if (MEDIA_PLACEHOLDER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15041) /* metro dependency 15041: MediaGridPlaceholder */);
}
const FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
if (FILE_OR_LINK_PLACEHOLDER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15060) /* metro dependency 15060: FileOrLinkGridPlaceholder */);
}
const MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
if (MEDIA_GRID === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15062) /* metro dependency 15062: MediaGrid */);
}
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15057) /* metro dependency 15057: GuildTextChannelRow */);
}
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15049) /* metro dependency 15049: GuildVoiceOrStageChannelRow */);
}
const MESSAGE = SearchListItemTypes.MESSAGE;
if (MESSAGE === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15063) /* metro dependency 15063: MessageRow */);
}
const MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
if (MESSAGE_PLACEHOLDER === type) {
return ((Component) => <Component />)(importDefault(15067) /* metro dependency 15067: FormRowPlaceholder */);
}
const LINK = SearchListItemTypes.LINK;
if (LINK === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15068) /* metro dependency 15068: LinkGridItem */);
}
const FILE = SearchListItemTypes.FILE;
if (FILE === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15071) /* metro dependency 15071: FileGridItem */);
}
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
if (GUILD_CHANNEL_MEMBER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15072) /* metro dependency 15072: GuildChannelMemberRow */);
}
const GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
if (GUILD_CHANNEL_MEMBER_PLACEHOLDER === type) {
return ((Component) => <Component />)(importDefault(15073) /* metro dependency 15073: MemberRowPlaceholder */);
}
const GENERIC = SearchListItemTypes.GENERIC;
if (GENERIC === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15074) /* metro dependency 15074: GenericTextRow */);
}
const SECTION = SearchListItemTypes.SECTION;
if (SECTION === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15075) /* metro dependency 15075: SearchListSection */);
}
return null;
}
function SearchList({contentContainerStyle, data, onEndReached, ItemSeparatorComponent, ListHeaderComponent, ListFooterComponent, estimatedItemSize, numColumns}) { // fn#113848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:2555, offset: 0x024087ef, size: 527 bytes, params: 2, frame: 37
var r27;
var defaultImport;
var intl;
const value2 = env0_3.useRef(null);
const styles = useStyles();
const bottom = importDefault(dependencyMap[22])().bottom;
const r15 = numColumns == null || numColumns === 1 ? 0.5 : numColumns === 2 ? 0.8 : numColumns >= 3 ? 0.99 : undefined;
let r5 = data.length === 0 && ListFooterComponent == null && ListHeaderComponent == null;
if (r5) {
var viewBinding2Props = {style: StyleSheet.absoluteFill};
defaultImport = importDefault(dependencyMap[23]);
intl = require(dependencyMap[24]).intl;
r5 = <View {...viewBinding2Props}>{((Component) => <Component text={intl.string(require(dependencyMap[24]).t.V6nAfF)} />)(defaultImport)}</View>;
r27 = dependencyMap;
}
const AnimatedFlashList = require(dependencyMap[25]).AnimatedFlashList;
const renderItem_113847Binding = renderItem_113847;
const object = {paddingBottom: 16 + bottom};
copyDataProperties(object, contentContainerStyle, r27);
return (
<View style={styles.container}>
{r5}
<AnimatedFlashList
ref={value2}
keyboardDismissMode="on-drag"
keyboardShouldPersistTaps="handled"
estimatedItemSize={estimatedItemSize}
data={data}
renderItem={renderItem_113847Binding}
onEndReachedThreshold={r15}
onEndReached={onEndReached}
scrollsToTop
contentContainerStyle={object}
keyExtractor={keyExtractor_113845}
getItemType={getItemType_113846}
ListHeaderComponent={ListHeaderComponent}
ListFooterComponent={ListFooterComponent}
ItemSeparatorComponent={ItemSeparatorComponent}
numColumns={numColumns}
/>
</View>
);
}
function searchHistoryKeyExtractor(a0) { // fn#113842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:488, owner: getItemKey_113841.searchHistoryKeyExtractor, offset: 0x02408260, size: 232 bytes, params: 2, frame: 15
var environment;
var r3;
var text;
var tags;
const type = a0.type;
let value = environment.__proto__;
const TEXT = SearchHistoryItemTypes.TEXT;
if (TEXT === type) {
text = a0.text;
tags = a0.tags;
value = undefined;
if (tags == null) {
r3 = value;
} else {
value = tags.map(function(a0) {
return a0.text;
});
value = value.join(' ');
r3 = value;
}
return '' + text + ' ' + r3;
}
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return '' + a0.channelId;
}
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return '' + a0.channelId;
}
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return '' + a0.channelId;
}
const DM = SearchHistoryItemTypes.DM;
if (DM === type) {
return '' + a0.userId;
}
}
@@ -0,0 +1,171 @@
/* Metro module 15061; source: modules/search/native/components/list/SearchListCard.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 4573, 3995, 4805, 9719, 6698, 1244, 6647, 6239, 2] */
function _fun113960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:6, offset: 0x0240e0f1, size: 657 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const closure = SearchListContentAuthor;
const closure2 = SearchListGuildChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {channelName: {'flexShrink': 1, 'marginStart': 4}};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.channelIcon = {color: INTERACTIVE_TEXT_DEFAULT};
object2.avatar = {marginRight: 2};
object2.channel = {'flexDirection': 'row', 'alignItems': 'center'};
object2.author = {'flexDirection': 'row', 'alignItems': 'center'};
object2.authorName = {'flexShrink': 1, 'marginStart': 2};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'flex': 1, 'padding': 0, 'backgroundColor': null, 'overflow': 'hidden',
backgroundColor: BACKGROUND_BASE_LOW};
object2.content = {'paddingTop': 12, 'paddingHorizontal': 12, 'paddingBottom': 4};
object2.footer = {'flexDirection': 'column', 'paddingTop': 4, 'paddingHorizontal': 12, 'paddingBottom': 12,
'gap': 4};
const object3 = {'flex': 1, 'overflow': 'hidden'};
object3.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object3.borderBottomWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderBottomColor = BORDER_SUBTLE;
object2.thumbnail = object3;
object2.privateChannelIcon = {'flexDirection': 'row', 'alignItems': 'center'};
object2.icon = {marginRight: 4};
object2.gdmIcon = {width: 18};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchListCard.tsx');
exports.SearchListContentAuthor = closure;
exports.SearchListGuildChannel = closure2;
exports.SearchListCardContainer = SearchListCardContainer;
exports.SearchListCardThumbnail = SearchListCardThumbnail;
exports.SearchListCardContent = SearchListCardContent;
exports.SearchListCardFooter = SearchListCardFooter;
}
function SearchListContentAuthor({author, avatarSource}) { // fn#113961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1018, offset: 0x0240e382, size: 244 bytes, params: 2, frame: 23
const styles = useStyles();
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SIZE_16 = AvatarSizes.SIZE_16;
const avatar = <Avatar source={avatarSource} size={SIZE_16} style={styles.avatar} avatarDecoration={author.avatarDecoration} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.author}>
{avatar}
<Text
style={styles.authorName}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(author)}
</Text>
</View>
);
}
function SearchListPrivateChannel({channel}) { // fn#113962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1376, offset: 0x0240e476, size: 452 bytes, params: 2, frame: 26
var view;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var intl;
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const isGroupDM2 = channel.isGroupDM();
const object2 = {};
if (isGroupDM2) {
object2.style = styles.channel;
view = <View {...object2}><View style={styles.gdmIcon}>{((Component) => <Component channel={channel} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */)}</View><Text style={styles.channelName} variant="text-xs/medium" color="interactive-text-default" lineClamp={1}>{value2}</Text></View>;
} else {
object2.style = styles.privateChannelIcon;
items2 = [((ForumIcon) => <ForumIcon style={styles.icon} size="xs" color="interactive-text-default" />)((require(6698) /* metro dependency 6698: ForumIcon */).ForumIcon)];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text variant="text-xs/medium" color="interactive-text-default" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ACgJhM)}</Text>;
view = <View {...object2}>{items2}</View>;
}
return view;
}
function SearchListGuildChannel({channel}) { // fn#113963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1970, offset: 0x0240e63a, size: 261 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel,
{ignoreTraits: true});
channel = styles.channel;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const icon = <Icon size={REFRESH_SMALL_16} source={channelIcon} color={styles.channelIcon.color} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={channel}>
{icon}
<Text
style={styles.channelName}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{value2}
</Text>
</View>
);
}
function SearchListCardContainer({children, onPress, containerStyle}) { // fn#113964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2554, offset: 0x0240e73f, size: 113 bytes, params: 2, frame: 18
const styles = useStyles();
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
return (
<Card
shadow="low"
border="subtle"
onPress={onPress}
style={[styles.container, containerStyle]}
>
{children}
</Card>
);
}
function SearchListCardThumbnail({thumbnail}) { // fn#113965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2763, offset: 0x0240e7b0, size: 54 bytes, params: 2, frame: 15
const styles = useStyles();
return (
<View style={styles.thumbnail}>
{thumbnail}
</View>
);
}
function SearchListCardContent({label, subLabel}) { // fn#113966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2889, offset: 0x0240e7e6, size: 200 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<View style={styles.content}>
{typeof label !== 'string' ? label : ((Text) => <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
{typeof subLabel !== 'string' ? subLabel : ((Text) => <Text variant="text-sm/normal" color="text-default" lineClamp={1}>{subLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
}
function SearchListCardFooter({author, avatarSource, channel}) { // fn#113967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:3250, offset: 0x0240e8ae, size: 139 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={styles.footer}>
<SearchListContentAuthor author={author} avatarSource={avatarSource} />
{env0_3.useMemo(_fun113968, [channel])}
</View>
);
}
function _fun113968() { // fn#113968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:3340, offset: 0x0240e939, size: 101 bytes, params: 1, frame: 15
const channelBinding = channel;
const value2 = null;
return value2 == channelBinding ? value2 : value2 == channel.getGuildId() ? <SearchListPrivateChannel channel={channel} /> : <SearchListGuildChannel channel={channel} />;
}
@@ -0,0 +1,59 @@
/* Metro module 15046; source: modules/search/native/components/list/SearchListRow.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 5278, 4573, 2] */
function _fun113860(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:6, offset: 0x02409364, size: 233 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_ROW_TAP_STATE_PADDING;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun113861);
value = value.memo(_fun113862);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchListRow.tsx');
exports.SearchListRow = value;
}
function _fun113861(a0) { // fn#113861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:211, offset: 0x0240944d, size: 155 bytes, params: 2, frame: 14
const object2 = {};
object2.pressable = {paddingHorizontal: 16, paddingVertical: SEARCH_ROW_TAP_STATE_PADDING};
object2.body = {'flexDirection': 'row', 'alignItems': 'center'};
object2.labels = {'justifyContent': 'center', 'flex': 1};
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object2.underlayColor = {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
object2.text = {flexShrink: 1};
object2.iconContainer = {marginRight: 12};
object2.extrasContainer = {marginLeft: a0};
return object2;
}
function _fun113862({containerStyle, onPress, label, subLabel, icon, iconContainerStyle, iconWidth, trailing, extras, header, accessible, accessibilityRole, accessibilityLabel, accessibilityHint, accessibilityActions, onAccessibilityAction, bodyStyle}) { // fn#113862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:527, offset: 0x024094e8, size: 523 bytes, params: 2, frame: 33
accessible = accessible === undefined || accessible;
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const styles = useStyles(iconWidth ?? 0);
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const items3 = [styles.pressable, containerStyle];
const backgroundColor = styles.underlayColor.backgroundColor;
const items2 = [header];
items2[1] = <View style={[styles.body, bodyStyle]}><View style={[styles.iconContainer,
iconContainerStyle]}>{icon}</View><View style={styles.labels}>{typeof label !== 'string' ? label : ((Text) => <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary" style={styles.text}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{subLabel}</View>{trailing}</View>;
items2[2] = extras != null && <View style={[styles.extrasContainer]}>{extras}</View>;
return (
<PressableHighlight
accessible={accessible}
accessibilityRole={accessibilityRole}
accessibilityLabel={accessibilityLabel}
accessibilityHint={accessibilityHint}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
style={items3}
onPress={onPress}
unstable_pressDelay={130}
underlayColor={backgroundColor}
>
{items2}
</PressableHighlight>
);
}
@@ -0,0 +1,38 @@
/* Metro module 15075; source: modules/search/native/components/list/SearchListSection.tsx; dependencies: [31, 27, 9615, 33, 4501, 4573, 2] */
function _fun114039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15272:6, offset: 0x02411e63, size: 242 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const SEARCH_LIST_SECTION_TOP_PADDING = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_LIST_SECTION_TOP_PADDING;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({section: {'flex': 1,
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'textTransform': 'none', 'paddingTop': null, 'paddingHorizontal': 16, 'paddingBottom': 8,
paddingTop: SEARCH_LIST_SECTION_TOP_PADDING}});
value = value.memo(_fun114040);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchListSection.tsx');
exports.default = value;
}
function _fun114040({title, trailing}) { // fn#114040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15272:400, offset: 0x02411f55, size: 124 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.section}>
<Text
maxFontSizeMultiplier={2}
accessibilityRole="header"
variant="text-sm/semibold"
color="interactive-text-default"
>
{title}
</Text>
{trailing}
</View>
);
}
@@ -0,0 +1,235 @@
/* Metro module 15059; source: modules/search/native/components/list/SearchMediaImage.tsx; dependencies: [57, 31, 27, 4792, 33, 4501, 4048, 4002, 4840, 11139, 6692, 4564, 1477, 11558, 477, 1244, 10014, 9796, 9546, 566, 9783, 11143, 2] */
function _fun113941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:6, offset: 0x0240d2ac, size: 375 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.ImageBackground;
const env0_6 = value2.StyleSheet;
const env0_7 = value2.View;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.Fragment;
const env0_11 = value3.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'justifyContent': 'center',
'alignItems': 'center'}, sound: {'justifyContent': 'center', 'alignItems': 'center'}});
const env0_13 = value.memo(_fun113945);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchMediaImage.tsx');
exports.SearchAttachmentMediaImage = SearchAttachmentMediaImage;
exports.SearchEmbedMediaImage = SearchEmbedMediaImage;
exports.SearchSoundMediaImage = SearchSoundMediaImage;
exports.SearchFileMediaImage = SearchFileMediaImage;
exports.SearchComponentMediaImage = SearchComponentMediaImage;
}
function SearchMediaObscurityIcon({obscureReason, height, width}) { // fn#113942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:354, offset: 0x0240d423, size: 329 bytes, params: 2, frame: 22
const styles = useStyles();
const r7 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? 'dark' : 'light';
const value5 = env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width]);
const value6 = env0_4.useMemo(_fun113944, [obscureReason]);
return (
<>
{((Component) => <Component blurTheme={r7} style={[StyleSheet.absoluteFill,
value5]} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}
{value6 != null && <View style={[StyleSheet.absoluteFill, styles.container]}>{value6}</View>}
</>
);
}
function _fun113945({mediaUrl, mediaHeight, mediaWidth, containerStyle, placeholder, placeholderVersion, renderFallback, obscureReason, containerHeight, containerWidth, scale}) { // fn#113945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:1040, offset: 0x0240d6a0, size: 745 bytes, params: 2, frame: 30
const ImageWithPlaceholder = (require(10014) /* metro dependency 10014: ImageWithPlaceholder */).ImageWithPlaceholder;
var r15;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = env0_4.useMemo(function() {
return {height: containerHeight, width: containerWidth};
}, [containerHeight, containerWidth]);
if (mediaUrl == null) {
return renderFallback != null ? <>{renderFallback()}</> : null;
}
if (mediaHeight == null) {
return renderFallback != null ? <>{renderFallback()}</> : null;
}
if (mediaWidth == null) {
return renderFallback != null ? <>{renderFallback()}</> : null;
}
const value4 = containerHeight * scale;
const value5 = containerWidth * scale;
const value7 = env0_3(mediaWidth > mediaHeight ? [global.Math.round(mediaWidth * (value5 / mediaHeight)), value5] : [value4, global.Math.round(mediaHeight * (value4 / mediaWidth))], 2);
const srcWithWidthAndHeight = (require(1477) /* metro dependency 1477: ImageUtils */).getSrcWithWidthAndHeight({src: mediaUrl,
sourceWidth: mediaWidth, sourceHeight: mediaHeight, targetWidth: value7[0], targetHeight: value7[1],
format: 'png'});
const obscuredAlt = (require(11558) /* metro dependency 11558: MessageAttachmentUtils */).getObscuredAlt(obscureReason);
const r8 = obscureReason != null ? <SearchMediaObscurityIcon obscureReason={obscureReason} height={containerHeight} width={containerWidth} /> : null;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (obscureReason != null) {
return (
<View style={containerStyle}>
<ImageBackground
style={value2}
source={{uri: srcWithWidthAndHeight}}
blurRadius={10}
resizeMode="cover"
accessibilityLabel={obscuredAlt}
/>
{r8}
</View>
);
}
}
const moduleValue4 = platformUtilsModule;
return (
<View style={containerStyle}>
<ImageWithPlaceholder
style={value2}
uri={srcWithWidthAndHeight}
placeholder={placeholder}
placeholderVersion={placeholderVersion}
alt={moduleValue4.isAndroid() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jes7FG) : obscuredAlt}
/>
{r8}
</View>
);
}
function SearchAttachmentMediaImage(a0) { // fn#113947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2164, offset: 0x0240d989, size: 237 bytes, params: 2, frame: 22
const attachment = a0.attachment;
const channelId = a0.channelId;
const authorId = a0.authorId;
const object2 = {'attachment': 0, 'channelId': 0, 'authorId': 0};
silentSetPrototypeOf(object2, null, undefined);
return ((Component) => <Component {...copyDataProperties({}, a0, object2,
undefined)} {...{['obscureReason']: env0_4.useMemo(_fun113948, [attachment,
(require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId)])}} {...{['mediaUrl']: (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(attachment)}} {...{['mediaHeight']: attachment.height}} {...{['mediaWidth']: attachment.width}} />)(env0_13);
}
function SearchEmbedMediaImage(a0) { // fn#113949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2523, offset: 0x0240daa8, size: 358 bytes, params: 2, frame: 22
const embed = a0.embed;
const env0_1 = a0.sources;
const env0_2 = a0.messageId;
const channelId = a0.channelId;
const authorId = a0.authorId;
const object2 = {'embed': 0, 'sources': 0, 'messageId': 0, 'channelId': 0, 'authorId': 0};
const value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, channelId);
const value4 = undefined;
const env0_3 = (require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId);
const obscureReasonForEmbed = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
_fun113950);
const thumbnail = embed.thumbnail;
const embedMedia = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getEmbedMedia(embed);
let r7 = value != embedMedia ? (require(9546) /* metro dependency 9546: MediaSourceUtil */).getEmbedUrl(embedMedia) : value;
r7 = value != thumbnail ? thumbnail.url : r7;
return ((Component) => <Component {...value2} {...{['obscureReason']: obscureReasonForEmbed}} {...{['mediaUrl']: r7}} {...{['mediaHeight']: value != thumbnail ? thumbnail.height : value == embedMedia ? value4 : embedMedia.height}} {...{['mediaWidth']: value != thumbnail ? thumbnail.width : value == embedMedia ? value4 : embedMedia.width}} />)(env0_13);
}
function SearchSoundMediaImage({height, width, containerStyle}) { // fn#113951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3179, offset: 0x0240dca1, size: 174 bytes, params: 2, frame: 19
const styles = useStyles();
const items2 = [styles.sound, containerStyle, env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width])];
const CirclePlayIcon = (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon;
return (
<View style={items2}>
<CirclePlayIcon size="lg" color="interactive-text-default" />
</View>
);
}
function SearchFileMediaImage({fileName, height, width, containerStyle}) { // fn#113953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3442, offset: 0x0240dd4f, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.sound, containerStyle, env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width])];
const AttachmentIcon = (require(11143) /* metro dependency 11143: AttachmentPreview */).AttachmentIcon;
return (
<View style={items2}>
<AttachmentIcon fileName={fileName} />
</View>
);
}
function SearchComponentMediaImage(a0) { // fn#113955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3688, offset: 0x0240ddfc, size: 248 bytes, params: 2, frame: 22
const unfurledMediaItem = a0.unfurledMediaItem;
const sources = a0.sources;
const channelId = a0.channelId;
const authorId = a0.authorId;
const isBot = a0.isBot;
const object2 = {'unfurledMediaItem': 0, 'sources': 0, 'channelId': 0, 'authorId': 0, 'isBot': 0};
silentSetPrototypeOf(object2, null, undefined);
return ((Component) => <Component {...copyDataProperties({}, a0, object2,
undefined)} {...{['obscureReason']: env0_4.useMemo(_fun113956, [unfurledMediaItem,
(require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId), sources,
isBot])}} {...{['mediaUrl']: unfurledMediaItem.proxyUrl}} {...{['mediaHeight']: unfurledMediaItem.height}} {...{['mediaWidth']: unfurledMediaItem.width}} />)(env0_13);
}
function _fun113944() { // fn#113944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:545, offset: 0x0240d583, size: 285 bytes, params: 1, frame: 15
const obscureReasonBinding = obscureReason;
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
const SPOILER = ObscureReason.SPOILER;
if (SPOILER === obscureReasonBinding) {
const SpoilerIcon = (require(11139) /* metro dependency 11139: SpoilerIcon */).SpoilerIcon;
return <SpoilerIcon size="lg" />;
}
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
if (EXPLICIT_CONTENT === obscureReasonBinding) {
const ImageWarningIcon = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon size="lg" />;
}
const GORE_CONTENT = ObscureReason.GORE_CONTENT;
if (GORE_CONTENT === obscureReasonBinding) {
const ImageWarningIcon2 = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon2 size="lg" />;
}
const SELF_HARM_CONTENT = ObscureReason.SELF_HARM_CONTENT;
if (SELF_HARM_CONTENT === obscureReasonBinding) {
const ImageWarningIcon3 = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon3 size="lg" />;
}
const POTENTIAL_EXPLICIT_CONTENT = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
if (POTENTIAL_EXPLICIT_CONTENT === obscureReasonBinding) {
return null;
}
}
function _fun113948() { // fn#113948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2325, offset: 0x0240da76, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11558) /* metro dependency 11558: MessageAttachmentUtils */).getObscureReasonForAttachment(attachment,
env0_1);
}
function _fun113950() { // fn#113950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2718, offset: 0x0240dc0e, size: 147 bytes, params: 1, frame: 20
const value = environment.__proto__;
const message = SearchMessageStore.getMessage(messageId);
if (message == null) {
return null;
}
const value4 = undefined;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
const value5 = mediaSourceUtilModule.flattenSource(sources, false);
const spoiler = value5 == null ? value4 : value5.spoiler;
return (require(11558) /* metro dependency 11558: MessageAttachmentUtils */).getObscureReasonForEmbed(embed,
message, spoiler != null && spoiler, env0_3);
}
function _fun113956() { // fn#113956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3873, offset: 0x0240def4, size: 109 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = require(11558) /* metro dependency 11558: MessageAttachmentUtils */;
const getObscureReasonForUnfurledMediaItem = value.getObscureReasonForUnfurledMediaItem;
const unfurledMediaItemBinding = unfurledMediaItem;
const binding = env0_3;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
const value3 = mediaSourceUtilModule.flattenSource(sources);
return Reflect.apply(getObscureReasonForUnfurledMediaItem, value, [unfurledMediaItemBinding, binding,
!(value3 == null || !value3.spoiler), isBot]);
}
@@ -0,0 +1,204 @@
/* Metro module 15045; source: modules/search/native/components/list/rows/DMRow.tsx; dependencies: [5, 57, 31, 27, 4502, 4396, 3793, 661, 33, 4501, 697, 4573, 3995, 8829, 566, 8706, 1305, 9098, 12229, 15046, 2] */
function _fun113849(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:6, offset: 0x024089fe, size: 435 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_6 = value2.View;
const env0_7 = value2.ActivityIndicator;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.StatusTypes;
const env0_12 = constantsModule.RelationshipTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_13 = value4.jsx;
const env0_14 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
const env0_15 = Reflect.apply(createStyles, createStylesModule, [{activityStatusIcon: {'width': 14, 'height': 14},
activityStatusText: {'color': null, 'fontSize': 14, 'lineHeight': 18, 'fontWeight': '400', color: TEXT_SUBTLE},
tag: {marginLeft: 4}, title: {flexDirection: 'row'}}]);
value = value.memo(DMRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/DMRow.tsx');
exports.default = value;
}
function FriendPresence({user, type, animate, guildId}) { // fn#113850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:483, offset: 0x02408bb1, size: 211 bytes, params: 2, frame: 19
var r0;
var Text;
var value;
const styles = useStyles();
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
if (type === PENDING_INCOMING) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = require(3995) /* metro dependency 3995: UserUtils */;
value = <Text lineClamp={1} variant="text-sm/medium" color="text-default">{value.getUserTag(user)}</Text>;
r0 = value;
} else {
value = importDefault(8829) /* metro dependency 8829: ActivityStatus */;
value = ((Component) => <Component userId={user.id} guildId={guildId} iconStyle={styles.activityStatusIcon} textStyle={styles.activityStatusText} emojiSize={16} animate={animate} />)(value);
r0 = value;
}
return r0;
}
function DMRow({user, nickname, premiumSince, isOwner, type, guildId, onPress, trailing, accessibilityActions, onAccessibilityAction}) { // fn#113851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:828, offset: 0x02408c84, size: 641 bytes, params: 2, frame: 34
const env0_3 = isOwner;
const env0_4 = type;
const env0_5 = guildId;
const styles = useStyles();
let binding = env0_5;
const [property, env0_8] = env0_4(binding.useState(false), 2);
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], function() {
var object = {};
var userBinding = user;
object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id);
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
object.status = PresenceStore.getStatus(userBinding.id);
return object;
});
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun113854);
const value7 = binding.useCallback(env0_3(_fun113856), [onPress, user.id]);
const r20 = value5 ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
binding = env0_5;
const value9 = binding.useMemo(_fun113857, [styles.title, styles.tag, r20, user, isOwner, premiumSince]);
const value10 = binding.useMemo(_fun113858, [user, status, isMobileOnline, isVROnline, guildId]);
const value11 = binding.useMemo(_fun113859, [user, guildId, type, useReducedMotion]);
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
return (
<SearchListRow
label={value9}
subLabel={value11}
icon={value10}
onPress={value7}
trailing={property ? <ActivityIndicator /> : trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
}
function _fun113854() { // fn#113854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1308, offset: 0x02408f55, size: 48 bytes, params: 1, frame: 12
return nickname ?? RelationshipStore.getNickname(user.id);
}
function* _fun113856() { // fn#113856, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1367, offset: 0x02408f90, size: 97 bytes, params: 1, frame: 14
var id;
var value3;
var value4;
var value5;
var error;
if (true) {
value = environment.__proto__;
AccessibilityStore(true);
try {
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
id = require.id;
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
value3 = View(id);
} catch (error) {
AccessibilityStore(false);
throw error;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
AccessibilityStore(false);
throw error;
}
if (value5) {
AccessibilityStore(false);
return value4;
}
AccessibilityStore(false);
}
}
function _fun113857() { // fn#113857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1476, offset: 0x02408ff1, size: 531 bytes, params: 1, frame: 26
var r5;
var BotTag;
var isSystemUser2;
var Types;
const value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{env0_13}</Text>];
const bot = user.bot;
if (bot) {
BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
var defaultImportProps = {style: styles.tag};
userBinding = user;
defaultImportProps.verified = userBinding.isVerifiedBot();
isSystemUser2 = userBinding.isSystemUser();
Types = (importDefault(8706) /* metro dependency 8706: BotTag */).Types;
defaultImportProps.type = isSystemUser2 ? Types.SYSTEM_DM : Types.BOT;
r5 = <BotTag {...defaultImportProps} />;
} else {
r5 = bot;
}
items2[1] = r5;
items2[2] = isOwner && <View style={styles.tag}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(9098) /* metro dependency 9098 */} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
items2[3] = premiumSince != null && <View style={styles.tag}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(12229) /* metro dependency 12229 */} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
return (
<View style={styles.title}>
{items2}
</View>
);
}
function _fun113858() { // fn#113858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:2036, offset: 0x02409204, size: 165 bytes, params: 1, frame: 19
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {user: user, guildId: guildId};
const OFFLINE = StatusTypes.OFFLINE;
avatarProps.status = OFFLINE === status ? null : status;
avatarProps.isMobileOnline = isMobileOnline;
avatarProps.isVROnline = isVROnline;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
avatarProps.size = LARGE_48;
avatarProps.avatarDecoration = user.avatarDecoration;
avatarProps.autoStatusCutout = true;
return <Avatar {...avatarProps} />;
}
function _fun113859() { // fn#113859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:2254, offset: 0x024092a9, size: 187 bytes, params: 1, frame: 18
const value = environment.__proto__;
const userTag = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
const value4 = null;
if (value4 == userTag || user.isProvisional) {
return value4 != type ? <FriendPresence user={user} guildId={guildId} type={type} animate={!useReducedMotion} /> : value4;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/medium" color="text-muted">
{userTag}
</Text>
);
}
}
@@ -0,0 +1,130 @@
/* Metro module 15071; source: modules/search/native/components/list/rows/FileGridItem.tsx; dependencies: [31, 27, 1379, 9615, 33, 4501, 4631, 6697, 9759, 10968, 566, 8430, 15059, 15061, 4655, 2] */
function _fun114023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:6, offset: 0x0241142a, size: 293 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.useWindowDimensions;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_7 = searchConstantsModule.FILE_OR_LINK_IMAGE_BUFFER;
const env0_8 = searchConstantsModule.SearchFileTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_9 = value4.jsx;
const env0_10 = value4.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({icon: {'alignItems': 'center',
'justifyContent': 'center'}});
value = value.memo(FileGridItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/FileGridItem.tsx');
exports.default = value;
}
function getAttachmentIcon(a0) { // fn#114024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:323, offset: 0x0241154f, size: 220 bytes, params: 2, frame: 16
const mediaFormatTestersModule = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (mediaFormatTestersModule.isImageFile(a0)) {
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
return <ImageIcon size="lg" color="interactive-text-default" />;
} else if (mediaFormatTestersModule.isVideoFile(a0)) {
const VideoIcon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
return <VideoIcon size="lg" color="interactive-text-default" />;
} else {
const FileIcon = (require(10968) /* metro dependency 10968: FileIcon */).FileIcon;
return <FileIcon size="lg" color="interactive-text-default" />;
}
}
function FileGridItem({data, onPress, imageStyle, containerStyle}) { // fn#114025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:617, offset: 0x0241162b, size: 559 bytes, params: 2, frame: 27
const styles = useStyles();
const env0_3 = styles;
const scale = useWindowDimensions().scale;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(data.channelId);
});
let binding = env0_3;
const value3 = binding.useMemo(function() {
return data.author.getAvatarSource(channel?.guild_id);
}, [data.author, channel?.guild_id]);
const value4 = (importDefault(8430) /* metro dependency 8430: getDisplayFilename */)(data.attachment);
const size = data.attachment.size;
binding = env0_3;
const value5 = binding.useCallback(function() {
var onPressBinding = onPress;
var dataBinding = data;
onPressBinding({channelId: dataBinding.channelId, messageId: dataBinding.messageId});
}, [data.channelId, data.messageId, onPress]);
const value6 = binding.useMemo(_fun114029, [data, value4, imageStyle, scale, styles.icon]);
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
const SearchListCardThumbnail = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardThumbnail;
const items2 = [<SearchListCardThumbnail thumbnail={value6} />];
const SearchListCardContent = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContent;
items2[1] = <SearchListCardContent label={value4} subLabel={size > 0 ? (require(4655) /* metro dependency 4655: FileUtils */).sizeString(size) : undefined} />;
const SearchListCardFooter = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardFooter;
items2[2] = <SearchListCardFooter author={data.author} avatarSource={value3} channel={channel} />;
return (
<SearchListCardContainer containerStyle={containerStyle} onPress={value5}>
{items2}
</SearchListCardContainer>
);
}
function _fun114029() { // fn#114029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:1046, offset: 0x024118d3, size: 357 bytes, params: 1, frame: 18
var SearchSoundMediaImage;
var imageStyleBinding;
var SearchFileMediaImage;
var SearchAttachmentMediaImage;
const type = data.type;
const MEDIA_ATTACHMENT = SearchFileTypes.MEDIA_ATTACHMENT;
if (MEDIA_ATTACHMENT === type) {
SearchAttachmentMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchAttachmentMediaImage;
imageStyleBinding = imageStyle;
dataBinding = data;
return (
<SearchAttachmentMediaImage
containerStyle={imageStyleBinding}
attachment={dataBinding.attachment}
channelId={dataBinding.channelId}
authorId={dataBinding.author.id}
scale={scale}
containerHeight={imageStyleBinding.height + FILE_OR_LINK_IMAGE_BUFFER}
containerWidth={imageStyleBinding.width + FILE_OR_LINK_IMAGE_BUFFER}
renderFallback={renderFallback_114030}
/>
);
}
const ATTACHMENT = SearchFileTypes.ATTACHMENT;
if (ATTACHMENT === type) {
SearchFileMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchFileMediaImage;
imageStyleBinding = imageStyle;
return (
<SearchFileMediaImage
fileName={env0_6}
containerStyle={imageStyleBinding}
height={imageStyleBinding.height}
width={imageStyleBinding.width}
/>
);
}
const AUDIO = SearchFileTypes.AUDIO;
if (AUDIO === type) {
SearchSoundMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchSoundMediaImage;
imageStyleBinding = imageStyle;
return (
<SearchSoundMediaImage
containerStyle={imageStyleBinding}
height={imageStyleBinding.height}
width={imageStyleBinding.width}
/>
);
}
}
function renderFallback_114030() { // fn#114030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:1295, offset: 0x02411a38, size: 84 bytes, params: 1, frame: 16
return (
<View style={[styles.icon, imageStyle]}>
{getAttachmentIcon(data.attachment.filename)}
</View>
);
}
@@ -0,0 +1,41 @@
/* Metro module 15074; source: modules/search/native/components/list/rows/GenericTextRow.tsx; dependencies: [5, 31, 27, 33, 4501, 4573, 15046, 2] */
function _fun114035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:6, offset: 0x02411c27, size: 240 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {flexDirection: 'row'},
container: {padding: 10}});
value = value.memo(GenericTextRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GenericTextRow.tsx');
exports.default = value;
}
function GenericTextRow({text, icon, onPress, trailing, accessibilityActions, onAccessibilityAction}) { // fn#114036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:236, offset: 0x02411d17, size: 277 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = env0_3.useCallback(env0_2(_fun114038), [onPress, text]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.title}><Text lineClamp={1} variant="text-md/medium" color="mobile-text-heading-primary" style={styles.container}>{text}</Text></View>;
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
return (
<SearchListRow
icon={icon != null && ((Component) => <Component size="sm" color="mobile-text-heading-primary" />)(icon)}
label={view}
onPress={value3}
trailing={trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
}
function* _fun114038() { // fn#114038, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:374, offset: 0x02411e37, size: 44 bytes, params: 1, frame: 12
if (true) {
value = environment.__proto__;
yield dependencyMap(require);
}
}
@@ -0,0 +1,38 @@
/* Metro module 15047; source: modules/search/native/components/list/rows/GroupDMRow.tsx; dependencies: [31, 33, 4805, 9719, 1305, 12127, 4573, 15046, 2] */
function _fun113863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15244:6, offset: 0x024096f3, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GroupDMRow.tsx');
exports.default = GroupDMRow_113864;
}
function GroupDMRow_113864({channel, trailing, onPress, onAccessibilityAction, accessibilityActions}) { // fn#113864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15244:221, offset: 0x02409781, size: 360 bytes, params: 2, frame: 24
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const value4 = env0_3.useCallback(function() {
onPress(channel.id);
}, [channel.id, onPress]);
const GroupDMAvatar = importDefault(9719) /* metro dependency 9719: GroupDMAvatar */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
const groupDMAvatar = <GroupDMAvatar size={LARGE_48} channel={channel} />;
const value6 = (require(12127) /* metro dependency 12127: useRecipientsLabel */).useRecipientsLabel(channel);
const r7 = value6 != null ? ((Text) => <Text variant="text-xs/medium" color="text-muted" lineClamp={1}>{value6}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : undefined;
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
const value = '';
return (
<SearchListRow
label={value3 ?? value}
icon={groupDMAvatar}
onPress={value4}
accessibilityLabel={value3 ?? value}
subLabel={r7}
trailing={trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
}
@@ -0,0 +1,14 @@
/* Metro module 15072; source: modules/search/native/components/list/rows/GuildChannelMemberRow.tsx; dependencies: [31, 33, 7707, 2] */
function _fun114031(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15269:6, offset: 0x02411a8c, size: 134 bytes, params: 8, frame: 18
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/search/native/components/list/rows/GuildChannelMemberRow.tsx');
exports.default = GuildChannelMemberRow;
}
function GuildChannelMemberRow(a0) { // fn#114032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15269:230, offset: 0x02411b12, size: 49 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} />)(importDefault(7707) /* metro dependency 7707: UserRow */);
}
@@ -0,0 +1,66 @@
/* Metro module 15053; source: modules/search/native/components/list/rows/GuildChannelRow.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 4805, 15054, 6647, 15056, 15046, 2] */
function _fun113914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:6, offset: 0x0240b6aa, size: 331 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.Image;
const env0_4 = value2.View;
const env0_5 = (require(9615) /* metro dependency 9615: SearchConstants */).CHANNEL_LIST_SEARCH_LAYOUT;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{container: {paddingVertical: 10},
content: {'flexDirection': 'row', 'alignItems': 'center'}, iconContainer: {marginRight: 0},
simpleIcon: {'width': 20, 'height': 20, 'marginRight': 8, tintColor: TEXT_MUTED}}]);
value = value.memo(GuildChannelRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GuildChannelRow.tsx');
exports.default = value;
}
function GuildChannelLabel({channel}) { // fn#113915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:405, offset: 0x0240b7f5, size: 123 bytes, params: 2, frame: 19
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const channelContentModule = require(15054) /* metro dependency 15054: ChannelContent */;
return (
<View style={styles.content}>
{channelContentModule.renderChannelContent({channel: channel, layout: CHANNEL_LIST_SEARCH_LAYOUT,
name: value2})}
</View>
);
}
function GuildChannelRow(a0) { // fn#113916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:579, offset: 0x0240b870, size: 383 bytes, params: 2, frame: 28
const channel = a0.channel;
const subtitle = a0.subtitle;
const trailing = a0.trailing;
const extras = a0.extras;
const onPress = a0.onPress;
const voiceStates = a0.voiceStates;
const object2 = {'channel': 0, 'subtitle': 0, 'trailing': 0, 'extras': 0, 'onPress': 0, 'voiceStates': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles();
const channelAccessibilityProps = (require(15056) /* metro dependency 15056: ChannelItem */).getChannelAccessibilityProps({'channel': null,
'unread': false, 'mentionCount': 0, channel: channel, voiceStates: voiceStates});
const object4 = {};
object4.icon = <Image style={styles.simpleIcon} source={(require(6647) /* metro dependency 6647: ChannelUtils */).getSimpleChannelIcon(channel)} />;
object4.iconWidth = 32;
const icon = object4.icon;
const iconWidth = object4.iconWidth;
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
const searchListRowProps = {...channelAccessibilityProps, ...value};
searchListRowProps['containerStyle'] = styles.container;
searchListRowProps['iconContainerStyle'] = styles.iconContainer;
searchListRowProps['icon'] = icon;
searchListRowProps['iconWidth'] = iconWidth;
searchListRowProps['label'] = <GuildChannelLabel channel={channel} />;
searchListRowProps['subLabel'] = subtitle;
searchListRowProps['onPress'] = onPress;
searchListRowProps['trailing'] = trailing;
searchListRowProps['extras'] = extras;
return <SearchListRow {...searchListRowProps} />;
}
@@ -0,0 +1,47 @@
/* Metro module 15057; source: modules/search/native/components/list/rows/GuildTextChannelRow.tsx; dependencies: [31, 9615, 33, 21, 15050, 9675, 15053, 2] */
function _fun113929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:6, offset: 0x0240c924, size: 174 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).CHANNEL_LIST_SEARCH_LAYOUT;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(GuildTextChannelRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GuildTextChannelRow.tsx');
exports.default = value;
}
function GuildTextChannelRow(a0) { // fn#113930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:171, offset: 0x0240c9d2, size: 297 bytes, params: 2, frame: 23
var r2;
const channel = a0.channel;
const trailing = a0.trailing;
const lastMessageId = a0.lastMessageId;
const onPress = a0.onPress;
const object2 = {'channel': 0, 'trailing': 0, 'lastMessageId': 0, 'onPress': 0};
let value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, undefined);
const id = channel.id;
const guild_id = channel.guild_id;
const env0_3 = guild_id;
if (value != lastMessageId) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(lastMessageId);
r2 = value;
} else {
r2 = value;
}
const binding = env0_3;
return ((Component) => <Component {...value2} {...{['subtitle']: binding.useMemo(_fun113931, [id, guild_id,
r2])}} {...{['channel']: channel}} {...{['trailing']: trailing}} {...{['onPress']: binding.useCallback(function() {
onPress(channel.id);
}, [channel.id, onPress])}} />)(importDefault(15053) /* metro dependency 15053: GuildChannelRow */);
}
function _fun113931() { // fn#113931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:335, offset: 0x0240cafb, size: 121 bytes, params: 1, frame: 18
const channelSubtitleModule = require(15050) /* metro dependency 15050: ChannelSubtitle */;
const value3 = null;
return channelSubtitleModule.renderChannelSubtitle({subtitle: value3 != env0_4 ? (require(9675) /* metro dependency 9675: SearchUtils */).getChannelActiveAgoTimestamp(env0_4) : value3,
layout: CHANNEL_LIST_SEARCH_LAYOUT, channelId: id, guildId: guild_id});
}
@@ -0,0 +1,118 @@
/* Metro module 15049; source: modules/search/native/components/list/rows/GuildVoiceOrStageChannelRow.tsx; dependencies: [31, 27, 1384, 9615, 33, 10981, 3995, 1244, 4501, 566, 15050, 6273, 6268, 15051, 15053, 11814, 2] */
function _fun113896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:6, offset: 0x0240a7b1, size: 303 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const env0_6 = (require(9615) /* metro dependency 9615: SearchConstants */).CHANNEL_LIST_SEARCH_LAYOUT;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({users: {marginTop: 4},
subtitle: {marginEnd: 16}, trailing: {'paddingVertical': 4, 'alignItems': 'center', 'alignSelf': 'center'}});
value = value.memo(GuildVoiceChannelRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GuildVoiceOrStageChannelRow.tsx');
exports.default = value;
}
function GuildVoiceChannelSubtitle({channel, voiceStates}) { // fn#113897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:326, offset: 0x0240a8e0, size: 197 bytes, params: 2, frame: 22
const id = channel.id;
const guild_id = channel.guild_id;
const env0_3 = guild_id;
const styles = useStyles();
return (
<View style={styles.subtitle}>
{env0_3.useMemo(_fun113899,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun113898,
[channel.id]), voiceStates, id, guild_id])}
</View>
);
}
function GuildVoiceChannelExtras({channel, users}) { // fn#113902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:1271, offset: 0x0240ac1b, size: 231 bytes, params: 2, frame: 25
const styles = useStyles();
const stageChannelParticipantStoreHooksModule = require(6273) /* metro dependency 6273: StageChannelParticipantStoreHooks */;
const useStageParticipantsCount = stageChannelParticipantStoreHooksModule.useStageParticipantsCount;
const id = channel.id;
const StageChannelParticipantNamedIndex = (require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex;
const AUDIENCE = StageChannelParticipantNamedIndex.AUDIENCE;
return (
<View style={styles.subtitle}>
{users.length !== 0 && <View style={styles.users}>{((Component) => <Component users={users} max={5} guildId={channel.guild_id} layout={CHANNEL_LIST_SEARCH_LAYOUT} audienceCount={Reflect.apply(useStageParticipantsCount,
stageChannelParticipantStoreHooksModule, [id,
AUDIENCE])} />)(importDefault(15051) /* metro dependency 15051: VoiceOrStageSummaryRow */)}</View>}
</View>
);
}
function GuildVoiceChannelRow({channel, voiceStates, speakerVoiceStates, trailing, onPress}) { // fn#113903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:1601, offset: 0x0240ad02, size: 331 bytes, params: 2, frame: 25
const styles = useStyles();
const r8 = channel.isGuildStageVoice() ? speakerVoiceStates : voiceStates;
const value2 = r8.map(function(a0) {
return a0.user;
});
const binding = env0_3;
const useCallback = binding.useCallback;
return ((Component) => <Component onPress={Reflect.apply(useCallback, binding, [function() {
onPress(channel.id);
}, [channel.id,
onPress]])} voiceStates={r8} channel={channel} subtitle={<GuildVoiceChannelSubtitle channel={channel} voiceStates={r8} users={value2} />} trailing={trailing ?? <View style={styles.trailing}>{((VocalChannelJoinButton) => <VocalChannelJoinButton channel={channel} voiceStates={r8} />)((require(11814) /* metro dependency 11814: components */).VocalChannelJoinButton)}</View>} extras={<GuildVoiceChannelExtras channel={channel} voiceStates={r8} users={value2} />} />)(importDefault(15053) /* metro dependency 15053: GuildChannelRow */);
}
function _fun113898() { // fn#113898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:452, offset: 0x0240a9a5, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return StageInstanceStore.getStageInstanceByChannel(channel.id)?.topic;
}
function _fun113899() { // fn#113899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:552, offset: 0x0240a9d6, size: 124 bytes, params: 1, frame: 15
return (require(15050) /* metro dependency 15050: ChannelSubtitle */).renderChannelSubtitle({subtitle: env0_4 ?? getVoiceChannelSubtitle(voiceStates,
CHANNEL_LIST_SEARCH_LAYOUT), muted: false, layout: CHANNEL_LIST_SEARCH_LAYOUT, channelId: id,
guildId: guild_id});
}
function getVoiceChannelSubtitle(a0, a1) { // fn#113900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:573, offset: 0x0240aa52, size: 347 bytes, params: 3, frame: 21
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
if (channelListLayoutModule.isLayoutCompact(a1)) {
return null;
}
const closure = getVoiceChannelSubtitleGetName;
const length = a0.length;
if (length === 0) {
return null;
}
if (length === 1) {
return intl.formatToPlainString(t['/GCyII'], {a: closure(0)});
}
if (length === 2) {
return intl.formatToPlainString(t['2efxiV'], {a: closure(0), b: closure(1)});
}
const formatToPlainString = intl.formatToPlainString;
const o2nmbk = t.o2nmbk;
const object2 = {a: closure(0), b: closure(1)};
object2.n = a0.length - 2;
return Reflect.apply(formatToPlainString, intl, [o2nmbk, object2]);
}
function getVoiceChannelSubtitleGetName(a0) { // fn#113901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:665, owner: getVoiceChannelSubtitle.getName, offset: 0x0240abad, size: 110 bytes, params: 2, frame: 16
var r0;
var value3;
var defaultImport;
var getName;
let property = env0_0[a0];
const value2 = undefined;
const nick = property == null || property.member == null ? value2 : property.member.nick;
if (nick != null) {
r0 = nick;
} else {
value3 = environment.__proto__.__proto__.__proto__;
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
getName = defaultImport.getName;
property = env0_0[a0];
r0 = Reflect.apply(getName, defaultImport, [property == null ? value2 : property.user]);
}
return r0;
}
@@ -0,0 +1,474 @@
/* Metro module 15068; source: modules/search/native/components/list/rows/LinkGridItem.tsx; dependencies: [57, 31, 27, 1379, 4792, 9615, 33, 4501, 566, 1244, 8349, 15069, 4573, 6682, 11822, 4056, 9875, 15061, 5278, 15059, 44, 8872, 2] */
function _fun113998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:6, offset: 0x02410210, size: 364 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.useWindowDimensions;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_9 = searchConstantsModule.FILE_OR_LINK_IMAGE_BUFFER;
const env0_10 = searchConstantsModule.SearchLinkTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({iconContainer: {'alignItems': 'center',
'justifyContent': 'center'}, tapToSee: {fontStyle: 'italic'}});
value = value.memo(LinkGridItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/LinkGridItem.tsx');
exports.default = value;
}
function getLinkNodeAtIndex(a0, a1, a2) { // fn#113999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:382, offset: 0x0241037c, size: 159 bytes, params: 4, frame: 17
const env0_0 = a1;
const env0_1 = a2;
const Array = global.Array;
if (Array.isArray(a0)) {
a0.forEach(function(a0) {
getLinkNodeAtIndex(a0, require, importDefault);
return a0;
});
} else if (a0.type === 'link') {
if (a1 === 0) {
a2(a0);
} else {
getLinkNodeAtIndex(a0, a1 - 1, a2);
}
} else if (a0.type === 'channelMention') {
if (a1 === 0) {
a2(a0);
} else {
getLinkNodeAtIndex(a0, a1 - 1, a2);
}
} else if (a0.content != null) {
getLinkNodeAtIndex(a0.content, a1, a2);
}
return a0;
}
function LinkParsedGridItem({author, linkIndex, channelId, messageId, onPressSearchLink, onPressGuildVoiceChannelMention, onPress, imageStyle, containerStyle}) { // fn#114001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:618, offset: 0x0241043b, size: 813 bytes, params: 2, frame: 33
const env0_3 = messageId;
const env0_4 = onPressSearchLink;
const styles = useStyles();
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
function() {
return SearchMessageStore.getMessage(messageId);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const [property, env0_11] = env0_3(env0_4.useState(null), 2);
const value6 = env0_4.useMemo(_fun114005, [message, env0_4.useCallback(_fun114004, [linkIndex])]);
const value7 = env0_4.useMemo(_fun114006, [property, styles.tapToSee]);
const value8 = env0_4.useMemo(_fun114007, [property?.target, property?.type]);
const value9 = env0_4.useCallback(_fun114008, [channelId, messageId, property, onPress,
onPressGuildVoiceChannelMention, onPressSearchLink]);
const value10 = env0_4.useMemo(function() {
return author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]);
const value11 = env0_4.useCallback(function() {
onPress({channelId: channelId, messageId: messageId});
}, [channelId, messageId, onPress]);
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
const SearchListCardThumbnail = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardThumbnail;
const items2 = [<SearchListCardThumbnail thumbnail={<View style={[styles.iconContainer,
imageStyle]}>{value8}</View>} />];
const SearchListCardContent = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContent;
items2[1] = <SearchListCardContent label={value6} subLabel={value7} />;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const SearchListCardFooter = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardFooter;
items2[2] = <PressableHighlight onPress={value11}><SearchListCardFooter author={author} avatarSource={value10} channel={channel} /></PressableHighlight>;
return (
<SearchListCardContainer containerStyle={containerStyle} onPress={value9}>
{items2}
</SearchListCardContainer>
);
}
function LinkEmbedGridItem({embed, sources, author, channelId, messageId, onPressSearchLink, onPress, imageStyle, containerStyle}) { // fn#114011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3060, offset: 0x02410c51, size: 873 bytes, params: 2, frame: 32
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_4 = messageId;
const styles = useStyles();
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
function() {
return SearchMessageStore.getMessage(messageId);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const scale = useWindowDimensions().scale;
const url = embed.url;
let r8 = embed.rawTitle ?? embed.author?.name;
r8 = r8 ?? embed.url;
const value3 = env0_4.useMemo(_fun114014, [author.id, channelId, embed, imageStyle, messageId, scale, sources,
styles.iconContainer]);
const value4 = env0_4.useMemo(function() {
return author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]);
const value5 = env0_4.useCallback(_fun114017, [url, onPressSearchLink, r8, channelId, messageId]);
const value6 = env0_4.useCallback(function() {
onPress({channelId: channelId, messageId: messageId});
}, [channelId, messageId, onPress]);
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
const SearchListCardThumbnail = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardThumbnail;
const items2 = [<SearchListCardThumbnail thumbnail={value3} />];
const SearchListCardContent = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContent;
r8 = message == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN) : r8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <SearchListCardContent label={r8} subLabel={<Text variant="text-xs/normal" color="text-link" lineClamp={1}>{url ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}</Text>} />;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const SearchListCardFooter = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardFooter;
items2[2] = <PressableHighlight onPress={value6}><SearchListCardFooter author={author} avatarSource={value4} channel={channel} /></PressableHighlight>;
return (
<SearchListCardContainer containerStyle={containerStyle} onPress={value5}>
{items2}
</SearchListCardContainer>
);
}
function LinkGridItem({data, onPressSearchLink, onPressGuildVoiceChannelMention, onPress, imageStyle, containerStyle}) { // fn#114019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:4564, offset: 0x024111c3, size: 262 bytes, params: 2, frame: 20
const type = data.type;
const EMBED = SearchLinkTypes.EMBED;
if (EMBED === type) {
return (
<LinkEmbedGridItem
embed={data.embed}
sources={data.sources}
messageId={data.messageId}
channelId={data.channelId}
author={data.author}
linkIndex={data.linkIndex}
onPressSearchLink={onPressSearchLink}
onPress={onPress}
imageStyle={imageStyle}
containerStyle={containerStyle}
/>
);
}
const TEXT = SearchLinkTypes.TEXT;
if (TEXT === type) {
return (
<LinkParsedGridItem
messageId={data.messageId}
channelId={data.channelId}
author={data.author}
linkIndex={data.linkIndex}
onPressSearchLink={onPressSearchLink}
onPressGuildVoiceChannelMention={onPressGuildVoiceChannelMention}
onPress={onPress}
imageStyle={imageStyle}
containerStyle={containerStyle}
/>
);
}
return null;
}
function _fun114004(a0) { // fn#114004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:969, offset: 0x02410783, size: 32 bytes, params: 2, frame: 15
getLinkNodeAtIndex(a0, linkIndex, env0_11);
return a0;
}
function _fun114005() { // fn#114005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1017, offset: 0x024107a3, size: 230 bytes, params: 1, frame: 20
var intl;
if (message == null) {
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN);
}
const renderMessageMarkupModule = require(8349) /* metro dependency 8349: renderMessageMarkup */;
const renderMessageMarkupWithParser = renderMessageMarkupModule.renderMessageMarkupWithParser;
const NativeSearchResultLinkPreviewParser = (require(15069) /* metro dependency 15069: SearchResultLinkPreviewMarkup */).NativeSearchResultLinkPreviewParser;
const content = Reflect.apply(renderMessageMarkupWithParser, renderMessageMarkupModule,
[NativeSearchResultLinkPreviewParser, message, {postProcessor: env0_12}]).content;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View pointerEvents="none">
<Text
variant="text-md/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{content}
</Text>
</View>
);
}
function _fun114006() { // fn#114006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1368, offset: 0x02410889, size: 367 bytes, params: 1, frame: 20
var value3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var originalLink;
if (env0_10 == null) {
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10.type !== 'link') {
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
let target = env0_10.target;
if (target == null) {
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
target = env0_10.target;
if (target !== '') {
target = env0_10.target;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{target}
</Text>
);
}
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
function _fun114007() { // fn#114007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1900, offset: 0x024109f8, size: 216 bytes, params: 1, frame: 15
var value3;
var moduleValue;
var value;
const type = env0_10?.type;
if (type === 'channelMention') {
value = environment.__proto__;
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
return <ChatIcon size="lg" />;
}
if (type === 'link') {
value3 = environment.__proto__;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
return ((Component) => <Component size="lg" />)(moduleValue.getUrlIcon(env0_10.target));
}
value = environment.__proto__;
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
return <LinkIcon size="lg" />;
}
function _fun114008() { // fn#114008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:2184, offset: 0x02410ad0, size: 307 bytes, params: 1, frame: 15
var channelId2;
var value2;
var channel;
var onPressSearchLinkBinding;
var object2;
var binding;
var value4;
if (env0_10 == null) {
onPress({channelId: channelId, messageId: messageId});
} else if (env0_10.type === 'link') {
onPressSearchLinkBinding = onPressSearchLink;
object2 = {};
binding = env0_10;
object2.url = binding.target;
value4 = environment.__proto__;
object2.trusted = (require(9875) /* metro dependency 9875: MarkupReactLinkUtils */).isLinkTrusted(binding);
object2.messageId = messageId;
object2.channelId = channelId;
onPressSearchLinkBinding(object2);
} else if (env0_10.type === 'channelMention') {
channelId2 = env0_10.channelId;
value2 = environment.__proto__;
channel = ChannelStore.getChannel(channelId2);
if (channel == null) {
onPressSearchLink({url: env0_10.originalLink, trusted: true, messageId: messageId, channelId: channelId});
} else if (channel.isGuildVocal()) {
onPressGuildVoiceChannelMention({channelId: channelId, messageId: messageId,
mentionedChannelId: channelId2});
} else {
onPressSearchLink({url: env0_10.originalLink, trusted: true, messageId: messageId, channelId: channelId});
}
}
}
function _fun114014() { // fn#114014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3438, offset: 0x02410fef, size: 164 bytes, params: 1, frame: 17
const SearchEmbedMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchEmbedMediaImage;
const imageStyleBinding = imageStyle;
return (
<SearchEmbedMediaImage
messageId={messageId}
channelId={channelId}
authorId={author.id}
sources={sources}
embed={embed}
containerStyle={imageStyleBinding}
renderFallback={renderFallback_114015}
scale={scale}
containerHeight={imageStyleBinding.height + FILE_OR_LINK_IMAGE_BUFFER}
containerWidth={imageStyleBinding.width + FILE_OR_LINK_IMAGE_BUFFER}
/>
);
}
function _fun114017() { // fn#114017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3853, offset: 0x02411129, size: 120 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(44) /* metro dependency 44 */;
const urlBinding = url;
defaultImport(urlBinding != null, '[LinkGridItem] Embed url cannot be null');
const onPressSearchLinkBinding = onPressSearchLink;
const object2 = {url: urlBinding};
object2.trusted = (require(8872) /* metro dependency 8872: MaskedLinkUtils */).isLinkTrusted(urlBinding, env0_12);
object2.messageId = messageId;
object2.channelId = channelId;
onPressSearchLinkBinding(object2);
}
function renderFallback_114015() { // fn#114015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3564, offset: 0x02411093, size: 106 bytes, params: 1, frame: 17
const items2 = [styles.iconContainer];
items2[1] = imageStyle;
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
return (
<View style={items2}>
<LinkIcon size="md" />
</View>
);
}
@@ -0,0 +1,72 @@
/* Metro module 15062; source: modules/search/native/components/list/rows/MediaGrid.tsx; dependencies: [31, 27, 9615, 33, 4501, 15058, 11822, 8416, 15043, 2] */
function _fun113969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:6, offset: 0x0240e99e, size: 253 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const SEARCH_LIST_HORIZONTAL_PADDING = searchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const env0_5 = searchConstantsModule.MEDIA_NUM_COLUMNS;
const env0_6 = searchConstantsModule.MEDIA_ITEM_GAP_WIDTH;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {paddingLeft: SEARCH_LIST_HORIZONTAL_PADDING - 2,
paddingRight: SEARCH_LIST_HORIZONTAL_PADDING + 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/MediaGrid.tsx');
exports.default = MediaGrid;
}
function MediaGrid({media, mediaSize, onPress, animate}) { // fn#113970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:398, offset: 0x0240ea9b, size: 262 bytes, params: 2, frame: 22
const env0_3 = animate;
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useCallback(_fun113971, [media.length, mediaSize, onPress, animate]);
const value3 = binding.useMemo(_fun113972, [mediaSize, media.length]);
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const MediaVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator;
return (
<View style={styles.container}>
<FlashList
numColumns={MEDIA_NUM_COLUMNS}
data={media}
renderItem={value2}
ItemSeparatorComponent={MediaVerticalSeparator}
scrollEnabled={false}
estimatedItemSize={mediaSize}
estimatedListSize={value3}
/>
</View>
);
}
function _fun113971({item, index}) { // fn#113971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:487, offset: 0x0240eba1, size: 156 bytes, params: 2, frame: 19
const MediaGridItem = importDefault(15058) /* metro dependency 15058: MediaGridItem */;
const animateBinding = animate;
const mediaSizeBinding = mediaSize;
const onPressBinding = onPress;
const searchPlatformUtilsModule = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
const getMediaGridItemStyles = searchPlatformUtilsModule.getMediaGridItemStyles;
return (
<MediaGridItem
animate={animateBinding}
size={mediaSizeBinding}
media={item}
onPress={onPressBinding}
containerStyle={Reflect.apply(getMediaGridItemStyles, searchPlatformUtilsModule, [{itemIndex: index,
numItems: media.length, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH}])}
/>
);
}
function _fun113972() { // fn#113972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:689, offset: 0x0240ec3d, size: 115 bytes, params: 1, frame: 17
let Math = global.Math;
const min = Math.min;
const mediaBinding = media;
const value3 = Reflect.apply(min, Math, [mediaBinding.length, MEDIA_NUM_COLUMNS]);
Math = global.Math;
const value4 = Math.ceil(mediaBinding.length / value3);
const mediaSizeBinding = mediaSize;
return {width: value3 * mediaSizeBinding + (value3 - 1) * MEDIA_ITEM_GAP_WIDTH,
height: value4 * mediaSizeBinding + value4 * MEDIA_ITEM_GAP_WIDTH};
}
@@ -0,0 +1,136 @@
/* Metro module 15058; source: modules/search/native/components/list/rows/MediaGridItem.tsx; dependencies: [31, 27, 1379, 9615, 33, 4501, 697, 566, 4017, 4504, 4507, 15059, 6239, 1305, 2] */
function _fun113933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:6, offset: 0x0240cb74, size: 414 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.Pressable;
const env0_6 = value2.useWindowDimensions;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchMediaTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.overflow = 'hidden';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.backgroundColor = BORDER_SUBTLE;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [{container: object4,
avatar: {'position': 'absolute', 'top': 8, 'right': 8}, card: {padding: 0}}]);
object3 = {HIDDEN: 0};
object3[0] = 'HIDDEN';
object3.VISIBLE = 1;
object3[1] = 'VISIBLE';
object3 = {code: 'function MediaGridItemTsx1(){const{withTiming,opacity,timingStandard}=this.__closure;return{opacity:withTiming(opacity.get(),timingStandard)};}'};
value = value.memo(MediaGridItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/MediaGridItem.tsx');
exports.default = value;
}
function MediaGridItem({media, size, containerStyle, onPress, animate}) { // fn#113934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:666, offset: 0x0240cd12, size: 1212 bytes, params: 2, frame: 30
var r9;
var sources;
var channelId;
var id;
var SearchComponentMediaImage;
var unfurledMediaItem;
const styles = useStyles();
const scale = useWindowDimensions().scale;
let binding = env0_3;
const value3 = binding.useRef(null);
var env0_3 = value3;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(media.channelId);
});
const useMemo = binding.useMemo;
let author = media.author;
const value4 = Reflect.apply(useMemo, binding, [function() {
return media.author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]]);
const value5 = env0_3.useCallback(_fun113937, [media, onPress]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
binding = env0_12;
const value6 = Reflect.apply(useSharedValue, reanimatedRexportModule, [animate ? binding.HIDDEN : binding.VISIBLE]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
const closure = MediaGridItem_;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, opacity: value6,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
closure.__workletHash = 9644750191833;
closure.__initData = env0_13;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
binding = env0_3;
binding.useEffect(_fun113939, [value6]);
const value8 = binding.useMemo(function() {
var sizeBinding = size;
return {width: sizeBinding, height: sizeBinding};
}, [size]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.container, containerStyle, value8, value7];
let type = media.type;
const EMBED = SearchMediaTypes.EMBED;
const items2 = [type === EMBED && ((SearchEmbedMediaImage) => <SearchEmbedMediaImage sources={media.sources} embed={media.embed} messageId={media.messageId} channelId={media.channelId} authorId={media.author.id} scale={scale} containerHeight={size} containerWidth={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchEmbedMediaImage)];
type = media.type;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
items2[1] = type === ATTACHMENT && ((SearchAttachmentMediaImage) => <SearchAttachmentMediaImage attachment={media.attachment} channelId={media.channelId} authorId={media.author.id} scale={scale} containerHeight={size} containerWidth={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchAttachmentMediaImage);
type = media.type;
const AUDIO = SearchMediaTypes.AUDIO;
items2[2] = type === AUDIO && ((SearchSoundMediaImage) => <SearchSoundMediaImage height={size} width={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchSoundMediaImage);
type = media.type;
const COMPONENT = SearchMediaTypes.COMPONENT;
const value15 = type === COMPONENT;
if (value15) {
SearchComponentMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchComponentMediaImage;
unfurledMediaItem = media.unfurledMediaItem;
sources = media.sources;
channelId = media.channelId;
author = media.author;
id = author.id;
author = media.author;
r9 = <SearchComponentMediaImage unfurledMediaItem={unfurledMediaItem} sources={sources} channelId={channelId} authorId={id} isBot={author.bot} scale={scale} containerHeight={size} containerWidth={size} />;
} else {
r9 = value15;
}
items2[3] = r9;
items2[4] = value4 != null && <View style={styles.avatar}>{((Card) => <Card shadow="low" style={styles.card}>{((Avatar) => <Avatar source={value4} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} avatarDecoration={media.author.avatarDecoration} />)((require(1305) /* metro dependency 1305: native */).Avatar)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card)}</View>;
return (
<View2 style={items3}>
<Pressable
ref={value3}
style={value8}
accessibilityRole="button"
onPress={value5}
>
{items2}
</Pressable>
</View2>
);
}
function _fun113937() { // fn#113937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:976, offset: 0x0240d200, size: 41 bytes, params: 1, frame: 12
onPress({media: media, originView: env0_3.current});
}
function MediaGridItem_() { // fn#113938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:1102, owner: MediaGridItem._, offset: 0x0240d229, size: 78 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
object2.opacity = value.withTiming(env0_5.get(),
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard);
return object2;
}
function _fun113939() { // fn#113939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:1324, offset: 0x0240d277, size: 34 bytes, params: 1, frame: 11
const binding = env0_5;
const set = binding.set;
const VISIBLE = env1_12.VISIBLE;
Reflect.apply(set, binding, [VISIBLE]);
}
@@ -0,0 +1,242 @@
/* Metro module 15063; source: modules/search/native/components/list/rows/MessageRow.tsx; dependencies: [31, 27, 4502, 1382, 1379, 1867, 4864, 661, 33, 4501, 697, 566, 6647, 4805, 1305, 4573, 10937, 11053, 8706, 3995, 8061, 15064, 14429, 15065, 4634, 8206, 5087, 15046, 1244, 10975, 3834, 2] */
function _fun113973(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:6, offset: 0x0240ecb0, size: 552 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
value2.Platform;
const env0_4 = value2.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const favoriteStore = importDefault(1382) /* metro dependency 1382: FavoriteStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
const value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_13 = Reflect.apply(createStyles, createStylesModule, [{channelIcon: {'marginRight': 5,
'alignSelf': 'center'}, channelStatus: {'marginLeft': 5, 'alignSelf': 'center',
tintColor: INTERACTIVE_TEXT_DEFAULT}, labelContainer: {'flexDirection': 'row', 'width': '100%',
'marginBottom': 2, 'alignItems': 'center'}, authorRow: {'flexShrink': 1, 'minWidth': 0, 'flexDirection': 'row'},
timestamp: {marginLeft: 8}, header: {'flexDirection': 'row', 'marginRight': 16, 'marginBottom': 12},
body: {alignItems: 'flex-start'}, pollBadge: {marginLeft: 8}, suppressNotificationsIcon: {marginLeft: 4},
spoilerText: {fontStyle: 'italic'}}]);
value = value.memo(MessageRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/MessageRow.tsx');
exports.default = value;
}
function GuildChannelMessageRowHeader({channel, muted, isFavorite}) { // fn#113974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:766, offset: 0x0240eed8, size: 594 bytes, params: 2, frame: 27
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var r5;
var value;
const styles = useStyles();
const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel,
{isRulesChannel: (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore],
_fun113975) === channel.id});
const value4 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const items2 = [<Icon source={channelIcon} size={REFRESH_SMALL_16} style={styles.channelIcon} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text lineClamp={1} variant="text-sm/semibold" color="interactive-text-default">{value4}</Text>;
items2[2] = muted && <Icon source={importDefault(10937) /* metro dependency 10937 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />;
items2[3] = isFavorite && <Icon source={importDefault(11053) /* metro dependency 11053 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />;
const isSystemDM2 = channel.isSystemDM();
if (isSystemDM2) {
value = importDefault(8706) /* metro dependency 8706: BotTag */;
value = ((Component) => <Component type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.SYSTEM_DM} verified />)(value);
r5 = value;
} else {
r5 = isSystemDM2;
}
items2[4] = r5;
return (
<View style={styles.header}>
{items2}
</View>
);
}
function MessageRowIcon({message, channel}) { // fn#113976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1528, offset: 0x0240f15b, size: 119 bytes, params: 2, frame: 19
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {user: message.author, guildId: channel.guild_id};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
avatarProps.size = LARGE_48;
avatarProps.avatarDecoration = message.author.avatarDecoration;
return <Avatar {...avatarProps} />;
}
function PrivateChannelMessageRowLabel({message, channel, muted}) { // fn#113977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1714, offset: 0x0240f1d2, size: 675 bytes, params: 2, frame: 33
var r5;
var value;
const styles = useStyles();
const value2 = env0_3.useMemo(_fun113978, [message.author]);
env0_3.useEffect(function() {
if (channel.isDM() || channel.isGroupDM()) {
channel.recipients.forEach(_fun113980);
}
}, [channel]);
const {timestamp,
timestampAccessibilityLabel} = (require(15064) /* metro dependency 15064: useSearchMessageTimestamp */).useSearchMessageTimestamp(message,
channel);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items3 = [<Text lineClamp={1} variant="text-md/semibold" color="interactive-text-active">{value2}</Text>];
items3[1] = muted && ((Icon) => <Icon source={importDefault(10937) /* metro dependency 10937 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />)((require(1305) /* metro dependency 1305: native */).Icon);
items3[2] = channel.isSystemDM() && ((Component) => <Component type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.SYSTEM_DM} verified />)(importDefault(8706) /* metro dependency 8706: BotTag */);
const items2 = [<View style={styles.authorRow}>{items3}</View>];
items2[1] = <Text variant="text-xs/medium" color="interactive-text-active" lineClamp={1} style={styles.timestamp} accessibilityLabel={timestampAccessibilityLabel}>{timestamp}</Text>;
const hasFlag = message.hasFlag;
const SUPPRESS_NOTIFICATIONS = MessageFlags.SUPPRESS_NOTIFICATIONS;
items2[2] = Reflect.apply(hasFlag, message,
[SUPPRESS_NOTIFICATIONS]) ? ((BellZIcon) => <BellZIcon size="xs" style={styles.suppressNotificationsIcon} />)((require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon) : null;
if (message.isPoll()) {
value = importDefault(15065) /* metro dependency 15065: PollBadge */;
value = ((Component) => <Component style={styles.pollBadge} />)(value);
r5 = value;
} else {
r5 = null;
}
items2[3] = r5;
return (
<View style={styles.labelContainer}>
{items2}
</View>
);
}
function GuildChannelMessageRowLabel({message, channel}) { // fn#113981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:2691, offset: 0x0240f517, size: 696 bytes, params: 2, frame: 34
var r5;
var value;
const styles = useStyles();
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const {nick, colorString,
colorStrings} = (importDefault(4634) /* metro dependency 4634: useMessageAuthor */)(message);
const r18 = roleStyle !== 'username' ? {} : colorString != null ? {color: colorString} : {};
const value4 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(colorStrings);
const value5 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useIsRoleStyleAndRoleColorsEligibleForERC(channel.guild_id,
message.author.id, roleStyle, value4);
const {timestamp,
timestampAccessibilityLabel} = (require(15064) /* metro dependency 15064: useSearchMessageTimestamp */).useSearchMessageTimestamp(message,
channel);
const r13 = roleStyle === 'dot' && colorString != null && ((RoleDot) => <RoleDot size="small" color={colorString} colors={colorStrings} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<View style={styles.authorRow}>{r13}<Text variant="text-sm/semibold" color="interactive-text-active" lineClamp={1} style={r18} gradientColors={value5 ? value4 : undefined}>{nick}</Text></View>];
items2[1] = <Text variant="text-xs/medium" color="text-default" lineClamp={1} style={styles.timestamp} accessibilityLabel={timestampAccessibilityLabel}>{timestamp}</Text>;
const hasFlag = message.hasFlag;
const SUPPRESS_NOTIFICATIONS = MessageFlags.SUPPRESS_NOTIFICATIONS;
items2[2] = Reflect.apply(hasFlag, message,
[SUPPRESS_NOTIFICATIONS]) ? ((BellZIcon) => <BellZIcon size="xs" style={styles.suppressNotificationsIcon} />)((require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon) : null;
if (message.isPoll()) {
value = importDefault(15065) /* metro dependency 15065: PollBadge */;
value = ((Component) => <Component style={styles.pollBadge} />)(value);
r5 = value;
} else {
r5 = null;
}
items2[3] = r5;
return (
<View style={styles.labelContainer}>
{items2}
</View>
);
}
function MessageRow({message, onPress, lineClamp, messageSizeCacheRef}) { // fn#113983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:3709, offset: 0x0240f7cf, size: 720 bytes, params: 2, frame: 28
var r7;
var r0;
var SearchListRow;
var Text;
var intl;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(message.channel_id);
});
const env0_3 = channel?.guild_id;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([FavoriteStore], _fun113985);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
function() {
return UserGuildSettingsStore.isChannelMuted(guild_id, message.channel_id);
});
const value6 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel);
let binding = env0_3;
const value7 = binding.useCallback(function() {
var onPressBinding = onPress;
var messageBinding = message;
onPressBinding({channelId: messageBinding.channel_id, messageId: messageBinding.id});
}, [message.channel_id, message.id, onPress]);
binding = env0_3;
let useMemo = binding.useMemo;
const value8 = Reflect.apply(useMemo, binding, [function() {
var r0;
r0 = channel?.guild_id;
r0 = r0 == null ? PrivateChannelMessageRowLabel : GuildChannelMessageRowLabel;
return r0;
}, [channel?.guild_id]]);
binding = env0_3;
useMemo = binding.useMemo;
if (channel == null) {
r0 = null;
} else {
SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
var searchListRowProps = {header: Reflect.apply(useMemo, binding, [_fun113989, [channel, value4, value5]]),
icon: <MessageRowIcon message={message} channel={channel} />,
label: ((Component) => <Component message={message} channel={channel} muted={value5} />)(value8)};
if (value6) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-sm/normal', 'color': 'text-muted', style: styles.spoilerText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uaI/7'])}</Text>;
} else {
const NativeMessageChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeMessageChannelRowPreview;
r7 = <NativeMessageChannelRowPreview message={message} channel={channel} muted={false} layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COZY} color="interactive-text-default" lineClamp={lineClamp} messageSizeCacheRef={messageSizeCacheRef} />;
}
searchListRowProps.subLabel = r7;
searchListRowProps.onPress = value7;
searchListRowProps.bodyStyle = styles.body;
r0 = <SearchListRow {...searchListRowProps} />;
}
return r0;
}
function _fun113975() { // fn#113975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:883, offset: 0x0240f12a, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return GuildStore.getGuild(channel.guild_id)?.rulesChannelId;
}
function _fun113978() { // fn#113978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1807, offset: 0x0240f475, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(message.author);
}
function _fun113979() { // fn#113979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1864, offset: 0x0240f4a8, size: 70 bytes, params: 1, frame: 12
if (channel.isDM() || channel.isGroupDM()) {
channel.recipients.forEach(_fun113980);
}
}
function _fun113985() { // fn#113985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:3927, offset: 0x0240fa9f, size: 45 bytes, params: 1, frame: 12
return guild_id != null && FavoriteStore.isFavorite(message.channel_id);
}
function _fun113989() { // fn#113989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:4324, offset: 0x0240fb4a, size: 85 bytes, params: 1, frame: 16
const channelBinding = channel;
const value2 = null;
return value2 != (value2 == channelBinding ? undefined : channel.guild_id) ? <GuildChannelMessageRowHeader channel={channel} muted={env0_5} isFavorite={env0_4} /> : value2;
}
function _fun113980(a0) { // fn#113980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1918, offset: 0x0240f4ee, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (require(8061) /* metro dependency 8061: UserActionCreators */).getUser(a0);
}
@@ -0,0 +1,303 @@
/* Metro module 15048; source: modules/search/native/components/list/rows/SearchHistoryRow.tsx; dependencies: [5, 31, 27, 1379, 4605, 1878, 9615, 33, 4501, 697, 11828, 5278, 5312, 15036, 9673, 15046, 4573, 6998, 632, 15047, 8061, 4603, 15045, 15049, 15057, 1244, 2] */
function _fun113866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:6, offset: 0x024098e9, size: 571 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchHistoryItemTypes;
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 */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'height': 48, 'width': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object3.iconContainer = object4;
object3.text = {flexShrink: 1};
object3.textContainer = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 2};
object3.textIconContainer = {alignSelf: 'flex-start'};
const object6 = {'paddingHorizontal': 8, 'paddingVertical': 4, 'borderRadius': null, 'overflow': 'hidden',
'margin': 2, 'flexDirection': 'row', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.tag = object6;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_13 = [];
value = value.memo(_fun113895);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/SearchHistoryRow.tsx');
exports.default = value;
}
function SearchHistoryRemoveIcon({searchContext, searchHistoryItem}) { // fn#113867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:748, offset: 0x02409b24, size: 201 bytes, params: 2, frame: 18
const value2 = env0_4.useCallback(_fun113868, [searchContext, searchHistoryItem]);
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<PressableHighlight
onPress={value2}
accessibilityRole="button"
unstable_pressDelay={130}
style={{marginLeft: 16}}
hitSlop={{'bottom': 16, 'left': 16, 'right': 16, 'top': 16}}
>
<XSmallIcon size="sm" color="interactive-text-default" />
</PressableHighlight>
);
}
function SearchHistoryTextRow({searchContext, searchHistoryItem}) { // fn#113869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1137, offset: 0x02409c1f, size: 447 bytes, params: 2, frame: 28
var object2;
const styles = useStyles();
const value4 = env0_4.useCallback(_fun113870,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressSearchHistoryText({searchContext: searchContext}),
searchContext, searchHistoryItem.tags, searchHistoryItem.text, searchHistoryItem.type]);
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
object2 = {};
const r8 = searchHistoryItem.tags?.map(_fun113871);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
object2.label = <View style={styles.textContainer}>{r8}<Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary" style={styles.text}>{searchHistoryItem.text}</Text></View>;
object2.onPress = value4;
object2.trailing = <SearchHistoryRemoveIcon searchContext={searchContext} searchHistoryItem={searchHistoryItem} />;
object2.iconContainerStyle = styles.textIconContainer;
const MagnifyingGlassIcon = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object2.icon = <View style={styles.iconContainer}><MagnifyingGlassIcon size="sm" color="interactive-text-default" /></View>;
return <SearchListRow {...object2} />;
}
function SearchHistoryGroupDMRow({searchContext, searchHistoryItem}) { // fn#113872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2083, offset: 0x02409eab, size: 293 bytes, params: 2, frame: 21
var r0;
var value;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
env0_4.useEffect(_fun113874, [channel, searchContext, searchHistoryItem]);
const value3 = env0_4.useCallback(_fun113875,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGroupDMItem({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (channel == null) {
r0 = null;
} else {
value = importDefault(15047) /* metro dependency 15047: GroupDMRow */;
value = ((Component) => <Component channel={channel} onPress={value3} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
}
function SearchHistoryDMRow({searchContext, searchHistoryItem}) { // fn#113876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2712, offset: 0x0240a060, size: 290 bytes, params: 2, frame: 21
var r0;
var value;
const user = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getUser(searchHistoryItem.userId);
});
const binding = env0_4;
const useEffect = binding.useEffect;
const userId = searchHistoryItem.userId;
Reflect.apply(useEffect, binding, [_fun113878, [userId]]);
const value4 = env0_4.useCallback(_fun113879(),
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressDMItem({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (user == null) {
r0 = null;
} else {
value = importDefault(15045) /* metro dependency 15045: DMRow */;
value = ((Component) => <Component user={user} onPress={value4} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
}
function SearchHistoryGuildVoiceChannelRow({searchContext, searchHistoryItem}) { // fn#113883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:3448, offset: 0x0240a290, size: 299 bytes, params: 2, frame: 21
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
let binding = env0_4;
binding.useEffect(_fun113885, [channel, searchContext, searchHistoryItem]);
const value2 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
binding = env0_4;
const useCallback = binding.useCallback;
return channel == null ? null : ((Component) => <Component channel={channel} voiceStates={env0_13} speakerVoiceStates={env0_13} trailing={<SearchHistoryRemoveIcon searchContext={searchContext} searchHistoryItem={searchHistoryItem} />} onPress={Reflect.apply(useCallback,
binding, [_fun113886, [value2, searchContext,
searchHistoryItem.type]])} />)(importDefault(15049) /* metro dependency 15049: GuildVoiceOrStageChannelRow */);
}
function SearchHistoryGuildTextChannelRow({searchContext, searchHistoryItem}) { // fn#113887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4039, offset: 0x0240a3bb, size: 337 bytes, params: 2, frame: 22
var r0;
var value;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
env0_4.useEffect(_fun113889, [channel, searchContext, searchHistoryItem]);
let value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ReadStateStore],
function() {
var r1;
var value2 = ReadStateStore.lastMessageId(searchHistoryItem.channelId);
var value3 = null;
r1 = value3 != value2 ? value2 : value3 == channel ? undefined : channel.lastMessageId;
return value3 != r1 ? r1 : value3;
});
const value4 = env0_4.useCallback(_fun113891,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildTextChannel({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (channel == null) {
r0 = null;
} else {
value = importDefault(15057) /* metro dependency 15057: GuildTextChannelRow */;
value = ((Component) => <Component channel={channel} lastMessageId={value2} onPress={value4} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
}
function useClearableSearchHistoryRowProps(a0, a1) { // fn#113892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4845, offset: 0x0240a558, size: 126 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const object2 = {};
object2.accessibilityActions = env0_4.useMemo(function() {
var object = {name: 'remove'};
object.label = require(dependencyMap[25]).intl.string(require(dependencyMap[25]).t.Ov3VO7);
return [object];
}, []);
object2.onAccessibilityAction = env0_4.useCallback(_fun113894, [a0, a1]);
object2.trailing = <SearchHistoryRemoveIcon searchContext={a0} searchHistoryItem={a1} />;
return object2;
}
function _fun113895(a0) { // fn#113895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:5219, offset: 0x0240a677, size: 314 bytes, params: 2, frame: 17
const searchHistoryItem = a0.searchHistoryItem;
const value = Object.create(null);
value.searchHistoryItem = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const type = searchHistoryItem.type;
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return <SearchHistoryGroupDMRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const DM = SearchHistoryItemTypes.DM;
if (DM === type) {
return <SearchHistoryDMRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const TEXT = SearchHistoryItemTypes.TEXT;
if (TEXT === type) {
return <SearchHistoryTextRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return <SearchHistoryGuildTextChannelRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return <SearchHistoryGuildVoiceChannelRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
return null;
}
function _fun113868() { // fn#113868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:841, offset: 0x02409bed, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
value.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
function _fun113870() { // fn#113870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1293, offset: 0x02409dde, size: 87 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchHistoryClicked = value.trackSearchHistoryClicked;
const searchHistoryItemBinding = searchHistoryItem;
Reflect.apply(trackSearchHistoryClicked, value, [{searchContext: searchContext,
searchHistoryItemType: searchHistoryItemBinding.type}]);
env0_3(searchHistoryItemBinding.text, searchHistoryItemBinding.tags);
}
function _fun113871(a0) { // fn#113871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1535, offset: 0x02409e35, size: 118 bytes, params: 2, frame: 19
const viewBindingProps = {accessibilityRole: 'button', style: styles.tag};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View {...viewBindingProps} key={a0.text}>
<Text
lineClamp={1}
variant="text-sm/semibold"
color="mobile-text-heading-primary"
>
{a0.text}
</Text>
</View>
);
}
function _fun113874() { // fn#113874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2239, offset: 0x02409fd0, size: 62 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (channel == null) {
value2 = environment.__proto__;
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
defaultImport.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
}
function _fun113875(a0) { // fn#113875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2375, offset: 0x0240a00e, size: 82 bytes, params: 2, frame: 15
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchHistoryClicked({searchContext: searchContext,
channelId: a0, searchHistoryItemType: searchHistoryItem.type});
env0_3(a0);
}
function _fun113878() { // fn#113878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2857, offset: 0x0240a1a2, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(8061) /* metro dependency 8061: UserActionCreators */;
const getUser = value.getUser;
const userId = searchHistoryItem.userId;
Reflect.apply(getUser, value, [userId]);
}
function _fun113879() { // fn#113879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2970, offset: 0x0240a1d4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun113881);
return _fun113882;
}
function _fun113894({nativeEvent}) { // fn#113894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:5042, offset: 0x0240a62c, size: 75 bytes, params: 2, frame: 13
var value;
if (nativeEvent.actionName === 'remove') {
value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
value.removeSearchHistoryItem(env0_0, require);
}
}
function* _fun113881(a0) { // fn#113881, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2990, offset: 0x0240a203, size: 141 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[21]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
}
value = env3_1(env3_2[14]);
value.trackSearchHistoryClicked({searchContext: require, channelId: value4,
searchHistoryItemType: importDefault.type});
dependencyMap(a0, value4);
}
}
@@ -0,0 +1,31 @@
/* Metro module 15043; source: modules/search/native/components/list/rows/Separators.tsx; dependencies: [31, 27, 9615, 33, 4501, 2] */
function _fun113836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:6, offset: 0x02407c48, size: 255 bytes, params: 8, frame: 22
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 {MEDIA_ITEM_GAP_WIDTH, FILES_OR_LINKS_GAP_WIDTH} = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const env0_2 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({filesOrLinksSeparator: {height: FILES_OR_LINKS_GAP_WIDTH},
mediaSeparator: {height: MEDIA_ITEM_GAP_WIDTH}, messageSeparator: {height: 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/Separators.tsx');
exports.MessageVerticalSeparator = MessageVerticalSeparator;
exports.MediaVerticalSeparator = MediaVerticalSeparator;
exports.CardVerticalSeparator = CardVerticalSeparator;
}
function MessageVerticalSeparator() { // fn#113837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:428, offset: 0x02407d47, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.messageSeparator} />;
}
function MediaVerticalSeparator() { // fn#113838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:539, offset: 0x02407d70, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.mediaSeparator} />;
}
function CardVerticalSeparator() { // fn#113839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:645, offset: 0x02407d99, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.filesOrLinksSeparator} />;
}
@@ -0,0 +1,94 @@
/* Metro module 15224; source: modules/search/native/components/navigator/SearchNavigator.tsx; dependencies: [31, 27, 9614, 15037, 661, 33, 4501, 697, 9884, 5280, 9673, 1585, 15225, 9603, 15220, 15221, 2] */
function _fun116463(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:6, offset: 0x0248a5c0, size: 339 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchEntrypointAnalyticsLocations;
const env0_6 = (require(15037) /* metro dependency 15037: SearchNavigatorConstants */).SearchNavigatorScreens;
const env0_7 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1,
backgroundColor: BACKGROUND_BASE_LOWEST}}]);
const env0_11 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
value = value.memo(_fun116464);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigator.tsx');
exports.default = value;
}
function _fun116464(a0) { // fn#116464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:396, offset: 0x0248a713, size: 367 bytes, params: 2, frame: 23
const searchContext = a0.route.params.searchContext;
const value2 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
let binding = env0_3;
binding.useEffect(function() {
importDefault(dependencyMap[10]).trackSearchOpened({searchContext: searchContext,
searchLocation: searchContext.type === SearchTypes.GUILD ? SearchEntrypointAnalyticsLocations.GUILD : SearchEntrypointAnalyticsLocations.DM_LIST});
return _fun116466;
}, [searchContext]);
const styles = useStyles();
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.container];
items2[1] = {paddingLeft: left, paddingRight: right};
binding = env0_11;
const Navigator = binding.Navigator;
const object = {};
copyDataProperties(object, value2, searchContext);
let Screen = binding.Screen;
const SEARCH_TABS = SearchNavigatorScreens.SEARCH_TABS;
const screen = <Screen initialParams={{searchContext: searchContext}} name={SEARCH_TABS} options={{'headerShown': false,
'fullScreenGestureEnabled': true}} getComponent={function() {
return require(dependencyMap[12]).default;
}} />;
Screen = binding.Screen;
const SEARCH_CHAT_PREVIEW = SearchNavigatorScreens.SEARCH_CHAT_PREVIEW;
return (
<View style={items2}>
<Navigator id="search-navigator" screenOptions={object}>
{screen}
<Screen
name={SEARCH_CHAT_PREVIEW}
options={options_116468}
getComponent={function() {
return require(dependencyMap[15]).default;
}}
/>
</Navigator>
</View>
);
}
function _fun116465() { // fn#116465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:505, offset: 0x0248a882, size: 111 bytes, params: 1, frame: 13
const type = searchContext.type;
const GUILD = SearchTypes.GUILD;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchOpened({searchContext: searchContext,
searchLocation: type === GUILD ? SearchEntrypointAnalyticsLocations.GUILD : SearchEntrypointAnalyticsLocations.DM_LIST});
return _fun116466;
}
function options_116468({route, navigation}) { // fn#116468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:1061, offset: 0x0248a945, size: 109 bytes, params: 2, frame: 17
var environment;
const object2 = {headerShown: true};
const value = environment.__proto__;
object2.header = (require(9603) /* metro dependency 9603: HeaderShared */).renderHeader;
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderBackImage(navigation);
object2.headerTitle = headerTitle_116469;
object2.fullScreenGestureEnabled = true;
return object2;
}
function _fun116466() { // fn#116466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:621, offset: 0x0248a8f1, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchClosed({searchContext: searchContext});
}
function options_116468HeaderTitle() { // fn#116469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:1187, owner: options_116468.headerTitle, offset: 0x0248a9b2, size: 61 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
return ((Component) => <Component channelId={route.params.channelId} />)(importDefault(15220) /* metro dependency 15220: SearchNavigatorPreviewHeader */);
}
@@ -0,0 +1,8 @@
/* Metro module 15037; source: modules/search/native/components/navigator/SearchNavigatorConstants.tsx; dependencies: [2] */
function _fun113815(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15234:6, offset: 0x02406f29, size: 104 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorConstants.tsx');
exports.SearchNavigatorScreens = {SEARCH_TABS: 'search_tabs', SEARCH_CHAT_PREVIEW: 'search_chat_preview'};
}
@@ -0,0 +1,23 @@
/* Metro module 15220; source: modules/search/native/components/navigator/SearchNavigatorPreviewHeader.tsx; dependencies: [31, 27, 33, 4501, 9709, 2] */
function _fun116434(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15417:6, offset: 0x02489258, size: 211 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexShrink': 1,
'paddingRight': 12, 'flexDirection': 'row', 'alignItems': 'center'}});
value = value.memo(_fun116435);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorPreviewHeader.tsx');
exports.default = value;
}
function _fun116435({channelId}) { // fn#116435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15417:252, offset: 0x0248932b, size: 98 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={styles.container}>
{((Component) => <Component channelId={channelId} screenIndex="none" pressable={false} isGuildMemberCountVisible={false} isNavigationScreen />)(importDefault(9709) /* metro dependency 9709: ChannelHeader */)}
</View>
);
}
@@ -0,0 +1,95 @@
/* Metro module 15221; source: modules/search/native/components/navigator/SearchNavigatorPreviewScreen.tsx; dependencies: [31, 27, 661, 33, 4501, 1484, 1487, 1478, 9673, 15182, 2] */
function _fun116436(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:6, offset: 0x0248938d, size: 233 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorPreviewScreen.tsx');
exports.default = SearchNavigatorPreviewScreen;
}
function SearchNavigatorPreviewScreen() { // fn#116437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:341, offset: 0x02489476, size: 420 bytes, params: 1, frame: 22
var container;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(1487) /* metro dependency 1487 */).useRoute();
const channelId = value3.params.channelId;
const searchContext = value3.params.searchContext;
const onBeforeJumpToMessage = value3.params.onBeforeJumpToMessage;
const env0_3 = onBeforeJumpToMessage;
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const binding = env0_3;
const useCallback = binding.useCallback;
let object = [searchContext, channelId, onBeforeJumpToMessage, value2];
const value4 = Reflect.apply(useCallback, binding, [_fun116438, object]);
const value5 = binding.useMemo(function() {
return {width: width};
}, [width]);
const type = searchContext.type;
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
object = {'horizontal': true, 'scrollEnabled': false, 'bounces': false};
container = styles.container;
object.style = [container, value5];
container = styles.container;
return (
<ScrollView {...object}>
<View style={[container, value5]}>
{((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */)}
</View>
</ScrollView>
);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
object = {'horizontal': true, 'scrollEnabled': false, 'bounces': false};
container = styles.container;
object.style = [container, value5];
container = styles.container;
return (
<ScrollView {...object}>
<View style={[container, value5]}>
{((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */)}
</View>
</ScrollView>
);
}
return ((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */);
}
function _fun116438() { // fn#116438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:552, offset: 0x0248961a, size: 159 bytes, params: 1, frame: 15
let value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchJumpToMessage({searchContext: searchContext,
channelId: channelId});
if (onBeforeJumpToMessage != null) {
onBeforeJumpToMessage();
}
const type = searchContext.type;
const DMS = SearchTypes.DMS;
if (DMS !== type) {
var GUILD = SearchTypes.GUILD;
if (GUILD === type) {
value = env0_0.getParent();
if (value == null) {
return undefined;
}
value.goBack();
return undefined;
}
var CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL !== type) {
return undefined;
}
}
value = env0_0.getParent();
if (value != null) {
value.goBack();
}
}
@@ -0,0 +1,79 @@
/* Metro module 15225; source: modules/search/native/components/navigator/SearchNavigatorScreen.tsx; dependencies: [31, 27, 33, 4501, 697, 15017, 4012, 15226, 5278, 1244, 5284, 7704, 14380, 15019, 15030, 2] */
function _fun116471(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:6, offset: 0x0248a9ef, size: 338 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrapper = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.tabs = {flex: 1, marginTop: PX_16};
const object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.marginLeft = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.marginRight = PX_12;
object2.back = object3;
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorScreen.tsx');
exports.default = SearchNavigatorScreen;
}
function SearchNavigatorScreen(a0) { // fn#116472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:482, offset: 0x0248ab41, size: 450 bytes, params: 2, frame: 31
const navigation = a0.navigation;
const searchContext = a0.route.params.searchContext;
const styles = useStyles();
const {gesture, dismissed, setDismissed,
onLayoutMeasure} = (require(15017) /* metro dependency 15017: useSearchSuggestionsGesture */).useSearchSuggestionsGesture(searchContext);
const width = (importDefault(4012) /* metro dependency 4012: useBaseAppContainerDimensions */)().width;
const value3 = (importDefault(15226) /* metro dependency 15226: useSearchLayoutInsetTop */)();
const value4 = env0_3.useMemo(_fun116473, [navigation.goBack, styles.back]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const value5 = ((Component) => <Component absolute wide tall />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const NonCollapsableGestureDetector = (require(14380) /* metro dependency 14380: NonCollapsableGestureDetector */).NonCollapsableGestureDetector;
const items2 = [styles.wrapper];
items2[1] = {paddingTop: value3};
let value = importDefault(15019) /* metro dependency 15019: SearchScreenSearchBar */;
value = ((Component) => <Component searchContext={searchContext} suggestionsDismissed={dismissed} setSuggestionsDismissed={setDismissed} onSuggestionsLayoutMesure={onLayoutMeasure} backButton={value4} />)(value);
return (
<>
{value5}
<NonCollapsableGestureDetector gesture={gesture}>
<View style={items2}>
{value}
<View style={styles.tabs}>
{((Component) => <Component searchContext={searchContext} width={width} />)(importDefault(15030) /* metro dependency 15030: SearchScreenLayout */)}
</View>
</View>
</NonCollapsableGestureDetector>
</>
);
}
function _fun116473() { // fn#116473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:719, offset: 0x0248ad03, size: 212 bytes, params: 1, frame: 22
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.back};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
pressableOpacityProps.accessibilityRole = 'button';
pressableOpacityProps.onPress = navigation.goBack;
const ArrowLargeLeftIcon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
return (
<View>
<PressableOpacity {...pressableOpacityProps}>
<ArrowLargeLeftIcon color={INTERACTIVE_TEXT_DEFAULT} />
</PressableOpacity>
</View>
);
}
@@ -0,0 +1,31 @@
/* Metro module 15110; source: modules/search/native/components/tabs/SearchTabsGradient.tsx; dependencies: [31, 33, 3860, 697, 4000, 12055, 2] */
function _fun115160(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:6, offset: 0x02456087, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsGradient.tsx');
exports.default = SearchTabsGradient;
}
function SearchTabsGradient({state}) { // fn#115161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:224, offset: 0x02456115, size: 68 bytes, params: 2, frame: 16
return ((Component) => <Component state={state} colors={SearchTabsGradientUseGradientColors()} />)(importDefault(12055) /* metro dependency 12055: TabsGradientNative */);
}
function SearchTabsGradientUseGradientColors() { // fn#115162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:269, owner: SearchTabsGradient.useGradientColors, offset: 0x02456159, size: 101 bytes, params: 1, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
return env1_3.useMemo(_fun115163, [Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW])]);
}
function _fun115163() { // fn#115163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:375, offset: 0x024561be, size: 60 bytes, params: 1, frame: 14
const binding = env0_0;
const items2 = [binding];
let value = environment.__proto__.__proto__;
value = require(4000) /* metro dependency 4000: ColorUtils */;
items2[1] = value.hexWithOpacity(binding, 0);
return items2;
}
@@ -0,0 +1,323 @@
/* Metro module 15031; source: modules/search/native/components/tabs/SearchTabsLayout.tsx; dependencies: [31, 27, 4792, 9674, 11829, 9615, 661, 33, 4501, 22, 9673, 15032, 1244, 9675, 15033, 9688, 11822, 15108, 15015, 5321, 4017, 11828, 9682, 9683, 1239, 15109, 15110, 8861, 566, 15111, 15112, 15113, 15114, 2] */
function _fun113670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:6, offset: 0x02402dd2, size: 473 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchTabsLayoutStore = importDefault(11829) /* metro dependency 11829: SearchTabsLayoutStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_8 = searchConstantsModule.MESSAGE_SEARCH_RESULT_TABS_SET;
const env0_9 = searchConstantsModule.SEARCH_MESSAGE_TAB_SENTINEL;
const env0_10 = searchConstantsModule.SearchTabs;
const env0_11 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const env0_14 = value3.Fragment;
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({controls: {'flex': 0,
'minHeight': 32}, pages: {flex: 1}});
const env0_16 = (require(22) /* metro dependency 22 */).debounce(_fun113673, 500);
object = {code: 'function SearchTabsLayoutTsx1({contentOffset:contentOffset}){const{isDragging,disallowMemberListGesture}=this.__closure;var _disallowMemberListGe;isDragging.set(true);(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(contentOffset.x>0);}'};
object = {code: 'function SearchTabsLayoutTsx2(){const{isDragging,disallowMemberListGesture}=this.__closure;var _disallowMemberListGe;isDragging.set(false);(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(false);}'};
object = {code: 'function SearchTabsLayoutTsx3({contentOffset:contentOffset}){const{isDragging,disallowMemberListGesture}=this.__closure;if(isDragging.get()){var _disallowMemberListGe;(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(contentOffset.x>0);}}'};
const env0_20 = value.memo(_fun113674);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsLayout.tsx');
exports.default = ConnectedSearchTabsLayout;
}
function NoSearchResultsScreen({searchContext}) { // fn#113671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:462, offset: 0x02402fab, size: 139 bytes, params: 2, frame: 18
env0_3.useEffect(_fun113672, [searchContext]);
const ErrorScreen = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const V6nAfF = (require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF;
return <ErrorScreen text={Reflect.apply(string, intl, [V6nAfF])} />;
}
function _fun113673(a0) { // fn#113673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:402, offset: 0x0240306a, size: 48 bytes, params: 2, frame: 12
return (importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchTabSelected({searchContext: a0});
}
function _fun113674({searchContext, visibleTabs, visibleTabCounts, width}) { // fn#113674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1574, offset: 0x0240309a, size: 1147 bytes, params: 2, frame: 33
var r19;
var r0;
var jsxRuntimeEnv0_14Binding;
var items3;
var Provider;
var object;
var SegmentedControlPages;
var object2;
const env0_3 = width;
let value = undefined;
const styles = useStyles();
let binding = env0_3;
const value3 = binding.useMemo(function() {
visibleTabs.forEach(_fun113676);
return [];
}, [visibleTabCounts, visibleTabs, searchContext, width]);
binding = env0_3;
let useCallback = binding.useCallback;
const {segmentedControlState,
selectedTab} = (require(15108) /* metro dependency 15108: useSearchSegmentedControlState */).useSearchSegmentedControlState({items: value3,
visibleTabs: visibleTabs, onSelectedTabChange: Reflect.apply(useCallback, binding, [_fun113677,
[searchContext]]), width: width});
const setActiveIndex = segmentedControlState.setActiveIndex;
const value7 = env0_3.useMemo(_fun113685, [useSelectMediaTab({searchTabs: visibleTabs,
setActiveIndex: setActiveIndex}), selectedTab]);
binding = env0_3;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
const {gesture, disallowGesture, channelId, screenIndex} = value8 ?? ({});
const value9 = env0_3.useMemo(_fun113686, [gesture]);
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
binding = env0_3;
useCallback = binding.useCallback;
let closure = D_113687;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 766628353255;
closure.__initData = env0_17;
const value11 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = env0_3;
useCallback = binding.useCallback;
closure = G_113688;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 5683301645106;
closure.__initData = env0_18;
const value12 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = env0_3;
useCallback = binding.useCallback;
closure = A_113689;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 229712012692;
closure.__initData = env0_19;
const value13 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
const value14 = env0_3.useCallback(_fun113690, [searchContext]);
env0_3.useEffect(_fun113691, [value8, value14]);
env0_3.useEffect(_fun113693, [channelId, screenIndex, setActiveIndex, value8, value14]);
if (segmentedControlState.items.length === 0) {
r0 = <NoSearchResultsScreen searchContext={searchContext} />;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [<View style={styles.controls}>{((Component) => <Component state={segmentedControlState} />)(importDefault(15109) /* metro dependency 15109: SearchTabsTransitionGroup */)}{((Component) => <Component state={segmentedControlState} />)(importDefault(15110) /* metro dependency 15110: SearchTabsGradient */)}</View>];
var viewBindingProps2 = {style: styles.pages};
Provider = (require(15033) /* metro dependency 15033: SearchTabsPage */).SearchTabsPageContext.Provider;
object = {value: value7};
SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
object2 = {state: segmentedControlState, bounces: value8 == null, nativeGesture: value9};
r19 = value8 != null ? value11 : value;
object2.onBeginDragWorklet = r19;
r19 = value8 != null ? value12 : value;
object2.onEndDragWorklet = r19;
object2.onScrollWorklet = value8 != null ? value13 : value;
items3[1] = <View {...viewBindingProps2}><Provider {...object}><SegmentedControlPages {...object2} /></Provider></View>;
value = <>{items3}</>;
r0 = value;
}
return r0;
}
function ConnectedSearchTabsLayout({searchContext, width}) { // fn#113696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4546, offset: 0x02403a5f, size: 347 bytes, params: 2, frame: 24
const {visibleTabs, visibleTabCounts,
candidateTabs} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchTabsLayoutStore],
function() {
var object = {};
var searchContextBinding = searchContext;
object.visibleTabs = SearchTabsLayoutStore.getVisibleTabs(searchContextBinding);
object.visibleTabCounts = SearchTabsLayoutStore.getVisibleTabCounts(searchContextBinding);
object.candidateTabs = SearchTabsLayoutStore.getCandidateTabs(searchContextBinding);
return object;
}, [searchContext]);
const value3 = env0_3.useMemo(_fun113698, [candidateTabs]);
const useAutoSearchGuildChannelTabModule = require(15111) /* metro dependency 15111: useAutoSearchGuildChannelTab */;
const useAutoSearchGuildChannelTab = useAutoSearchGuildChannelTabModule.useAutoSearchGuildChannelTab;
let has = value3.has;
const GUILD_CHANNELS = SearchTabs.GUILD_CHANNELS;
Reflect.apply(useAutoSearchGuildChannelTab, useAutoSearchGuildChannelTabModule, [searchContext, !Reflect.apply(has,
value3, [GUILD_CHANNELS])]);
const useAutoSearchMembersTabModule = require(15112) /* metro dependency 15112: useAutoSearchMembersTab */;
const useAutoSearchMembersTab = useAutoSearchMembersTabModule.useAutoSearchMembersTab;
has = value3.has;
const MEMBERS = SearchTabs.MEMBERS;
Reflect.apply(useAutoSearchMembersTab, useAutoSearchMembersTabModule, [searchContext, !Reflect.apply(has, value3,
[MEMBERS])]);
const useAutoSearchPeopleTabModule = require(15113) /* metro dependency 15113: useAutoSearchPeopleTab */;
const useAutoSearchPeopleTab = useAutoSearchPeopleTabModule.useAutoSearchPeopleTab;
has = value3.has;
const PEOPLE = SearchTabs.PEOPLE;
Reflect.apply(useAutoSearchPeopleTab, useAutoSearchPeopleTabModule, [searchContext, !Reflect.apply(has, value3,
[PEOPLE])]);
(require(15114) /* metro dependency 15114: useAutoTrackSearchTabCountsViewedAnalytics */).useAutoTrackSearchTabCountsViewedAnalytics({searchContext: searchContext,
visibleTabCounts: visibleTabCounts, visibleTabs: visibleTabs});
return ((Component) => <Component searchContext={searchContext} visibleTabs={visibleTabs} visibleTabCounts={visibleTabCounts} width={width} />)(env0_20);
}
function _fun113672() { // fn#113672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:532, offset: 0x02403036, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchEmptyResult({searchContext: searchContext});
}
function _fun113675() { // fn#113675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1672, offset: 0x02403515, size: 36 bytes, params: 1, frame: 12
visibleTabs.forEach(_fun113676);
return [];
}
function _fun113677(a0) { // fn#113677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1888, offset: 0x024035de, size: 201 bytes, params: 2, frame: 19
let value = environment.__proto__;
const defaultImport = importDefault(9688) /* metro dependency 9688: SearchSessionAnalyticsManager */;
const setSelectedTab = defaultImport.setSelectedTab;
const searchContextBinding = searchContext;
Reflect.apply(setSelectedTab, defaultImport, [searchContextBinding, a0]);
env1_16(searchContextBinding);
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, SearchQueryStore.getQueryString(searchContextBinding));
const isFetching = SearchMessageStore.getIsFetching(searchTabFetchId);
const isInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId);
const value7 = MESSAGE_SEARCH_RESULT_TABS_SET.has(a0);
let r3 = value7 ? isInitialFetchComplete : !value7;
r3 = !r3 ? isFetching : r3;
if (!r3) {
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchInitialMessagesDebounced(searchContext);
}
}
function useSelectMediaTab({searchTabs, setActiveIndex}) { // fn#113678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2270, offset: 0x024036a7, size: 115 bytes, params: 2, frame: 16
const env0_2 = env1_3.useRef(function() {
setActiveIndex(searchTabs.findIndex(_fun113680));
});
env1_3.useEffect(_fun113681, [searchTabs, setActiveIndex]);
return env1_3.useCallback(_fun113684, []);
}
function _fun113685() { // fn#113685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2569, offset: 0x024037c2, size: 25 bytes, params: 1, frame: 3
return {selectedTab: selectedTab, selectMediaTab: env0_6};
}
function _fun113686() { // fn#113686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2757, offset: 0x024037db, size: 75 bytes, params: 1, frame: 12
var value2;
var value3;
if (gesture != null) {
value2 = environment.__proto__;
value3 = (require(5321) /* metro dependency 5321 */).Gesture.Native();
return value3.simultaneousWithExternalGesture(gesture);
}
}
function D_113687({contentOffset}) { // fn#113687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2898, offset: 0x02403826, size: 67 bytes, params: 2, frame: 13
env0_12.set(true);
let disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
}
}
function G_113688() { // fn#113688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3087, offset: 0x02403869, size: 47 bytes, params: 1, frame: 12
env0_12.set(false);
if (disallowGesture != null) {
disallowGesture.set(false);
}
}
function A_113689({contentOffset}) { // fn#113689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3257, offset: 0x02403898, size: 67 bytes, params: 2, frame: 12
var disallowGestureBinding;
const binding = env0_12;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
}
}
}
function _fun113690() { // fn#113690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3444, offset: 0x024038db, size: 136 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
const deleteSearchQuery = defaultImport.deleteSearchQuery;
const searchContextBinding = searchContext;
Reflect.apply(deleteSearchQuery, defaultImport, [searchContextBinding]);
(importDefault(9682) /* metro dependency 9682: SearchActionCreators */).clearAllSearchMesssages();
(importDefault(9682) /* metro dependency 9682: SearchActionCreators */).clearSearchRecentMessages();
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(searchContextBinding);
(importDefault(9683) /* metro dependency 9683: SearchTabsFetchManager */).cleanUp(value);
}
function _fun113691() { // fn#113691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3635, offset: 0x02403963, size: 28 bytes, params: 1, frame: 2
if (env0_7 == null) {
return _fun113692;
}
}
function _fun113693() { // fn#113693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3687, offset: 0x0240397f, size: 92 bytes, params: 1, frame: 15
var environment;
var ComponentDispatch;
if (env0_7 != null) {
value = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
return function() {
var ComponentDispatch = require(dependencyMap[24]).ComponentDispatch;
var CHANNEL_DETAILS_HIDDEN = ComponentActions.CHANNEL_DETAILS_HIDDEN;
ComponentDispatch.unsubscribe(CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
};
}
}
function _fun113698() { // fn#113698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4845, offset: 0x02403c02, size: 37 bytes, params: 1, frame: 11
const Set = global.Set;
const candidateTabsBinding = candidateTabs;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(candidateTabsBinding);
return set instanceof Object ? set : value;
}
function _fun113676(a0) { // fn#113676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1704, offset: 0x02403539, size: 165 bytes, params: 2, frame: 19
const binding = env0_0;
const push = binding.push;
const object2 = {};
const value = environment.__proto__.__proto__;
const value2 = undefined;
object2.label = (require(9675) /* metro dependency 9675: SearchUtils */).getTabTitle(a0);
object2.id = a0;
object2.page = ((Component) => <Component tab={a0} searchContext={searchContext} width={width} />)(importDefault(15033) /* metro dependency 15033: SearchTabsPage */);
object2.count = (visibleTabCounts == null ? value2 : visibleTabCounts[a0]) ?? value2;
Reflect.apply(push, binding, [object2]);
return value2;
}
function _fun113679() { // fn#113679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2346, offset: 0x0240371a, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
}
function _fun113681() { // fn#113681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2415, offset: 0x02403758, size: 26 bytes, params: 1, frame: 2
env0_2.current = function() {
setActiveIndex(searchTabs.findIndex(_fun113683));
};
}
function _fun113684() { // fn#113684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2501, offset: 0x024037b0, size: 18 bytes, params: 1, frame: 9
return env0_2.current();
}
function handleChannelDetailsHidden({channelId, screenIndex}) { // fn#113694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3898, offset: 0x024039db, size: 70 bytes, params: 2, frame: 16
if (channelId === channelId && screenIndex === screenIndex) {
setActiveIndex(0, false, true);
env1_13();
}
}
function current_113682() { // fn#113682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2430, offset: 0x02403772, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
}
@@ -0,0 +1,213 @@
/* Metro module 15033; source: modules/search/native/components/tabs/SearchTabsPage.tsx; dependencies: [57, 31, 27, 1379, 9615, 661, 33, 4501, 566, 5087, 5072, 11982, 11984, 15034, 15076, 15078, 15082, 15083, 15091, 15093, 15094, 15100, 15107, 44, 8621, 2] */
function _fun113702(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:6, offset: 0x02403e1c, size: 309 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchTabs;
const env0_8 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
value = value.createContext(undefined);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsPage.tsx');
exports.default = ConnectedSearchTabsPage;
exports.SearchTabsPageContext = value;
}
function SearchTabsPage({tab, searchContext, isFocused, selectMediaTab, width}) { // fn#113703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:269, offset: 0x02403f51, size: 1019 bytes, params: 2, frame: 24
var MEMBERS;
var type;
const [property, env0_1] = env0_3(env0_4.useState(isFocused), 2);
env0_4.useEffect(function() {
global.setTimeout(_fun113705, 10);
}, []);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun113706);
const value4 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel);
const value5 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel);
if (property) {
MEMBERS = SearchTabs.MEMBERS;
if (tab === MEMBERS) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
type = searchContext.type;
if (type === SearchTypes.GUILD_CHANNEL) {
if (value5) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */);
}
if (value4) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */);
}
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen2 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen2 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
type = searchContext.type;
if (type !== SearchTypes.THREAD) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen3 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen3 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
if (value5) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */);
}
if (value4) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */);
}
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
MEMBERS = SearchTabs.MEMBERS;
if (MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen4 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen4 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
}
return null;
}
function ConnectedSearchTabsPage({tab, searchContext, width}) { // fn#113707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:1674, offset: 0x024043b9, size: 194 bytes, params: 2, frame: 21
const value2 = env0_4.useContext(env0_11);
(importDefault(44) /* metro dependency 44 */)(value2 != null, '[SearchTabsPageContext] Context should not be null.');
const styles = useStyles();
return (
<View style={styles.container}>
<SearchTabsPage
isFocused={(importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(value2.selectedTab) === tab}
selectMediaTab={value2.selectMediaTab}
tab={tab}
searchContext={searchContext}
width={width}
/>
</View>
);
}
function _fun113704() { // fn#113704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:411, offset: 0x0240434c, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun113705, 10);
}
function _fun113706() { // fn#113706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:489, offset: 0x0240436a, size: 79 bytes, params: 1, frame: 14
const value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
const type = searchContext.type;
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
return Reflect.apply(getChannel, ChannelStore,
[type === GUILD_CHANNEL ? searchContext.channelId : searchContext.type !== SearchTypes.THREAD ? undefined : searchContext.channelId]);
}
@@ -0,0 +1,215 @@
/* Metro module 15109; source: modules/search/native/components/tabs/SearchTabsTransitionGroup.tsx; dependencies: [31, 33, 3829, 8859, 4017, 4508, 4577, 4581, 15015, 8859, 2] */
function _fun115146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:6, offset: 0x02455946, size: 255 bytes, params: 8, frame: 18
const env0_0 = require;
const getItemKey_115147 = function({items}) {
return items.map(_fun115148).join('-');
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
object = {code: "function SearchTabsTransitionGroupTsx1(){const{withSpring,opacity,springStandard,transitionState,TransitionStates,runOnJS,cleanUp}=this.__closure;return{opacity:withSpring(opacity.get(),springStandard,'respect-motion-settings',function(finished){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();}}),position:opacity.get()===1?'relative':'absolute'};}"};
object = {code: 'function SearchTabsTransitionGroupTsx2(finished){const{transitionState,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
object = {code: 'function SearchTabsTransitionGroupTsx3(){const{swipeForMemberListContext}=this.__closure;var _swipeForMemberListCo;(_swipeForMemberListCo=swipeForMemberListContext)===null||_swipeForMemberListCo===void 0||_swipeForMemberListCo.disallowGesture.set(false);}'};
object = {code: 'function SearchTabsTransitionGroupTsx4(){const{state}=this.__closure;return state.scrollOffset.get()>0;}'};
object = {code: 'function SearchTabsTransitionGroupTsx5(isOffsetFromStart,prevIsOffsetFromStart){const{swipeForMemberListContext}=this.__closure;if(isOffsetFromStart!==prevIsOffsetFromStart){var _swipeForMemberListCo;(_swipeForMemberListCo=swipeForMemberListContext)===null||_swipeForMemberListCo===void 0||_swipeForMemberListCo.disallowGesture.set(isOffsetFromStart);}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsTransitionGroup.tsx');
exports.default = SearchTabsTransitionGroup;
}
function getItemKey_115147({items}) { // fn#115147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:120, offset: 0x02455a45, size: 44 bytes, params: 2, frame: 11
return items.map(function(a0) {
return a0.id;
}).join('-');
}
function AnimatedTabs({state, transitionState, cleanUp}) { // fn#115149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1532, offset: 0x02455a71, size: 668 bytes, params: 2, frame: 25
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value5 = Reflect.apply(useSharedValue, reanimatedRexportModule, [transitionState !== MOUNTED ? 0 : 1]);
const env0_3 = value5;
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
let closure = AnimatedTabsF;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.opacity = value5;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object2.transitionState = transitionState;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 10740262883803;
closure.__initData = env0_5;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
let binding = env0_3;
binding.useEffect(_fun115152, [value5, transitionState]);
const value7 = useCountFormatter();
binding = env0_3;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
binding = env0_3;
const useCallback = binding.useCallback;
closure = AnimatedTabsH;
closure.__closure = {swipeForMemberListContext: value8};
closure.__workletHash = 5080152010224;
closure.__initData = env0_7;
const value9 = Reflect.apply(useCallback, binding, [closure, [value8]]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue3.useAnimatedReaction;
closure = AnimatedTabsF_115156;
closure.__closure = {state: state};
closure.__workletHash = 7791091456487;
closure.__initData = env0_8;
const closure2 = AnimatedTabsW;
closure2.__closure = {swipeForMemberListContext: value8};
closure2.__workletHash = 15386779064911;
closure2.__initData = env0_9;
Reflect.apply(useAnimatedReaction, moduleValue3, [closure, closure2]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const Tabs = (require(8859) /* metro dependency 8859: TabsNative */).Tabs;
return (
<View style={value6}>
<Tabs
state={state}
grow={false}
formatCount={value7}
simultaneousHandlers={value8?.gesture}
onEndDrag={value8 != null ? value9 : undefined}
/>
</View>
);
}
function renderItem_115158(a0, a1, a2, a3) { // fn#115158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3265, offset: 0x02456001, size: 50 bytes, params: 5, frame: 15
return (
<AnimatedTabs
state={a1}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function SearchTabsTransitionGroup({state}) { // fn#115159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3469, offset: 0x02456033, size: 84 bytes, params: 2, frame: 16
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={[state]}
getItemKey={getItemKey_115147}
renderItem={renderItem_115158}
/>
);
}
function AnimatedTabsF() { // fn#115150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1697, owner: AnimatedTabs.f, offset: 0x02455d0d, size: 228 bytes, params: 1, frame: 24
var environment;
const object3 = {};
const value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = env0_3.get();
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = fT;
const object4 = {};
object4.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object4.TransitionStates = TransitionStates;
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 15209468679721;
closure.__initData = env1_6;
object3.opacity = Reflect.apply(withSpring, springModule, [value3, springStandard, 'respect-motion-settings',
closure]);
object3.position = env0_3.get() !== 1 ? 'absolute' : 'relative';
return object3;
}
function _fun115152() { // fn#115152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2325, offset: 0x02455e5c, size: 69 bytes, params: 1, frame: 14
const binding = env0_3;
const set = binding.set;
const transitionStateBinding = transitionState;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [transitionStateBinding !== YEETED ? 1 : 0]);
}
function useCountFormatter() { // fn#115153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2398, owner: AnimatedTabs.useCountFormatter, offset: 0x02455ea1, size: 79 bytes, params: 1, frame: 14
const SearchResultExactCountEnabled = (require(3829) /* metro dependency 3829: UserSettings */).SearchResultExactCountEnabled;
return env1_3.useCallback(_fun115154, [SearchResultExactCountEnabled.useSetting()]);
}
function AnimatedTabsH() { // fn#115155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2681, owner: AnimatedTabs.h, offset: 0x02455f8d, size: 39 bytes, params: 1, frame: 11
if (env0_4 != null) {
env0_4.disallowGesture.set(false);
}
}
function AnimatedTabsF_115156() { // fn#115156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2861, owner: AnimatedTabs.F, offset: 0x02455fb4, size: 30 bytes, params: 1, frame: 9
return state.scrollOffset.get() > 0;
}
function AnimatedTabsW(a0, a1) { // fn#115157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2961, owner: AnimatedTabs.w, offset: 0x02455fd2, size: 47 bytes, params: 3, frame: 12
if (a0 !== a1) {
if (env0_4 != null) {
env0_4.disallowGesture.set(a0);
}
}
}
function fT(a0) { // fn#115151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1796, owner: AnimatedTabs.f.t, offset: 0x02455df1, size: 107 bytes, params: 2, frame: 13
var r0;
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun115154(a0) { // fn#115154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2506, offset: 0x02455ef0, size: 157 bytes, params: 2, frame: 14
var r0;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
} else if (a0 > 1000) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(1000);
value = '(' + value + '+)';
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
}
return r0;
}
@@ -0,0 +1,20 @@
/* Metro module 15079; source: modules/search/native/components/tabs/hooks/useContentContainerStyles.tsx; dependencies: [9615, 4501, 2] */
function _fun114083(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15276:6, offset: 0x024137b3, size: 196 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const SEARCH_LIST_SECTION_TOP_PADDING = value.SEARCH_LIST_SECTION_TOP_PADDING;
const SEARCH_ROW_TAP_STATE_PADDING = value.SEARCH_ROW_TAP_STATE_PADDING;
const SEARCH_LIST_HORIZONTAL_PADDING = value.SEARCH_LIST_HORIZONTAL_PADDING;
value = Reflect.apply((require(4501) /* metro dependency 4501: createStyles */).createStyles, value,
[{filesOrLinksContentContainer: {paddingTop: SEARCH_LIST_HORIZONTAL_PADDING,
paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING},
mediaContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING,
paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING},
messagesContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING - SEARCH_ROW_TAP_STATE_PADDING},
membersContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING,
paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useContentContainerStyles.tsx');
exports.useContentContainerStyles = value;
}
@@ -0,0 +1,30 @@
/* Metro module 15084; source: modules/search/native/components/tabs/hooks/useSearchMessages.tsx; dependencies: [4792, 9674, 566, 9675, 2] */
function _fun114134(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:6, offset: 0x02415351, size: 130 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessages.tsx');
exports.useSearchMessages = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[2]).useStateFromStores([SearchQueryStore, SearchMessageStore], _fun114136, [a0,
a1]);
};
}
function useSearchMessages(a0, a1) { // fn#114135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:235, offset: 0x024153d3, size: 94 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore, SearchMessageStore],
_fun114136, [a0, a1]);
}
function _fun114136() { // fn#114136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:308, offset: 0x02415431, size: 81 bytes, params: 1, frame: 17
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const binding = env0_0;
return SearchMessageStore.getMessages((require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(binding,
require, Reflect.apply(getSearchResultsQuery, SearchQueryStore, [binding])));
}
@@ -0,0 +1,35 @@
/* Metro module 15085; source: modules/search/native/components/tabs/hooks/useSearchMessagesLoadingState.tsx; dependencies: [4792, 9674, 9615, 15040, 566, 9675, 2] */
function _fun114137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:6, offset: 0x02415482, size: 152 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_TABS_TO_SEARCH_QUERY_LIMITS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessagesLoadingState.tsx');
exports.useSearchMessagesLoadingState = useSearchMessagesLoadingState;
}
function useSearchMessagesLoadingState({searchContext, tab, placeholderHeight, numColumns}) { // fn#114138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:304, offset: 0x0241551a, size: 142 bytes, params: 2, frame: 19
const env0_2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: placeholderHeight,
numColumns: numColumns});
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], _fun114139);
}
function _fun114139() { // fn#114139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:528, offset: 0x024155a8, size: 167 bytes, params: 1, frame: 17
let value = environment.__proto__;
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
tab, Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]));
const isInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId);
const isFetching = SearchMessageStore.getIsFetching(searchTabFetchId);
const value7 = !isInitialFetchComplete;
const r3 = isInitialFetchComplete ? isFetching : !value7;
const Math = global.Math;
value = Math.max(env0_2, SEARCH_TABS_TO_SEARCH_QUERY_LIMITS[tab]);
return {isFirstPageLoading: value7, isNextPageLoading: r3,
placeholderCount: isInitialFetchComplete ? r3 ? value : 0 : value};
}
@@ -0,0 +1,123 @@
/* Metro module 15108; source: modules/search/native/components/tabs/hooks/useSearchSegmentedControlState.tsx; dependencies: [31, 4017, 8853, 2] */
function _fun115137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:6, offset: 0x024554f8, size: 210 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
object = {code: 'function useSearchSegmentedControlStateTsx1(){const{visibleTabsStateful}=this.__closure;return visibleTabsStateful;}'};
object = {code: 'function useSearchSegmentedControlStateTsx2(){const{visibleTabs,activeIndex}=this.__closure;return visibleTabs.get()[activeIndex.get()];}'};
object = {code: 'function useSearchSegmentedControlStateTsx3(){const{visibleTabs}=this.__closure;return visibleTabs.get();}'};
object = {code: 'function useSearchSegmentedControlStateTsx4(visibleTabs){const{lastSelectedTab,runOnJS,setActiveIndex}=this.__closure;if(visibleTabs.length===0)return;const lastSelectedTabIndex=visibleTabs.indexOf(lastSelectedTab.get());const targetIndex=Math.max(0,lastSelectedTabIndex);const maxIndex=Math.max(0,visibleTabs.length-1);const nextActiveIndex=Math.min(targetIndex,maxIndex);runOnJS(setActiveIndex)(nextActiveIndex,false);}'};
object = {code: 'function useSearchSegmentedControlStateTsx5(){const{selectedTab}=this.__closure;return selectedTab.get();}'};
object = {code: 'function useSearchSegmentedControlStateTsx6(selectedTab){const{lastSelectedTab,runOnJS,onSelectedTabChange}=this.__closure;if(selectedTab==null)return;lastSelectedTab.set(selectedTab);runOnJS(onSelectedTabChange)(selectedTab);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchSegmentedControlState.tsx');
exports.useSearchSegmentedControlState = useSearchSegmentedControlState;
}
function useSearchSegmentedControlState({items, visibleTabs, onSelectedTabChange, width}) { // fn#115138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1436, offset: 0x024555ca, size: 601 bytes, params: 2, frame: 26
var object2;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(visibleTabs[0]);
const env0_2 = value2;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
return visibleTabs;
};
closure.__closure = {visibleTabsStateful: visibleTabs};
closure.__workletHash = 17125959946782;
closure.__initData = env0_3;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const value4 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: items,
defaultIndex: 0, pageWidth: width});
const env0_4 = value4;
const activeIndex = value4.activeIndex;
const env0_5 = activeIndex;
const setActiveIndex = value4.setActiveIndex;
const env0_6 = setActiveIndex;
const moduleValue4 = reanimatedRexportModule;
useDerivedValue = moduleValue4.useDerivedValue;
closure = useSearchSegmentedControlStateX;
closure.__closure = {visibleTabs: value3, activeIndex: activeIndex};
closure.__workletHash = 6189329624535;
closure.__initData = env0_4;
const value5 = Reflect.apply(useDerivedValue, moduleValue4, [closure]);
const env0_7 = value5;
const moduleValue5 = reanimatedRexportModule;
let useAnimatedReaction = moduleValue5.useAnimatedReaction;
closure = useSearchSegmentedControlStateF;
closure.__closure = {visibleTabs: value3};
closure.__workletHash = 9222891018885;
closure.__initData = env0_5;
const closure2 = useSearchSegmentedControlStateV;
object2 = {lastSelectedTab: value2};
const runOnJS = reanimatedRexportModule.runOnJS;
object2.runOnJS = runOnJS;
object2.setActiveIndex = setActiveIndex;
closure2.__closure = object2;
closure2.__workletHash = 13456384876758;
closure2.__initData = env0_6;
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure2]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedReaction = moduleValue6.useAnimatedReaction;
closure = useSearchSegmentedControlStateC;
closure.__closure = {selectedTab: value5};
closure.__workletHash = 2491149576387;
closure.__initData = env0_7;
const closure3 = useSearchSegmentedControlStateI;
closure3.__closure = {lastSelectedTab: value2, runOnJS: runOnJS, onSelectedTabChange: onSelectedTabChange};
closure3.__workletHash = 8452224388929;
closure3.__initData = env0_8;
Reflect.apply(useAnimatedReaction, moduleValue6, [closure, closure3]);
return env0_2.useMemo(_fun115145, [value4, value5]);
}
function useSearchSegmentedControlStateX() { // fn#115140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1836, owner: useSearchSegmentedControlState.x, offset: 0x02455823, size: 35 bytes, params: 1, frame: 10
const binding = env0_3;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
const activeIndexBinding = activeIndex;
get = activeIndexBinding.get;
return value2[Reflect.apply(get, activeIndexBinding, [])];
}
function useSearchSegmentedControlStateV(a0) { // fn#115142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2077, owner: useSearchSegmentedControlState.v, offset: 0x02455846, size: 157 bytes, params: 2, frame: 17
var indexOf;
var binding;
var value2;
var Math;
var value3;
var value4;
var value5;
var value6;
var moduleValue;
if (a0.length !== 0) {
indexOf = a0.indexOf;
binding = env0_2;
value2 = Reflect.apply(indexOf, a0, [binding.get()]);
Math = global.Math;
value3 = Math.max(0, value2);
Math = global.Math;
value4 = Math.max(0, a0.length - 1);
Math = global.Math;
value5 = Math.min(value3, value4);
value6 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(setActiveIndex)(value5, false);
}
}
function useSearchSegmentedControlStateI(a0) { // fn#115144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2459, owner: useSearchSegmentedControlState.I, offset: 0x024558e3, size: 74 bytes, params: 2, frame: 13
var value2;
var moduleValue;
if (a0 != null) {
env0_2.set(a0);
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onSelectedTabChange)(a0);
}
}
function _fun115145() { // fn#115145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2651, offset: 0x0245592d, size: 25 bytes, params: 1, frame: 3
return {segmentedControlState: env0_4, selectedTab: env0_7};
}
@@ -0,0 +1,245 @@
/* Metro module 15082; source: modules/search/native/components/tabs/pages/ChannelsScreen.tsx; dependencies: [31, 11830, 9674, 9615, 9614, 33, 9675, 566, 14549, 14705, 15036, 1244, 3869, 15040, 9673, 15077, 15032, 15044, 2] */
function _fun114106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:6, offset: 0x0241426e, size: 259 bytes, params: 8, frame: 19
const env0_0 = require;
const getVoiceStates = function(a0, a1, a2) {
return (a0.isGuildStageVoice() ? a2 : a1)[a0.id] ?? EMPTY_VOICE_STATES;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchGuildChannelTabStore = importDefault(11830) /* metro dependency 11830: SearchGuildChannelTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.EMPTY_VOICE_STATES;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const env0_8 = searchConstantsModule.CHANNELS_ESTIMATED_ITEM_SIZE;
const env0_9 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChannelsScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/ChannelsScreen.tsx');
exports.default = value;
}
function ChannelsScreen({searchContext}) { // fn#114108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:382, offset: 0x024143a2, size: 679 bytes, params: 2, frame: 28
var r0;
var value;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const textChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun114109);
const voiceChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun114110);
const env0_3 = voiceChannels;
const value2 = (importDefault(14549) /* metro dependency 14549: useVoiceStatesForChannelList */)(searchContext.guildId);
const value3 = (importDefault(14705) /* metro dependency 14705: useStageChannelSpeakerVoiceStates */)(searchContext.guildId);
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildTextChannel({searchContext: searchContext});
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
});
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getQueryString(searchContext);
}, [searchContext]);
const binding = env0_3;
binding.useEffect(_fun114113, [textChannels, voiceChannels, value7]);
const usePlaceholderStylesModule = require(15040) /* metro dependency 15040: usePlaceholderStyles */;
const useFullscreenPlaceholderCount = usePlaceholderStylesModule.useFullscreenPlaceholderCount;
const value11 = binding.useMemo(_fun114116, [Reflect.apply(useFullscreenPlaceholderCount,
usePlaceholderStylesModule, [{placeholderHeight: CHANNELS_ESTIMATED_ITEM_SIZE, numColumns: 1}]),
binding.useCallback(_fun114114, [value4, searchContext]), binding.useCallback(_fun114115, [value5,
searchContext]), value6, value3, textChannels, voiceChannels, value2]);
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value11} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function _fun114109() { // fn#114109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:495, offset: 0x02414649, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getTextChannels(env0_1);
}
function _fun114110() { // fn#114110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:556, offset: 0x02414664, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getVoiceChannels(env0_1);
}
function _fun114113() { // fn#114113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:886, offset: 0x024146b5, size: 231 bytes, params: 1, frame: 17
var r2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value3;
var value;
if (env0_9.trim() !== '') {
value = textChannels.length + voiceChannels.length;
if (value > 0) {
value3 = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: value});
r2 = value;
} else {
value = environment.__proto__;
value = intl.string(t.f5cMAg);
r2 = value;
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
}
}
function _fun114114(a0, a1) { // fn#114114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1196, offset: 0x0241479c, size: 90 bytes, params: 3, frame: 15
env0_6(a0);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114115(a0, a1) { // fn#114115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1330, offset: 0x024147f6, size: 90 bytes, params: 3, frame: 15
env0_7(a0);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114116() { // fn#114116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1460, offset: 0x02414850, size: 429 bytes, params: 1, frame: 22
var environment;
var r6;
var push;
var value3;
var SECTION;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var nIfr0Y;
var forEach;
var value4;
var CYnO4s;
var binding;
var binding2;
var value5;
var sort;
var value6;
var value7;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
const items2 = [];
let value = 0;
var env0_1;
let length = textChannels.length;
reducibleJoin2: while (true) {
if (length > value) {
push = items2.push;
value3 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
nIfr0Y = t.nIfr0Y;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [nIfr0Y])}}]);
textChannelsBinding = textChannels;
forEach = textChannelsBinding.forEach;
Reflect.apply(forEach, textChannelsBinding, [_fun114117]);
length = textChannelsBinding.length;
env0_1 = value + length;
break reducibleJoin2;
}
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (voiceChannels.length > value) {
push = items2.push;
value4 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
CYnO4s = t.CYnO4s;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [CYnO4s])}}]);
binding = env0_4;
binding2 = env0_5;
value5 = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return _fun114120;
})(binding, binding2);
voiceChannelsBinding = voiceChannels;
sort = voiceChannelsBinding.sort;
value6 = Reflect.apply(sort, voiceChannelsBinding, [value5]);
forEach = value6.forEach;
Reflect.apply(forEach, value6, [_fun114121]);
break reducibleJoin4;
}
break reducibleJoin4;
}
reducibleJoin8: while (true) {
if (env0_8) {
break reducibleJoin8;
}
length = items2.length;
if (value !== length) {
break reducibleJoin8;
}
value7 = environment.__proto__;
if (!(value < env0_10)) {
break reducibleJoin8;
}
r6 = value;
reducibleLoop7: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r6}]);
value = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
if (value < env0_10) {
r6 = value;
continue reducibleLoop7;
}
break reducibleJoin8;
}
}
return items2;
}
function _fun114117({channel, lastMessageId}, a1) { // fn#114117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1584, offset: 0x024149fd, size: 97 bytes, params: 3, frame: 15
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_TEXT_CHANNEL, props: {channel: channel, lastMessageId: lastMessageId,
onPress: onPress_114118}}]);
}
function createSorter(a0, a1) { // fn#114119, offset: 0x02414a79, size: 25 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun114120;
}
function _fun114121(a0, a1) { // fn#114121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2017, offset: 0x02414af6, size: 153 bytes, params: 3, frame: 19
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_VOICE_CHANNEL, props: {channel: a0.channel,
voiceStates: env1_4[a0.channel.id] ?? EMPTY_VOICE_STATES,
speakerVoiceStates: env1_5[a0.channel.id] ?? EMPTY_VOICE_STATES, onPress: onPress_114122}}]);
}
function onPress_114118(a0) { // fn#114118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1699, offset: 0x02414a5e, size: 27 bytes, params: 2, frame: 13
return env2_11(a0, env0_0);
}
function _fun114120({channel}, {channel}) { // fn#114120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1859, offset: 0x02414a92, size: 100 bytes, params: 3, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const getVoiceStatesBinding = getVoiceStates;
const binding = env0_0;
value = getVoiceStatesBinding(channel, binding, require);
const voiceStatesBinding = getVoiceStatesBinding(channel, binding, require);
return value.length < voiceStatesBinding.length ? 1 : value.length > voiceStatesBinding.length ? -1 : 0;
}
function onPress_114122(a0) { // fn#114122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2198, offset: 0x02414b8f, size: 27 bytes, params: 2, frame: 13
return env2_12(a0, env0_0);
}
@@ -0,0 +1,38 @@
/* Metro module 15032; source: modules/search/native/components/tabs/pages/ErrorScreen.tsx; dependencies: [31, 27, 33, 4501, 5463, 3869, 4573, 2] */
function _fun113699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15229:6, offset: 0x02403c27, size: 237 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'justifyContent': 'center',
'alignItems': 'center', 'height': '100%', 'display': 'flex'}, text: {'textAlign': 'center', 'width': '75%'}});
value = value.memo(_fun113700);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/ErrorScreen.tsx');
exports.default = value;
}
function _fun113700({text}) { // fn#113700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15229:294, offset: 0x02403d14, size: 206 bytes, params: 2, frame: 20
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
env0_3.useEffect(function() {
var AccessibilityAnnouncer = require(dependencyMap[5]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(text, 'polite');
}, [text]);
const items2 = [styles.container];
items2[1] = {paddingBottom: insets.bottom};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.text}
>
{text}
</Text>
</View>
);
}
@@ -0,0 +1,327 @@
/* Metro module 15078; source: modules/search/native/components/tabs/pages/MembersScreen.tsx; dependencies: [31, 27, 6875, 1379, 1945, 1867, 1934, 11831, 9674, 9615, 9614, 661, 33, 4501, 632, 6771, 9675, 15040, 3789, 1848, 9673, 8743, 1244, 3869, 15079, 15077, 15032, 11382, 15044, 15080, 6789, 11725, 2] */
function _fun114061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:6, offset: 0x024129c1, size: 470 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(6875) /* metro dependency 6875: ChannelMemberStore */).EVERYONE_CHANNEL_ID;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const searchMemberTabStore = importDefault(11831) /* metro dependency 11831: SearchMemberTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_13 = searchConstantsModule.CHANNELS_ESTIMATED_ITEM_SIZE;
const env0_14 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_15 = searchConstantsModule.SearchListItemTypes;
const env0_16 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_17 = constantsModule.RelationshipTypes;
const env0_18 = constantsModule.SearchTypes;
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
const env0_20 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'flexGrow': 1}, userList: {backgroundColor: 'transparent'}});
value = value.memo(MembersScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/MembersScreen.tsx');
exports.default = value;
}
function SearchableMembersScreen({searchContext, guildId}) { // fn#114062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:523, offset: 0x02412b97, size: 872 bytes, params: 2, frame: 31
var r0;
var value;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_3 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const results = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114063);
const env0_4 = results;
const value2 = useMemberScreenChannelId(searchContext);
const channelId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
_fun114067);
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun114068);
const value6 = env0_4.useCallback(_fun114069, [searchContext, value2, channelId, analyticsLocations]);
const value7 = env0_4.useCallback(_fun114070, [searchContext]);
const value8 = env0_4.useCallback(_fun114071, [value6]);
const value9 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore],
function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const isFetching = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114073);
env0_4.useEffect(_fun114074, [results, value9, isFetching]);
const value10 = env0_4.useMemo(_fun114075, [results, isFetching, value9, guildId, value4, value6, value3]);
const value11 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else if (value9) {
if (value5 != null) {
value = importDefault(11382) /* metro dependency 11382: GuildChannelUserList */;
value = ((Component) => <Component onUserPress={value7} onUserLongPress={value8} channelId={value5} guildId={guildId} disableStickySections listStyleOverride={styles.userList} isNameplatedList canShowDisplayNameStylesFont />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component contentContainerStyle={value11.membersContentContainer} estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value10} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
} else {
r0 = ((Component) => <Component contentContainerStyle={value11.membersContentContainer} estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value10} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function ThreadMembersScreen({searchContext, channelId, guildId}) { // fn#114079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3160, offset: 0x02413486, size: 241 bytes, params: 2, frame: 23
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
let useStateFromStores = useStateFromStoresModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [[ChannelStore], _fun114080]);
const moduleValue2 = useStateFromStoresModule;
useStateFromStores = moduleValue2.useStateFromStores;
return value2 ? <SearchableMembersScreen searchContext={searchContext} guildId={guildId} /> : Reflect.apply(useStateFromStores,
moduleValue2, [[SearchQueryStore], _fun114081,
[searchContext]]) ? ((Component) => <Component channelId={channelId} guildId={guildId} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} disableStickySections />)(importDefault(15080) /* metro dependency 15080: ThreadChannelUserList */) : <SearchableMembersScreen searchContext={searchContext} guildId={guildId} />;
}
function MembersScreen({searchContext}) { // fn#114082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3640, offset: 0x024135e4, size: 463 bytes, params: 2, frame: 23
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const SEARCH_MEMBERS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SEARCH_MEMBERS;
const analyticsLocations = defaultImport(SEARCH_MEMBERS).analyticsLocations;
const type = searchContext.type;
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
{((Component) => <Component channelId={searchContext.channelId} disableStickySections listStyleOverride={styles.userList} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} />)(importDefault(11725) /* metro dependency 11725: PrivateChannelUserList */)}
</View>
</AnalyticsLocationProvider>
);
}
const THREAD = SearchTypes.THREAD;
if (THREAD === type) {
return (
<ThreadMembersScreen
searchContext={searchContext}
channelId={searchContext.channelId}
guildId={searchContext.guildId}
/>
);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const Error = global.Error;
const value = '[MembersScreen] Unsupported search context type: ' + searchContext.type;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function _fun114063() { // fn#114063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:696, offset: 0x02412eff, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getResults(env0_3);
}
function useMemberScreenChannelId(a0) { // fn#114064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:720, owner: SearchableMembersScreen.useMemberScreenChannelId, offset: 0x02412f1a, size: 128 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore],
_fun114065, [a0]);
return value2.size === 0 ? EVERYONE_CHANNEL_ID : value2.size !== 1 ? null : global.Array.from(value2)[0];
}
function _fun114067() { // fn#114067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1052, offset: 0x02412fb5, size: 71 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const guild = GuildStore.getGuild(guildId);
if (guild != null) {
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
value = value.getGuildVisualOwnerId(guild);
r0 = value;
} else {
r0 = undefined;
}
return r0;
}
function _fun114068() { // fn#114068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1171, offset: 0x02412ffc, size: 91 bytes, params: 1, frame: 12
if (env0_5 === EVERYONE_CHANNEL_ID) {
return env0_5;
}
const channel = ChannelStore.getChannel(env0_5);
return channel == null ? env0_5 : channel.isAnnouncementThread() && channel.parent_id != null ? channel.parent_id : env0_5;
}
function _fun114069(a0, a1) { // fn#114069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1311, offset: 0x02413057, size: 175 bytes, params: 3, frame: 18
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: a0.id, index: a1,
entityType: USER}]);
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id,
channelId: env0_5 !== EVERYONE_CHANNEL_ID ? env0_5 : channelId, sourceAnalyticsLocations: analyticsLocations});
}
function _fun114070({user, index}) { // fn#114070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1546, offset: 0x02413106, size: 119 bytes, params: 2, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: user.id,
index: index, entityType: USER}]);
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
}
function _fun114071({user, index}) { // fn#114071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1716, offset: 0x0241317d, size: 30 bytes, params: 2, frame: 13
env0_9(user, index);
}
function _fun114073() { // fn#114073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1857, offset: 0x024131b6, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getIsFetching(env0_3);
}
function _fun114074() { // fn#114074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1895, offset: 0x024131d1, size: 213 bytes, params: 1, frame: 17
var r2;
var length;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
if (!env0_10) {
if (!isFetching) {
length = results.length;
if (length > 0) {
value = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: length});
r2 = value;
} else {
value = environment.__proto__;
value = intl.string(t.tuL9TW);
r2 = value;
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
}
}
}
function _fun114075() { // fn#114075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2108, offset: 0x024132a6, size: 142 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var GUILD_CHANNEL_MEMBER_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114076);
reducibleJoin5: while (true) {
reducibleJoin3: while (true) {
if (isFetching) {
break reducibleJoin3;
}
if (env0_10) {
break reducibleJoin5;
}
length = items2.length;
if (length !== 0) {
break reducibleJoin5;
}
break reducibleJoin3;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_7)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: GUILD_CHANNEL_MEMBER_PLACEHOLDER,
key: 'guild-channel-member-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_7) {
r5 = value4;
continue reducibleLoop4;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
return items2;
}
function _fun114080() { // fn#114080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3269, offset: 0x02413577, size: 57 bytes, params: 1, frame: 12
var r1;
let value = environment.__proto__;
value = ChannelStore.getChannel(channelId);
if (value == null) {
r1 = undefined;
} else {
value = value.isAnnouncementThread();
r1 = value;
}
return r1 != null && r1;
}
function _fun114081() { // fn#114081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3398, offset: 0x024135b0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
return SearchQueryStore.isInitialSearchQuery(searchContext) && !SearchQueryStore.isTagsEmpty(searchContext);
}
function _fun114065() { // fn#114065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:796, offset: 0x02412f9a, size: 27 bytes, params: 1, frame: 11
return SearchQueryStore.getChannelIds(env0_0);
}
function _fun114076(a0, a1) { // fn#114076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2136, offset: 0x02413334, size: 311 bytes, params: 3, frame: 23
var environment;
const env0_0 = a1;
let value = environment.__proto__.__proto__;
const member = GuildMemberStore.getMember(guildId, a0.record.id);
const binding = env0_0;
const push = binding.push;
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
const NONE = RelationshipTypes.NONE;
value = undefined;
Reflect.apply(push, binding, [{type: GUILD_CHANNEL_MEMBER, props: {type: NONE, user: a0.record,
nickname: member == null ? value : member.nick, usernameColor: member == null ? value : member.colorString,
roleColors: member == null ? value : member.colorStrings, isNameplatedRow: true,
premiumSince: (member == null ? value : member.premiumSince) ?? value, isOwner: env1_8 === a0.record.id,
guildId: guildId, onLongPress: onLongPress_114077, onPress: onPress_114078, start: a1 === 0,
end: a1 === results.length - 1, canShowDisplayNameStylesFont: true}}]);
return value;
}
function onLongPress_114077(a0) { // fn#114077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2490, offset: 0x0241346b, size: 27 bytes, params: 2, frame: 13
return env2_9(a0, require);
}
@@ -0,0 +1,171 @@
/* Metro module 15076; source: modules/search/native/components/tabs/pages/PeopleScreen.tsx; dependencies: [5, 31, 11832, 9674, 9615, 9614, 33, 9675, 566, 15040, 15036, 4603, 9673, 15077, 15032, 15044, 2] */
function _fun114041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:6, offset: 0x02411fd1, size: 254 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const searchPeopleTabStore = importDefault(11832) /* metro dependency 11832: SearchPeopleTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const env0_8 = searchConstantsModule.USER_ESTIMATED_ITEM_SIZE;
const env0_9 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(PeopleScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/PeopleScreen.tsx');
exports.default = value;
}
function PeopleScreen({searchContext}) { // fn#114042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:272, offset: 0x024120cf, size: 494 bytes, params: 2, frame: 24
var r0;
var value;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const results = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchPeopleTabStore],
_fun114043);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
});
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: USER_ESTIMATED_ITEM_SIZE,
numColumns: 1});
const env0_4 = value3;
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGroupDMItem({searchContext: searchContext});
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressDMItem({searchContext: searchContext});
const binding = env0_4;
const value9 = binding.useMemo(_fun114050, [binding.useCallback(_fun114045(), [value5, searchContext]),
binding.useCallback(_fun114049, [value4, searchContext]), value2, value3, results]);
const value10 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value10 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value10} />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component estimatedItemSize={USER_ESTIMATED_ITEM_SIZE} data={value9} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function _fun114043() { // fn#114043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:383, offset: 0x024122bd, size: 27 bytes, params: 1, frame: 11
return SearchPeopleTabStore.getResults(env0_1);
}
function _fun114045() { // fn#114045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:662, offset: 0x024122f3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun114047);
return _fun114048;
}
function _fun114049(a0, a1) { // fn#114049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:939, offset: 0x024123bb, size: 90 bytes, params: 3, frame: 16
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
env0_5(a0);
}
function _fun114050() { // fn#114050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1069, offset: 0x02412415, size: 135 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114051);
reducibleJoin4: while (true) {
if (env0_3) {
break reducibleJoin4;
}
length = items2.length;
value2 = 0;
if (value2 !== length) {
break reducibleJoin4;
}
value3 = environment.__proto__;
if (!(value2 < env0_4)) {
break reducibleJoin4;
}
r5 = value2;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_4) {
r5 = value4;
continue reducibleLoop3;
}
break reducibleJoin4;
}
}
return items2;
}
function* _fun114047(a0, a1) { // fn#114047, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:682, offset: 0x02412322, size: 153 bytes, params: 3, frame: 19
if (true) {
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[11]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
}
var value6 = env3_1(env3_2[12]);
var trackSearchResultClicked = value6.trackSearchResultClicked;
var CHANNEL = env3_9.CHANNEL;
Reflect.apply(trackSearchResultClicked, value6, [{searchContext: require, userId: a0, channelId: value4,
index: a1,
entityType: CHANNEL}]);
SearchQueryStore(a0, value4);
}
}
function _fun114051({title, items}) { // fn#114051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1097, offset: 0x0241249c, size: 104 bytes, params: 2, frame: 13
var environment;
var value;
if (title != null) {
if (items.length > 0) {
value = environment.__proto__.__proto__;
title.push({type: SearchListItemTypes.SECTION, props: {title: title}});
}
}
items.forEach(_fun114052);
}
function _fun114052(a0, a1) { // fn#114052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1203, offset: 0x02412504, size: 204 bytes, params: 3, frame: 16
var environment;
var binding;
var push;
var type;
var user;
var firstMatch;
var username;
const env0_0 = a1;
let value = environment.__proto__;
if ('user' in a0) {
type = a0.type;
user = a0.user;
firstMatch = a0.firstMatch;
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
username = user.username;
value = undefined;
Reflect.apply(push, binding, [{type: SearchListItemTypes.DM, section: title, props: {type: type, user: user,
nickname: username === firstMatch ? value : firstMatch, onPress: onPress_114053}}]);
} else {
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [{type: SearchListItemTypes.GROUP_DM, section: title, props: {channel: a0,
onPress: onPress_114054}}]);
}
}
@@ -0,0 +1,602 @@
/* Metro module 15034; source: modules/search/native/components/tabs/pages/RecentScreen.tsx; dependencies: [57, 5, 31, 4792, 11830, 15035, 9674, 9615, 11823, 661, 33, 5278, 11828, 1244, 4573, 7692, 15036, 4603, 9673, 9675, 566, 1485, 15039, 11822, 13344, 5263, 5074, 15040, 15041, 15044, 2] */
function _fun113708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:6, offset: 0x0240447b, size: 461 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_113711 = 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});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchGuildChannelTabStore = importDefault(11830) /* metro dependency 11830: SearchGuildChannelTabStore */;
const searchHistoryStore = importDefault(15035) /* metro dependency 15035: SearchHistoryStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_10 = searchConstantsModule.EMPTY_SEARCH_QUERY_STRING;
const env0_11 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_12 = searchConstantsModule.RECENTS_ESTIMATED_ITEM_SIZE;
const env0_13 = searchConstantsModule.SearchListItemTypes;
const env0_14 = searchConstantsModule.SearchTabs;
const env0_15 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).EMPTY_MEDIA_RESULTS;
const env0_16 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_17 = (require(33) /* metro dependency 33 */).jsx;
const env0_20 = value.memo(_fun113715);
const env0_21 = value.memo(_fun113731);
const env0_22 = value.memo(_fun113740);
value = value.memo(RecentScreenContainer);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/RecentScreen.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_113709(a0, a1) { // fn#113709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:395, offset: 0x02404648, 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 _fun113710;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_113711(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_113711(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_113711(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun113710;
}
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 ClearAllHistory({searchContext}) { // fn#113712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1325, offset: 0x024047bc, size: 225 bytes, params: 2, frame: 20
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {'onPress': null, 'accessibilityRole': 'button', 'unstable_pressDelay': 130,
onPress: onPress_113713};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let LFTAUp = (require(1244) /* metro dependency 1244: indexNative */).t.LFTAUp;
pressableHighlightProps.accessibilityLabel = Reflect.apply(string, intl, [LFTAUp]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
LFTAUp = (require(1244) /* metro dependency 1244: indexNative */).t.LFTAUp;
return (
<PressableHighlight {...pressableHighlightProps}>
<Text variant="text-sm/semibold" color="text-brand">
{Reflect.apply(string, intl, [LFTAUp])}
</Text>
</PressableHighlight>
);
}
function ViewAll({onJumpToMedia}) { // fn#113714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1670, offset: 0x024048ca, size: 212 bytes, params: 2, frame: 20
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {'onPress': null, 'accessibilityRole': 'button', 'unstable_pressDelay': 130,
onPress: onJumpToMedia};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let Ofpgwh = (require(1244) /* metro dependency 1244: indexNative */).t.Ofpgwh;
pressableHighlightProps.accessibilityLabel = Reflect.apply(string, intl, [Ofpgwh]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
Ofpgwh = (require(1244) /* metro dependency 1244: indexNative */).t.Ofpgwh;
return (
<PressableHighlight {...pressableHighlightProps}>
<Text variant="text-sm/semibold" color="text-brand">
{Reflect.apply(string, intl, [Ofpgwh])}
</Text>
</PressableHighlight>
);
}
function _fun113715({searchContext, onJumpToMedia, width, suggestedData}) { // fn#113715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1987, offset: 0x0240499e, size: 489 bytes, params: 2, frame: 29
const {messages, isLoadingMediaGrid,
isInitialSearchQuery} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], _fun113716);
const env0_5 = isInitialSearchQuery;
const value4 = useSearchHistory((require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext));
const value5 = (importDefault(15039) /* metro dependency 15039: useSearchMediaSize */)(width);
const binding = env0_5;
const value6 = binding.useMemo(_fun113722, [messages, searchContext]);
const value8 = binding.useCallback(_fun113724, [messages,
(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMediaItem({searchContext: searchContext,
allMediaResults: value6})]);
const usePlaceholderStylesModule = require(15040) /* metro dependency 15040: usePlaceholderStyles */;
const useFullscreenPlaceholderCount = usePlaceholderStylesModule.useFullscreenPlaceholderCount;
return ((Component) => <Component estimatedItemSize={RECENTS_ESTIMATED_ITEM_SIZE} data={binding.useMemo(_fun113726,
[value8, isInitialSearchQuery, value6, value5, onJumpToMedia, Reflect.apply(useFullscreenPlaceholderCount,
usePlaceholderStylesModule, [{placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE, numColumns: 1}]), searchContext,
value4, suggestedData])} ListFooterComponent={binding.useMemo(_fun113729, [isLoadingMediaGrid,
value5])} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
function _fun113731(a0) { // fn#113731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4264, offset: 0x02405141, size: 74 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['suggestedData']: useSuggestedUsersData({searchContext: a0.searchContext})}} />)(env0_20);
}
function _fun113740(a0) { // fn#113740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5180, offset: 0x024053d1, size: 74 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['suggestedData']: useSuggestedChannelsData({searchContext: a0.searchContext})}} />)(env0_20);
}
function RecentScreenContainer({searchContext, onJumpToMedia, width}) { // fn#113747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5903, offset: 0x02405661, size: 190 bytes, params: 2, frame: 17
const type = searchContext.type;
const DMS = SearchTypes.DMS;
if (DMS === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_21);
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_22);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_20);
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_20);
}
return null;
}
function ClearAllHistoryOnPress() { // fn#113713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1386, owner: ClearAllHistory.onPress, offset: 0x0240489d, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
return value.clearSearchHistory(searchContext);
}
function _fun113716() { // fn#113716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2103, offset: 0x02404b87, size: 129 bytes, params: 1, frame: 17
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
const value3 = Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]);
const searchUtilsModule = require(9675) /* metro dependency 9675: SearchUtils */;
const getSearchTabFetchId = searchUtilsModule.getSearchTabFetchId;
const MEDIA = SearchTabs.MEDIA;
const value4 = Reflect.apply(getSearchTabFetchId, searchUtilsModule, [searchContextBinding, MEDIA, value3]);
const object2 = {};
object2.messages = SearchMessageStore.getMessages(value4);
const getIsInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete;
object2.isLoadingMediaGrid = !Reflect.apply(getIsInitialFetchComplete, SearchMessageStore, [value4]);
object2.isInitialSearchQuery = SearchQueryStore.isInitialSearchQuery(searchContextBinding);
return object2;
}
function useSearchHistory(a0) { // fn#113717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2384, offset: 0x02404c08, size: 124 bytes, params: 2, frame: 17
var environment;
let env0_0 = a0;
let value = environment.__proto__;
const binding = env1_5;
const [property, env0_1] = env1_3(binding.useState(_fun113718), 2);
value = require(1485) /* metro dependency 1485 */;
const useFocusEffect = value.useFocusEffect;
const useCallback = binding.useCallback;
Reflect.apply(useFocusEffect, value, [Reflect.apply(useCallback, binding, [function() {
var closure = _fun113720;
var env0_0 = closure;
closure();
SearchHistoryStore.addReactChangeListener(closure);
return _fun113721;
}, [a0]])]);
return property;
}
function _fun113722() { // fn#113722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2764, offset: 0x02404d10, size: 178 bytes, params: 1, frame: 23
var environment;
var r2;
var value5;
var moduleValue;
var media;
var value7;
if (messages == null) {
value = environment.__proto__;
return EMPTY_MEDIA_RESULTS;
}
let length = messages.length;
if (length === 0) {
value = environment.__proto__;
return EMPTY_MEDIA_RESULTS;
}
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_113709(messages);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
media = moduleValue.getMedia(searchContext, [value5]);
media.forEach(_fun113723);
length = items2.length;
if (length >= 9) {
break;
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r2 = value7;
continue;
}
}
return items2;
}
function _fun113724({media, originView}) { // fn#113724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:3060, offset: 0x02404dc2, size: 181 bytes, params: 2, frame: 18
var showAgeVerificationGetStartedModal;
var object2;
var value;
const r7 = messages?.find(function({id}) {
return id === media.messageId;
});
const explicitMediaRedactionNativeUtilsModule = require(13344) /* metro dependency 13344: ExplicitMediaRedactionNativeUtils */;
if (explicitMediaRedactionNativeUtilsModule.shouldAgeVerifyForSearchMedia(media, r7)) {
value = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = value.showAgeVerificationGetStartedModal;
object2 = {};
object2.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.SEARCH_MEDIA_PREVIEW;
Reflect.apply(showAgeVerificationGetStartedModal, value, [object2]);
} else {
env0_9(media, originView);
}
}
function _fun113726() { // fn#113726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:3413, offset: 0x02404e91, size: 531 bytes, params: 1, frame: 23
var environment;
var r7;
var length;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
var object;
var value5;
var SECTION;
var object4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ZZpBr4;
var jsxRuntimeEnv1_17Binding;
var binding;
var forEach;
var object7;
var value6;
var object8;
var LBYpDH;
var MEDIA_GRID;
var slice;
const items2 = [];
if (!isInitialSearchQuery) {
length = items2.length;
value2 = 0;
reducibleJoin5: while (true) {
if (value2 === length) {
value3 = environment.__proto__;
if (value2 < env0_11) {
r7 = value2;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r7}]);
value4 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value4 < env0_11) {
r7 = value4;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
return items2;
}
break reducibleJoin5;
}
}
reducibleJoin7: while (true) {
if (env0_6.length > 0) {
push = items2.push;
object = {};
value5 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
object.type = SECTION;
object4 = {};
string = intl.string;
ZZpBr4 = t.ZZpBr4;
object4.title = Reflect.apply(string, intl, [ZZpBr4]);
jsxRuntimeEnv1_17Binding = jsxRuntimeEnv1_17;
object4.trailing = <ClearAllHistory searchContext={searchContext} />;
object.props = object4;
Reflect.apply(push, items2, [object]);
binding = env0_6;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun113727]);
break reducibleJoin7;
}
break reducibleJoin7;
}
let suggestedDataBinding = suggestedData;
reducibleJoin9: while (true) {
if (suggestedDataBinding == null) {
break reducibleJoin9;
}
suggestedDataBinding = suggestedData;
forEach = suggestedDataBinding.forEach;
Reflect.apply(forEach, suggestedDataBinding, [_fun113728]);
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (env0_8.length > 0) {
push = items2.push;
object7 = {};
value6 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
object7.type = SECTION;
object8 = {};
string = intl.string;
LBYpDH = t.LBYpDH;
object8.title = Reflect.apply(string, intl, [LBYpDH]);
jsxRuntimeEnv1_17Binding = jsxRuntimeEnv1_17;
object8.trailing = <ViewAll onJumpToMedia={onJumpToMedia} />;
object7.props = object8;
Reflect.apply(push, items2, [object7]);
push = items2.push;
MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
binding = env0_8;
slice = binding.slice;
Reflect.apply(push, items2, [{type: MEDIA_GRID, props: {media: Reflect.apply(slice, binding, [0, 9]),
mediaSize: env0_7, onPress: env0_10, animate: true}}]);
break reducibleJoin11;
}
break reducibleJoin11;
}
return items2;
}
function _fun113729() { // fn#113729, offset: 0x024050e6, size: 23 bytes, params: 1, frame: 2
return isLoadingMediaGrid ? _fun113730 : null;
}
function useSuggestedUsersData({searchContext}) { // fn#113732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4282, offset: 0x0240518b, size: 185 bytes, params: 2, frame: 18
var environment;
let value = environment.__proto__;
const value2 = (importDefault(7692) /* metro dependency 7692: useUserListData */)({'query': null,
'withGuildMembers': false, 'withAffinitySuggestions': true, 'affinitySuggestionsLimit': 3, 'withFriends': false,
'withFriendSuggestions': false, 'withFriendRequests': false, 'withFriendRequestsIncoming': false,
'withFriendRequestsOutgoing': false, 'excludeCurrentUser': true, query: EMPTY_SEARCH_QUERY_STRING});
const value3 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressDMItem({searchContext: searchContext});
const binding = env1_5;
const useCallback = binding.useCallback;
value = _fun113733();
value = Reflect.apply(useCallback, binding, [value, [value3, searchContext]]);
return binding.useMemo(_fun113737, [value, value2]);
}
function useSuggestedChannelsData({searchContext}) { // fn#113741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5198, offset: 0x0240541b, size: 235 bytes, params: 2, frame: 19
var environment;
const value = environment.__proto__;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const textChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun113742);
const value2 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildTextChannel({searchContext: searchContext});
const binding = env1_5;
return binding.useMemo(_fun113745, [binding.useCallback(_fun113744, [value2, searchContext]),
binding.useMemo(function() {
return textChannels.slice(0, 3);
}, [textChannels])]);
}
function _fun113718() { // fn#113718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2431, offset: 0x02404c84, size: 27 bytes, params: 1, frame: 11
return SearchHistoryStore.getSearchHistory(env0_0);
}
function _fun113719() { // fn#113719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2529, offset: 0x02404c9f, size: 46 bytes, params: 1, frame: 12
const closure = handleChange_113720;
closure();
SearchHistoryStore.addReactChangeListener(closure);
return function() {
SearchHistoryStore.removeReactChangeListener(handleChange_113720);
};
}
function _fun113727(a0) { // fn#113727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:3703, offset: 0x024050a4, size: 66 bytes, params: 2, frame: 13
const binding = env0_0;
const push = binding.push;
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
Reflect.apply(push, binding, [{type: SEARCH_HISTORY_ITEM, props: {searchHistoryItem: a0,
searchContext: searchContext}}]);
}
function _fun113730() { // fn#113730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4092, offset: 0x024050fd, size: 68 bytes, params: 1, frame: 14
const RecentsMediaGridPlaceholder = (require(15041) /* metro dependency 15041: MediaGridPlaceholder */).RecentsMediaGridPlaceholder;
return (
<RecentsMediaGridPlaceholder
numRows={3}
visible
size={env1_7}
/>
);
}
function _fun113733() { // fn#113733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4641, offset: 0x02405244, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun113735);
return _fun113736;
}
function _fun113737() { // fn#113737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4882, offset: 0x024052ef, size: 51 bytes, params: 1, frame: 13
if (env0_1.length !== 0) {
env0_1.forEach(_fun113738);
}
return [];
}
function _fun113742() { // fn#113742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5325, offset: 0x02405506, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getTextChannels(env0_1);
}
function _fun113744(a0) { // fn#113744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5463, offset: 0x0240553a, size: 68 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSuggestedSearchClicked({searchContext: searchContext,
channelId: a0});
env0_3(a0);
}
function _fun113745() { // fn#113745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5568, offset: 0x0240557e, size: 147 bytes, params: 1, frame: 20
var environment;
var push;
var object3;
var value2;
var object4;
var intl;
const items2 = [];
if (env0_4.length !== 0) {
push = items2.push;
object3 = {};
value2 = environment.__proto__.__proto__;
object3.type = SearchListItemTypes.SECTION;
object4 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object4.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HbJ7eD);
object3.props = object4;
Reflect.apply(push, items2, [object3]);
env0_4.forEach(_fun113746);
}
return items2;
}
function handleChange_113720() { // fn#113720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2534, offset: 0x02404ccd, size: 38 bytes, params: 1, frame: 12
const value = environment.__proto__;
env1_1(SearchHistoryStore.getSearchHistory(env1_0));
}
function* _fun113735(a0) { // fn#113735, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4661, offset: 0x02405273, size: 124 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var value3 = env4_1(env4_2[17]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
}
value = env4_1(env4_2[18]);
value.trackSuggestedSearchClicked({searchContext: env2_0, channelId: value4});
env2_2(a0, value4);
}
}
function _fun113738({title, items}) { // fn#113738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4928, offset: 0x02405322, size: 106 bytes, params: 2, frame: 14
var environment;
var binding;
var push;
let value = items.length !== 0;
if (value && title != null) {
binding = env0_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [{type: SearchListItemTypes.SECTION, props: {title: title}}]);
items.forEach(_fun113739);
}
}
function _fun113746({channel, lastMessageId}) { // fn#113746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5696, offset: 0x02405611, size: 80 bytes, params: 2, frame: 14
const binding = env0_0;
const push = binding.push;
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_TEXT_CHANNEL, props: {channel: channel, lastMessageId: lastMessageId,
onPress: env1_5}}]);
}
function _fun113739({user}) { // fn#113739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5026, offset: 0x0240538c, size: 69 bytes, params: 2, frame: 13
const binding = env1_0;
const push = binding.push;
const DM = SearchListItemTypes.DM;
Reflect.apply(push, binding, [{type: DM, props: {user: user, onPress: env2_3}}]);
}
@@ -0,0 +1,116 @@
/* Metro module 15086; source: modules/search/native/components/tabs/pages/messages/BaseMessagesScreen.tsx; dependencies: [31, 4792, 9674, 9614, 33, 9673, 566, 9675, 15077, 15087, 11822, 15088, 15089, 15032, 15044, 2] */
function _fun114140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:6, offset: 0x0241564f, size: 209 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 searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_6 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/BaseMessagesScreen.tsx');
exports.default = BaseMessagesScreen;
exports.trackMessageItemPress = trackMessageItemPress;
}
function BaseMessagesScreen({data, searchContext, tab, isFocused, isFirstPageLoading, isNextPageLoading, estimatedItemSize, contentContainerStyle, ItemSeparatorComponent, numColumns}) { // fn#114141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:187, offset: 0x02415720, size: 659 bytes, params: 2, frame: 34
const env0_3 = isFocused;
let r0 = isFirstPageLoading || isNextPageLoading;
var value;
const {isIndexing, isHistoricalIndexing,
documentsIndexed} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], function() {
var searchContextBinding = searchContext;
var value4 = require(dependencyMap[7]).getSearchTabFetchId(searchContextBinding, tab,
SearchQueryStore.getSearchResultsQuery(searchContextBinding));
var object = {};
object.isIndexing = SearchMessageStore.getIsIndexing(value4);
object.isHistoricalIndexing = SearchMessageStore.getIsHistoricalIndexing(value4);
object.documentsIndexed = SearchMessageStore.getDocumentsIndexed(value4);
return object;
});
const {hasError, errorText, isErrorFullscreen, isErrorToast,
showErrorToast} = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageSearchErrorScreen({searchContext: searchContext,
tab: tab, hasListItems: data.length > 0});
let value4 = (require(15087) /* metro dependency 15087: SearchFetchPendingManager */).useSearchFetchPendingManager(searchContext);
const binding = env0_3;
const value5 = binding.useCallback(_fun114143, [data.length, r0, isFocused, hasError, searchContext, tab, value4]);
binding.useEffect(_fun114144, [isFocused, r0, searchContext, value4, tab]);
binding.useEffect(_fun114145, [isErrorToast, r0, isFocused, showErrorToast]);
const value6 = binding.useMemo(_fun114146, [documentsIndexed, isHistoricalIndexing, searchContext, tab]);
if (isIndexing) {
value = importDefault(15089) /* metro dependency 15089: SearchIndexingScreen */;
value = ((Component) => <Component searchContext={searchContext} />)(value);
r0 = value;
} else if (isErrorFullscreen) {
if (r0) {
value = importDefault(15044) /* metro dependency 15044: SearchList */;
value = ((Component) => <Component contentContainerStyle={contentContainerStyle} data={data} estimatedItemSize={estimatedItemSize} onEndReached={value5} ListHeaderComponent={value6} ItemSeparatorComponent={ItemSeparatorComponent} numColumns={numColumns} />)(value);
r0 = value;
} else {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={errorText} />)(value);
r0 = value;
}
} else {
value = importDefault(15044) /* metro dependency 15044: SearchList */;
value = ((Component) => <Component contentContainerStyle={contentContainerStyle} data={data} estimatedItemSize={estimatedItemSize} onEndReached={value5} ListHeaderComponent={value6} ItemSeparatorComponent={ItemSeparatorComponent} numColumns={numColumns} />)(value);
r0 = value;
}
return r0;
}
function trackMessageItemPress({searchContext, channelId, messageId, index}) { // fn#114147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1607, offset: 0x02415b8d, size: 146 bytes, params: 2, frame: 18
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: index, entityType: MESSAGE}]);
}
function _fun114143() { // fn#114143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:935, offset: 0x02415a31, size: 151 bytes, params: 1, frame: 14
var binding;
var value2;
var defaultImport;
if (data.length !== 0) {
if (env0_4) {
binding = env0_10;
binding.add(tab);
} else if (isFocused) {
if (hasError) {
binding = env0_10;
binding.add(tab);
} else {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
defaultImport.fetchNextMessages(searchContext, tab);
}
} else {
binding = env0_10;
binding.add(tab);
}
}
}
function _fun114144() { // fn#114144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1060, offset: 0x02415ac8, size: 48 bytes, params: 1, frame: 13
var binding;
if (isFocused && !env0_4) {
binding = env0_10;
binding.flush(searchContext, tab);
}
}
function _fun114145() { // fn#114145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1113, offset: 0x02415af8, size: 41 bytes, params: 1, frame: 10
if (isErrorToast && !env0_4 && isFocused) {
showErrorToast();
}
}
function _fun114146() { // fn#114146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1162, offset: 0x02415b21, size: 108 bytes, params: 1, frame: 16
const isHistoricalIndexingBinding = isHistoricalIndexing;
const value2 = null;
return isHistoricalIndexingBinding && value2 != documentsIndexed && documentsIndexed > 0 ? ((Component) => <Component searchContext={searchContext} documentsIndexed={documentsIndexed} tab={tab} />)(importDefault(15088) /* metro dependency 15088: SearchHistoricalIndexingHeader */) : value2;
}
@@ -0,0 +1,132 @@
/* Metro module 15091; source: modules/search/native/components/tabs/pages/messages/FilesScreen.tsx; dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15086, 15085, 11822, 15090, 15043, 2] */
function _fun114169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:6, offset: 0x02416384, size: 204 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_4 = searchConstantsModule.SearchListItemTypes;
const env0_5 = searchConstantsModule.CARD_ESTIMATED_ITEM_SIZE;
const env0_6 = searchConstantsModule.FILES_OR_LINKS_NUM_COLUMNS;
const env0_7 = searchConstantsModule.FILES_OR_LINKS_GAP_WIDTH;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(FilesScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/FilesScreen.tsx');
exports.default = value;
}
function FilesScreen({searchContext, tab, isFocused, width}) { // fn#114170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:258, offset: 0x02416450, size: 410 bytes, params: 2, frame: 29
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value4 = (require(15092) /* metro dependency 15092: useFileOrLinkImageDimensions */).useFileOrLinkImageDimensions(width);
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const binding = value5;
const value6 = binding.useCallback(_fun114171, [value5, searchContext]);
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const value8 = binding.useMemo(_fun114172, [value6, value4, value3, placeholderCount]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).CardVerticalSeparator;
return ((Component) => <Component data={value8} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114172() { // fn#114172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:815, offset: 0x02416644, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object4;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114173]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'file-or-link-placeholder-' + r9;
object4 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object4.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
}
function _fun114173(a0) { // fn#114173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:856, offset: 0x0241675e, size: 80 bytes, params: 2, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getFiles(a0);
value.forEach(_fun114174);
env0_1 = env0_1 + value.length;
}
function _fun114174(a0, a1) { // fn#114174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:897, offset: 0x024167ae, size: 154 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object3 = {};
const FILE = SearchListItemTypes.FILE;
object3.type = FILE;
const object4 = {data: a0, onPress: onPress_114175};
object4.imageStyle = env2_2;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPress_114175(a0) { // fn#114175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:957, offset: 0x02416848, size: 27 bytes, params: 2, frame: 13
return env3_4(a0, env0_0);
}
@@ -0,0 +1,158 @@
/* Metro module 15093; source: modules/search/native/components/tabs/pages/messages/LinksScreen.tsx; dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15085, 15086, 11822, 15090, 15043, 2] */
function _fun114179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:6, offset: 0x0241696b, size: 204 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_4 = searchConstantsModule.SearchListItemTypes;
const env0_5 = searchConstantsModule.CARD_ESTIMATED_ITEM_SIZE;
const env0_6 = searchConstantsModule.FILES_OR_LINKS_NUM_COLUMNS;
const env0_7 = searchConstantsModule.FILES_OR_LINKS_GAP_WIDTH;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(LinksScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/LinksScreen.tsx');
exports.default = value;
}
function LinksScreen({searchContext, tab, isFocused, width}) { // fn#114180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:258, offset: 0x02416a37, size: 545 bytes, params: 2, frame: 31
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value4 = (require(15092) /* metro dependency 15092: useFileOrLinkImageDimensions */).useFileOrLinkImageDimensions(width);
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value5;
const value6 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressSearchLink(searchContext);
const value7 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const binding = env0_3;
const value12 = binding.useMemo(_fun114184, [binding.useCallback(_fun114183, [value7, searchContext]),
binding.useCallback(_fun114182, [value6, searchContext]), binding.useCallback(_fun114181, [value5,
searchContext]), value4, value3, placeholderCount, searchContext]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).CardVerticalSeparator;
return ((Component) => <Component data={value12} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114181({channelId, messageId}, a1) { // fn#114181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:764, offset: 0x02416c58, size: 90 bytes, params: 3, frame: 17
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_3(channelId, messageId);
}
function _fun114182({channelId, messageId, url, trusted}, a1) { // fn#114182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:910, offset: 0x02416cb2, size: 101 bytes, params: 3, frame: 19
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_4(url, trusted);
}
function _fun114183({channelId, messageId, mentionedChannelId}, a1) { // fn#114183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1072, offset: 0x02416d17, size: 95 bytes, params: 3, frame: 17
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_5(mentionedChannelId);
}
function _fun114184() { // fn#114184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1233, offset: 0x02416d76, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object4;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114185]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'file-or-link-placeholder-' + r9;
object4 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object4.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
}
function _fun114185(a0) { // fn#114185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1274, offset: 0x02416e90, size: 88 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const getLinks = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getLinks;
value = Reflect.apply(getLinks, value, [searchContext, a0]);
value.forEach(_fun114186);
env0_1 = env0_1 + value.length;
}
function _fun114186(a0, a1) { // fn#114186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1317, offset: 0x02416ee8, size: 178 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object3 = {};
const LINK = SearchListItemTypes.LINK;
object3.type = LINK;
const object4 = {data: a0, onPress: onPress_114187, onPressSearchLink: onPressSearchLink,
onPressGuildVoiceChannelMention: onPressGuildVoiceChannelMention};
object4.imageStyle = env2_2;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPressGuildVoiceChannelMention(a0) { // fn#114189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1447, offset: 0x02416f9a, size: 27 bytes, params: 2, frame: 13
return env3_9(a0, env0_0);
}
@@ -0,0 +1,209 @@
/* Metro module 15083; source: modules/search/native/components/tabs/pages/messages/MediaScreen.tsx; dependencies: [31, 4792, 9674, 9615, 11823, 661, 33, 15079, 15039, 15084, 15085, 11822, 4007, 9675, 9545, 15036, 13344, 5263, 5074, 15086, 15090, 15043, 2] */
function _fun114123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:6, offset: 0x02414baa, size: 280 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.SearchListItemTypes;
const env0_7 = searchConstantsModule.MEDIA_NUM_COLUMNS;
const env0_8 = searchConstantsModule.MEDIA_ITEM_GAP_WIDTH;
const env0_9 = searchConstantsModule.SearchMediaTypes;
const env0_10 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).EMPTY_MEDIA_RESULTS;
const env0_11 = (require(661) /* metro dependency 661: Constants */).MEDIA_MODAL_KEY;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(MediaScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MediaScreen.tsx');
exports.default = value;
}
function MediaScreen({searchContext, tab, isFocused, width}) { // fn#114124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:315, offset: 0x02414cc2, size: 493 bytes, params: 2, frame: 32
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (importDefault(15039) /* metro dependency 15039: useSearchMediaSize */)(width);
const value4 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const env0_3 = value4;
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: value3, numColumns: MEDIA_NUM_COLUMNS});
const binding = env0_3;
const value6 = binding.useMemo(_fun114125, [value4, searchContext]);
const value10 = binding.useMemo(_fun114131, [binding.useCallback(_fun114129,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMediaItem({searchContext: searchContext,
allMediaResults: value6, onEndReached: binding.useCallback(_fun114126, [searchContext, tab]),
onEndReachedThreshold: 500}), searchContext, value4]), value6, value3, placeholderCount]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const mediaContentContainer = value2.mediaContentContainer;
const MediaVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator;
return ((Component) => <Component data={value10} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={value3} contentContainerStyle={mediaContentContainer} ItemSeparatorComponent={MediaVerticalSeparator} numColumns={MEDIA_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114125() { // fn#114125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:648, offset: 0x02414eaf, size: 69 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
var value;
if (env0_3 != null) {
value2 = environment.__proto__;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
r0 = moduleValue.getMedia(searchContext, env0_3);
} else {
value = environment.__proto__;
r0 = EMPTY_MEDIA_RESULTS;
}
return r0;
}
function _fun114126() { // fn#114126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:710, offset: 0x02414ef4, size: 60 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchNextMessages(searchContext, tab, _fun114127);
}
function _fun114129({media, originView}, a1) { // fn#114129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1200, offset: 0x02415070, size: 248 bytes, params: 3, frame: 18
var object2;
var showAgeVerificationGetStartedModal;
var value;
const r7 = env0_3?.find(function({id}) {
return id === media.messageId;
});
const explicitMediaRedactionNativeUtilsModule = require(13344) /* metro dependency 13344: ExplicitMediaRedactionNativeUtils */;
if (explicitMediaRedactionNativeUtilsModule.shouldAgeVerifyForSearchMedia(media, r7)) {
value = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = value.showAgeVerificationGetStartedModal;
object2 = {};
object2.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.SEARCH_MEDIA_PREVIEW;
Reflect.apply(showAgeVerificationGetStartedModal, value, [object2]);
} else {
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: media.channelId, messageId: media.messageId, index: a1});
env0_6(media, originView);
}
}
function _fun114131() { // fn#114131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1581, offset: 0x02415168, size: 295 bytes, params: 1, frame: 26
var environment;
var r9;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var MEDIA_PLACEHOLDER;
var value5;
var HermesInternal;
var concat;
var object4;
var moduleValue2;
var getMediaGridItemStyles;
var length2;
var value6;
const items2 = [];
env0_5.forEach(_fun114132);
const placeholderCountBinding = placeholderCount;
const value2 = 0;
reducibleJoin3: while (true) {
if (!(placeholderCountBinding > value2)) {
break reducibleJoin3;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: MEDIA_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value2 < value4)) {
break reducibleJoin3;
}
r9 = value2;
reducibleLoop2: while (true) {
push = items2.push;
object = {};
MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
object.type = MEDIA_PLACEHOLDER;
value5 = length + r9;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'media-placeholder-' + value5;
object4 = {size: env0_2};
moduleValue2 = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getMediaGridItemStyles = moduleValue2.getMediaGridItemStyles;
length2 = env0_5.length;
object4.containerStyle = Reflect.apply(getMediaGridItemStyles, moduleValue2, [{itemIndex: length + r9,
numItems: length2, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value6 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value6 < value4) {
r9 = value6;
continue reducibleLoop2;
}
break reducibleJoin3;
}
}
return items2;
}
function _fun114127() { // fn#114127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:748, offset: 0x02414f30, size: 221 bytes, params: 1, frame: 19
var environment;
var getSearchResultsQuery;
var value2;
var searchContextBinding;
var value3;
var moduleValue2;
var messages;
let value = environment.__proto__.__proto__;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (navigationRouteUtilsNativeModule.isModalOpen(MEDIA_MODAL_KEY)) {
getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
value2 = environment.__proto__;
searchContextBinding = searchContext;
value3 = Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]);
moduleValue2 = require(9675) /* metro dependency 9675: SearchUtils */;
messages = SearchMessageStore.getMessages(moduleValue2.getSearchTabFetchId(searchContextBinding, tab, value3));
if (messages != null) {
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getMedia(searchContext, messages);
value.forEach(_fun114128);
value = require(9545) /* metro dependency 9545: useMediaViewerSources */;
value.setMediaViewerSources({sources: []});
}
}
}
function _fun114132(a0, a1) { // fn#114132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1609, offset: 0x0241528f, size: 167 bytes, params: 3, frame: 19
const binding = a1;
const push = binding.push;
const object3 = {};
const MEDIA = SearchListItemTypes.MEDIA;
object3.type = MEDIA;
const object4 = {media: a0};
object4.size = env1_2;
object4.onPress = onPress_114133;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getMediaGridItemStyles({itemIndex: a1,
numItems: env1_5.length, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function _fun114128(a0) { // fn#114128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:928, offset: 0x0241500d, size: 99 bytes, params: 2, frame: 13
var binding;
const type = a0.type;
const value = environment.__proto__.__proto__.__proto__;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
if (!(type !== ATTACHMENT && a0.type !== SearchMediaTypes.EMBED && a0.type !== SearchMediaTypes.COMPONENT)) {
binding = env0_0;
binding.push(a0.sources);
}
}
function onPress_114133(a0) { // fn#114133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1668, offset: 0x02415336, size: 27 bytes, params: 2, frame: 13
return env2_7(a0, require);
}
@@ -0,0 +1,130 @@
/* Metro module 15100; source: modules/search/native/components/tabs/pages/messages/MessagesScreen.tsx; dependencies: [31, 9674, 9615, 33, 15084, 566, 15036, 15086, 15101, 15085, 15090, 15079, 15043, 2] */
function _fun114244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:6, offset: 0x0241952b, size: 250 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_5 = searchConstantsModule.SEARCH_FILTERS_BY_TAB;
const env0_6 = searchConstantsModule.SearchFilter;
const env0_7 = searchConstantsModule.SEARCH_PINNED_MESSAGES_LINE_CLAMP;
const env0_8 = searchConstantsModule.SEARCH_MESSAGES_DEFAULT_LINE_CLAMP;
const env0_9 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_10 = searchConstantsModule.SearchListItemTypes;
const env0_11 = searchConstantsModule.MESSAGE_ESTIMATED_ITEM_SIZE;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(MessagesScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MessagesScreen.tsx');
exports.default = value;
}
function MessagesScreen({searchContext, tab, isFocused}) { // fn#114245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:366, offset: 0x02419625, size: 545 bytes, params: 2, frame: 28
const value2 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getSearchResultsQuery(searchContext);
}, [searchContext]);
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value4;
let binding = env0_3;
const value5 = binding.useCallback(_fun114247, [value4, searchContext]);
const env0_5 = binding.useRef({});
const property = SEARCH_FILTERS_BY_TAB[tab];
const Pins = SearchFilter.Pins;
const r16 = property === Pins ? SEARCH_PINNED_MESSAGES_LINE_CLAMP : SEARCH_MESSAGES_DEFAULT_LINE_CLAMP;
binding = env0_3;
const value6 = binding.useMemo(_fun114248, [r16, value3]);
const {placeholderCount, isFirstPageLoading,
isNextPageLoading} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE, numColumns: 1});
const value8 = binding.useMemo(_fun114249, [value5, r16, value2, value6, placeholderCount]);
const value9 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const BaseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const messagesContentContainer = value9.messagesContentContainer;
const MessageVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MessageVerticalSeparator;
return (
<BaseMessagesScreen
data={value8}
searchContext={searchContext}
tab={tab}
isFocused={isFocused}
estimatedItemSize={MESSAGE_ESTIMATED_ITEM_SIZE}
contentContainerStyle={messagesContentContainer}
ItemSeparatorComponent={MessageVerticalSeparator}
isFirstPageLoading={isFirstPageLoading}
isNextPageLoading={isNextPageLoading}
/>
);
}
function _fun114248() { // fn#114248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:780, offset: 0x02419861, size: 58 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(15101) /* metro dependency 15101: MessageSearchResultParser */;
const binding = env0_2;
const binding2 = env0_6;
const value3 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(binding, binding2);
return value instanceof Object ? value : value3;
}
function _fun114249() { // fn#114249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:988, offset: 0x0241989b, size: 181 bytes, params: 1, frame: 17
var r3;
var binding;
var forEach;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114250]);
break reducibleJoin2;
}
const adjustedPlaceholderCount = (require(15090) /* metro dependency 15090: PlaceholderUtils */).getAdjustedPlaceholderCount({numColumns: 1,
numResults: items2.length, placeholderCount: placeholderCount});
const value3 = 0;
if (value3 < adjustedPlaceholderCount) {
r3 = value3;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r3}]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (value4 < adjustedPlaceholderCount) {
r3 = value4;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
return items2;
}
function _fun114250(a0, a1) { // fn#114250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1022, offset: 0x02419950, size: 109 bytes, params: 3, frame: 17
const binding = a1;
const push = binding.push;
const object3 = {};
const MESSAGE = SearchListItemTypes.MESSAGE;
object3.type = MESSAGE;
const object4 = {};
object4.message = env1_7.parse(a0);
object4.onPress = onPress_114251;
object4.lineClamp = env1_6;
object4.messageSizeCacheRef = env1_5;
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPress_114251(a0) { // fn#114251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1087, offset: 0x024199bd, size: 27 bytes, params: 2, frame: 13
return env2_4(a0, require);
}
@@ -0,0 +1,183 @@
/* Metro module 15107; source: modules/search/native/components/tabs/pages/messages/PinsScreen.tsx; dependencies: [31, 11169, 4792, 9674, 9615, 9614, 661, 33, 566, 15040, 11168, 15036, 9673, 15079, 15044, 15043, 15100, 2] */
function _fun115125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:6, offset: 0x02454e0e, size: 326 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelPinsStore = importDefault(11169) /* metro dependency 11169: ChannelPinsStore */;
const env0_5 = (require(11169) /* metro dependency 11169: ChannelPinsStore */).FetchState;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_8 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_9 = searchConstantsModule.SearchListItemTypes;
const env0_10 = searchConstantsModule.SEARCH_PINNED_MESSAGES_LINE_CLAMP;
const env0_11 = searchConstantsModule.MESSAGE_ESTIMATED_ITEM_SIZE;
const env0_12 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_13 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(PinsScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/PinsScreen.tsx');
exports.default = value;
}
function InitialPinsScreen({searchContext, isFocused}) { // fn#115126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:376, offset: 0x02454f54, size: 487 bytes, params: 2, frame: 23
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const env0_3 = value3;
env0_3.useEffect(_fun115128, [isFocused, value2, searchContext.channelId]);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelPinsStore],
_fun115129);
const items2 = value4.items;
const showLoading = value4.showLoading;
const value6 = env0_3.useCallback(_fun115130,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext}),
searchContext]);
const env0_8 = env0_3.useRef({});
const value7 = env0_3.useMemo(_fun115131, [value3, value6, showLoading, items2]);
const value8 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const SearchList = importDefault(15044) /* metro dependency 15044: SearchList */;
object2 = {contentContainerStyle: value8.messagesContentContainer, data: value7, onEndReached: onEndReached,
estimatedItemSize: MESSAGE_ESTIMATED_ITEM_SIZE};
const MessageVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MessageVerticalSeparator;
object2.ItemSeparatorComponent = MessageVerticalSeparator;
return <SearchList {...object2} />;
}
function PinsScreen({searchContext, tab, isFocused}) { // fn#115135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1806, offset: 0x0245540f, size: 233 bytes, params: 2, frame: 21
var r0;
var value;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, fluxModule, [[SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]])) {
if (searchContext.type === SearchTypes.CHANNEL) {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
} else if (searchContext.type === SearchTypes.GUILD_CHANNEL) {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
} else if (searchContext.type !== SearchTypes.THREAD) {
value = importDefault(15100) /* metro dependency 15100: MessagesScreen */;
value = ((Component) => <Component searchContext={searchContext} tab={tab} isFocused={isFocused} />)(value);
r0 = value;
} else {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
}
} else {
value = importDefault(15100) /* metro dependency 15100: MessagesScreen */;
value = ((Component) => <Component searchContext={searchContext} tab={tab} isFocused={isFocused} />)(value);
r0 = value;
}
return r0;
}
function _fun115128() { // fn#115128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:597, offset: 0x02455156, size: 66 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (env0_2 && isFocused) {
value2 = environment.__proto__;
defaultImport = importDefault(11168) /* metro dependency 11168: ChannelPinActionCreators */;
defaultImport.fetchPins(searchContext.channelId);
}
}
function _fun115129() { // fn#115129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:706, offset: 0x02455198, size: 87 bytes, params: 1, frame: 14
const value = environment.__proto__;
const pins = ChannelPinsStore.getPins(searchContext.channelId);
return {items: pins?.items, showLoading: pins == null || pins.state === FetchState.LOADING};
}
function _fun115130({channelId, messageId}, a1) { // fn#115130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:916, offset: 0x024551ef, size: 155 bytes, params: 3, frame: 21
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: a1, entityType: MESSAGE}]);
env0_6(channelId, messageId);
}
function _fun115131() { // fn#115131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1170, offset: 0x0245528a, size: 134 bytes, params: 1, frame: 17
var environment;
var r5;
var forEach;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
let itemsBinding = items;
reducibleJoin2: while (true) {
if (itemsBinding == null) {
break reducibleJoin2;
}
itemsBinding = items;
forEach = itemsBinding.forEach;
Reflect.apply(forEach, itemsBinding, [_fun115132]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!showLoading) {
break reducibleJoin5;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_3)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_3) {
r5 = value4;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
}
function InitialPinsScreenOnEndReached() { // fn#115134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1613, owner: InitialPinsScreen.onEndReached, offset: 0x024553a2, size: 109 bytes, params: 1, frame: 19
var pinnedAt;
var value3;
let value = environment.__proto__;
value = undefined;
const defaultImport = importDefault(11168) /* metro dependency 11168: ChannelPinActionCreators */;
const fetchPins = defaultImport.fetchPins;
const channelId = searchContext.channelId;
if (items == null) {
pinnedAt = value;
} else {
value3 = items.at(-1);
pinnedAt = value3 == null ? value : value3.pinnedAt;
}
Reflect.apply(fetchPins, defaultImport, [channelId, {before: pinnedAt}]);
return value;
}
function _fun115132({message}, a1) { // fn#115132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1207, offset: 0x02455310, size: 99 bytes, params: 3, frame: 15
const binding = a1;
const push = binding.push;
const MESSAGE = SearchListItemTypes.MESSAGE;
Reflect.apply(push, binding, [{type: MESSAGE, props: {message: message, onPress: onPress_115133,
lineClamp: SEARCH_PINNED_MESSAGES_LINE_CLAMP, messageSizeCacheRef: env1_8}}]);
}
function onPress_115133({channelId, messageId}) { // fn#115133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1273, offset: 0x02455373, size: 47 bytes, params: 2, frame: 13
return env2_7({channelId: channelId, messageId: messageId}, require);
}
@@ -0,0 +1,84 @@
/* Metro module 15087; source: modules/search/native/components/tabs/pages/messages/SearchFetchPendingManager.tsx; dependencies: [7, 6, 31, 11822, 6518, 2] */
function _fun114148(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:6, offset: 0x02415c1f, size: 165 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = value(SearchFetchPendingManager);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchFetchPendingManager.tsx');
exports.useSearchFetchPendingManager = useSearchFetchPendingManager;
}
function SearchFetchPendingManager() { // fn#114149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:131, offset: 0x02415cc4, size: 129 bytes, params: 1, frame: 14
env0_2(this, SearchFetchPendingManager);
const Set = global.Set;
this.pending = new Set();
this.add = add_114150;
this.remove = remove_114151;
this.has = has_114152;
this.flush = flush_114153;
this.reset = reset_114154;
}
function useSearchFetchPendingManager(a0) { // fn#114155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:599, offset: 0x02415e1f, size: 86 bytes, params: 2, frame: 15
const env0_0 = a0;
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun114156);
env0_3.useEffect(_fun114157, [a0, value2]);
return value2;
}
function SearchFetchPendingManagerAdd(a0) { // fn#114150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:232, owner: SearchFetchPendingManager.add, offset: 0x02415d45, size: 30 bytes, params: 2, frame: 11
env0_0.pending.add(a0);
}
function SearchFetchPendingManagerRemove(a0) { // fn#114151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:269, owner: SearchFetchPendingManager.remove, offset: 0x02415d63, size: 30 bytes, params: 2, frame: 11
env0_0.pending.delete(a0);
}
function SearchFetchPendingManagerHas(a0) { // fn#114152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:306, owner: SearchFetchPendingManager.has, offset: 0x02415d81, size: 28 bytes, params: 2, frame: 11
return env0_0.pending.has(a0);
}
function SearchFetchPendingManagerFlush(a0, a1) { // fn#114153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:340, owner: SearchFetchPendingManager.flush, offset: 0x02415d9d, size: 85 bytes, params: 3, frame: 14
var value2;
var defaultImport;
const binding = env0_0;
if (binding.has(a1)) {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (defaultImport.fetchNextMessages(a0, a1)) {
env0_0.remove(a1);
}
}
}
function SearchFetchPendingManagerReset() { // fn#114154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:422, owner: SearchFetchPendingManager.reset, offset: 0x02415df2, size: 45 bytes, params: 1, frame: 10
const binding = env0_0;
const Set = global.Set;
binding.pending = new Set();
}
function _fun114156() { // fn#114156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:655, offset: 0x02415e75, size: 29 bytes, params: 1, frame: 9
let value = environment.__proto__;
const binding = env1_4;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function _fun114157() { // fn#114157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:687, offset: 0x02415e92, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(env0_0, _fun114158);
}
function _fun114158(a0, a1) { // fn#114158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:726, offset: 0x02415ec9, size: 31 bytes, params: 3, frame: 9
var value;
if (a1 !== a0) {
value = environment.__proto__;
env1_1.reset();
}
}
@@ -0,0 +1,55 @@
/* Metro module 15088; source: modules/search/native/components/tabs/pages/messages/SearchHistoricalIndexingHeader.tsx; dependencies: [31, 1949, 9615, 33, 4501, 9673, 6239, 4573, 1244, 2] */
function _fun114159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:6, offset: 0x02415ee8, size: 249 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const SEARCH_LIST_HORIZONTAL_PADDING = searchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const SEARCH_ROW_TAP_STATE_PADDING = searchConstantsModule.SEARCH_ROW_TAP_STATE_PADDING;
const env0_5 = searchConstantsModule.SearchTabs;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {marginBottom: 16},
headerMessages: {marginHorizontal: SEARCH_LIST_HORIZONTAL_PADDING, marginTop: SEARCH_ROW_TAP_STATE_PADDING}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchHistoricalIndexingHeader.tsx');
exports.default = HistoricalIndexingHeader;
}
function HistoricalIndexingHeader({searchContext, documentsIndexed, tab}) { // fn#114160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:328, offset: 0x02415fe1, size: 322 bytes, params: 2, frame: 21
const styles = useStyles();
const binding = styles;
const value2 = binding.useMemo(_fun114161, [documentsIndexed]);
const value3 = binding.useMemo(function() {
return tab === SearchTabs.MESSAGES ? styles.headerMessages : tab !== SearchTabs.PINS ? undefined : styles.headerMessages;
}, [styles.headerMessages, tab]);
binding.useEffect(_fun114163, [documentsIndexed, searchContext]);
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const items2 = [styles.header, value3];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Card
variant="primary"
border="subtle"
style={items2}
>
<Text variant="heading-sm/normal" color="interactive-text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['4Y3O+O'], {count: value2})}
</Text>
</Card>
);
}
function _fun114161() { // fn#114161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:429, offset: 0x02416123, size: 48 bytes, params: 1, frame: 11
const Number = global.Number;
const value = Number(documentsIndexed);
return value.toLocaleString(LocaleStore.locale);
}
function _fun114163() { // fn#114163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:585, offset: 0x0241618b, size: 68 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchIndexing({searchContext: searchContext,
isHistoricalIndexing: true, documentsIndexed: documentsIndexed});
}
@@ -0,0 +1,21 @@
/* Metro module 15089; source: modules/search/native/components/tabs/pages/messages/SearchIndexingScreen.tsx; dependencies: [31, 33, 9673, 9675, 15032, 2] */
function _fun114164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:6, offset: 0x024161cf, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchIndexingScreen.tsx');
exports.default = SearchIndexingScreen;
}
function SearchIndexingScreen({searchContext}) { // fn#114165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:126, offset: 0x0241625d, size: 115 bytes, params: 2, frame: 16
env0_3.useEffect(_fun114166, [searchContext]);
return ((Component) => <Component text={(require(9675) /* metro dependency 9675: SearchUtils */).getIndexingErrorText(searchContext)} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */);
}
function _fun114166() { // fn#114166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:188, offset: 0x024162d0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchIndexing({searchContext: searchContext});
}
@@ -0,0 +1,25 @@
/* Metro module 15060; source: modules/search/native/components/tabs/pages/placeholders/FileOrLinkGridPlaceholder.tsx; dependencies: [31, 33, 15040, 4584, 4017, 15061, 2] */
function _fun113957(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:6, offset: 0x0240df61, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FileOrLinkGridPlaceholder.tsx');
exports.default = FileOrLinkGridPlaceholderItem;
}
function FileOrLinkGridPlaceholderItem({imageStyle, containerStyle}) { // fn#113958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:250, offset: 0x0240dfef, size: 235 bytes, params: 2, frame: 21
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const value5 = env0_3.useMemo(_fun113959, [imageStyle.width,
imageStyle.height + 108 * (require(4584) /* metro dependency 4584: useFontScale */).useFontScale()]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [containerStyle, value2];
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
return (
<View style={items2} pointerEvents="none">
<SearchListCardContainer containerStyle={value5} />
</View>
);
}
@@ -0,0 +1,53 @@
/* Metro module 15067; source: modules/search/native/components/tabs/pages/placeholders/FormRowPlaceholder.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 2] */
function _fun113996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15264:6, offset: 0x0240ff50, size: 468 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const SEARCH_ROW_TAP_STATE_PADDING = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_ROW_TAP_STATE_PADDING;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.itemContainer = {'flexDirection': 'row', 'paddingHorizontal': 16, 'overflow': 'hidden', 'height': 64,
'paddingVertical': null, 'alignItems': 'center', paddingVertical: SEARCH_ROW_TAP_STATE_PADDING};
const object6 = {'height': 48, 'width': 48, 'borderRadius': null, 'marginRight': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object2.avatar = object6;
object2.innerContainer = {'justifyContent': 'center', 'flex': 1};
const object7 = {'width': '50%', 'borderRadius': null, 'height': 16, 'marginBottom': 8};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.backgroundColor = BORDER_SUBTLE;
object2.upperText = object7;
const object8 = {'justifyContent': 'center', 'width': '100%', 'borderRadius': null, 'height': 16};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.backgroundColor = BORDER_SUBTLE;
object2.lowerText = object8;
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FormRowPlaceholder.tsx');
exports.default = FormRowPlaceholderItem;
}
function FormRowPlaceholderItem({style}) { // fn#113997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15264:881, offset: 0x02410124, size: 236 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[value2, styles.itemContainer, style]} pointerEvents="none">
<View style={styles.avatar} />
<View style={styles.innerContainer}>
<View style={styles.upperText} />
<View style={styles.lowerText} />
</View>
</View2>
);
}
@@ -0,0 +1,24 @@
/* Metro module 15042; source: modules/search/native/components/tabs/pages/placeholders/GridItemPlaceholder.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
function _fun113834(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15239:6, offset: 0x02407af2, size: 257 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'flex': 1, 'borderRadius': null, 'overflow': 'hidden'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.backgroundColor = BORDER_SUBTLE;
const env0_2 = Reflect.apply(createStyles, createStylesModule, [{imageContainer: object}]);
value = value.memo(_fun113835);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/GridItemPlaceholder.tsx');
exports.default = value;
}
function _fun113835({width, height, style}) { // fn#113835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15239:288, offset: 0x02407bf3, size: 85 bytes, params: 2, frame: 18
const styles = useStyles();
return <View style={[{width: width, height: height}, styles.imageContainer, style]} />;
}
@@ -0,0 +1,115 @@
/* Metro module 15041; source: modules/search/native/components/tabs/pages/placeholders/MediaGridPlaceholder.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 15042, 22, 4573, 1244, 11822, 15043, 2] */
function _fun113827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:6, offset: 0x02407515, size: 403 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_5 = value.MEDIA_NUM_COLUMNS;
const SEARCH_LIST_SECTION_TOP_PADDING = value.SEARCH_LIST_SECTION_TOP_PADDING;
const env0_6 = value.MEDIA_ITEM_GAP_WIDTH;
const SEARCH_LIST_HORIZONTAL_PADDING = value.SEARCH_LIST_HORIZONTAL_PADDING;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'zIndex': 1, 'position': 'absolute', 'width': '100%'}};
object2.recentsContainer = {position: 'relative', paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING};
object2.row = {flexDirection: 'row'};
object2.section = {'flex': 1, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between', 'textTransform': 'none', 'paddingTop': null, 'paddingBottom': 8,
paddingTop: SEARCH_LIST_SECTION_TOP_PADDING};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.backgroundColor = BORDER_SUBTLE;
object2.sectionItem = object3;
object2.sectionText = {opacity: 0};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MediaGridPlaceholder.tsx');
exports.default = MediaGridPlaceholderItem;
exports.RecentsMediaGridPlaceholder = RecentsMediaGridPlaceholder;
}
function MediaGridPlaceholderItem({size, containerStyle}) { // fn#113828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:713, offset: 0x024076a8, size: 148 bytes, params: 2, frame: 20
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[containerStyle, value2]} pointerEvents="none">
{((Component) => <Component height={size} width={size} style={containerStyle} />)(importDefault(15042) /* metro dependency 15042: GridItemPlaceholder */)}
</View>
);
}
function RecentsMediaGridPlaceholder({visible, size, numRows}) { // fn#113829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1084, offset: 0x0240773c, size: 528 bytes, params: 2, frame: 29
const styles = useStyles();
const binding = env0_3;
const value3 = binding.useMemo(_fun113831, [binding.useMemo(function() {
return require(dependencyMap[9]).range(0, numRows * MEDIA_NUM_COLUMNS);
}, [numRows])]);
const value4 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(visible);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container];
items2[1] = styles.recentsContainer;
items2[2] = value4;
let sectionItem = styles.sectionItem;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let sectionText = styles.sectionText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const LBYpDH = (require(1244) /* metro dependency 1244: indexNative */).t.LBYpDH;
let view = <View style={sectionItem}><Text style={sectionText} maxFontSizeMultiplier={2} accessibilityRole="header" variant="text-sm/semibold" color="interactive-text-default">{Reflect.apply(string,
intl, [LBYpDH])}</Text></View>;
sectionItem = styles.sectionItem;
sectionText = styles.sectionText;
string = intl.string;
const LFTAUp = (require(1244) /* metro dependency 1244: indexNative */).t.LFTAUp;
view = <View style={styles.section}>{view}<View style={sectionItem}><Text variant="text-sm/semibold" color="text-brand" style={sectionText}>{Reflect.apply(string,
intl, [LFTAUp])}</Text></View></View>;
return (
<View2 style={items2} pointerEvents="none">
{[view, value3.map(_fun113832)]}
</View2>
);
}
function _fun113831() { // fn#113831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1218, offset: 0x02407984, size: 50 bytes, params: 1, frame: 13
const moduleValue = require(22) /* metro dependency 22 */;
return moduleValue.chunk(env0_3, MEDIA_NUM_COLUMNS);
}
function _fun113832(a0, a1) { // fn#113832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1829, offset: 0x024079b6, size: 173 bytes, params: 3, frame: 22
var environment;
const env0_0 = a1;
const value = environment.__proto__;
const Fragment = env1_3.Fragment;
return (
<Fragment key={a1}>
<View style={styles.row}>
{a0.map(_fun113833)}
</View>
{a1 < env0_4.length - 1 && ((MediaVerticalSeparator) => <MediaVerticalSeparator />)((require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator)}
</Fragment>
);
}
function _fun113833(a0, a1) { // fn#113833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1893, offset: 0x02407a63, size: 143 bytes, params: 3, frame: 22
const GridItemPlaceholder = importDefault(15042) /* metro dependency 15042: GridItemPlaceholder */;
const sizeBinding = size;
const searchPlatformUtilsModule = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
const getMediaGridItemStyles = searchPlatformUtilsModule.getMediaGridItemStyles;
return (
<GridItemPlaceholder
height={sizeBinding}
width={sizeBinding}
style={Reflect.apply(getMediaGridItemStyles, searchPlatformUtilsModule,
[{itemIndex: require * MEDIA_NUM_COLUMNS + a1, numItems: env1_3.length, numColumns: MEDIA_NUM_COLUMNS,
spacing: MEDIA_ITEM_GAP_WIDTH}])}
key={a1}
/>
);
}
@@ -0,0 +1,16 @@
/* Metro module 15073; source: modules/search/native/components/tabs/pages/placeholders/MemberRowPlaceholder.tsx; dependencies: [31, 33, 4501, 15067, 2] */
function _fun114033(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15270:6, offset: 0x02411b43, size: 172 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {paddingHorizontal: 0}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MemberRowPlaceholder.tsx');
exports.default = MemberRowPlaceholderItem;
}
function MemberRowPlaceholderItem() { // fn#114034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15270:301, offset: 0x02411bef, size: 56 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.container} />)(importDefault(15067) /* metro dependency 15067: FormRowPlaceholder */);
}
@@ -0,0 +1,11 @@
/* Metro module 15090; source: modules/search/native/components/tabs/pages/placeholders/PlaceholderUtils.tsx; dependencies: [2] */
function _fun114167(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15287:6, offset: 0x02416304, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/PlaceholderUtils.tsx');
exports.getAdjustedPlaceholderCount = function({numColumns, numResults, placeholderCount}) {
var value = 0;
return value === placeholderCount ? value : placeholderCount + (numColumns - numResults % numColumns);
};
}
@@ -0,0 +1,56 @@
/* Metro module 15111; source: modules/search/native/hooks/useAutoSearchGuildChannelTab.tsx; dependencies: [31, 11823, 9675, 11828, 22, 11822, 2] */
function _fun115164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15308:6, offset: 0x024561fa, size: 143 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).SEARCH_TEXT_INPUT_DEBOUNCE_TIME;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useAutoSearchGuildChannelTab.tsx');
exports.useAutoSearchGuildChannelTab = useAutoSearchGuildChannelTab;
}
function useAutoSearchGuildChannelTab(a0, a1) { // fn#115165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15308:273, offset: 0x02456289, size: 147 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_3;
const value = binding.useCallback(_fun115166, [a0]);
binding.useEffect(_fun115167, [a1, value]);
binding.useEffect(_fun115168, [a0, a1, value]);
binding.useEffect(function() {
return _fun115170;
}, [a0]);
}
function _fun115166(a0) { // fn#115166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15308:337, offset: 0x0245631c, size: 105 bytes, params: 2, frame: 14
let value = environment.__proto__;
const guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(env0_0);
if (guildIdFromSearchContext != null) {
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
value.searchGuildChannelTab({searchContext: env0_0, searchQueryString: a0, guildId: guildIdFromSearchContext});
}
}
function _fun115167() { // fn#115167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15308:494, offset: 0x02456385, size: 29 bytes, params: 1, frame: 11
if (!require) {
env0_2('');
}
}
function _fun115168() { // fn#115168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15308:530, offset: 0x024563a2, size: 96 bytes, params: 1, frame: 18
if (require) {
return undefined;
}
const moduleValue = require(22) /* metro dependency 22 */;
return (importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).subscribeTextInputValue(env0_0,
moduleValue.debounce(env0_2, SEARCH_TEXT_INPUT_DEBOUNCE_TIME), true);
}
function _fun115169() { // fn#115169, offset: 0x02456402, size: 11 bytes, params: 1, frame: 1
return _fun115170;
}
function _fun115170() { // fn#115170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15308:646, offset: 0x0245640d, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).cleanupGuildChannelTab(env1_0);
}
@@ -0,0 +1,62 @@
/* Metro module 15112; source: modules/search/native/hooks/useAutoSearchMembersTab.tsx; dependencies: [31, 9674, 11823, 661, 22, 9675, 11828, 11822, 2] */
function _fun115171(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:6, offset: 0x0245643a, size: 181 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 searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_5 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).SEARCH_TEXT_INPUT_DEBOUNCE_TIME;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useAutoSearchMembersTab.tsx');
exports.useAutoSearchMembersTab = useAutoSearchMembersTab;
}
function useAutoSearchMembersTab(a0, a1) { // fn#115172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:295, offset: 0x024564ef, size: 83 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_3;
binding.useEffect(_fun115173, [a1, a0]);
binding.useEffect(function() {
return _fun115176;
}, [a0]);
}
function _fun115173() { // fn#115173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:346, offset: 0x02456542, size: 98 bytes, params: 1, frame: 17
if (require) {
return undefined;
}
return (importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).subscribeTextInputValue(env0_0,
(require(22) /* metro dependency 22 */).debounce(_fun115174, SEARCH_TEXT_INPUT_DEBOUNCE_TIME));
}
function _fun115175() { // fn#115175, offset: 0x0245668f, size: 11 bytes, params: 1, frame: 1
return _fun115176;
}
function _fun115174(a0) { // fn#115174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:382, offset: 0x024565a4, size: 235 bytes, params: 2, frame: 19
var r4;
var guildIdFromSearchContext;
var value4;
var binding;
var channelIds;
if (!SearchQueryStore.isAutocompleteVisible(env1_0)) {
guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(env1_0);
value4 = null;
if (value4 != guildIdFromSearchContext) {
binding = env1_0;
channelIds = SearchQueryStore.getChannelIds(binding);
r4 = channelIds.size === 0 || channelIds.size !== 1 ? value4 : global.Array.from(channelIds)[0];
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).searchGuildMemberTab({searchContext: binding,
searchQueryString: a0, guildId: guildIdFromSearchContext, channelId: r4,
threadId: binding.type !== SearchTypes.THREAD ? value4 : r4});
}
}
}
function _fun115176() { // fn#115176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:805, offset: 0x0245669a, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).cleanupGuildMemberTab(env1_0);
}
@@ -0,0 +1,56 @@
/* Metro module 15113; source: modules/search/native/hooks/useAutoSearchPeopleTab.tsx; dependencies: [31, 9674, 11823, 7693, 11828, 22, 11822, 2] */
function _fun115177(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15310:6, offset: 0x024566c7, size: 159 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 searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_5 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).SEARCH_TEXT_INPUT_DEBOUNCE_TIME;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useAutoSearchPeopleTab.tsx');
exports.useAutoSearchPeopleTab = useAutoSearchPeopleTab;
}
function useAutoSearchPeopleTab(a0, a1) { // fn#115178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15310:271, offset: 0x02456766, size: 113 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_3;
binding.useEffect(_fun115179, [a1, a0]);
binding.useEffect(_fun115180, [a0, a1]);
binding.useEffect(function() {
return _fun115183;
}, [a0]);
}
function _fun115179() { // fn#115179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15310:321, offset: 0x024567d7, size: 85 bytes, params: 1, frame: 15
var value2;
if (!require) {
value2 = environment.__proto__;
(require(7693) /* metro dependency 7693: UserAffinitiesActionCreators */).fetchUserAffinitiesV2();
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).searchPeopleTab(env0_0, '');
}
}
function _fun115180() { // fn#115180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15310:415, offset: 0x0245682c, size: 98 bytes, params: 1, frame: 17
if (require) {
return undefined;
}
return (importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).subscribeTextInputValue(env0_0,
(require(22) /* metro dependency 22 */).debounce(_fun115181, SEARCH_TEXT_INPUT_DEBOUNCE_TIME));
}
function _fun115182() { // fn#115182, offset: 0x024568d7, size: 11 bytes, params: 1, frame: 1
return _fun115183;
}
function _fun115181(a0) { // fn#115181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15310:451, offset: 0x0245688e, size: 73 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
if (!SearchQueryStore.isAutocompleteVisible(env1_0)) {
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).searchPeopleTab(env1_0, a0);
}
}
function _fun115183() { // fn#115183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15310:588, offset: 0x024568e2, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).cleanupPeopleTab(env1_0);
}
@@ -0,0 +1,67 @@
/* Metro module 15114; source: modules/search/native/hooks/useAutoTrackSearchTabCountsViewedAnalytics.tsx; dependencies: [31, 9615, 9673, 2] */
function _fun115184(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15311:6, offset: 0x0245690f, size: 139 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let env0_3 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchTabs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useAutoTrackSearchTabCountsViewedAnalytics.tsx');
exports.useAutoTrackSearchTabCountsViewedAnalytics = function(a0) {
var searchContext = a0.searchContext;
var env0_0 = searchContext;
var visibleTabCounts = a0.visibleTabCounts;
var env0_1 = visibleTabCounts;
var visibleTabs = a0.visibleTabs;
var binding = visibleTabs;
var env0_3 = binding.useRef(visibleTabs);
binding.useEffect(_fun115186, [visibleTabs]);
binding.useEffect(_fun115187, [searchContext, visibleTabCounts]);
};
}
function useAutoTrackSearchTabCountsViewedAnalytics({searchContext, visibleTabCounts, visibleTabs}) { // fn#115185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15311:280, offset: 0x0245699a, size: 116 bytes, params: 2, frame: 16
const binding = visibleTabs;
const env0_3 = binding.useRef(visibleTabs);
binding.useEffect(_fun115186, [visibleTabs]);
binding.useEffect(_fun115187, [searchContext, visibleTabCounts]);
}
function _fun115187() { // fn#115187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15311:452, offset: 0x02456a0e, size: 251 bytes, params: 1, frame: 17
var environment;
var closure;
var Object;
var value3;
var value4;
var defaultImport;
var trackSearchResultReturned;
var object2;
if (visibleTabCounts != null) {
closure = getSearchTabCount;
Object = global.Object;
value3 = Object.keys(visibleTabCounts).reduce(_fun115189, 0);
if (value3 > 0) {
value4 = environment.__proto__;
defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
trackSearchResultReturned = defaultImport.trackSearchResultReturned;
object2 = {};
object2.searchContext = searchContext;
object2.searchResultTotalCount = value3;
object2.numMemberTabReturnedResults = closure(SearchTabs.MEMBERS);
object2.numChannelTabReturnedResults = closure(SearchTabs.GUILD_CHANNELS);
object2.numPeopleTabReturnedResults = closure(SearchTabs.PEOPLE);
object2.numMessageTabReturnedResults = closure(SearchTabs.MESSAGES);
object2.numMediaTabReturnedResults = closure(SearchTabs.MEDIA);
object2.numFileTabReturnedResults = closure(SearchTabs.FILES);
object2.numLinkTabReturnedResults = closure(SearchTabs.LINKS);
Reflect.apply(trackSearchResultReturned, defaultImport, [object2]);
}
}
}
function getSearchTabCount(a0) { // fn#115188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15311:491, offset: 0x02456b09, size: 40 bytes, params: 2, frame: 12
return env1_3.current.includes(a0) ? visibleTabCounts[a0] : null;
}
function _fun115189(a0, a1) { // fn#115189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15311:551, offset: 0x02456b31, size: 40 bytes, params: 3, frame: 11
return a0 + (getSearchTabCount(a1) ?? 0);
}
@@ -0,0 +1,19 @@
/* Metro module 15092; source: modules/search/native/hooks/useFileOrLinkImageDimensions.tsx; dependencies: [31, 9615, 2] */
function _fun114176(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15289:6, offset: 0x02416863, size: 158 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_1 = searchConstantsModule.FILES_OR_LINKS_GAP_WIDTH;
const env0_2 = searchConstantsModule.FILES_OR_LINKS_NUM_COLUMNS;
const env0_3 = searchConstantsModule.FILE_OR_LINK_IMAGE_RATIO;
const env0_4 = searchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useFileOrLinkImageDimensions.tsx');
exports.useFileOrLinkImageDimensions = useFileOrLinkImageDimensions;
}
function useFileOrLinkImageDimensions(a0) { // fn#114177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15289:365, offset: 0x02416901, size: 106 bytes, params: 2, frame: 16
const value4 = (a0 - 2 * SEARCH_LIST_HORIZONTAL_PADDING - (FILES_OR_LINKS_NUM_COLUMNS - 1) * FILES_OR_LINKS_GAP_WIDTH) / FILES_OR_LINKS_NUM_COLUMNS - 2;
return value4.useMemo(_fun114178, [value4 * FILE_OR_LINK_IMAGE_RATIO, value4]);
}
@@ -0,0 +1,467 @@
/* Metro module 15036; source: modules/search/native/hooks/useOnPressSearchItem.tsx; dependencies: [5, 31, 1379, 9674, 9615, 15037, 9614, 661, 1386, 11822, 11828, 1471, 3856, 1244, 8872, 3853, 1484, 15015, 15038, 1239, 9544, 4603, 4601, 8113, 1962, 7709, 5072, 9440, 6632, 6664, 8919, 1230, 9673, 2] */
function _fun113772(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:6, offset: 0x02405e0b, size: 483 bytes, params: 8, frame: 20
const env0_0 = require;
const addCurrentSearchQueryToSearchHistory = function(a0) {
addSearchHistoryItem_113773(a0, {type: SearchHistoryItemTypes.TEXT,
text: SearchQueryStore.getTextInputValue(a0),
tags: SearchQueryStore.getTags(a0)});
};
const closure = function() {
return _handleVoiceOrStageChannelConnectPress_113779.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_7 = value.SearchMediaTypes;
const env0_8 = value.SearchHistoryItemTypes;
const env0_9 = value.SearchQueryTagTypes;
const env0_10 = (require(15037) /* metro dependency 15037: SearchNavigatorConstants */).SearchNavigatorScreens;
const env0_11 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.Routes;
const env0_13 = value.ComponentActions;
const env0_14 = value.ME;
const env0_15 = value.SearchTypes;
const env0_16 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useOnPressSearchItem.tsx');
exports.useOnPressSearchLink = useOnPressSearchLink;
exports.useOnPressMessageItem = useOnPressMessageItem;
exports.useOnPressMediaItem = useOnPressMediaItem;
exports.useOnPressGroupDMItem = useOnPressGroupDMItem;
exports.useOnPressDMItem = useOnPressDMItem;
exports.useOnPressGuildTextChannel = useOnPressGuildTextChannel;
exports.handleVoiceOrStageChannelConnectPress = closure;
exports.useOnPressGuildVoiceChannel = useOnPressGuildVoiceChannel;
exports.useOnPressSearchHistoryText = useOnPressSearchHistoryText;
}
function addSearchHistoryItem_113773(a0, a1) { // fn#113773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:380, offset: 0x02405fee, size: 96 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const type = a0.type;
const DMS = SearchTypes.DMS;
if (DMS === type) {
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).delayUntilNavigationComplete(_fun113774);
} else if (SearchTypes.GUILD === type) {
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).delayUntilNavigationComplete(_fun113774);
}
}
function navigateToSearchPreview(a0, a1, a2, a3) { // fn#113776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:679, offset: 0x024060cb, size: 171 bytes, params: 5, frame: 16
var r6;
var environment;
var r2;
var navigate;
var object4;
var object5;
const env0_0 = a1;
const env0_1 = a3;
const object6 = {};
object6.channelId = a1.id;
let value = a1.getGuildId();
if (value != null) {
r2 = value;
} else {
value = environment;
r2 = ME;
r6 = value;
}
object6.guildId = r2;
object6.searchContext = a2;
if (a3 != null) {
navigate = a0.navigate;
object4 = {};
object4.screen = SearchNavigatorScreens.SEARCH_CHAT_PREVIEW;
object5 = {};
copyDataProperties(object5, object6, r6);
object5['onBeforeJumpToMessage'] = function() {
var ComponentDispatch = require(dependencyMap[19]).ComponentDispatch;
var HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
ComponentDispatch.dispatch(HIDE_CHANNEL_DETAILS, {channelId: require.id,
screenIndex: importAll.screenIndex});
};
object4.params = object5;
Reflect.apply(navigate, a0, ['sidebar', object4]);
} else {
a0.navigate(SearchNavigatorScreens.SEARCH_CHAT_PREVIEW, object6);
}
}
function _handleVoiceOrStageChannelConnectPress_113779() { // fn#113779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1158, offset: 0x024061cd, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun113781).apply(this, arguments);
}
function useOnPressSearchLink(a0) { // fn#113782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1556, offset: 0x024062a0, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useCallback(_fun113783, [a0]);
}
function useOnPressMessageItem({searchContext}) { // fn#113786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1954, offset: 0x024063fe, size: 127 bytes, params: 2, frame: 18
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = env0_4;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
return binding.useCallback(_fun113787, [value2, searchContext, Reflect.apply(useContext, binding,
[SwipeForMemberListContext])]);
}
function useOnPressMediaItem({searchContext, allMediaResults, onEndReached, onEndReachedThreshold}) { // fn#113789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2332, offset: 0x0240651f, size: 169 bytes, params: 2, frame: 21
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = value2;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
return binding.useCallback(_fun113790, [searchContext, value2, Reflect.apply(useContext, binding,
[SwipeForMemberListContext]), allMediaResults, onEndReached, onEndReachedThreshold]);
}
function useOnPressGroupDMItem({searchContext}) { // fn#113793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3233, offset: 0x024067de, size: 90 bytes, params: 2, frame: 15
return env0_4.useCallback(_fun113794,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), searchContext]);
}
function useOnPressDMItem({searchContext}) { // fn#113796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3567, offset: 0x024068fe, size: 90 bytes, params: 2, frame: 15
return env0_4.useCallback(_fun113797,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), searchContext]);
}
function useOnPressGuildTextChannel({searchContext}) { // fn#113799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3910, offset: 0x024069f4, size: 50 bytes, params: 2, frame: 14
return env0_4.useCallback(_fun113800, [searchContext]);
}
function useOnPressGuildVoiceChannel({searchContext}) { // fn#113802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4334, offset: 0x02406af7, size: 109 bytes, params: 2, frame: 16
return env0_4.useCallback(_fun113809,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(),
useOnPressGuildVoiceChannelUseVoiceChannelOnPressHandler(), searchContext]);
}
function useOnPressSearchHistoryText({searchContext}) { // fn#113811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5346, offset: 0x02406dca, size: 50 bytes, params: 2, frame: 14
return env0_4.useCallback(_fun113812, [searchContext]);
}
function _fun113774() { // fn#113774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:492, offset: 0x0240604e, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
return value.addSearchHistoryItem(env0_0, require);
}
function* _fun113781(a0) { // fn#113781, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1257, offset: 0x0240620a, size: 150 bytes, params: 2, frame: 17
if (true) {
value = a0.isGuildStageVoice();
var binding = env2_0;
var binding2 = env2_2;
var value4 = binding(binding2[24]);
if (value) {
yield value4(binding2[23], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.connectAndOpen(a0);
} else {
yield value4(binding2[25], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.openGuildVoiceModal(a0, 'Channel List');
}
}
}
function _fun113783(a0, a1) { // fn#113783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1611, offset: 0x024062cc, size: 261 bytes, params: 3, frame: 20
var environment;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value4;
const env0_0 = a1;
let value = environment.__proto__;
addCurrentSearchQueryToSearchHistory(env0_0);
const value3 = (importDefault(1471) /* metro dependency 1471: URLUtils */).safeParseWithQuery(a0);
if (value3 == null) {
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentFailedToast(intl.string(t.XiqzAp));
} else if (value3.protocol == null) {
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentFailedToast(intl.string(t.XiqzAp));
} else if (value3.hostname != null) {
value4 = (importDefault(1471) /* metro dependency 1471: URLUtils */).format(value3);
value = require(8872) /* metro dependency 8872: MaskedLinkUtils */;
value.handleClick({href: value4, onConfirm: onConfirm_113784, trusted: function() {
return require;
}});
} else {
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentFailedToast(intl.string(t.XiqzAp));
}
}
function _fun113787(a0, a1) { // fn#113787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2108, offset: 0x0240647d, size: 123 bytes, params: 3, frame: 17
var environment;
const value = environment.__proto__;
if (ChannelStore.getChannel(a0) != null) {
addCurrentSearchQueryToSearchHistory(searchContext);
(importDefault(15038) /* metro dependency 15038: MessagePreviewActionCreators */).fetchMessages(a0, a1);
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113788);
}
}
function _fun113790(a0, a1) { // fn#113790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2541, offset: 0x024065c8, size: 333 bytes, params: 3, frame: 18
var environment;
var getChannel;
var channelId;
var defaultImport;
var fetchMessages;
const env0_0 = a0;
const value = environment.__proto__;
addCurrentSearchQueryToSearchHistory(searchContext);
const type = a0.type;
const AUDIO = SearchMediaTypes.AUDIO;
if (AUDIO === type) {
getChannel = ChannelStore.getChannel;
channelId = a0.channelId;
if (Reflect.apply(getChannel, ChannelStore, [channelId]) == null) {
return undefined;
}
defaultImport = importDefault(15038) /* metro dependency 15038: MessagePreviewActionCreators */;
fetchMessages = defaultImport.fetchMessages;
channelId = a0.channelId;
Reflect.apply(fetchMessages, defaultImport, [channelId, a0.messageId]);
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113791);
} else {
var ATTACHMENT = SearchMediaTypes.ATTACHMENT;
if (ATTACHMENT === type) {
var env0_3 = 0;
allMediaResults.forEach(_fun113792);
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: [],
initialIndex: env0_3, onEndReached: onEndReached, onEndReachedThreshold: onEndReachedThreshold,
analyticsSource: 'Search', originViewOrOriginLayout: a1});
} else if (SearchMediaTypes.EMBED === type) {
var env0_3 = 0;
allMediaResults.forEach(_fun113792);
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: [],
initialIndex: env0_3, onEndReached: onEndReached, onEndReachedThreshold: onEndReachedThreshold,
analyticsSource: 'Search', originViewOrOriginLayout: a1});
} else if (SearchMediaTypes.COMPONENT === type) {
var env0_3 = 0;
allMediaResults.forEach(_fun113792);
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: [],
initialIndex: env0_3, onEndReached: onEndReached, onEndReachedThreshold: onEndReachedThreshold,
analyticsSource: 'Search', originViewOrOriginLayout: a1});
}
}
}
function _fun113794(a0) { // fn#113794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3336, offset: 0x02406838, size: 153 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
const searchContextBinding = searchContext;
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
addSearchHistoryItem_113773Binding(searchContextBinding, {type: GROUP_DM, channelId: a0});
const parent = env0_1.getParent();
if (parent != null) {
parent.goBack();
}
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).preload(ME, a0);
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113795);
}
function _fun113797(a0, a1) { // fn#113797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3665, offset: 0x02406958, size: 156 bytes, params: 3, frame: 17
var environment;
const env0_0 = a1;
const value = environment.__proto__;
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
const searchContextBinding = searchContext;
const DM = SearchHistoryItemTypes.DM;
addSearchHistoryItem_113773Binding(searchContextBinding, {type: DM, userId: a0});
const parent = env0_1.getParent();
if (parent != null) {
parent.goBack();
}
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).preload(ME, a1);
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113798);
return a1;
}
function _fun113800(a0) { // fn#113800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3987, offset: 0x02406a26, size: 159 bytes, params: 2, frame: 18
var environment;
const value = environment.__proto__;
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return null;
}
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
const searchContextBinding = searchContext;
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
addSearchHistoryItem_113773Binding(searchContextBinding, {type: GUILD_TEXT_CHANNEL, channelId: channel.id});
const defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
defaultImport.preload(channel.guild_id, channel.id);
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113801);
}
function useOnPressGuildVoiceChannelUseVoiceChannelOnPressHandler() { // fn#113803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4423, owner: useOnPressGuildVoiceChannel.useVoiceChannelOnPressHandler, offset: 0x02406b64, size: 39 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_4.useCallback(_fun113804(), []);
}
function _fun113809(a0) { // fn#113809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5098, offset: 0x02406d38, size: 146 bytes, params: 2, frame: 18
var environment;
const value = environment.__proto__;
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return null;
}
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
const searchContextBinding = searchContext;
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
addSearchHistoryItem_113773Binding(searchContextBinding, {type: GUILD_VOICE_CHANNEL, channelId: channel.id});
const parent = env0_1.getParent();
if (parent != null) {
parent.goBack();
}
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113810);
}
function _fun113812(a0, a1) { // fn#113812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5424, offset: 0x02406dfc, size: 150 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
const searchContextBinding = searchContext;
const TEXT = SearchHistoryItemTypes.TEXT;
addSearchHistoryItem_113773Binding(searchContextBinding, {type: TEXT, text: a0, tags: a1});
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).updateSearchQuery(searchContextBinding,
_fun113813);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
if (a1 != null) {
a1.forEach(_fun113814);
}
}
function onConfirm_113784() { // fn#113784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1808, offset: 0x024063d1, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(3853) /* metro dependency 3853: Linking */).openURL(env0_1);
}
function _fun113788() { // fn#113788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2256, offset: 0x024064f8, size: 39 bytes, params: 1, frame: 17
navigateToSearchPreview(env1_1, env0_0, searchContext, env1_2);
}
function _fun113791() { // fn#113791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2767, offset: 0x02406715, size: 39 bytes, params: 1, frame: 17
navigateToSearchPreview(env1_4, env0_1, searchContext, env1_5);
}
function _fun113792(a0) { // fn#113792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2884, offset: 0x0240673c, size: 162 bytes, params: 2, frame: 13
var binding;
const type = a0.type;
const value = environment.__proto__.__proto__;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
if (!(type !== ATTACHMENT && a0.type !== SearchMediaTypes.EMBED && a0.type !== SearchMediaTypes.COMPONENT)) {
binding = env0_4;
binding.push(a0.sources);
if (a0.messageId === env0_0.messageId && a0.mediaIndex === env0_0.mediaIndex) {
}
binding = env0_2;
env0_2 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
function _fun113795() { // fn#113795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3498, offset: 0x024068d1, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(require(4601) /* metro dependency 4601: transitionToChannel */).transitionToChannel(env0_0);
}
function _fun113801() { // fn#113801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4177, offset: 0x02406ac5, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = require(4601) /* metro dependency 4601: transitionToChannel */;
return value.transitionToChannel(env0_0.id);
}
function _fun113804() { // fn#113804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4485, offset: 0x02406b8b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun113806);
return _fun113808;
}
function _fun113813(a0) { // fn#113813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5514, offset: 0x02406e92, size: 50 bytes, params: 2, frame: 12
if (require != null) {
a0.setTags(require);
}
a0.setTextInputValue(env0_0);
}
function _fun113814(a0) { // fn#113814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5618, offset: 0x02406ec4, size: 101 bytes, params: 2, frame: 14
var defaultImport;
var trackSearchFilterAdd;
var value2;
const type = a0.type;
const COMPLETE = SearchQueryTagTypes.COMPLETE;
if (type === COMPLETE) {
defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
trackSearchFilterAdd = defaultImport.trackSearchFilterAdd;
value2 = environment.__proto__;
Reflect.apply(trackSearchFilterAdd, defaultImport, [{searchContext: searchContext,
searchTokenType: a0.searchTokenType, location: SearchFilterAddLocations.SEARCH_HISTORY}]);
}
}
function* _fun113806(a0) { // fn#113806, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4505, offset: 0x02406bba, size: 359 bytes, params: 2, frame: 21
var environment;
var r3;
var value9;
var transitionTo;
var binding2;
if (false) {
return undefined;
}
const env0_0 = a0;
value = environment.__proto__.__proto__.__proto__.__proto__;
let binding = env4_0;
const value3 = undefined;
const value4 = binding(env4_2[26]);
if (value4.maybeOpenAgeGateForVoiceChannel(a0.id)) {
return value3;
}
const value5 = env4_0(env4_2[27]);
if (value5.maybeOpenSpoilerGateForVoiceChannel(a0.id)) {
return value3;
}
const value6 = env4_0(env4_2[28]);
const getChannelRoleSubscriptionStatus = value6.getChannelRoleSubscriptionStatus;
const needSubscriptionToAccess = Reflect.apply(getChannelRoleSubscriptionStatus, value6,
[a0.id]).needSubscriptionToAccess;
const guildId = a0.getGuildId();
if (guildId != null) {
var value8 = env4_0(env4_2[29]);
if (value8.shouldShowMembershipVerificationGate(guildId)) {
binding = env4_0;
binding2 = env4_2;
value = binding(binding2[24]);
yield value(binding2[30], binding2.paths);
value = undefined;
if (false) {
return value;
}
value = value.openMemberVerificationModal(guildId, _fun113807);
return value;
}
}
if (needSubscriptionToAccess) {
binding = env4_0;
value9 = binding(env4_2[31]);
transitionTo = value9.transitionTo;
binding = env4_12;
r3 = Reflect.apply(transitionTo, value9, [binding.CHANNEL(a0.guild_id, env4_16.ROLE_SUBSCRIPTIONS)]);
} else {
env4_20(a0);
r3 = value3;
}
return r3;
}
@@ -0,0 +1,77 @@
/* Metro module 15040; source: modules/search/native/hooks/usePlaceholderStyles.tsx; dependencies: [4502, 9615, 1478, 566, 4017, 4504, 1305, 2] */
function _fun113822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:6, offset: 0x024071f4, size: 169 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).FADE_LAYOUT_ANIMATION_DURATION;
object = {code: 'function usePlaceholderStylesTsx1(){const{useReducedMotion,visible,withRepeat,withSequence,withTiming,STANDARD_EASING,FADE_LAYOUT_ANIMATION_DURATION}=this.__closure;if(useReducedMotion){return{opacity:visible?1:0};}if(visible){return{opacity:withRepeat(withSequence(withTiming(0.5,{duration:0}),withTiming(1,{duration:1300,easing:STANDARD_EASING}),withTiming(0.5,{duration:1300,easing:STANDARD_EASING})),-1)};}return{opacity:withTiming(0,{duration:FADE_LAYOUT_ANIMATION_DURATION})};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/usePlaceholderStyles.tsx');
exports.useFullscreenPlaceholderCount = useFullscreenPlaceholderCount;
exports.usePlaceholderAnimatedStyle = usePlaceholderAnimatedStyle;
}
function useFullscreenPlaceholderCount({placeholderHeight, numColumns}) { // fn#113823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:764, offset: 0x0240729d, size: 88 bytes, params: 2, frame: 14
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true}).height;
const Math = global.Math;
return Math.ceil(height / placeholderHeight) * numColumns;
}
function usePlaceholderAnimatedStyle(a0) { // fn#113824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:936, offset: 0x024072f5, size: 237 bytes, params: 2, frame: 20
var object2;
const env0_0 = a0;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = usePlaceholderAnimatedStyleA;
object2 = {useReducedMotion: useReducedMotion, visible: a0};
object2.withRepeat = reanimatedRexportModule.withRepeat;
object2.withSequence = reanimatedRexportModule.withSequence;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
object2.FADE_LAYOUT_ANIMATION_DURATION = FADE_LAYOUT_ANIMATION_DURATION;
closure.__closure = object2;
closure.__workletHash = 9750536800906;
closure.__initData = env0_5;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function usePlaceholderAnimatedStyleA() { // fn#113826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:1077, owner: usePlaceholderAnimatedStyle.A, offset: 0x024073e2, size: 307 bytes, params: 1, frame: 29
var withRepeat;
var moduleValue2;
var withSequence;
var value2;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
var value3;
var moduleValue5;
var value;
const object2 = {};
const binding = env0_0;
if (useReducedMotion) {
object2.opacity = binding ? 1 : 0;
} else {
value = environment.__proto__;
if (binding) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withRepeat = value.withRepeat;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue2.withSequence;
value2 = (require(4504) /* metro dependency 4504: timing */).withTiming(0.5, {duration: 0});
value3 = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 1300,
easing: STANDARD_EASING});
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
object2.opacity = Reflect.apply(withRepeat, value, [Reflect.apply(withSequence, moduleValue2, [value2,
value3,
moduleValue5.withTiming(0.5, {duration: 1300, easing: STANDARD_EASING})]), -1]);
} else {
object2.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0,
{duration: FADE_LAYOUT_ANIMATION_DURATION});
}
}
return object2;
}
@@ -0,0 +1,74 @@
/* Metro module 9672; source: modules/search/native/hooks/useSearchContext.tsx; dependencies: [31, 1379, 661, 44, 632, 2] */
function _fun75783(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:6, offset: 0x01db9aaa, size: 204 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getChannelDetailsSearchContext;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useSearchContext.tsx');
exports.useGuildSearchContext = useGuildSearchContext;
exports.useGuildChannelSearchContext = useGuildChannelSearchContext;
exports.getChannelDetailsSearchContext = closure;
exports.useChannelDetailsSearchContext = useChannelDetailsSearchContext;
}
function getChannelDetailsSearchContext(a0, a1, a2) { // fn#75784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:138, offset: 0x01db9b76, size: 147 bytes, params: 4, frame: 17
var r0;
if (a2) {
(importDefault(44) /* metro dependency 44 */)(a1 != null,
'[useChannelDetailsSearchContext] Thread must have a guild id');
r0 = {type: SearchTypes.THREAD, guildId: a1, channelId: a0};
} else {
r0 = a1 == null ? {type: SearchTypes.CHANNEL, channelId: a0} : {type: SearchTypes.GUILD_CHANNEL, guildId: a1,
channelId: a0};
}
return r0;
}
function useGuildSearchContext(a0) { // fn#75785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:502, offset: 0x01db9c09, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_3.useMemo(_fun75786, [a0]);
}
function useGuildChannelSearchContext(a0, a1) { // fn#75787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:623, offset: 0x01db9c55, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return env0_3.useMemo(_fun75788, [a0, a1]);
}
function useChannelDetailsSearchContext(a0, a1) { // fn#75789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:841, offset: 0x01db9cb4, size: 115 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
return env0_3.useMemo(_fun75791, [a0, a1,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore], _fun75790)]);
}
function _fun75786() { // fn#75786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:554, offset: 0x01db9c35, size: 32 bytes, params: 1, frame: 2
const GUILD = SearchTypes.GUILD;
return {type: GUILD, guildId: env0_0};
}
function _fun75788() { // fn#75788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:684, offset: 0x01db9c8c, size: 40 bytes, params: 1, frame: 3
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
return {type: GUILD_CHANNEL, guildId: env0_0, channelId: require};
}
function _fun75790() { // fn#75790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:924, offset: 0x01db9d27, size: 57 bytes, params: 1, frame: 12
var r1;
let value = environment.__proto__;
value = ChannelStore.getChannel(env0_0);
if (value == null) {
r1 = undefined;
} else {
value = value.isThread();
r1 = value;
}
return r1 != null && r1;
}
function _fun75791() { // fn#75791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:1024, offset: 0x01db9d60, size: 33 bytes, params: 1, frame: 15
return getChannelDetailsSearchContext(env0_0, require, env0_2);
}
@@ -0,0 +1,10 @@
/* Metro module 15226; source: modules/search/native/hooks/useSearchLayoutInsetTop.tsx; dependencies: [1585, 2] */
function _fun116474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15423:6, offset: 0x0248add7, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useSearchLayoutInsetTop.tsx');
exports.default = function() {
return importDefault(dependencyMap[0])().top + 8;
};
}
@@ -0,0 +1,15 @@
/* Metro module 15039; source: modules/search/native/hooks/useSearchMediaSize.tsx; dependencies: [9615, 2] */
function _fun113820(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15236:6, offset: 0x0240712e, size: 129 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_0 = searchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const env0_1 = searchConstantsModule.MEDIA_NUM_COLUMNS;
const env0_2 = searchConstantsModule.MEDIA_ITEM_GAP_WIDTH;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useSearchMediaSize.tsx');
exports.default = function(a0) {
var Math = global.Math;
return Math.floor((a0 - 2 * SEARCH_LIST_HORIZONTAL_PADDING - MEDIA_ITEM_GAP_WIDTH * (MEDIA_NUM_COLUMNS - 1)) / MEDIA_NUM_COLUMNS);
};
}
@@ -0,0 +1,31 @@
/* Metro module 15064; source: modules/search/native/hooks/useSearchMessageTimestamp.tsx; dependencies: [31, 21, 4788, 2] */
function _fun113990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15261:6, offset: 0x0240fb9f, size: 121 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useSearchMessageTimestamp.tsx');
exports.useSearchMessageTimestamp = useSearchMessageTimestamp;
}
function useSearchMessageTimestamp(a0, a1) { // fn#113991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15261:225, offset: 0x0240fc18, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return env0_3.useMemo(_fun113992, [a0, a1]);
}
function _fun113992() { // fn#113992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15261:283, offset: 0x0240fc4f, size: 134 bytes, params: 1, frame: 18
const value = environment.__proto__;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const extractTimestamp = defaultImport.extractTimestamp;
let id = env0_0.id;
id = id ?? require.id;
const value3 = Reflect.apply(extractTimestamp, defaultImport, [id]);
const object2 = {};
object2.timestamp = (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(value3,
true);
object2.timestampAccessibilityLabel = (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(value3,
false);
return object2;
}
@@ -0,0 +1,88 @@
/* Metro module 15077; source: modules/search/native/hooks/useSearchScreenError.tsx; dependencies: [31, 4792, 9674, 9615, 566, 9675, 1244, 3857, 9149, 2] */
function _fun114055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15274:6, offset: 0x02412606, size: 188 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 searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_6 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_MESSAGE_TAB_SENTINEL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useSearchScreenError.tsx');
exports.useMessageSearchErrorScreen = useMessageSearchErrorScreen;
exports.useMessageTabCountsErrorText = function({searchContext}) {
return require(dependencyMap[4]).useStateFromStores([SearchQueryStore, SearchMessageStore], _fun114060);
};
}
function useMessageSearchErrorScreen({searchContext, tab, hasListItems}) { // fn#114056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15274:280, offset: 0x024126c2, size: 291 bytes, params: 2, frame: 21
var intl;
const value = undefined;
const error = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore,
SearchMessageStore], function() {
var searchContextBinding = searchContext;
return SearchMessageStore.getError(require(dependencyMap[5]).getSearchTabFetchId(searchContextBinding, tab,
SearchQueryStore.getSearchResultsQuery(searchContextBinding)));
});
let r5 = error == null ? value : error.getAnyErrorMessage();
if (r5 == null) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uvDZBZ);
}
const binding = r5;
const env0_4 = binding.useRef(null);
return {hasError: error != null, errorText: r5, isErrorFullscreen: error != null && !hasListItems,
isErrorToast: error != null && hasListItems, showErrorToast: binding.useCallback(_fun114058, [error, r5])};
}
function useMessageTabCountsErrorText({searchContext}) { // fn#114059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15274:869, offset: 0x024128a4, size: 80 bytes, params: 2, frame: 15
return (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore, SearchMessageStore],
_fun114060);
}
function _fun114058() { // fn#114058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15274:622, offset: 0x02412836, size: 110 bytes, params: 1, frame: 16
var value2;
var defaultImport;
if (error !== env0_4.current) {
value2 = environment.__proto__;
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
defaultImport.open({key: 'SEARCH_ERROR_TOAST', icon: importDefault(9149) /* metro dependency 9149 */,
content: env0_3});
env0_4.current = error;
}
}
function _fun114060() { // fn#114060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15274:967, offset: 0x024128f4, size: 205 bytes, params: 1, frame: 19
var r2;
var r1;
var error;
var anyErrorMessage;
var intl;
const value = environment.__proto__;
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]));
const isInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId);
const value6 = null;
if (isInitialFetchComplete) {
if (value6 != SearchMessageStore.getTotalCount(searchTabFetchId)) {
return value6;
}
error = SearchMessageStore.getError(searchTabFetchId);
if (value6 == error) {
r1 = value6;
} else {
anyErrorMessage = error.getAnyErrorMessage();
if (value6 != anyErrorMessage) {
r2 = anyErrorMessage;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uvDZBZ);
}
r1 = r2;
}
return r1;
}
return value6;
}
@@ -0,0 +1,31 @@
/* Metro module 15106; source: modules/search/native/message_parsers/CachedSearchResultParser.tsx; dependencies: [7, 6, 2] */
function _fun115122(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15303:6, offset: 0x02454cf4, size: 127 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(7) /* metro dependency 7 */;
const env0_0 = importDefault(6) /* metro dependency 6 */;
value = value(CachedSearchResultParser);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/message_parsers/CachedSearchResultParser.tsx');
exports.CachedSearchResultParser = value;
}
function CachedSearchResultParser() { // fn#115123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15303:121, offset: 0x02454d73, size: 77 bytes, params: 1, frame: 14
this(this, CachedSearchResultParser);
const Map = global.Map;
this.resultsCache = new Map();
this.parse = parse_115124;
}
function CachedSearchResultParserParse(a0) { // fn#115124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15303:227, owner: CachedSearchResultParser.parse, offset: 0x02454dc0, size: 78 bytes, params: 2, frame: 14
let resultsCache = env0_0.resultsCache;
const value2 = resultsCache.get(a0.id);
if (value2 != null) {
return value2;
}
const binding = env0_0;
const searchResults = binding.getSearchResults(a0);
resultsCache = binding.resultsCache;
resultsCache.set(a0.id, searchResults);
return searchResults;
}
@@ -0,0 +1,159 @@
/* Metro module 15101; source: modules/search/native/message_parsers/MessageSearchResultParser.tsx; dependencies: [7, 6, 15, 17, 18, 3794, 15102, 22, 9675, 15106, 2] */
function _fun114252(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:6, offset: 0x024199d8, size: 228 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const messageRecord = importDefault(3794) /* metro dependency 3794: MessageRecord */;
const CachedSearchResultParser = (require(15106) /* metro dependency 15106: CachedSearchResultParser */).CachedSearchResultParser;
const value = _fun114256(CachedSearchResultParser);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/message_parsers/MessageSearchResultParser.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_114253() { // fn#114253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:158, offset: 0x02419abc, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_114253_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun114256(a0) { // fn#114256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:357, offset: 0x02419b1e, size: 42 bytes, params: 2, frame: 14
const closure = SearchResultMessageParser;
env0_6(closure, a0);
return env0_2(closure);
}
function SearchResultMessageParser(a0, a1) { // fn#114257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:369, offset: 0x02419b48, size: 264 bytes, params: 3, frame: 21
var environment;
var r2;
let value = environment.__proto__;
const binding = env1_3;
const value3 = undefined;
binding(this, SearchResultMessageParser);
const value4 = env1_5(SearchResultMessageParser);
const value7 = env1_4(this, _isNativeReflectConstruct_114253() ? global.Reflect.construct(value4, [],
env1_5(this).constructor) : value4.apply(this, value3));
value7.truncateMessage = truncateMessage;
value7.getSearchResults = getSearchResults;
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.tokenizeQuery(a0);
value = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchQueryFromTokens(value);
value = (require(9675) /* metro dependency 9675: SearchUtils */).getQueryContentString(value);
if (value == null) {
r2 = value3;
} else {
value = value.trim();
r2 = value;
}
value7.tokenizedQueryContent = r2 ?? '';
value7.lineClamp = a1;
return value7;
}
function truncateMessage(a0, a1) { // fn#114258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:637, owner: SearchResultMessageParser.truncateMessage, offset: 0x02419c50, size: 335 bytes, params: 3, frame: 19
var RegExp;
let value = a2;
const r8 = value !== undefined ? value : 1;
if (a0 == null) {
return null;
}
value = a0.replace(RegExp('(\\r\\n|\\n|\\r)', 'gm'), ' ');
const Set = global.Set;
const set = new Set((require(15102) /* metro dependency 15102: EnglishAnalyzer */).analyze(a1));
const value7 = value.split(RegExp('(\\W+)', 'g')).find(_fun114259);
if (value7 == null) {
return null;
}
RegExp = global.RegExp;
const value8 = '\\b' + value7;
const value9 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
const regExp = new RegExp(value8 + '\\b');
const value12 = value.search(regExp instanceof Object ? regExp : value9);
if (value12 === -1) {
return null;
}
const length = value7.length;
const Math = global.Math;
const value13 = Math.max(0, value12 - (30 * r8 - length));
const value14 = '';
const r3 = value13 > 0 ? '...' : value14;
value = value.substring(value13);
return value14 + r3 + value;
}
function getSearchResults(a0) { // fn#114260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:992, owner: SearchResultMessageParser.getSearchResults, offset: 0x02419dd0, size: 256 bytes, params: 2, frame: 18
var environment;
var messageRecord;
var value7;
var value;
let tokenizedQueryContent = env0_0.tokenizedQueryContent;
if (tokenizedQueryContent != null) {
tokenizedQueryContent = env0_0.tokenizedQueryContent;
if (tokenizedQueryContent === '') {
return a0;
}
var binding = env0_0;
var truncateMessage = binding.truncateMessage;
var content = a0.content;
tokenizedQueryContent = binding.tokenizedQueryContent;
value = Reflect.apply(truncateMessage, binding, [content, tokenizedQueryContent, binding.lineClamp]);
if (value != null) {
value7 = environment.__proto__.__proto__;
messageRecord = new MessageRecord(a0);
messageRecord.content = value;
return messageRecord;
}
value = environment.__proto__.__proto__;
var moduleValue = require(22) /* metro dependency 22 */;
var value6 = moduleValue.chain(a0.embeds).map(_fun114261).find(function(a0) {
return a0 != null;
}).value();
if (value6 != null) {
messageRecord = new MessageRecord(a0);
messageRecord.content = value6;
return messageRecord;
}
}
return a0;
}
function _fun114259(a0) { // fn#114259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:766, offset: 0x02419d9f, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (require(15102) /* metro dependency 15102: EnglishAnalyzer */).shouldHighlight(a0, env0_0);
}
function _fun114261(a0) { // fn#114261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15298:1222, offset: 0x02419ed0, size: 84 bytes, params: 2, frame: 17
const value = environment.__proto__;
const binding = env1_0;
return binding.truncateMessage(a0.rawTitle, binding.tokenizedQueryContent,
binding.lineClamp) ?? env1_0.truncateMessage(a0.rawDescription, env1_0.tokenizedQueryContent, env1_0.lineClamp);
}
@@ -0,0 +1,194 @@
/* Metro module 11830; source: modules/search/native/stores/SearchGuildChannelTabStore.tsx; dependencies: [15, 17, 18, 6, 7, 1935, 4605, 6587, 6526, 22, 21, 566, 694, 2] */
function _fun90632(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:6, offset: 0x02040acd, size: 424 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(15) /* metro dependency 15 */;
const env0_4 = importDefault(17) /* metro dependency 17 */;
const env0_5 = importDefault(18) /* metro dependency 18 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const guildChannelStoreModule = require(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_8 = guildChannelStoreModule.GUILD_VOCAL_CHANNELS_KEY;
const env0_9 = guildChannelStoreModule.GUILD_SELECTABLE_CHANNELS_KEY;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_11 = (require(6587) /* metro dependency 6587: AutocompleterConstants */).AutocompleterResultTypes;
const env0_12 = [];
const env0_13 = [];
const env0_14 = _fun90636();
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun90646(Store).displayName = 'SearchGuildChannelTabStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{SEARCH_GUILD_CHANNEL_TAB_SEARCH: SEARCH_GUILD_CHANNEL_TAB_SEARCH,
SEARCH_GUILD_CHANNEL_TAB_CLEANUP: SEARCH_GUILD_CHANNEL_TAB_CLEANUP});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/stores/SearchGuildChannelTabStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_90633() { // fn#90633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:267, offset: 0x02040c75, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_90633_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun90636() { // fn#90636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:476, offset: 0x02040cd7, size: 134 bytes, params: 1, frame: 15
return env0_7(GuildChannelSearchManager, [{key: 'search', value: value_90638}, {key: 'getTextChannels',
value: function() {
return this.textChannels;
}}, {key: 'getVoiceChannels', value: function() {
return this.voiceChannels;
}}, {key: 'getCount', value: function() {
return this.count;
}}]);
}
function _fun90646(a0) { // fn#90646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:1525, offset: 0x02040fba, size: 147 bytes, params: 2, frame: 16
const closure = SearchGuildChannelTabStore;
env0_5(closure, a0);
return env0_7(closure, [{key: 'initialize', value: function() {
this.waitFor(ReadStateStore);
}}, {key: 'getTextChannels', value: value_90649}, {key: 'getVoiceChannels', value: value_90650}, {key: 'getCount',
value: value_90651}]);
}
function SEARCH_GUILD_CHANNEL_TAB_SEARCH({id, guildId, searchQueryString}) { // fn#90652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:2369, offset: 0x0204115b, size: 97 bytes, params: 2, frame: 16
var r1;
var value4;
const value2 = env0_15.get(id);
if (value2 != null) {
r1 = value2;
} else {
value4 = new env0_14();
}
env0_15.set(id, r1);
r1.search(searchQueryString, guildId);
}
function SEARCH_GUILD_CHANNEL_TAB_CLEANUP({id}) { // fn#90653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:2544, offset: 0x020411bc, size: 27 bytes, params: 2, frame: 11
return env0_15.delete(id);
}
function GuildChannelSearchManager() { // fn#90637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:497, offset: 0x02040d5d, size: 55 bytes, params: 1, frame: 13
env1_6(this, GuildChannelSearchManager);
this.count = null;
this.textChannels = [];
this.voiceChannels = [];
}
function value_90638(a0, a1) { // fn#90638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:650, offset: 0x02040d94, size: 375 bytes, params: 3, frame: 26
var environment;
let value = environment.__proto__;
const autocompleteUtilsModule = require(6526) /* metro dependency 6526: AutocompleteUtils */;
let getBoosterMap = autocompleteUtilsModule.getBoosterMap;
const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
const value2 = Reflect.apply(getBoosterMap, autocompleteUtilsModule, [TEXT_CHANNEL]);
const moduleValue2 = autocompleteUtilsModule;
getBoosterMap = moduleValue2.getBoosterMap;
const VOICE_CHANNEL = AutocompleterResultTypes.VOICE_CHANNEL;
const value3 = Reflect.apply(getBoosterMap, moduleValue2, [VOICE_CHANNEL]);
const object4 = {'query': null, 'guildId': null, 'limit': 1000, 'allowEmptyQueries': true, 'allowSnowflake': true,
'fuzzy': false};
object4.query = a0;
object4.guildId = a1;
object4.filter = function() {
return true;
};
const defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
let queryChannels = defaultImport.queryChannels;
const object5 = {};
copyDataProperties(object5, object4, value2);
object5['type'] = GUILD_SELECTABLE_CHANNELS_KEY;
object5['boosters'] = value2;
const value4 = Reflect.apply(queryChannels, defaultImport, [object5]);
const defaultImport2 = defaultImport;
queryChannels = defaultImport2.queryChannels;
const object6 = {};
copyDataProperties(object6, object4, value2);
object6['type'] = GUILD_VOCAL_CHANNELS_KEY;
object6['boosters'] = value3;
value = Reflect.apply(queryChannels, defaultImport2, [object6]);
this.voiceChannels = value.map(function(a0) {
return {channel: a0.record};
});
value = require(22) /* metro dependency 22 */;
value = value.chain(value4);
value = value.map(_fun90641);
value = value.sort(_fun90642);
this.textChannels = value.value();
if (a0.length > 0) {
this.count = this.textChannels.length + this.voiceChannels.length;
} else {
this.count = null;
}
}
function SearchGuildChannelTabStore() { // fn#90647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:1537, offset: 0x0204104d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_6(this, SearchGuildChannelTabStore);
const value3 = env1_4(SearchGuildChannelTabStore);
return env1_3(this, _isNativeReflectConstruct_90633() ? global.Reflect.construct(value3, arguments,
env1_4(this).constructor) : value3.apply(this, arguments));
}
function value_90649(a0) { // fn#90649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:1943, offset: 0x020410be, size: 51 bytes, params: 2, frame: 13
let r0 = env1_15.get(a0)?.getTextChannels();
r0 = r0 ?? env1_12;
return r0;
}
function value_90650(a0) { // fn#90650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:2060, offset: 0x020410f1, size: 51 bytes, params: 2, frame: 13
let r0 = env1_15.get(a0)?.getVoiceChannels();
r0 = r0 ?? env1_13;
return r0;
}
function value_90651(a0) { // fn#90651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:2170, offset: 0x02041124, size: 55 bytes, params: 2, frame: 12
var r1;
let value = environment.__proto__;
value = env1_15.get(a0);
const value2 = null;
if (value2 == value) {
r1 = undefined;
} else {
value = value.getCount();
r1 = value;
}
return value2 != r1 ? r1 : value2;
}
function _fun90641(a0) { // fn#90641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:1035, offset: 0x02040f1c, size: 69 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return {channel: a0.record, lastMessageId: ReadStateStore.lastMessageId(a0.record.id) ?? a0.record.lastMessageId};
}
function _fun90642({lastMessageId}, {lastMessageId}) { // fn#90642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12016:1157, offset: 0x02040f61, size: 57 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__;
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare(lastMessageId, lastMessageId);
}
@@ -0,0 +1,247 @@
/* Metro module 15035; source: modules/search/native/stores/SearchHistoryStore.tsx; dependencies: [15, 17, 18, 6, 7, 9615, 1392, 22, 566, 694, 2] */
function _fun113748(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:6, offset: 0x0240571f, size: 369 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const NATIVE_SEARCH_HISTORY_STORAGE_KEY = value.NATIVE_SEARCH_HISTORY_STORAGE_KEY;
const NATIVE_SEARCH_HISTORY_STORE_DISPLAY_NAME = value.NATIVE_SEARCH_HISTORY_STORE_DISPLAY_NAME;
const env0_7 = value.SearchHistoryItemTypes;
const env0_8 = _fun113753();
const env0_9 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
value = _fun113762(PersistedStore);
value.displayName = NATIVE_SEARCH_HISTORY_STORE_DISPLAY_NAME;
value.persistKey = NATIVE_SEARCH_HISTORY_STORAGE_KEY;
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{SEARCH_HISTORY_NATIVE_CLEAR_ITEMS: SEARCH_HISTORY_NATIVE_CLEAR_ITEMS,
SEARCH_HISTORY_NATIVE_REMOVE_ITEM: SEARCH_HISTORY_NATIVE_REMOVE_ITEM,
SEARCH_HISTORY_NATIVE_ADD_ITEM: SEARCH_HISTORY_NATIVE_ADD_ITEM});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/stores/SearchHistoryStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_113749() { // fn#113749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:268, offset: 0x02405890, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_113749_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getOrCreateSearchHistory(a0) { // fn#113752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1113, offset: 0x024058f2, size: 54 bytes, params: 2, frame: 12
var r0;
var value3;
const property = env0_9[a0];
if (property != null) {
r0 = property;
} else {
value3 = new env0_8();
}
env0_9[a0] = r0;
return r0;
}
function _fun113753() { // fn#113753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:467, offset: 0x02405928, size: 134 bytes, params: 1, frame: 15
return env0_6(SearchHistory, [{key: 'deserialize', value: function(a0) {
this.items = a0.slice(0, 3);
this.items = this.items.filter(_fun113756);
}}, {key: 'serialize', value: function() {
return this.items;
}}, {key: 'add', value: value_113759}, {key: 'remove', value: function(a0) {
var env0_0 = a0;
this.items = this.items.filter(_fun113761);
}}]);
}
function _fun113762(a0) { // fn#113762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1203, offset: 0x02405b8e, size: 122 bytes, params: 2, frame: 16
const closure = SearchHistoryStore;
env0_4(closure, a0);
return env0_6(closure, [{key: 'getState', value: value_113764}, {key: 'initialize', value: value_113766},
{key: 'getSearchHistory', value: value_113768}]);
}
function SEARCH_HISTORY_NATIVE_CLEAR_ITEMS({id}) { // fn#113769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:2000, offset: 0x02405da5, size: 23 bytes, params: 2, frame: 2
delete env0_9[id];
}
function SEARCH_HISTORY_NATIVE_REMOVE_ITEM({id, item}) { // fn#113770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:2094, offset: 0x02405dbc, size: 40 bytes, params: 2, frame: 12
getOrCreateSearchHistory(id).remove(item);
}
function SEARCH_HISTORY_NATIVE_ADD_ITEM({id, item}) { // fn#113771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:2218, offset: 0x02405de4, size: 39 bytes, params: 2, frame: 12
getOrCreateSearchHistory(id).add(item);
}
function SearchHistory() { // fn#113754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:488, offset: 0x024059ae, size: 37 bytes, params: 1, frame: 13
env1_5(this, SearchHistory);
this.items = [];
}
function value_113755(a0) { // fn#113755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:577, offset: 0x024059d3, size: 63 bytes, params: 2, frame: 14
this.items = a0.slice(0, 3);
const items2 = this.items;
this.items = items2.filter(_fun113756);
}
function value_113759(a0) { // fn#113759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:804, offset: 0x02405a92, size: 155 bytes, params: 2, frame: 15
var r0;
var items2;
const type = a0.type;
let value = environment.__proto__;
const TEXT = SearchHistoryItemTypes.TEXT;
value = type === TEXT;
if (value) {
value = a0.text.trim();
value = value === '';
r0 = value;
} else {
r0 = value;
}
r0 = r0 && (a0.tags == null || a0.tags.length === 0);
if (!r0) {
this.remove(a0);
items2 = this.items;
items2.unshift(a0);
items2 = this.items;
this.items = items2.slice(0, 3);
}
}
function value_113760(a0) { // fn#113760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1032, offset: 0x02405b2d, size: 45 bytes, params: 2, frame: 12
const env0_0 = a0;
const items2 = this.items;
this.items = items2.filter(_fun113761);
}
function SearchHistoryStore() { // fn#113763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1215, offset: 0x02405c08, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_5(this, SearchHistoryStore);
const value3 = env1_3(SearchHistoryStore);
return env1_2(this, _isNativeReflectConstruct_113749() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_113764() { // fn#113764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1521, offset: 0x02405c79, size: 60 bytes, params: 1, frame: 13
var environment;
const Object = global.Object;
const entries = Object.entries;
const value = environment.__proto__;
Reflect.apply(entries, Object, [env1_9]).forEach(_fun113765);
return {searchHistories: {}};
}
function value_113766(a0) { // fn#113766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1664, offset: 0x02405d11, size: 76 bytes, params: 2, frame: 15
var environment;
var value2;
const value = undefined;
const searchHistories = a0 == null ? value : a0.searchHistories;
if (searchHistories != null) {
value2 = environment.__proto__;
env1_9 = (require(22) /* metro dependency 22 */).mapValues(searchHistories, _fun113767);
}
return value;
}
function value_113768(a0) { // fn#113768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1826, offset: 0x02405d88, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__;
return getOrCreateSearchHistory(a0).serialize();
}
function _fun113756(a0) { // fn#113756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:643, offset: 0x02405a12, size: 71 bytes, params: 2, frame: 12
var environment;
const type = a0.type;
const value = environment.__proto__.__proto__;
const TEXT = SearchHistoryItemTypes.TEXT;
let r0 = type !== TEXT || a0.tags == null;
r0 = !r0 ? a0.tags.every(_fun113757) : r0;
return r0;
}
function _fun113761(a0) { // fn#113761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1074, offset: 0x02405b5a, size: 52 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
value = require(22) /* metro dependency 22 */;
return !value.isEqual(a0, env0_0);
}
function _fun113765(a0) { // fn#113765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1575, offset: 0x02405cb5, size: 92 bytes, params: 2, frame: 15
var r1;
var r2;
var r4;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r3 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r4 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r4 = value;
} else {
r1 = item3;
r2 = value3;
r4 = item;
}
}
if (!r2) {
r1.return();
}
if (r4 != null) {
env0_0[r3] = r4.serialize();
}
return value;
}
function _fun113767(a0) { // fn#113767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:1748, offset: 0x02405d5d, size: 43 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
const env2_82 = new env2_8();
env2_82.deserialize(a0);
return env2_82;
}
function _fun113757(a0) { // fn#113757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15232:691, offset: 0x02405a59, size: 46 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (require(1392) /* metro dependency 1392: TypeUtils */).hasOwnProperty(a0, 'type');
}
@@ -0,0 +1,215 @@
/* Metro module 11831; source: modules/search/native/stores/SearchMemberTabStore.tsx; dependencies: [15, 17, 18, 6, 7, 1379, 661, 7234, 3789, 6592, 566, 694, 2] */
function _fun90654(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:6, offset: 0x020411d7, size: 395 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = importDefault(6) /* metro dependency 6 */;
const env0_8 = importDefault(7) /* metro dependency 7 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_11 = [];
const env0_12 = _fun90658();
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun90668(Store).displayName = 'SearchGuildMemberTabStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{SEARCH_GUILD_MEMBER_TAB_SEARCH: SEARCH_GUILD_MEMBER_TAB_SEARCH,
SEARCH_GUILD_MEMBER_TAB_CLEANUP: SEARCH_GUILD_MEMBER_TAB_CLEANUP});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/stores/SearchMemberTabStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_90655() { // fn#90655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:180, offset: 0x02041362, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_90655_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun90658() { // fn#90658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:384, offset: 0x020413c4, size: 186 bytes, params: 1, frame: 15
return env0_8(GuildMemberSearchManager, [{key: 'setAutocompleteOptions', value: function(a0) {
this.autocompleter.setOptions(a0);
}}, {key: 'teardown', value: function() {
this.autocompleter.clean();
}}, {key: 'search', value: function(a0, a1, a2) {
this.targetChannelId = a1;
this.isFetching = true;
var value = a2.toLowerCase();
value = value.trim();
this.searchQueryString = value;
importDefault(dependencyMap[9]).requestMembers(a0, value, 50);
this.autocompleter.search(value);
}}, {key: 'getResults', value: function() {
return this.results;
}}, {key: 'getCount', value: function() {
return this.count;
}}, {key: 'getIsFetching', value: function() {
return this.isFetching;
}}]);
}
function _fun90668(a0) { // fn#90668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:1665, offset: 0x02041733, size: 147 bytes, params: 2, frame: 16
const closure = SearchGuildMemberTabStoreImpl;
env0_6(closure, a0);
return env0_8(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore);
}}, {key: 'getResults', value: value_90671}, {key: 'getCount', value: value_90672}, {key: 'getIsFetching',
value: value_90673}]);
}
function SEARCH_GUILD_MEMBER_TAB_SEARCH({id, guildId, channelId, threadId, searchQueryString}) { // fn#90674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:2505, offset: 0x020418d6, size: 171 bytes, params: 2, frame: 21
var r2;
var value4;
const value2 = env0_13.get(id);
if (value2 != null) {
r2 = value2;
} else {
value4 = new env0_12();
}
env0_13.set(id, r2);
r2.setAutocompleteOptions({'frecencyBoosters': true, 'allowSnowflake': true, userFilters: {guild: guildId,
strict: true, thread: threadId ?? undefined}});
r2.search(guildId, channelId, searchQueryString);
}
function SEARCH_GUILD_MEMBER_TAB_CLEANUP({id}) { // fn#90675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:2825, offset: 0x02041981, size: 59 bytes, params: 2, frame: 12
const value2 = env0_13.get(id);
if (value2 != null) {
value2.teardown();
}
env0_13.delete(id);
}
function GuildMemberSearchManager() { // fn#90659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:405, offset: 0x0204147e, size: 198 bytes, params: 1, frame: 17
var environment;
const value = environment.__proto__;
env1_7(this, GuildMemberSearchManager);
this.count = null;
this.isFetching = false;
this.searchQueryString = '';
this.targetChannelId = null;
this.results = [];
this.onAutocompleterResultsChange = onAutocompleterResultsChange;
const defaultImport = importDefault(7234) /* metro dependency 7234: autocompleter */;
var onAutocompleterResultsChange = this.onAutocompleterResultsChange;
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const USER = AutocompleterResultTypes.USER;
this.autocompleter = new defaultImport(onAutocompleterResultsChange, [USER], 50);
this.autocompleter.createSearchContext();
}
function SearchGuildMemberTabStoreImpl() { // fn#90669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:1677, offset: 0x020417c6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_7(this, SearchGuildMemberTabStoreImpl);
const value3 = env1_5(SearchGuildMemberTabStoreImpl);
return env1_4(this, _isNativeReflectConstruct_90655() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_90671(a0) { // fn#90671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:2093, offset: 0x02041837, size: 51 bytes, params: 2, frame: 13
let r0 = env1_13.get(a0)?.getResults();
r0 = r0 ?? env1_11;
return r0;
}
function value_90672(a0) { // fn#90672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:2197, offset: 0x0204186a, size: 55 bytes, params: 2, frame: 12
var r1;
let value = environment.__proto__;
value = env1_13.get(a0);
const value2 = null;
if (value2 == value) {
r1 = undefined;
} else {
value = value.getCount();
r1 = value;
}
return value2 != r1 ? r1 : value2;
}
function value_90673(a0) { // fn#90673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:2307, offset: 0x020418a1, size: 53 bytes, params: 2, frame: 12
var r1;
let value = environment.__proto__;
value = env1_13.get(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.getIsFetching();
r1 = value;
}
return r1 != null && r1;
}
function onAutocompleterResultsChange(a0, a1) { // fn#90660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:611, owner: GuildMemberSearchManager.onAutocompleterResultsChange, offset: 0x02041544, size: 162 bytes, params: 3, frame: 17
var environment;
var binding;
var items2;
var value2;
if (a1 === env0_0.searchQueryString) {
binding = env0_0;
binding.isFetching = false;
items2 = [];
var env0_0 = items2;
value2 = environment.__proto__.__proto__;
var env0_1 = ChannelStore.getChannel(binding.targetChannelId);
a0.forEach(_fun90661);
binding.results = items2;
if (binding.searchQueryString.length > 0) {
env0_0.count = items2.length;
} else {
env0_0.count = null;
}
binding = env2_14;
binding.emitChange();
}
}
function _fun90661(a0) { // fn#90661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12017:726, offset: 0x020415e6, size: 149 bytes, params: 2, frame: 15
const type = a0.type;
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const USER = AutocompleterResultTypes.USER;
if (type === USER) {
if (env0_1 == null) {
env0_0.push(a0);
return undefined;
}
var moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
var can = moduleValue.can;
var object2 = {};
var VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
object2.permission = VIEW_CHANNEL;
object2.user = a0.record;
object2.context = env0_1;
if (Reflect.apply(can, moduleValue, [object2])) {
env0_0.push(a0);
return undefined;
}
}
}
@@ -0,0 +1,303 @@
/* Metro module 11832; source: modules/search/native/stores/SearchPeopleTabStore.tsx; dependencies: [15, 17, 18, 6, 7, 1379, 6586, 22, 11833, 7692, 1244, 566, 694, 2] */
function _fun90676(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:6, offset: 0x020419bc, size: 382 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(15) /* metro dependency 15 */;
const env0_4 = importDefault(17) /* metro dependency 17 */;
const env0_5 = importDefault(18) /* metro dependency 18 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const frecencyStore = importDefault(6586) /* metro dependency 6586: FrecencyStore */;
const env0_10 = [];
const env0_11 = _fun90680();
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun90696(Store).displayName = 'SearchPeopleTabStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{SEARCH_PEOPLE_TAB_SEARCH: SEARCH_PEOPLE_TAB_SEARCH, SEARCH_PEOPLE_TAB_CLEANUP: SEARCH_PEOPLE_TAB_CLEANUP});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/stores/SearchPeopleTabStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_90677() { // fn#90677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:169, offset: 0x02041b3a, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_90677_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun90680() { // fn#90680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:377, offset: 0x02041b9c, size: 159 bytes, params: 1, frame: 15
return env0_7(PeopleSearchManager, [{key: 'teardown', value: function() {
var userSearch = this.userSearch;
userSearch.unsubscribe();
}}, {key: 'search', value: function(a0) {
var userSearch;
var value = a0.toLowerCase();
value = value.trim();
this.searchQueryString = value;
if (value === '') {
this.processResults();
} else {
userSearch = this.userSearch;
this.userIndexes = userSearch.filter(value);
userSearch = this.userSearch;
userSearch.fetch(value, true);
this.groupDMs = _fun90686(value);
}
}}, {key: 'processResults', value: value_90691}, {key: 'getResults', value: function() {
return this.results;
}}, {key: 'getCount', value: function() {
return this.count;
}}]);
}
function _fun90696(a0) { // fn#90696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:2188, offset: 0x0204210e, size: 122 bytes, params: 2, frame: 16
const closure = SearchPeopleTabStoreImpl;
env0_5(closure, a0);
return env0_7(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, FrecencyStore);
}}, {key: 'getResults', value: value_90699}, {key: 'getCount', value: value_90700}]);
}
function SEARCH_PEOPLE_TAB_SEARCH({id, searchQueryString}) { // fn#90701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:2883, offset: 0x02042263, size: 91 bytes, params: 2, frame: 15
var r1;
var value4;
const value2 = env0_12.get(id);
if (value2 != null) {
r1 = value2;
} else {
value4 = new env0_11();
}
env0_12.set(id, r1);
r1.search(searchQueryString);
}
function SEARCH_PEOPLE_TAB_CLEANUP({id}) { // fn#90702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:3033, offset: 0x020422be, size: 59 bytes, params: 2, frame: 12
const value2 = env0_12.get(id);
if (value2 != null) {
value2.teardown();
}
env0_12.delete(id);
}
function PeopleSearchManager() { // fn#90681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:398, offset: 0x02041c3b, size: 165 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
env1_6(this, PeopleSearchManager);
this.count = null;
this.searchQueryString = '';
this.groupDMs = [];
this.userIndexes = {};
this.results = [];
const UserSearch = (require(7692) /* metro dependency 7692: useUserListData */).UserSearch;
let userSearch = new UserSearch(_fun90682);
this.userSearch = userSearch;
userSearch = this.userSearch;
userSearch.subscribe(_fun90683, true);
}
function value_90685(a0) { // fn#90685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:767, offset: 0x02041d0a, size: 120 bytes, params: 2, frame: 14
var userSearch;
let value = a0.toLowerCase();
value = value.trim();
this.searchQueryString = value;
if (value === '') {
this.processResults();
} else {
userSearch = this.userSearch;
this.userIndexes = userSearch.filter(value);
userSearch = this.userSearch;
userSearch.fetch(value, true);
this.groupDMs = searchGroupDMs(value);
}
}
function value_90691() { // fn#90691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:1332, offset: 0x02041f1e, size: 399 bytes, params: 1, frame: 23
var r2;
var intl;
var index;
var value2;
var items3;
var value3;
var items2;
var value5;
const userSearch = this.userSearch;
this.userIndexes = userSearch.filter(this.searchQueryString);
const moduleValue = require(dependencyMap[9]);
const parseUserSearchResults = moduleValue.parseUserSearchResults;
let object2 = {'data': null, 'withGuildMembers': true, 'withAffinitySuggestions': true, 'withFriends': true,
'withFriendSuggestions': false, 'withFriendRequests': false, 'withFriendRequestsIncoming': false,
'withFriendRequestsOutgoing': false, 'excludeCurrentUser': true};
const userIndexes = this.userIndexes;
object2.data = userIndexes;
const userSearchResults = Reflect.apply(parseUserSearchResults, moduleValue, [object2]);
if (this.groupDMs.length > 0) {
if (this.searchQueryString === '') {
r2 = userSearchResults;
} else {
object2 = {};
intl = require(dependencyMap[10]).intl;
object2.title = intl.string(require(dependencyMap[10]).t.qGlQrW);
object2.items = this.groupDMs;
index = userSearchResults.findIndex(function({title}) {
return title === require(dependencyMap[10]).intl.string(require(dependencyMap[10]).t.y29JXs);
});
if (index === -1) {
items2 = [];
value5 = arraySpread(items2, userSearchResults, 0, dependencyMap);
items2[value5] = object2;
value5 + 1;
r2 = items2;
} else {
value2 = userSearchResults.slice(0, index);
items3 = [];
value3 = arraySpread(items3, value2, 0, dependencyMap);
items3[value3] = object2;
arraySpread(items3, userSearchResults.slice(index), value3 + 1, dependencyMap);
r2 = items3;
}
}
} else {
r2 = userSearchResults;
}
if (this.searchQueryString.length > 0) {
this.count = r2.reduce(function(a0, a1) {
return a0 + a1.items.length;
}, 0);
} else {
this.count = null;
}
this.results = r2;
env1_13.emitChange();
}
function SearchPeopleTabStoreImpl() { // fn#90697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:2200, offset: 0x02042188, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_6(this, SearchPeopleTabStoreImpl);
const value3 = env1_4(SearchPeopleTabStoreImpl);
return env1_3(this, _isNativeReflectConstruct_90677() ? global.Reflect.construct(value3, arguments,
env1_4(this).constructor) : value3.apply(this, arguments));
}
function value_90699(a0) { // fn#90699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:2593, offset: 0x020421f9, size: 51 bytes, params: 2, frame: 13
let r0 = env1_12.get(a0)?.getResults();
r0 = r0 ?? env1_10;
return r0;
}
function value_90700(a0) { // fn#90700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:2697, offset: 0x0204222c, size: 55 bytes, params: 2, frame: 12
var r1;
let value = environment.__proto__;
value = env1_12.get(a0);
const value2 = null;
if (value2 == value) {
r1 = undefined;
} else {
value = value.getCount();
r1 = value;
}
return value2 != r1 ? r1 : value2;
}
function _fun90682() { // fn#90682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:593, offset: 0x02041ce0, size: 19 bytes, params: 1, frame: 9
return env0_0.processResults();
}
function searchGroupDMs(a0) { // fn#90686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:944, owner: value_90685.searchGroupDMs, offset: 0x02041d82, size: 220 bytes, params: 2, frame: 16
var environment;
var r0;
var defaultImport;
var value3;
let value = a0.toLocaleLowerCase();
value = value.trim();
if (value.length === 0) {
r0 = [];
} else {
value = environment.__proto__.__proto__;
defaultImport = importDefault(22) /* metro dependency 22 */;
value3 = defaultImport.chain(ChannelStore.getMutablePrivateChannels()).values();
value = value3.filter((require(11833) /* metro dependency 11833: NewMessageUserList */).filterGroupDMs);
value = value.map(_fun90687);
value = value.filter(function(a0) {
var r0;
var r1;
var r2;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
if (value2) {
r0 = item2;
r1 = value;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value;
r2 = value3;
} else {
r0 = item3;
r1 = item;
r2 = value3;
}
}
if (!r2) {
r0.return();
}
return r1 > 0;
});
value = value.sort(_fun90689);
value = value.map(_fun90690);
value = value.value();
r0 = value;
}
return r0;
}
function _fun90687(a0) { // fn#90687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:1119, offset: 0x02041e5e, size: 85 bytes, params: 2, frame: 15
const newMessageUserListModule = require(11833) /* metro dependency 11833: NewMessageUserList */;
const getScoreWithoutFetchingLatest = FrecencyStore.getScoreWithoutFetchingLatest;
return [a0, newMessageUserListModule.matchGroupDM(a0, env0_0), Reflect.apply(getScoreWithoutFetchingLatest,
FrecencyStore, [a0.id])];
}
function _fun90689(a0, a1) { // fn#90689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12018:1221, offset: 0x02041ef2, size: 44 bytes, params: 3, frame: 4
const value = a1[1] - a0[1];
return value !== 0 ? value : a1[2] - a0[2];
}
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff. Show more