67 lines
3.4 KiB
TypeScript
67 lines
3.4 KiB
TypeScript
/* Metro module 14492; source: modules/activities/utils/findActivityWithMostParticipants.tsx; dependencies: [3793, 2] */
|
|
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun109680(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:6, offset: 0x023568cc, size: 119 bytes, params: 8, frame: 17
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/findActivityWithMostParticipants.tsx');
|
|
exports.default = function(a0) {
|
|
var property = a0.length;
|
|
return property === 0 ? null : property === 1 ? a0[0] : a0.reduce(_fun109682, a0[0]);
|
|
};
|
|
exports.findActivityWithMostNonBlockedOrIgnoredParticipants = findActivityWithMostNonBlockedOrIgnoredParticipants;
|
|
function findActivityWithMostParticipants(a0) { // fn#109681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:211, offset: 0x02356943, size: 59 bytes, params: 2, frame: 15
|
|
const length = a0.length;
|
|
return length === 0 ? null : length === 1 ? a0[0] : a0.reduce(function(a0, a1) {
|
|
var value = a0;
|
|
var value2 = a1;
|
|
return value.userIds.size < value2.userIds.size ? value2 : value;
|
|
}, a0[0]);
|
|
}
|
|
|
|
function findActivityWithMostNonBlockedOrIgnoredParticipants(a0) { // fn#109683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:413, offset: 0x023569a3, size: 133 bytes, params: 2, frame: 18
|
|
const length = a0.length;
|
|
if (length === 0) {
|
|
return null;
|
|
}
|
|
if (length === 1) {
|
|
return a0[0];
|
|
}
|
|
const items3 = [a0[0]];
|
|
const userIds = a0[0].userIds;
|
|
const items2 = [];
|
|
arraySpread(items2, userIds, 0, items2);
|
|
items3[1] = items2.map(function(a0) {
|
|
return !RelationshipStore.isBlockedOrIgnored(a0);
|
|
}).length;
|
|
const env0_0 = items3[0];
|
|
const env0_1 = items3[1];
|
|
a0.forEach(_fun109685);
|
|
return env0_0;
|
|
function _fun109685(a0) { // fn#109685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:639, offset: 0x02356a42, size: 69 bytes, params: 2, frame: 14
|
|
const userIds = a0.userIds;
|
|
const items2 = [];
|
|
arraySpread(items2, userIds, 0, items2);
|
|
if (items2.filter(function(a0) {
|
|
return !RelationshipStore.isBlockedOrIgnored(a0);
|
|
}).length > env0_1) {
|
|
env0_0 = a0;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun109682(a0, a1) { // fn#109682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:310, offset: 0x0235697e, size: 37 bytes, params: 3, frame: 4
|
|
const value = a0;
|
|
const value2 = a1;
|
|
let userIds = value.userIds;
|
|
const size = userIds.size;
|
|
userIds = value2.userIds;
|
|
return size < userIds.size ? value2 : value;
|
|
}
|
|
|
|
global.__d(_fun109680, 14492, [3793, 2]) /* metro module 14492, dependencies: [3793, 2] */;
|