Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -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];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,449 @@
|
||||
/* Metro module 9674; source: modules/search/native/stores/SearchQueryStore.tsx; dependencies: [15, 17, 18, 7, 6, 1379, 3793, 1878, 9615, 9614, 661, 4805, 1244, 9675, 9687, 1944, 566, 694, 2] */
|
||||
function _fun75808(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:6, offset: 0x01dbad1d, size: 526 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 */;
|
||||
let value = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_7 = importDefault(6) /* metro dependency 6 */;
|
||||
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 searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
|
||||
const env0_11 = searchConstantsModule.EMPTY_SEARCH_QUERY_STRING;
|
||||
const env0_12 = searchConstantsModule.SearchQueryTagTypes;
|
||||
const env0_13 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_14 = constantsModule.SearchTokenTypes;
|
||||
const env0_15 = constantsModule.SearchTypes;
|
||||
value = value(SearchQueryStateManager);
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
const env0_18 = (require(1944) /* metro dependency 1944: FunctionUtils */).cachedFunction(_fun75839);
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
const value7 = _fun75840(Store);
|
||||
value7.displayName = 'NativeSearchQueryStore';
|
||||
const value10 = new value7(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{SEARCH_QUERY_NATIVE_UPDATE: SEARCH_QUERY_NATIVE_UPDATE,
|
||||
SEARCH_QUERY_NATIVE_DELETE: SEARCH_QUERY_NATIVE_DELETE});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/stores/SearchQueryStore.tsx');
|
||||
exports.default = value10;
|
||||
exports.SearchQueryStateManager = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_75809() { // fn#75809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:325, offset: 0x01dbaf2b, 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_75809_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getState_75812(a0) { // fn#75812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:3492, offset: 0x01dbaf8d, size: 70 bytes, params: 2, frame: 15
|
||||
const binding = env0_17;
|
||||
const get = binding.get;
|
||||
const searchUtilsModule = require(9675) /* metro dependency 9675: SearchUtils */;
|
||||
const getSearchContextId = searchUtilsModule.getSearchContextId;
|
||||
return Reflect.apply(get, binding, [Reflect.apply(getSearchContextId, searchUtilsModule, [a0])]) ?? env0_18(a0);
|
||||
}
|
||||
|
||||
function SearchQueryStateManager(a0) { // fn#75813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:527, offset: 0x01dbafd3, size: 799 bytes, params: 2, frame: 22
|
||||
var r8;
|
||||
var items;
|
||||
var r3;
|
||||
var object2;
|
||||
var value3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const binding = env0_7;
|
||||
const value2 = undefined;
|
||||
binding(this, SearchQueryStateManager);
|
||||
this.isExplicitSearchSubmitted = false;
|
||||
this.getQueryString = getQueryString;
|
||||
this.isQueryStringEmpty = isQueryStringEmpty;
|
||||
this.getTextInputValue = getTextInputValue;
|
||||
this.setTextInputValue = setTextInputValue;
|
||||
this.isInitialSearchQuery = isInitialSearchQuery;
|
||||
this.markExplicitSearchSubmitted = markExplicitSearchSubmitted;
|
||||
this.resetExplicitSearchSubmitted = resetExplicitSearchSubmitted;
|
||||
this.getSearchResultsQuery = getSearchResultsQuery;
|
||||
this.setSearchResultsQuery = setSearchResultsQuery;
|
||||
this.isTextInputValueEmpty = isTextInputValueEmpty;
|
||||
this.getTextValueChangedFromInput = getTextValueChangedFromInput;
|
||||
this.hasUserAddedTags = hasUserAddedTags;
|
||||
this.getTags = getTags;
|
||||
this.getPrefixTag = getPrefixTag;
|
||||
this.isAutocompleteVisible = isAutocompleteVisible;
|
||||
this.setTags = setTags_75829;
|
||||
this.addTag = addTag_75830;
|
||||
this.removeTag = removeTag;
|
||||
this.removePrefixTags = removePrefixTags;
|
||||
this.getChannelIds = getChannelIds;
|
||||
this.getUserIds = getUserIds;
|
||||
this.isTagsEmpty = isTagsEmpty;
|
||||
this.saveDraftTextInputValue = saveDraftTextInputValue;
|
||||
this.restoreDraftTextInputValue = restoreDraftTextInputValue;
|
||||
this.reset = reset_75838;
|
||||
this.textInputValue = EMPTY_SEARCH_QUERY_STRING;
|
||||
this.textInputChangedFromInput = false;
|
||||
this.searchResultsQuery = EMPTY_SEARCH_QUERY_STRING;
|
||||
const type = a0.type;
|
||||
const THREAD = SearchTypes.THREAD;
|
||||
if (THREAD === type) {
|
||||
value3 = ChannelStore.getChannel(a0.channelId);
|
||||
if (value3 == null) {
|
||||
r8 = value3 != null ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value3,
|
||||
UserStore, RelationshipStore) : value2;
|
||||
if (r8 == null) {
|
||||
items = [];
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.type = SearchQueryTagTypes.COMPLETE;
|
||||
object2.searchTokenType = SearchTokenTypes.FILTER_IN;
|
||||
object2.text = '' + intl.string(t.WNpFHa) + ': ' + (require(9675) /* metro dependency 9675: SearchUtils */).quoteChannelName(r8);
|
||||
object2.channelId = a0.channelId;
|
||||
object2.location = SearchFilterAddLocations.CLIENT_AUTO_ADD;
|
||||
items = [object2];
|
||||
}
|
||||
r3 = items;
|
||||
} else if (value3.isObfuscated()) {
|
||||
r3 = [];
|
||||
} else {
|
||||
r8 = value3 != null ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value3,
|
||||
UserStore, RelationshipStore) : value2;
|
||||
if (r8 == null) {
|
||||
items = [];
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.type = SearchQueryTagTypes.COMPLETE;
|
||||
object2.searchTokenType = SearchTokenTypes.FILTER_IN;
|
||||
object2.text = '' + intl.string(t.WNpFHa) + ': ' + (require(9675) /* metro dependency 9675: SearchUtils */).quoteChannelName(r8);
|
||||
object2.channelId = a0.channelId;
|
||||
object2.location = SearchFilterAddLocations.CLIENT_AUTO_ADD;
|
||||
items = [object2];
|
||||
}
|
||||
r3 = items;
|
||||
}
|
||||
} else if (SearchTypes.GUILD_CHANNEL === type) {
|
||||
value3 = ChannelStore.getChannel(a0.channelId);
|
||||
if (value3 == null) {
|
||||
r8 = value3 != null ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value3,
|
||||
UserStore, RelationshipStore) : value2;
|
||||
if (r8 == null) {
|
||||
items = [];
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.type = SearchQueryTagTypes.COMPLETE;
|
||||
object2.searchTokenType = SearchTokenTypes.FILTER_IN;
|
||||
object2.text = '' + intl.string(t.WNpFHa) + ': ' + (require(9675) /* metro dependency 9675: SearchUtils */).quoteChannelName(r8);
|
||||
object2.channelId = a0.channelId;
|
||||
object2.location = SearchFilterAddLocations.CLIENT_AUTO_ADD;
|
||||
items = [object2];
|
||||
}
|
||||
r3 = items;
|
||||
} else if (value3.isObfuscated()) {
|
||||
r3 = [];
|
||||
} else {
|
||||
r8 = value3 != null ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value3,
|
||||
UserStore, RelationshipStore) : value2;
|
||||
if (r8 == null) {
|
||||
items = [];
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.type = SearchQueryTagTypes.COMPLETE;
|
||||
object2.searchTokenType = SearchTokenTypes.FILTER_IN;
|
||||
object2.text = '' + intl.string(t.WNpFHa) + ': ' + (require(9675) /* metro dependency 9675: SearchUtils */).quoteChannelName(r8);
|
||||
object2.channelId = a0.channelId;
|
||||
object2.location = SearchFilterAddLocations.CLIENT_AUTO_ADD;
|
||||
items = [object2];
|
||||
}
|
||||
r3 = items;
|
||||
}
|
||||
} else {
|
||||
r3 = [];
|
||||
}
|
||||
this.initialTagsSnapshot = r3;
|
||||
let value = importDefault(9687) /* metro dependency 9687: SearchQueryTagManager */;
|
||||
value = new value();
|
||||
this.tagsManager = value;
|
||||
const tagsManager = this.tagsManager;
|
||||
tagsManager.set(this.initialTagsSnapshot);
|
||||
this.draftTextInputValue = null;
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun75839(a0) { // fn#75839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:3478, offset: 0x01dbb695, size: 32 bytes, params: 2, frame: 11
|
||||
const binding = env0_16;
|
||||
const value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
const binding2 = new binding(a0);
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
|
||||
function _fun75840(a0) { // fn#75840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:3587, offset: 0x01dbb6b5, size: 447 bytes, params: 2, frame: 16
|
||||
const closure = NativeSearchQueryStore;
|
||||
env0_5(closure, a0);
|
||||
return env0_6(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ChannelStore, UserStore, RelationshipStore);
|
||||
}}, {key: 'getManager', value: function(a0) {
|
||||
return getState_75812(a0);
|
||||
}}, {key: 'getQueryString', value: value_75844}, {key: 'isQueryStringEmpty', value: value_75845},
|
||||
{key: 'getTextInputValue', value: value_75846}, {key: 'isInitialSearchQuery', value: value_75847},
|
||||
{key: 'getSearchResultsQuery', value: value_75848}, {key: 'isTextInputValueEmpty', value: value_75849},
|
||||
{key: 'getTextValueChangedFromInput', value: value_75850}, {key: 'hasUserAddedTags', value: value_75851},
|
||||
{key: 'getTags', value: value_75852}, {key: 'getPrefixTag', value: value_75853}, {key: 'isAutocompleteVisible',
|
||||
value: value_75854}, {key: 'getChannelIds', value: value_75855}, {key: 'getUserIds', value: value_75856},
|
||||
{key: 'isTagsEmpty', value: value_75857}]);
|
||||
}
|
||||
|
||||
function SEARCH_QUERY_NATIVE_UPDATE({searchContext, updater}) { // fn#75858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:5291, offset: 0x01dbba3b, size: 123 bytes, params: 2, frame: 17
|
||||
var r1;
|
||||
var binding2;
|
||||
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
|
||||
let binding = env0_17;
|
||||
const value3 = binding.get(searchContextId);
|
||||
if (value3 != null) {
|
||||
r1 = value3;
|
||||
} else {
|
||||
binding = env0_16;
|
||||
binding2 = new binding(searchContext);
|
||||
binding = env0_17;
|
||||
binding.set(searchContextId, binding2);
|
||||
r1 = binding2;
|
||||
}
|
||||
updater(r1);
|
||||
}
|
||||
|
||||
function SEARCH_QUERY_NATIVE_DELETE({id}) { // fn#75859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:5527, offset: 0x01dbbab6, size: 29 bytes, params: 2, frame: 11
|
||||
env0_17.delete(id);
|
||||
}
|
||||
|
||||
function getQueryString() { // fn#75814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:649, owner: SearchQueryStateManager.getQueryString, offset: 0x01dbb2f2, size: 100 bytes, params: 1, frame: 16
|
||||
const value = a0;
|
||||
const queryString = env0_0.tagsManager.getQueryString(value !== undefined ? value : false);
|
||||
return queryString.length !== 0 ? '' + queryString + ' ' + env0_0.textInputValue : env0_0.textInputValue;
|
||||
}
|
||||
|
||||
function isQueryStringEmpty() { // fn#75815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:794, owner: SearchQueryStateManager.isQueryStringEmpty, offset: 0x01dbb356, size: 40 bytes, params: 1, frame: 9
|
||||
const queryString = env0_0.getQueryString();
|
||||
return queryString.trim().length === 0;
|
||||
}
|
||||
|
||||
function getTextInputValue() { // fn#75816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:861, owner: SearchQueryStateManager.getTextInputValue, offset: 0x01dbb37e, size: 15 bytes, params: 1, frame: 1
|
||||
return env0_0.textInputValue;
|
||||
}
|
||||
|
||||
function setTextInputValue(a0) { // fn#75817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:908, owner: SearchQueryStateManager.setTextInputValue, offset: 0x01dbb38d, size: 45 bytes, params: 2, frame: 11
|
||||
const value = a1;
|
||||
const r1 = value !== undefined ? value : false;
|
||||
const binding = env0_0;
|
||||
binding.textInputValue = a0;
|
||||
binding.textInputChangedFromInput = r1;
|
||||
binding.resetExplicitSearchSubmitted();
|
||||
}
|
||||
|
||||
function isInitialSearchQuery() { // fn#75818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1037, owner: SearchQueryStateManager.isInitialSearchQuery, offset: 0x01dbb3ba, size: 81 bytes, params: 1, frame: 11
|
||||
return !env0_0.isExplicitSearchSubmitted && (env0_0.textInputValue.trim().length === 0 && !env0_0.tagsManager.hasUserAddedTags());
|
||||
}
|
||||
|
||||
function markExplicitSearchSubmitted() { // fn#75819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1185, owner: SearchQueryStateManager.markExplicitSearchSubmitted, offset: 0x01dbb40b, size: 19 bytes, params: 1, frame: 2
|
||||
env0_0.isExplicitSearchSubmitted = true;
|
||||
}
|
||||
|
||||
function resetExplicitSearchSubmitted() { // fn#75820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1259, owner: SearchQueryStateManager.resetExplicitSearchSubmitted, offset: 0x01dbb41e, size: 19 bytes, params: 1, frame: 2
|
||||
env0_0.isExplicitSearchSubmitted = false;
|
||||
}
|
||||
|
||||
function getSearchResultsQuery() { // fn#75821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1326, owner: SearchQueryStateManager.getSearchResultsQuery, offset: 0x01dbb431, size: 15 bytes, params: 1, frame: 1
|
||||
return env0_0.searchResultsQuery;
|
||||
}
|
||||
|
||||
function setSearchResultsQuery(a0) { // fn#75822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1381, owner: SearchQueryStateManager.setSearchResultsQuery, offset: 0x01dbb440, size: 20 bytes, params: 2, frame: 2
|
||||
env0_0.searchResultsQuery = a0;
|
||||
}
|
||||
|
||||
function isTextInputValueEmpty() { // fn#75823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1439, owner: SearchQueryStateManager.isTextInputValueEmpty, offset: 0x01dbb454, size: 36 bytes, params: 1, frame: 9
|
||||
const textInputValue = env0_0.textInputValue;
|
||||
return textInputValue.trim().length === 0;
|
||||
}
|
||||
|
||||
function getTextValueChangedFromInput() { // fn#75824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1515, owner: SearchQueryStateManager.getTextValueChangedFromInput, offset: 0x01dbb478, size: 15 bytes, params: 1, frame: 1
|
||||
return env0_0.textInputChangedFromInput;
|
||||
}
|
||||
|
||||
function hasUserAddedTags() { // fn#75825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1572, owner: SearchQueryStateManager.hasUserAddedTags, offset: 0x01dbb487, size: 25 bytes, params: 1, frame: 9
|
||||
return env0_0.tagsManager.hasUserAddedTags();
|
||||
}
|
||||
|
||||
function getTags() { // fn#75826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1625, owner: SearchQueryStateManager.getTags, offset: 0x01dbb4a0, size: 24 bytes, params: 1, frame: 9
|
||||
return env0_0.tagsManager.get();
|
||||
}
|
||||
|
||||
function getPrefixTag() { // fn#75827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1670, owner: SearchQueryStateManager.getPrefixTag, offset: 0x01dbb4b8, size: 25 bytes, params: 1, frame: 9
|
||||
return env0_0.tagsManager.getPrefixTag();
|
||||
}
|
||||
|
||||
function isAutocompleteVisible() { // fn#75828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1733, owner: SearchQueryStateManager.isAutocompleteVisible, offset: 0x01dbb4d1, size: 25 bytes, params: 1, frame: 9
|
||||
return env0_0.getPrefixTag() != null;
|
||||
}
|
||||
|
||||
function SearchQueryStateManagerSetTags(a0) { // fn#75829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1776, owner: SearchQueryStateManager.setTags, offset: 0x01dbb4ea, size: 40 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
binding.tagsManager.set(a0);
|
||||
binding.resetExplicitSearchSubmitted();
|
||||
}
|
||||
|
||||
function SearchQueryStateManagerAddTag(a0) { // fn#75830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1853, owner: SearchQueryStateManager.addTag, offset: 0x01dbb512, size: 40 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
binding.tagsManager.add(a0);
|
||||
binding.resetExplicitSearchSubmitted();
|
||||
}
|
||||
|
||||
function removeTag(a0) { // fn#75831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:1933, owner: SearchQueryStateManager.removeTag, offset: 0x01dbb53a, size: 43 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
binding.tagsManager.removeAtIndex(a0);
|
||||
binding.resetExplicitSearchSubmitted();
|
||||
}
|
||||
|
||||
function removePrefixTags() { // fn#75832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:2030, owner: SearchQueryStateManager.removePrefixTags, offset: 0x01dbb565, size: 39 bytes, params: 1, frame: 10
|
||||
const binding = env0_0;
|
||||
binding.tagsManager.removeAnyPrefixTags();
|
||||
binding.resetExplicitSearchSubmitted();
|
||||
}
|
||||
|
||||
function getChannelIds() { // fn#75833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:2130, owner: SearchQueryStateManager.getChannelIds, offset: 0x01dbb58c, size: 25 bytes, params: 1, frame: 9
|
||||
return env0_0.tagsManager.getChannelIds();
|
||||
}
|
||||
|
||||
function getUserIds(a0) { // fn#75834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:2183, owner: SearchQueryStateManager.getUserIds, offset: 0x01dbb5a5, size: 29 bytes, params: 2, frame: 11
|
||||
return env0_0.tagsManager.getUserIds(a0);
|
||||
}
|
||||
|
||||
function isTagsEmpty() { // fn#75835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:2234, owner: SearchQueryStateManager.isTagsEmpty, offset: 0x01dbb5c2, size: 25 bytes, params: 1, frame: 9
|
||||
return env0_0.tagsManager.isEmpty();
|
||||
}
|
||||
|
||||
function saveDraftTextInputValue() { // fn#75836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:2294, owner: SearchQueryStateManager.saveDraftTextInputValue, offset: 0x01dbb5db, size: 59 bytes, params: 1, frame: 11
|
||||
var binding;
|
||||
if (!(env0_0.draftTextInputValue != null || env0_0.isTextInputValueEmpty())) {
|
||||
binding = env0_0;
|
||||
binding.draftTextInputValue = binding.textInputValue;
|
||||
}
|
||||
}
|
||||
|
||||
function restoreDraftTextInputValue() { // fn#75837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:2441, owner: SearchQueryStateManager.restoreDraftTextInputValue, offset: 0x01dbb616, size: 53 bytes, params: 1, frame: 3
|
||||
var binding;
|
||||
if (env0_0.draftTextInputValue != null) {
|
||||
binding = env0_0;
|
||||
binding.textInputValue = binding.draftTextInputValue;
|
||||
binding.textInputChangedFromInput = false;
|
||||
binding.draftTextInputValue = null;
|
||||
}
|
||||
}
|
||||
|
||||
function SearchQueryStateManagerReset() { // fn#75838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:2601, owner: SearchQueryStateManager.reset, offset: 0x01dbb64b, size: 74 bytes, params: 1, frame: 12
|
||||
const binding = env0_0;
|
||||
binding.textInputValue = EMPTY_SEARCH_QUERY_STRING;
|
||||
binding.textInputChangedFromInput = false;
|
||||
binding.searchResultsQuery = EMPTY_SEARCH_QUERY_STRING;
|
||||
binding.draftTextInputValue = null;
|
||||
binding.isExplicitSearchSubmitted = false;
|
||||
const tagsManager = binding.tagsManager;
|
||||
tagsManager.set(binding.initialTagsSnapshot);
|
||||
}
|
||||
|
||||
function value_75844(a0) { // fn#75844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4045, offset: 0x01dbb897, size: 39 bytes, params: 2, frame: 12
|
||||
let value = a1;
|
||||
const r2 = value !== undefined ? value : false;
|
||||
value = environment.__proto__;
|
||||
return getState_75812(a0).getQueryString(r2);
|
||||
}
|
||||
|
||||
function value_75845(a0) { // fn#75845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4133, offset: 0x01dbb8be, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).isQueryStringEmpty();
|
||||
}
|
||||
|
||||
function value_75846(a0) { // fn#75846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4218, offset: 0x01dbb8db, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).getTextInputValue();
|
||||
}
|
||||
|
||||
function value_75847(a0) { // fn#75847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4305, offset: 0x01dbb8f8, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).isInitialSearchQuery();
|
||||
}
|
||||
|
||||
function value_75848(a0) { // fn#75848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4396, offset: 0x01dbb915, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).getSearchResultsQuery();
|
||||
}
|
||||
|
||||
function value_75849(a0) { // fn#75849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4488, offset: 0x01dbb932, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).isTextInputValueEmpty();
|
||||
}
|
||||
|
||||
function value_75850(a0) { // fn#75850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4587, offset: 0x01dbb94f, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).getTextValueChangedFromInput();
|
||||
}
|
||||
|
||||
function value_75851(a0) { // fn#75851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4681, offset: 0x01dbb96c, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).hasUserAddedTags();
|
||||
}
|
||||
|
||||
function value_75852(a0) { // fn#75852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4754, offset: 0x01dbb989, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).getTags();
|
||||
}
|
||||
|
||||
function value_75853(a0) { // fn#75853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4823, offset: 0x01dbb9a6, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).getPrefixTag();
|
||||
}
|
||||
|
||||
function value_75854(a0) { // fn#75854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4906, offset: 0x01dbb9c3, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).isAutocompleteVisible();
|
||||
}
|
||||
|
||||
function value_75855(a0) { // fn#75855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:4990, offset: 0x01dbb9e0, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).getChannelIds();
|
||||
}
|
||||
|
||||
function value_75856(a0, a1) { // fn#75856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:5063, offset: 0x01dbb9fd, size: 33 bytes, params: 3, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).getUserIds(a1);
|
||||
}
|
||||
|
||||
function value_75857(a0) { // fn#75857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9860:5137, offset: 0x01dbba1e, size: 29 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return getState_75812(a0).isTagsEmpty();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,348 @@
|
||||
/* Metro module 9687; source: modules/search/native/stores/SearchQueryTagManager.tsx; dependencies: [6, 7, 9615, 9614, 2] */
|
||||
function _fun76134(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:6, offset: 0x01dc4e64, size: 192 bytes, params: 8, frame: 19
|
||||
const isPrefix = function({type}) {
|
||||
return type === SearchQueryTagTypes.PREFIX;
|
||||
};
|
||||
const isComplete = function({type}) {
|
||||
return type === SearchQueryTagTypes.COMPLETE;
|
||||
};
|
||||
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 env0_2 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchQueryTagTypes;
|
||||
const env0_3 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
|
||||
const value = _fun76137();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/stores/SearchQueryTagManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun76137() { // fn#76137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:283, offset: 0x01dc4f5a, size: 444 bytes, params: 1, frame: 15
|
||||
return env0_1(SearchQueryTagManager, [{key: 'markChanged', value: function() {
|
||||
var property = global.Set;
|
||||
var value2 = new property();
|
||||
var env0_0 = value2;
|
||||
var value4 = new global.Set();
|
||||
var env0_1 = value4;
|
||||
this.tags.forEach(_fun76140);
|
||||
this.ids = value2;
|
||||
this.channelIds = value4;
|
||||
property = this.version;
|
||||
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
|
||||
}}, {key: 'mergeTag', value: value_76141}, {key: 'replaceTag', value: function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
this.tags = this.tags.map(_fun76144);
|
||||
}}, {key: 'exists', value: function(a0) {
|
||||
return this.ids.has(a0.text);
|
||||
}}, {key: 'getChannelIds', value: function() {
|
||||
return this.channelIds;
|
||||
}}, {key: 'getUserIds', value: function(a0) {
|
||||
var env0_0 = a0;
|
||||
var value2 = new global.Set();
|
||||
var env0_1 = value2;
|
||||
this.tags.forEach(_fun76148);
|
||||
return value2;
|
||||
}}, {key: 'isChannelTagsOnly', value: value_76149}, {key: 'hasUserAddedTags', value: value_76151}, {key: 'isEmpty',
|
||||
value: function() {
|
||||
return this.tags.length === 0;
|
||||
}}, {key: 'getPrefixTag', value: value_76154}, {key: 'get', value: function() {
|
||||
return this.tags;
|
||||
}}, {key: 'set', value: function(a0) {
|
||||
this.tags = a0;
|
||||
this.markChanged();
|
||||
}}, {key: 'getQueryString', value: function() {
|
||||
var r0;
|
||||
var value = a0;
|
||||
var env0_0 = value !== undefined ? value : false;
|
||||
value = this.tags.filter(_fun76158);
|
||||
var value2 = '';
|
||||
if (value.length === 0) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value = value.map(_fun76159);
|
||||
value = value.join(' ');
|
||||
value = value2 + value;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}}, {key: 'add', value: value_76160}, {key: 'removeAnyPrefixTags', value: function() {
|
||||
this.tags = this.tags.filter(_fun76162);
|
||||
this.markChanged();
|
||||
}}, {key: 'removeAtIndex', value: function(a0) {
|
||||
var env0_0 = this.tags[a0];
|
||||
this.tags = this.tags.filter(_fun76164);
|
||||
this.markChanged();
|
||||
}}]);
|
||||
}
|
||||
|
||||
function SearchQueryTagManager() { // fn#76138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:304, offset: 0x01dc5116, size: 111 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
env1_0(this, SearchQueryTagManager);
|
||||
this.tags = [];
|
||||
let Set = global.Set;
|
||||
this.ids = new Set();
|
||||
Set = global.Set;
|
||||
this.channelIds = new Set();
|
||||
this.version = 0;
|
||||
}
|
||||
|
||||
function value_76139() { // fn#76139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:464, offset: 0x01dc5185, size: 121 bytes, params: 1, frame: 14
|
||||
let Set = global.Set;
|
||||
let set = new Set();
|
||||
Set = global.Set;
|
||||
set = new Set();
|
||||
this.tags.forEach(_fun76140);
|
||||
this.ids = set;
|
||||
this.channelIds = set;
|
||||
const version = this.version;
|
||||
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
||||
}
|
||||
|
||||
function value_76141(a0, a1) { // fn#76141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:660, offset: 0x01dc524b, size: 178 bytes, params: 3, frame: 20
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
const COMPLETE = SearchQueryTagTypes.COMPLETE;
|
||||
object2.type = COMPLETE;
|
||||
const text = a0.text;
|
||||
object2.text = '' + text + ' ' + a1.text;
|
||||
object2.location = a0.location;
|
||||
object2.searchTokenType = a0.searchTokenType;
|
||||
object2.channelId = a1.channelId;
|
||||
const userId = a1.userId;
|
||||
object2.userId = userId;
|
||||
value = this.tags.filter(_fun76142);
|
||||
const items2 = [];
|
||||
value = arraySpread(items2, value, 0, text);
|
||||
items2[value] = object2;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
|
||||
function value_76143(a0, a1) { // fn#76143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:896, offset: 0x01dc5318, size: 52 bytes, params: 3, frame: 12
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const tags = this.tags;
|
||||
this.tags = tags.map(_fun76144);
|
||||
}
|
||||
|
||||
function value_76147(a0) { // fn#76147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1101, offset: 0x01dc5388, size: 69 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
this.tags.forEach(_fun76148);
|
||||
return set;
|
||||
}
|
||||
|
||||
function value_76149() { // fn#76149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1270, offset: 0x01dc5413, size: 48 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const tags = this.tags;
|
||||
const filter = tags.filter;
|
||||
const value = environment.__proto__;
|
||||
return Reflect.apply(filter, tags, [isComplete]).every(function(a0) {
|
||||
return a0.channelId != null;
|
||||
});
|
||||
}
|
||||
|
||||
function value_76151() { // fn#76151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1383, offset: 0x01dc5453, size: 48 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const tags = this.tags;
|
||||
const filter = tags.filter;
|
||||
const value = environment.__proto__;
|
||||
return Reflect.apply(filter, tags, [isComplete]).some(function({location}) {
|
||||
return location !== SearchFilterAddLocations.CLIENT_AUTO_ADD;
|
||||
});
|
||||
}
|
||||
|
||||
function value_76154() { // fn#76154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1562, offset: 0x01dc54b4, size: 63 bytes, params: 1, frame: 11
|
||||
var value;
|
||||
var isPrefixBinding;
|
||||
const property = this.tags[this.tags.length - 1];
|
||||
if (property != null) {
|
||||
value = environment.__proto__;
|
||||
isPrefixBinding = isPrefix;
|
||||
value = undefined;
|
||||
return isPrefixBinding(property) ? property : value;
|
||||
}
|
||||
}
|
||||
|
||||
function value_76157() { // fn#76157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1787, offset: 0x01dc5518, size: 114 bytes, params: 1, frame: 14
|
||||
let value = a0;
|
||||
let r0 = value !== undefined ? value : false;
|
||||
const length = this.tags.filter(_fun76158).length;
|
||||
const value2 = '';
|
||||
if (length === 0) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value = value.map(function(a0) {
|
||||
return a0.text;
|
||||
});
|
||||
value = value.join(' ');
|
||||
value = value2 + value;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_76160(a0) { // fn#76160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1923, offset: 0x01dc55aa, size: 227 bytes, params: 2, frame: 18
|
||||
var tags;
|
||||
var property;
|
||||
var value;
|
||||
var type;
|
||||
var items2;
|
||||
if (!this.exists(a0)) {
|
||||
tags = this.tags;
|
||||
property = tags[this.tags.length - 1];
|
||||
value = environment.__proto__;
|
||||
if (isPrefix(a0)) {
|
||||
if (property == null) {
|
||||
type = a0.type;
|
||||
if (type !== SearchQueryTagTypes.ANSWER) {
|
||||
if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
} else if (property == null) {
|
||||
if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
} else if (isPrefix(property)) {
|
||||
this.mergeTag(property, a0);
|
||||
} else if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
} else if (isPrefix(property)) {
|
||||
this.replaceTag(property, a0);
|
||||
} else {
|
||||
type = a0.type;
|
||||
if (type !== SearchQueryTagTypes.ANSWER) {
|
||||
if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
} else if (property == null) {
|
||||
if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
} else if (isPrefix(property)) {
|
||||
this.mergeTag(property, a0);
|
||||
} else if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
type = a0.type;
|
||||
if (type !== SearchQueryTagTypes.ANSWER) {
|
||||
if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
} else if (property == null) {
|
||||
if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
} else if (isPrefix(property)) {
|
||||
this.mergeTag(property, a0);
|
||||
} else if (isPrefix(a0) || isComplete(a0)) {
|
||||
tags = this.tags;
|
||||
items2 = [];
|
||||
value = arraySpread(items2, tags, 0, type);
|
||||
items2[value] = a0;
|
||||
value + 1;
|
||||
this.tags = items2;
|
||||
}
|
||||
}
|
||||
this.markChanged();
|
||||
}
|
||||
}
|
||||
|
||||
function value_76161() { // fn#76161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:2251, offset: 0x01dc568d, size: 48 bytes, params: 1, frame: 12
|
||||
const tags = this.tags;
|
||||
this.tags = tags.filter(function(a0) {
|
||||
return !isPrefix(a0);
|
||||
});
|
||||
this.markChanged();
|
||||
}
|
||||
|
||||
function value_76163(a0) { // fn#76163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:2356, offset: 0x01dc56d3, size: 65 bytes, params: 2, frame: 12
|
||||
let tags = this.tags;
|
||||
const env0_0 = tags[a0];
|
||||
tags = this.tags;
|
||||
this.tags = tags.filter(_fun76164);
|
||||
this.markChanged();
|
||||
}
|
||||
|
||||
function _fun76140(a0) { // fn#76140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:518, offset: 0x01dc51fe, size: 77 bytes, params: 2, frame: 14
|
||||
let binding = env0_0;
|
||||
binding.add(a0.text);
|
||||
if (isComplete(a0) && a0.channelId != null) {
|
||||
binding = env0_1;
|
||||
binding.add(a0.channelId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76142(a0) { // fn#76142, offset: 0x01dc52fd, size: 27 bytes, params: 2, frame: 4
|
||||
return a0 !== env0_0 && a0 !== require;
|
||||
}
|
||||
|
||||
function _fun76144(a0) { // fn#76144, offset: 0x01dc534c, size: 20 bytes, params: 2, frame: 3
|
||||
const value = a0;
|
||||
return value !== env0_0 ? value : require;
|
||||
}
|
||||
|
||||
function _fun76148(a0) { // fn#76148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1153, offset: 0x01dc53cd, size: 70 bytes, params: 2, frame: 13
|
||||
var userId;
|
||||
if (isComplete(a0)) {
|
||||
userId = a0.userId;
|
||||
if (a0.searchTokenType === env0_0 && userId != null) {
|
||||
env0_1.add(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76158(a0) { // fn#76158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9873:1826, offset: 0x01dc558a, size: 32 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = isPrefix(a0);
|
||||
return value ? env0_0 : !value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
/* Metro module 11829; source: modules/search/native/stores/SearchTabsLayoutStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 4792, 11830, 11831, 11832, 9674, 9615, 628, 9675, 566, 694, 2] */
|
||||
function _fun90609(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:6, offset: 0x0203ffaf, size: 527 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_90615 = 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 = SEARCH_QUERY_NATIVE_INITIALIZE;
|
||||
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 searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
|
||||
const searchGuildChannelTabStore = importDefault(11830) /* metro dependency 11830: SearchGuildChannelTabStore */;
|
||||
const searchMemberTabStore = importDefault(11831) /* metro dependency 11831: SearchMemberTabStore */;
|
||||
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_14 = searchConstantsModule.SearchTabs;
|
||||
const env0_15 = searchConstantsModule.SEARCH_TYPE_TO_SEARCH_INITIAL_TABS;
|
||||
const env0_16 = searchConstantsModule.SEARCH_TYPE_TO_SEARCH_RESULT_TABS;
|
||||
const env0_17 = [];
|
||||
const Map = global.Map;
|
||||
let map = new Map();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun90625(Store).displayName = 'SearchTabsLayoutStore';
|
||||
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {SEARCH_QUERY_NATIVE_INITIALIZE: closure,
|
||||
SEARCH_QUERY_NATIVE_UPDATE: closure, SEARCH_QUERY_NATIVE_DELETE: SEARCH_QUERY_NATIVE_DELETE_90631});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/stores/SearchTabsLayoutStore.tsx');
|
||||
exports.default = map;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_90610() { // fn#90610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:315, offset: 0x020401be, 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_90610_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_90613(a0, a1) { // fn#90613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:508, offset: 0x02040220, 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 _fun90614;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_90615(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_90615(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_90615(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun90614;
|
||||
}
|
||||
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 createInitialState(a0) { // fn#90616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:1437, offset: 0x02040394, size: 47 bytes, params: 2, frame: 3
|
||||
return {searchContext: a0, wasInitialSearchQuery: true, candidateTabs: env0_17, visibleTabs: env0_17,
|
||||
visibleTabCounts: null};
|
||||
}
|
||||
|
||||
function SEARCH_QUERY_NATIVE_INITIALIZE({searchContext}) { // fn#90617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:1569, offset: 0x020403c3, size: 100 bytes, params: 2, frame: 15
|
||||
const searchContextId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
|
||||
const r1 = env0_18.get(searchContextId) ?? createInitialState(searchContext);
|
||||
env0_18.set(searchContextId, r1);
|
||||
return computeLayoutForState(r1);
|
||||
}
|
||||
|
||||
function computeLayoutForState(a0) { // fn#90618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:1743, offset: 0x02040427, size: 621 bytes, params: 2, frame: 24
|
||||
var r3;
|
||||
var r5;
|
||||
var r8;
|
||||
var visibleTabs;
|
||||
var visibleTabCounts;
|
||||
var value12;
|
||||
var value14;
|
||||
const env0_0 = a0;
|
||||
const searchContext = a0.searchContext;
|
||||
if (SearchQueryStore.isAutocompleteVisible(searchContext)) {
|
||||
return false;
|
||||
}
|
||||
const isInitialSearchQuery2 = SearchQueryStore.isInitialSearchQuery(searchContext);
|
||||
const env0_3 = SearchQueryStore.isTextInputValueEmpty(searchContext);
|
||||
const env0_4 = SearchQueryStore.hasUserAddedTags(searchContext);
|
||||
const env0_5 = SearchQueryStore.isTagsEmpty(searchContext);
|
||||
const searchResultsQuery = SearchQueryStore.getSearchResultsQuery(searchContext);
|
||||
const queryString = SearchQueryStore.getQueryString(searchContext);
|
||||
let r6 = isInitialSearchQuery2 ? SEARCH_TYPE_TO_SEARCH_INITIAL_TABS[searchContext.type] : SEARCH_TYPE_TO_SEARCH_RESULT_TABS[searchContext.type];
|
||||
const value4 = undefined;
|
||||
const channel = ChannelStore.getChannel((require(9675) /* metro dependency 9675: SearchUtils */).getChannelIdFromSearchContext(searchContext));
|
||||
const value7 = null;
|
||||
const r2 = value7 == channel ? value4 : channel.isArchivedThread();
|
||||
let r1 = value7 != r2 && r2;
|
||||
const value9 = r6.filter(_fun90619);
|
||||
const env0_8 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
|
||||
if (isInitialSearchQuery2) {
|
||||
r3 = true;
|
||||
r5 = value7;
|
||||
r6 = value9;
|
||||
} else if (searchResultsQuery !== queryString) {
|
||||
value14 = value9.filter(_fun90621);
|
||||
r3 = false;
|
||||
r5 = value7;
|
||||
r6 = value14;
|
||||
} else if (value9.every(_fun90622)) {
|
||||
value12 = value9.filter(_fun90623);
|
||||
r3 = false;
|
||||
r5 = value9.reduce(_fun90620, {});
|
||||
r6 = value12;
|
||||
} else {
|
||||
visibleTabs = a0.visibleTabs;
|
||||
visibleTabCounts = a0.visibleTabCounts;
|
||||
r3 = a0.wasInitialSearchQuery;
|
||||
r5 = visibleTabCounts;
|
||||
r6 = visibleTabs;
|
||||
}
|
||||
const shallowEqualModule = require(628) /* metro dependency 628: shallowEqual */;
|
||||
const value16 = shallowEqualModule.areArraysShallowEqual(a0.candidateTabs, value9);
|
||||
const value17 = !value16;
|
||||
const moduleValue4 = shallowEqualModule;
|
||||
const value18 = moduleValue4.areArraysShallowEqual(a0.visibleTabs, r6);
|
||||
const value19 = !value18;
|
||||
visibleTabCounts = a0.visibleTabCounts;
|
||||
const value20 = visibleTabCounts === r5;
|
||||
if (value20) {
|
||||
r1 = value20;
|
||||
} else {
|
||||
r8 = value7 != visibleTabCounts && value7 != r5;
|
||||
r8 = r8 && (importDefault(628) /* metro dependency 628: shallowEqual */)(visibleTabCounts, r5);
|
||||
r1 = r8;
|
||||
}
|
||||
const value = !r1;
|
||||
if (!value16) {
|
||||
a0.candidateTabs = value9;
|
||||
}
|
||||
if (!value18) {
|
||||
a0.visibleTabs = r6;
|
||||
}
|
||||
if (!r1) {
|
||||
a0.visibleTabCounts = r5;
|
||||
}
|
||||
a0.wasInitialSearchQuery = r3;
|
||||
let r0 = value16 ? value19 : value17;
|
||||
r0 = !r0 ? value : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function computeLayoutForAll() { // fn#90624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:3173, offset: 0x0204087d, size: 85 bytes, params: 1, frame: 18
|
||||
var r2;
|
||||
var r3;
|
||||
var r0;
|
||||
var computeLayoutForStateBinding;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
const value3 = _createForOfIteratorHelperLoose_90613(env0_18.values());
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
const value5 = false;
|
||||
if (done) {
|
||||
r0 = value5;
|
||||
} else {
|
||||
r2 = value5;
|
||||
r3 = value4;
|
||||
while (true) {
|
||||
computeLayoutForStateBinding = computeLayoutForState;
|
||||
value6 = r3.value;
|
||||
if (computeLayoutForStateBinding(value6)) {
|
||||
value7 = true;
|
||||
r2 = value7;
|
||||
}
|
||||
value8 = value3();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
r0 = r2;
|
||||
break;
|
||||
}
|
||||
r3 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun90625(a0) { // fn#90625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:3335, offset: 0x020408d2, size: 153 bytes, params: 2, frame: 16
|
||||
const closure = SearchTabsLayoutStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(SearchQueryStore, SearchMessageStore, SearchMemberTabStore, SearchGuildChannelTabStore,
|
||||
SearchPeopleTabStore, ChannelStore);
|
||||
this.syncWith([SearchMessageStore, SearchMemberTabStore, SearchGuildChannelTabStore, SearchPeopleTabStore],
|
||||
computeLayoutForAll);
|
||||
}}, {key: 'getCandidateTabs', value: value_90628}, {key: 'getVisibleTabs', value: value_90629},
|
||||
{key: 'getVisibleTabCounts', value: value_90630}]);
|
||||
}
|
||||
|
||||
function SEARCH_QUERY_NATIVE_DELETE_90631({id}) { // fn#90631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:4403, offset: 0x02040ab2, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_18.delete(id);
|
||||
}
|
||||
|
||||
function _fun90619(a0) { // fn#90619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:2151, offset: 0x02040694, size: 120 bytes, params: 2, frame: 5
|
||||
const value = environment.__proto__;
|
||||
const MEMBERS = SearchTabs.MEMBERS;
|
||||
if (MEMBERS === a0) {
|
||||
return !env0_7 && (env0_2 || !env0_4 && !env0_3);
|
||||
}
|
||||
const RECENT = SearchTabs.RECENT;
|
||||
if (RECENT === a0) {
|
||||
return env0_5;
|
||||
}
|
||||
const GUILD_CHANNELS = SearchTabs.GUILD_CHANNELS;
|
||||
if (GUILD_CHANNELS === a0) {
|
||||
return env0_5;
|
||||
}
|
||||
const PEOPLE = SearchTabs.PEOPLE;
|
||||
if (PEOPLE === a0) {
|
||||
return env0_5;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun90620(a0, a1) { // fn#90620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:2328, offset: 0x0204070c, size: 284 bytes, params: 3, frame: 19
|
||||
var getTotalCount;
|
||||
let value = environment.__proto__;
|
||||
const MEMBERS = SearchTabs.MEMBERS;
|
||||
if (MEMBERS === a1) {
|
||||
a0[a1] = SearchMemberTabStore.getCount(env0_8);
|
||||
} else if (SearchTabs.GUILD_CHANNELS === a1) {
|
||||
a0[a1] = SearchGuildChannelTabStore.getCount(env0_8);
|
||||
} else if (SearchTabs.PEOPLE === a1) {
|
||||
a0[a1] = SearchPeopleTabStore.getCount(env0_8);
|
||||
} else if (SearchTabs.MESSAGES === a1) {
|
||||
getTotalCount = SearchMessageStore.getTotalCount;
|
||||
value = require(9675) /* metro dependency 9675: SearchUtils */;
|
||||
a0[a1] = Reflect.apply(getTotalCount, SearchMessageStore, [value.getSearchTabFetchId(searchContext, a1,
|
||||
env0_6)]);
|
||||
} else if (SearchTabs.PINS === a1) {
|
||||
getTotalCount = SearchMessageStore.getTotalCount;
|
||||
value = require(9675) /* metro dependency 9675: SearchUtils */;
|
||||
a0[a1] = Reflect.apply(getTotalCount, SearchMessageStore, [value.getSearchTabFetchId(searchContext, a1,
|
||||
env0_6)]);
|
||||
} else if (SearchTabs.MEDIA === a1) {
|
||||
getTotalCount = SearchMessageStore.getTotalCount;
|
||||
value = require(9675) /* metro dependency 9675: SearchUtils */;
|
||||
a0[a1] = Reflect.apply(getTotalCount, SearchMessageStore, [value.getSearchTabFetchId(searchContext, a1,
|
||||
env0_6)]);
|
||||
} else if (SearchTabs.LINKS === a1) {
|
||||
getTotalCount = SearchMessageStore.getTotalCount;
|
||||
value = require(9675) /* metro dependency 9675: SearchUtils */;
|
||||
a0[a1] = Reflect.apply(getTotalCount, SearchMessageStore, [value.getSearchTabFetchId(searchContext, a1,
|
||||
env0_6)]);
|
||||
} else if (SearchTabs.FILES === a1) {
|
||||
getTotalCount = SearchMessageStore.getTotalCount;
|
||||
value = require(9675) /* metro dependency 9675: SearchUtils */;
|
||||
a0[a1] = Reflect.apply(getTotalCount, SearchMessageStore, [value.getSearchTabFetchId(searchContext, a1,
|
||||
env0_6)]);
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun90621(a0) { // fn#90621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:2678, offset: 0x02040828, size: 41 bytes, params: 2, frame: 12
|
||||
return env0_0.wasInitialSearchQuery || env0_0.visibleTabs.includes(a0);
|
||||
}
|
||||
|
||||
function _fun90622(a0) { // fn#90622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:2756, offset: 0x02040851, size: 22 bytes, params: 2, frame: 2
|
||||
return env0_9[a0] != null;
|
||||
}
|
||||
|
||||
function _fun90623(a0) { // fn#90623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:2785, offset: 0x02040867, size: 22 bytes, params: 2, frame: 2
|
||||
return env0_9[a0] !== 0;
|
||||
}
|
||||
|
||||
function value_90628(a0) { // fn#90628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:3784, offset: 0x020409ce, size: 76 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return (env1_18.get((require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0)) ?? createInitialState(a0)).candidateTabs;
|
||||
}
|
||||
|
||||
function value_90629(a0) { // fn#90629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:3931, offset: 0x02040a1a, size: 76 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return (env1_18.get((require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0)) ?? createInitialState(a0)).visibleTabs;
|
||||
}
|
||||
|
||||
function value_90630(a0) { // fn#90630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12015:4081, offset: 0x02040a66, size: 76 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return (env1_18.get((require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(a0)) ?? createInitialState(a0)).visibleTabCounts;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user