114 lines
5.5 KiB
TypeScript
114 lines
5.5 KiB
TypeScript
/* Metro module 9680; source: modules/search/tokens/SearchTokenStreamerModeUtils.tsx; dependencies: [3996, 661, 9675, 2] */
|
|
import StreamerModeStore from '../../../stores/StreamerModeStore.tsx'; /* Metro dependency 3996 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as SearchUtilsModule from '../SearchUtils.tsx'; /* Metro dependency 9675 */
|
|
|
|
function _fun76039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9866:6, offset: 0x01dc23ff, size: 214 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const closure = function() {
|
|
var value = a0;
|
|
var value2 = undefined;
|
|
var iterator = (value !== value2 ? value : [StreamerModeStore])[Symbol.iterator]();
|
|
var item2 = iterator.next();
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
value = item2 === value2;
|
|
var r0 = value ? value2 : item;
|
|
if (!value) {
|
|
item2.return();
|
|
}
|
|
return !r0.hidePersonalInformation;
|
|
};
|
|
const closure2 = function() {
|
|
var value = a0;
|
|
var value2 = undefined;
|
|
var iterator = (value !== value2 ? value : [StreamerModeStore])[Symbol.iterator]();
|
|
var item2 = iterator.next();
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
value = item2 === value2;
|
|
var r0 = value ? value2 : item;
|
|
if (!value) {
|
|
item2.return();
|
|
}
|
|
return !r0.hidePersonalInformation;
|
|
};
|
|
const isInChannelFilterSupported2 = isInChannelFilterSupported;
|
|
const getValidOrderedFilterTokens2 = getValidOrderedFilterTokens;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/search/tokens/SearchTokenStreamerModeUtils.tsx');
|
|
exports.isFromUserFilterSupported = closure;
|
|
exports.isMentionsUserFilterSupported = closure2;
|
|
exports.isInChannelFilterSupported = isInChannelFilterSupported2;
|
|
exports.getValidOrderedFilterTokens = getValidOrderedFilterTokens2;
|
|
exports.getValidFilterTokens = getValidFilterTokens;
|
|
function isInChannelFilterSupported(a0) { // fn#76042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9866:311, offset: 0x01dc251a, size: 140 bytes, params: 2, frame: 15
|
|
let value = a1;
|
|
const value2 = undefined;
|
|
let r2 = value !== value2 ? value : [StreamerModeStore];
|
|
const iterator = r2[Symbol.iterator]();
|
|
let item2 = iterator.next();
|
|
const item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
value = item2 === value2;
|
|
r2 = value ? value2 : item;
|
|
if (!value) {
|
|
item2.return();
|
|
}
|
|
const isGuildLikeSearchContext2 = (SearchUtilsModule).isGuildLikeSearchContext(a0);
|
|
return isGuildLikeSearchContext2 ? !!isGuildLikeSearchContext2 : a0.type === SearchTypes.DMS && !r2.hidePersonalInformation;
|
|
}
|
|
|
|
function getValidOrderedFilterTokens(a0, a1) { // fn#76043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9866:446, offset: 0x01dc25a6, size: 266 bytes, params: 3, frame: 16
|
|
const iterator = a1[Symbol.iterator]();
|
|
let item2 = iterator.next();
|
|
const item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r5 = value2 ? value : item;
|
|
if (!value2) {
|
|
item2.return();
|
|
}
|
|
const items2 = [];
|
|
if (isFromUserFilterSupported([r5])) {
|
|
items2.push(SearchTokenTypes.FILTER_FROM);
|
|
}
|
|
if (isInChannelFilterSupported(a0, [r5])) {
|
|
items2.push(SearchTokenTypes.FILTER_IN);
|
|
}
|
|
let push = items2.push;
|
|
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
|
|
Reflect.apply(push, items2, [FILTER_HAS]);
|
|
if (isMentionsUserFilterSupported([r5])) {
|
|
items2.push(SearchTokenTypes.FILTER_MENTIONS);
|
|
}
|
|
push = items2.push;
|
|
const FILTER_ON = SearchTokenTypes.FILTER_ON;
|
|
Reflect.apply(push, items2, [FILTER_ON]);
|
|
push = items2.push;
|
|
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
|
|
Reflect.apply(push, items2, [FILTER_BEFORE]);
|
|
push = items2.push;
|
|
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
|
|
Reflect.apply(push, items2, [FILTER_AFTER]);
|
|
push = items2.push;
|
|
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
|
|
Reflect.apply(push, items2, [FILTER_AUTHOR_TYPE]);
|
|
return items2;
|
|
}
|
|
|
|
function getValidFilterTokens(a0, a1) { // fn#76044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9866:1137, offset: 0x01dc26b0, size: 51 bytes, params: 3, frame: 13
|
|
const value = getValidOrderedFilterTokens(a0, a1);
|
|
const Set = global.Set;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set();
|
|
return set instanceof Object ? set : value2;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun76039, 9680, [3996, 661, 9675, 2]) /* metro module 9680, dependencies: [3996, 661, 9675, 2] */;
|