2546 lines
124 KiB
TypeScript
2546 lines
124 KiB
TypeScript
/* Metro module 9569; source: modules/icymi/ICYMIStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 9570, 4107, 4117, 1226, 1379, 9575, 1867, 4814, 3784, 4605, 3793, 4864, 9577, 9578, 661, 9588, 672, 9579, 7230, 8370, 8375, 9572, 9589, 6946, 4625, 566, 694, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
|
|
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import ExperimentStore from '../experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
|
|
import GuildScheduledEventStore from '../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
|
|
import ReadStateStore from '../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
|
|
import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
|
|
import UserGuildSettingsStore from '../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
|
|
import ContentInventoryStore from '../content_inventory/ContentInventoryStore.tsx'; /* Metro dependency 9570 */
|
|
import GuildAffinitiesStore from '../../stores/GuildAffinitiesStore.tsx'; /* Metro dependency 9575 */
|
|
import ICYMIFiltersStore from './ICYMIFiltersStore.tsx'; /* Metro dependency 9577 */
|
|
import ICYMIUnreadStateStore from './ICYMIUnreadStateStore.tsx'; /* Metro dependency 9578 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as GuildScheduledEventStoreModule from '../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
|
|
import * as GuildDiscoveryUtilsModule from '../../utils/GuildDiscoveryUtils.tsx'; /* Metro dependency 6946 */
|
|
import * as ICYMITypesModule from './ICYMITypes.tsx'; /* Metro dependency 7230 */
|
|
import * as ICYMIUtilsModule from './ICYMIUtils.tsx'; /* Metro dependency 9579 */
|
|
import * as ContentInventoryConstantsModule from '../content_inventory/ContentInventoryConstants.tsx'; /* Metro dependency 9588 */
|
|
import * as ICYMIAnalyticsModule from './ICYMIAnalytics.tsx'; /* Metro dependency 9589 */
|
|
|
|
function _fun74749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:6, offset: 0x01d99782, size: 1350 bytes, params: 8, frame: 26
|
|
let env0_0 = require;
|
|
const _arrayLikeToArray_74755 = 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 injectItemsIntoList = function(a0, a1, a2, a3) {
|
|
var env0_0 = a2;
|
|
var env0_1 = a3;
|
|
var value = a0.filter(_fun74761);
|
|
var env0_2 = value;
|
|
a1.forEach(_fun74762);
|
|
return value;
|
|
};
|
|
const injectAdditionalItems = function() {
|
|
_fun74764();
|
|
_fun74767();
|
|
injectRecommendedGuildsRow();
|
|
};
|
|
const computeDisplayItems = function(a0) {
|
|
a0.forEach(_fun74781);
|
|
var items4 = [];
|
|
arraySpread(items4, [], arraySpread(items4, [], 0, a0), a0);
|
|
return [items4, [].sort(_fun74782)];
|
|
};
|
|
const filterDehydratedItemListByChannel = function(a0, a1) {
|
|
var env0_0 = a1;
|
|
return a0.filter(_fun74786);
|
|
};
|
|
const filterDehydratedItemListByGuild = function(a0, a1) {
|
|
var env0_0 = a1;
|
|
return a0.filter(_fun74789);
|
|
};
|
|
const MESSAGE_REACTION_ADD_747912 = MESSAGE_REACTION_ADD_74791;
|
|
const CHANNEL_ACK_747922 = CHANNEL_ACK_74792;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = GuildScheduledEventStoreModule;
|
|
const env0_11 = value.eventScheduledToStartWithin;
|
|
const env0_12 = value.isGuildEventEnded;
|
|
const env0_13 = value.isGuildScheduledEventActive;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_26 = value.ChannelTypes;
|
|
const env0_27 = value.GuildFeatures;
|
|
const env0_28 = value.Permissions;
|
|
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
|
let DAY = Millis.DAY;
|
|
const env0_30 = 1 * DAY;
|
|
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
|
DAY = Millis.DAY;
|
|
const env0_31 = 3 * DAY;
|
|
const env0_32 = [];
|
|
const env0_35 = [];
|
|
const env0_36 = [];
|
|
const env0_37 = {};
|
|
const env0_38 = {};
|
|
const env0_39 = {};
|
|
const env0_40 = {};
|
|
const env0_41 = {};
|
|
const env0_42 = {};
|
|
const env0_50 = [];
|
|
const env0_51 = [];
|
|
let env0_53 = [];
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
const PersistedStore = (Flux).PersistedStore;
|
|
set = _fun74794(PersistedStore);
|
|
set.displayName = 'ICYMIStore';
|
|
set.persistKey = 'ICYMIStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_74833,
|
|
LOAD_ICYMI_FROM_NOTIFICATION: LOAD_ICYMI_FROM_NOTIFICATION, LOAD_ICYMI_DEHYDRATED: LOAD_ICYMI_DEHYDRATED,
|
|
LOAD_ICYMI_HYDRATED: LOAD_ICYMI_HYDRATED, LOAD_ICYMI_CUSTOM_SCORES: LOAD_ICYMI_CUSTOM_SCORES,
|
|
LOAD_ICYMI_RECOMMENDED_GUILDS: function({guilds}) {
|
|
env0_53 = guilds.map(_fun74847);
|
|
injectRecommendedGuildsRow();
|
|
}, ICYMI_CUSTOM_SCORES_UPDATED: ICYMI_CUSTOM_SCORES_UPDATED, RELOAD_ICYMI: RELOAD_ICYMI,
|
|
ICYMI_TAB_OPENED: ICYMI_TAB_OPENED, ICYMI_FEEDBACK_GIVEN: function() {
|
|
env0_49 = 6;
|
|
}, MESSAGE_REACTION_ADD: MESSAGE_REACTION_ADD_747912, MESSAGE_REACTION_ADD_MANY: MESSAGE_REACTION_ADD_MANY_74853,
|
|
MESSAGE_REACTION_REMOVE: MESSAGE_REACTION_ADD_747912,
|
|
MESSAGE_REACTION_REMOVE_ALL: MESSAGE_REACTION_REMOVE_ALL_74854,
|
|
MESSAGE_REACTION_REMOVE_EMOJI: MESSAGE_REACTION_REMOVE_EMOJI_74855, CHANNEL_ACK: CHANNEL_ACK_747922,
|
|
MESSAGE_ACK: CHANNEL_ACK_747922, ICYMI_JOINED_RECOMMENDED_GUILD: function() {
|
|
var Date = global.Date;
|
|
env0_54 = Date.now();
|
|
}, ICYMI_SET_VIDEOS_MUTED: function(a0) {
|
|
env0_55 = a0.muted;
|
|
}, ICYMI_SET_REFRESHING: function(a0) {
|
|
env0_56 = a0.refreshing;
|
|
}, LOAD_ICYMI_HYDRATED_ATTEMPT: LOAD_ICYMI_HYDRATED_ATTEMPT, LOAD_ICYMI_HYDRATED_FAILED: LOAD_ICYMI_HYDRATED_FAILED,
|
|
ICYMI_SET_FOCUSED_TAB: function(a0) {
|
|
env0_58 = a0.focused;
|
|
}, LOAD_ICYMI_CURRENT_STATUS_MEDIA: LOAD_ICYMI_CURRENT_STATUS_MEDIA, ICYMI_SCROLL_EVENT: function(a0) {
|
|
env0_60 = a0.timestamp;
|
|
}, ICYMI_TAKE_SURVEY: function(a0) {
|
|
env0_61 = a0.takenAt;
|
|
}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/icymi/ICYMIStore.tsx');
|
|
exports.default = set;
|
|
function _isNativeReflectConstruct_74750() { // fn#74750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:506, offset: 0x01d99cc8, 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_74750_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_74753(a0, a1) { // fn#74753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:699, offset: 0x01d99d2a, 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 _fun74754;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_74755(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_74755(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_74755(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun74754;
|
|
}
|
|
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 _fun74754() { // fn#74754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:1270, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function tabHasNewContentOnInitialLoad(a0, a1) { // fn#74756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:1826, offset: 0x01d99e9e, size: 179 bytes, params: 3, frame: 17
|
|
var set;
|
|
const Date = global.Date;
|
|
let value = Date.now();
|
|
value -= env0_34;
|
|
const Millis = (Durations).Millis;
|
|
const HOUR = Millis.HOUR;
|
|
if (value > 6 * HOUR) {
|
|
set = new global.Set(a0.map(function(a0) {
|
|
return a0.id;
|
|
}));
|
|
set = a1.slice(0, 20);
|
|
return set.filter(_fun74758).length >= 3;
|
|
}
|
|
return false;
|
|
function _fun74758({id}) { // fn#74758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:1971, offset: 0x01d99f51, size: 27 bytes, params: 2, frame: 11
|
|
return env0_0.has(id);
|
|
}
|
|
|
|
}
|
|
|
|
function filterStaffGuild(a0) { // fn#74759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:2007, offset: 0x01d99f6c, size: 175 bytes, params: 2, frame: 15
|
|
var moduleValue;
|
|
var data;
|
|
var guild_id;
|
|
var guildStoreBinding;
|
|
var getGuild;
|
|
var value2;
|
|
var features;
|
|
const icymiFiltersStoreBinding = ICYMIFiltersStore;
|
|
if (icymiFiltersStoreBinding.filterStaffContent()) {
|
|
moduleValue = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
if (moduleValue.isGuildItem(a0)) {
|
|
data = a0.data;
|
|
guild_id = data.guild_id;
|
|
if (guild_id === (require(7230) /* metro dependency 7230: ICYMITypes */).GAME_CONTENT_GUILD_ID) {
|
|
return true;
|
|
}
|
|
guildStoreBinding = GuildStore;
|
|
getGuild = guildStoreBinding.getGuild;
|
|
data = a0.data;
|
|
guild_id = data.guild_id;
|
|
value2 = Reflect.apply(getGuild, guildStoreBinding, [guild_id]);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
features = value2.features;
|
|
if (features.has(GuildFeatures.INTERNAL_EMPLOYEE_ONLY)) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function injectItemsIntoList(a0, a1, a2, a3) { // fn#74760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:2268, offset: 0x01d9a01b, size: 62 bytes, params: 5, frame: 13
|
|
const env0_0 = a2;
|
|
const env0_1 = a3;
|
|
const value = a0.filter(function({type}) {
|
|
return type !== importDefault;
|
|
});
|
|
a1.forEach(_fun74762);
|
|
return value;
|
|
function _fun74761({type}) { // fn#74761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:2322, offset: 0x01d9a059, size: 21 bytes, params: 2, frame: 2
|
|
return type !== importDefault;
|
|
}
|
|
|
|
function _fun74762(a0, a1) { // fn#74762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:2356, offset: 0x01d9a06e, size: 88 bytes, params: 3, frame: 16
|
|
let value = a1 + 1;
|
|
value *= importAll;
|
|
if (value < env0_2.length) {
|
|
env0_2.splice((a1 + 1) * importAll, 0, a0);
|
|
} else {
|
|
env0_2.push(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function injectAdditionalItems() { // fn#74763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:2418, offset: 0x01d9a0c6, size: 39 bytes, params: 1, frame: 10
|
|
injectGuildEvents();
|
|
injectContentInventoryItems();
|
|
injectRecommendedGuildsRow();
|
|
function injectGuildEvents() { // fn#74764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:2452, owner: injectAdditionalItems.injectGuildEvents, offset: 0x01d9a0ed, size: 774 bytes, params: 1, frame: 44
|
|
var r11;
|
|
var r22;
|
|
var r23;
|
|
var r31;
|
|
var r27;
|
|
var value7;
|
|
var guildScheduledEventStoreBinding;
|
|
var getGuildScheduledEventsForGuild;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var channel_id;
|
|
var channelStoreBinding;
|
|
var getChannel;
|
|
var value11;
|
|
var permissionStoreBinding;
|
|
var can;
|
|
var VIEW_CHANNEL;
|
|
var eventScheduledToStartWithinBinding;
|
|
var Seconds;
|
|
var DAY;
|
|
var binding;
|
|
var id;
|
|
var id2;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
var GUILD_EVENT;
|
|
var id3;
|
|
var push;
|
|
var object2;
|
|
var guild_id;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
var sort;
|
|
var forEach;
|
|
var injectItemsIntoListBinding;
|
|
const guildIds = GuildStore.getGuildIds();
|
|
const items2 = [];
|
|
let _createForOfIteratorHelperLoose_74753Binding = _createForOfIteratorHelperLoose_74753;
|
|
const value3 = undefined;
|
|
const value4 = _createForOfIteratorHelperLoose_74753Binding(guildIds);
|
|
const value5 = value4();
|
|
let done = value5.done;
|
|
const value6 = 0;
|
|
if (!done) {
|
|
r11 = value5;
|
|
reducibleLoop1: while (true) {
|
|
value7 = r11.value;
|
|
reducibleJoin14: while (true) {
|
|
reducibleJoin3: while (true) {
|
|
if (env1_41[value7] == null) {
|
|
break reducibleJoin3;
|
|
}
|
|
if (env1_41[value7] < value6) {
|
|
break reducibleJoin14;
|
|
}
|
|
break reducibleJoin3;
|
|
}
|
|
_createForOfIteratorHelperLoose_74753Binding = _createForOfIteratorHelperLoose_74753;
|
|
guildScheduledEventStoreBinding = GuildScheduledEventStore;
|
|
getGuildScheduledEventsForGuild = guildScheduledEventStoreBinding.getGuildScheduledEventsForGuild;
|
|
value8 = _createForOfIteratorHelperLoose_74753Binding(Reflect.apply(getGuildScheduledEventsForGuild,
|
|
guildScheduledEventStoreBinding, [value7]));
|
|
value9 = value8();
|
|
done = value9.done;
|
|
if (done) {
|
|
break reducibleJoin14;
|
|
}
|
|
r22 = value6;
|
|
r23 = value9;
|
|
reducibleLoop4: while (true) {
|
|
value10 = r23.value;
|
|
if (isGuildEventEnded(value10)) {
|
|
r27 = r22;
|
|
} else {
|
|
channel_id = value10.channel_id;
|
|
reducibleJoin13: while (true) {
|
|
reducibleJoin15: while (true) {
|
|
if (channel_id == null) {
|
|
eventScheduledToStartWithinBinding = eventScheduledToStartWithin;
|
|
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
|
|
DAY = Seconds.DAY;
|
|
if (!eventScheduledToStartWithinBinding(value10, 2 * DAY)) {
|
|
reducibleJoin9: while (true) {
|
|
if (isGuildScheduledEventActive(value10)) {
|
|
break reducibleJoin9;
|
|
}
|
|
r27 = r22;
|
|
break reducibleJoin13;
|
|
}
|
|
}
|
|
binding = env1_39;
|
|
id = value10.id;
|
|
reducibleJoin11: while (true) {
|
|
if (binding[id] != null) {
|
|
break reducibleJoin11;
|
|
}
|
|
binding = env1_39;
|
|
id = value10.id;
|
|
id2 = value10.id;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
id3 = value10.id;
|
|
binding[id] = {id: id2, type: GUILD_EVENT, score: 10, event_id: id3};
|
|
break reducibleJoin11;
|
|
}
|
|
push = items2.push;
|
|
object2 = {};
|
|
id = value10.id;
|
|
object2.id = id;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
object2.type = GUILD_EVENT;
|
|
object2.score = 10;
|
|
guild_id = value10.guild_id;
|
|
id = value10.id;
|
|
r31 = value10.channel_id ?? value3;
|
|
object2.data = {guild_id: guild_id, event_id: id, channel_id: r31};
|
|
Reflect.apply(push, items2, [object2]);
|
|
value12 = typeof r22 === 'bigint' ? r22 + 1n : +r22 + 1;
|
|
if (value12 >= 1) {
|
|
break reducibleJoin14;
|
|
}
|
|
r27 = value12;
|
|
break reducibleJoin13;
|
|
}
|
|
channelStoreBinding = ChannelStore;
|
|
getChannel = channelStoreBinding.getChannel;
|
|
channel_id = value10.channel_id;
|
|
value11 = Reflect.apply(getChannel, channelStoreBinding, [channel_id]);
|
|
permissionStoreBinding = PermissionStore;
|
|
can = permissionStoreBinding.can;
|
|
VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
|
if (Reflect.apply(can, permissionStoreBinding, [VIEW_CHANNEL, value11])) {
|
|
eventScheduledToStartWithinBinding = eventScheduledToStartWithin;
|
|
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
|
|
DAY = Seconds.DAY;
|
|
if (!eventScheduledToStartWithinBinding(value10, 2 * DAY)) {
|
|
reducibleJoin9: while (true) {
|
|
if (isGuildScheduledEventActive(value10)) {
|
|
break reducibleJoin9;
|
|
}
|
|
r27 = r22;
|
|
break reducibleJoin13;
|
|
}
|
|
}
|
|
binding = env1_39;
|
|
id = value10.id;
|
|
reducibleJoin11: while (true) {
|
|
if (binding[id] != null) {
|
|
break reducibleJoin11;
|
|
}
|
|
binding = env1_39;
|
|
id = value10.id;
|
|
id2 = value10.id;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
id3 = value10.id;
|
|
binding[id] = {id: id2, type: GUILD_EVENT, score: 10, event_id: id3};
|
|
break reducibleJoin11;
|
|
}
|
|
push = items2.push;
|
|
object2 = {};
|
|
id = value10.id;
|
|
object2.id = id;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
object2.type = GUILD_EVENT;
|
|
object2.score = 10;
|
|
guild_id = value10.guild_id;
|
|
id = value10.id;
|
|
channel_id = value10.channel_id;
|
|
r31 = channel_id ?? value3;
|
|
object2.data = {guild_id: guild_id, event_id: id, channel_id: r31};
|
|
Reflect.apply(push, items2, [object2]);
|
|
value12 = typeof r22 === 'bigint' ? r22 + 1n : +r22 + 1;
|
|
if (value12 >= 1) {
|
|
break reducibleJoin14;
|
|
}
|
|
r27 = value12;
|
|
break reducibleJoin13;
|
|
}
|
|
r27 = r22;
|
|
break reducibleJoin13;
|
|
}
|
|
sort = items2.sort;
|
|
Reflect.apply(sort, items2, [_fun74765]);
|
|
forEach = items2.forEach;
|
|
Reflect.apply(forEach, items2, [_fun74766]);
|
|
injectItemsIntoListBinding = injectItemsIntoList;
|
|
binding = env1_50;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
env1_50 = injectItemsIntoListBinding(binding, [], GUILD_EVENT, 7);
|
|
binding = env1_51;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
env1_51 = injectItemsIntoListBinding(binding, [], GUILD_EVENT, 7);
|
|
return value3;
|
|
}
|
|
}
|
|
value13 = value8();
|
|
done = value13.done;
|
|
if (done) {
|
|
break reducibleJoin14;
|
|
}
|
|
r22 = r27;
|
|
r23 = value13;
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleJoin14;
|
|
}
|
|
value14 = value4();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop1;
|
|
}
|
|
r11 = value14;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
items2.sort(_fun74765);
|
|
items2.forEach(_fun74766);
|
|
injectItemsIntoListBinding = injectItemsIntoList;
|
|
binding = env1_50;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
env1_50 = injectItemsIntoListBinding(binding, [], GUILD_EVENT, 7);
|
|
binding = env1_51;
|
|
GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
|
|
env1_51 = injectItemsIntoListBinding(binding, [], GUILD_EVENT, 7);
|
|
return value3;
|
|
function _fun74765({data}, {data}) { // fn#74765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:3147, offset: 0x01d9a3f3, size: 97 bytes, params: 3, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
const guildAffinity = GuildAffinitiesStore.getGuildAffinity(data.guild_id);
|
|
value = GuildAffinitiesStore.getGuildAffinity(data.guild_id);
|
|
return (value != null ? value.score : 0) - (guildAffinity != null ? guildAffinity.score : 0);
|
|
}
|
|
|
|
function _fun74766(a0) { // fn#74766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:3309, offset: 0x01d9a454, size: 85 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__.__proto__;
|
|
env2_38[a0.id] = a0;
|
|
const icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
const getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
if (Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [a0.id]) != null) {
|
|
env0_1.push(a0);
|
|
} else {
|
|
env0_0.push(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function injectContentInventoryItems() { // fn#74767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:3514, owner: injectAdditionalItems.injectContentInventoryItems, offset: 0x01d9a4a9, size: 264 bytes, params: 1, frame: 22
|
|
var environment;
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
const env0_1 = {};
|
|
set = environment.__proto__;
|
|
const contentInventoryStoreBinding = ContentInventoryStore;
|
|
const getFeed = contentInventoryStoreBinding.getFeed;
|
|
const GLOBAL_FEED = ContentInventoryFeedKey.GLOBAL_FEED;
|
|
const value2 = Reflect.apply(getFeed, contentInventoryStoreBinding, [GLOBAL_FEED]);
|
|
const value3 = undefined;
|
|
const r4 = (value2 == null ? value3 : value2.entries) ?? [];
|
|
r4.sort(function({rank}, a1) {
|
|
return rank - a1.rank;
|
|
}).slice(0, 5);
|
|
r4.forEach(_fun74769);
|
|
const injectItemsIntoListBinding = injectItemsIntoList;
|
|
let binding = env1_50;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
let ACTIVITY = ICYMIItemTypes.ACTIVITY;
|
|
env1_50 = injectItemsIntoListBinding(binding, [], ACTIVITY, 5);
|
|
binding = env1_51;
|
|
ACTIVITY = ICYMIItemTypes.ACTIVITY;
|
|
env1_51 = injectItemsIntoListBinding(binding, [], ACTIVITY, 5);
|
|
return value3;
|
|
function _fun74769(a0) { // fn#74769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:3708, offset: 0x01d9a5b1, size: 741 bytes, params: 2, frame: 19
|
|
var moduleValue;
|
|
var isEntryExpired;
|
|
var moduleValue2;
|
|
var isGamingLikeEntry;
|
|
var author_id;
|
|
var Set;
|
|
var value3;
|
|
var set;
|
|
var property;
|
|
var extra;
|
|
var application_id;
|
|
var add;
|
|
var object;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
var icymiUnreadStateStoreBinding;
|
|
var getReadTimestamp;
|
|
let binding = env0_0;
|
|
let has = binding.has;
|
|
let content = a0.content;
|
|
let id = content.id;
|
|
if (!Reflect.apply(has, binding, [id])) {
|
|
content = a0.content;
|
|
var content_type = content.content_type;
|
|
var ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
|
|
var PLAYED_GAME = ContentInventoryEntryType.PLAYED_GAME;
|
|
if (content_type === PLAYED_GAME) {
|
|
moduleValue = require(8375) /* metro dependency 8375: utils */;
|
|
isEntryExpired = moduleValue.isEntryExpired;
|
|
content = a0.content;
|
|
if (Reflect.apply(isEntryExpired, moduleValue, [content])) {
|
|
return undefined;
|
|
}
|
|
moduleValue2 = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
|
|
isGamingLikeEntry = moduleValue2.isGamingLikeEntry;
|
|
content = a0.content;
|
|
if (Reflect.apply(isGamingLikeEntry, moduleValue2, [content])) {
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
if (binding[author_id] == null) {
|
|
binding = env0_1;
|
|
author_id = a0.content.author_id;
|
|
Set = global.Set;
|
|
value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
binding[author_id] = set instanceof Object ? set : value3;
|
|
}
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
property = binding[author_id];
|
|
has = property.has;
|
|
content = a0.content;
|
|
extra = content.extra;
|
|
application_id = extra.application_id;
|
|
if (Reflect.apply(has, property, [application_id])) {
|
|
return undefined;
|
|
}
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
property = binding[author_id];
|
|
add = property.add;
|
|
content = a0.content;
|
|
extra = content.extra;
|
|
application_id = extra.application_id;
|
|
Reflect.apply(add, property, [application_id]);
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
if (binding[id] == null) {
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object = {};
|
|
content = a0.content;
|
|
object.id = content.id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
object.activity = content;
|
|
binding[id] = object;
|
|
}
|
|
object = {};
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.id = id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.data = {user_id: author_id, content_id: id};
|
|
binding = env0_0;
|
|
add = binding.add;
|
|
content = a0.content;
|
|
id = content.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
binding = env2_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
id = object.id;
|
|
if (Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [id]) != null) {
|
|
ClassCallCheck.push(object);
|
|
} else {
|
|
env0_2.push(object);
|
|
}
|
|
return undefined;
|
|
}
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
if (binding[id] == null) {
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object = {};
|
|
content = a0.content;
|
|
object.id = content.id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
object.activity = content;
|
|
binding[id] = object;
|
|
}
|
|
object = {};
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.id = id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.data = {user_id: author_id, content_id: id};
|
|
binding = env0_0;
|
|
add = binding.add;
|
|
content = a0.content;
|
|
id = content.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
binding = env2_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
id = object.id;
|
|
if (Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [id]) != null) {
|
|
ClassCallCheck.push(object);
|
|
} else {
|
|
env0_2.push(object);
|
|
}
|
|
return undefined;
|
|
}
|
|
content = a0.content;
|
|
content_type = content.content_type;
|
|
ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
|
|
var CUSTOM_STATUS = ContentInventoryEntryType.CUSTOM_STATUS;
|
|
if (content_type === CUSTOM_STATUS) {
|
|
moduleValue = require(8375) /* metro dependency 8375: utils */;
|
|
isEntryExpired = moduleValue.isEntryExpired;
|
|
content = a0.content;
|
|
if (Reflect.apply(isEntryExpired, moduleValue, [content])) {
|
|
return undefined;
|
|
}
|
|
moduleValue2 = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
|
|
isGamingLikeEntry = moduleValue2.isGamingLikeEntry;
|
|
content = a0.content;
|
|
if (Reflect.apply(isGamingLikeEntry, moduleValue2, [content])) {
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
if (binding[author_id] == null) {
|
|
binding = env0_1;
|
|
author_id = a0.content.author_id;
|
|
Set = global.Set;
|
|
value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
binding[author_id] = set instanceof Object ? set : value3;
|
|
}
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
property = binding[author_id];
|
|
has = property.has;
|
|
content = a0.content;
|
|
extra = content.extra;
|
|
application_id = extra.application_id;
|
|
if (Reflect.apply(has, property, [application_id])) {
|
|
return undefined;
|
|
}
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
property = binding[author_id];
|
|
add = property.add;
|
|
content = a0.content;
|
|
extra = content.extra;
|
|
application_id = extra.application_id;
|
|
Reflect.apply(add, property, [application_id]);
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
if (binding[id] == null) {
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object = {};
|
|
content = a0.content;
|
|
object.id = content.id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
object.activity = content;
|
|
binding[id] = object;
|
|
}
|
|
object = {};
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.id = id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.data = {user_id: author_id, content_id: id};
|
|
binding = env0_0;
|
|
add = binding.add;
|
|
content = a0.content;
|
|
id = content.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
binding = env2_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
id = object.id;
|
|
if (Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [id]) != null) {
|
|
ClassCallCheck.push(object);
|
|
} else {
|
|
env0_2.push(object);
|
|
}
|
|
return undefined;
|
|
}
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
if (binding[id] == null) {
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object = {};
|
|
content = a0.content;
|
|
object.id = content.id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
object.activity = content;
|
|
binding[id] = object;
|
|
}
|
|
object = {};
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.id = id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.data = {user_id: author_id, content_id: id};
|
|
binding = env0_0;
|
|
add = binding.add;
|
|
content = a0.content;
|
|
id = content.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
binding = env2_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
id = object.id;
|
|
if (Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [id]) != null) {
|
|
ClassCallCheck.push(object);
|
|
} else {
|
|
env0_2.push(object);
|
|
}
|
|
return undefined;
|
|
}
|
|
content = a0.content;
|
|
content_type = content.content_type;
|
|
ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
|
|
var TOP_GAME = ContentInventoryEntryType.TOP_GAME;
|
|
if (content_type !== TOP_GAME) {
|
|
return undefined;
|
|
}
|
|
moduleValue = require(8375) /* metro dependency 8375: utils */;
|
|
isEntryExpired = moduleValue.isEntryExpired;
|
|
content = a0.content;
|
|
if (Reflect.apply(isEntryExpired, moduleValue, [content])) {
|
|
return undefined;
|
|
}
|
|
moduleValue2 = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
|
|
isGamingLikeEntry = moduleValue2.isGamingLikeEntry;
|
|
content = a0.content;
|
|
if (Reflect.apply(isGamingLikeEntry, moduleValue2, [content])) {
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
if (binding[author_id] == null) {
|
|
binding = env0_1;
|
|
author_id = a0.content.author_id;
|
|
Set = global.Set;
|
|
value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
binding[author_id] = set instanceof Object ? set : value3;
|
|
}
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
property = binding[author_id];
|
|
has = property.has;
|
|
content = a0.content;
|
|
extra = content.extra;
|
|
application_id = extra.application_id;
|
|
if (Reflect.apply(has, property, [application_id])) {
|
|
return undefined;
|
|
}
|
|
binding = env0_1;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
property = binding[author_id];
|
|
add = property.add;
|
|
content = a0.content;
|
|
extra = content.extra;
|
|
application_id = extra.application_id;
|
|
Reflect.apply(add, property, [application_id]);
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
if (binding[id] == null) {
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object = {};
|
|
content = a0.content;
|
|
object.id = content.id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
object.activity = content;
|
|
binding[id] = object;
|
|
}
|
|
object = {};
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.id = id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.data = {user_id: author_id, content_id: id};
|
|
binding = env0_0;
|
|
add = binding.add;
|
|
content = a0.content;
|
|
id = content.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
binding = env2_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
id = object.id;
|
|
if (Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [id]) != null) {
|
|
ClassCallCheck.push(object);
|
|
} else {
|
|
env0_2.push(object);
|
|
}
|
|
return undefined;
|
|
}
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
if (binding[id] == null) {
|
|
binding = env2_39;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object = {};
|
|
content = a0.content;
|
|
object.id = content.id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
object.activity = content;
|
|
binding[id] = object;
|
|
}
|
|
object = {};
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.id = id;
|
|
object.type = ICYMIItemTypes.ACTIVITY;
|
|
object.score = 15;
|
|
content = a0.content;
|
|
author_id = content.author_id;
|
|
content = a0.content;
|
|
id = content.id;
|
|
object.data = {user_id: author_id, content_id: id};
|
|
binding = env0_0;
|
|
add = binding.add;
|
|
content = a0.content;
|
|
id = content.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
binding = env2_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
id = object.id;
|
|
if (Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [id]) != null) {
|
|
ClassCallCheck.push(object);
|
|
} else {
|
|
env0_2.push(object);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function injectRecommendedGuildsRow() { // fn#74770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:4733, offset: 0x01d9a896, size: 504 bytes, params: 1, frame: 18
|
|
var guildsArray;
|
|
var value3;
|
|
var readTimestamp;
|
|
var Date;
|
|
var object;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
var id;
|
|
var Math;
|
|
var items2;
|
|
var value11;
|
|
let binding = env0_50;
|
|
env0_50 = binding.filter(function({type}) {
|
|
return type !== require(dependencyMap[24]).ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
});
|
|
env0_51 = env0_51.filter(function({type}) {
|
|
return type !== require(dependencyMap[24]).ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
});
|
|
if (env0_53.length !== 0) {
|
|
guildsArray = GuildStore.getGuildsArray();
|
|
value3 = guildsArray.filter(function({features}) {
|
|
return features.has(GuildFeatures.COMMUNITY);
|
|
}).length >= 5;
|
|
readTimestamp = ICYMIUnreadStateStore.getReadTimestamp('recommendedGuilds');
|
|
if (value3) {
|
|
if (readTimestamp == null) {
|
|
object = {'id': 'recommendedGuilds', 'type': null, 'score': 50};
|
|
object.type = ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
binding = env0_39;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
binding = env0_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
if (env0_50.length === 0) {
|
|
arraySpread([object], env0_51, 1, require);
|
|
} else if (value3) {
|
|
if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (env0_50.length < 5) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else {
|
|
Date = global.Date;
|
|
if (Date.now() - env0_54 > env0_30) {
|
|
Date = global.Date;
|
|
if (!(Date.now() - readTimestamp < env0_31)) {
|
|
object = {'id': 'recommendedGuilds', 'type': null, 'score': 50};
|
|
object.type = ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
binding = env0_39;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
binding = env0_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
if (env0_50.length === 0) {
|
|
arraySpread([object], env0_51, 1, require);
|
|
} else if (value3) {
|
|
if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (env0_50.length < 5) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
}
|
|
} else {
|
|
object = {'id': 'recommendedGuilds', 'type': null, 'score': 50};
|
|
object.type = ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
binding = env0_39;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
binding = env0_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
if (env0_50.length === 0) {
|
|
arraySpread([object], env0_51, 1, require);
|
|
} else if (value3) {
|
|
if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (env0_50.length < 5) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
object = {'id': 'recommendedGuilds', 'type': null, 'score': 50};
|
|
object.type = ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
binding = env0_39;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
binding = env0_38;
|
|
id = object.id;
|
|
binding[id] = object;
|
|
if (env0_50.length === 0) {
|
|
arraySpread([object], env0_51, 1, require);
|
|
} else if (value3) {
|
|
if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (env0_50.length < 5) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
if (env0_50.length < 10) {
|
|
binding = env0_50;
|
|
items2 = [];
|
|
value11 = arraySpread(items2, binding, 0, require);
|
|
items2[value11] = object;
|
|
value11 + 1;
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
} else if (value3) {
|
|
Math = global.Math;
|
|
env0_50.splice(Math.round(2 * global.Math.random()) + 3 - 1, 0, object);
|
|
} else {
|
|
env0_50.splice(5, 0, object);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function finalizeNewDehydratedItemsContent() { // fn#74774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:5362, offset: 0x01d9aae3, size: 290 bytes, params: 1, frame: 17
|
|
var has;
|
|
var id;
|
|
var value3;
|
|
var items2;
|
|
var type;
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
let binding = items3;
|
|
binding.forEach(_fun74775);
|
|
if (env0_48 != null) {
|
|
has = set.has;
|
|
id = env0_48.id;
|
|
value3 = Reflect.apply(has, set, [id]);
|
|
binding = env0_48;
|
|
if (value3) {
|
|
id = binding.id;
|
|
type = env0_48.type;
|
|
binding = items3;
|
|
set = binding.findIndex(_fun74776);
|
|
if (set !== -1) {
|
|
env0_48 = items3[set];
|
|
binding = items3;
|
|
set = binding.filter(function({id}) {
|
|
return id !== id;
|
|
});
|
|
binding = env0_48;
|
|
items2 = [binding];
|
|
arraySpread(items2, set, 1, undefined);
|
|
items3 = items2;
|
|
}
|
|
} else {
|
|
items2 = [binding];
|
|
arraySpread(items2, items3, 1, undefined);
|
|
items3 = items2;
|
|
set.add(env0_48.id);
|
|
}
|
|
}
|
|
items3.forEach(_fun74778);
|
|
function _fun74775({id}) { // fn#74775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:5435, offset: 0x01d9ac05, size: 29 bytes, params: 2, frame: 11
|
|
env0_0.add(id);
|
|
}
|
|
|
|
function _fun74776(a0) { // fn#74776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:5513, offset: 0x01d9ac22, size: 37 bytes, params: 2, frame: 4
|
|
return a0.id === id && a0.type === type;
|
|
}
|
|
|
|
function _fun74778(a0) { // fn#74778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:5632, offset: 0x01d9ac5c, size: 154 bytes, params: 2, frame: 16
|
|
var relationshipStoreBinding;
|
|
let value = environment.__proto__;
|
|
let binding = env1_38;
|
|
let id = a0.id;
|
|
binding[id] = a0;
|
|
const type = a0.type;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
const CUSTOM_STATUS = ICYMIItemTypes.CUSTOM_STATUS;
|
|
if (type === CUSTOM_STATUS) {
|
|
relationshipStoreBinding = RelationshipStore;
|
|
if (relationshipStoreBinding.isBlockedOrIgnored(a0.data.user_id)) {
|
|
env1_40[a0.id] = true;
|
|
} else {
|
|
binding = env1_39;
|
|
id = a0.id;
|
|
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
binding[id] = value.customStatusToContentInventoryEntry(a0);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function reload_74779(a0) { // fn#74779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:5805, offset: 0x01d9acf6, size: 420 bytes, params: 2, frame: 20
|
|
var r1;
|
|
var value3;
|
|
var property;
|
|
var property2;
|
|
var ICYMIAnalytics;
|
|
env0_32 = env0_35.length > 0 ? env0_35 : env0_32;
|
|
let binding = env0_43;
|
|
env0_43 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
const value2 = null;
|
|
if (value2 != a0) {
|
|
env0_50 = a0.newUnread;
|
|
env0_51 = a0.newRead;
|
|
} else {
|
|
value3 = Module00057(computeDisplayItems(env0_32), 2);
|
|
property = value3[0];
|
|
property2 = value3[1];
|
|
env0_50 = property;
|
|
env0_51 = property2;
|
|
}
|
|
injectAdditionalItems();
|
|
let load_id = object.load_id;
|
|
if (value2 != load_id && env0_33 !== object.load_id) {
|
|
ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
|
|
ICYMIAnalytics.trackFeedLoaded({newTrackingProps: object, hasNewContent: env0_45, unreadFeedItems: env0_50,
|
|
readFeedItems: env0_51, homeSessionId: 'gravity'});
|
|
load_id = object.load_id;
|
|
r1 = value2 != load_id ? load_id : value2;
|
|
object = {};
|
|
}
|
|
if (env0_50.length + env0_51.length !== 0) {
|
|
}
|
|
const hydrateItems = ICYMIUtilsModule.hydrateItems;
|
|
binding = env0_50;
|
|
const items2 = [];
|
|
arraySpread(items2, env0_51, arraySpread(items2, binding, 0, undefined), undefined);
|
|
const ICYMI_PAGE_SIZE = (ICYMITypesModule).ICYMI_PAGE_SIZE;
|
|
Reflect.apply(hydrateItems, ICYMIUtilsModule, [items2, 0, ICYMI_PAGE_SIZE]);
|
|
}
|
|
|
|
function computeDisplayItems(a0) { // fn#74780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:6306, offset: 0x01d9ae9a, size: 104 bytes, params: 2, frame: 17
|
|
const items2 = [];
|
|
a0.forEach(_fun74781);
|
|
const items4 = [];
|
|
arraySpread(items4, [], arraySpread(items4, [], 0, a0), a0);
|
|
return [items4, items2.sort(_fun74782)];
|
|
function _fun74781(a0) { // fn#74781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:6375, offset: 0x01d9af02, size: 291 bytes, params: 2, frame: 20
|
|
var r6;
|
|
var r4;
|
|
var r2;
|
|
var data;
|
|
var message_context;
|
|
var moduleValue;
|
|
var isItemUnreadInChannel;
|
|
var channel_id;
|
|
const icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
const getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
const value3 = Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [a0.id]) != null;
|
|
const type = a0.type;
|
|
const value4 = undefined;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
const MESSAGE = ICYMIItemTypes.MESSAGE;
|
|
if (type !== MESSAGE) {
|
|
r2 = value3;
|
|
} else {
|
|
data = a0.data;
|
|
message_context = data.message_context;
|
|
if ((message_context == null ? value4 : message_context.external_content_application_id) != null) {
|
|
r4 = value3;
|
|
} else {
|
|
if (value3) {
|
|
r6 = value3;
|
|
} else {
|
|
moduleValue = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
isItemUnreadInChannel = moduleValue.isItemUnreadInChannel;
|
|
data = a0.data;
|
|
channel_id = data.channel_id;
|
|
data = a0.data;
|
|
r6 = !Reflect.apply(isItemUnreadInChannel, moduleValue, [channel_id, data.message_id]);
|
|
}
|
|
r4 = r6;
|
|
}
|
|
r2 = r4;
|
|
}
|
|
if (r2) {
|
|
env0_0.push(a0);
|
|
} else if (a0.type !== ICYMIItemTypes.MESSAGE) {
|
|
env0_1.push(a0);
|
|
} else if (a0.data.has_mention) {
|
|
env0_2.push(a0);
|
|
} else {
|
|
env0_1.push(a0);
|
|
}
|
|
return value4;
|
|
}
|
|
|
|
function _fun74782({id}, {id}) { // fn#74782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:6741, offset: 0x01d9b025, size: 55 bytes, params: 3, frame: 13
|
|
const value = environment.__proto__;
|
|
return (ICYMIUtilsModule).compareGravityUnreadIds(id, id);
|
|
}
|
|
|
|
}
|
|
|
|
function getNewUnreadItems(a0, a1) { // fn#74783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:6796, offset: 0x01d9b05c, size: 339 bytes, params: 3, frame: 26
|
|
var r2;
|
|
var r13;
|
|
var r12;
|
|
var r1;
|
|
var value7;
|
|
var type;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
var RECOMMENDED_GUILDS;
|
|
var has;
|
|
var id;
|
|
var icymiUnreadStateStoreBinding;
|
|
var getReadTimestamp;
|
|
var value8;
|
|
var MESSAGE;
|
|
var value9;
|
|
var moduleValue;
|
|
var isItemUnreadInChannel;
|
|
var data;
|
|
var channel_id;
|
|
var message_id;
|
|
var isItemUnreadInChannel2;
|
|
var value10;
|
|
var value11;
|
|
const items2 = [];
|
|
const Set = global.Set;
|
|
const set = new Set(env0_32.map(function(a0) {
|
|
return a0.id;
|
|
}));
|
|
const value5 = _createForOfIteratorHelperLoose_74753(a0);
|
|
const value6 = value5();
|
|
let done = value6.done;
|
|
if (!done) {
|
|
r2 = value6;
|
|
while (true) {
|
|
value7 = r2.value;
|
|
type = value7.type;
|
|
RECOMMENDED_GUILDS = ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
if (type !== RECOMMENDED_GUILDS) {
|
|
has = set.has;
|
|
id = value7.id;
|
|
if (Reflect.apply(has, set, [id])) {
|
|
break;
|
|
}
|
|
icymiUnreadStateStoreBinding = ICYMIUnreadStateStore;
|
|
getReadTimestamp = icymiUnreadStateStoreBinding.getReadTimestamp;
|
|
id = value7.id;
|
|
value8 = Reflect.apply(getReadTimestamp, icymiUnreadStateStoreBinding, [id]) == null;
|
|
if (!value8) {
|
|
r1 = value8;
|
|
continue;
|
|
}
|
|
type = value7.type;
|
|
MESSAGE = ICYMIItemTypes.MESSAGE;
|
|
value9 = type !== MESSAGE;
|
|
if (value9) {
|
|
r12 = value9;
|
|
continue;
|
|
}
|
|
moduleValue = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
isItemUnreadInChannel = moduleValue.isItemUnreadInChannel;
|
|
data = value7.data;
|
|
channel_id = data.channel_id;
|
|
data = value7.data;
|
|
message_id = data.message_id;
|
|
isItemUnreadInChannel2 = Reflect.apply(isItemUnreadInChannel, moduleValue, [channel_id, message_id]);
|
|
if (!isItemUnreadInChannel2) {
|
|
r13 = isItemUnreadInChannel2;
|
|
continue;
|
|
}
|
|
data = value7.data;
|
|
channel_id = data.channel_id;
|
|
value10 = channel_id !== a1;
|
|
r13 = value10;
|
|
r12 = r13;
|
|
r1 = r12;
|
|
if (r1) {
|
|
items2.push(value7);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
value11 = value5();
|
|
done = value11.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r2 = value11;
|
|
continue;
|
|
}
|
|
}
|
|
return items2;
|
|
}
|
|
|
|
function filterDehydratedItemListByChannel(a0, a1) { // fn#74785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:7196, offset: 0x01d9b1af, size: 31 bytes, params: 3, frame: 11
|
|
const env0_0 = a1;
|
|
return a0.filter(_fun74786);
|
|
function _fun74786(a0) { // fn#74786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:7261, offset: 0x01d9b1ce, size: 68 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__;
|
|
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
value = value.isGuildItem(a0);
|
|
return value ? a0.data.channel_id !== require : !value;
|
|
}
|
|
|
|
}
|
|
|
|
function maybeFilterChannelItems(a0, a1) { // fn#74787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:7315, offset: 0x01d9b212, size: 143 bytes, params: 3, frame: 18
|
|
var filterDehydratedItemListByChannelBinding;
|
|
const value2 = (ICYMIUtilsModule).numberToCustomScore(a1);
|
|
const ICYMICustomScore = (ICYMIUtilsModule).ICYMICustomScore;
|
|
const MUTED = ICYMICustomScore.MUTED;
|
|
if (value2 === MUTED) {
|
|
filterDehydratedItemListByChannelBinding = filterDehydratedItemListByChannel;
|
|
env0_32 = filterDehydratedItemListByChannelBinding(env0_32, a0);
|
|
env0_50 = filterDehydratedItemListByChannelBinding(env0_50, a0);
|
|
env0_51 = filterDehydratedItemListByChannelBinding(env0_51, a0);
|
|
env0_35 = filterDehydratedItemListByChannelBinding(env0_35, a0);
|
|
env0_36 = filterDehydratedItemListByChannelBinding(env0_36, a0);
|
|
}
|
|
}
|
|
|
|
function filterDehydratedItemListByGuild(a0, a1) { // fn#74788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:7631, offset: 0x01d9b2a1, size: 31 bytes, params: 3, frame: 11
|
|
const env0_0 = a1;
|
|
return a0.filter(_fun74789);
|
|
function _fun74789(a0) { // fn#74789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:7694, offset: 0x01d9b2c0, size: 68 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__;
|
|
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
value = value.isGuildItem(a0);
|
|
return value ? a0.data.guild_id !== require : !value;
|
|
}
|
|
|
|
}
|
|
|
|
function maybeFilterGuildItems(a0, a1) { // fn#74790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:7746, offset: 0x01d9b304, size: 143 bytes, params: 3, frame: 18
|
|
var filterDehydratedItemListByGuildBinding;
|
|
const value2 = (ICYMIUtilsModule).numberToCustomScore(a1);
|
|
const ICYMICustomScore = (ICYMIUtilsModule).ICYMICustomScore;
|
|
const MUTED = ICYMICustomScore.MUTED;
|
|
if (value2 === MUTED) {
|
|
filterDehydratedItemListByGuildBinding = filterDehydratedItemListByGuild;
|
|
env0_32 = filterDehydratedItemListByGuildBinding(env0_32, a0);
|
|
env0_50 = filterDehydratedItemListByGuildBinding(env0_50, a0);
|
|
env0_51 = filterDehydratedItemListByGuildBinding(env0_51, a0);
|
|
env0_35 = filterDehydratedItemListByGuildBinding(env0_35, a0);
|
|
env0_36 = filterDehydratedItemListByGuildBinding(env0_36, a0);
|
|
}
|
|
}
|
|
|
|
function MESSAGE_REACTION_ADD_74791(a0) { // fn#74791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:8050, offset: 0x01d9b393, size: 187 bytes, params: 2, frame: 22
|
|
var r1;
|
|
var message;
|
|
const type = a0.type;
|
|
const messageId = a0.messageId;
|
|
const userId = a0.userId;
|
|
const emoji = a0.emoji;
|
|
const reactionType = a0.reactionType;
|
|
const property = env0_39[messageId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const type2 = property.type;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
const MESSAGE = ICYMIItemTypes.MESSAGE;
|
|
if (type2 !== MESSAGE) {
|
|
return false;
|
|
}
|
|
const authenticationStoreBinding = AuthenticationStore;
|
|
const getId = authenticationStoreBinding.getId;
|
|
let value = Reflect.apply(getId, authenticationStoreBinding, []) === userId;
|
|
if (type === 'MESSAGE_REACTION_ADD') {
|
|
message = property.message;
|
|
value = message.addReaction(emoji, value, a0.colors, reactionType);
|
|
r1 = value;
|
|
} else {
|
|
value = property.message.removeReaction(emoji, value, reactionType);
|
|
r1 = value;
|
|
}
|
|
property.message = r1;
|
|
}
|
|
|
|
function CHANNEL_ACK_74792({channelId}) { // fn#74792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:8350, offset: 0x01d9b44e, size: 261 bytes, params: 2, frame: 22
|
|
var r11;
|
|
var r3;
|
|
var r7;
|
|
var items3;
|
|
const items4 = [];
|
|
const items2 = [];
|
|
let binding = env0_50;
|
|
binding.forEach(_fun74793);
|
|
binding = env0_45;
|
|
const value2 = Module00057(computeDisplayItems(env0_35), 2);
|
|
const property = value2[0];
|
|
value2[1];
|
|
if (env0_46) {
|
|
if (binding) {
|
|
r7 = getNewUnreadItems(property, channelId).length >= require(dependencyMap[24]).MIN_ITEMS_FOR_NEW_PILL;
|
|
r11 = dependencyMap;
|
|
} else {
|
|
r7 = binding;
|
|
}
|
|
r3 = r7;
|
|
} else {
|
|
r3 = binding && tabHasNewContentOnInitialLoad(items2, env0_35);
|
|
}
|
|
if (items4.length !== 0) {
|
|
if (items4.length !== 0) {
|
|
binding = env0_51;
|
|
items3 = [];
|
|
arraySpread(items3, items4, arraySpread(items3, binding, 0, r11), r11);
|
|
}
|
|
} else {
|
|
if (binding === r3) {
|
|
return false;
|
|
}
|
|
if (items4.length !== 0) {
|
|
binding = env0_51;
|
|
items3 = [];
|
|
arraySpread(items3, items4, arraySpread(items3, binding, 0, r11), r11);
|
|
}
|
|
}
|
|
function _fun74793(a0, a1) { // fn#74793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:8409, offset: 0x01d9b553, size: 125 bytes, params: 3, frame: 13
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
if (a1 > env1_52) {
|
|
if (a0.type !== ICYMIItemTypes.MESSAGE) {
|
|
env0_2.push(a0);
|
|
} else if (a0.data.channel_id === channelId) {
|
|
env0_1.push(a0);
|
|
} else {
|
|
env0_2.push(a0);
|
|
}
|
|
} else if (env1_46) {
|
|
env0_2.push(a0);
|
|
} else if (a0.type !== ICYMIItemTypes.MESSAGE) {
|
|
env0_2.push(a0);
|
|
} else if (a0.data.channel_id === channelId) {
|
|
env0_1.push(a0);
|
|
} else {
|
|
env0_2.push(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun74794(a0) { // fn#74794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:8759, offset: 0x01d9b5d0, size: 902 bytes, params: 2, frame: 16
|
|
const ICYMIStore2 = ICYMIStore;
|
|
Inherits(ICYMIStore2, a0);
|
|
return CreateClass(ICYMIStore2, [{key: 'initialize', value: value_74796}, {key: 'getVersion', value: value_74798},
|
|
{key: 'getDehydratedItems', value: value_74799}, {key: 'getNewDehydratedItems', value: value_74800},
|
|
{key: 'getDehydratedItem', value: value_74801}, {key: 'getHydratedItem', value: value_74802},
|
|
{key: 'getMessage', value: value_74803}, {key: 'getHydratedItems', value: value_74804},
|
|
{key: 'getUnreadDisplayItems', value: value_74805}, {key: 'getNewUnreadDehydratedItems', value: value_74806},
|
|
{key: 'getReadDisplayItems', value: value_74807}, {key: 'getNextIndexToHydrate', value: value_74808},
|
|
{key: 'getMissingItems', value: value_74809}, {key: 'customMuted', value: function(a0, a1) {
|
|
var r0;
|
|
var value = this.getCustomGuildScore(a0);
|
|
value = value === require(dependencyMap[23]).ICYMICustomScore.MUTED;
|
|
if (value) {
|
|
r0 = value;
|
|
} else {
|
|
value = this.getCustomChannelScore(a0, a1);
|
|
value = value === require(dependencyMap[23]).ICYMICustomScore.MUTED;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}}, {key: 'getCustomChannelScore', value: value_74811}, {key: 'getCustomGuildScore', value: value_74812},
|
|
{key: 'getCustomGuildScores', value: value_74813}, {key: 'hasNewContent', value: value_74814},
|
|
{key: 'getCurrentStatusAttachments', value: value_74815}, {key: 'getLoadId', value: value_74816},
|
|
{key: 'hasOpenedEnoughTimes', value: value_74817}, {key: 'hasOpened', value: value_74818},
|
|
{key: 'getDiscoverableGuilds', value: value_74819}, {key: 'videosMuted', value: value_74820},
|
|
{key: 'isRefreshing', value: value_74821}, {key: 'isHydrating', value: value_74822}, {key: 'notificationItem',
|
|
value: value_74823}, {key: 'getIsTabFocused', value: value_74824}, {key: 'isFirstPageHydrated',
|
|
value: value_74825}, {key: 'lastScrollEvent', value: value_74826}, {key: 'lastTakenICYMISurvey',
|
|
value: value_74827}, {key: 'getIndexInHydratedFeed', value: value_74828}, {key: 'getState',
|
|
value: value_74832}]);
|
|
function ICYMIStore() { // fn#74795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:8771, offset: 0x01d1dcea, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_3(this, ICYMIStore);
|
|
const value3 = env1_6(ICYMIStore);
|
|
return env1_5(this, _isNativeReflectConstruct_74750() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_74796(a0) { // fn#74796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:9039, offset: 0x01d9b956, size: 248 bytes, params: 2, frame: 39
|
|
var r0;
|
|
var r4;
|
|
var numOpens;
|
|
var value2;
|
|
this.waitFor(AuthenticationStore, ChannelStore, ContentInventoryStore, ExperimentStore, GuildAffinitiesStore,
|
|
GuildScheduledEventStore, GuildStore, ICYMIFiltersStore, ICYMIUnreadStateStore, MessageStore, PermissionStore,
|
|
ReadStateStore, RelationshipStore, UserGuildSettingsStore);
|
|
if (a0 != null) {
|
|
(a0.dehydratedItems ?? []).forEach(_fun74797);
|
|
r0 = a0.customGuildScores ?? ({});
|
|
r0 = a0.customChannelScoresByGuild ?? ({});
|
|
numOpens = a0.numOpens;
|
|
value2 = 0;
|
|
r4 = numOpens ?? value2;
|
|
r4 = a0.lastOpened ?? value2;
|
|
r4 = a0.lastJoinedRecommendedGuild ?? value2;
|
|
r0 = a0.lastTakenICYMISurvey ?? value2;
|
|
}
|
|
function _fun74797(a0) { // fn#74797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:9169, offset: 0x01d9ba4e, size: 23 bytes, params: 2, frame: 3
|
|
env2_38[a0.id] = a0;
|
|
}
|
|
|
|
}
|
|
|
|
function value_74798() { // fn#74798, offset: 0x00df3ba7, size: 9 bytes, params: 1, frame: 1
|
|
return env1_43;
|
|
}
|
|
|
|
function value_74799() { // fn#74799, offset: 0x01080587, size: 9 bytes, params: 1, frame: 1
|
|
return env1_32;
|
|
}
|
|
|
|
function value_74800() { // fn#74800, offset: 0x00e427c1, size: 9 bytes, params: 1, frame: 1
|
|
return env1_35;
|
|
}
|
|
|
|
function value_74801(a0) { // fn#74801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:9602, offset: 0x01d9ba65, size: 28 bytes, params: 2, frame: 3
|
|
let value = environment.__proto__;
|
|
const property = env1_38[a0];
|
|
value = null;
|
|
return value != property ? property : value;
|
|
}
|
|
|
|
function value_74802(a0) { // fn#74802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:9680, offset: 0x01d9ba81, size: 28 bytes, params: 2, frame: 3
|
|
let value = environment.__proto__;
|
|
const property = env1_39[a0];
|
|
value = null;
|
|
return value != property ? property : value;
|
|
}
|
|
|
|
function value_74803(a0) { // fn#74803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:9753, offset: 0x01d9ba9d, size: 77 bytes, params: 2, frame: 15
|
|
const property = env1_39[a0];
|
|
const value2 = null;
|
|
return value2 == property || property.type !== (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes.MESSAGE ? value2 : property.message;
|
|
}
|
|
|
|
function value_74804() { // fn#74804, offset: 0x01d1de51, size: 9 bytes, params: 1, frame: 1
|
|
return env1_39;
|
|
}
|
|
|
|
function value_74805() { // fn#74805, offset: 0x01d9baea, size: 9 bytes, params: 1, frame: 1
|
|
return env1_50;
|
|
}
|
|
|
|
function value_74806() { // fn#74806, offset: 0x00e427ca, size: 9 bytes, params: 1, frame: 1
|
|
return env1_36;
|
|
}
|
|
|
|
function value_74807() { // fn#74807, offset: 0x01d9baf3, size: 9 bytes, params: 1, frame: 1
|
|
return env1_51;
|
|
}
|
|
|
|
function value_74808() { // fn#74808, offset: 0x01d9bafc, size: 9 bytes, params: 1, frame: 1
|
|
return env1_52;
|
|
}
|
|
|
|
function value_74809() { // fn#74809, offset: 0x00df3c28, size: 9 bytes, params: 1, frame: 1
|
|
return env1_40;
|
|
}
|
|
|
|
function value_74811(a0, a1) { // fn#74811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:10402, offset: 0x01d9bb74, size: 122 bytes, params: 3, frame: 14
|
|
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
|
|
const value = environment.__proto__;
|
|
return env1_42[a0] == null || env1_42[a0][a1] == null ? ICYMICustomScore.UNKNOWN : (require(9579) /* metro dependency 9579: ICYMIUtils */).numberToCustomScore(env1_42[a0][a1]);
|
|
}
|
|
|
|
function value_74812(a0) { // fn#74812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:10558, offset: 0x01d9bbee, size: 30 bytes, params: 2, frame: 3
|
|
const value = environment.__proto__;
|
|
return env1_41[a0] ?? 0;
|
|
}
|
|
|
|
function value_74813() { // fn#74813, offset: 0x00df3c31, size: 9 bytes, params: 1, frame: 1
|
|
return env1_41;
|
|
}
|
|
|
|
function value_74814() { // fn#74814, offset: 0x01d9bc0c, size: 9 bytes, params: 1, frame: 1
|
|
return env1_45;
|
|
}
|
|
|
|
function value_74815(a0) { // fn#74815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:10750, offset: 0x01d9bc15, size: 49 bytes, params: 2, frame: 3
|
|
return env1_47 == null || env1_47[0] !== a0 ? [] : env1_47[1];
|
|
}
|
|
|
|
function value_74816() { // fn#74816, offset: 0x0117839e, size: 9 bytes, params: 1, frame: 1
|
|
return env1_33;
|
|
}
|
|
|
|
function value_74817() { // fn#74817, offset: 0x01d9bc46, size: 16 bytes, params: 1, frame: 2
|
|
return env1_49 === 5;
|
|
}
|
|
|
|
function value_74818() { // fn#74818, offset: 0x01d9bc56, size: 9 bytes, params: 1, frame: 1
|
|
return env1_46;
|
|
}
|
|
|
|
function value_74819() { // fn#74819, offset: 0x01d9bc5f, size: 9 bytes, params: 1, frame: 1
|
|
return env1_53;
|
|
}
|
|
|
|
function value_74820() { // fn#74820, offset: 0x01d9bc68, size: 9 bytes, params: 1, frame: 1
|
|
return env1_55;
|
|
}
|
|
|
|
function value_74821() { // fn#74821, offset: 0x01d1dd7e, size: 9 bytes, params: 1, frame: 1
|
|
return env1_56;
|
|
}
|
|
|
|
function value_74822() { // fn#74822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:11127, offset: 0x01d9bc71, size: 20 bytes, params: 1, frame: 2
|
|
return env1_57.size > 0;
|
|
}
|
|
|
|
function value_74823() { // fn#74823, offset: 0x01d1dea7, size: 9 bytes, params: 1, frame: 1
|
|
return env1_48;
|
|
}
|
|
|
|
function value_74824() { // fn#74824, offset: 0x01d9bc85, size: 9 bytes, params: 1, frame: 1
|
|
return env1_58;
|
|
}
|
|
|
|
function value_74825() { // fn#74825, offset: 0x01d9bc8e, size: 9 bytes, params: 1, frame: 1
|
|
return env1_59;
|
|
}
|
|
|
|
function value_74826() { // fn#74826, offset: 0x01d9bc97, size: 9 bytes, params: 1, frame: 1
|
|
return env1_60;
|
|
}
|
|
|
|
function value_74827() { // fn#74827, offset: 0x01d9bca0, size: 9 bytes, params: 1, frame: 1
|
|
return env1_61;
|
|
}
|
|
|
|
function value_74828(a0) { // fn#74828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:11462, offset: 0x01d9bca9, size: 148 bytes, params: 2, frame: 16
|
|
var environment;
|
|
var r0;
|
|
var value;
|
|
var binding;
|
|
var items2;
|
|
const env0_0 = a0;
|
|
if (a0 === 'recommended_guilds') {
|
|
value = environment.__proto__;
|
|
binding = env1_50;
|
|
items2 = [];
|
|
arraySpread(items2, env1_51, arraySpread(items2, binding, 0, undefined), undefined);
|
|
value = items2.findIndex(function({type}) {
|
|
return type === require(dependencyMap[24]).ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
});
|
|
r0 = value;
|
|
} else if (a0 === 'recommendedGuilds') {
|
|
value = environment.__proto__;
|
|
binding = env1_50;
|
|
items2 = [];
|
|
arraySpread(items2, env1_51, arraySpread(items2, binding, 0, undefined), undefined);
|
|
value = items2.findIndex(_fun74829);
|
|
r0 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
binding = env1_50;
|
|
items2 = [];
|
|
arraySpread(items2, env1_51, arraySpread(items2, binding, 0, undefined), undefined);
|
|
value = items2.filter(_fun74830);
|
|
value = value.findIndex(_fun74831);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function _fun74829({type}) { // fn#74829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:11554, offset: 0x01d9bd3d, size: 51 bytes, params: 2, frame: 12
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
const RECOMMENDED_GUILDS = ICYMIItemTypes.RECOMMENDED_GUILDS;
|
|
return type === RECOMMENDED_GUILDS;
|
|
}
|
|
|
|
function _fun74830({id}) { // fn#74830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:11633, offset: 0x01d9bd70, size: 27 bytes, params: 2, frame: 2
|
|
return env2_39[id] != null;
|
|
}
|
|
|
|
function _fun74831({id}) { // fn#74831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:11663, offset: 0x00db0c48, size: 21 bytes, params: 2, frame: 2
|
|
return id === env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
function value_74832() { // fn#74832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:11701, offset: 0x01d9bd8b, size: 70 bytes, params: 1, frame: 3
|
|
return {dehydratedItems: env1_32, numOpens: env1_49, customGuildScores: env1_41,
|
|
customChannelScoresByGuild: env1_42, lastOpened: env1_34, lastJoinedRecommendedGuild: env1_54,
|
|
lastTakenICYMISurvey: env1_61};
|
|
}
|
|
|
|
}
|
|
|
|
function LOGOUT_74833() { // fn#74833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:11981, offset: 0x01d9bdd1, size: 183 bytes, params: 1, frame: 13
|
|
env0_32 = [];
|
|
env0_35 = [];
|
|
env0_36 = [];
|
|
env0_38 = {};
|
|
env0_37 = {};
|
|
env0_39 = {};
|
|
env0_40 = {};
|
|
env0_41 = {};
|
|
env0_42 = {};
|
|
env0_50 = [];
|
|
env0_51 = [];
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
}
|
|
|
|
function LOAD_ICYMI_FROM_NOTIFICATION({messageItem, customStatusItem}) { // fn#74834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:12185, offset: 0x01d9be88, size: 440 bytes, params: 2, frame: 22
|
|
var r1;
|
|
var object;
|
|
var message;
|
|
var id;
|
|
var binding;
|
|
var object3;
|
|
var moduleValue;
|
|
var createMessageRecord;
|
|
var computeDisplayItemsBinding;
|
|
var items2;
|
|
var value2;
|
|
var property;
|
|
var property2;
|
|
if (customStatusItem != null) {
|
|
if (env0_33 != null) {
|
|
if (env0_35.length > 0) {
|
|
r1 = env0_35;
|
|
} else {
|
|
binding = env0_32;
|
|
object = [];
|
|
arraySpread(object, binding, 0, undefined);
|
|
r1 = object;
|
|
}
|
|
env0_35 = r1;
|
|
finalizeNewDehydratedItemsContent();
|
|
reload_74779();
|
|
}
|
|
return true;
|
|
}
|
|
if (messageItem != null) {
|
|
object = {};
|
|
message = messageItem.message;
|
|
id = message.id;
|
|
object.id = id;
|
|
object.type = require(dependencyMap[24]).ICYMIItemTypes.MESSAGE;
|
|
object.score = 50;
|
|
message = messageItem.message;
|
|
id = message.id;
|
|
object.data = {channel_id: messageItem.channel_id, message_id: id, guild_id: messageItem.guild_id,
|
|
channel_type: ChannelTypes.GUILD_TEXT};
|
|
binding = env0_38;
|
|
message = messageItem.message;
|
|
id = message.id;
|
|
binding[id] = object;
|
|
binding = env0_39;
|
|
message = messageItem.message;
|
|
id = message.id;
|
|
object3 = {};
|
|
copyDataProperties(object3, object, undefined);
|
|
moduleValue = require(dependencyMap[30]);
|
|
createMessageRecord = moduleValue.createMessageRecord;
|
|
message = messageItem.message;
|
|
object3['message'] = Reflect.apply(createMessageRecord, moduleValue, [message]);
|
|
binding[id] = object3;
|
|
if (env0_33 != null) {
|
|
arraySpread([object], env0_35, 1, dependencyMap);
|
|
reload_74779();
|
|
} else if (env0_37 == null) {
|
|
computeDisplayItemsBinding = computeDisplayItems;
|
|
items2 = [object];
|
|
arraySpread(items2, env0_32, 1, dependencyMap);
|
|
value2 = Module00057(computeDisplayItemsBinding(items2), 2);
|
|
property = value2[0];
|
|
property2 = value2[1];
|
|
} else {
|
|
arraySpread([object], env0_35, 1, dependencyMap);
|
|
reload_74779();
|
|
}
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function LOAD_ICYMI_DEHYDRATED({items, loadId, startTime, isInitialLoad, isReloading}) { // fn#74835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:12796, offset: 0x01d9c040, size: 534 bytes, params: 2, frame: 22
|
|
var object2;
|
|
var hydrateItems;
|
|
env0_35 = processRawItems(items);
|
|
finalizeNewDehydratedItemsContent();
|
|
let object = {load_id: loadId};
|
|
const Date = global.Date;
|
|
object.load_time_millis = Date.now() - startTime;
|
|
object.feed_item_ids = env0_35.map(function(a0) {
|
|
return a0.id;
|
|
});
|
|
object2 = object;
|
|
value = computeDisplayItems(env0_35);
|
|
value = Module00057(value, 2);
|
|
const property = value[0];
|
|
const property2 = value[1];
|
|
if (env0_46) {
|
|
if (env0_43 === 0) {
|
|
env0_45 = !env0_58 && (tabHasNewContentOnInitialLoad(property, env0_35) && true);
|
|
reload_74779({newUnread: property, newRead: property2});
|
|
} else if (isInitialLoad) {
|
|
env0_45 = !env0_58 && (tabHasNewContentOnInitialLoad(property, env0_35) && true);
|
|
reload_74779({newUnread: property, newRead: property2});
|
|
} else {
|
|
if (env0_43 > 0) {
|
|
}
|
|
value = getNewUnreadItems(property).length > (require(7230) /* metro dependency 7230: ICYMITypes */).MIN_ITEMS_FOR_NEW_PILL;
|
|
env0_45 = !isReloading ? value : env0_45;
|
|
if (value) {
|
|
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
hydrateItems = value.hydrateItems;
|
|
object = [];
|
|
arraySpread(object, property2, arraySpread(object, property, 0, undefined), undefined);
|
|
Reflect.apply(hydrateItems, value, [object, 0,
|
|
(require(7230) /* metro dependency 7230: ICYMITypes */).ICYMI_PAGE_SIZE]);
|
|
if (property.length + property2.length !== 0) {
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
env0_45 = !env0_58 && (tabHasNewContentOnInitialLoad(property, env0_35) && true);
|
|
reload_74779({newUnread: property, newRead: property2});
|
|
}
|
|
const ICYMIAnalytics = (ICYMIAnalyticsModule).ICYMIAnalytics;
|
|
ICYMIAnalytics.trackFeedLoaded({newTrackingProps: object2, hasNewContent: env0_45, unreadFeedItems: property,
|
|
readFeedItems: property2, homeSessionId: env0_58 ? 'foreground_load' : 'background_load'});
|
|
function processRawItems(a0) { // fn#74836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:12890, owner: LOAD_ICYMI_DEHYDRATED.processRawItems, offset: 0x01d9c256, size: 118 bytes, params: 2, frame: 15
|
|
var environment;
|
|
const Set = global.Set;
|
|
const value = environment.__proto__;
|
|
const SUPPORTED_ITEM_TYPES = (ICYMITypesModule).SUPPORTED_ITEM_TYPES;
|
|
const set = new Set(SUPPORTED_ITEM_TYPES);
|
|
const value4 = a0.filter(_fun74837);
|
|
return value4.filter(filterStaffGuild).map(_fun74838);
|
|
function _fun74837({type}) { // fn#74837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:12981, offset: 0x013d5598, size: 27 bytes, params: 2, frame: 11
|
|
return env0_0.has(type);
|
|
}
|
|
|
|
function _fun74838(a0) { // fn#74838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:13030, offset: 0x01d9c2cc, size: 517 bytes, params: 2, frame: 15
|
|
var r1;
|
|
var data;
|
|
var message_context;
|
|
var object;
|
|
const type = a0.type;
|
|
let value = environment.__proto__.__proto__;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
const MESSAGE = ICYMIItemTypes.MESSAGE;
|
|
if (type === MESSAGE) {
|
|
data = a0.data;
|
|
message_context = data.message_context;
|
|
if (message_context != null) {
|
|
object = {};
|
|
data = a0.data;
|
|
message_context = data.message_context;
|
|
value = message_context.reply_message_id != null;
|
|
if (value) {
|
|
value = global.parseInt(a0.data.message_context.reply_message_id);
|
|
value = value !== 0;
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
if (r1) {
|
|
object.reply_message_id = a0.data.message_context.reply_message_id;
|
|
}
|
|
data = a0.data;
|
|
message_context = data.message_context;
|
|
value = message_context.before_message_id != null;
|
|
if (value) {
|
|
value = global.parseInt(a0.data.message_context.before_message_id);
|
|
value = value !== 0;
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
if (r1) {
|
|
object.before_message_id = a0.data.message_context.before_message_id;
|
|
}
|
|
data = a0.data;
|
|
message_context = data.message_context;
|
|
value = message_context.after_message_id != null;
|
|
if (value) {
|
|
value = global.parseInt(a0.data.message_context.after_message_id);
|
|
value = value !== 0;
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
if (r1) {
|
|
object.after_message_id = a0.data.message_context.after_message_id;
|
|
}
|
|
data = a0.data;
|
|
message_context = data.message_context;
|
|
value = message_context.external_content_application_id != null;
|
|
if (value) {
|
|
value = global.parseInt(a0.data.message_context.external_content_application_id);
|
|
value = value !== 0;
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
if (r1) {
|
|
object.external_content_application_id = a0.data.message_context.external_content_application_id;
|
|
}
|
|
data = a0.data;
|
|
message_context = data.message_context;
|
|
value = message_context.reference_message_id != null;
|
|
if (value) {
|
|
value = global.parseInt(a0.data.message_context.reference_message_id);
|
|
value = value !== 0;
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
if (r1) {
|
|
object.reference_message_id = a0.data.message_context.reference_message_id;
|
|
}
|
|
data = a0.data;
|
|
data.message_context = object;
|
|
}
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function LOAD_ICYMI_HYDRATED({messageItems, activityItems, requestMessageItems, requestActivityItems, startingIndex, endingIndex}) { // fn#74840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:14713, offset: 0x01d9c4d1, size: 213 bytes, params: 2, frame: 20
|
|
copyDataProperties({}, env0_39, messageItems);
|
|
const env0_0 = messageItems.reduce(function(a0, a1) {
|
|
a0[a1.message.id] = a1;
|
|
return a0;
|
|
}, {});
|
|
const env0_1 = activityItems.reduce(function(a0, a1) {
|
|
a0[a1.id] = a1;
|
|
return a0;
|
|
}, {});
|
|
requestMessageItems.forEach(_fun74843);
|
|
requestActivityItems.forEach(_fun74844);
|
|
if (startingIndex !== env0_52) {
|
|
}
|
|
const binding = env0_57;
|
|
binding.delete(ICYMIUtilsModule.generateHydrationId(startingIndex, endingIndex));
|
|
function _fun74843(a0) { // fn#74843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:14969, offset: 0x01d9c5bc, size: 362 bytes, params: 2, frame: 18
|
|
var r5;
|
|
var property2;
|
|
var object;
|
|
var channel_id;
|
|
var id;
|
|
var messageStoreBinding;
|
|
var getMessage;
|
|
var value2;
|
|
var gravityMessageFromServer;
|
|
var value;
|
|
let binding = env0_0;
|
|
const property = binding[a0.message_id];
|
|
if (property != null) {
|
|
value = environment.__proto__;
|
|
binding = env1_38;
|
|
property2 = binding[a0.message_id];
|
|
if (property2 != null) {
|
|
r5 = property2;
|
|
} else {
|
|
object = {};
|
|
object.id = a0.message_id;
|
|
object.type = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes.MESSAGE;
|
|
object.score = -1;
|
|
object.data = {guild_id: property.guild_id, channel_id: property.channel_id,
|
|
message_id: property.message.id,
|
|
channel_type: ChannelTypes.GUILD_TEXT, has_mention: false};
|
|
r5 = object;
|
|
}
|
|
messageStoreBinding = MessageStore;
|
|
getMessage = messageStoreBinding.getMessage;
|
|
channel_id = property.channel_id;
|
|
id = property.message.id;
|
|
value2 = Reflect.apply(getMessage, messageStoreBinding, [channel_id, id]);
|
|
if (value2 != null) {
|
|
gravityMessageFromServer = (require(9579) /* metro dependency 9579: ICYMIUtils */).createGravityMessageFromServer(property,
|
|
|
|
|
|
r5);
|
|
binding = env1_39;
|
|
id = property.message.id;
|
|
object = {};
|
|
copyDataProperties(object, gravityMessageFromServer, undefined);
|
|
object['message'] = value2;
|
|
binding[id] = object;
|
|
} else {
|
|
binding = env1_39;
|
|
id = property.message.id;
|
|
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
|
|
binding[id] = value.createGravityMessageFromServer(property, r5);
|
|
}
|
|
} else {
|
|
value = environment.__proto__;
|
|
env1_40[a0.message_id] = true;
|
|
}
|
|
}
|
|
|
|
function _fun74844(a0) { // fn#74844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:15471, offset: 0x01d9c726, size: 124 bytes, params: 2, frame: 15
|
|
var property2;
|
|
var binding2;
|
|
var id;
|
|
var object;
|
|
let binding = env0_1;
|
|
const property = binding[a0.content_id];
|
|
if (property != null) {
|
|
value = environment.__proto__;
|
|
binding = env1_38;
|
|
property2 = binding[a0.content_id];
|
|
if (property2 != null) {
|
|
binding2 = env1_39;
|
|
id = property.id;
|
|
object = {};
|
|
copyDataProperties(object, property2, binding);
|
|
object['activity'] = property;
|
|
binding2[id] = object;
|
|
} else {
|
|
env1_40[a0.content_id] = true;
|
|
}
|
|
} else {
|
|
value = environment.__proto__;
|
|
env1_40[a0.content_id] = true;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function LOAD_ICYMI_CUSTOM_SCORES({scores}) { // fn#74845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:15698, offset: 0x01d9c7a2, size: 282 bytes, params: 2, frame: 24
|
|
var r14;
|
|
var r4;
|
|
var r9;
|
|
var value5;
|
|
var binding;
|
|
var guild_id;
|
|
var guild_score;
|
|
var maybeFilterGuildItemsBinding;
|
|
var Object;
|
|
var keys;
|
|
var custom_channel_scores;
|
|
var value6;
|
|
var length;
|
|
var property;
|
|
var property2;
|
|
var maybeFilterChannelItemsBinding;
|
|
var value7;
|
|
var value8;
|
|
const value2 = _createForOfIteratorHelperLoose_74753(scores);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r4 = value3;
|
|
while (true) {
|
|
value5 = r4.value;
|
|
binding = env0_41;
|
|
guild_id = value5.guild_id;
|
|
guild_score = value5.guild_score;
|
|
binding[guild_id] = guild_score;
|
|
maybeFilterGuildItemsBinding = maybeFilterGuildItems;
|
|
guild_id = value5.guild_id;
|
|
guild_score = value5.guild_score;
|
|
maybeFilterGuildItemsBinding(guild_id, guild_score);
|
|
Object = global.Object;
|
|
keys = Object.keys;
|
|
custom_channel_scores = value5.custom_channel_scores;
|
|
value6 = Reflect.apply(keys, Object, [custom_channel_scores]);
|
|
length = value6.length;
|
|
if (0 < length) {
|
|
r9 = 0;
|
|
while (true) {
|
|
property = value6[r9];
|
|
binding = env0_42;
|
|
guild_id = value5.guild_id;
|
|
if (binding[guild_id] == null) {
|
|
binding = env0_42;
|
|
binding[value5.guild_id] = {};
|
|
r14 = binding;
|
|
}
|
|
binding = env0_42;
|
|
guild_id = value5.guild_id;
|
|
property2 = binding[guild_id];
|
|
custom_channel_scores = value5.custom_channel_scores;
|
|
property2[property] = custom_channel_scores[property];
|
|
maybeFilterChannelItemsBinding = maybeFilterChannelItems;
|
|
custom_channel_scores = value5.custom_channel_scores;
|
|
maybeFilterChannelItemsBinding(property, custom_channel_scores[property]);
|
|
value7 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
|
|
length = value6.length;
|
|
if (value7 < length) {
|
|
r9 = value7;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
value8 = value2();
|
|
done = value8.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r4 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
copyDataProperties({}, env0_41, r14);
|
|
copyDataProperties({}, env0_42, r14);
|
|
}
|
|
|
|
function LOAD_ICYMI_RECOMMENDED_GUILDS({guilds}) { // fn#74846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:16161, offset: 0x01d9c8bc, size: 47 bytes, params: 2, frame: 11
|
|
const value = guilds.map(_fun74847);
|
|
injectRecommendedGuildsRow();
|
|
function _fun74847({guild}) { // fn#74847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:16219, offset: 0x01d9c8eb, size: 46 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return (GuildDiscoveryUtilsModule).makeDiscoverableGuild(guild);
|
|
}
|
|
|
|
}
|
|
|
|
function ICYMI_CUSTOM_SCORES_UPDATED({channelScores, guildId, guildScore}) { // fn#74848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:16323, offset: 0x01d9c919, size: 97 bytes, params: 2, frame: 17
|
|
if (guildScore != null) {
|
|
env0_41[guildId] = guildScore;
|
|
maybeFilterGuildItems(guildId, guildScore);
|
|
copyDataProperties({}, env0_41, guildId);
|
|
}
|
|
if (channelScores != null) {
|
|
channelScores.forEach(_fun74849);
|
|
}
|
|
function _fun74849({channelId, score}) { // fn#74849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:16474, offset: 0x01d9c97a, size: 99 bytes, params: 2, frame: 16
|
|
var r6;
|
|
let binding = env1_42;
|
|
if (binding[guildId] == null) {
|
|
binding = env1_42;
|
|
binding[guildId] = {};
|
|
r6 = binding;
|
|
}
|
|
env1_42[guildId][channelId] = score;
|
|
maybeFilterChannelItems(channelId, score);
|
|
copyDataProperties({}, env1_42, r6);
|
|
}
|
|
|
|
}
|
|
|
|
function RELOAD_ICYMI() { // fn#74850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:16587, offset: 0x01d9c9dd, size: 40 bytes, params: 1, frame: 10
|
|
if (env0_35.length === 0) {
|
|
return false;
|
|
}
|
|
reload_74779();
|
|
}
|
|
|
|
function ICYMI_TAB_OPENED() { // fn#74851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:16671, offset: 0x01d9ca05, size: 73 bytes, params: 1, frame: 10
|
|
var binding;
|
|
const Date = global.Date;
|
|
env0_34 = Date.now();
|
|
if (env0_44) {
|
|
}
|
|
if (env0_49 < 5) {
|
|
binding = env0_49;
|
|
env0_49 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
}
|
|
|
|
function MESSAGE_REACTION_ADD_MANY_74853({messageId, reactions}) { // fn#74853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:16869, offset: 0x01d9ca5c, size: 121 bytes, params: 2, frame: 16
|
|
const property = env0_39[messageId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const type = property.type;
|
|
const ICYMIItemTypes = (ICYMITypesModule).ICYMIItemTypes;
|
|
const MESSAGE = ICYMIItemTypes.MESSAGE;
|
|
if (type !== MESSAGE) {
|
|
return false;
|
|
}
|
|
property.message = property.message.addReactionBatch(reactions, AuthenticationStore.getId());
|
|
}
|
|
|
|
function MESSAGE_REACTION_REMOVE_ALL_74854({messageId}) { // fn#74854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:17136, offset: 0x01d9cad5, size: 111 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var type;
|
|
var value3;
|
|
var value;
|
|
const property = env0_39[messageId];
|
|
const value2 = property != null;
|
|
if (value2) {
|
|
type = property.type;
|
|
value = undefined;
|
|
value3 = type === (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes.MESSAGE;
|
|
if (value3) {
|
|
property.message = property.message.set('reactions', []);
|
|
r1 = value;
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function MESSAGE_REACTION_REMOVE_EMOJI_74855({messageId, emoji}) { // fn#74855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:17334, offset: 0x01d9cb44, size: 109 bytes, params: 2, frame: 15
|
|
var r1;
|
|
var r0;
|
|
var type;
|
|
var value3;
|
|
var value;
|
|
const property = env0_39[messageId];
|
|
const value2 = property != null;
|
|
if (value2) {
|
|
type = property.type;
|
|
value = undefined;
|
|
value3 = type === (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes.MESSAGE;
|
|
if (value3) {
|
|
property.message = property.message.removeReactionsForEmoji(emoji);
|
|
r1 = value;
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function LOAD_ICYMI_HYDRATED_ATTEMPT({hydrationId}) { // fn#74859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:17819, offset: 0x01d9cbf5, size: 30 bytes, params: 2, frame: 11
|
|
env0_57.add(hydrationId);
|
|
}
|
|
|
|
function LOAD_ICYMI_HYDRATED_FAILED({hydrationId}) { // fn#74860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:17909, offset: 0x01d9cc13, size: 30 bytes, params: 2, frame: 11
|
|
env0_57.delete(hydrationId);
|
|
}
|
|
|
|
function LOAD_ICYMI_CURRENT_STATUS_MEDIA({attachments, createdAtMs}) { // fn#74862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9755:18076, offset: 0x01d9cc45, size: 81 bytes, params: 2, frame: 16
|
|
var items3;
|
|
var items2;
|
|
if (attachments != null) {
|
|
if (attachments.length !== 0) {
|
|
items3 = [createdAtMs];
|
|
items2 = [];
|
|
arraySpread(items2, attachments, 0, null);
|
|
items3[1] = items2;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun74749, 9569, [6, 7, 15, 17, 18, 57, 9570, 4107, 4117, 1226, 1379, 9575, 1867, 4814, 3784, 4605, 3793,
|
|
4864, 9577, 9578, 661, 9588, 672, 9579, 7230, 8370, 8375, 9572, 9589, 6946, 4625, 566, 694,
|
|
2]) /* metro module 9569, dependencies: [6, 7, 15, 17, 18, 57, 9570, 4107, 4117, 1226, 1379, 9575, 1867, 4814, 3784, 4605, 3793, 4864, 9577, 9578, 661, 9588, 672, 9579, 7230, 8370, 8375, 9572, 9589, 6946, 4625, 566, 694, 2] */;
|