1980 lines
82 KiB
TypeScript
1980 lines
82 KiB
TypeScript
/* Metro module 4816; source: lib/ChannelMessages.tsx; dependencies: [153, 6, 7, 661, 3, 4625, 22, 4044, 21, 4817, 4818, 4819, 4820, 2] */
|
|
function _fun41909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:6, offset: 0x0112b533, size: 302 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importDefault(153) /* metro dependency 153 */;
|
|
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_6 = value.MAX_MESSAGES_PER_CHANNEL;
|
|
const env0_7 = value.MAX_LOADED_MESSAGES;
|
|
const env0_8 = value.MAX_MESSAGE_CACHE_SIZE;
|
|
const env0_9 = value.TRUNCATED_MESSAGE_VIEW_SIZE;
|
|
const env0_10 = value.MessageStates;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('ChannelMessages');
|
|
const env0_12 = _fun41911();
|
|
value = _fun41934();
|
|
value._channelMessages = {};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/ChannelMessages.tsx');
|
|
exports.default = value;
|
|
exports.flatMapChannelMessages = function(a0) {
|
|
return a0.flatMap(_fun42029);
|
|
};
|
|
}
|
|
|
|
function mergeMessage(a0, a1) { // fn#41910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:304, offset: 0x0112b661, size: 227 bytes, params: 3, frame: 18
|
|
var r4;
|
|
var r2;
|
|
var r0;
|
|
var editedTimestamp;
|
|
var value2;
|
|
var edited_timestamp;
|
|
var Date;
|
|
var value4;
|
|
var date;
|
|
var value7;
|
|
var embeds;
|
|
var length2;
|
|
let value = a0.get(a1.id);
|
|
if (value == null) {
|
|
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
value = value.createMessageRecord(a1);
|
|
r0 = value;
|
|
} else {
|
|
editedTimestamp = value.editedTimestamp;
|
|
value2 = 0;
|
|
r4 = editedTimestamp != null ? Number(value.editedTimestamp) : value2;
|
|
edited_timestamp = a1.edited_timestamp;
|
|
if (edited_timestamp != null) {
|
|
Date = global.Date;
|
|
edited_timestamp = a1.edited_timestamp;
|
|
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
date = new Date();
|
|
r2 = Number(date instanceof Object ? date : value4);
|
|
} else {
|
|
r2 = value2;
|
|
}
|
|
value7 = r2 > r4;
|
|
if (value7) {
|
|
r2 = value7;
|
|
} else {
|
|
embeds = value.embeds;
|
|
length2 = embeds.length;
|
|
embeds = a1.embeds;
|
|
r2 = length2 < (embeds?.length ?? value2);
|
|
}
|
|
r2 = !r2 ? value.content !== a1.content : r2;
|
|
if (r2) {
|
|
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
value = value.createMessageRecord(a1);
|
|
r0 = value;
|
|
} else if (a0.cached) {
|
|
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
value = value.createMessageRecord(a1);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun41911() { // fn#41911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:662, offset: 0x0112b744, size: 365 bytes, params: 1, frame: 15
|
|
return env0_5(MessageCache, [{key: 'clone', value: value_41913}, {key: 'wasAtEdge', get: function() {
|
|
return this._wasAtEdge;
|
|
}, set: function(a0) {
|
|
this._wasAtEdge = a0;
|
|
}}, {key: 'length', get: function() {
|
|
return this._messages.length;
|
|
}}, {key: 'clear', value: function() {
|
|
this._map = {};
|
|
this._messages = [];
|
|
this._wasAtEdge = false;
|
|
}}, {key: 'remove', value: value_41918}, {key: 'removeMany', value: value_41920}, {key: 'replace',
|
|
value: function(a0, a1) {
|
|
var property = this._map[a0];
|
|
if (property != null) {
|
|
delete this._map[a0];
|
|
this._map[a1.id] = a1;
|
|
this._messages[this._messages.indexOf(property)] = a1;
|
|
}
|
|
}}, {key: 'update', value: function(a0, a1) {
|
|
var value;
|
|
var property = this._map[a0];
|
|
if (property != null) {
|
|
value = a1(property);
|
|
this._map[property.id] = value;
|
|
this._messages[this._messages.indexOf(property)] = value;
|
|
}
|
|
}}, {key: 'has', value: function(a0) {
|
|
return this._map[a0] != null;
|
|
}}, {key: 'get', value: function(a0) {
|
|
return this._map[a0];
|
|
}}, {key: 'forEach', value: function(a0, a1) {
|
|
this._messages.forEach(a0, a1);
|
|
}}, {key: 'cache', value: value_41928}, {key: 'extractAll', value: function() {
|
|
var _messages = this._messages;
|
|
this._messages = [];
|
|
this._map = {};
|
|
return _messages;
|
|
}}, {key: 'extract', value: value_41932}]);
|
|
}
|
|
|
|
function _fun41934() { // fn#41934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:2977, offset: 0x0112bdd9, size: 1270 bytes, params: 1, frame: 19
|
|
return env0_5(ChannelMessages, [{key: 'mutate', value: value_41936}, {key: 'length', get: function() {
|
|
return this._array.length;
|
|
}}, {key: 'toArray', value: function() {
|
|
var r2;
|
|
var _array = this._array;
|
|
var items = [];
|
|
arraySpread(items, _array, 0, r2);
|
|
return items;
|
|
}}, {key: 'forEach', value: function(a0, a1) {
|
|
var r1;
|
|
var r2;
|
|
var value = a2;
|
|
r1 = value !== undefined ? value : false;
|
|
var _array = this._array;
|
|
if (r1) {
|
|
value = _array.length - 1;
|
|
if (value >= 0) {
|
|
if (a0.call(a1, _array[value], value) !== false) {
|
|
r2 = value;
|
|
while (true) {
|
|
value = typeof r2 === 'bigint' ? r2 - 1n : +r2 - 1;
|
|
if (!(value >= 0)) {
|
|
break;
|
|
}
|
|
if (a0.call(a1, _array[value], value) !== false) {
|
|
r2 = value;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
_array.forEach(a0, a1);
|
|
}
|
|
}}, {key: 'reduce', value: function(a0, a1) {
|
|
return this._array.reduce(a0, a1);
|
|
}}, {key: 'some', value: function(a0, a1) {
|
|
return this._array.some(a0, a1);
|
|
}}, {key: 'filter', value: function(a0, a1) {
|
|
return this._array.filter(a0, a1);
|
|
}}, {key: 'forAll', value: function(a0, a1) {
|
|
this._before.forEach(a0, a1);
|
|
this._array.forEach(a0, a1);
|
|
this._after.forEach(a0, a1);
|
|
}}, {key: 'findOldest', value: value_41944}, {key: 'findNewest', value: value_41945}, {key: 'map',
|
|
value: function(a0, a1) {
|
|
return this._array.map(a0, a1);
|
|
}}, {key: 'first', value: function() {
|
|
return this._array[0];
|
|
}}, {key: 'last', value: function() {
|
|
return this._array[this._array.length - 1];
|
|
}}, {key: 'get', value: function(a0) {
|
|
var r1;
|
|
var value = a1;
|
|
r1 = value !== undefined ? value : false;
|
|
var property = this._map[a0];
|
|
return property ?? (r1 ? this._before.get(a0) ?? this._after.get(a0) : property);
|
|
}}, {key: 'getByIndex', value: function(a0) {
|
|
return this._array[a0];
|
|
}}, {key: 'getAfter', value: function(a0) {
|
|
var r1;
|
|
var value = this.get(a0);
|
|
var value2 = null;
|
|
if (value2 == value) {
|
|
return value2;
|
|
}
|
|
var property = this._array;
|
|
value = property.indexOf(value);
|
|
if (value === -1) {
|
|
r1 = value2;
|
|
} else if (value === this.length - 1) {
|
|
r1 = value2;
|
|
} else {
|
|
property = this._array;
|
|
property = property[value + 1];
|
|
r1 = property;
|
|
}
|
|
return r1;
|
|
}}, {key: 'getManyAfter', value: value_41952}, {key: 'getManyBefore', value: value_41953}, {key: 'hasAnyAfter',
|
|
value: value_41954}, {key: 'has', value: function(a0) {
|
|
var r1;
|
|
var r0;
|
|
var value = a1;
|
|
r1 = !(value !== undefined) || value;
|
|
value = this._map[a0] != null;
|
|
if (value) {
|
|
r0 = value;
|
|
} else {
|
|
r1 = r1 && (this._before.has(a0) || this._after.has(a0));
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}}, {key: 'indexOf', value: value_41956}, {key: 'hasPresent', value: function() {
|
|
var r0;
|
|
r0 = this._after.length > 0 && this._after.wasAtEdge;
|
|
r0 = !r0 ? !this.hasMoreAfter : r0;
|
|
return r0;
|
|
}}, {key: 'hasBeforeCached', value: function(a0) {
|
|
var value;
|
|
if (this.length > 0) {
|
|
if (this._before.length > 0) {
|
|
value = this.first();
|
|
return value != null && value.id === a0;
|
|
}
|
|
}
|
|
return false;
|
|
}}, {key: 'hasAfterCached', value: function(a0) {
|
|
var value;
|
|
if (this.length > 0) {
|
|
if (this._after.length > 0) {
|
|
value = this.last();
|
|
return value != null && value.id === a0;
|
|
}
|
|
}
|
|
return false;
|
|
}}, {key: 'update', value: value_41961}, {key: 'replace', value: value_41965}, {key: 'remove', value: function(a0) {
|
|
var env0_0 = a0;
|
|
return this.mutate(_fun41970, true);
|
|
}}, {key: 'removeMany', value: function(a0) {
|
|
var r0;
|
|
var value = this;
|
|
var env0_0 = value;
|
|
var env0_1 = a0;
|
|
if (a0.some(_fun41973)) {
|
|
value = value.mutate(_fun41974, true);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}}, {key: 'merge', value: function(a0) {
|
|
var value = a1;
|
|
var value2 = a2;
|
|
var env0_0 = a0;
|
|
var env0_1 = value !== undefined ? value : false;
|
|
var env0_2 = value2 !== undefined ? value2 : false;
|
|
return this.mutate(_fun41978, true);
|
|
}}, {key: '_merge', value: value_41979}, {key: 'mergeDelta', value: function() {
|
|
var value = a0;
|
|
var value2 = a1;
|
|
var value3 = a2;
|
|
var env0_0 = value !== undefined ? value : [];
|
|
var env0_1 = value2 !== undefined ? value2 : [];
|
|
var env0_2 = value3 !== undefined ? value3 : [];
|
|
return this.mutate(_fun41982);
|
|
}}, {key: '_clearMessages', value: function() {
|
|
this._array = [];
|
|
this._map = {};
|
|
}}, {key: 'reset', value: function(a0) {
|
|
var env0_0 = a0;
|
|
return this.mutate(_fun41991);
|
|
}}, {key: 'truncateTop', value: function(a0) {
|
|
var r4;
|
|
var value = a1;
|
|
var value2 = this;
|
|
r4 = !(value !== undefined) || value;
|
|
var env0_0 = undefined;
|
|
value = value2._array.length - a0;
|
|
env0_0 = value;
|
|
return value <= 0 ? value2 : value2.mutate(_fun41994, r4);
|
|
}}, {key: 'truncateBottom', value: function(a0) {
|
|
return this;
|
|
}}, {key: 'jumpToPresent', value: function(a0) {
|
|
var env0_0 = a0;
|
|
return this.mutate(_fun41997, true);
|
|
}}, {key: 'jumpToMessage', value: function(a0) {
|
|
var value = a1;
|
|
var value2 = a3;
|
|
var env0_0 = a0;
|
|
var env0_1 = !(value !== undefined) || value;
|
|
var env0_2 = a2;
|
|
var env0_3 = value2 !== undefined ? value2 : null;
|
|
var env0_4 = a4;
|
|
return this.mutate(_fun41999, false);
|
|
}}, {key: 'focusOnMessage', value: function(a0) {
|
|
var env0_0 = a0;
|
|
return this.mutate(_fun42001, false);
|
|
}}, {key: 'loadFromCache', value: function(a0, a1) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
return this.mutate(_fun42003, true);
|
|
}}, {key: 'truncate', value: function(a0, a1) {
|
|
var r1;
|
|
var r0;
|
|
var value = this;
|
|
if (value.length <= MAX_LOADED_MESSAGES) {
|
|
r0 = value;
|
|
} else {
|
|
if (a0) {
|
|
value = value.truncateBottom(TRUNCATED_MESSAGE_VIEW_SIZE);
|
|
r1 = value;
|
|
} else if (a1) {
|
|
value = value.truncateTop(TRUNCATED_MESSAGE_VIEW_SIZE);
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}}, {key: 'receiveMessage', value: value_42005}, {key: 'receivePushNotification', value: value_42008},
|
|
{key: 'receiveReactionInAppNotification', value: value_42009}, {key: 'loadStart', value: value_42010},
|
|
{key: 'loadComplete', value: value_42011}, {key: 'addCachedMessages', value: value_42015}], [{key: 'forEach',
|
|
value: value_42021}, {key: 'get', value: function(a0) {
|
|
return ChannelMessages._channelMessages[a0];
|
|
}}, {key: 'hasPresent', value: value_42023}, {key: 'getOrCreate', value: value_42024}, {key: 'clear',
|
|
value: function(a0) {
|
|
delete ChannelMessages._channelMessages[a0];
|
|
}}, {key: 'clearCache', value: function(a0) {
|
|
var property = ChannelMessages._channelMessages[a0];
|
|
if (property != null) {
|
|
property._before.clear();
|
|
property._after.clear();
|
|
this.commit(property);
|
|
}
|
|
}}, {key: 'commit', value: function(a0) {
|
|
ChannelMessages._channelMessages[a0.channelId] = a0;
|
|
}}]);
|
|
}
|
|
|
|
function flatMapChannelMessages(a0) { // fn#42028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:17280, offset: 0x0112e579, size: 23 bytes, params: 2, frame: 11
|
|
return a0.flatMap(function(a0) {
|
|
return a0._array;
|
|
});
|
|
}
|
|
|
|
function MessageCache(a0) { // fn#41912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:673, offset: 0x0112b8b1, size: 62 bytes, params: 2, frame: 13
|
|
env1_4(this, MessageCache);
|
|
this._messages = [];
|
|
this._map = {};
|
|
this._wasAtEdge = false;
|
|
this._isCacheBefore = a0;
|
|
}
|
|
|
|
function value_41913() { // fn#41913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:833, offset: 0x0112b8ef, size: 96 bytes, params: 1, frame: 15
|
|
const messageCache = new MessageCache(this._isCacheBefore);
|
|
let object = {};
|
|
copyDataProperties(object, this._map, undefined);
|
|
messageCache._map = object;
|
|
const _messages = this._messages;
|
|
object = [];
|
|
arraySpread(object, _messages, 0, undefined);
|
|
messageCache._messages = object;
|
|
messageCache._wasAtEdge = this._wasAtEdge;
|
|
return messageCache;
|
|
}
|
|
|
|
function value_41918(a0) { // fn#41918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:1262, offset: 0x0112b99b, size: 77 bytes, params: 2, frame: 16
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
this._messages = value.filter(this._messages, _fun41919);
|
|
delete this._map[a0];
|
|
}
|
|
|
|
function value_41920(a0) { // fn#41920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:1385, offset: 0x0112b9e8, size: 87 bytes, params: 2, frame: 16
|
|
var environment;
|
|
const env0_1 = a0;
|
|
const value = environment.__proto__;
|
|
(importDefault(22) /* metro dependency 22 */).each(a0, _fun41921);
|
|
const _messages = this._messages;
|
|
this._messages = _messages.filter(_fun41922);
|
|
}
|
|
|
|
function value_41928(a0) { // fn#41928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:1989, offset: 0x0112bb64, size: 384 bytes, params: 2, frame: 22
|
|
var r11;
|
|
var _isCacheBefore;
|
|
var slice;
|
|
var Math;
|
|
var items2;
|
|
let value = a1;
|
|
const r2 = value !== undefined ? value : false;
|
|
let length = this.length;
|
|
if (length === 0) {
|
|
this._wasAtEdge = r2;
|
|
}
|
|
let _messages = this._messages;
|
|
value = _messages.length + a0.length;
|
|
if (value > MAX_MESSAGE_CACHE_SIZE) {
|
|
this._wasAtEdge = false;
|
|
length = a0.length;
|
|
if (length > MAX_MESSAGE_CACHE_SIZE) {
|
|
_isCacheBefore = this._isCacheBefore;
|
|
slice = a0.slice;
|
|
if (_isCacheBefore) {
|
|
this._messages = Reflect.apply(slice, a0, [a0.length - MAX_MESSAGE_CACHE_SIZE]);
|
|
} else {
|
|
this._messages = Reflect.apply(slice, a0, [0, MAX_MESSAGE_CACHE_SIZE]);
|
|
}
|
|
this._map = {};
|
|
this._messages.forEach(_fun41929);
|
|
return undefined;
|
|
}
|
|
length = a0.length;
|
|
value = MAX_MESSAGE_CACHE_SIZE - length;
|
|
_isCacheBefore = this._isCacheBefore;
|
|
_messages = this._messages;
|
|
slice = _messages.slice;
|
|
if (_isCacheBefore) {
|
|
Math = global.Math;
|
|
this._messages = Reflect.apply(slice, _messages, [Math.max(this._messages.length - value, 0)]);
|
|
r11 = value;
|
|
} else {
|
|
this._messages = Reflect.apply(slice, _messages, [0, value]);
|
|
r11 = value;
|
|
}
|
|
_isCacheBefore = this._isCacheBefore;
|
|
items2 = [];
|
|
if (_isCacheBefore) {
|
|
arraySpread(items2, a0, arraySpread(items2, this._messages, 0, r11), r11);
|
|
} else {
|
|
arraySpread(items2, this._messages, arraySpread(items2, a0, 0, r11), r11);
|
|
}
|
|
this._messages = items2;
|
|
this._map = {};
|
|
_messages = this._messages;
|
|
_messages.forEach(_fun41930);
|
|
} else {
|
|
_isCacheBefore = this._isCacheBefore;
|
|
items2 = [];
|
|
if (_isCacheBefore) {
|
|
arraySpread(items2, a0, arraySpread(items2, this._messages, 0, r11), r11);
|
|
} else {
|
|
arraySpread(items2, this._messages, arraySpread(items2, a0, 0, r11), r11);
|
|
}
|
|
this._messages = items2;
|
|
this._map = {};
|
|
this._messages.forEach(_fun41930);
|
|
}
|
|
}
|
|
|
|
function value_41932(a0) { // fn#41932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:2685, offset: 0x0112bd1c, size: 162 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var length;
|
|
var value;
|
|
var _messages;
|
|
var max;
|
|
var value2;
|
|
const _isCacheBefore = this._isCacheBefore;
|
|
const Math = global.Math;
|
|
if (_isCacheBefore) {
|
|
max = Math.max;
|
|
length = this.length;
|
|
value = Reflect.apply(max, Math, [length - a0, 0]);
|
|
length = this.length;
|
|
_messages = this._messages;
|
|
value2 = _messages.slice(value, length);
|
|
_messages = this._messages;
|
|
_messages.splice(value);
|
|
r0 = value2;
|
|
} else {
|
|
value = Math.min(a0, this.length);
|
|
_messages = this._messages;
|
|
value = _messages.slice(0, value);
|
|
_messages = this._messages;
|
|
_messages.splice(0, a0);
|
|
r0 = value;
|
|
}
|
|
r0.forEach(_fun41933);
|
|
return r0;
|
|
}
|
|
|
|
function ChannelMessages(a0) { // fn#41935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:2988, offset: 0x0112c2cf, size: 277 bytes, params: 2, frame: 18
|
|
const value = environment.__proto__;
|
|
let binding = env1_4;
|
|
binding(this, ChannelMessages);
|
|
this.ready = false;
|
|
this.cached = false;
|
|
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
|
|
const ANIMATED = JumpTypes.ANIMATED;
|
|
this.jumpType = ANIMATED;
|
|
this.jumpTargetId = null;
|
|
this.jumpTargetOffset = 0;
|
|
this.jumpSequenceId = 1;
|
|
this.jumped = false;
|
|
this.jumpedToPresent = false;
|
|
this.jumpFlash = true;
|
|
this.jumpReturnTargetId = null;
|
|
this.focusTargetId = null;
|
|
this.focusSequenceId = 1;
|
|
this.initialScrollSequenceId = 0;
|
|
this.suppressRowAnimationSequenceId = 0;
|
|
this.hasMoreBefore = true;
|
|
this.hasMoreAfter = false;
|
|
this.loadingMore = false;
|
|
this.revealedMessageId = null;
|
|
this.hasFetched = false;
|
|
this.error = false;
|
|
this._array = [];
|
|
binding = env1_12;
|
|
this._before = new binding(true);
|
|
this._after = new binding(false);
|
|
this._map = {};
|
|
this.channelId = a0;
|
|
}
|
|
|
|
function value_41936(a0) { // fn#41936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:3641, offset: 0x0112c3e4, size: 1099 bytes, params: 2, frame: 19
|
|
var r9;
|
|
var r5;
|
|
var jumpType;
|
|
var jumpTargetId;
|
|
var jumpTargetOffset;
|
|
var jumpSequenceId;
|
|
var jumpReturnTargetId;
|
|
var focusTargetId;
|
|
var focusSequenceId;
|
|
var loadingMore;
|
|
var revealedMessageId;
|
|
var cached;
|
|
var hasFetched;
|
|
var error;
|
|
var initialScrollSequenceId;
|
|
var suppressRowAnimationSequenceId;
|
|
var object;
|
|
var value2;
|
|
const value = a1;
|
|
let r4 = value !== undefined ? value : false;
|
|
const channelMessages = new ChannelMessages(this.channelId);
|
|
const _array = this._array;
|
|
if (r4) {
|
|
object = [];
|
|
value2 = 0;
|
|
arraySpread(object, _array, value2, _array);
|
|
r5 = object;
|
|
r9 = value2;
|
|
} else {
|
|
r5 = _array;
|
|
}
|
|
channelMessages._array = r5;
|
|
const _map = this._map;
|
|
if (r4) {
|
|
object = {};
|
|
copyDataProperties(object, _map, r9);
|
|
r5 = object;
|
|
} else {
|
|
r5 = _map;
|
|
}
|
|
channelMessages._map = r5;
|
|
const _after = this._after;
|
|
channelMessages._after = r4 ? _after.clone() : _after;
|
|
const _before = this._before;
|
|
r4 = r4 ? _before.clone() : _before;
|
|
channelMessages._before = r4;
|
|
const Function = global.Function;
|
|
if (a0 instanceof Function) {
|
|
channelMessages.ready = this.ready;
|
|
channelMessages.jumpType = this.jumpType;
|
|
channelMessages.jumpTargetId = this.jumpTargetId;
|
|
channelMessages.jumpTargetOffset = this.jumpTargetOffset;
|
|
channelMessages.jumpSequenceId = this.jumpSequenceId;
|
|
channelMessages.jumped = this.jumped;
|
|
channelMessages.jumpedToPresent = this.jumpedToPresent;
|
|
channelMessages.jumpFlash = this.jumpFlash;
|
|
channelMessages.jumpReturnTargetId = this.jumpReturnTargetId;
|
|
channelMessages.focusTargetId = this.focusTargetId;
|
|
channelMessages.focusSequenceId = this.focusSequenceId;
|
|
channelMessages.hasMoreBefore = this.hasMoreBefore;
|
|
channelMessages.hasMoreAfter = this.hasMoreAfter;
|
|
channelMessages.loadingMore = this.loadingMore;
|
|
channelMessages.revealedMessageId = this.revealedMessageId;
|
|
channelMessages.cached = this.cached;
|
|
channelMessages.hasFetched = this.hasFetched;
|
|
channelMessages.error = this.error;
|
|
channelMessages.initialScrollSequenceId = this.initialScrollSequenceId;
|
|
channelMessages.suppressRowAnimationSequenceId = this.suppressRowAnimationSequenceId;
|
|
a0(channelMessages);
|
|
} else if (typeof a0 === 'object') {
|
|
r4 = a0.ready !== undefined ? a0.ready === true : this.ready;
|
|
channelMessages.ready = r4;
|
|
jumpType = a0.jumpType;
|
|
jumpType = jumpType !== undefined ? a0.jumpType : this.jumpType;
|
|
channelMessages.jumpType = jumpType;
|
|
jumpTargetId = a0.jumpTargetId;
|
|
jumpTargetId = jumpTargetId !== undefined ? a0.jumpTargetId : this.jumpTargetId;
|
|
channelMessages.jumpTargetId = jumpTargetId;
|
|
jumpTargetOffset = a0.jumpTargetOffset;
|
|
jumpTargetOffset = jumpTargetOffset !== undefined ? a0.jumpTargetOffset : this.jumpTargetOffset;
|
|
channelMessages.jumpTargetOffset = jumpTargetOffset;
|
|
jumpSequenceId = a0.jumpSequenceId;
|
|
jumpSequenceId = jumpSequenceId !== undefined ? a0.jumpSequenceId : this.jumpSequenceId;
|
|
channelMessages.jumpSequenceId = jumpSequenceId;
|
|
r4 = a0.jumped !== undefined ? a0.jumped === true : this.jumped;
|
|
channelMessages.jumped = r4;
|
|
r4 = a0.jumpedToPresent !== undefined ? a0.jumpedToPresent === true : this.jumpedToPresent;
|
|
channelMessages.jumpedToPresent = r4;
|
|
r4 = a0.jumpFlash !== undefined ? a0.jumpFlash === true : this.jumpFlash;
|
|
channelMessages.jumpFlash = r4;
|
|
jumpReturnTargetId = a0.jumpReturnTargetId;
|
|
jumpReturnTargetId = jumpReturnTargetId !== undefined ? a0.jumpReturnTargetId : this.jumpReturnTargetId;
|
|
channelMessages.jumpReturnTargetId = jumpReturnTargetId;
|
|
focusTargetId = a0.focusTargetId;
|
|
focusTargetId = focusTargetId !== undefined ? a0.focusTargetId : this.focusTargetId;
|
|
channelMessages.focusTargetId = focusTargetId;
|
|
focusSequenceId = a0.focusSequenceId;
|
|
focusSequenceId = focusSequenceId !== undefined ? a0.focusSequenceId : this.focusSequenceId;
|
|
channelMessages.focusSequenceId = focusSequenceId;
|
|
r4 = a0.hasMoreBefore !== undefined ? a0.hasMoreBefore === true : this.hasMoreBefore;
|
|
channelMessages.hasMoreBefore = r4;
|
|
r4 = a0.hasMoreAfter !== undefined ? a0.hasMoreAfter === true : this.hasMoreAfter;
|
|
channelMessages.hasMoreAfter = r4;
|
|
loadingMore = a0.loadingMore;
|
|
loadingMore = loadingMore !== undefined ? a0.loadingMore : this.loadingMore;
|
|
channelMessages.loadingMore = loadingMore;
|
|
revealedMessageId = a0.revealedMessageId;
|
|
revealedMessageId = revealedMessageId !== undefined ? a0.revealedMessageId : this.revealedMessageId;
|
|
channelMessages.revealedMessageId = revealedMessageId;
|
|
cached = a0.cached;
|
|
cached = cached !== undefined ? a0.cached : this.cached;
|
|
channelMessages.cached = cached;
|
|
hasFetched = a0.hasFetched;
|
|
hasFetched = hasFetched !== undefined ? a0.hasFetched : this.hasFetched;
|
|
channelMessages.hasFetched = hasFetched;
|
|
error = a0.error;
|
|
error = error !== undefined ? a0.error : this.error;
|
|
channelMessages.error = error;
|
|
initialScrollSequenceId = a0.initialScrollSequenceId;
|
|
initialScrollSequenceId = initialScrollSequenceId !== undefined ? a0.initialScrollSequenceId : this.initialScrollSequenceId;
|
|
channelMessages.initialScrollSequenceId = initialScrollSequenceId;
|
|
suppressRowAnimationSequenceId = a0.suppressRowAnimationSequenceId;
|
|
suppressRowAnimationSequenceId = suppressRowAnimationSequenceId !== undefined ? a0.suppressRowAnimationSequenceId : this.suppressRowAnimationSequenceId;
|
|
channelMessages.suppressRowAnimationSequenceId = suppressRowAnimationSequenceId;
|
|
}
|
|
return channelMessages;
|
|
}
|
|
|
|
function value_41944(a0) { // fn#41944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:6755, offset: 0x0112c95f, size: 143 bytes, params: 2, frame: 19
|
|
var r0;
|
|
var defaultImport2;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
const value2 = defaultImport.find(this._before._messages, a0);
|
|
if (value2 != null) {
|
|
r0 = value2;
|
|
} else {
|
|
defaultImport2 = defaultImport;
|
|
r0 = defaultImport2.find(this._array, a0);
|
|
}
|
|
if (r0 == null) {
|
|
value = defaultImport;
|
|
value = value.find(this._after._messages, a0);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_41945(a0) { // fn#41945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:6940, offset: 0x0112c9ee, size: 143 bytes, params: 2, frame: 19
|
|
var r0;
|
|
var defaultImport2;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
const last = defaultImport.findLast(this._after._messages, a0);
|
|
if (last != null) {
|
|
r0 = last;
|
|
} else {
|
|
defaultImport2 = defaultImport;
|
|
r0 = defaultImport2.findLast(this._array, a0);
|
|
}
|
|
if (r0 == null) {
|
|
value = defaultImport;
|
|
value = value.findLast(this._before._messages, a0);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_41952(a0, a1, a2) { // fn#41952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:7674, offset: 0x0112cb87, size: 186 bytes, params: 4, frame: 18
|
|
var r3;
|
|
var r2;
|
|
var value2;
|
|
var push;
|
|
let value = this.get(a0);
|
|
if (value == null) {
|
|
return null;
|
|
}
|
|
let _array = this._array;
|
|
value = _array.indexOf(value);
|
|
if (value === -1) {
|
|
return null;
|
|
}
|
|
const items2 = [];
|
|
value += 1;
|
|
let length = this.length;
|
|
reducibleJoin12: while (true) {
|
|
if (!(value < length)) {
|
|
break reducibleJoin12;
|
|
}
|
|
value2 = a1 === -1;
|
|
if (value2) {
|
|
r3 = value;
|
|
} else {
|
|
length = items2.length;
|
|
if (!(length < a1)) {
|
|
break reducibleJoin12;
|
|
}
|
|
r3 = value;
|
|
}
|
|
reducibleLoop5: while (true) {
|
|
value = a2 == null;
|
|
reducibleJoin7: while (true) {
|
|
if (value) {
|
|
r2 = value;
|
|
break reducibleJoin7;
|
|
}
|
|
_array = this._array;
|
|
value = a2(_array[r3]);
|
|
r2 = value;
|
|
break reducibleJoin7;
|
|
}
|
|
reducibleJoin9: while (true) {
|
|
if (r2) {
|
|
push = items2.push;
|
|
_array = this._array;
|
|
Reflect.apply(push, items2, [_array[r3]]);
|
|
break reducibleJoin9;
|
|
}
|
|
break reducibleJoin9;
|
|
}
|
|
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
length = this.length;
|
|
if (value < length) {
|
|
if (value2) {
|
|
r3 = value;
|
|
continue reducibleLoop5;
|
|
}
|
|
length = items2.length;
|
|
if (length < a1) {
|
|
r3 = value;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
}
|
|
return items2;
|
|
}
|
|
|
|
function value_41953(a0, a1, a2) { // fn#41953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:7932, offset: 0x0112cc41, size: 176 bytes, params: 4, frame: 19
|
|
var r3;
|
|
var r2;
|
|
var value2;
|
|
var length;
|
|
var unshift;
|
|
let value = this.get(a0);
|
|
if (value == null) {
|
|
return null;
|
|
}
|
|
let _array = this._array;
|
|
value = _array.indexOf(value);
|
|
if (value === -1) {
|
|
return null;
|
|
}
|
|
const items2 = [];
|
|
value -= 1;
|
|
reducibleJoin12: while (true) {
|
|
if (!(value >= 0)) {
|
|
break reducibleJoin12;
|
|
}
|
|
value2 = a1 === -1;
|
|
if (value2) {
|
|
r3 = value;
|
|
} else {
|
|
length = items2.length;
|
|
if (!(length < a1)) {
|
|
break reducibleJoin12;
|
|
}
|
|
r3 = value;
|
|
}
|
|
reducibleLoop5: while (true) {
|
|
value = a2 == null;
|
|
reducibleJoin7: while (true) {
|
|
if (value) {
|
|
r2 = value;
|
|
break reducibleJoin7;
|
|
}
|
|
_array = this._array;
|
|
value = a2(_array[r3]);
|
|
r2 = value;
|
|
break reducibleJoin7;
|
|
}
|
|
reducibleJoin9: while (true) {
|
|
if (r2) {
|
|
unshift = items2.unshift;
|
|
_array = this._array;
|
|
Reflect.apply(unshift, items2, [_array[r3]]);
|
|
break reducibleJoin9;
|
|
}
|
|
break reducibleJoin9;
|
|
}
|
|
value = typeof r3 === 'bigint' ? r3 - 1n : +r3 - 1;
|
|
if (value >= 0) {
|
|
if (value2) {
|
|
r3 = value;
|
|
continue reducibleLoop5;
|
|
}
|
|
length = items2.length;
|
|
if (length < a1) {
|
|
r3 = value;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
}
|
|
return items2;
|
|
}
|
|
|
|
function value_41954(a0, a1) { // fn#41954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:8182, offset: 0x0112ccf1, size: 170 bytes, params: 3, frame: 17
|
|
var r6;
|
|
var r1;
|
|
var value3;
|
|
var value4;
|
|
let value = a2;
|
|
reducibleJoin2: while (true) {
|
|
if (value !== undefined) {
|
|
r6 = value;
|
|
break reducibleJoin2;
|
|
}
|
|
value = -1;
|
|
r6 = value;
|
|
break reducibleJoin2;
|
|
}
|
|
value = this.get(a0);
|
|
if (value != null) {
|
|
var _array = this._array;
|
|
value = _array.indexOf(value);
|
|
if (value === -1) {
|
|
return false;
|
|
}
|
|
var value2 = value + 1;
|
|
var length = this.length;
|
|
if (value2 < length) {
|
|
value3 = r6 === -1;
|
|
reducibleJoin11: while (true) {
|
|
reducibleJoin12: while (true) {
|
|
if (value3) {
|
|
r1 = value2;
|
|
reducibleLoop7: while (true) {
|
|
_array = this._array;
|
|
if (a1(_array[r1])) {
|
|
break reducibleJoin12;
|
|
}
|
|
value4 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
length = this.length;
|
|
if (value4 < length) {
|
|
if (value3) {
|
|
r1 = value4;
|
|
continue reducibleLoop7;
|
|
}
|
|
if (value4 <= value + r6) {
|
|
r1 = value4;
|
|
continue reducibleLoop7;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
} else {
|
|
if (!(value2 <= value + r6)) {
|
|
break reducibleJoin11;
|
|
}
|
|
r1 = value2;
|
|
reducibleLoop7: while (true) {
|
|
_array = this._array;
|
|
if (a1(_array[r1])) {
|
|
break reducibleJoin12;
|
|
}
|
|
value4 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
length = this.length;
|
|
if (value4 < length) {
|
|
if (value3) {
|
|
r1 = value4;
|
|
continue reducibleLoop7;
|
|
}
|
|
if (value4 <= value + r6) {
|
|
r1 = value4;
|
|
continue reducibleLoop7;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function value_41956(a0) { // fn#41956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:8507, offset: 0x0112cded, size: 50 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
const env0_1 = -1;
|
|
this._array.find(_fun41957);
|
|
return env0_1;
|
|
}
|
|
|
|
function value_41961(a0, a1) { // fn#41961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:8984, offset: 0x0112cef5, size: 154 bytes, params: 3, frame: 15
|
|
var r0;
|
|
var _before;
|
|
var _after;
|
|
let value = this;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const property = value._map[a0];
|
|
if (property == null) {
|
|
_before = value._before;
|
|
if (_before.has(a0)) {
|
|
value = value.mutate(_fun41962, true);
|
|
r0 = value;
|
|
} else {
|
|
_after = value._after;
|
|
if (_after.has(a0)) {
|
|
value = value.mutate(_fun41963, true);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
const env0_3 = a1(property);
|
|
return value.mutate(_fun41964, true);
|
|
}
|
|
|
|
function value_41965(a0, a1) { // fn#41965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9275, offset: 0x0112d013, size: 146 bytes, params: 3, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var _before;
|
|
var _after;
|
|
let value = this;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
if (value._map[a0] == null) {
|
|
_before = value._before;
|
|
if (_before.has(a0)) {
|
|
value = value.mutate(_fun41966, true);
|
|
r1 = value;
|
|
} else {
|
|
_after = value._after;
|
|
if (_after.has(a0)) {
|
|
value = value.mutate(_fun41967, true);
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
value = value.mutate(_fun41968, true);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_41969(a0) { // fn#41969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9563, offset: 0x0112d131, size: 33 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
return this.mutate(_fun41970, true);
|
|
}
|
|
|
|
function value_41972(a0) { // fn#41972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9727, offset: 0x0112d1be, size: 59 bytes, params: 2, frame: 14
|
|
var r0;
|
|
let value = this;
|
|
const env0_1 = a0;
|
|
if (a0.some(_fun41973)) {
|
|
value = value.mutate(_fun41974, true);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_41977(a0) { // fn#41977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9960, offset: 0x0112d298, size: 61 bytes, params: 2, frame: 15
|
|
const value = a1;
|
|
const value2 = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = value !== undefined ? value : false;
|
|
const env0_2 = value2 !== undefined ? value2 : false;
|
|
return this.mutate(_fun41978, true);
|
|
}
|
|
|
|
function value_41979(a0) { // fn#41979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10050, offset: 0x0112d2f8, size: 150 bytes, params: 2, frame: 17
|
|
let value = a1;
|
|
const value2 = a2;
|
|
const r1 = value !== undefined ? value : false;
|
|
const r3 = value2 !== undefined ? value2 : false;
|
|
value = a0.filter(_fun41980);
|
|
if (r3) {
|
|
(r1 ? this._before : this._after).clear();
|
|
}
|
|
const items2 = [];
|
|
if (r1) {
|
|
value = arraySpread(items2, value, 0, a0);
|
|
arraySpread(items2, this._array, value, a0);
|
|
} else {
|
|
arraySpread(items2, value, arraySpread(items2, this._array, 0, a0), a0);
|
|
}
|
|
this._array = items2;
|
|
}
|
|
|
|
function value_41981() { // fn#41981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10316, offset: 0x0112d3e2, size: 70 bytes, params: 1, frame: 15
|
|
const value = a0;
|
|
const value2 = a1;
|
|
const value3 = a2;
|
|
const env0_0 = value !== undefined ? value : [];
|
|
const env0_1 = value2 !== undefined ? value2 : [];
|
|
const env0_2 = value3 !== undefined ? value3 : [];
|
|
return this.mutate(_fun41982);
|
|
}
|
|
|
|
function value_41990(a0) { // fn#41990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10747, offset: 0x0112d586, size: 30 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return this.mutate(function(a0) {
|
|
var binding = a0;
|
|
a0._array = binding;
|
|
a0._map = {};
|
|
binding.forEach(_fun41992);
|
|
a0._before.clear();
|
|
a0._after.clear();
|
|
});
|
|
}
|
|
|
|
function value_41993(a0) { // fn#41993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10900, offset: 0x0112d5f5, size: 70 bytes, params: 2, frame: 15
|
|
const value = a1;
|
|
const value2 = this;
|
|
return value2._array.length - a0 <= 0 ? value2 : value2.mutate(_fun41994, !(value !== undefined) || value);
|
|
}
|
|
|
|
function value_41996(a0) { // fn#41996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:11221, offset: 0x0112d6ca, size: 33 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
return this.mutate(_fun41997, true);
|
|
}
|
|
|
|
function value_41998(a0) { // fn#41998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:11682, offset: 0x0112d7e1, size: 75 bytes, params: 2, frame: 15
|
|
const value = a1;
|
|
const value2 = a3;
|
|
const env0_0 = a0;
|
|
const env0_1 = !(value !== undefined) || value;
|
|
const env0_2 = a2;
|
|
const env0_3 = value2 !== undefined ? value2 : null;
|
|
const env0_4 = a4;
|
|
return this.mutate(_fun41999, false);
|
|
}
|
|
|
|
function value_42000(a0) { // fn#42000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:12009, offset: 0x0112d8de, size: 33 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
return this.mutate(_fun42001, false);
|
|
}
|
|
|
|
function value_42002(a0, a1) { // fn#42002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:12164, offset: 0x0112d936, size: 40 bytes, params: 3, frame: 13
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return this.mutate(_fun42003, true);
|
|
}
|
|
|
|
function value_42005(a0) { // fn#42005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:12503, offset: 0x0112da22, size: 542 bytes, params: 2, frame: 22
|
|
var environment;
|
|
var id;
|
|
var r9;
|
|
var value4;
|
|
var messageRecord;
|
|
var value5;
|
|
var value6;
|
|
var messageRecord2;
|
|
let value = a1;
|
|
const value2 = undefined;
|
|
let r2 = !(value !== value2) || value;
|
|
let nonce = a0.nonce;
|
|
value = null;
|
|
const r1 = value == nonce ? value : this.get(a0.nonce, true);
|
|
if (value == r1) {
|
|
if (this.hasMoreAfter) {
|
|
if (this._after.wasAtEdge) {
|
|
this._after.wasAtEdge = false;
|
|
}
|
|
return this;
|
|
}
|
|
value4 = environment.__proto__;
|
|
} else {
|
|
var author = a0.author;
|
|
id = value == author ? value2 : author.id;
|
|
author = r1.author;
|
|
if (id === (value == author ? value2 : author.id)) {
|
|
nonce = a0.nonce;
|
|
if (value == nonce) {
|
|
if (this.hasMoreAfter) {
|
|
if (this._after.wasAtEdge) {
|
|
this._after.wasAtEdge = false;
|
|
}
|
|
return this;
|
|
}
|
|
value4 = environment.__proto__;
|
|
messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
value5 = this.last();
|
|
if (value == value5) {
|
|
r9 = this.merge([messageRecord]);
|
|
} else {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.compare(a0.id, value5.id);
|
|
if (value < 0) {
|
|
value = importDefault(4817) /* metro dependency 4817: EnsureReceivedMessagesAddedInOrderExperiment */;
|
|
r9 = value.getConfig({location: 'receiveMessage'}).enabled ? this.mutate(_fun42006,
|
|
true) : this.merge([messageRecord]);
|
|
} else {
|
|
r9 = this.merge([messageRecord]);
|
|
}
|
|
}
|
|
r2 = r2 ? r9.truncateTop(MAX_MESSAGES_PER_CHANNEL,
|
|
false) : this.length > MAX_LOADED_MESSAGES ? r9.truncateBottom(MAX_MESSAGES_PER_CHANNEL,
|
|
false) : r9;
|
|
return r2;
|
|
}
|
|
id = r1.id;
|
|
nonce = a0.nonce;
|
|
if (id === nonce) {
|
|
value6 = environment.__proto__;
|
|
messageRecord2 = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
if (value != r1.interactionData) {
|
|
messageRecord2.interactionData = r1.interactionData;
|
|
}
|
|
return this.replace(a0.nonce, messageRecord2);
|
|
}
|
|
if (this.hasMoreAfter) {
|
|
if (this._after.wasAtEdge) {
|
|
this._after.wasAtEdge = false;
|
|
}
|
|
return this;
|
|
}
|
|
value4 = environment.__proto__;
|
|
messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
value5 = this.last();
|
|
if (value == value5) {
|
|
r9 = this.merge([messageRecord]);
|
|
} else {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.compare(a0.id, value5.id);
|
|
if (value < 0) {
|
|
value = importDefault(4817) /* metro dependency 4817: EnsureReceivedMessagesAddedInOrderExperiment */;
|
|
r9 = value.getConfig({location: 'receiveMessage'}).enabled ? this.mutate(_fun42006,
|
|
true) : this.merge([messageRecord]);
|
|
} else {
|
|
r9 = this.merge([messageRecord]);
|
|
}
|
|
}
|
|
r2 = r2 ? r9.truncateTop(MAX_MESSAGES_PER_CHANNEL,
|
|
false) : this.length > MAX_LOADED_MESSAGES ? r9.truncateBottom(MAX_MESSAGES_PER_CHANNEL, false) : r9;
|
|
return r2;
|
|
}
|
|
if (value == a0.interaction) {
|
|
if (this.hasMoreAfter) {
|
|
if (this._after.wasAtEdge) {
|
|
this._after.wasAtEdge = false;
|
|
}
|
|
return this;
|
|
}
|
|
value4 = environment.__proto__;
|
|
messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
value5 = this.last();
|
|
if (value == value5) {
|
|
r9 = this.merge([messageRecord]);
|
|
} else {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.compare(a0.id, value5.id);
|
|
if (value < 0) {
|
|
value = importDefault(4817) /* metro dependency 4817: EnsureReceivedMessagesAddedInOrderExperiment */;
|
|
r9 = value.getConfig({location: 'receiveMessage'}).enabled ? this.mutate(_fun42006,
|
|
true) : this.merge([messageRecord]);
|
|
} else {
|
|
r9 = this.merge([messageRecord]);
|
|
}
|
|
}
|
|
r2 = r2 ? r9.truncateTop(MAX_MESSAGES_PER_CHANNEL,
|
|
false) : this.length > MAX_LOADED_MESSAGES ? r9.truncateBottom(MAX_MESSAGES_PER_CHANNEL, false) : r9;
|
|
return r2;
|
|
}
|
|
var user = a0.interaction.user;
|
|
if (user.id !== r1.author.id) {
|
|
if (this.hasMoreAfter) {
|
|
if (this._after.wasAtEdge) {
|
|
this._after.wasAtEdge = false;
|
|
}
|
|
return this;
|
|
}
|
|
value4 = environment.__proto__;
|
|
messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
value5 = this.last();
|
|
if (value == value5) {
|
|
r9 = this.merge([messageRecord]);
|
|
} else {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.compare(a0.id, value5.id);
|
|
if (value < 0) {
|
|
value = importDefault(4817) /* metro dependency 4817: EnsureReceivedMessagesAddedInOrderExperiment */;
|
|
r9 = value.getConfig({location: 'receiveMessage'}).enabled ? this.mutate(_fun42006,
|
|
true) : this.merge([messageRecord]);
|
|
} else {
|
|
r9 = this.merge([messageRecord]);
|
|
}
|
|
}
|
|
r2 = r2 ? r9.truncateTop(MAX_MESSAGES_PER_CHANNEL,
|
|
false) : this.length > MAX_LOADED_MESSAGES ? r9.truncateBottom(MAX_MESSAGES_PER_CHANNEL, false) : r9;
|
|
return r2;
|
|
}
|
|
if (value == a0.nonce) {
|
|
if (this.hasMoreAfter) {
|
|
if (this._after.wasAtEdge) {
|
|
this._after.wasAtEdge = false;
|
|
}
|
|
return this;
|
|
}
|
|
value4 = environment.__proto__;
|
|
messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
value5 = this.last();
|
|
if (value == value5) {
|
|
r9 = this.merge([messageRecord]);
|
|
} else {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.compare(a0.id, value5.id);
|
|
if (value < 0) {
|
|
value = importDefault(4817) /* metro dependency 4817: EnsureReceivedMessagesAddedInOrderExperiment */;
|
|
r9 = value.getConfig({location: 'receiveMessage'}).enabled ? this.mutate(_fun42006,
|
|
true) : this.merge([messageRecord]);
|
|
} else {
|
|
r9 = this.merge([messageRecord]);
|
|
}
|
|
}
|
|
r2 = r2 ? r9.truncateTop(MAX_MESSAGES_PER_CHANNEL,
|
|
false) : this.length > MAX_LOADED_MESSAGES ? r9.truncateBottom(MAX_MESSAGES_PER_CHANNEL, false) : r9;
|
|
return r2;
|
|
}
|
|
if (r1.id === a0.nonce) {
|
|
value6 = environment.__proto__;
|
|
messageRecord2 = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
if (value != r1.interactionData) {
|
|
messageRecord2.interactionData = r1.interactionData;
|
|
}
|
|
return this.replace(a0.nonce, messageRecord2);
|
|
}
|
|
if (this.hasMoreAfter) {
|
|
if (this._after.wasAtEdge) {
|
|
this._after.wasAtEdge = false;
|
|
}
|
|
return this;
|
|
}
|
|
}
|
|
messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
value5 = this.last();
|
|
if (value == value5) {
|
|
r9 = this.merge([messageRecord]);
|
|
} else {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.compare(a0.id, value5.id);
|
|
if (value < 0) {
|
|
value = importDefault(4817) /* metro dependency 4817: EnsureReceivedMessagesAddedInOrderExperiment */;
|
|
r9 = value.getConfig({location: 'receiveMessage'}).enabled ? this.mutate(_fun42006,
|
|
true) : this.merge([messageRecord]);
|
|
} else {
|
|
r9 = this.merge([messageRecord]);
|
|
}
|
|
}
|
|
r2 = r2 ? r9.truncateTop(MAX_MESSAGES_PER_CHANNEL,
|
|
false) : this.length > MAX_LOADED_MESSAGES ? r9.truncateBottom(MAX_MESSAGES_PER_CHANNEL, false) : r9;
|
|
return r2;
|
|
}
|
|
|
|
function value_42008(a0, a1) { // fn#42008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:13395, offset: 0x0112dcd2, size: 176 bytes, params: 3, frame: 17
|
|
const nonce = a0.nonce;
|
|
let value = null;
|
|
if (value != (value == nonce ? value : this.get(a0.nonce, true))) {
|
|
return this;
|
|
}
|
|
const get = this.get;
|
|
if (value != Reflect.apply(get, this, [a0.id, true])) {
|
|
return this;
|
|
}
|
|
value = environment.__proto__;
|
|
const isIOSPushNotificationRawPayloadFixExperimentEnabled2 = (require(4819) /* metro dependency 4819: IOSPushNotificationRawPayloadFixExperiment */).isIOSPushNotificationRawPayloadFixExperimentEnabled();
|
|
const value5 = this.mutate({ready: true,
|
|
cached: isIOSPushNotificationRawPayloadFixExperimentEnabled2 ? !a1 : !isIOSPushNotificationRawPayloadFixExperimentEnabled2});
|
|
return value5.merge([mergeMessage(this, a0)]);
|
|
}
|
|
|
|
function value_42009(a0) { // fn#42009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:13703, offset: 0x0112dd82, size: 110 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var value4;
|
|
var merge;
|
|
var value5;
|
|
let value = this;
|
|
const nonce = a0.nonce;
|
|
const value2 = null;
|
|
if (value2 != (value2 == nonce ? value2 : value.get(a0.nonce, true))) {
|
|
r0 = value;
|
|
} else {
|
|
value4 = value.mutate({'ready': true, 'cached': true});
|
|
merge = value4.merge;
|
|
value5 = environment.__proto__;
|
|
value = mergeMessage(value, a0);
|
|
value = Reflect.apply(merge, value4, [[value]]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_42010(a0) { // fn#42010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:13864, offset: 0x0112ddf0, size: 182 bytes, params: 2, frame: 17
|
|
const mutate = this.mutate;
|
|
const object2 = {loadingMore: true};
|
|
let value = null;
|
|
object2.jumped = value != a0;
|
|
const value2 = undefined;
|
|
const present = value == a0 ? value2 : a0.present;
|
|
object2.jumpedToPresent = value != present && present;
|
|
const messageId = value == a0 ? value2 : a0.messageId;
|
|
object2.jumpTargetId = value != messageId ? messageId : value;
|
|
const offset = value == a0 ? value2 : a0.offset;
|
|
object2.jumpTargetOffset = value != offset ? offset : 0;
|
|
const returnMessageId = value == a0 ? value2 : a0.returnMessageId;
|
|
object2.jumpReturnTargetId = value != returnMessageId ? returnMessageId : value;
|
|
value = value == a0;
|
|
object2.ready = value && this.ready;
|
|
return Reflect.apply(mutate, this, [object2]);
|
|
}
|
|
|
|
function value_42011({newMessages, isBefore, isAfter, jump, hasMoreBefore, hasMoreAfter, avoidInitialScroll, cached, hasFetched}) { // fn#42011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:14229, offset: 0x0112dea6, size: 1019 bytes, params: 2, frame: 33
|
|
var r2;
|
|
var offset;
|
|
var r18;
|
|
var _array;
|
|
var value16;
|
|
var value17;
|
|
var length;
|
|
var value20;
|
|
var binding;
|
|
let object = [];
|
|
arraySpread(object, newMessages, 0, undefined);
|
|
const r8 = isBefore != null && isBefore;
|
|
const r12 = isAfter != null && isAfter;
|
|
const r10 = jump ?? null;
|
|
const r13 = hasMoreBefore != null && hasMoreBefore;
|
|
const r9 = hasMoreAfter != null && hasMoreAfter;
|
|
let r7 = avoidInitialScroll != null && avoidInitialScroll;
|
|
const r6 = cached != null && cached;
|
|
const value15 = (importDefault(22) /* metro dependency 22 */)(object).reverse().map(_fun42012).value();
|
|
if (r8) {
|
|
if (r10 != null) {
|
|
_array = this._array;
|
|
value16 = _array.filter(function({state}) {
|
|
return state === MessageStates.SENDING;
|
|
});
|
|
_array = this._array;
|
|
value17 = _array.filter(_fun42014);
|
|
length = value16.length;
|
|
r2 = length > 0 || value17.length > 0;
|
|
value20 = this.reset(value15);
|
|
if (r2) {
|
|
if (r8) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r12) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.messageId != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.offset != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else {
|
|
length = value17.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SEND_FAILED messages for channelId=' + this.channelId);
|
|
r18 = value20.merge(value17);
|
|
} else {
|
|
r18 = value20;
|
|
}
|
|
length = value16.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SENDING messages for channelId=' + this.channelId);
|
|
r2 = r18.merge(value16);
|
|
} else {
|
|
r2 = r18;
|
|
}
|
|
}
|
|
} else {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
}
|
|
} else if (this.ready) {
|
|
r2 = this.merge(value15, r8, true);
|
|
} else {
|
|
_array = this._array;
|
|
value16 = _array.filter(_fun42013);
|
|
_array = this._array;
|
|
value17 = _array.filter(_fun42014);
|
|
length = value16.length;
|
|
r2 = length > 0 || value17.length > 0;
|
|
value20 = this.reset(value15);
|
|
if (r2) {
|
|
if (r8) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r12) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.messageId != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.offset != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else {
|
|
length = value17.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SEND_FAILED messages for channelId=' + this.channelId);
|
|
r18 = value20.merge(value17);
|
|
} else {
|
|
r18 = value20;
|
|
}
|
|
length = value16.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SENDING messages for channelId=' + this.channelId);
|
|
r2 = r18.merge(value16);
|
|
} else {
|
|
r2 = r18;
|
|
}
|
|
}
|
|
} else {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
}
|
|
}
|
|
} else if (r12) {
|
|
if (r10 != null) {
|
|
_array = this._array;
|
|
value16 = _array.filter(_fun42013);
|
|
_array = this._array;
|
|
value17 = _array.filter(_fun42014);
|
|
length = value16.length;
|
|
r2 = length > 0 || value17.length > 0;
|
|
value20 = this.reset(value15);
|
|
if (r2) {
|
|
if (r8) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r12) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.messageId != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.offset != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else {
|
|
length = value17.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SEND_FAILED messages for channelId=' + this.channelId);
|
|
r18 = value20.merge(value17);
|
|
} else {
|
|
r18 = value20;
|
|
}
|
|
length = value16.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SENDING messages for channelId=' + this.channelId);
|
|
r2 = r18.merge(value16);
|
|
} else {
|
|
r2 = r18;
|
|
}
|
|
}
|
|
} else {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
}
|
|
} else if (this.ready) {
|
|
r2 = this.merge(value15, r8, true);
|
|
} else {
|
|
_array = this._array;
|
|
value16 = _array.filter(_fun42013);
|
|
_array = this._array;
|
|
value17 = _array.filter(_fun42014);
|
|
length = value16.length;
|
|
r2 = length > 0 || value17.length > 0;
|
|
value20 = this.reset(value15);
|
|
if (r2) {
|
|
if (r8) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r12) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.messageId != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.offset != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else {
|
|
length = value17.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SEND_FAILED messages for channelId=' + this.channelId);
|
|
r18 = value20.merge(value17);
|
|
} else {
|
|
r18 = value20;
|
|
}
|
|
length = value16.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SENDING messages for channelId=' + this.channelId);
|
|
r2 = r18.merge(value16);
|
|
} else {
|
|
r2 = r18;
|
|
}
|
|
}
|
|
} else {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
}
|
|
}
|
|
} else {
|
|
_array = this._array;
|
|
value16 = _array.filter(_fun42013);
|
|
_array = this._array;
|
|
value17 = _array.filter(_fun42014);
|
|
length = value16.length;
|
|
r2 = length > 0 || value17.length > 0;
|
|
value20 = this.reset(value15);
|
|
if (r2) {
|
|
if (r8) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r12) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.messageId != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else if (r10?.offset != null) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
} else {
|
|
length = value17.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SEND_FAILED messages for channelId=' + this.channelId);
|
|
r18 = value20.merge(value17);
|
|
} else {
|
|
r18 = value20;
|
|
}
|
|
length = value16.length;
|
|
if (length > 0) {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: merging with SENDING messages for channelId=' + this.channelId);
|
|
r2 = r18.merge(value16);
|
|
} else {
|
|
r2 = r18;
|
|
}
|
|
}
|
|
} else {
|
|
binding = env1_11;
|
|
binding.info('loadComplete: resetting state for channelId=' + this.channelId + ', sending.length=' + value16.length);
|
|
r2 = value20;
|
|
}
|
|
}
|
|
let r3 = !r6 && r2.cached && !r7;
|
|
const mutate = r2.mutate;
|
|
object = {'ready': true, 'loadingMore': false};
|
|
object.jumpType = r10?.jumpType ?? (require(4044) /* metro dependency 4044: Client */).JumpTypes.ANIMATED;
|
|
const flash = r10?.flash;
|
|
object.jumpFlash = flash != null && flash;
|
|
object.jumped = r10 != null;
|
|
const present = r10?.present;
|
|
object.jumpedToPresent = present != null && present;
|
|
object.jumpTargetId = r10?.messageId ?? null;
|
|
if (r10 != null) {
|
|
if (r10.messageId != null) {
|
|
offset = r10.offset;
|
|
offset = offset != null ? r10.offset : 0;
|
|
} else {
|
|
offset = 0;
|
|
}
|
|
} else {
|
|
offset = 0;
|
|
}
|
|
object.jumpTargetOffset = offset;
|
|
r7 = r10 == null || r7 ? r2.jumpSequenceId : r2.jumpSequenceId + 1;
|
|
object.jumpSequenceId = r7;
|
|
object.jumpReturnTargetId = r10?.returnMessageId ?? null;
|
|
object.hasMoreBefore = r10 != null ? r13 : r12 ? r2.hasMoreBefore : r13;
|
|
object.hasMoreAfter = r10 != null ? r9 : r8 ? r2.hasMoreAfter : r9;
|
|
object.cached = r6;
|
|
object.hasFetched = hasFetched;
|
|
object.error = false;
|
|
const initialScrollSequenceId = r2.initialScrollSequenceId;
|
|
object.initialScrollSequenceId = r3 ? initialScrollSequenceId + 1 : initialScrollSequenceId;
|
|
const suppressRowAnimationSequenceId = r2.suppressRowAnimationSequenceId;
|
|
r3 = r3 ? suppressRowAnimationSequenceId + 1 : suppressRowAnimationSequenceId;
|
|
object.suppressRowAnimationSequenceId = r3;
|
|
return Reflect.apply(mutate, r2, [object]);
|
|
}
|
|
|
|
function value_42015(a0, a1) { // fn#42015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:16034, offset: 0x0112e300, size: 198 bytes, params: 3, frame: 15
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
(require(4820) /* metro dependency 4820: requireSortedDescending */).requireSortedDescending(a0);
|
|
value = a0.map(_fun42016);
|
|
value = value.reverse();
|
|
this._array.filter(_fun42017).forEach(_fun42019);
|
|
let r3 = !a1 && this.cached;
|
|
value = this.reset(value);
|
|
const mutate = value.mutate;
|
|
const initialScrollSequenceId = this.initialScrollSequenceId;
|
|
r3 = r3 ? initialScrollSequenceId + 1 : initialScrollSequenceId;
|
|
return Reflect.apply(mutate, value, [{'ready': true, 'cached': null, 'error': false, cached: a1,
|
|
initialScrollSequenceId: r3}]);
|
|
}
|
|
|
|
function value_42021(a0) { // fn#42021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:16448, offset: 0x0112e43f, size: 54 bytes, params: 2, frame: 14
|
|
let value = environment.__proto__;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
value.forEach(ChannelMessages._channelMessages, a0);
|
|
}
|
|
|
|
function value_42023(a0) { // fn#42023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:16613, offset: 0x0112e48b, size: 41 bytes, params: 2, frame: 11
|
|
var r0;
|
|
var hasPresent;
|
|
const value2 = ChannelMessages.get(a0) != null;
|
|
if (value2) {
|
|
hasPresent = hasPresent.hasPresent();
|
|
r0 = hasPresent;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_42024(a0) { // fn#42024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:16712, offset: 0x0112e4b4, size: 68 bytes, params: 2, frame: 13
|
|
var r0;
|
|
var channelMessages;
|
|
const property = ChannelMessages._channelMessages[a0];
|
|
if (property != null) {
|
|
r0 = property;
|
|
} else {
|
|
channelMessages = new ChannelMessages(a0);
|
|
ChannelMessages._channelMessages[a0] = channelMessages;
|
|
r0 = channelMessages;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun41921(a0) { // fn#41921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:1414, offset: 0x0112ba3f, size: 24 bytes, params: 2, frame: 2
|
|
delete env0_0._map[a0];
|
|
}
|
|
|
|
function _fun41922({id}) { // fn#41922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:1479, offset: 0x0112ba57, size: 38 bytes, params: 2, frame: 11
|
|
return env0_1.indexOf(id) === -1;
|
|
}
|
|
|
|
function _fun41929(a0) { // fn#41929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:2245, offset: 0x0112bce4, size: 27 bytes, params: 2, frame: 3
|
|
env0_0._map[a0.id] = a0;
|
|
return a0;
|
|
}
|
|
|
|
function _fun41933({id}) { // fn#41933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:2934, offset: 0x0112bdbe, size: 27 bytes, params: 2, frame: 2
|
|
return delete env0_0._map[id];
|
|
}
|
|
|
|
function _fun41957({id}, a1) { // fn#41957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:8553, offset: 0x0112ce1f, size: 33 bytes, params: 3, frame: 3
|
|
return id === env0_0 && true;
|
|
}
|
|
|
|
function _fun41962({_before}) { // fn#41962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9068, offset: 0x0112cf8f, size: 34 bytes, params: 2, frame: 13
|
|
return _before.update(env0_0, require);
|
|
}
|
|
|
|
function _fun41963({_after}) { // fn#41963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9130, offset: 0x0112cfb1, size: 34 bytes, params: 2, frame: 13
|
|
return _after.update(env0_0, require);
|
|
}
|
|
|
|
function _fun41964(a0) { // fn#41964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9195, offset: 0x0112cfd3, size: 64 bytes, params: 2, frame: 14
|
|
const _map = a0._map;
|
|
const binding = env0_2;
|
|
_map[binding.id] = env0_3;
|
|
a0._array[a0._array.indexOf(binding)] = env0_3;
|
|
}
|
|
|
|
function _fun41966({_before}) { // fn#41966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9356, offset: 0x0112d0a5, size: 33 bytes, params: 2, frame: 13
|
|
return _before.replace(env0_0, require);
|
|
}
|
|
|
|
function _fun41967({_after}) { // fn#41967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9419, offset: 0x0112d0c6, size: 33 bytes, params: 2, frame: 13
|
|
return _after.replace(env0_0, require);
|
|
}
|
|
|
|
function _fun41968(a0) { // fn#41968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9467, offset: 0x0112d0e7, size: 74 bytes, params: 2, frame: 13
|
|
delete a0._map[env0_0];
|
|
a0._map[require.id] = require;
|
|
const _array = a0._array;
|
|
const _array2 = a0._array;
|
|
_array[_array2.indexOf(env0_2)] = require;
|
|
}
|
|
|
|
function _fun41970(a0) { // fn#41970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9595, offset: 0x0112d152, size: 87 bytes, params: 2, frame: 13
|
|
const _map = a0._map;
|
|
const binding = env0_0;
|
|
delete _map[binding];
|
|
const _array = a0._array;
|
|
a0._array = _array.filter(_fun41971);
|
|
a0._before.remove(binding);
|
|
a0._after.remove(binding);
|
|
}
|
|
|
|
function _fun41974(a0) { // fn#41974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9784, offset: 0x0112d1f9, size: 121 bytes, params: 2, frame: 16
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
const each = value.each;
|
|
const binding = env0_1;
|
|
Reflect.apply(each, value, [binding, _fun41975]);
|
|
const _array = a0._array;
|
|
a0._array = _array.filter(_fun41976);
|
|
a0._before.removeMany(binding);
|
|
a0._after.removeMany(binding);
|
|
}
|
|
|
|
function _fun41978(a0) { // fn#41978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10002, offset: 0x0112d2d5, size: 35 bytes, params: 2, frame: 15
|
|
a0._merge(env0_0, env0_1, env0_2);
|
|
}
|
|
|
|
function _fun41980(a0) { // fn#41980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10085, offset: 0x0112d38e, size: 84 bytes, params: 2, frame: 14
|
|
var r0;
|
|
var _array;
|
|
var _array2;
|
|
let binding = env0_0;
|
|
const property = binding._map[a0.id];
|
|
binding._map[a0.id] = a0;
|
|
const value2 = property == null;
|
|
if (value2) {
|
|
r0 = value2;
|
|
} else {
|
|
binding = env0_0;
|
|
_array = binding._array;
|
|
_array2 = binding._array;
|
|
_array[_array2.indexOf(property)] = a0;
|
|
r0 = false;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun41982(a0) { // fn#41982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10361, offset: 0x0112d428, size: 202 bytes, params: 2, frame: 17
|
|
a0._before.clear();
|
|
a0._after.clear();
|
|
const Set = global.Set;
|
|
var value;
|
|
const set = new Set(env0_2);
|
|
set.forEach(_fun41983);
|
|
const binding2 = env0_1;
|
|
binding2.forEach(_fun41984);
|
|
value = Reflect.apply(a0._array.filter(_fun41985).concat, value, [set.map(_fun41986), binding2.map(_fun41987)]);
|
|
a0._array = value.sort(_fun41988);
|
|
}
|
|
|
|
function _fun41991(a0) { // fn#41991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10779, offset: 0x0112d5a4, size: 81 bytes, params: 2, frame: 12
|
|
const binding = a0;
|
|
a0._array = binding;
|
|
a0._map = {};
|
|
binding.forEach(_fun41992);
|
|
a0._before.clear();
|
|
a0._after.clear();
|
|
}
|
|
|
|
function _fun41994(a0) { // fn#41994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10974, offset: 0x0112d63b, size: 143 bytes, params: 2, frame: 17
|
|
var r3;
|
|
var _map;
|
|
var _array;
|
|
var id;
|
|
var value3;
|
|
const value2 = 0;
|
|
if (value2 < env0_0) {
|
|
for (r3 = value2; true; r3 = value3) {
|
|
_map = a0._map;
|
|
_array = a0._array;
|
|
id = _array[r3].id;
|
|
delete _map[id];
|
|
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
if (!(value3 < env0_0)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
const _before = a0._before;
|
|
const cache = _before.cache;
|
|
_array = a0._array;
|
|
Reflect.apply(cache, _before, [_array.slice(value2, env0_0), !a0.hasMoreBefore]);
|
|
_array = a0._array;
|
|
a0._array = _array.slice(env0_0);
|
|
a0.hasMoreBefore = true;
|
|
}
|
|
|
|
function _fun41997(a0) { // fn#41997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:11253, offset: 0x0112d6eb, size: 246 bytes, params: 2, frame: 17
|
|
const value = a0._after.extractAll();
|
|
a0.hasMoreAfter = false;
|
|
const Math = global.Math;
|
|
const value3 = Math.max(value.length - env0_0, 0);
|
|
const value4 = value.slice(value3);
|
|
value.splice(value3);
|
|
const _before = a0._before;
|
|
_before.cache(a0._array);
|
|
a0._before.cache(value);
|
|
a0._clearMessages();
|
|
a0._merge(value4);
|
|
a0.hasMoreBefore = a0._before.length > 0;
|
|
a0.jumped = true;
|
|
a0.jumpTargetId = null;
|
|
a0.jumpTargetOffset = 0;
|
|
a0.jumpedToPresent = true;
|
|
a0.jumpFlash = false;
|
|
a0.jumpReturnTargetId = null;
|
|
a0.jumpSequenceId = a0.jumpSequenceId + 1;
|
|
a0.ready = true;
|
|
a0.loadingMore = false;
|
|
}
|
|
|
|
function _fun41999(a0) { // fn#41999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:11730, offset: 0x0112d82c, size: 178 bytes, params: 2, frame: 16
|
|
a0.jumped = true;
|
|
a0.jumpedToPresent = false;
|
|
a0.jumpType = env0_4 ?? (require(4044) /* metro dependency 4044: Client */).JumpTypes.ANIMATED;
|
|
const binding = env0_0;
|
|
a0.jumpTargetId = binding;
|
|
a0.jumpTargetOffset = binding != null && importDefault != null ? importDefault : 0;
|
|
a0.jumpSequenceId = a0.jumpSequenceId + 1;
|
|
a0.jumpFlash = env0_1;
|
|
a0.jumpReturnTargetId = env0_3;
|
|
a0.ready = true;
|
|
a0.loadingMore = false;
|
|
}
|
|
|
|
function _fun42001(a0) { // fn#42001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:12041, offset: 0x0112d8ff, size: 55 bytes, params: 2, frame: 3
|
|
a0.focusTargetId = env0_0;
|
|
a0.focusSequenceId = a0.focusSequenceId + 1;
|
|
a0.ready = true;
|
|
a0.loadingMore = false;
|
|
}
|
|
|
|
function _fun42003(a0) { // fn#42003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:12198, offset: 0x0112d95e, size: 122 bytes, params: 2, frame: 15
|
|
const r3 = env0_0 ? a0._before : a0._after;
|
|
a0._merge(r3.extract(require), env0_0);
|
|
const r0 = r3.length > 0 || !r3.wasAtEdge;
|
|
if (env0_0) {
|
|
a0.hasMoreBefore = r0;
|
|
} else {
|
|
a0.hasMoreAfter = r0;
|
|
}
|
|
a0.ready = true;
|
|
a0.loadingMore = false;
|
|
}
|
|
|
|
function _fun42006(a0) { // fn#42006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:13067, offset: 0x0112dc40, size: 146 bytes, params: 2, frame: 18
|
|
var environment;
|
|
var value2;
|
|
var moduleValue;
|
|
const property = a0._map[env0_0.id];
|
|
a0._map[env0_0.id] = env0_0;
|
|
if (property != null) {
|
|
a0._array[a0._array.indexOf(property)] = env0_0;
|
|
} else {
|
|
value2 = environment.__proto__.__proto__;
|
|
moduleValue = importAll(4818) /* metro dependency 4818: SortedArrayUtils */;
|
|
moduleValue.insert(a0._array, env0_0, _fun42007);
|
|
}
|
|
}
|
|
|
|
function _fun42012(a0) { // fn#42012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:14517, offset: 0x0112e2a1, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
}
|
|
|
|
function _fun42013({state}) { // fn#42013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:14651, offset: 0x0112e2ca, size: 27 bytes, params: 2, frame: 2
|
|
const SENDING = MessageStates.SENDING;
|
|
return state === SENDING;
|
|
}
|
|
|
|
function _fun42014({state}) { // fn#42014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:14698, offset: 0x0112e2e5, size: 27 bytes, params: 2, frame: 2
|
|
const SEND_FAILED = MessageStates.SEND_FAILED;
|
|
return state === SEND_FAILED;
|
|
}
|
|
|
|
function _fun42016(a0) { // fn#42016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:16097, offset: 0x0112e3c6, size: 27 bytes, params: 2, frame: 13
|
|
return mergeMessage(env0_0, a0);
|
|
}
|
|
|
|
function _fun42017(a0) { // fn#42017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:16153, offset: 0x0112e3e1, size: 37 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
const binding = env0_1;
|
|
return !binding.some(_fun42018);
|
|
}
|
|
|
|
function _fun42019(a0) { // fn#42019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:16193, offset: 0x0112e406, size: 57 bytes, params: 2, frame: 15
|
|
var environment;
|
|
let value = environment.__proto__.__proto__;
|
|
value = importAll(4818) /* metro dependency 4818: SortedArrayUtils */;
|
|
return value.insert(env0_1, a0, _fun42020);
|
|
}
|
|
|
|
function _fun41976({id}) { // fn#41976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:9855, offset: 0x0112d272, size: 38 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return env1_1.indexOf(id) === -1;
|
|
}
|
|
|
|
function _fun41986(a0) { // fn#41986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10531, offset: 0x0112d50d, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
}
|
|
|
|
function _fun41988({id}, {id}) { // fn#41988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4994:10617, offset: 0x0112d536, size: 55 bytes, params: 3, frame: 13
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare(id, id);
|
|
}
|
|
|