This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+408 -398
View File
@@ -1,4 +1,14 @@
/* Metro module 1910; source: modules/app_database/DatabaseDaos.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 1911, 1926, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsModule from '../../external/discord_common/js/packages/kv-storage/js/index.tsx'; /* Metro dependency 1911 */
function _fun20952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:6, offset: 0x00ee6896, size: 370 bytes, params: 8, frame: 19
let env0_0 = require;
const makeDao = function(a0) {
@@ -7,418 +17,418 @@ function _fun20952(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const TableId = (JsModule).TableId;
let KvCache = TableId.KvCache;
const items2 = [[KvCache, 'guild_basic_channels']];
KvCache = TableId.KvCache;
items2[1] = [KvCache, 'basic_channels_stale'];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun20958(Store);
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/DatabaseDaos.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/DatabaseDaos.tsx');
exports.default = value;
exports.DEPRECATED_KEYSPACES = items2;
}
function _isNativeReflectConstruct_20953() { // fn#20953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:158, offset: 0x00ee6a08, size: 94 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) {
function _isNativeReflectConstruct_20953() { // fn#20953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:158, offset: 0x00ee6a08, size: 94 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_20953_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_20953_isNativeReflectConstruct = function() {
return !!result;
})();
}
function makeDao(a0) { // fn#20956, offset: 0x00ee6a66, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun20957;
}
function makeDao(a0) { // fn#20956, offset: 0x00ee6a66, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun20957;
function _fun20957(a0) { // fn#20957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:484, offset: 0x00ee6a76, size: 84 bytes, params: 2, frame: 14
var r3;
var defaultImport;
var database;
var authenticationStoreBinding;
let value = a0;
const value2 = null;
if (value2 != value) {
r3 = value;
} else {
value = environment.__proto__;
defaultImport = importDefault(1926) /* metro dependency 1926: DatabaseManager */;
database = defaultImport.database;
authenticationStoreBinding = AuthenticationStore;
value = Reflect.apply(database, defaultImport, [authenticationStoreBinding.getId()]);
r3 = value;
}
return value2 == r3 ? value2 : env0_0(r3);
}
function _fun20958(a0) { // fn#20958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:576, offset: 0x00ee6aca, size: 68 bytes, params: 2, frame: 15
const closure = DatabaseDaos;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}]);
}
function _fun20957(a0) { // fn#20957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:484, offset: 0x00ee6a76, size: 84 bytes, params: 2, frame: 14
var r3;
var defaultImport;
let value = a0;
const value2 = null;
if (value2 != value) {
r3 = value;
} else {
value = environment.__proto__;
defaultImport = importDefault(1926) /* metro dependency 1926: DatabaseManager */;
value = defaultImport.database(AuthenticationStore.getId());
r3 = value;
}
return value2 == r3 ? value2 : env0_0(r3);
}
function DatabaseDaos(a0) { // fn#20959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:588, offset: 0x00ee6b0e, size: 635 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, DatabaseDaos);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(DatabaseDaos);
binding = env1_5;
if (_isNativeReflectConstruct_20953()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
function _fun20958(a0) { // fn#20958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:576, offset: 0x00ee6aca, size: 68 bytes, params: 2, frame: 15
const DatabaseDaos2 = DatabaseDaos;
Inherits(DatabaseDaos2, a0);
return CreateClass(DatabaseDaos2, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}]);
function DatabaseDaos(a0) { // fn#20959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:588, offset: 0x00ee6b0e, size: 635 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, DatabaseDaos);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(DatabaseDaos);
binding = env1_5;
if (_isNativeReflectConstruct_20953()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.database = function(a0) {
var value = a0;
var defaultImport = importDefault(dependencyMap[7]);
return defaultImport.database(value ?? AuthenticationStore.getId());
};
const makeDaoBinding = makeDao;
value.channels = makeDaoBinding(_fun20961);
value.channelsTemp = makeDaoBinding(_fun20962);
value.basicChannels = makeDaoBinding(_fun20963);
value.syncedBasicChannels = makeDaoBinding(_fun20964);
value.cache = makeDaoBinding(_fun20965);
value.forceResyncVersion = makeDaoBinding(_fun20966);
value.emojis = makeDaoBinding(_fun20967);
value.guilds = makeDaoBinding(_fun20968);
value.guildsRequiringDeletedIdsSync = makeDaoBinding(_fun20969);
value.guildsRequiringChannelSync = makeDaoBinding(_fun20970);
value.messages = makeDaoBinding(_fun20971);
value.stickers = makeDaoBinding(_fun20972);
value.guildVersions = makeDaoBinding(_fun20973);
value.nonGuildVersions = makeDaoBinding(_fun20974);
value.userSettings = makeDaoBinding(_fun20975);
value.readStates = makeDaoBinding(_fun20976);
value.userGuildSettings = makeDaoBinding(_fun20977);
value.userSearchItems = makeDaoBinding(_fun20978);
value.channelsTransaction = channelsTransaction;
value.channelsTempTransaction = channelsTempTransaction;
value.basicChannelsTransaction = basicChannelsTransaction;
value.syncedBasicChannelsTransaction = syncedBasicChannelsTransaction;
value.cacheTransaction = cacheTransaction;
value.forceResyncVersionTransaction = forceResyncVersionTransaction;
value.emojisTransaction = emojisTransaction;
value.guildsTransaction = guildsTransaction;
value.messagesTransaction = messagesTransaction;
value.stickersTransaction = stickersTransaction;
value.guildVersionsTransaction = guildVersionsTransaction;
value.nonGuildVersionsTransaction = nonGuildVersionsTransaction;
value.userSettingsTransaction = userSettingsTransaction;
value.readStatesTransaction = readStatesTransaction;
value.userGuildSettingsTransaction = userGuildSettingsTransaction;
value.guildsRequiringDeletedIdsSyncTransaction = guildsRequiringDeletedIdsSyncTransaction;
value.guildsRequiringChannelSyncTransaction = guildsRequiringChannelSyncTransaction;
value.userSearchItemsTransaction = userSearchItemsTransaction;
return value;
function _fun20961(a0) { // fn#20961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:882, offset: 0x00ee6dc6, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildEntityDao = (JsModule).GuildEntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildEntityDao.prototype, {constructor: {value: GuildEntityDao}});
const guildEntityDao = new GuildEntityDao('guild_channels', KvCache, a0);
return guildEntityDao instanceof Object ? guildEntityDao : value;
}
function _fun20962(a0) { // fn#20962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:983, offset: 0x00ee6e19, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildDao = (JsModule).GuildDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildDao.prototype, {constructor: {value: GuildDao}});
const guildDao = new GuildDao('guild_channels_temp', KvCache, a0);
return guildDao instanceof Object ? guildDao : value;
}
function _fun20963(a0) { // fn#20963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1084, offset: 0x00ee6e6c, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (JsModule).Dao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('basic_channels', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20964(a0) { // fn#20964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1181, offset: 0x00ee6ebf, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (JsModule).Dao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('basic_channels_synced', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20965(a0) { // fn#20965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1271, offset: 0x00ee6f12, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (JsModule).Dao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('cache', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20966(a0) { // fn#20966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1358, offset: 0x00ee6f63, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (JsModule).Dao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('force_resync_version', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20967(a0) { // fn#20967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1448, offset: 0x00ee6fb6, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildEntityDao = (JsModule).GuildEntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildEntityDao.prototype, {constructor: {value: GuildEntityDao}});
const guildEntityDao = new GuildEntityDao('guild_emojis', KvCache, a0);
return guildEntityDao instanceof Object ? guildEntityDao : value;
}
function _fun20968(a0) { // fn#20968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1541, offset: 0x00ee7009, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (JsModule).EntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guilds', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20969(a0) { // fn#20969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1646, offset: 0x00ee705a, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (JsModule).EntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guilds_requiring_deleted_ids_sync', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20970(a0) { // fn#20970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1775, offset: 0x00ee70ad, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (JsModule).EntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guilds_requiring_channel_sync', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20971(a0) { // fn#20971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1882, offset: 0x00ee7100, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const MessageDao = (JsModule).MessageDao;
const TableId = (JsModule).TableId;
const Messages = TableId.Messages;
value = Object.create(MessageDao.prototype, {constructor: {value: MessageDao}});
const messageDao = new MessageDao('messages', Messages, a0);
return messageDao instanceof Object ? messageDao : value;
}
function _fun20972(a0) { // fn#20972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1970, offset: 0x00ee7151, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildEntityDao = (JsModule).GuildEntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildEntityDao.prototype, {constructor: {value: GuildEntityDao}});
const guildEntityDao = new GuildEntityDao('guild_stickers', KvCache, a0);
return guildEntityDao instanceof Object ? guildEntityDao : value;
}
function _fun20973(a0) { // fn#20973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2072, offset: 0x00ee71a4, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (JsModule).EntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guild_versions', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20974(a0) { // fn#20974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2172, offset: 0x00ee71f5, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (JsModule).EntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('non_guild_versions', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20975(a0) { // fn#20975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2272, offset: 0x00ee7248, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (JsModule).EntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('user_settings', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20976(a0) { // fn#20976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2365, offset: 0x00ee729b, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (JsModule).Dao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('read_states', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20977(a0) { // fn#20977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2457, offset: 0x00ee72ee, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (JsModule).Dao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('user_guild_settings', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20978(a0) { // fn#20978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2555, offset: 0x00ee733f, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (JsModule).EntityDao;
const TableId = (JsModule).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('user_search_items', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function channelsTransaction(a0) { // fn#20979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2652, owner: DatabaseDaos.channelsTransaction, offset: 0x00ee7392, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.channels(a0.database).upgradeTransaction(a0);
}
function channelsTempTransaction(a0) { // fn#20980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2726, owner: DatabaseDaos.channelsTempTransaction, offset: 0x00ee73ba, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.channelsTemp(a0.database).upgradeTransaction(a0);
}
function basicChannelsTransaction(a0) { // fn#20981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2805, owner: DatabaseDaos.basicChannelsTransaction, offset: 0x00ee73e2, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.basicChannels(a0.database).upgradeTransaction(a0);
}
function syncedBasicChannelsTransaction(a0) { // fn#20982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2891, owner: DatabaseDaos.syncedBasicChannelsTransaction, offset: 0x00ee740a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.syncedBasicChannels(a0.database).upgradeTransaction(a0);
}
function cacheTransaction(a0) { // fn#20983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2969, owner: DatabaseDaos.cacheTransaction, offset: 0x00ee7432, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.cache(a0.database).upgradeTransaction(a0);
}
function forceResyncVersionTransaction(a0) { // fn#20984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3046, owner: DatabaseDaos.forceResyncVersionTransaction, offset: 0x00ee745a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.forceResyncVersion(a0.database).upgradeTransaction(a0);
}
function emojisTransaction(a0) { // fn#20985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3124, owner: DatabaseDaos.emojisTransaction, offset: 0x00ee7482, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.emojis(a0.database).upgradeTransaction(a0);
}
function guildsTransaction(a0) { // fn#20986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3190, owner: DatabaseDaos.guildsTransaction, offset: 0x00ee74aa, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guilds(a0.database).upgradeTransaction(a0);
}
function messagesTransaction(a0) { // fn#20987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3258, owner: DatabaseDaos.messagesTransaction, offset: 0x00ee74d2, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.messages(a0.database).upgradeTransaction(a0);
}
function stickersTransaction(a0) { // fn#20988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3328, owner: DatabaseDaos.stickersTransaction, offset: 0x00ee74fa, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.stickers(a0.database).upgradeTransaction(a0);
}
function guildVersionsTransaction(a0) { // fn#20989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3403, owner: DatabaseDaos.guildVersionsTransaction, offset: 0x00ee7522, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guildVersions(a0.database).upgradeTransaction(a0);
}
function nonGuildVersionsTransaction(a0) { // fn#20990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3486, owner: DatabaseDaos.nonGuildVersionsTransaction, offset: 0x00ee754a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.nonGuildVersions(a0.database).upgradeTransaction(a0);
}
function userSettingsTransaction(a0) { // fn#20991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3568, owner: DatabaseDaos.userSettingsTransaction, offset: 0x00ee7572, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
const userSettings = binding.userSettings;
return Reflect.apply(userSettings, binding, [a0.database]).upgradeTransaction(a0);
}
function readStatesTransaction(a0) { // fn#20992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3644, owner: DatabaseDaos.readStatesTransaction, offset: 0x00ee759a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.readStates(a0.database).upgradeTransaction(a0);
}
function userGuildSettingsTransaction(a0) { // fn#20993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3725, owner: DatabaseDaos.userGuildSettingsTransaction, offset: 0x00ee75c2, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
const userGuildSettings = binding.userGuildSettings;
return Reflect.apply(userGuildSettings, binding, [a0.database]).upgradeTransaction(a0);
}
function guildsRequiringDeletedIdsSyncTransaction(a0) { // fn#20994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3825, owner: DatabaseDaos.guildsRequiringDeletedIdsSyncTransaction, offset: 0x00ee75ea, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guildsRequiringDeletedIdsSync(a0.database).upgradeTransaction(a0);
}
function guildsRequiringChannelSyncTransaction(a0) { // fn#20995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3934, owner: DatabaseDaos.guildsRequiringChannelSyncTransaction, offset: 0x00ee7612, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guildsRequiringChannelSync(a0.database).upgradeTransaction(a0);
}
function userSearchItemsTransaction(a0) { // fn#20996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:4029, owner: DatabaseDaos.userSearchItemsTransaction, offset: 0x00ee763a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
const userSearchItems = binding.userSearchItems;
return Reflect.apply(userSearchItems, binding, [a0.database]).upgradeTransaction(a0);
}
}
}
value = binding(this, r0);
value.database = function(a0) {
var value = a0;
var defaultImport = importDefault(dependencyMap[7]);
return defaultImport.database(value ?? AuthenticationStore.getId());
};
const makeDaoBinding = makeDao;
value.channels = makeDaoBinding(_fun20961);
value.channelsTemp = makeDaoBinding(_fun20962);
value.basicChannels = makeDaoBinding(_fun20963);
value.syncedBasicChannels = makeDaoBinding(_fun20964);
value.cache = makeDaoBinding(_fun20965);
value.forceResyncVersion = makeDaoBinding(_fun20966);
value.emojis = makeDaoBinding(_fun20967);
value.guilds = makeDaoBinding(_fun20968);
value.guildsRequiringDeletedIdsSync = makeDaoBinding(_fun20969);
value.guildsRequiringChannelSync = makeDaoBinding(_fun20970);
value.messages = makeDaoBinding(_fun20971);
value.stickers = makeDaoBinding(_fun20972);
value.guildVersions = makeDaoBinding(_fun20973);
value.nonGuildVersions = makeDaoBinding(_fun20974);
value.userSettings = makeDaoBinding(_fun20975);
value.readStates = makeDaoBinding(_fun20976);
value.userGuildSettings = makeDaoBinding(_fun20977);
value.userSearchItems = makeDaoBinding(_fun20978);
value.channelsTransaction = channelsTransaction;
value.channelsTempTransaction = channelsTempTransaction;
value.basicChannelsTransaction = basicChannelsTransaction;
value.syncedBasicChannelsTransaction = syncedBasicChannelsTransaction;
value.cacheTransaction = cacheTransaction;
value.forceResyncVersionTransaction = forceResyncVersionTransaction;
value.emojisTransaction = emojisTransaction;
value.guildsTransaction = guildsTransaction;
value.messagesTransaction = messagesTransaction;
value.stickersTransaction = stickersTransaction;
value.guildVersionsTransaction = guildVersionsTransaction;
value.nonGuildVersionsTransaction = nonGuildVersionsTransaction;
value.userSettingsTransaction = userSettingsTransaction;
value.readStatesTransaction = readStatesTransaction;
value.userGuildSettingsTransaction = userGuildSettingsTransaction;
value.guildsRequiringDeletedIdsSyncTransaction = guildsRequiringDeletedIdsSyncTransaction;
value.guildsRequiringChannelSyncTransaction = guildsRequiringChannelSyncTransaction;
value.userSearchItemsTransaction = userSearchItemsTransaction;
return value;
}
function _fun20961(a0) { // fn#20961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:882, offset: 0x00ee6dc6, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildEntityDao = (require(1911) /* metro dependency 1911: js */).GuildEntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildEntityDao.prototype, {constructor: {value: GuildEntityDao}});
const guildEntityDao = new GuildEntityDao('guild_channels', KvCache, a0);
return guildEntityDao instanceof Object ? guildEntityDao : value;
}
function _fun20962(a0) { // fn#20962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:983, offset: 0x00ee6e19, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildDao = (require(1911) /* metro dependency 1911: js */).GuildDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildDao.prototype, {constructor: {value: GuildDao}});
const guildDao = new GuildDao('guild_channels_temp', KvCache, a0);
return guildDao instanceof Object ? guildDao : value;
}
function _fun20963(a0) { // fn#20963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1084, offset: 0x00ee6e6c, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (require(1911) /* metro dependency 1911: js */).Dao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('basic_channels', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20964(a0) { // fn#20964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1181, offset: 0x00ee6ebf, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (require(1911) /* metro dependency 1911: js */).Dao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('basic_channels_synced', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20965(a0) { // fn#20965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1271, offset: 0x00ee6f12, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (require(1911) /* metro dependency 1911: js */).Dao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('cache', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20966(a0) { // fn#20966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1358, offset: 0x00ee6f63, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (require(1911) /* metro dependency 1911: js */).Dao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('force_resync_version', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20967(a0) { // fn#20967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1448, offset: 0x00ee6fb6, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildEntityDao = (require(1911) /* metro dependency 1911: js */).GuildEntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildEntityDao.prototype, {constructor: {value: GuildEntityDao}});
const guildEntityDao = new GuildEntityDao('guild_emojis', KvCache, a0);
return guildEntityDao instanceof Object ? guildEntityDao : value;
}
function _fun20968(a0) { // fn#20968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1541, offset: 0x00ee7009, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (require(1911) /* metro dependency 1911: js */).EntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guilds', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20969(a0) { // fn#20969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1646, offset: 0x00ee705a, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (require(1911) /* metro dependency 1911: js */).EntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guilds_requiring_deleted_ids_sync', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20970(a0) { // fn#20970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1775, offset: 0x00ee70ad, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (require(1911) /* metro dependency 1911: js */).EntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guilds_requiring_channel_sync', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20971(a0) { // fn#20971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1882, offset: 0x00ee7100, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const MessageDao = (require(1911) /* metro dependency 1911: js */).MessageDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const Messages = TableId.Messages;
value = Object.create(MessageDao.prototype, {constructor: {value: MessageDao}});
const messageDao = new MessageDao('messages', Messages, a0);
return messageDao instanceof Object ? messageDao : value;
}
function _fun20972(a0) { // fn#20972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:1970, offset: 0x00ee7151, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const GuildEntityDao = (require(1911) /* metro dependency 1911: js */).GuildEntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(GuildEntityDao.prototype, {constructor: {value: GuildEntityDao}});
const guildEntityDao = new GuildEntityDao('guild_stickers', KvCache, a0);
return guildEntityDao instanceof Object ? guildEntityDao : value;
}
function _fun20973(a0) { // fn#20973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2072, offset: 0x00ee71a4, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (require(1911) /* metro dependency 1911: js */).EntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('guild_versions', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20974(a0) { // fn#20974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2172, offset: 0x00ee71f5, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (require(1911) /* metro dependency 1911: js */).EntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('non_guild_versions', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20975(a0) { // fn#20975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2272, offset: 0x00ee7248, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (require(1911) /* metro dependency 1911: js */).EntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('user_settings', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function _fun20976(a0) { // fn#20976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2365, offset: 0x00ee729b, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (require(1911) /* metro dependency 1911: js */).Dao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('read_states', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20977(a0) { // fn#20977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2457, offset: 0x00ee72ee, size: 81 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const Dao = (require(1911) /* metro dependency 1911: js */).Dao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(Dao.prototype, {constructor: {value: Dao}});
const dao = new Dao('user_guild_settings', KvCache, a0);
return dao instanceof Object ? dao : value;
}
function _fun20978(a0) { // fn#20978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2555, offset: 0x00ee733f, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const EntityDao = (require(1911) /* metro dependency 1911: js */).EntityDao;
const TableId = (require(1911) /* metro dependency 1911: js */).TableId;
const KvCache = TableId.KvCache;
value = Object.create(EntityDao.prototype, {constructor: {value: EntityDao}});
const entityDao = new EntityDao('user_search_items', KvCache, a0);
return entityDao instanceof Object ? entityDao : value;
}
function channelsTransaction(a0) { // fn#20979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2652, owner: DatabaseDaos.channelsTransaction, offset: 0x00ee7392, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.channels(a0.database).upgradeTransaction(a0);
}
function channelsTempTransaction(a0) { // fn#20980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2726, owner: DatabaseDaos.channelsTempTransaction, offset: 0x00ee73ba, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.channelsTemp(a0.database).upgradeTransaction(a0);
}
function basicChannelsTransaction(a0) { // fn#20981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2805, owner: DatabaseDaos.basicChannelsTransaction, offset: 0x00ee73e2, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.basicChannels(a0.database).upgradeTransaction(a0);
}
function syncedBasicChannelsTransaction(a0) { // fn#20982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2891, owner: DatabaseDaos.syncedBasicChannelsTransaction, offset: 0x00ee740a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.syncedBasicChannels(a0.database).upgradeTransaction(a0);
}
function cacheTransaction(a0) { // fn#20983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:2969, owner: DatabaseDaos.cacheTransaction, offset: 0x00ee7432, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.cache(a0.database).upgradeTransaction(a0);
}
function forceResyncVersionTransaction(a0) { // fn#20984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3046, owner: DatabaseDaos.forceResyncVersionTransaction, offset: 0x00ee745a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.forceResyncVersion(a0.database).upgradeTransaction(a0);
}
function emojisTransaction(a0) { // fn#20985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3124, owner: DatabaseDaos.emojisTransaction, offset: 0x00ee7482, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.emojis(a0.database).upgradeTransaction(a0);
}
function guildsTransaction(a0) { // fn#20986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3190, owner: DatabaseDaos.guildsTransaction, offset: 0x00ee74aa, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guilds(a0.database).upgradeTransaction(a0);
}
function messagesTransaction(a0) { // fn#20987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3258, owner: DatabaseDaos.messagesTransaction, offset: 0x00ee74d2, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.messages(a0.database).upgradeTransaction(a0);
}
function stickersTransaction(a0) { // fn#20988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3328, owner: DatabaseDaos.stickersTransaction, offset: 0x00ee74fa, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.stickers(a0.database).upgradeTransaction(a0);
}
function guildVersionsTransaction(a0) { // fn#20989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3403, owner: DatabaseDaos.guildVersionsTransaction, offset: 0x00ee7522, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guildVersions(a0.database).upgradeTransaction(a0);
}
function nonGuildVersionsTransaction(a0) { // fn#20990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3486, owner: DatabaseDaos.nonGuildVersionsTransaction, offset: 0x00ee754a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.nonGuildVersions(a0.database).upgradeTransaction(a0);
}
function userSettingsTransaction(a0) { // fn#20991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3568, owner: DatabaseDaos.userSettingsTransaction, offset: 0x00ee7572, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
const userSettings = binding.userSettings;
return Reflect.apply(userSettings, binding, [a0.database]).upgradeTransaction(a0);
}
function readStatesTransaction(a0) { // fn#20992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3644, owner: DatabaseDaos.readStatesTransaction, offset: 0x00ee759a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.readStates(a0.database).upgradeTransaction(a0);
}
function userGuildSettingsTransaction(a0) { // fn#20993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3725, owner: DatabaseDaos.userGuildSettingsTransaction, offset: 0x00ee75c2, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
const userGuildSettings = binding.userGuildSettings;
return Reflect.apply(userGuildSettings, binding, [a0.database]).upgradeTransaction(a0);
}
function guildsRequiringDeletedIdsSyncTransaction(a0) { // fn#20994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3825, owner: DatabaseDaos.guildsRequiringDeletedIdsSyncTransaction, offset: 0x00ee75ea, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guildsRequiringDeletedIdsSync(a0.database).upgradeTransaction(a0);
}
function guildsRequiringChannelSyncTransaction(a0) { // fn#20995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:3934, owner: DatabaseDaos.guildsRequiringChannelSyncTransaction, offset: 0x00ee7612, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
return binding.guildsRequiringChannelSync(a0.database).upgradeTransaction(a0);
}
function userSearchItemsTransaction(a0) { // fn#20996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2037:4029, owner: DatabaseDaos.userSearchItemsTransaction, offset: 0x00ee763a, size: 40 bytes, params: 2, frame: 12
const binding = env0_0;
const userSearchItems = binding.userSearchItems;
return Reflect.apply(userSearchItems, binding, [a0.database]).upgradeTransaction(a0);
}
global.__d(_fun20952, 1910, [6, 7, 15, 17, 18, 1226, 1911, 1926, 566, 694,
2]) /* metro module 1910, dependencies: [6, 7, 15, 17, 18, 1226, 1911, 1926, 566, 694, 2] */;
+141 -137
View File
@@ -1,11 +1,14 @@
/* Metro module 1929; source: modules/app_database/app/TryLoad.tsx; dependencies: [5, 3, 694, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun21330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:6, offset: 0x00eede9b, size: 207 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('TryLoad');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/app/TryLoad.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/app/TryLoad.tsx');
exports.tryLoad = tryLoad;
exports.tryLoadAsync = function() {
return _tryLoadAsync.apply(this, arguments);
@@ -14,148 +17,149 @@ function _fun21330(global, require, importDefault, importAll, module, exports, d
exports.tryLoadOrResetCacheGatewayAsync = function() {
return _tryLoadOrResetCacheGatewayAsync.apply(this, arguments);
};
}
function _tryLoadAsync() { // fn#21331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:134, offset: 0x00eedf6a, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun21333).apply(this, arguments);
function* _fun21333(a0) { // fn#21333, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:183, offset: 0x00eedfa3, size: 70 bytes, params: 2, frame: 14
var value3;
var error;
var binding;
let value = undefined;
if (false) {
return value;
}
try {
value = a0();
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_3;
binding.log('database load failed.', error);
return null;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_3;
binding.log('database load failed.', error);
return null;
}
return value3 ? value : value;
}
function _tryLoadAsync() { // fn#21331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:134, offset: 0x00eedf6a, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun21333).apply(this, arguments);
}
function _tryLoadOrResetCacheGatewayAsync() { // fn#21334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:298, offset: 0x00eedfe9, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun21336).apply(this, arguments);
}
function tryLoad(a0) { // fn#21337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:780, offset: 0x00eee10a, size: 45 bytes, params: 2, frame: 13
var value;
var error;
var binding;
try {
value = a0();
} catch (error) {
value = environment;
binding = env0_3;
binding.log('database load failed.', error);
return null;
}
return value;
}
function tryLoadOrResetCacheGateway(a0, a1, a2) { // fn#21339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:985, offset: 0x00eee137, size: 204 bytes, params: 4, frame: 21
var r6;
var value3;
var error;
var value4;
var binding;
var log;
var value5;
var stack;
var defaultImport;
var dispatch;
const value = a0;
try {
value3 = a1();
} catch (error) {
value4 = environment;
binding = env0_3;
log = binding.log;
value5 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value5, error, stack]);
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = defaultImport.dispatch;
r6 = a2 ?? value;
Reflect.apply(dispatch, defaultImport, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGateway (' + value + ')',
metricAction: 'tryLoadOrResetCacheGateway (' + r6 + ')'}}]);
return null;
function _tryLoadOrResetCacheGatewayAsync() { // fn#21334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:298, offset: 0x00eedfe9, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun21336).apply(this, arguments);
function* _fun21336(a0, a1, a2) { // fn#21336, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:385, offset: 0x00eee022, size: 232 bytes, params: 4, frame: 22
var r7;
var value4;
var value5;
var value6;
var error;
var value7;
var binding;
var log;
var value8;
var stack;
var value9;
var dispatch;
if (false) {
return undefined;
}
value = a0;
const value3 = a2;
try {
value4 = a1();
} catch (error) {
value7 = environment.__proto__.__proto__;
binding = env2_3;
log = binding.log;
value8 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value8, error, stack]);
binding = env2_0;
value9 = binding(env2_1[2]);
dispatch = value9.dispatch;
r7 = value3 ?? value;
Reflect.apply(dispatch, value9, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGatewayAsync (' + value + ')',
metricAction: 'tryLoadOrResetCacheGatewayAsync (' + r7 + ')'}}]);
return null;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value7 = environment.__proto__.__proto__;
binding = env2_3;
log = binding.log;
value8 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value8, error, stack]);
binding = env2_0;
value9 = binding(env2_1[2]);
dispatch = value9.dispatch;
r7 = value3 ?? value;
Reflect.apply(dispatch, value9, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGatewayAsync (' + value + ')',
metricAction: 'tryLoadOrResetCacheGatewayAsync (' + r7 + ')'}}]);
return null;
}
return value6 ? value5 : value5;
}
}
return value3;
}
function* _fun21333(a0) { // fn#21333, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:183, offset: 0x00eedfa3, size: 70 bytes, params: 2, frame: 14
var value3;
var error;
var binding;
let value = undefined;
if (false) {
function tryLoad(a0) { // fn#21337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:780, offset: 0x00eee10a, size: 45 bytes, params: 2, frame: 13
var value;
var error;
var binding;
try {
value = a0();
} catch (error) {
value = environment;
binding = env0_3;
binding.log('database load failed.', error);
return null;
}
return value;
}
try {
value = a0();
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_3;
binding.log('database load failed.', error);
return null;
function tryLoadOrResetCacheGateway(a0, a1, a2) { // fn#21339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:985, offset: 0x00eee137, size: 204 bytes, params: 4, frame: 21
var r6;
var value3;
var error;
var value4;
var binding;
var log;
var value5;
var stack;
var defaultImport;
var dispatch;
const value = a0;
try {
value3 = a1();
} catch (error) {
value4 = environment;
binding = env0_3;
log = binding.log;
value5 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value5, error, stack]);
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = defaultImport.dispatch;
r6 = a2 ?? value;
Reflect.apply(dispatch, defaultImport, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGateway (' + value + ')',
metricAction: 'tryLoadOrResetCacheGateway (' + r6 + ')'}}]);
return null;
}
return value3;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_3;
binding.log('database load failed.', error);
return null;
}
return value3 ? value : value;
}
function* _fun21336(a0, a1, a2) { // fn#21336, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:385, offset: 0x00eee022, size: 232 bytes, params: 4, frame: 22
var r7;
var value4;
var value5;
var value6;
var error;
var value7;
var binding;
var log;
var value8;
var stack;
var value9;
var dispatch;
if (false) {
return undefined;
}
value = a0;
const value3 = a2;
try {
value4 = a1();
} catch (error) {
value7 = environment.__proto__.__proto__;
binding = env2_3;
log = binding.log;
value8 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value8, error, stack]);
binding = env2_0;
value9 = binding(env2_1[2]);
dispatch = value9.dispatch;
r7 = value3 ?? value;
Reflect.apply(dispatch, value9, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGatewayAsync (' + value + ')',
metricAction: 'tryLoadOrResetCacheGatewayAsync (' + r7 + ')'}}]);
return null;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value7 = environment.__proto__.__proto__;
binding = env2_3;
log = binding.log;
value8 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value8, error, stack]);
binding = env2_0;
value9 = binding(env2_1[2]);
dispatch = value9.dispatch;
r7 = value3 ?? value;
Reflect.apply(dispatch, value9, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGatewayAsync (' + value + ')',
metricAction: 'tryLoadOrResetCacheGatewayAsync (' + r7 + ')'}}]);
return null;
}
return value6 ? value5 : value5;
}
global.__d(_fun21330, 1929, [5, 3, 694, 2]) /* metro module 1929, dependencies: [5, 3, 694, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,122 +1,130 @@
/* Metro module 15669; source: modules/app_database/background_sync/native/BackgroundSyncManager.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 1878, 15670, 4860, 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 AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import AutomaticLifecycleManager from '../../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BackgroundSyncModule from './BackgroundSync.tsx'; /* Metro dependency 15670 */
function _fun120154(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:6, offset: 0x025227e0, size: 258 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun120158(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/background_sync/native/BackgroundSyncManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/background_sync/native/BackgroundSyncManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120155() { // fn#120155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:168, offset: 0x025228e2, 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_120155_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120158(a0) { // fn#120158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:371, offset: 0x02522944, size: 97 bytes, params: 2, frame: 16
const closure = BackgroundSyncManager;
env0_6(closure, a0);
return env0_3(closure, [{key: 'handleMessageCreate', value: value_120160}, {key: 'handlePostConnectionOpen',
value: value_120161}]);
}
function BackgroundSyncManager(a0) { // fn#120159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:383, offset: 0x025229a5, size: 156 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, BackgroundSyncManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(BackgroundSyncManager);
binding = env1_4;
if (_isNativeReflectConstruct_120155()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {MESSAGE_CREATE: value.handleMessageCreate, POST_CONNECTION_OPEN: value.handlePostConnectionOpen};
return value;
}
function value_120160(a0) { // fn#120160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:823, offset: 0x02522a41, size: 178 bytes, params: 2, frame: 15
var r0;
var r4;
var value;
var id;
var value2;
var currentUser;
var value6;
const message = a0.message;
if (!a0.optimistic) {
value = message.author != null;
if (value) {
id = message.author.id;
value = environment.__proto__;
value = id === AuthenticationStore.getId();
r0 = value;
} else {
r0 = value;
}
value = undefined;
if (r0) {
value2 = environment.__proto__;
currentUser = UserStore.getCurrentUser();
r0 = currentUser != null;
r4 = currentUser;
} else {
r4 = value;
}
r0 = r0 && r4.isStaff();
r0 = r0 && message.content === 'run bg sync';
if (r0) {
value6 = environment.__proto__;
(require(15670) /* metro dependency 15670: BackgroundSync */).backgroundSync({force: true});
function _isNativeReflectConstruct_120155() { // fn#120155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:168, offset: 0x025228e2, 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_120155_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120158(a0) { // fn#120158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:371, offset: 0x02522944, size: 97 bytes, params: 2, frame: 16
const BackgroundSyncManager2 = BackgroundSyncManager;
Inherits(BackgroundSyncManager2, a0);
return CreateClass(BackgroundSyncManager2, [{key: 'handleMessageCreate', value: value_120160},
{key: 'handlePostConnectionOpen', value: value_120161}]);
function BackgroundSyncManager(a0) { // fn#120159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:383, offset: 0x025229a5, size: 156 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, BackgroundSyncManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(BackgroundSyncManager);
binding = env1_4;
if (_isNativeReflectConstruct_120155()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {MESSAGE_CREATE: value.handleMessageCreate, POST_CONNECTION_OPEN: value.handlePostConnectionOpen};
return value;
}
function value_120160(a0) { // fn#120160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:823, offset: 0x02522a41, size: 178 bytes, params: 2, frame: 15
var r0;
var r4;
var value;
var id;
var authenticationStoreBinding;
var value2;
var currentUser;
var value6;
const message = a0.message;
if (!a0.optimistic) {
value = message.author != null;
if (value) {
id = message.author.id;
value = environment.__proto__;
authenticationStoreBinding = AuthenticationStore;
value = id === authenticationStoreBinding.getId();
r0 = value;
} else {
r0 = value;
}
value = undefined;
if (r0) {
value2 = environment.__proto__;
currentUser = UserStore.getCurrentUser();
r0 = currentUser != null;
r4 = currentUser;
} else {
r4 = value;
}
r0 = r0 && r4.isStaff();
r0 = r0 && message.content === 'run bg sync';
if (r0) {
value6 = environment.__proto__;
(require(15670) /* metro dependency 15670: BackgroundSync */).backgroundSync({force: true});
}
}
}
function value_120161() { // fn#120161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:1053, offset: 0x02522af3, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
(BackgroundSyncModule).backgroundSync({'force': false, 'messagesOnly': true,
'checkLastMessageId': true});
}
}
}
function value_120161() { // fn#120161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15877:1053, offset: 0x02522af3, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(15670) /* metro dependency 15670: BackgroundSync */).backgroundSync({'force': false, 'messagesOnly': true,
'checkLastMessageId': true});
}
global.__d(_fun120154, 15669, [6, 7, 15, 17, 18, 1226, 1878, 15670, 4860,
2]) /* metro module 15669, dependencies: [6, 7, 15, 17, 18, 1226, 1878, 15670, 4860, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 5226; source: modules/app_database/managers/MobileAppDatabaseManager.tsx; dependencies: [5227, 5229, 5230, 5232, 5233, 5234, 5235, 5236, 5237, 5238, 4886, 5239, 5240, 4902, 4901, 4903, 5241, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AppDatabaseManagerModule from '../system/AppDatabaseManager.tsx'; /* Metro dependency 5227 */
function _fun46240(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5404:6, offset: 0x011a3a1a, size: 793 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const AppDatabaseManager = (require(5227) /* metro dependency 5227: AppDatabaseManager */).AppDatabaseManager;
const AppDatabaseManager = (AppDatabaseManagerModule).AppDatabaseManager;
const appDatabaseManager = new AppDatabaseManager('MobileAppDatabaseManager', [], [{name: 'Channels',
actions: ['BACKGROUND_SYNC', 'CHANNEL_CREATE', 'CHANNEL_DELETE', 'CHANNEL_RECIPIENT_ADD',
'CHANNEL_RECIPIENT_REMOVE', 'CHANNEL_UPDATES', 'CONNECTION_OPEN', 'CONNECTION_OPEN_SUPPLEMENTAL',
@@ -54,7 +57,10 @@ function _fun46240(global, require, importDefault, importAll, module, exports, d
}}, {name: 'UserSearchItems', actions: ['POST_CONNECTION_OPEN', 'WRITE_CACHES'], require: function() {
return require(dependencyMap[16]).default;
}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/managers/MobileAppDatabaseManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/managers/MobileAppDatabaseManager.tsx');
exports.default = appDatabaseManager;
}
global.__d(_fun46240, 5226, [5227, 5229, 5230, 5232, 5233, 5234, 5235, 5236, 5237, 5238, 4886, 5239, 5240, 4902,
4901, 4903, 5241,
2]) /* metro module 5226, dependencies: [5227, 5229, 5230, 5232, 5233, 5234, 5235, 5236, 5237, 5238, 4886, 5239, 5240, 4902, 4901, 4903, 5241, 2] */;
File diff suppressed because it is too large. Load diff
+353 -327
View File
@@ -1,4 +1,12 @@
/* Metro module 5229; source: modules/app_database/modules/Channels.tsx; dependencies: [6, 7, 1383, 1226, 1379, 1910, 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 AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import DatabaseDaos from '../DatabaseDaos.tsx'; /* Metro dependency 1910 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
function _fun46285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:6, offset: 0x011a4907, size: 224 bytes, params: 8, frame: 19
const _arrayLikeToArray_46288 = function(a0, a1) {
var r0;
@@ -45,347 +53,365 @@ function _fun46285(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).createChannelRecordFromServer;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = _fun46289();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/Channels.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/Channels.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_46286(a0, a1) { // fn#46286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:182, offset: 0x011a49e7, size: 370 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)) {
function _createForOfIteratorHelperLoose_46286(a0, a1) { // fn#46286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:182, offset: 0x011a49e7, size: 370 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);
}
return _fun46287;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46288(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun46287;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46288(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_46288(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_46288(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun46287;
}
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 _fun46289() { // fn#46289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1102, offset: 0x011a4b59, size: 362 bytes, params: 1, frame: 15
return env0_3(Channels_46290, [{key: 'handleBackgroundSync', value: value_46301}, {key: 'handleConnectionOpen',
value: value_46304}, {key: 'handleConnectionOpenSupplemental', value: function(a0, a1) {
var replace = this.replace;
var privateChannels = this.privateChannels;
var items = [];
arraySpread(items, a0.lazyPrivateChannels, arraySpread(items, privateChannels, 0, replace), replace);
Reflect.apply(replace, this, [null, items, a1]);
this.privateChannels = [];
}}, {key: 'handleChannelRecipientAdd', value: value_46307}, {key: 'handleChannelRecipientRemove',
value: value_46308}, {key: 'handleGuildCreate', value: function(a0, a1) {
this.handleGuildSynchronize(a0.guild.id, a0.guild.channels, a1);
}}, {key: 'handleGuildDelete', value: function(a0, a1) {
this.deleteManySyncUnsafe(a0.guild.id);
}}, {key: 'resetInMemoryState', value: function() {
this.privateChannels = [];
}}, {key: 'handleGuildSynchronize', value: value_46312}, {key: 'putOne', value: value_46313}, {key: 'putMany',
value: value_46314}, {key: 'replace', value: value_46315}, {key: 'deleteOne', value: value_46316},
{key: 'deleteManySyncUnsafe', value: value_46317}]);
}
function Channels_46290() { // fn#46290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1123, offset: 0x011a4cc3, size: 151 bytes, params: 1, frame: 14
env1_2(this, Channels_46290);
this.privateChannels = [];
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46291, CHANNEL_CREATE: CHANNEL_CREATE_46292,
CHANNEL_DELETE: CHANNEL_DELETE_46293, CHANNEL_RECIPIENT_ADD: CHANNEL_RECIPIENT_ADD_46294,
CHANNEL_RECIPIENT_REMOVE: CHANNEL_RECIPIENT_REMOVE_46295, CHANNEL_UPDATES: CHANNEL_UPDATES_46296,
CONNECTION_OPEN_SUPPLEMENTAL: CONNECTION_OPEN_SUPPLEMENTAL_46297, CONNECTION_OPEN: CONNECTION_OPEN_46298,
GUILD_CREATE: GUILD_CREATE_46299, GUILD_DELETE: GUILD_DELETE_46300};
}
function value_46301({guilds}, a1) { // fn#46301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1824, offset: 0x011a4e56, size: 83 bytes, params: 3, frame: 14
var environment;
var r2;
var value3;
var value4;
const env0_0 = a1;
const closure = value_46301_loop;
let value = environment.__proto__;
value = _createForOfIteratorHelperLoose_46286(guilds);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
closure(value3);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
}
function value_46304(a0, a1) { // fn#46304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:2378, offset: 0x011a4fa2, size: 190 bytes, params: 3, frame: 19
var environment;
var r4;
var value4;
var handleGuildSynchronize;
var id;
var channels;
var value5;
let value = a0.guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, undefined);
arraySpread(items2, a0.unavailableGuilds, value, undefined);
value = environment.__proto__;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).channelsTransaction(a1).deleteAllExcept(items2);
value = _createForOfIteratorHelperLoose_46286(a0.guilds);
const value3 = value();
let done = value3.done;
if (!done) {
for (r4 = value3; true; r4 = value5) {
value4 = r4.value;
handleGuildSynchronize = this.handleGuildSynchronize;
id = value4.id;
channels = value4.channels;
Reflect.apply(handleGuildSynchronize, this, [id, channels, a1]);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
this.privateChannels = a0.initialPrivateChannels;
}
function value_46307(a0, a1) { // fn#46307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:2930, offset: 0x011a50a5, size: 112 bytes, params: 3, frame: 17
var putOne;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(a0.channelId);
value = AuthenticationStore.getId();
if (channel != null && channel.isPrivate()) {
putOne = this.putOne;
value = channel.addRecipient(a0.user.id, a0.nick, value);
Reflect.apply(putOne, this, [value, a1]);
}
}
function value_46308(a0, a1) { // fn#46308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:3132, offset: 0x011a5115, size: 90 bytes, params: 3, frame: 14
var putOne;
let value = environment.__proto__;
value = ChannelStore.getChannel(a0.channelId);
if (value != null && value.isPrivate()) {
putOne = this.putOne;
value = value.removeRecipient(a0.user.id);
Reflect.apply(putOne, this, [value, a1]);
}
}
function value_46312(a0, a1, a2) { // fn#46312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:3628, offset: 0x011a51d0, size: 174 bytes, params: 4, frame: 17
var r1;
var replace;
var items2;
var value;
var value2;
var value3;
var done;
var value4;
var value5;
const op = a1.op;
if (op === 'update') {
value = environment.__proto__;
value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).channelsTransaction(a2);
value2.putAll(a0, a1.writes);
value = _createForOfIteratorHelperLoose_46286(a1.deletes);
value3 = value();
done = value3.done;
if (!done) {
r1 = value3;
reducibleLoop4: while (true) {
value4 = r1.value;
value2.delete(a0, value4);
value5 = value();
done = value5.done;
if (done) {
break reducibleLoop4;
}
r1 = value5;
continue reducibleLoop4;
}
}
} else {
reducibleJoin5: while (true) {
if (op !== 'full_sync') {
break reducibleJoin5;
}
replace = this.replace;
items2 = a1.items;
Reflect.apply(replace, this, [a0, items2, a2]);
break reducibleJoin5;
}
}
}
function value_46313(a0, a1) { // fn#46313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:3921, offset: 0x011a527e, size: 61 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channelsTransaction(a1);
value.put(a0.guild_id, a0);
}
function value_46314(a0, a1) { // fn#46314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4014, offset: 0x011a52bb, size: 102 bytes, params: 3, frame: 16
var r2;
var value4;
var put;
var guild_id;
var value5;
let value = environment.__proto__;
const value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).channelsTransaction(a1);
value = _createForOfIteratorHelperLoose_46286(a0);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
put = value2.put;
guild_id = value4.guild_id;
Reflect.apply(put, value2, [guild_id, value4]);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
}
function value_46315(a0, a1, a2) { // fn#46315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4190, offset: 0x011a5321, size: 59 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channelsTransaction(a2);
value.replaceAll(a0, a1);
}
function value_46316(a0, a1, a2) { // fn#46316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4286, offset: 0x011a535c, size: 58 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channelsTransaction(a2);
value.delete(a0, a1);
}
function value_46317(a0) { // fn#46317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4391, offset: 0x011a5396, size: 57 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channels();
if (value != null) {
value.deleteSyncUnsafe(a0);
}
}
function Channels_46290CHANNEL_CREATE({channel}, a1) { // fn#46292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1267, owner: Channels_46290.CHANNEL_CREATE, offset: 0x011a4d75, size: 32 bytes, params: 3, frame: 13
return env0_0.putOne(channel, a1);
}
function Channels_46290CHANNEL_DELETE(a0, a1) { // fn#46293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1314, owner: Channels_46290.CHANNEL_DELETE, offset: 0x011a4d95, size: 48 bytes, params: 3, frame: 15
const binding = env0_0;
return binding.deleteOne(a0.channel.guild_id, a0.channel.id, a1);
}
function Channels_46290CHANNEL_RECIPIENT_ADD(a0, a1) { // fn#46294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1393, owner: Channels_46290.CHANNEL_RECIPIENT_ADD, offset: 0x011a4dc5, size: 29 bytes, params: 3, frame: 13
return env0_0.handleChannelRecipientAdd(a0, a1);
}
function Channels_46290CHANNEL_RECIPIENT_REMOVE(a0, a1) { // fn#46295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1461, owner: Channels_46290.CHANNEL_RECIPIENT_REMOVE, offset: 0x011a4de2, size: 29 bytes, params: 3, frame: 13
return env0_0.handleChannelRecipientRemove(a0, a1);
}
function Channels_46290CHANNEL_UPDATES({channels}, a1) { // fn#46296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1523, owner: Channels_46290.CHANNEL_UPDATES, offset: 0x011a4dff, size: 33 bytes, params: 3, frame: 13
return env0_0.putMany(channels, a1);
}
function Channels_46290CONNECTION_OPEN_SUPPLEMENTAL(a0, a1) { // fn#46297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1586, owner: Channels_46290.CONNECTION_OPEN_SUPPLEMENTAL, offset: 0x011a4e20, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpenSupplemental(a0, a1);
}
function value_46301_loop(a0) { // fn#46302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1861, owner: value_46301._loop, offset: 0x011a4ea9, size: 217 bytes, params: 2, frame: 17
var r0;
var object2;
var binding;
var partial_updates;
const env0_0 = a0;
const closure = asRecord;
const data_mode = a0.data_mode;
if (data_mode !== 'unavailable') {
if (data_mode === 'partial') {
object2 = {op: 'update'};
partial_updates = a0.partial_updates;
r0 = partial_updates.channels?.map(closure);
r0 = r0 ?? [];
object2.writes = r0;
partial_updates = a0.partial_updates;
r0 = partial_updates.deleted_channel_ids ?? [];
object2.deletes = r0;
binding = env0_1;
binding.handleGuildSynchronize(a0.id, object2, require);
} else {
object2 = {op: 'full_sync'};
object2.items = a0.channels.map(closure);
binding = env0_1;
binding.handleGuildSynchronize(a0.id, object2, require);
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun46287;
}
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 _fun46287() { // fn#46287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:753, 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 _fun46289() { // fn#46289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1102, offset: 0x011a4b59, size: 362 bytes, params: 1, frame: 15
return CreateClass(Channels, [{key: 'handleBackgroundSync', value: value_46301}, {key: 'handleConnectionOpen',
value: value_46304}, {key: 'handleConnectionOpenSupplemental', value: function(a0, a1) {
var replace = this.replace;
var privateChannels = this.privateChannels;
var items = [];
arraySpread(items, a0.lazyPrivateChannels, arraySpread(items, privateChannels, 0, replace), replace);
Reflect.apply(replace, this, [null, items, a1]);
this.privateChannels = [];
}}, {key: 'handleChannelRecipientAdd', value: value_46307}, {key: 'handleChannelRecipientRemove',
value: value_46308}, {key: 'handleGuildCreate', value: function(a0, a1) {
this.handleGuildSynchronize(a0.guild.id, a0.guild.channels, a1);
}}, {key: 'handleGuildDelete', value: function(a0, a1) {
this.deleteManySyncUnsafe(a0.guild.id);
}}, {key: 'resetInMemoryState', value: function() {
this.privateChannels = [];
}}, {key: 'handleGuildSynchronize', value: value_46312}, {key: 'putOne', value: value_46313}, {key: 'putMany',
value: value_46314}, {key: 'replace', value: value_46315}, {key: 'deleteOne', value: value_46316},
{key: 'deleteManySyncUnsafe', value: value_46317}]);
function Channels() { // fn#46290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1123, offset: 0x011a4cc3, size: 151 bytes, params: 1, frame: 14
env1_2(this, Channels);
this.privateChannels = [];
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46291, CHANNEL_CREATE: CHANNEL_CREATE_46292,
CHANNEL_DELETE: CHANNEL_DELETE_46293, CHANNEL_RECIPIENT_ADD: CHANNEL_RECIPIENT_ADD_46294,
CHANNEL_RECIPIENT_REMOVE: CHANNEL_RECIPIENT_REMOVE_46295, CHANNEL_UPDATES: CHANNEL_UPDATES_46296,
CONNECTION_OPEN_SUPPLEMENTAL: CONNECTION_OPEN_SUPPLEMENTAL_46297, CONNECTION_OPEN: CONNECTION_OPEN_46298,
GUILD_CREATE: GUILD_CREATE_46299, GUILD_DELETE: GUILD_DELETE_46300};
function ChannelsBACKGROUND_SYNC(a0, a1) { // fn#46291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1214, owner: Channels.BACKGROUND_SYNC, offset: 0x011a4d5a, size: 27 bytes, params: 3, frame: 13
return env0_0.handleBackgroundSync(a0, a1);
}
function ChannelsCHANNEL_CREATE({channel}, a1) { // fn#46292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1267, owner: Channels.CHANNEL_CREATE, offset: 0x011a4d75, size: 32 bytes, params: 3, frame: 13
return env0_0.putOne(channel, a1);
}
function ChannelsCHANNEL_DELETE(a0, a1) { // fn#46293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1314, owner: Channels.CHANNEL_DELETE, offset: 0x011a4d95, size: 48 bytes, params: 3, frame: 15
const binding = env0_0;
return binding.deleteOne(a0.channel.guild_id, a0.channel.id, a1);
}
function ChannelsCHANNEL_RECIPIENT_ADD(a0, a1) { // fn#46294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1393, owner: Channels.CHANNEL_RECIPIENT_ADD, offset: 0x011a4dc5, size: 29 bytes, params: 3, frame: 13
return env0_0.handleChannelRecipientAdd(a0, a1);
}
function ChannelsCHANNEL_RECIPIENT_REMOVE(a0, a1) { // fn#46295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1461, owner: Channels.CHANNEL_RECIPIENT_REMOVE, offset: 0x011a4de2, size: 29 bytes, params: 3, frame: 13
return env0_0.handleChannelRecipientRemove(a0, a1);
}
function ChannelsCHANNEL_UPDATES({channels}, a1) { // fn#46296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1523, owner: Channels.CHANNEL_UPDATES, offset: 0x011a4dff, size: 33 bytes, params: 3, frame: 13
return env0_0.putMany(channels, a1);
}
function ChannelsCONNECTION_OPEN_SUPPLEMENTAL(a0, a1) { // fn#46297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1586, owner: Channels.CONNECTION_OPEN_SUPPLEMENTAL, offset: 0x011a4e20, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpenSupplemental(a0, a1);
}
function ChannelsCONNECTION_OPEN(a0, a1) { // fn#46298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1652, owner: Channels.CONNECTION_OPEN, offset: 0x0114e0b5, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpen(a0, a1);
}
function ChannelsGUILD_CREATE(a0, a1) { // fn#46299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1703, owner: Channels.GUILD_CREATE, offset: 0x011a4e3b, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildCreate(a0, a1);
}
function ChannelsGUILD_DELETE(a0, a1) { // fn#46300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1751, owner: Channels.GUILD_DELETE, offset: 0x01146bf0, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildDelete(a0, a1);
}
}
function value_46301({guilds}, a1) { // fn#46301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1824, offset: 0x011a4e56, size: 83 bytes, params: 3, frame: 14
var environment;
var r2;
var value3;
var value4;
const env0_0 = a1;
const value_46301_loop2 = value_46301_loop;
let value = environment.__proto__;
value = _createForOfIteratorHelperLoose_46286(guilds);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
value_46301_loop2(value3);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
function value_46301_loop(a0) { // fn#46302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1861, owner: value_46301._loop, offset: 0x011a4ea9, size: 217 bytes, params: 2, frame: 17
var r0;
var object;
var binding;
var partial_updates;
const env0_0 = a0;
const asRecord2 = asRecord;
const data_mode = a0.data_mode;
if (data_mode !== 'unavailable') {
if (data_mode === 'partial') {
object = {op: 'update'};
partial_updates = a0.partial_updates;
r0 = partial_updates.channels?.map(asRecord2);
r0 = r0 ?? [];
object.writes = r0;
partial_updates = a0.partial_updates;
r0 = partial_updates.deleted_channel_ids ?? [];
object.deletes = r0;
binding = env0_1;
binding.handleGuildSynchronize(a0.id, object, require);
} else {
object = {op: 'full_sync'};
object.items = a0.channels.map(asRecord2);
binding = env0_1;
binding.handleGuildSynchronize(a0.id, object, require);
}
}
function asRecord(a0) { // fn#46303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1886, owner: value_46301._loop.asRecord, offset: 0x011a4f82, size: 32 bytes, params: 2, frame: 13
return createChannelRecordFromServer(a0, env0_0.id);
}
}
}
function value_46304(a0, a1) { // fn#46304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:2378, offset: 0x011a4fa2, size: 190 bytes, params: 3, frame: 19
var environment;
var r4;
var value4;
var handleGuildSynchronize;
var id;
var channels;
var value5;
let value = a0.guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, undefined);
arraySpread(items2, a0.unavailableGuilds, value, undefined);
value = environment.__proto__;
(DatabaseDaos).channelsTransaction(a1).deleteAllExcept(items2);
value = _createForOfIteratorHelperLoose_46286(a0.guilds);
const value3 = value();
let done = value3.done;
if (!done) {
for (r4 = value3; true; r4 = value5) {
value4 = r4.value;
handleGuildSynchronize = this.handleGuildSynchronize;
id = value4.id;
channels = value4.channels;
Reflect.apply(handleGuildSynchronize, this, [id, channels, a1]);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
this.privateChannels = a0.initialPrivateChannels;
}
function value_46307(a0, a1) { // fn#46307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:2930, offset: 0x011a50a5, size: 112 bytes, params: 3, frame: 17
var putOne;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(a0.channelId);
value = AuthenticationStore.getId();
if (channel != null && channel.isPrivate()) {
putOne = this.putOne;
value = channel.addRecipient(a0.user.id, a0.nick, value);
Reflect.apply(putOne, this, [value, a1]);
}
}
function value_46308(a0, a1) { // fn#46308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:3132, offset: 0x011a5115, size: 90 bytes, params: 3, frame: 14
var putOne;
let value = environment.__proto__;
value = ChannelStore.getChannel(a0.channelId);
if (value != null && value.isPrivate()) {
putOne = this.putOne;
value = value.removeRecipient(a0.user.id);
Reflect.apply(putOne, this, [value, a1]);
}
}
function value_46312(a0, a1, a2) { // fn#46312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:3628, offset: 0x011a51d0, size: 174 bytes, params: 4, frame: 17
var r1;
var replace;
var items2;
var value;
var value2;
var value3;
var done;
var value4;
var value5;
const op = a1.op;
if (op === 'update') {
value = environment.__proto__;
value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).channelsTransaction(a2);
value2.putAll(a0, a1.writes);
value = _createForOfIteratorHelperLoose_46286(a1.deletes);
value3 = value();
done = value3.done;
if (!done) {
r1 = value3;
reducibleLoop4: while (true) {
value4 = r1.value;
value2.delete(a0, value4);
value5 = value();
done = value5.done;
if (done) {
break reducibleLoop4;
}
r1 = value5;
continue reducibleLoop4;
}
}
} else {
reducibleJoin5: while (true) {
if (op !== 'full_sync') {
break reducibleJoin5;
}
replace = this.replace;
items2 = a1.items;
Reflect.apply(replace, this, [a0, items2, a2]);
break reducibleJoin5;
}
}
}
function value_46313(a0, a1) { // fn#46313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:3921, offset: 0x011a527e, size: 61 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channelsTransaction(a1);
value.put(a0.guild_id, a0);
}
function value_46314(a0, a1) { // fn#46314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4014, offset: 0x011a52bb, size: 102 bytes, params: 3, frame: 16
var r2;
var value4;
var put;
var guild_id;
var value5;
let value = environment.__proto__;
const value2 = (DatabaseDaos).channelsTransaction(a1);
value = _createForOfIteratorHelperLoose_46286(a0);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
put = value2.put;
guild_id = value4.guild_id;
Reflect.apply(put, value2, [guild_id, value4]);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
}
function value_46315(a0, a1, a2) { // fn#46315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4190, offset: 0x011a5321, size: 59 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channelsTransaction(a2);
value.replaceAll(a0, a1);
}
function value_46316(a0, a1, a2) { // fn#46316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4286, offset: 0x011a535c, size: 58 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channelsTransaction(a2);
value.delete(a0, a1);
}
function value_46317(a0) { // fn#46317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:4391, offset: 0x011a5396, size: 57 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.channels();
if (value != null) {
value.deleteSyncUnsafe(a0);
}
}
}
}
function asRecord(a0) { // fn#46303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5407:1886, owner: value_46301._loop.asRecord, offset: 0x011a4f82, size: 32 bytes, params: 2, frame: 13
return createChannelRecordFromServer(a0, env0_0.id);
}
global.__d(_fun46285, 5229, [6, 7, 1383, 1226, 1379, 1910,
2]) /* metro module 5229, dependencies: [6, 7, 1383, 1226, 1379, 1910, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,11 @@
/* Metro module 5232; source: modules/app_database/modules/GuildEmojis.tsx; dependencies: [5, 6, 7, 3, 1910, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 DatabaseDaos from '../DatabaseDaos.tsx'; /* Metro dependency 1910 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46376(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:6, offset: 0x011a68f1, size: 228 bytes, params: 8, frame: 18
const _arrayLikeToArray_46379 = function(a0, a1) {
var r0;
@@ -45,259 +52,289 @@ function _fun46376(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('GuildEmojis');
value = _fun46380();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/GuildEmojis.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/GuildEmojis.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_46377(a0, a1) { // fn#46377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:131, offset: 0x011a69d5, size: 370 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)) {
function _createForOfIteratorHelperLoose_46377(a0, a1) { // fn#46377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:131, offset: 0x011a69d5, size: 370 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);
}
return _fun46378;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46379(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun46378;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46379(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_46379(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_46379(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun46378;
}
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 _fun46378() { // fn#46378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:702, 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 _fun46380() { // fn#46380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1077, offset: 0x011a6b47, size: 328 bytes, params: 1, frame: 16
const GuildEmojis2 = GuildEmojis;
let env0_0 = Module00005(_fun46389);
return CreateClass(GuildEmojis2, [{key: 'getAsync', value: value_46390}, {key: 'handleConnectionOpen',
value: value_46391}, {key: 'handleGuildCreate', value: function(a0, a1) {
this.handleOneGuildCreate(a0.guild, a1);
}}, {key: 'handleGuildUpdate', value: function(a0, a1) {
this.replace(a0.guild.id, a0.guild.emojis, a1);
}}, {key: 'handleGuildDelete', value: function(a0, a1) {
this.delete(a0.guild.id, a1);
}}, {key: 'handleGuildEmojisUpdate', value: function(a0, a1) {
this.replace(a0.guildId, a0.emojis, a1);
}}, {key: 'handleBackgroundSync', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a1;
var promisesForBackgroundSyncToWaitOn = a0.promisesForBackgroundSyncToWaitOn;
var Promise = global.Promise;
promisesForBackgroundSyncToWaitOn.push(Promise.all(a0.emojis.map(_fun46398)));
}}, {key: 'handleOneGuildCreate', value: function(a0, a1) {
var property = a0.emojis.op;
if (property === 'full_sync') {
this.replace(a0.id, a0.emojis.items, a1);
} else if (property === 'update') {
this.update(a0.id, a0.emojis.writes, a0.emojis.deletes, a1);
} else {
a0.emojis;
}
}}, {key: 'resetInMemoryState', value: function() {
}}, {key: 'replace', value: value_46401}, {key: 'delete', value: value_46402}, {key: 'update', value: value_46403}]);
function GuildEmojis() { // fn#46381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1098, offset: 0x011a6c8f, size: 101 bytes, params: 1, frame: 14
env1_3(this, GuildEmojis);
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46382, CONNECTION_OPEN: CONNECTION_OPEN_46383,
GUILD_CREATE: GUILD_CREATE_46384, GUILD_DELETE: GUILD_DELETE_46385, GUILD_EMOJIS_UPDATE: GUILD_EMOJIS_UPDATE,
GUILD_UPDATE: GUILD_UPDATE_46387};
function GuildEmojisBACKGROUND_SYNC(a0, a1) { // fn#46382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1171, owner: GuildEmojis.BACKGROUND_SYNC, offset: 0x011a4d5a, size: 27 bytes, params: 3, frame: 13
return env0_0.handleBackgroundSync(a0, a1);
}
function GuildEmojisCONNECTION_OPEN(a0, a1) { // fn#46383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1225, owner: GuildEmojis.CONNECTION_OPEN, offset: 0x0114e0b5, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpen(a0, a1);
}
function GuildEmojisGUILD_CREATE(a0, a1) { // fn#46384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1276, owner: GuildEmojis.GUILD_CREATE, offset: 0x011a4e3b, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildCreate(a0, a1);
}
function GuildEmojisGUILD_DELETE(a0, a1) { // fn#46385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1324, owner: GuildEmojis.GUILD_DELETE, offset: 0x01146bf0, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildDelete(a0, a1);
}
function GUILD_EMOJIS_UPDATE(a0, a1) { // fn#46386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1379, owner: GuildEmojis.GUILD_EMOJIS_UPDATE, offset: 0x011a6cf4, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildEmojisUpdate(a0, a1);
}
function GuildEmojisGUILD_UPDATE(a0, a1) { // fn#46387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1433, owner: GuildEmojis.GUILD_UPDATE, offset: 0x011a5a7a, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildUpdate(a0, a1);
}
}
function* _fun46389(a0) { // fn#46389, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1500, offset: 0x011a6d18, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[4]).emojis(a0);
const getMapEntries = value5.getMapEntries;
yield Reflect.apply(getMapEntries, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_5;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding, ['asynchronously loaded in ' + value + 'ms (guilds: ' + value6.length + ')']);
}
return value6;
}
function value_46390() { // fn#46390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1676, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_46391(a0, a1) { // fn#46391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1764, offset: 0x011a6dbf, size: 166 bytes, params: 3, frame: 18
var environment;
var r2;
var value4;
var value5;
let value = a0.guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, items2);
arraySpread(items2, a0.unavailableGuilds, value, items2);
value = environment.__proto__;
(DatabaseDaos).emojisTransaction(a1).deleteAllExcept(items2);
value = _createForOfIteratorHelperLoose_46377(a0.guilds);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
this.handleOneGuildCreate(value4, a1);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
function value_46397({promisesForBackgroundSyncToWaitOn, emojis}, a1) { // fn#46397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:2370, offset: 0x011a6ed9, size: 79 bytes, params: 3, frame: 15
const env0_1 = a1;
const push = promisesForBackgroundSyncToWaitOn.push;
const Promise = global.Promise;
Reflect.apply(push, promisesForBackgroundSyncToWaitOn, [Promise.all(emojis.map(_fun46398))]);
function _fun46398(a0) { // fn#46398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:2451, offset: 0x011a6f28, size: 324 bytes, params: 2, frame: 22
var updatedEntities;
var length;
var value;
var deletedEntityIds;
var binding;
var verbose;
var length2;
var guildId;
var update;
var entities;
var replace;
if (a0.dataMode === 'unavailable') {
return global.Promise.resolve();
}
if (a0.dataMode === 'full') {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
entities = a0.entities;
length = entities.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding, ['Replacing ' + length + ' emojis for ' + guildId]);
binding = env0_0;
replace = binding.replace;
guildId = a0.guildId;
entities = a0.entities;
Reflect.apply(replace, binding, [guildId, entities, require]);
} else {
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
value = length > 0;
if (value || a0.deletedEntityIds.length > 0) {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
deletedEntityIds = a0.deletedEntityIds;
length2 = deletedEntityIds.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding,
['Updating ' + length + ' and deleting ' + length2 + ' emojis for ' + guildId]);
binding = env0_0;
update = binding.update;
guildId = a0.guildId;
updatedEntities = a0.updatedEntities;
deletedEntityIds = a0.deletedEntityIds;
Reflect.apply(update, binding, [guildId, updatedEntities, deletedEntityIds, require]);
}
}
}
}
return _fun46378;
}
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 _fun46380() { // fn#46380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1077, offset: 0x011a6b47, size: 328 bytes, params: 1, frame: 16
const binding = env0_4;
const closure = GuildEmojis;
let env0_0 = env0_2(_fun46389);
return binding(closure, [{key: 'getAsync', value: value_46390}, {key: 'handleConnectionOpen', value: value_46391},
{key: 'handleGuildCreate', value: function(a0, a1) {
this.handleOneGuildCreate(a0.guild, a1);
}}, {key: 'handleGuildUpdate', value: function(a0, a1) {
this.replace(a0.guild.id, a0.guild.emojis, a1);
}}, {key: 'handleGuildDelete', value: function(a0, a1) {
this.delete(a0.guild.id, a1);
}}, {key: 'handleGuildEmojisUpdate', value: function(a0, a1) {
this.replace(a0.guildId, a0.emojis, a1);
}}, {key: 'handleBackgroundSync', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a1;
var promisesForBackgroundSyncToWaitOn = a0.promisesForBackgroundSyncToWaitOn;
var Promise = global.Promise;
promisesForBackgroundSyncToWaitOn.push(Promise.all(a0.emojis.map(_fun46398)));
}}, {key: 'handleOneGuildCreate', value: function(a0, a1) {
var property = a0.emojis.op;
if (property === 'full_sync') {
this.replace(a0.id, a0.emojis.items, a1);
} else if (property === 'update') {
this.update(a0.id, a0.emojis.writes, a0.emojis.deletes, a1);
} else {
a0.emojis;
function value_46401(a0, a1, a2) { // fn#46401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:3168, offset: 0x011a70ea, size: 59 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.emojisTransaction(a2);
value.replaceAll(a0, a1);
}
}}, {key: 'resetInMemoryState', value: function() {
}}, {key: 'replace', value: value_46401}, {key: 'delete', value: value_46402}, {key: 'update', value: value_46403}]);
}
function GuildEmojis() { // fn#46381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1098, offset: 0x011a6c8f, size: 101 bytes, params: 1, frame: 14
env1_3(this, GuildEmojis);
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46382, CONNECTION_OPEN: CONNECTION_OPEN_46383,
GUILD_CREATE: GUILD_CREATE_46384, GUILD_DELETE: GUILD_DELETE_46385,
GUILD_EMOJIS_UPDATE: GUILD_EMOJIS_UPDATE_46386, GUILD_UPDATE: GUILD_UPDATE_46387};
}
function value_46402(a0, a1) { // fn#46402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:3251, offset: 0x011a7125, size: 54 bytes, params: 3, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.emojisTransaction(a1);
value.delete(a0);
}
function* _fun46389(a0) { // fn#46389, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1500, offset: 0x011a6d18, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[4]).emojis(a0);
const getMapEntries = value5.getMapEntries;
yield Reflect.apply(getMapEntries, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_5;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding, ['asynchronously loaded in ' + value + 'ms (guilds: ' + value6.length + ')']);
}
return value6;
}
function value_46391(a0, a1) { // fn#46391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:1764, offset: 0x011a6dbf, size: 166 bytes, params: 3, frame: 18
var environment;
var r2;
var value4;
var value5;
let value = a0.guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, items2);
arraySpread(items2, a0.unavailableGuilds, value, items2);
value = environment.__proto__;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).emojisTransaction(a1).deleteAllExcept(items2);
value = _createForOfIteratorHelperLoose_46377(a0.guilds);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
this.handleOneGuildCreate(value4, a1);
value5 = value();
done = value5.done;
if (done) {
break;
function value_46403(a0, a1, a2, a3) { // fn#46403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:3326, offset: 0x011a715b, size: 114 bytes, params: 5, frame: 16
var r2;
var value4;
var value5;
let value = environment.__proto__;
const value2 = (DatabaseDaos).emojisTransaction(a3);
value2.putAll(a0, a1);
value = _createForOfIteratorHelperLoose_46377(a2);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
value2.delete(a0, value4);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
}
}
}
function value_46397({promisesForBackgroundSyncToWaitOn, emojis}, a1) { // fn#46397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:2370, offset: 0x011a6ed9, size: 79 bytes, params: 3, frame: 15
const env0_1 = a1;
const push = promisesForBackgroundSyncToWaitOn.push;
const Promise = global.Promise;
Reflect.apply(push, promisesForBackgroundSyncToWaitOn, [Promise.all(emojis.map(_fun46398))]);
}
function value_46401(a0, a1, a2) { // fn#46401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:3168, offset: 0x011a70ea, size: 59 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.emojisTransaction(a2);
value.replaceAll(a0, a1);
}
function value_46402(a0, a1) { // fn#46402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:3251, offset: 0x011a7125, size: 54 bytes, params: 3, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.emojisTransaction(a1);
value.delete(a0);
}
function value_46403(a0, a1, a2, a3) { // fn#46403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:3326, offset: 0x011a715b, size: 114 bytes, params: 5, frame: 16
var r2;
var value4;
var value5;
let value = environment.__proto__;
const value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).emojisTransaction(a3);
value2.putAll(a0, a1);
value = _createForOfIteratorHelperLoose_46377(a2);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
value2.delete(a0, value4);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
}
function _fun46398(a0) { // fn#46398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5410:2451, offset: 0x011a6f28, size: 324 bytes, params: 2, frame: 22
var updatedEntities;
var length;
var value;
var deletedEntityIds;
var binding;
var verbose;
var length2;
var guildId;
var update;
var entities;
var replace;
if (a0.dataMode === 'unavailable') {
return global.Promise.resolve();
}
if (a0.dataMode === 'full') {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
entities = a0.entities;
length = entities.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding, ['Replacing ' + length + ' emojis for ' + guildId]);
binding = env0_0;
replace = binding.replace;
guildId = a0.guildId;
entities = a0.entities;
Reflect.apply(replace, binding, [guildId, entities, require]);
} else {
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
value = length > 0;
if (value || a0.deletedEntityIds.length > 0) {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
deletedEntityIds = a0.deletedEntityIds;
length2 = deletedEntityIds.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding,
['Updating ' + length + ' and deleting ' + length2 + ' emojis for ' + guildId]);
binding = env0_0;
update = binding.update;
guildId = a0.guildId;
updatedEntities = a0.updatedEntities;
deletedEntityIds = a0.deletedEntityIds;
Reflect.apply(update, binding, [guildId, updatedEntities, deletedEntityIds, require]);
}
}
}
global.__d(_fun46376, 5232, [5, 6, 7, 3, 1910, 2]) /* metro module 5232, dependencies: [5, 6, 7, 3, 1910, 2] */;
@@ -1,4 +1,11 @@
/* Metro module 5236; source: modules/app_database/modules/GuildStickers.tsx; dependencies: [5, 6, 7, 3, 1910, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 DatabaseDaos from '../DatabaseDaos.tsx'; /* Metro dependency 1910 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46497(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:6, offset: 0x011a98ea, size: 228 bytes, params: 8, frame: 18
const _arrayLikeToArray_46500 = function(a0, a1) {
var r0;
@@ -45,257 +52,287 @@ function _fun46497(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('GuildStickers');
value = _fun46501();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/GuildStickers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/GuildStickers.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_46498(a0, a1) { // fn#46498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:131, offset: 0x011a99ce, size: 370 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)) {
function _createForOfIteratorHelperLoose_46498(a0, a1) { // fn#46498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:131, offset: 0x011a99ce, size: 370 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);
}
return _fun46499;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46500(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun46499;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46500(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_46500(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_46500(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun46499;
}
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 _fun46499() { // fn#46499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:702, 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 _fun46501() { // fn#46501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1079, offset: 0x011a9b40, size: 328 bytes, params: 1, frame: 16
const GuildStickers2 = GuildStickers;
let env0_0 = Module00005(_fun46510);
return CreateClass(GuildStickers2, [{key: 'getAsync', value: value_46511}, {key: 'handleConnectionOpen',
value: value_46512}, {key: 'handleGuildCreate', value: function(a0, a1) {
this.handleOneGuildCreate(a0.guild, a1);
}}, {key: 'handleGuildUpdate', value: function(a0, a1) {
this.replace(a0.guild.id, a0.guild.stickers, a1);
}}, {key: 'handleGuildDelete', value: function(a0, a1) {
this.delete(a0.guild.id, a1);
}}, {key: 'handleGuildStickersUpdate', value: function(a0, a1) {
this.replace(a0.guildId, a0.stickers, a1);
}}, {key: 'handleBackgroundSync', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a1;
var promisesForBackgroundSyncToWaitOn = a0.promisesForBackgroundSyncToWaitOn;
var Promise = global.Promise;
promisesForBackgroundSyncToWaitOn.push(Promise.all(a0.stickers.map(_fun46519)));
}}, {key: 'handleOneGuildCreate', value: function({id, stickers}, a1) {
var op = stickers.op;
if (op === 'full_sync') {
this.replace(id, stickers.items, a1);
} else if (op === 'update') {
this.update(id, stickers.writes, stickers.deletes, a1);
}
}}, {key: 'resetInMemoryState', value: function() {
}}, {key: 'replace', value: value_46522}, {key: 'delete', value: value_46523}, {key: 'update', value: value_46524}]);
function GuildStickers() { // fn#46502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1100, offset: 0x011a9c88, size: 101 bytes, params: 1, frame: 14
env1_3(this, GuildStickers);
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46503, CONNECTION_OPEN: CONNECTION_OPEN_46504,
GUILD_CREATE: GUILD_CREATE_46505, GUILD_DELETE: GUILD_DELETE_46506,
GUILD_STICKERS_UPDATE: GUILD_STICKERS_UPDATE, GUILD_UPDATE: GUILD_UPDATE_46508};
function GuildStickersBACKGROUND_SYNC(a0, a1) { // fn#46503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1177, owner: GuildStickers.BACKGROUND_SYNC, offset: 0x011a4d5a, size: 27 bytes, params: 3, frame: 13
return env0_0.handleBackgroundSync(a0, a1);
}
function GuildStickersCONNECTION_OPEN(a0, a1) { // fn#46504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1231, owner: GuildStickers.CONNECTION_OPEN, offset: 0x0114e0b5, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpen(a0, a1);
}
function GuildStickersGUILD_CREATE(a0, a1) { // fn#46505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1282, owner: GuildStickers.GUILD_CREATE, offset: 0x011a4e3b, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildCreate(a0, a1);
}
function GuildStickersGUILD_DELETE(a0, a1) { // fn#46506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1330, owner: GuildStickers.GUILD_DELETE, offset: 0x01146bf0, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildDelete(a0, a1);
}
function GuildStickersGUILD_STICKERS_UPDATE(a0, a1) { // fn#46507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1387, owner: GuildStickers.GUILD_STICKERS_UPDATE, offset: 0x011a9ced, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildStickersUpdate(a0, a1);
}
function GuildStickersGUILD_UPDATE(a0, a1) { // fn#46508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1443, owner: GuildStickers.GUILD_UPDATE, offset: 0x011a5a7a, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildUpdate(a0, a1);
}
}
function* _fun46510(a0) { // fn#46510, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1510, offset: 0x011a9d11, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[4]).stickers(a0);
const getMapEntries = value5.getMapEntries;
yield Reflect.apply(getMapEntries, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_5;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding, ['asynchronously loaded in ' + value + 'ms (guilds: ' + value6.length + ')']);
}
return value6;
}
function value_46511() { // fn#46511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1688, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_46512(a0, a1) { // fn#46512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1776, offset: 0x011a9db8, size: 166 bytes, params: 3, frame: 18
var environment;
var r2;
var value4;
var value5;
let value = a0.guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, items2);
arraySpread(items2, a0.unavailableGuilds, value, items2);
value = environment.__proto__;
(DatabaseDaos).stickersTransaction(a1).deleteAllExcept(items2);
value = _createForOfIteratorHelperLoose_46498(a0.guilds);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
this.handleOneGuildCreate(value4, a1);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
function value_46518({promisesForBackgroundSyncToWaitOn, stickers}, a1) { // fn#46518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:2390, offset: 0x011a9eb0, size: 79 bytes, params: 3, frame: 15
const env0_1 = a1;
const push = promisesForBackgroundSyncToWaitOn.push;
const Promise = global.Promise;
Reflect.apply(push, promisesForBackgroundSyncToWaitOn, [Promise.all(stickers.map(_fun46519))]);
function _fun46519(a0) { // fn#46519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:2473, offset: 0x011a9eff, size: 324 bytes, params: 2, frame: 22
var updatedEntities;
var length;
var value;
var deletedEntityIds;
var binding;
var verbose;
var length2;
var guildId;
var update;
var entities;
var replace;
if (a0.dataMode === 'unavailable') {
return global.Promise.resolve();
}
if (a0.dataMode === 'full') {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
entities = a0.entities;
length = entities.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding, ['Replacing ' + length + ' stickers for ' + guildId]);
binding = env0_0;
replace = binding.replace;
guildId = a0.guildId;
entities = a0.entities;
Reflect.apply(replace, binding, [guildId, entities, require]);
} else {
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
value = length > 0;
if (value || a0.deletedEntityIds.length > 0) {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
deletedEntityIds = a0.deletedEntityIds;
length2 = deletedEntityIds.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding,
['Updating ' + length + ' and deleting ' + length2 + ' stickers for ' + guildId]);
binding = env0_0;
update = binding.update;
guildId = a0.guildId;
updatedEntities = a0.updatedEntities;
deletedEntityIds = a0.deletedEntityIds;
Reflect.apply(update, binding, [guildId, updatedEntities, deletedEntityIds, require]);
}
}
}
}
return _fun46499;
}
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 _fun46501() { // fn#46501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1079, offset: 0x011a9b40, size: 328 bytes, params: 1, frame: 16
const binding = env0_4;
const closure = GuildStickers;
let env0_0 = env0_2(_fun46510);
return binding(closure, [{key: 'getAsync', value: value_46511}, {key: 'handleConnectionOpen', value: value_46512},
{key: 'handleGuildCreate', value: function(a0, a1) {
this.handleOneGuildCreate(a0.guild, a1);
}}, {key: 'handleGuildUpdate', value: function(a0, a1) {
this.replace(a0.guild.id, a0.guild.stickers, a1);
}}, {key: 'handleGuildDelete', value: function(a0, a1) {
this.delete(a0.guild.id, a1);
}}, {key: 'handleGuildStickersUpdate', value: function(a0, a1) {
this.replace(a0.guildId, a0.stickers, a1);
}}, {key: 'handleBackgroundSync', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a1;
var promisesForBackgroundSyncToWaitOn = a0.promisesForBackgroundSyncToWaitOn;
var Promise = global.Promise;
promisesForBackgroundSyncToWaitOn.push(Promise.all(a0.stickers.map(_fun46519)));
}}, {key: 'handleOneGuildCreate', value: function({id, stickers}, a1) {
var op = stickers.op;
if (op === 'full_sync') {
this.replace(id, stickers.items, a1);
} else if (op === 'update') {
this.update(id, stickers.writes, stickers.deletes, a1);
function value_46522(a0, a1, a2) { // fn#46522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:3153, offset: 0x011aa0a5, size: 59 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.stickersTransaction(a2);
value.replaceAll(a0, a1);
}
}}, {key: 'resetInMemoryState', value: function() {
}}, {key: 'replace', value: value_46522}, {key: 'delete', value: value_46523}, {key: 'update', value: value_46524}]);
}
function GuildStickers() { // fn#46502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1100, offset: 0x011a9c88, size: 101 bytes, params: 1, frame: 14
env1_3(this, GuildStickers);
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46503, CONNECTION_OPEN: CONNECTION_OPEN_46504,
GUILD_CREATE: GUILD_CREATE_46505, GUILD_DELETE: GUILD_DELETE_46506,
GUILD_STICKERS_UPDATE: GUILD_STICKERS_UPDATE_46507, GUILD_UPDATE: GUILD_UPDATE_46508};
}
function value_46523(a0, a1) { // fn#46523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:3238, offset: 0x011aa0e0, size: 54 bytes, params: 3, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.stickersTransaction(a1);
value.delete(a0);
}
function* _fun46510(a0) { // fn#46510, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1510, offset: 0x011a9d11, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[4]).stickers(a0);
const getMapEntries = value5.getMapEntries;
yield Reflect.apply(getMapEntries, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_5;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding, ['asynchronously loaded in ' + value + 'ms (guilds: ' + value6.length + ')']);
}
return value6;
}
function value_46512(a0, a1) { // fn#46512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:1776, offset: 0x011a9db8, size: 166 bytes, params: 3, frame: 18
var environment;
var r2;
var value4;
var value5;
let value = a0.guilds.map(function(a0) {
return a0.id;
});
const items2 = [];
value = arraySpread(items2, value, 0, items2);
arraySpread(items2, a0.unavailableGuilds, value, items2);
value = environment.__proto__;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).stickersTransaction(a1).deleteAllExcept(items2);
value = _createForOfIteratorHelperLoose_46498(a0.guilds);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
this.handleOneGuildCreate(value4, a1);
value5 = value();
done = value5.done;
if (done) {
break;
function value_46524(a0, a1, a2, a3) { // fn#46524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:3315, offset: 0x011aa116, size: 114 bytes, params: 5, frame: 16
var r2;
var value4;
var value5;
let value = environment.__proto__;
const value2 = (DatabaseDaos).stickersTransaction(a3);
value2.putAll(a0, a1);
value = _createForOfIteratorHelperLoose_46498(a2);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
value2.delete(a0, value4);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
}
}
}
function value_46518({promisesForBackgroundSyncToWaitOn, stickers}, a1) { // fn#46518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:2390, offset: 0x011a9eb0, size: 79 bytes, params: 3, frame: 15
const env0_1 = a1;
const push = promisesForBackgroundSyncToWaitOn.push;
const Promise = global.Promise;
Reflect.apply(push, promisesForBackgroundSyncToWaitOn, [Promise.all(stickers.map(_fun46519))]);
}
function value_46522(a0, a1, a2) { // fn#46522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:3153, offset: 0x011aa0a5, size: 59 bytes, params: 4, frame: 14
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.stickersTransaction(a2);
value.replaceAll(a0, a1);
}
function value_46523(a0, a1) { // fn#46523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:3238, offset: 0x011aa0e0, size: 54 bytes, params: 3, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.stickersTransaction(a1);
value.delete(a0);
}
function value_46524(a0, a1, a2, a3) { // fn#46524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:3315, offset: 0x011aa116, size: 114 bytes, params: 5, frame: 16
var r2;
var value4;
var value5;
let value = environment.__proto__;
const value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).stickersTransaction(a3);
value2.putAll(a0, a1);
value = _createForOfIteratorHelperLoose_46498(a2);
const value3 = value();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
value2.delete(a0, value4);
value5 = value();
done = value5.done;
if (done) {
break;
}
}
}
}
function _fun46519(a0) { // fn#46519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5414:2473, offset: 0x011a9eff, size: 324 bytes, params: 2, frame: 22
var updatedEntities;
var length;
var value;
var deletedEntityIds;
var binding;
var verbose;
var length2;
var guildId;
var update;
var entities;
var replace;
if (a0.dataMode === 'unavailable') {
return global.Promise.resolve();
}
if (a0.dataMode === 'full') {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
entities = a0.entities;
length = entities.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding, ['Replacing ' + length + ' stickers for ' + guildId]);
binding = env0_0;
replace = binding.replace;
guildId = a0.guildId;
entities = a0.entities;
Reflect.apply(replace, binding, [guildId, entities, require]);
} else {
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
value = length > 0;
if (value || a0.deletedEntityIds.length > 0) {
value = environment.__proto__.__proto__;
binding = env2_5;
verbose = binding.verbose;
updatedEntities = a0.updatedEntities;
length = updatedEntities.length;
deletedEntityIds = a0.deletedEntityIds;
length2 = deletedEntityIds.length;
guildId = a0.guildId;
Reflect.apply(verbose, binding,
['Updating ' + length + ' and deleting ' + length2 + ' stickers for ' + guildId]);
binding = env0_0;
update = binding.update;
guildId = a0.guildId;
updatedEntities = a0.updatedEntities;
deletedEntityIds = a0.deletedEntityIds;
Reflect.apply(update, binding, [guildId, updatedEntities, deletedEntityIds, require]);
}
}
}
global.__d(_fun46497, 5236, [5, 6, 7, 3, 1910, 2]) /* metro module 5236, dependencies: [5, 6, 7, 3, 1910, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,110 +1,129 @@
/* Metro module 5234; source: modules/app_database/modules/GuildsRequiringDeletedIdsSync.tsx; dependencies: [5, 6, 7, 1910, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46442(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:6, offset: 0x011a8003, size: 168 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
let value = _fun46443();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/GuildsRequiringDeletedIdsSync.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/GuildsRequiringDeletedIdsSync.tsx');
exports.default = value;
}
function _fun46443() { // fn#46443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:128, offset: 0x011a80ab, size: 192 bytes, params: 1, frame: 16
const GuildsRequiringDeletedIdsSync2 = GuildsRequiringDeletedIdsSync;
const env0_0 = Module00005(_fun46450);
return CreateClass(GuildsRequiringDeletedIdsSync2, [{key: 'getAll', value: value_46452}, {key: 'handleConnectionOpen',
value: value_46453}, {key: 'handleBackgroundSync', value: value_46456}, {key: 'handleGuildCreate',
value: value_46459}, {key: 'handleDeletedEntityIds', value: value_46460}, {key: 'resetInMemoryState',
value: function() {
}}]);
function GuildsRequiringDeletedIdsSync() { // fn#46444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:149, offset: 0x011a816b, size: 81 bytes, params: 1, frame: 14
env1_3(this, GuildsRequiringDeletedIdsSync);
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46445, CONNECTION_OPEN: CONNECTION_OPEN_46446,
GUILD_CREATE: GUILD_CREATE_46447, DELETED_ENTITY_IDS: DELETED_ENTITY_IDS};
function GuildsRequiringDeletedIdsSyncBACKGROUND_SYNC(a0, a1) { // fn#46445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:258, owner: GuildsRequiringDeletedIdsSync.BACKGROUND_SYNC, offset: 0x011a4d5a, size: 27 bytes, params: 3, frame: 13
return env0_0.handleBackgroundSync(a0, a1);
}
function _fun46443() { // fn#46443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:128, offset: 0x011a80ab, size: 192 bytes, params: 1, frame: 16
const binding = env0_4;
const closure = GuildsRequiringDeletedIdsSync;
const env0_0 = env0_2(_fun46450);
return binding(closure, [{key: 'getAll', value: value_46452}, {key: 'handleConnectionOpen', value: value_46453},
{key: 'handleBackgroundSync', value: value_46456}, {key: 'handleGuildCreate', value: value_46459},
{key: 'handleDeletedEntityIds', value: value_46460}, {key: 'resetInMemoryState', value: function() {
}}]);
}
function GuildsRequiringDeletedIdsSyncCONNECTION_OPEN(a0, a1) { // fn#46446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:312, owner: GuildsRequiringDeletedIdsSync.CONNECTION_OPEN, offset: 0x0114e0b5, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpen(a0, a1);
}
function GuildsRequiringDeletedIdsSync() { // fn#46444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:149, offset: 0x011a816b, size: 81 bytes, params: 1, frame: 14
env1_3(this, GuildsRequiringDeletedIdsSync);
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46445, CONNECTION_OPEN: CONNECTION_OPEN_46446,
GUILD_CREATE: GUILD_CREATE_46447, DELETED_ENTITY_IDS: DELETED_ENTITY_IDS};
}
function GuildsRequiringDeletedIdsSyncGUILD_CREATE(a0, a1) { // fn#46447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:363, owner: GuildsRequiringDeletedIdsSync.GUILD_CREATE, offset: 0x011a4e3b, size: 27 bytes, params: 3, frame: 13
return env0_0.handleGuildCreate(a0, a1);
}
function DELETED_ENTITY_IDS(a0, a1) { // fn#46448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:417, owner: GuildsRequiringDeletedIdsSync.DELETED_ENTITY_IDS, offset: 0x011a81bc, size: 29 bytes, params: 3, frame: 13
return env0_0.handleDeletedEntityIds(a0, a1);
}
}
function* _fun46450() { // fn#46450, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:487, offset: 0x011a81e2, size: 156 bytes, params: 1, frame: 13
var environment;
var Set;
var set;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_0(env2_1[3]);
value = value.guildsRequiringDeletedIdsSync();
if (value == null) {
Set = global.Set;
value = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
const getMany = value.getMany;
yield Reflect.apply(getMany, value, []);
if (false) {
return undefined;
}
Set = global.Set;
value = value.map(function(a0) {
return a0.id;
});
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set(value);
return set instanceof Object ? set : value4;
}
function value_46452() { // fn#46452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:631, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_46453({guilds}, a1) { // fn#46453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:717, offset: 0x011a827e, size: 106 bytes, params: 3, frame: 12
var environment;
var value2;
let value = guilds.filter(function(a0) {
return a0.unableToSyncDeletes;
});
value = value.map(function(a0) {
return {id: a0.id};
});
if (value.length > 0) {
value2 = environment.__proto__;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).guildsRequiringDeletedIdsSyncTransaction(a1).putAll(value);
}
}
function value_46456({guilds}, a1) { // fn#46456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:915, offset: 0x011a8303, size: 106 bytes, params: 3, frame: 12
var environment;
var value2;
let value = guilds.filter(function(a0) {
return a0.data_mode === 'partial' && a0.unable_to_sync_deletes;
});
value = value.map(function(a0) {
return {id: a0.id};
});
if (value.length > 0) {
value2 = environment.__proto__;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).guildsRequiringDeletedIdsSyncTransaction(a1).putAll(value);
}
}
function value_46459({guild}, a1) { // fn#46459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:1138, offset: 0x011a8389, size: 82 bytes, params: 3, frame: 12
var value;
if (guild.unableToSyncDeletes) {
value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.guildsRequiringDeletedIdsSyncTransaction(a1);
value.put({id: guild.id});
}
}
function value_46460({guild_id}, a1) { // fn#46460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:1288, offset: 0x011a83db, size: 59 bytes, params: 3, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.guildsRequiringDeletedIdsSyncTransaction(a1);
value.delete(guild_id);
}
function* _fun46450() { // fn#46450, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:487, offset: 0x011a81e2, size: 156 bytes, params: 1, frame: 13
var environment;
var Set;
var set;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_0(env2_1[3]);
value = value.guildsRequiringDeletedIdsSync();
if (value == null) {
Set = global.Set;
value = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
const getMany = value.getMany;
yield Reflect.apply(getMany, value, []);
if (false) {
return undefined;
}
Set = global.Set;
value = value.map(function(a0) {
return a0.id;
});
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set(value);
return set instanceof Object ? set : value4;
}
function value_46453({guilds}, a1) { // fn#46453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:717, offset: 0x011a827e, size: 106 bytes, params: 3, frame: 12
var environment;
var value2;
let value = guilds.filter(function(a0) {
return a0.unableToSyncDeletes;
});
value = value.map(function(a0) {
return {id: a0.id};
});
if (value.length > 0) {
value2 = environment.__proto__;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).guildsRequiringDeletedIdsSyncTransaction(a1).putAll(value);
}
}
function value_46456({guilds}, a1) { // fn#46456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:915, offset: 0x011a8303, size: 106 bytes, params: 3, frame: 12
var environment;
var value2;
let value = guilds.filter(function(a0) {
return a0.data_mode === 'partial' && a0.unable_to_sync_deletes;
});
value = value.map(function(a0) {
return {id: a0.id};
});
if (value.length > 0) {
value2 = environment.__proto__;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).guildsRequiringDeletedIdsSyncTransaction(a1).putAll(value);
}
}
function value_46459({guild}, a1) { // fn#46459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:1138, offset: 0x011a8389, size: 82 bytes, params: 3, frame: 12
var value;
if (guild.unableToSyncDeletes) {
value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.guildsRequiringDeletedIdsSyncTransaction(a1);
value.put({id: guild.id});
}
}
function value_46460({guild_id}, a1) { // fn#46460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:1288, offset: 0x011a83db, size: 59 bytes, params: 3, frame: 12
let value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.guildsRequiringDeletedIdsSyncTransaction(a1);
value.delete(guild_id);
}
function DELETED_ENTITY_IDS(a0, a1) { // fn#46448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5412:417, owner: GuildsRequiringDeletedIdsSync.DELETED_ENTITY_IDS, offset: 0x011a81bc, size: 29 bytes, params: 3, frame: 13
return env0_0.handleDeletedEntityIds(a0, a1);
}
global.__d(_fun46442, 5234, [5, 6, 7, 1910, 2]) /* metro module 5234, dependencies: [5, 6, 7, 1910, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 5238; source: modules/app_database/modules/KvCacheVersion.tsx; dependencies: [5, 6, 7, 476, 3, 1910, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 DatabaseDaos from '../DatabaseDaos.tsx'; /* Metro dependency 1910 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as KvCacheVersionConstantsModule from './KvCacheVersionConstants.tsx'; /* Metro dependency 476 */
function _fun46569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:6, offset: 0x011aaea8, size: 272 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
let value = require(476) /* metro dependency 476: KvCacheVersionConstants */;
let value = KvCacheVersionConstantsModule;
const env0_5 = value.HELLO_KEY;
const env0_6 = value.VERSION_TO_FORCE_RESYNCING_ALL_DATA;
const env0_7 = value.VERSION_TO_FORCE_RESYNCING_ALL_DATA_KEY;
@@ -15,97 +19,113 @@ function _fun46569(global, require, importDefault, importAll, module, exports, d
value = new value('KvCacheVersion');
value = _fun46570();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/KvCacheVersion.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/KvCacheVersion.tsx');
exports.default = value;
}
function _fun46570() { // fn#46570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:355, offset: 0x011aafb8, size: 227 bytes, params: 1, frame: 17
const KvCacheVersion2 = KvCacheVersion;
const env0_1 = Module00005(_fun46576);
const items2 = [{key: 'okAsync', value: value_46577}];
items2[1] = {key: 'canUseGuildVersions', value: function() {
return this.hasSuccessfullyConnected ? global.Promise.resolve(true) : this.doesDatabaseVersionMatchJsConstants();
}};
const env0_0 = Module00005(_fun46580);
items2[2] = {key: 'doesDatabaseVersionMatchJsConstants', value: value_46581};
items2[3] = {key: 'handleClear', value: function() {
this.hasSuccessfullyConnected = false;
}};
items2[4] = {key: 'handleConnectionOpen', value: function() {
this.hasSuccessfullyConnected = true;
}};
items2[5] = {key: 'handleWrite', value: value_46584};
items2[6] = {key: 'resetInMemoryState', value: function() {
this.hasSuccessfullyConnected = false;
}};
return CreateClass(KvCacheVersion2, items2);
function KvCacheVersion() { // fn#46571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:376, offset: 0x011ab09b, size: 79 bytes, params: 1, frame: 14
env1_3(this, KvCacheVersion);
this.hasSuccessfullyConnected = false;
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46572, CONNECTION_OPEN: CONNECTION_OPEN_46573,
WRITE_CACHES: WRITE_CACHES_46574};
function KvCacheVersionBACKGROUND_SYNC(a0, a1) { // fn#46572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:488, owner: KvCacheVersion.BACKGROUND_SYNC, offset: 0x011ab0ea, size: 23 bytes, params: 3, frame: 11
return env0_0.handleWrite(a1);
}
function _fun46570() { // fn#46570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:355, offset: 0x011aafb8, size: 227 bytes, params: 1, frame: 17
const binding = env0_4;
const closure = KvCacheVersion;
const binding2 = env0_2;
const env0_1 = binding2(_fun46576);
const items2 = [{key: 'okAsync', value: value_46577}];
items2[1] = {key: 'canUseGuildVersions', value: function() {
return this.hasSuccessfullyConnected ? global.Promise.resolve(true) : this.doesDatabaseVersionMatchJsConstants();
}};
const env0_0 = binding2(_fun46580);
items2[2] = {key: 'doesDatabaseVersionMatchJsConstants', value: value_46581};
items2[3] = {key: 'handleClear', value: function() {
this.hasSuccessfullyConnected = false;
}};
items2[4] = {key: 'handleConnectionOpen', value: function() {
this.hasSuccessfullyConnected = true;
}};
items2[5] = {key: 'handleWrite', value: value_46584};
items2[6] = {key: 'resetInMemoryState', value: function() {
this.hasSuccessfullyConnected = false;
}};
return binding(closure, items2);
}
function KvCacheVersionCONNECTION_OPEN() { // fn#46573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:531, owner: KvCacheVersion.CONNECTION_OPEN, offset: 0x00eed68e, size: 19 bytes, params: 1, frame: 9
return env0_0.handleConnectionOpen();
}
function KvCacheVersion() { // fn#46571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:376, offset: 0x011ab09b, size: 79 bytes, params: 1, frame: 14
env1_3(this, KvCacheVersion);
this.hasSuccessfullyConnected = false;
this.actions = {BACKGROUND_SYNC: BACKGROUND_SYNC_46572, CONNECTION_OPEN: CONNECTION_OPEN_46573,
WRITE_CACHES: WRITE_CACHES_46574};
}
function KvCacheVersionWRITE_CACHES(a0, a1) { // fn#46574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:576, owner: KvCacheVersion.WRITE_CACHES, offset: 0x011ab0ea, size: 23 bytes, params: 3, frame: 11
return env0_0.handleWrite(a1);
}
}
function* _fun46576(a0) { // fn#46576, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:634, offset: 0x011ab10a, size: 96 bytes, params: 2, frame: 13
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value4 = env2_0(env2_1[5]).cache(a0);
const get = value4.get;
yield Reflect.apply(get, value4, [env2_9]);
const value5 = undefined;
if (false) {
return value5;
}
const value7 = null;
return value7 == value5 ? value7 : value5 === env2_8;
}
function value_46577() { // fn#46577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:712, offset: 0x00c3b2ba, size: 30 bytes, params: 1, frame: 13
return env0_1.apply(this, arguments);
}
function* _fun46580() { // fn#46580, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:966, offset: 0x011ab1a1, size: 168 bytes, params: 1, frame: 20
var r2;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const value3 = undefined;
const value5 = binding(env2_1[5]).forceResyncVersion();
if (value5 == null) {
return false;
}
const get = value5.get;
yield Reflect.apply(get, value5, [env2_7]);
const value6 = undefined;
if (false) {
return value6;
}
const version = value6 == null ? value3 : value6.version;
const value8 = version === env2_6;
if (value8) {
r2 = value8;
} else {
binding = env2_10;
binding.info('KVStore version mismatch: ' + version + ' vs ' + env2_6);
r2 = false;
}
return r2;
}
function value_46581() { // fn#46581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:1152, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_46584(a0) { // fn#46584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:1409, offset: 0x011ab267, size: 161 bytes, params: 2, frame: 19
this.hasSuccessfullyConnected = true;
(DatabaseDaos).cacheTransaction(a0).put(HELLO_KEY, '👋');
(DatabaseDaos).cacheTransaction(a0).put(VERSION_TO_SKIP_READING_THE_DATABASE_KEY,
VERSION_TO_SKIP_READING_THE_DATABASE);
(DatabaseDaos).forceResyncVersionTransaction(a0).put(VERSION_TO_FORCE_RESYNCING_ALL_DATA_KEY,
{version: VERSION_TO_FORCE_RESYNCING_ALL_DATA});
}
function* _fun46576(a0) { // fn#46576, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:634, offset: 0x011ab10a, size: 96 bytes, params: 2, frame: 13
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value4 = env2_0(env2_1[5]).cache(a0);
const get = value4.get;
yield Reflect.apply(get, value4, [env2_9]);
const value5 = undefined;
if (false) {
return value5;
}
const value7 = null;
return value7 == value5 ? value7 : value5 === env2_8;
}
function* _fun46580() { // fn#46580, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:966, offset: 0x011ab1a1, size: 168 bytes, params: 1, frame: 20
var r2;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const value3 = undefined;
const value5 = binding(env2_1[5]).forceResyncVersion();
if (value5 == null) {
return false;
}
const get = value5.get;
yield Reflect.apply(get, value5, [env2_7]);
const value6 = undefined;
if (false) {
return value6;
}
const version = value6 == null ? value3 : value6.version;
const value8 = version === env2_6;
if (value8) {
r2 = value8;
} else {
binding = env2_10;
binding.info('KVStore version mismatch: ' + version + ' vs ' + env2_6);
r2 = false;
}
return r2;
}
function value_46584(a0) { // fn#46584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:1409, offset: 0x011ab267, size: 161 bytes, params: 2, frame: 19
this.hasSuccessfullyConnected = true;
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).cacheTransaction(a0).put(HELLO_KEY, '👋');
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).cacheTransaction(a0).put(VERSION_TO_SKIP_READING_THE_DATABASE_KEY,
VERSION_TO_SKIP_READING_THE_DATABASE);
(importDefault(1910) /* metro dependency 1910: DatabaseDaos */).forceResyncVersionTransaction(a0).put(VERSION_TO_FORCE_RESYNCING_ALL_DATA_KEY,
{version: VERSION_TO_FORCE_RESYNCING_ALL_DATA});
}
function KvCacheVersionBACKGROUND_SYNC(a0, a1) { // fn#46572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5416:488, owner: KvCacheVersion.BACKGROUND_SYNC, offset: 0x011ab0ea, size: 23 bytes, params: 3, frame: 11
return env0_0.handleWrite(a1);
}
global.__d(_fun46569, 5238, [5, 6, 7, 476, 3, 1910,
2]) /* metro module 5238, dependencies: [5, 6, 7, 476, 3, 1910, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 476; source: modules/app_database/modules/KvCacheVersionConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun6163(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#6163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:517:6, offset: 0x00cef34c, size: 127 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/KvCacheVersionConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/KvCacheVersionConstants.tsx');
exports.HELLO_KEY = 'hello';
exports.VERSION_TO_SKIP_READING_THE_DATABASE_KEY = 'version';
exports.VERSION_TO_FORCE_RESYNCING_ALL_DATA_KEY = 'force-resync-version';
@@ -10,3 +12,4 @@ function _fun6163(global, require, importDefault, importAll, module, exports, de
exports.VERSION_TO_FORCE_RESYNCING_ALL_DATA = 'stable-298';
}
global.__d(_fun6163, 476, [2]) /* metro module 476, dependencies: [2] */;
@@ -1,45 +1,52 @@
/* Metro module 5239; source: modules/app_database/modules/LowDiskTrim.tsx; dependencies: [6, 7, 4888, 1910, 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 FileSystemStore from '../stores/FileSystemStore.tsx'; /* Metro dependency 4888 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46586(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:6, offset: 0x011ab308, size: 168 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const fileSystemStore = importDefault(4888) /* metro dependency 4888: FileSystemStore */;
let value = _fun46587();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/LowDiskTrim.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/LowDiskTrim.tsx');
exports.default = value;
}
function _fun46587() { // fn#46587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:132, offset: 0x011ab3b0, size: 103 bytes, params: 1, frame: 15
return CreateClass(LowDiskTrim, [{key: 'handlePostConnectionOpen', value: function() {
this.isLowDisk = false;
this.handleFileSystemStoreChanged();
}}, {key: 'handleFileSystemStoreChanged', value: value_46592}, {key: 'resetInMemoryState', value: function() {
}}]);
function LowDiskTrim() { // fn#46588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:153, offset: 0x011ab417, size: 79 bytes, params: 1, frame: 15
env1_2(this, LowDiskTrim);
this.isLowDisk = false;
this.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_46589};
FileSystemStore.addChangeListener(_fun46590);
function LowDiskTrimPOST_CONNECTION_OPEN() { // fn#46589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:249, owner: LowDiskTrim.POST_CONNECTION_OPEN, offset: 0x01148776, size: 19 bytes, params: 1, frame: 9
return env0_0.handlePostConnectionOpen();
}
function _fun46587() { // fn#46587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:132, offset: 0x011ab3b0, size: 103 bytes, params: 1, frame: 15
return env0_3(LowDiskTrim, [{key: 'handlePostConnectionOpen', value: function() {
this.isLowDisk = false;
this.handleFileSystemStoreChanged();
}}, {key: 'handleFileSystemStoreChanged', value: value_46592}, {key: 'resetInMemoryState', value: function() {
}}]);
}
function _fun46590() { // fn#46590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:307, offset: 0x011ab466, size: 19 bytes, params: 1, frame: 9
return env0_0.handleFileSystemStoreChanged();
}
function LowDiskTrim() { // fn#46588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:153, offset: 0x011ab417, size: 79 bytes, params: 1, frame: 15
env1_2(this, LowDiskTrim);
this.isLowDisk = false;
this.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_46589};
FileSystemStore.addChangeListener(_fun46590);
}
function value_46592() { // fn#46592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:499, offset: 0x011ab492, size: 93 bytes, params: 1, frame: 13
let value = environment.__proto__;
const isLowDisk = FileSystemStore.isLowDisk;
if (isLowDisk && this.isLowDisk !== isLowDisk) {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.database();
if (value != null) {
value.incrementalVacuum();
}
function value_46592() { // fn#46592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:499, offset: 0x011ab492, size: 93 bytes, params: 1, frame: 13
let value = environment.__proto__;
const isLowDisk = FileSystemStore.isLowDisk;
if (isLowDisk && this.isLowDisk !== isLowDisk) {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.database();
if (value != null) {
value.incrementalVacuum();
}
}
this.isLowDisk = isLowDisk;
}
}
this.isLowDisk = isLowDisk;
}
function _fun46590() { // fn#46590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5417:307, offset: 0x011ab466, size: 19 bytes, params: 1, frame: 9
return env0_0.handleFileSystemStoreChanged();
}
global.__d(_fun46586, 5239, [6, 7, 4888, 1910, 2]) /* metro module 5239, dependencies: [6, 7, 4888, 1910, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,257 +1,275 @@
/* Metro module 5240; source: modules/app_database/modules/NonGuildVersions.tsx; dependencies: [5, 6, 7, 3969, 3, 5231, 22, 1910, 672, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 SelectedGuildStore from '../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IsCacheEnabledNativeModule from '../../cache/isCacheEnabled.native.tsx'; /* Metro dependency 5231 */
function _fun46594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:6, offset: 0x011ab4ef, size: 238 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('NonGuildVersions');
value = _fun46595();
const value4 = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/NonGuildVersions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/NonGuildVersions.tsx');
exports.default = value4;
exports.NonGuildVersions = value;
}
function _fun46595() { // fn#46595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:175, offset: 0x011ab5dd, size: 121 bytes, params: 1, frame: 16
const NonGuildVersions2 = NonGuildVersions;
const env0_0 = Module00005(_fun46602);
return CreateClass(NonGuildVersions2, [{key: 'getCommittedVersions', value: value_46604}, {key: 'handleConnectionOpen',
value: value_46605}, {key: 'resetInMemoryState', value: function() {
}}]);
function NonGuildVersions() { // fn#46596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:196, offset: 0x011ab656, size: 177 bytes, params: 1, frame: 18
var environment;
var selectedGuildStoreBinding;
var addChangeListener;
let value = environment.__proto__;
env1_4(this, NonGuildVersions);
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_46597, BACKGROUND_SYNC: BACKGROUND_SYNC_46598};
if (IsCacheEnabledNativeModule.isCacheEnabled()) {
selectedGuildStoreBinding = SelectedGuildStore;
addChangeListener = selectedGuildStoreBinding.addChangeListener;
value = importDefault(22) /* metro dependency 22 */;
Reflect.apply(addChangeListener, selectedGuildStoreBinding, [value.throttle(_fun46599,
10 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND)]);
}
function NonGuildVersionsCONNECTION_OPEN(a0, a1) { // fn#46597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:279, owner: NonGuildVersions.CONNECTION_OPEN, offset: 0x0114e0b5, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpen(a0, a1);
}
function _fun46595() { // fn#46595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:175, offset: 0x011ab5dd, size: 121 bytes, params: 1, frame: 16
const binding = env0_5;
const closure = NonGuildVersions;
const env0_0 = env0_3(_fun46602);
return binding(closure, [{key: 'getCommittedVersions', value: value_46604}, {key: 'handleConnectionOpen',
value: value_46605}, {key: 'resetInMemoryState', value: function() {
}}]);
}
function NonGuildVersionsBACKGROUND_SYNC(a0, a1) { // fn#46598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:333, owner: NonGuildVersions.BACKGROUND_SYNC, offset: 0x0114e0b5, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpen(a0, a1);
}
function NonGuildVersions() { // fn#46596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:196, offset: 0x011ab656, size: 177 bytes, params: 1, frame: 18
var environment;
var addChangeListener;
let value = environment.__proto__;
env1_4(this, NonGuildVersions);
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_46597, BACKGROUND_SYNC: BACKGROUND_SYNC_46598};
const isCacheEnabledNativeModule = require(5231) /* metro dependency 5231: isCacheEnabledNative */;
if (isCacheEnabledNativeModule.isCacheEnabled()) {
addChangeListener = SelectedGuildStore.addChangeListener;
value = importDefault(22) /* metro dependency 22 */;
Reflect.apply(addChangeListener, SelectedGuildStore, [value.throttle(_fun46599,
10 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND)]);
}
}
function _fun46599() { // fn#46599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:436, offset: 0x011ab707, size: 61 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.database();
if (value != null) {
value.transaction(_fun46600);
}
function _fun46600(a0) { // fn#46600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:492, offset: 0x011ab744, size: 165 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__.__proto__;
const guildId = SelectedGuildStore.getGuildId();
if (guildId == null) {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.delete('initial_guild_id');
} else if (global.isNaN(global.Number(guildId))) {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.delete('initial_guild_id');
} else {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.put({id: 'initial_guild_id', versionString: guildId});
}
}
}
function* _fun46602() { // fn#46602, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:768, offset: 0x011ab7f2, size: 178 bytes, params: 1, frame: 16
var environment;
var r2;
var binding;
var binding2;
var property;
var value3;
var nonGuildVersions;
var value4;
var value5;
var getMany;
var value6;
var value7;
var value8;
var map;
var closure;
var value9;
var Object;
var fromEntries;
var value10;
var items2;
var value11;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
property = binding2[7];
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
nonGuildVersions = value3.nonGuildVersions;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value4 = Reflect.apply(nonGuildVersions, value3, []);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value5 = value4 == null;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
if (value5) {
return {};
}
try {
getMany = value4.getMany;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value6 = Reflect.apply(getMany, value4, []);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
if (value8) {
return value7;
}
try {
map = value7.map;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
closure = function(a0) {
return [a0.id, 'version' in a0 ? a0.version : a0.versionString];
};
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value9 = Reflect.apply(map, value7, [closure]);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
Object = global.Object;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
fromEntries = Object.fromEntries;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value10 = value9 != null;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
if (value10) {
r2 = value9;
} else {
try {
items2 = [];
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
r2 = items2;
}
try {
value11 = Reflect.apply(fromEntries, Object, [r2]);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
return value11;
}
function value_46605(a0, a1) { // fn#46605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:1124, offset: 0x011ab8d3, size: 90 bytes, params: 3, frame: 13
var value;
if (a0.apiCodeVersion != null) {
value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a1);
value.put({id: 'api_code_version', version: a0.apiCodeVersion});
}
}
function* _fun46602() { // fn#46602, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:768, offset: 0x011ab7f2, size: 178 bytes, params: 1, frame: 16
var environment;
var r2;
var binding;
var binding2;
var property;
var value3;
var nonGuildVersions;
var value4;
var value5;
var getMany;
var value6;
var value7;
var value8;
var map;
var closure;
var value9;
var Object;
var fromEntries;
var value10;
var items2;
var value11;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
property = binding2[7];
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
nonGuildVersions = value3.nonGuildVersions;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value4 = Reflect.apply(nonGuildVersions, value3, []);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value5 = value4 == null;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
if (value5) {
return {};
}
try {
getMany = value4.getMany;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value6 = Reflect.apply(getMany, value4, []);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
if (value8) {
return value7;
}
try {
map = value7.map;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
closure = function(a0) {
return [a0.id, 'version' in a0 ? a0.version : a0.versionString];
};
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value9 = Reflect.apply(map, value7, [closure]);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
Object = global.Object;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
fromEntries = Object.fromEntries;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
try {
value10 = value9 != null;
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
if (value10) {
r2 = value9;
} else {
try {
items2 = [];
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
r2 = items2;
}
try {
value11 = Reflect.apply(fromEntries, Object, [r2]);
} catch (error) {
binding = env2_7;
binding.warn("couldn't load guild versions", error);
return {};
}
return value11;
}
function _fun46599() { // fn#46599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:436, offset: 0x011ab707, size: 61 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.database();
if (value != null) {
value.transaction(_fun46600);
}
}
function value_46604() { // fn#46604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:1024, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_46605(a0, a1) { // fn#46605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:1124, offset: 0x011ab8d3, size: 90 bytes, params: 3, frame: 13
var value;
if (a0.apiCodeVersion != null) {
value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a1);
value.put({id: 'api_code_version', version: a0.apiCodeVersion});
}
}
function _fun46600(a0) { // fn#46600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5418:492, offset: 0x011ab744, size: 165 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__.__proto__;
const guildId = SelectedGuildStore.getGuildId();
if (guildId == null) {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.delete('initial_guild_id');
} else if (global.isNaN(global.Number(guildId))) {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.delete('initial_guild_id');
} else {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.put({id: 'initial_guild_id', versionString: guildId});
}
}
global.__d(_fun46594, 5240, [5, 6, 7, 3969, 3, 5231, 22, 1910, 672,
2]) /* metro module 5240, dependencies: [5, 6, 7, 3969, 3, 5231, 22, 1910, 672, 2] */;
@@ -1,4 +1,12 @@
/* Metro module 4902; source: modules/app_database/modules/ReadStates.tsx; dependencies: [5, 6, 7, 1379, 4605, 3, 1910, 22, 21, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ReadStateStore from '../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43219(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:6, offset: 0x0114d5bf, size: 260 bytes, params: 8, frame: 18
const _arrayLikeToArray_43222 = function(a0, a1) {
var r0;
@@ -45,274 +53,291 @@ function _fun43219(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('ReadStates');
value = _fun43223();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/ReadStates.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/ReadStates.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_43220(a0, a1) { // fn#43220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:150, offset: 0x0114d6c3, size: 370 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)) {
function _createForOfIteratorHelperLoose_43220(a0, a1) { // fn#43220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:150, offset: 0x0114d6c3, size: 370 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);
}
return _fun43221;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43222(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun43221;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43222(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_43222(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_43222(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun43221;
}
return _fun43221;
}
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 _fun43223() { // fn#43223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1095, offset: 0x0114d835, size: 167 bytes, params: 1, frame: 16
const binding = env0_4;
const closure = ReadStates;
const env0_0 = env0_2(_fun43231);
return binding(closure, [{key: 'getAll', value: value_43232}, {key: 'resetInMemoryState', value: function() {
this.readStateVersion = null;
}}, {key: 'handleConnectionOpen', value: function(a0) {
this.readStateVersion = a0.readState.version;
}}, {key: 'handleReadStateAction', value: value_43235}, {key: 'handleWriteCaches', value: value_43236}]);
}
function ReadStates() { // fn#43224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1116, offset: 0x0114d8dc, size: 101 bytes, params: 1, frame: 14
env1_3(this, ReadStates);
this.readStateVersion = null;
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_43225, CHANNEL_PINS_ACK: CHANNEL_PINS_ACK_43226,
MESSAGE_ACK: MESSAGE_ACK_43227, BACKGROUND_SYNC_FINISHED: BACKGROUND_SYNC_FINISHED,
WRITE_CACHES: WRITE_CACHES_43229};
}
function* _fun43231(a0) { // fn#43231, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1499, offset: 0x0114d9a3, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[6]).readStates(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_7;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding, ['asynchronously loaded in ' + value + 'ms (readStates: ' + value6.length + ')']);
}
return value6;
}
function value_43235(a0) { // fn#43235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1926, offset: 0x0114da75, size: 71 bytes, params: 2, frame: 14
var value;
if (this.readStateVersion != null) {
if (a0.version != null) {
this.readStateVersion = a0.version;
} else {
value = environment.__proto__;
env1_7.log('Received null read states version', a0);
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 _fun43221() { // fn#43221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:721, 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 value_43236(a0, a1) { // fn#43236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:2095, offset: 0x0114dabc, size: 607 bytes, params: 3, frame: 33
var environment;
var r9;
var r6;
var r10;
var r11;
var r19;
var r21;
var r4;
var r17;
var r18;
var r2;
var readStateVersion;
var Object;
var value3;
var set;
var value6;
var sort;
var compare;
var property;
var value11;
var value12;
var value13;
var done;
var value14;
var _lastMessageId;
var defaultImport;
var has;
var channelId;
var value15;
var defaultImport2;
var value16;
var value17;
var value18;
var putAll;
let value = environment.__proto__;
const allReadStates = ReadStateStore.getAllReadStates(false);
if (a1) {
readStateVersion = this.readStateVersion;
if (readStateVersion == null) {
return undefined;
}
function _fun43223() { // fn#43223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1095, offset: 0x0114d835, size: 167 bytes, params: 1, frame: 16
const ReadStates2 = ReadStates;
const env0_0 = Module00005(_fun43231);
return CreateClass(ReadStates2, [{key: 'getAll', value: value_43232}, {key: 'resetInMemoryState', value: function() {
this.readStateVersion = null;
}}, {key: 'handleConnectionOpen', value: function(a0) {
this.readStateVersion = a0.readState.version;
}}, {key: 'handleReadStateAction', value: value_43235}, {key: 'handleWriteCaches', value: value_43236}]);
function ReadStates() { // fn#43224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1116, offset: 0x0114d8dc, size: 101 bytes, params: 1, frame: 14
env1_3(this, ReadStates);
this.readStateVersion = null;
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_43225, CHANNEL_PINS_ACK: CHANNEL_PINS_ACK_43226,
MESSAGE_ACK: MESSAGE_ACK_43227, BACKGROUND_SYNC_FINISHED: BACKGROUND_SYNC_FINISHED,
WRITE_CACHES: WRITE_CACHES_43229};
function ReadStatesCONNECTION_OPEN(a0) { // fn#43225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1214, owner: ReadStates.CONNECTION_OPEN, offset: 0x00def9e8, size: 23 bytes, params: 2, frame: 11
return env0_0.handleConnectionOpen(a0);
}
function ReadStatesCHANNEL_PINS_ACK(a0) { // fn#43226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1263, owner: ReadStates.CHANNEL_PINS_ACK, offset: 0x0114d941, size: 23 bytes, params: 2, frame: 11
return env0_0.handleReadStateAction(a0);
}
function ReadStatesMESSAGE_ACK(a0) { // fn#43227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1308, owner: ReadStates.MESSAGE_ACK, offset: 0x0114d941, size: 23 bytes, params: 2, frame: 11
return env0_0.handleReadStateAction(a0);
}
function BACKGROUND_SYNC_FINISHED(a0, a1) { // fn#43228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1366, owner: ReadStates.BACKGROUND_SYNC_FINISHED, offset: 0x0114d958, size: 40 bytes, params: 3, frame: 13
if (!a0.messagesOnly) {
env0_0.handleWriteCaches(a1, false);
}
}
function ReadStatesWRITE_CACHES(a0, a1) { // fn#43229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1433, owner: ReadStates.WRITE_CACHES, offset: 0x0114d980, size: 26 bytes, params: 3, frame: 13
return env0_0.handleWriteCaches(a1, true);
}
}
Object = global.Object;
value3 = Object.keys(ChannelStore.getMutablePrivateChannels());
set = new global.Set();
value6 = (importDefault(22) /* metro dependency 22 */)(value3);
sort = value6.sort;
compare = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare;
property = Reflect.apply(sort, value6, [compare]).reverse().value()[0];
value11 = '0';
r9 = property ?? value11;
value12 = _createForOfIteratorHelperLoose_43220(allReadStates);
value13 = value12();
done = value13.done;
if (done) {
r2 = value11;
} else {
r6 = value13;
r10 = r9;
r11 = value11;
while (true) {
value14 = r6.value;
_lastMessageId = value14._lastMessageId;
if (_lastMessageId == null) {
r17 = r10;
r18 = r11;
function* _fun43231(a0) { // fn#43231, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1499, offset: 0x0114d9a3, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[6]).readStates(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_7;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding, ['asynchronously loaded in ' + value + 'ms (readStates: ' + value6.length + ')']);
}
return value6;
}
function value_43232() { // fn#43232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1677, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_43235(a0) { // fn#43235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1926, offset: 0x0114da75, size: 71 bytes, params: 2, frame: 14
var value;
if (this.readStateVersion != null) {
if (a0.version != null) {
this.readStateVersion = a0.version;
} else {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = defaultImport.compare;
_lastMessageId = value14._lastMessageId;
if (Reflect.apply(compare, defaultImport, [_lastMessageId, r11]) !== 1) {
r19 = r11;
continue;
}
_lastMessageId = value14._lastMessageId;
r19 = _lastMessageId;
has = set.has;
channelId = value14.channelId;
value15 = Reflect.apply(has, set, [channelId]);
if (!value15) {
r21 = value15;
continue;
}
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = defaultImport2.compare;
_lastMessageId = value14._lastMessageId;
value16 = Reflect.apply(compare, defaultImport2, [_lastMessageId, r10]) === 1;
r21 = value16;
if (!r21) {
r4 = r10;
continue;
}
_lastMessageId = value14._lastMessageId;
r4 = _lastMessageId;
r17 = r4;
r18 = r19;
value = environment.__proto__;
env1_7.log('Received null read states version', a0);
}
value17 = value12();
done = value17.done;
if (done) {
r2 = r18;
r9 = r17;
break;
}
r6 = value17;
r10 = r17;
r11 = r18;
continue;
}
}
value18 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).nonGuildVersionsTransaction(a0);
putAll = value18.putAll;
readStateVersion = this.readStateVersion;
Reflect.apply(putAll, value18, [[{id: 'highest_last_message_id', versionString: r2},
{id: 'private_channels_version', versionString: r9}, {id: 'read_state_version',
version: readStateVersion}]]);
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.readStatesTransaction(a0);
value.delete();
allReadStates.forEach(_fun43237);
} else {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.readStatesTransaction(a0);
value.delete();
allReadStates.forEach(_fun43237);
function value_43236(a0, a1) { // fn#43236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:2095, offset: 0x0114dabc, size: 607 bytes, params: 3, frame: 33
var environment;
var r9;
var r6;
var r10;
var r11;
var r19;
var r21;
var r4;
var r17;
var r18;
var r2;
var readStateVersion;
var Object;
var keys;
var channelStoreBinding;
var value3;
var set;
var value6;
var sort;
var compare;
var property;
var value11;
var value12;
var value13;
var done;
var value14;
var _lastMessageId;
var defaultImport;
var has;
var channelId;
var value15;
var defaultImport2;
var value16;
var value17;
var value18;
var putAll;
let value = environment.__proto__;
const allReadStates = ReadStateStore.getAllReadStates(false);
if (a1) {
readStateVersion = this.readStateVersion;
if (readStateVersion == null) {
return undefined;
}
Object = global.Object;
keys = Object.keys;
channelStoreBinding = ChannelStore;
value3 = Reflect.apply(keys, Object, [channelStoreBinding.getMutablePrivateChannels()]);
set = new global.Set();
value6 = (importDefault(22) /* metro dependency 22 */)(value3);
sort = value6.sort;
compare = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare;
property = Reflect.apply(sort, value6, [compare]).reverse().value()[0];
value11 = '0';
r9 = property ?? value11;
value12 = _createForOfIteratorHelperLoose_43220(allReadStates);
value13 = value12();
done = value13.done;
if (done) {
r2 = value11;
} else {
r6 = value13;
r10 = r9;
r11 = value11;
while (true) {
value14 = r6.value;
_lastMessageId = value14._lastMessageId;
if (_lastMessageId == null) {
r17 = r10;
r18 = r11;
} else {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = defaultImport.compare;
_lastMessageId = value14._lastMessageId;
if (Reflect.apply(compare, defaultImport, [_lastMessageId, r11]) !== 1) {
r19 = r11;
continue;
}
_lastMessageId = value14._lastMessageId;
r19 = _lastMessageId;
has = set.has;
channelId = value14.channelId;
value15 = Reflect.apply(has, set, [channelId]);
if (!value15) {
r21 = value15;
continue;
}
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = defaultImport2.compare;
_lastMessageId = value14._lastMessageId;
value16 = Reflect.apply(compare, defaultImport2, [_lastMessageId, r10]) === 1;
r21 = value16;
if (!r21) {
r4 = r10;
continue;
}
_lastMessageId = value14._lastMessageId;
r4 = _lastMessageId;
r17 = r4;
r18 = r19;
}
value17 = value12();
done = value17.done;
if (done) {
r2 = r18;
r9 = r17;
break;
}
r6 = value17;
r10 = r17;
r11 = r18;
continue;
}
}
value18 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).nonGuildVersionsTransaction(a0);
putAll = value18.putAll;
readStateVersion = this.readStateVersion;
Reflect.apply(putAll, value18, [[{id: 'highest_last_message_id', versionString: r2},
{id: 'private_channels_version', versionString: r9}, {id: 'read_state_version',
version: readStateVersion}]]);
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.readStatesTransaction(a0);
value.delete();
allReadStates.forEach(_fun43237);
} else {
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.readStatesTransaction(a0);
value.delete();
allReadStates.forEach(_fun43237);
}
function _fun43237(a0) { // fn#43237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:2842, offset: 0x0114dd1b, size: 62 bytes, params: 2, frame: 18
const binding = env0_0;
return binding.put('' + a0.type + '-' + a0.channelId, a0);
}
}
}
}
function ReadStatesCHANNEL_PINS_ACK(a0) { // fn#43226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1263, owner: ReadStates.CHANNEL_PINS_ACK, offset: 0x0114d941, size: 23 bytes, params: 2, frame: 11
return env0_0.handleReadStateAction(a0);
}
function BACKGROUND_SYNC_FINISHED(a0, a1) { // fn#43228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1366, owner: ReadStates.BACKGROUND_SYNC_FINISHED, offset: 0x0114d958, size: 40 bytes, params: 3, frame: 13
if (!a0.messagesOnly) {
env0_0.handleWriteCaches(a1, false);
}
}
function ReadStatesWRITE_CACHES(a0, a1) { // fn#43229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:1433, owner: ReadStates.WRITE_CACHES, offset: 0x0114d980, size: 26 bytes, params: 3, frame: 13
return env0_0.handleWriteCaches(a1, true);
}
function _fun43237(a0) { // fn#43237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5080:2842, offset: 0x0114dd1b, size: 62 bytes, params: 2, frame: 18
const binding = env0_0;
return binding.put('' + a0.type + '-' + a0.channelId, a0);
}
global.__d(_fun43219, 4902, [5, 6, 7, 1379, 4605, 3, 1910, 22, 21,
2]) /* metro module 4902, dependencies: [5, 6, 7, 1379, 4605, 3, 1910, 22, 21, 2] */;
@@ -1,4 +1,11 @@
/* Metro module 4903; source: modules/app_database/modules/UserGuildSettings.tsx; dependencies: [5, 6, 7, 4864, 3, 1910, 22, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserGuildSettingsStoreModule from '../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
function _fun43238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:6, offset: 0x0114dd59, size: 260 bytes, params: 8, frame: 19
const _arrayLikeToArray_43241 = function(a0, a1) {
var r0;
@@ -45,196 +52,208 @@ function _fun43238(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
let value = require(4864) /* metro dependency 4864: UserGuildSettingsStore */;
let value = UserGuildSettingsStoreModule;
const env0_5 = value.convertChannelOverridesToMap;
const env0_6 = value.getGuildDefaults;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ReadStates');
value = _fun43242();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/UserGuildSettings.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/UserGuildSettings.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_43239(a0, a1) { // fn#43239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:195, offset: 0x0114de5d, size: 370 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)) {
function _createForOfIteratorHelperLoose_43239(a0, a1) { // fn#43239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:195, offset: 0x0114de5d, size: 370 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);
}
return _fun43240;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43241(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun43240;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43241(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_43241(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_43241(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun43240;
}
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 _fun43240() { // fn#43240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:766, 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 _fun43242() { // fn#43242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1140, offset: 0x0114dfcf, size: 169 bytes, params: 1, frame: 16
const UserGuildSettings2 = UserGuildSettings;
const env0_0 = Module00005(_fun43247);
return CreateClass(UserGuildSettings2, [{key: 'getAll', value: value_43248}, {key: 'resetInMemoryState',
value: function() {
}}, {key: 'handleConnectionOpen', value: value_43250}, {key: 'handleUserGuildSettingsUpdate', value: value_43251},
{key: 'write', value: value_43253}]);
function UserGuildSettings() { // fn#43243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1161, offset: 0x0114e078, size: 61 bytes, params: 1, frame: 14
env1_3(this, UserGuildSettings);
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_43244,
USER_GUILD_SETTINGS_FULL_UPDATE: USER_GUILD_SETTINGS_FULL_UPDATE_43245};
function UserGuildSettingsCONNECTION_OPEN(a0, a1) { // fn#43244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1246, owner: UserGuildSettings.CONNECTION_OPEN, offset: 0x0114e0b5, size: 27 bytes, params: 3, frame: 13
return env0_0.handleConnectionOpen(a0, a1);
}
function UserGuildSettingsUSER_GUILD_SETTINGS_FULL_UPDATE(a0, a1) { // fn#43245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1316, owner: UserGuildSettings.USER_GUILD_SETTINGS_FULL_UPDATE, offset: 0x0114e0d0, size: 29 bytes, params: 3, frame: 13
return env0_0.handleUserGuildSettingsUpdate(a0, a1);
}
}
function* _fun43247(a0) { // fn#43247, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1393, offset: 0x0114e0f6, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[5]).userGuildSettings(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_7;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding,
['asynchronously loaded in ' + value + 'ms (userGuildSettings: ' + value6.length + ')']);
}
return value6;
}
function value_43248() { // fn#43248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1585, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_43250(a0, a1) { // fn#43250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1717, offset: 0x0114e19d, size: 110 bytes, params: 3, frame: 16
var value;
let userGuildSettings = a0.userGuildSettings;
if (!userGuildSettings.partial) {
value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.userGuildSettingsTransaction(a1);
value.delete();
}
const write = this.write;
userGuildSettings = a0.userGuildSettings;
const entries = userGuildSettings.entries;
userGuildSettings = a0.userGuildSettings;
Reflect.apply(write, this, [entries, userGuildSettings.version, a1]);
}
function value_43251(a0, a1) { // fn#43251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1924, offset: 0x0114e20b, size: 94 bytes, params: 3, frame: 18
var environment;
let value = environment.__proto__;
const max = (Module00022).max;
const userGuildSettings = a0.userGuildSettings;
value = Reflect.apply(max, value, [userGuildSettings.map(function({version}) {
return version ?? -1;
})]);
if (value != null) {
this.write(a0.userGuildSettings, value, a1);
}
}
function value_43253(a0, a1, a2) { // fn#43253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:2093, offset: 0x0114e286, size: 237 bytes, params: 4, frame: 24
var r14;
var r5;
var r2;
var value6;
var object;
var getGuildDefaultsBinding;
var guild_id;
var convertChannelOverridesToMapBinding;
var channel_overrides;
var put;
var value7;
var value8;
let value = environment.__proto__;
const value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).userGuildSettingsTransaction(a2);
const value3 = _createForOfIteratorHelperLoose_43239(a0);
const value4 = value3();
let done = value4.done;
if (!done) {
r5 = value4;
while (true) {
value6 = r5.value;
object = {};
getGuildDefaultsBinding = getGuildDefaults;
guild_id = value6.guild_id;
copyDataProperties(object, getGuildDefaultsBinding(guild_id), r14);
copyDataProperties(object, value6, r14);
convertChannelOverridesToMapBinding = convertChannelOverridesToMap;
channel_overrides = value6.channel_overrides;
object['channel_overrides'] = convertChannelOverridesToMapBinding(channel_overrides);
put = value2.put;
guild_id = value6.guild_id;
value7 = guild_id != null;
r2 = value7 ? guild_id : 'dm-sentinel';
Reflect.apply(put, value2, [r2, object]);
value8 = value3();
done = value8.done;
if (done) {
break;
}
r5 = value8;
r14 = value7;
continue;
}
}
r5 = r6;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a2);
value.put({id: 'user_guild_settings_version', version: a1});
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun43240;
}
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 _fun43242() { // fn#43242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1140, offset: 0x0114dfcf, size: 169 bytes, params: 1, frame: 16
const binding = env0_4;
const closure = UserGuildSettings;
const env0_0 = env0_2(_fun43247);
return binding(closure, [{key: 'getAll', value: value_43248}, {key: 'resetInMemoryState', value: function() {
}}, {key: 'handleConnectionOpen', value: value_43250}, {key: 'handleUserGuildSettingsUpdate', value: value_43251},
{key: 'write', value: value_43253}]);
}
function UserGuildSettings() { // fn#43243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1161, offset: 0x0114e078, size: 61 bytes, params: 1, frame: 14
env1_3(this, UserGuildSettings);
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_43244,
USER_GUILD_SETTINGS_FULL_UPDATE: USER_GUILD_SETTINGS_FULL_UPDATE_43245};
}
function* _fun43247(a0) { // fn#43247, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1393, offset: 0x0114e0f6, size: 167 bytes, params: 2, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[5]).userGuildSettings(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_7;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding,
['asynchronously loaded in ' + value + 'ms (userGuildSettings: ' + value6.length + ')']);
}
return value6;
}
function value_43250(a0, a1) { // fn#43250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1717, offset: 0x0114e19d, size: 110 bytes, params: 3, frame: 16
var value;
let userGuildSettings = a0.userGuildSettings;
if (!userGuildSettings.partial) {
value = environment.__proto__;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.userGuildSettingsTransaction(a1);
value.delete();
}
const write = this.write;
userGuildSettings = a0.userGuildSettings;
const entries = userGuildSettings.entries;
userGuildSettings = a0.userGuildSettings;
Reflect.apply(write, this, [entries, userGuildSettings.version, a1]);
}
function value_43251(a0, a1) { // fn#43251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1924, offset: 0x0114e20b, size: 94 bytes, params: 3, frame: 18
var environment;
let value = environment.__proto__;
const max = (importDefault(22) /* metro dependency 22 */).max;
const userGuildSettings = a0.userGuildSettings;
value = Reflect.apply(max, value, [userGuildSettings.map(function({version}) {
return version ?? -1;
})]);
if (value != null) {
this.write(a0.userGuildSettings, value, a1);
}
}
function value_43253(a0, a1, a2) { // fn#43253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:2093, offset: 0x0114e286, size: 237 bytes, params: 4, frame: 24
var r14;
var r5;
var r2;
var value6;
var object2;
var getGuildDefaultsBinding;
var guild_id;
var convertChannelOverridesToMapBinding;
var channel_overrides;
var put;
var value7;
var value8;
let value = environment.__proto__;
const value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).userGuildSettingsTransaction(a2);
const value3 = _createForOfIteratorHelperLoose_43239(a0);
const value4 = value3();
let done = value4.done;
if (!done) {
r5 = value4;
while (true) {
value6 = r5.value;
object2 = {};
getGuildDefaultsBinding = getGuildDefaults;
guild_id = value6.guild_id;
copyDataProperties(object2, getGuildDefaultsBinding(guild_id), r14);
copyDataProperties(object2, value6, r14);
convertChannelOverridesToMapBinding = convertChannelOverridesToMap;
channel_overrides = value6.channel_overrides;
object2['channel_overrides'] = convertChannelOverridesToMapBinding(channel_overrides);
put = value2.put;
guild_id = value6.guild_id;
value7 = guild_id != null;
r2 = value7 ? guild_id : 'dm-sentinel';
Reflect.apply(put, value2, [r2, object2]);
value8 = value3();
done = value8.done;
if (done) {
break;
}
r5 = value8;
r14 = value7;
continue;
}
}
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a2);
value.put({id: 'user_guild_settings_version', version: a1});
}
function UserGuildSettingsUSER_GUILD_SETTINGS_FULL_UPDATE(a0, a1) { // fn#43245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5081:1316, owner: UserGuildSettings.USER_GUILD_SETTINGS_FULL_UPDATE, offset: 0x0114e0d0, size: 29 bytes, params: 3, frame: 13
return env0_0.handleUserGuildSettingsUpdate(a0, a1);
}
global.__d(_fun43238, 4903, [5, 6, 7, 4864, 3, 1910, 22,
2]) /* metro module 4903, dependencies: [5, 6, 7, 4864, 3, 1910, 22, 2] */;
@@ -1,4 +1,15 @@
/* Metro module 5241; source: modules/app_database/modules/UserSearchItems.tsx; dependencies: [5, 6, 7, 5242, 5221, 3793, 1878, 661, 3, 1910, 5243, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UserAffinitiesV2Store from '../../user_affinities/UserAffinitiesV2Store.tsx'; /* Metro dependency 5221 */
import GameRelationshipStore from '../../game_relationships/GameRelationshipStore.tsx'; /* Metro dependency 5242 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun46607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:6, offset: 0x011ab92d, size: 324 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_46610 = function(a0, a1) {
@@ -46,267 +57,274 @@ function _fun46607(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const gameRelationshipStore = importDefault(5242) /* metro dependency 5242: GameRelationshipStore */;
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('UserSearchItems');
value = _fun46611();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/UserSearchItems.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/UserSearchItems.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_46608(a0, a1) { // fn#46608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:199, offset: 0x011aba71, size: 370 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)) {
function _createForOfIteratorHelperLoose_46608(a0, a1) { // fn#46608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:199, offset: 0x011aba71, size: 370 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);
}
return _fun46609;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46610(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun46609;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46610(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_46610(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_46610(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun46609;
}
return _fun46609;
}
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 _fun46611() { // fn#46611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1154, offset: 0x011abbe3, size: 167 bytes, params: 1, frame: 16
const binding = env0_5;
const closure = UserSearchItems;
const env0_0 = env0_3(_fun46615);
return binding(closure, [{key: 'getAll', value: value_46616}, {key: 'resetInMemoryState', value: function() {
}}, {key: 'shouldUseCache', get: get_46618}, {key: 'handlePostConnectionOpen', value: function() {
env1_12 = true;
}}, {key: 'handleWriteCaches', value: value_46620}]);
}
function UserSearchItems() { // fn#46612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1175, offset: 0x011abc8a, size: 62 bytes, params: 1, frame: 14
env1_4(this, UserSearchItems);
this.actions = {POST_CONNECTION_OPEN: this.handlePostConnectionOpen, WRITE_CACHES: WRITE_CACHES_46613};
}
function* _fun46615() { // fn#46615, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1367, offset: 0x011abce8, size: 176 bytes, params: 1, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_1;
const value5 = binding(env2_2[9]).userSearchItems();
if (value5 == null) {
return [];
}
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_11;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding,
['asynchronously loaded in ' + value + 'ms (userSearchItems: ' + value6.length + ')']);
}
return value6;
}
function get_46618() { // fn#46618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1705, offset: 0x011abd98, size: 12 bytes, params: 1, frame: 1
return !env1_12;
}
function value_46620(a0) { // fn#46620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1814, offset: 0x011abdb1, size: 570 bytes, params: 2, frame: 25
var environment;
var r6;
var communicationProbability;
var r14;
var value6;
var getUser;
var user;
var moduleValue;
var names2;
var names;
var nick;
var object4;
var FRIEND;
var getUserAffinity;
var userAffinity;
var value10;
var value11;
var value16;
var id;
var value17;
var moduleValue2;
var names3;
var object5;
var id2;
var id3;
var value19;
var value20;
var value21;
const object6 = {};
let value = environment.__proto__;
let _createForOfIteratorHelperLoose_46608Binding = _createForOfIteratorHelperLoose_46608;
const friendIDs = RelationshipStore.getFriendIDs();
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_46608Binding(friendIDs);
const value5 = value4();
let done = value5.done;
if (!done) {
r6 = value5;
while (true) {
value6 = r6.value;
user = UserStore.getUser(value6);
if (user != null) {
moduleValue = require(5243) /* metro dependency 5243: UserSearchUtils */;
names2 = moduleValue.getNames(user);
names = names2.names;
nick = names2.nick;
object4 = {id: value6};
FRIEND = RelationshipTypes.FRIEND;
object4.type = FRIEND;
object4.user = user;
object4.names = names;
object4.nick = nick;
userAffinity = UserAffinitiesV2Store.getUserAffinity(value6);
if (userAffinity == null) {
communicationProbability = value3;
continue;
}
communicationProbability = userAffinity.communicationProbability;
value10 = 0;
if (communicationProbability != null) {
r14 = communicationProbability;
continue;
}
r14 = value10;
continue;
object4.affinity = r14;
object6[value6] = object4;
}
value11 = value4();
done = value11.done;
if (done) {
break;
}
r6 = value11;
continue;
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 _fun46609() { // fn#46609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:770, 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]};
}
}
_createForOfIteratorHelperLoose_46608Binding = _createForOfIteratorHelperLoose_46608;
const value13 = GameRelationshipStore.getGameRelationships().values();
const value14 = _createForOfIteratorHelperLoose_46608Binding(value13.filter(function({type}) {
return type === RelationshipTypes.FRIEND;
}));
const value15 = value14();
done = value15.done;
if (!done) {
r6 = value15;
while (true) {
value16 = r6.value;
getUser = UserStore.getUser;
id = value16.id;
value17 = Reflect.apply(getUser, UserStore, [id]);
if (value17 != null) {
moduleValue2 = require(5243) /* metro dependency 5243: UserSearchUtils */;
names3 = moduleValue2.getNames(value17);
names = names3.names;
nick = names3.nick;
id = value16.id;
object5 = {};
id2 = value16.id;
object5.id = id2;
FRIEND = RelationshipTypes.FRIEND;
object5.type = FRIEND;
object5.user = value17;
object5.names = names;
object5.nick = nick;
getUserAffinity = UserAffinitiesV2Store.getUserAffinity;
id3 = value16.id;
value19 = Reflect.apply(getUserAffinity, UserAffinitiesV2Store, [id3]);
if (value19 == null) {
communicationProbability = value3;
continue;
}
communicationProbability = value19.communicationProbability;
value20 = 0;
if (communicationProbability != null) {
r14 = communicationProbability;
continue;
}
r14 = value20;
continue;
object5.affinity = r14;
object6[id] = object5;
function _fun46611() { // fn#46611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1154, offset: 0x011abbe3, size: 167 bytes, params: 1, frame: 16
const UserSearchItems2 = UserSearchItems;
const env0_0 = Module00005(_fun46615);
return CreateClass(UserSearchItems2, [{key: 'getAll', value: value_46616}, {key: 'resetInMemoryState',
value: function() {
}}, {key: 'shouldUseCache', get: get_46618}, {key: 'handlePostConnectionOpen', value: function() {
env1_12 = true;
}}, {key: 'handleWriteCaches', value: value_46620}]);
function UserSearchItems() { // fn#46612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1175, offset: 0x011abc8a, size: 62 bytes, params: 1, frame: 14
env1_4(this, UserSearchItems);
this.actions = {POST_CONNECTION_OPEN: this.handlePostConnectionOpen, WRITE_CACHES: WRITE_CACHES_46613};
function UserSearchItemsWRITE_CACHES(a0, a1) { // fn#46613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1304, owner: UserSearchItems.WRITE_CACHES, offset: 0x011abcc8, size: 23 bytes, params: 3, frame: 11
return env0_0.handleWriteCaches(a1);
}
value21 = value14();
done = value21.done;
if (done) {
break;
}
r6 = value21;
continue;
}
function* _fun46615() { // fn#46615, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1367, offset: 0x011abce8, size: 176 bytes, params: 1, frame: 21
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_1;
const value5 = binding(env2_2[9]).userSearchItems();
if (value5 == null) {
return [];
}
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (true) {
var value8 = global.performance.now();
binding = env2_11;
var log = binding.log;
value = value8 - value;
Reflect.apply(log, binding,
['asynchronously loaded in ' + value + 'ms (userSearchItems: ' + value6.length + ')']);
}
return value6;
}
function value_46616() { // fn#46616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1581, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function get_46618() { // fn#46618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1705, offset: 0x011abd98, size: 12 bytes, params: 1, frame: 1
return !env1_12;
}
function value_46620(a0) { // fn#46620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1814, offset: 0x011abdb1, size: 570 bytes, params: 2, frame: 25
var environment;
var r6;
var communicationProbability;
var r14;
var value6;
var userStoreBinding;
var getUser;
var user;
var moduleValue;
var names2;
var names;
var nick;
var object;
var FRIEND;
var userAffinitiesV2StoreBinding;
var getUserAffinity;
var userAffinity;
var value10;
var value11;
var value16;
var id;
var value17;
var moduleValue2;
var names3;
var object2;
var id2;
var id3;
var value19;
var value20;
var value21;
const object3 = {};
let value = environment.__proto__;
let _createForOfIteratorHelperLoose_46608Binding = _createForOfIteratorHelperLoose_46608;
const friendIDs = RelationshipStore.getFriendIDs();
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_46608Binding(friendIDs);
const value5 = value4();
let done = value5.done;
if (!done) {
r6 = value5;
while (true) {
value6 = r6.value;
user = UserStore.getUser(value6);
if (user != null) {
moduleValue = require(5243) /* metro dependency 5243: UserSearchUtils */;
names2 = moduleValue.getNames(user);
names = names2.names;
nick = names2.nick;
object = {id: value6};
FRIEND = RelationshipTypes.FRIEND;
object.type = FRIEND;
object.user = user;
object.names = names;
object.nick = nick;
userAffinity = UserAffinitiesV2Store.getUserAffinity(value6);
if (userAffinity == null) {
communicationProbability = value3;
continue;
}
communicationProbability = userAffinity.communicationProbability;
value10 = 0;
if (communicationProbability != null) {
r14 = communicationProbability;
continue;
}
r14 = value10;
continue;
object.affinity = r14;
object3[value6] = object;
}
value11 = value4();
done = value11.done;
if (done) {
break;
}
r6 = value11;
continue;
}
}
_createForOfIteratorHelperLoose_46608Binding = _createForOfIteratorHelperLoose_46608;
const value13 = GameRelationshipStore.getGameRelationships().values();
const value14 = _createForOfIteratorHelperLoose_46608Binding(value13.filter(function({type}) {
return type === RelationshipTypes.FRIEND;
}));
const value15 = value14();
done = value15.done;
if (!done) {
r6 = value15;
while (true) {
value16 = r6.value;
userStoreBinding = UserStore;
getUser = userStoreBinding.getUser;
id = value16.id;
value17 = Reflect.apply(getUser, userStoreBinding, [id]);
if (value17 != null) {
moduleValue2 = require(5243) /* metro dependency 5243: UserSearchUtils */;
names3 = moduleValue2.getNames(value17);
names = names3.names;
nick = names3.nick;
id = value16.id;
object2 = {};
id2 = value16.id;
object2.id = id2;
FRIEND = RelationshipTypes.FRIEND;
object2.type = FRIEND;
object2.user = value17;
object2.names = names;
object2.nick = nick;
userAffinitiesV2StoreBinding = UserAffinitiesV2Store;
getUserAffinity = userAffinitiesV2StoreBinding.getUserAffinity;
id3 = value16.id;
value19 = Reflect.apply(getUserAffinity, userAffinitiesV2StoreBinding, [id3]);
if (value19 == null) {
communicationProbability = value3;
continue;
}
communicationProbability = value19.communicationProbability;
value20 = 0;
if (communicationProbability != null) {
r14 = communicationProbability;
continue;
}
r14 = value20;
continue;
object2.affinity = r14;
object3[id] = object2;
}
value21 = value14();
done = value21.done;
if (done) {
break;
}
r6 = value21;
continue;
}
}
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.userSearchItemsTransaction(a0);
value.delete();
const Object = global.Object;
value.putAll(Object.values(object3));
return value3;
}
}
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.userSearchItemsTransaction(a0);
value.delete();
const Object = global.Object;
value.putAll(Object.values(object6));
return value3;
}
function UserSearchItemsWRITE_CACHES(a0, a1) { // fn#46613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5419:1304, owner: UserSearchItems.WRITE_CACHES, offset: 0x011abcc8, size: 23 bytes, params: 3, frame: 11
return env0_0.handleWriteCaches(a1);
}
global.__d(_fun46607, 5241, [5, 6, 7, 5242, 5221, 3793, 1878, 661, 3, 1910, 5243,
2]) /* metro module 5241, dependencies: [5, 6, 7, 5242, 5221, 3793, 1878, 661, 3, 1910, 5243, 2] */;
@@ -1,4 +1,12 @@
/* Metro module 4901; source: modules/app_database/modules/UserSettingsProto.tsx; dependencies: [5, 6, 7, 1348, 1226, 3, 1926, 1910, 22, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserSettingsProtoStore from '../../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43203(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:6, offset: 0x0114d030, size: 260 bytes, params: 8, frame: 18
const _arrayLikeToArray_43206 = function(a0, a1) {
var r0;
@@ -45,185 +53,203 @@ function _fun43203(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('UserSettingsProto');
value = _fun43207();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/UserSettingsProto.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/UserSettingsProto.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_43204(a0, a1) { // fn#43204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:150, offset: 0x0114d134, size: 370 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)) {
function _createForOfIteratorHelperLoose_43204(a0, a1) { // fn#43204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:150, offset: 0x0114d134, size: 370 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);
}
return _fun43205;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43206(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun43205;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43206(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_43206(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_43206(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun43205;
}
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 _fun43205() { // fn#43205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:721, 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 _fun43207() { // fn#43207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1102, offset: 0x0114d2a6, size: 98 bytes, params: 1, frame: 16
const UserSettingsProto2 = UserSettingsProto;
const env0_0 = Module00005(_fun43216);
return CreateClass(UserSettingsProto2, [{key: 'getAll', value: value_43217}, {key: 'resetInMemoryState',
value: function() {
}}]);
function UserSettingsProto() { // fn#43208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1123, offset: 0x0114d308, size: 138 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
env1_3(this, UserSettingsProto);
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_43209,
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_43210,
USER_SETTINGS_PROTO_ENQUEUE_UPDATE: USER_SETTINGS_PROTO_ENQUEUE_UPDATE_43211,
USER_SETTINGS_PROTO_UPDATE_EDIT_INFO: USER_SETTINGS_PROTO_UPDATE_EDIT_INFO_43212};
this.handleUserSettingsProtoChange = handleUserSettingsProtoChange;
value = importDefault(22) /* metro dependency 22 */;
const debounce = value.debounce;
var handleUserSettingsProtoChange = this.handleUserSettingsProtoChange;
this.throttledOnChange = Reflect.apply(debounce, value, [handleUserSettingsProtoChange, 0]);
function UserSettingsProtoCONNECTION_OPEN() { // fn#43209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1208, owner: UserSettingsProto.CONNECTION_OPEN, offset: 0x0114d392, size: 19 bytes, params: 1, frame: 9
return env0_0.throttledOnChange();
}
function UserSettingsProtoUSER_SETTINGS_PROTO_UPDATE() { // fn#43210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1264, owner: UserSettingsProto.USER_SETTINGS_PROTO_UPDATE, offset: 0x0114d392, size: 19 bytes, params: 1, frame: 9
return env0_0.throttledOnChange();
}
function UserSettingsProtoUSER_SETTINGS_PROTO_ENQUEUE_UPDATE() { // fn#43211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1328, owner: UserSettingsProto.USER_SETTINGS_PROTO_ENQUEUE_UPDATE, offset: 0x0114d392, size: 19 bytes, params: 1, frame: 9
return env0_0.throttledOnChange();
}
function UserSettingsProtoUSER_SETTINGS_PROTO_UPDATE_EDIT_INFO() { // fn#43212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1394, owner: UserSettingsProto.USER_SETTINGS_PROTO_UPDATE_EDIT_INFO, offset: 0x0114d392, size: 19 bytes, params: 1, frame: 9
return env0_0.throttledOnChange();
}
function handleUserSettingsProtoChange() { // fn#43213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1459, owner: UserSettingsProto.handleUserSettingsProtoChange, offset: 0x0114d3a5, size: 81 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const id = AuthenticationStore.getId();
value = importDefault(1926) /* metro dependency 1926: DatabaseManager */;
value = value.database(id);
if (value != null) {
value.transaction(_fun43214, 'handleUserSettingsProtoChange');
}
function _fun43214(a0) { // fn#43214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1526, offset: 0x0114d3f6, size: 221 bytes, params: 2, frame: 24
var propertyName;
var put;
var object;
var Number;
let value = environment.__proto__.__proto__.__proto__;
const state = UserSettingsProtoStore.computeState();
const value2 = undefined;
const value3 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).userSettingsTransaction(a0);
for (propertyName in state) {
put = value3.put;
object = {};
Number = global.Number;
object.id = Number(propertyName);
object.value = state[propertyName];
Reflect.apply(put, value3, [object]);
}
const versions = UserSettingsProtoStore.settings.versions;
const r4 = (versions == null ? value2 : versions.dataVersion) ?? -1;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.put({id: 'user_settings_version', version: r4});
return value2;
}
}
}
function* _fun43216(a0) { // fn#43216, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1940, offset: 0x0114d4dc, size: 227 bytes, params: 2, frame: 23
var r4;
var value10;
var id;
var value11;
var value12;
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[7]).userSettings(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (false) {
return value6;
}
const value8 = global.performance.now();
binding = env2_7;
const verbose = binding.verbose;
value = value8 - value;
Reflect.apply(verbose, binding, ['loaded in ' + value + 'ms (settings: ' + value6.length + ')']);
const object = {};
value = env2_8(value6);
const value9 = value();
let done = value9.done;
if (!done) {
r4 = value9;
reducibleLoop4: while (true) {
value10 = r4.value;
id = value10.id;
value11 = value10.value;
object[id] = value11;
value12 = value();
done = value12.done;
if (done) {
break reducibleLoop4;
}
r4 = value12;
continue reducibleLoop4;
}
}
r5 = r6;
return object;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
function value_43217() { // fn#43217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:2205, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
return _fun43205;
}
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 _fun43207() { // fn#43207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1102, offset: 0x0114d2a6, size: 98 bytes, params: 1, frame: 16
const binding = env0_4;
const closure = UserSettingsProto;
const env0_0 = env0_2(_fun43216);
return binding(closure, [{key: 'getAll', value: value_43217}, {key: 'resetInMemoryState', value: function() {
}}]);
}
function UserSettingsProto() { // fn#43208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1123, offset: 0x0114d308, size: 138 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
env1_3(this, UserSettingsProto);
this.actions = {CONNECTION_OPEN: CONNECTION_OPEN_43209,
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_43210,
USER_SETTINGS_PROTO_ENQUEUE_UPDATE: USER_SETTINGS_PROTO_ENQUEUE_UPDATE_43211,
USER_SETTINGS_PROTO_UPDATE_EDIT_INFO: USER_SETTINGS_PROTO_UPDATE_EDIT_INFO_43212};
this.handleUserSettingsProtoChange = handleUserSettingsProtoChange;
value = importDefault(22) /* metro dependency 22 */;
const debounce = value.debounce;
var handleUserSettingsProtoChange = this.handleUserSettingsProtoChange;
this.throttledOnChange = Reflect.apply(debounce, value, [handleUserSettingsProtoChange, 0]);
}
function* _fun43216(a0) { // fn#43216, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1940, offset: 0x0114d4dc, size: 227 bytes, params: 2, frame: 23
var r4;
var value10;
var id;
var value11;
var value12;
if (false) {
return undefined;
}
value = global.performance.now();
let binding = env2_0;
const value5 = binding(env2_1[7]).userSettings(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, []);
const value6 = undefined;
if (false) {
return value6;
}
const value8 = global.performance.now();
binding = env2_7;
const verbose = binding.verbose;
value = value8 - value;
Reflect.apply(verbose, binding, ['loaded in ' + value + 'ms (settings: ' + value6.length + ')']);
const object2 = {};
value = env2_8(value6);
const value9 = value();
let done = value9.done;
if (!done) {
r4 = value9;
reducibleLoop4: while (true) {
value10 = r4.value;
id = value10.id;
value11 = value10.value;
object2[id] = value11;
value12 = value();
done = value12.done;
if (done) {
break reducibleLoop4;
}
r4 = value12;
continue reducibleLoop4;
}
}
return object2;
}
function UserSettingsProtoCONNECTION_OPEN() { // fn#43209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1208, owner: UserSettingsProto.CONNECTION_OPEN, offset: 0x0114d392, size: 19 bytes, params: 1, frame: 9
return env0_0.throttledOnChange();
}
function handleUserSettingsProtoChange() { // fn#43213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1459, owner: UserSettingsProto.handleUserSettingsProtoChange, offset: 0x0114d3a5, size: 81 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const id = AuthenticationStore.getId();
value = importDefault(1926) /* metro dependency 1926: DatabaseManager */;
value = value.database(id);
if (value != null) {
value.transaction(_fun43214, 'handleUserSettingsProtoChange');
}
}
function _fun43214(a0) { // fn#43214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5079:1526, offset: 0x0114d3f6, size: 221 bytes, params: 2, frame: 24
var propertyName;
var put;
var object2;
var Number;
let value = environment.__proto__.__proto__.__proto__;
const state = UserSettingsProtoStore.computeState();
const value2 = undefined;
const value3 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).userSettingsTransaction(a0);
for (propertyName in state) {
put = value3.put;
object2 = {};
Number = global.Number;
object2.id = Number(propertyName);
object2.value = state[propertyName];
Reflect.apply(put, value3, [object2]);
}
const versions = UserSettingsProtoStore.settings.versions;
const r4 = (versions == null ? value2 : versions.dataVersion) ?? -1;
value = importDefault(1910) /* metro dependency 1910: DatabaseDaos */;
value = value.nonGuildVersionsTransaction(a0);
value.put({id: 'user_settings_version', version: r4});
return value2;
}
global.__d(_fun43203, 4901, [5, 6, 7, 1348, 1226, 3, 1926, 1910, 22,
2]) /* metro module 4901, dependencies: [5, 6, 7, 1348, 1226, 3, 1926, 1910, 22, 2] */;
@@ -1,391 +1,402 @@
/* Metro module 1930; source: modules/app_database/modules/channels/ChannelReader.tsx; dependencies: [5, 6, 7, 3, 1910, 2] */
import Logger from '../../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 DatabaseDaos from '../../DatabaseDaos.tsx'; /* Metro dependency 1910 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun21341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:6, offset: 0x00eee221, size: 190 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('ChannelReader');
value = _fun21342();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/channels/ChannelReader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/channels/ChannelReader.tsx');
exports.default = value;
function _fun21342() { // fn#21342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:162, offset: 0x00eee2df, size: 138 bytes, params: 1, frame: 18
const ChannelReader2 = ChannelReader;
const items2 = [{key: 'getSync', value: value_21344}];
const env0_1 = Module00005(_fun21346);
items2[1] = {key: 'getAsync', value: value_21347};
const env0_0 = Module00005(_fun21349);
items2[2] = {key: 'getGuildIds', value: value_21351};
return CreateClass(ChannelReader2, null, items2);
function ChannelReader() { // fn#21343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:183, offset: 0x00eee369, size: 27 bytes, params: 1, frame: 13
env1_3(this, ChannelReader);
}
function value_21344(a0, a1) { // fn#21344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:259, offset: 0x00eee384, size: 168 bytes, params: 3, frame: 24
let performance = global.performance;
let value = performance.now();
const manySyncUnsafe = (DatabaseDaos).channels(a0).getManySyncUnsafe(a1);
performance = global.performance;
value = performance.now() - value;
const binding = env1_5;
binding.log('synchronously loaded in ' + value + 'ms (guild: ' + a1 + ', channels: ' + manySyncUnsafe.length + ')');
return [manySyncUnsafe, value];
}
function* _fun21346(a0, a1) { // fn#21346, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:482, offset: 0x00eee435, size: 180 bytes, params: 3, frame: 25
if (false) {
return undefined;
}
let performance = global.performance;
value = performance.now();
let binding = env2_0;
const value5 = binding(env2_1[4]).channels(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, [a1]);
const value6 = undefined;
if (true) {
performance = global.performance;
value = performance.now() - value;
binding = env2_5;
binding.verbose('loaded in ' + value + 'ms (guild: ' + a1 + ', channels: ' + value6.length + ')');
}
return value6;
}
function value_21347() { // fn#21347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:661, offset: 0x00c3b2ba, size: 30 bytes, params: 1, frame: 13
return env0_1.apply(this, arguments);
}
function* _fun21349() { // fn#21349, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:746, offset: 0x00eee4f2, size: 239 bytes, params: 1, frame: 16
var environment;
var r4;
var binding;
var binding2;
var property;
var value3;
var channels;
var value4;
var value5;
var getGuildIds;
var value6;
var value7;
var value8;
var value9;
var items2;
var filter;
var closure;
var value10;
var Set;
var prototype;
var set;
var value12;
var value14;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
binding2 = env2_1;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
property = binding2[4];
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
channels = value3.channels;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value4 = Reflect.apply(channels, value3, []);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value5 = value4 == null;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
if (value5) {
try {
Set = global.Set;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
prototype = Set.prototype;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
set = new Set();
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value14 = set instanceof Object ? set : undefined;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
return value14;
}
try {
getGuildIds = value4.getGuildIds;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value6 = Reflect.apply(getGuildIds, value4, []);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
if (value8) {
return value7;
}
try {
value9 = value7 != null;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
if (value9) {
r4 = value7;
} else {
try {
items2 = [];
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
r4 = items2;
}
try {
filter = r4.filter;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
closure = function(a0) {
return a0 !== null && typeof a0 === 'string';
};
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value10 = Reflect.apply(filter, r4, [closure]);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
Set = global.Set;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
prototype = Set.prototype;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
set = new Set();
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value12 = set instanceof Object ? set : undefined;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
return value12;
}
function value_21351() { // fn#21351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:983, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
function _fun21342() { // fn#21342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:162, offset: 0x00eee2df, size: 138 bytes, params: 1, frame: 18
const binding = env0_4;
const closure = ChannelReader;
const items2 = [{key: 'getSync', value: value_21344}];
const binding2 = env0_2;
const env0_1 = binding2(_fun21346);
items2[1] = {key: 'getAsync', value: value_21347};
const env0_0 = binding2(_fun21349);
items2[2] = {key: 'getGuildIds', value: value_21351};
return binding(closure, null, items2);
}
function ChannelReader() { // fn#21343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:183, offset: 0x00eee369, size: 27 bytes, params: 1, frame: 13
env1_3(this, ChannelReader);
}
function value_21344(a0, a1) { // fn#21344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:259, offset: 0x00eee384, size: 168 bytes, params: 3, frame: 24
let performance = global.performance;
let value = performance.now();
const manySyncUnsafe = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).channels(a0).getManySyncUnsafe(a1);
performance = global.performance;
value = performance.now() - value;
const binding = env1_5;
binding.log('synchronously loaded in ' + value + 'ms (guild: ' + a1 + ', channels: ' + manySyncUnsafe.length + ')');
return [manySyncUnsafe, value];
}
function* _fun21346(a0, a1) { // fn#21346, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:482, offset: 0x00eee435, size: 180 bytes, params: 3, frame: 25
if (false) {
return undefined;
}
let performance = global.performance;
value = performance.now();
let binding = env2_0;
const value5 = binding(env2_1[4]).channels(a0);
const getMany = value5.getMany;
yield Reflect.apply(getMany, value5, [a1]);
const value6 = undefined;
if (true) {
performance = global.performance;
value = performance.now() - value;
binding = env2_5;
binding.verbose('loaded in ' + value + 'ms (guild: ' + a1 + ', channels: ' + value6.length + ')');
}
return value6;
}
function* _fun21349() { // fn#21349, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2057:746, offset: 0x00eee4f2, size: 239 bytes, params: 1, frame: 16
var environment;
var r4;
var binding;
var binding2;
var property;
var value3;
var channels;
var value4;
var value5;
var getGuildIds;
var value6;
var value7;
var value8;
var value9;
var items2;
var filter;
var closure;
var value10;
var Set;
var prototype;
var set;
var value12;
var value14;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
binding2 = env2_1;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
property = binding2[4];
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
channels = value3.channels;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value4 = Reflect.apply(channels, value3, []);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value5 = value4 == null;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
if (value5) {
try {
Set = global.Set;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
prototype = Set.prototype;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
set = new Set();
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value14 = set instanceof Object ? set : undefined;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
return value14;
}
try {
getGuildIds = value4.getGuildIds;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value6 = Reflect.apply(getGuildIds, value4, []);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
if (value8) {
return value7;
}
try {
value9 = value7 != null;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
if (value9) {
r4 = value7;
} else {
try {
items2 = [];
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
r4 = items2;
}
try {
filter = r4.filter;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
closure = function(a0) {
return a0 !== null && typeof a0 === 'string';
};
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value10 = Reflect.apply(filter, r4, [closure]);
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
Set = global.Set;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
prototype = Set.prototype;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
set = new Set();
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
try {
value12 = set instanceof Object ? set : undefined;
} catch (error) {
binding = env2_5;
binding.warn("couldn't get guild ids", error);
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
return value12;
}
global.__d(_fun21341, 1930, [5, 6, 7, 3, 1910, 2]) /* metro module 1930, dependencies: [5, 6, 7, 3, 1910, 2] */;
@@ -1,4 +1,12 @@
/* Metro module 4899; source: modules/app_database/modules/messages/KvMessage.tsx; dependencies: [57, 6, 7, 1945, 1878, 661, 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 Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun43187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:6, offset: 0x0114c800, size: 212 bytes, params: 8, frame: 19
const _arrayLikeToArray_43190 = function(a0, a1) {
var r0;
@@ -45,143 +53,150 @@ function _fun43187(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(7) /* metro dependency 7 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
let value = _fun43191();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/messages/KvMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/messages/KvMessage.tsx');
exports.KvMessage = value;
}
function _createForOfIteratorHelperLoose_43188(a0, a1) { // fn#43188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:187, offset: 0x0114c8d4, size: 370 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)) {
function _createForOfIteratorHelperLoose_43188(a0, a1) { // fn#43188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:187, offset: 0x0114c8d4, size: 370 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);
}
return _fun43189;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43190(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun43189;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43190(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_43190(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_43190(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun43189;
}
return _fun43189;
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 _fun43189() { // fn#43189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:758, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return ClassCallCheck >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof ClassCallCheck === 'bigint' ? ClassCallCheck : +ClassCallCheck]};
}
}
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 _fun43191() { // fn#43191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:1103, offset: 0x0114ca46, size: 83 bytes, params: 1, frame: 16
return env0_2(KvMessage, null, [{key: 'fromMessage', value: value_43193}, {key: 'deriveMemberUsers',
value: value_43194}]);
}
function _fun43191() { // fn#43191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:1103, offset: 0x0114ca46, size: 83 bytes, params: 1, frame: 16
return CreateClass(KvMessage, null, [{key: 'fromMessage', value: value_43193}, {key: 'deriveMemberUsers',
value: value_43194}]);
function KvMessage() { // fn#43192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:1114, offset: 0x0102c330, size: 27 bytes, params: 1, frame: 13
env1_1(this, KvMessage);
}
function value_43193(a0, a1, a2, a3) { // fn#43193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:1203, offset: 0x0114ca99, size: 100 bytes, params: 5, frame: 14
let value = KvMessage.deriveMemberUsers(a0, a2);
value = env1_0(value, 2);
return {id: a2.id, channelId: a1, message: a2, members: value[0], users: value[1], connectionId: a3};
}
function value_43193(a0, a1, a2, a3) { // fn#43193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:1203, offset: 0x0114ca99, size: 100 bytes, params: 5, frame: 14
let value = KvMessage.deriveMemberUsers(a0, a2);
value = env1_0(value, 2);
return {id: a2.id, channelId: a1, message: a2, members: value[0], users: value[1], connectionId: a3};
}
function value_43194(a0, {author, interaction, mentions}) { // fn#43194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:1387, offset: 0x0114cafd, size: 310 bytes, params: 3, frame: 26
var r5;
var r0;
var value9;
var user;
var getTrueMember;
var value11;
var value12;
const value = a0;
const Set = global.Set;
let items2 = [author?.id];
items2[1] = interaction == null ? undefined : interaction.user.id;
let r3 = mentions?.map(function(a0) {
return a0.id;
});
r3 = r3 ?? [];
arraySpread(items2, r3, 2, undefined);
const set = new Set(items2);
items2 = [];
const items3 = [];
const value7 = _createForOfIteratorHelperLoose_43188(set);
const value8 = value7();
let done = value8.done;
if (!done) {
r5 = value8;
while (true) {
value9 = r5.value;
if (value9 != null) {
user = UserStore.getUser(value9);
getTrueMember = GuildMemberStore.getTrueMember;
if (value != null) {
r0 = value;
function value_43194(a0, {author, interaction, mentions}) { // fn#43194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5077:1387, offset: 0x0114cafd, size: 310 bytes, params: 3, frame: 26
var r5;
var r0;
var value9;
var user;
var guildMemberStoreBinding;
var getTrueMember;
var value11;
var value12;
const value = a0;
const Set = global.Set;
let items2 = [author?.id];
items2[1] = interaction == null ? undefined : interaction.user.id;
let r3 = mentions?.map(function(a0) {
return a0.id;
});
r3 = r3 ?? [];
arraySpread(items2, r3, 2, undefined);
const set = new Set(items2);
items2 = [];
const items3 = [];
const value7 = _createForOfIteratorHelperLoose_43188(set);
const value8 = value7();
let done = value8.done;
if (!done) {
r5 = value8;
while (true) {
value9 = r5.value;
if (value9 != null) {
user = UserStore.getUser(value9);
guildMemberStoreBinding = GuildMemberStore;
getTrueMember = guildMemberStoreBinding.getTrueMember;
if (value != null) {
r0 = value;
continue;
}
r0 = EMPTY_STRING_SNOWFLAKE_ID;
value11 = Reflect.apply(getTrueMember, guildMemberStoreBinding, [r0, value9]);
if (user == null) {
continue;
}
items3.push(user);
if (value11 == null) {
break;
}
items2.push(value11);
break;
}
value12 = value7();
done = value12.done;
if (done) {
break;
}
r5 = value12;
continue;
}
r0 = EMPTY_STRING_SNOWFLAKE_ID;
value11 = Reflect.apply(getTrueMember, GuildMemberStore, [r0, value9]);
if (user == null) {
continue;
}
items3.push(user);
if (value11 == null) {
break;
}
items2.push(value11);
break;
}
value12 = value7();
done = value12.done;
if (done) {
break;
}
r5 = value12;
continue;
return [items2, items3];
}
}
return [items2, items3];
}
global.__d(_fun43187, 4899, [57, 6, 7, 1945, 1878, 661,
2]) /* metro module 4899, dependencies: [57, 6, 7, 1945, 1878, 661, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,23 +1,26 @@
/* Metro module 4894; source: modules/app_database/modules/messages/isLimitedChannel.tsx; dependencies: [1379, 4111, 661, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildMemberCountStore from '../../../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun43077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5072:6, offset: 0x011497dd, size: 173 bytes, params: 8, frame: 20
const closure = isLimitedChannel;
const isLimitedChannel2 = isLimitedChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const env0_2 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/messages/isLimitedChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/messages/isLimitedChannel.tsx');
exports.LIMITED_GUILD_MEMBER_THRESHOLD = 10000;
exports.isLimitedChannel = closure;
exports.isLimitedChannel = isLimitedChannel2;
exports.isLimitedChannelId = function(a0) {
var value = a0;
var isLimitedChannelBinding = isLimitedChannel;
value = ChannelStore.getBasicChannel(value ?? '_');
return isLimitedChannelBinding(value);
};
function isLimitedChannel(a0) { // fn#43078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5072:139, offset: 0x0114988a, size: 112 bytes, params: 2, frame: 15
return a0 != null && a0.type !== ChannelTypes.DM && a0.type !== ChannelTypes.GROUP_DM && (GuildMemberCountStore.getMemberCount(a0?.guild_id) ?? 0) >= 10000;
}
}
function isLimitedChannel(a0) { // fn#43078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5072:139, offset: 0x0114988a, size: 112 bytes, params: 2, frame: 15
return a0 != null && a0.type !== ChannelTypes.DM && a0.type !== ChannelTypes.GROUP_DM && (GuildMemberCountStore.getMemberCount(a0?.guild_id) ?? 0) >= 10000;
}
global.__d(_fun43077, 4894, [1379, 4111, 661, 2]) /* metro module 4894, dependencies: [1379, 4111, 661, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 4892; source: modules/app_database/modules/messages/isPrivateChannel.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43072(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5070:6, offset: 0x01149616, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/messages/isPrivateChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/messages/isPrivateChannel.tsx');
exports.isPrivateChannel = function(a0) {
return a0.guild_id == null;
};
}
global.__d(_fun43072, 4892, [2]) /* metro module 4892, dependencies: [2] */;
@@ -1,46 +1,49 @@
/* Metro module 4893; source: modules/app_database/modules/messages/isReadableChannel.tsx; dependencies: [1383, 1379, 3784, 661, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelRecordModule from '../../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
function _fun43074(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5071:6, offset: 0x0114967b, size: 205 bytes, params: 8, frame: 20
const closure = isReadableChannel;
const isReadableChannel2 = isReadableChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1383) /* metro dependency 1383: ChannelRecord */).isTextChannel;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.ChannelTypes;
const {VIEW_CHANNEL, READ_MESSAGE_HISTORY} = constantsModule.BasicPermissions;
const {VIEW_CHANNEL, READ_MESSAGE_HISTORY} = ConstantsModule.BasicPermissions;
const env0_4 = VIEW_CHANNEL | READ_MESSAGE_HISTORY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/messages/isReadableChannel.tsx');
exports.isReadableChannel = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/messages/isReadableChannel.tsx');
exports.isReadableChannel = isReadableChannel2;
exports.isReadableChannelId = isReadableChannelId;
}
function isReadableChannel(a0) { // fn#43075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5071:228, offset: 0x01149748, size: 106 bytes, params: 2, frame: 16
var r1;
var r0;
const value = a0 != null;
if (value) {
r1 = a0.type === ChannelTypes.DM || a0.type === ChannelTypes.GROUP_DM;
r1 = !r1 ? isTextChannel(a0.type) && PermissionStore.canBasicChannel(env0_4, a0) : r1;
r0 = r1;
} else {
r0 = value;
function isReadableChannel(a0) { // fn#43075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5071:228, offset: 0x01149748, size: 106 bytes, params: 2, frame: 16
var r1;
var r0;
const value = a0 != null;
if (value) {
r1 = a0.type === ChannelTypes.DM || a0.type === ChannelTypes.GROUP_DM;
r1 = !r1 ? isTextChannel(a0.type) && PermissionStore.canBasicChannel(env0_4, a0) : r1;
r0 = r1;
} else {
r0 = value;
}
return r0;
}
return r0;
}
function isReadableChannelId(a0) { // fn#43076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5071:499, offset: 0x011497b2, size: 43 bytes, params: 2, frame: 13
var r0;
var isReadableChannelBinding;
let value = a0 != null;
if (value) {
isReadableChannelBinding = isReadableChannel;
value = ChannelStore.getBasicChannel(a0);
value = isReadableChannelBinding(value);
r0 = value;
} else {
r0 = value;
function isReadableChannelId(a0) { // fn#43076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5071:499, offset: 0x011497b2, size: 43 bytes, params: 2, frame: 13
var r0;
var isReadableChannelBinding;
let value = a0 != null;
if (value) {
isReadableChannelBinding = isReadableChannel;
value = ChannelStore.getBasicChannel(a0);
value = isReadableChannelBinding(value);
r0 = value;
} else {
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun43074, 4893, [1383, 1379, 3784, 661,
2]) /* metro module 4893, dependencies: [1383, 1379, 3784, 661, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 4820; source: modules/app_database/modules/messages/requireSortedDescending.tsx; dependencies: [44, 21, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun42036(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4998:6, offset: 0x0112e7e1, size: 97 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/messages/requireSortedDescending.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/messages/requireSortedDescending.tsx');
exports.requireSortedDescending = requireSortedDescending;
}
function requireSortedDescending(a0) { // fn#42037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4998:217, offset: 0x0112e842, size: 119 bytes, params: 2, frame: 19
var r2;
var value;
const defaultImport = importDefault(44) /* metro dependency 44 */;
const value2 = a0.length <= 2;
if (value2) {
r2 = value2;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0[0].id, a0[a0.length - 1].id) >= 0;
r2 = value;
function requireSortedDescending(a0) { // fn#42037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4998:217, offset: 0x0112e842, size: 119 bytes, params: 2, frame: 19
var r2;
var value;
const defaultImport = Module00044;
const value2 = a0.length <= 2;
if (value2) {
r2 = value2;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0[0].id, a0[a0.length - 1].id) >= 0;
r2 = value;
}
defaultImport(r2, 'messages must be sorted in descending order.');
}
defaultImport(r2, 'messages must be sorted in descending order.');
}
global.__d(_fun42036, 4820, [44, 21, 2]) /* metro module 4820, dependencies: [44, 21, 2] */;
@@ -1,4 +1,11 @@
/* Metro module 4895; source: modules/app_database/modules/messages/withFallbacks.tsx; dependencies: [57, 1379, 4896, 661, 4889, 4893, 4894, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SortedGuildStore from '../../../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ExtendedMemoryLruModule from '../../util/ExtendedMemoryLru.tsx'; /* Metro dependency 4889 */
function _fun43080(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:6, offset: 0x0114992c, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_43083 = function(a0, a1) {
@@ -51,235 +58,242 @@ function _fun43080(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/modules/messages/withFallbacks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/modules/messages/withFallbacks.tsx');
exports.withFallbacks = withFallbacks;
}
function _createForOfIteratorHelperLoose_43081(a0, a1) { // fn#43081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:154, offset: 0x011499ff, size: 370 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)) {
function _createForOfIteratorHelperLoose_43081(a0, a1) { // fn#43081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:154, offset: 0x011499ff, size: 370 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);
}
return _fun43082;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43083(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun43082;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43083(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_43083(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_43083(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun43082;
}
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 _fun43082() { // fn#43082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:725, 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 isSaveableChannel(a0) { // fn#43084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:1064, offset: 0x01149b71, size: 71 bytes, params: 2, frame: 5
const type = a0.type;
const DM = ChannelTypes.DM;
let r0 = type === DM || a0.type === ChannelTypes.GROUP_DM;
r0 = !r0 ? a0.type === ChannelTypes.GUILD_TEXT : r0;
return r0;
}
function mergeInto(a0, a1) { // fn#43086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:1278, offset: 0x01149c0b, size: 104 bytes, params: 3, frame: 20
var r2;
var value5;
var value6;
var property;
var property2;
var value7;
const value3 = _createForOfIteratorHelperLoose_43081(a1.allEntries());
const value4 = value3();
let done = value4.done;
if (!done) {
for (r2 = value4; true; r2 = value7) {
value5 = r2.value;
value6 = Module00057(value5, 2);
property = value6[0];
property2 = value6[1];
a0.put(property, property2);
value7 = value3();
done = value7.done;
if (done) {
break;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun43082;
}
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 isSaveableChannel(a0) { // fn#43084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:1064, offset: 0x01149b71, size: 71 bytes, params: 2, frame: 5
const type = a0.type;
const DM = ChannelTypes.DM;
let r0 = type === DM || a0.type === ChannelTypes.GROUP_DM;
r0 = !r0 ? a0.type === ChannelTypes.GUILD_TEXT : r0;
return r0;
}
function mergeInto(a0, a1) { // fn#43086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:1278, offset: 0x01149c0b, size: 104 bytes, params: 3, frame: 20
var r2;
var value5;
var value6;
var property;
var property2;
var value7;
const value3 = _createForOfIteratorHelperLoose_43081(a1.allEntries());
const value4 = value3();
let done = value4.done;
if (!done) {
for (r2 = value4; true; r2 = value7) {
value5 = r2.value;
value6 = env0_2(value5, 2);
property = value6[0];
property2 = value6[1];
a0.put(property, property2);
value7 = value3();
done = value7.done;
if (done) {
break;
}
}
}
return a0;
}
function withFallbacks(a0, a1) { // fn#43087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:1542, offset: 0x01149c73, size: 443 bytes, params: 3, frame: 36
var r9;
var r17;
var r19;
var r4;
var value8;
var guildIds;
var value9;
var value10;
var value11;
var Object;
var values;
var getMutableBasicGuildChannelsForGuild;
var value12;
var length;
var property;
var isSaveableChannel2;
var moduleValue;
var isReadableChannel;
var isReadableChannel2;
var moduleValue2;
var isLimitedChannel;
var value13;
var value14;
var value15;
var value16;
let totalLength = a0.totalLength;
if (totalLength >= a1) {
return a0;
}
const ExtendedMemoryLru = (require(4889) /* metro dependency 4889: ExtendedMemoryLru */).ExtendedMemoryLru;
const extendedMemoryLru = new ExtendedMemoryLru(a0.primaryCapacity, a0.extendedCapacity);
const value4 = a1 - a0.totalLength;
let _createForOfIteratorHelperLoose_43081Binding = _createForOfIteratorHelperLoose_43081;
const getGuildFolders = SortedGuildStore.getGuildFolders;
const value5 = _createForOfIteratorHelperLoose_43081Binding(Reflect.apply(getGuildFolders, SortedGuildStore, []));
const value6 = value5();
let done = value6.done;
const value7 = 0;
if (!done) {
r9 = value6;
reducibleLoop2: while (true) {
_createForOfIteratorHelperLoose_43081Binding = _createForOfIteratorHelperLoose_43081;
value8 = r9.value;
guildIds = value8.guildIds;
value9 = _createForOfIteratorHelperLoose_43081Binding(guildIds);
value10 = value9();
done = value10.done;
if (!done) {
r17 = value10;
reducibleLoop3: while (true) {
value11 = r17.value;
Object = global.Object;
values = Object.values;
getMutableBasicGuildChannelsForGuild = ChannelStore.getMutableBasicGuildChannelsForGuild;
value12 = Reflect.apply(values, Object, [Reflect.apply(getMutableBasicGuildChannelsForGuild,
ChannelStore,
[value11])]);
length = value12.length;
if (value7 < length) {
r19 = value7;
reducibleLoop4: while (true) {
property = value12[r19];
isSaveableChannel2 = isSaveableChannel(property);
reducibleJoin6: while (true) {
if (isSaveableChannel2) {
moduleValue = require(4893) /* metro dependency 4893: isReadableChannel */;
isReadableChannel = moduleValue.isReadableChannel;
isReadableChannel2 = Reflect.apply(isReadableChannel, moduleValue, [property]);
r4 = isReadableChannel2;
function withFallbacks(a0, a1) { // fn#43087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5073:1542, offset: 0x01149c73, size: 443 bytes, params: 3, frame: 36
var r9;
var r17;
var r19;
var r4;
var value8;
var guildIds;
var value9;
var value10;
var value11;
var Object;
var values;
var channelStoreBinding;
var getMutableBasicGuildChannelsForGuild;
var value12;
var length;
var property;
var isSaveableChannel2;
var moduleValue;
var isReadableChannel;
var isReadableChannel2;
var moduleValue2;
var isLimitedChannel;
var value13;
var value14;
var value15;
var value16;
let totalLength = a0.totalLength;
if (totalLength >= a1) {
return a0;
}
const ExtendedMemoryLru = (ExtendedMemoryLruModule).ExtendedMemoryLru;
const extendedMemoryLru = new ExtendedMemoryLru(a0.primaryCapacity, a0.extendedCapacity);
const value4 = a1 - a0.totalLength;
let _createForOfIteratorHelperLoose_43081Binding = _createForOfIteratorHelperLoose_43081;
const sortedGuildStoreBinding = SortedGuildStore;
const getGuildFolders = sortedGuildStoreBinding.getGuildFolders;
const value5 = _createForOfIteratorHelperLoose_43081Binding(Reflect.apply(getGuildFolders, sortedGuildStoreBinding,
[]));
const value6 = value5();
let done = value6.done;
const value7 = 0;
if (!done) {
r9 = value6;
reducibleLoop2: while (true) {
_createForOfIteratorHelperLoose_43081Binding = _createForOfIteratorHelperLoose_43081;
value8 = r9.value;
guildIds = value8.guildIds;
value9 = _createForOfIteratorHelperLoose_43081Binding(guildIds);
value10 = value9();
done = value10.done;
if (!done) {
r17 = value10;
reducibleLoop3: while (true) {
value11 = r17.value;
Object = global.Object;
values = Object.values;
channelStoreBinding = ChannelStore;
getMutableBasicGuildChannelsForGuild = channelStoreBinding.getMutableBasicGuildChannelsForGuild;
value12 = Reflect.apply(values, Object, [Reflect.apply(getMutableBasicGuildChannelsForGuild,
channelStoreBinding,
[value11])]);
length = value12.length;
if (value7 < length) {
r19 = value7;
reducibleLoop4: while (true) {
property = value12[r19];
isSaveableChannel2 = isSaveableChannel(property);
reducibleJoin6: while (true) {
if (isSaveableChannel2) {
moduleValue = require(4893) /* metro dependency 4893: isReadableChannel */;
isReadableChannel = moduleValue.isReadableChannel;
isReadableChannel2 = Reflect.apply(isReadableChannel, moduleValue, [property]);
r4 = isReadableChannel2;
break reducibleJoin6;
}
r4 = isSaveableChannel2;
break reducibleJoin6;
}
r4 = isSaveableChannel2;
break reducibleJoin6;
}
reducibleJoin8: while (true) {
if (r4) {
moduleValue2 = require(4894) /* metro dependency 4894: isLimitedChannel */;
isLimitedChannel = moduleValue2.isLimitedChannel;
value13 = !Reflect.apply(isLimitedChannel, moduleValue2, [property]);
r4 = value13;
reducibleJoin8: while (true) {
if (r4) {
moduleValue2 = require(4894) /* metro dependency 4894: isLimitedChannel */;
isLimitedChannel = moduleValue2.isLimitedChannel;
value13 = !Reflect.apply(isLimitedChannel, moduleValue2, [property]);
r4 = value13;
break reducibleJoin8;
}
break reducibleJoin8;
}
break reducibleJoin8;
}
reducibleJoin10: while (true) {
if (r4) {
addFallback(value11, property, extendedMemoryLru);
reducibleJoin10: while (true) {
if (r4) {
addFallback(value11, property, extendedMemoryLru);
break reducibleJoin10;
}
break reducibleJoin10;
}
break reducibleJoin10;
totalLength = extendedMemoryLru.totalLength;
if (totalLength >= value4) {
mergeInto(extendedMemoryLru, a0);
return extendedMemoryLru;
}
value14 = typeof r19 === 'bigint' ? r19 + 1n : +r19 + 1;
length = value12.length;
if (value14 < length) {
r19 = value14;
continue reducibleLoop4;
}
break reducibleLoop4;
}
totalLength = extendedMemoryLru.totalLength;
if (totalLength >= value4) {
mergeInto(extendedMemoryLru, a0);
return extendedMemoryLru;
}
value14 = typeof r19 === 'bigint' ? r19 + 1n : +r19 + 1;
length = value12.length;
if (value14 < length) {
r19 = value14;
continue reducibleLoop4;
}
break reducibleLoop4;
}
value15 = value9();
done = value15.done;
if (done) {
break reducibleLoop3;
}
r17 = value15;
continue reducibleLoop3;
}
value15 = value9();
done = value15.done;
if (done) {
break reducibleLoop3;
}
r17 = value15;
continue reducibleLoop3;
}
value16 = value5();
done = value16.done;
if (done) {
mergeInto(extendedMemoryLru, a0);
return extendedMemoryLru;
}
r9 = value16;
continue reducibleLoop2;
}
value16 = value5();
done = value16.done;
if (done) {
mergeInto(extendedMemoryLru, a0);
return extendedMemoryLru;
}
r9 = value16;
continue reducibleLoop2;
}
mergeInto(extendedMemoryLru, a0);
return extendedMemoryLru;
}
mergeInto(extendedMemoryLru, a0);
return extendedMemoryLru;
}
global.__d(_fun43080, 4895, [57, 1379, 4896, 661, 4889, 4893, 4894,
2]) /* metro module 4895, dependencies: [57, 1379, 4896, 661, 4889, 4893, 4894, 2] */;
@@ -1,4 +1,16 @@
/* Metro module 1380; source: modules/app_database/stores/BasicChannelCacheStore.tsx; dependencies: [57, 6, 7, 15, 17, 18, 1381, 3, 694, 566, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
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 Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import GuildMembershipStore from '../../../stores/GuildMembershipStore.tsx'; /* Metro dependency 1381 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun16056(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:6, offset: 0x00e461ff, size: 309 bytes, params: 8, frame: 18
const _arrayLikeToArray_16059 = function(a0, a1) {
var r0;
@@ -45,279 +57,291 @@ function _fun16056(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const guildMembershipStore = importDefault(1381) /* metro dependency 1381: GuildMembershipStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
Object.create(value.prototype, {constructor: {value: value}});
new value('BasicChannelCacheStore');
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
value = _fun16063(Store);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/stores/BasicChannelCacheStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/stores/BasicChannelCacheStore.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_16057(a0, a1) { // fn#16057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:170, offset: 0x00e46334, size: 370 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)) {
function _createForOfIteratorHelperLoose_16057(a0, a1) { // fn#16057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:170, offset: 0x00e46334, size: 370 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);
}
return _fun16058;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_16059(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun16058;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_16059(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_16059(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun16058;
}
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 _isNativeReflectConstruct_16060() { // fn#16060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1080, offset: 0x00e464a6, size: 94 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_16060_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun16063(a0) { // fn#16063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1322, offset: 0x00e46504, size: 325 bytes, params: 2, frame: 16
const closure = BasicChannelCacheStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'hasChannel', value: function(a0) {
return this.channels.has(a0);
}}, {key: 'hasGuild', value: function(a0) {
return this.guilds.has(a0);
}}, {key: 'getBasicChannel', value: function(a0) {
var value = this.channels.get(a0);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'getGuildBasicChannels', value: function(a0) {
var value = this.guilds.get(a0);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'invalidate', value: function(a0) {
this.delete(a0);
}}, {key: 'restored', value: function(a0) {
this.delete(a0);
}}, {key: 'initialize', value: function() {
this.waitFor(GuildMembershipStore);
}}, {key: 'handleCacheLoadedLazy', value: value_16076}, {key: 'handleCacheLoadedLazyNoCache', value: function() {
this.guilds.clear();
this.channels.clear();
}}, {key: 'handleConnectionOpen', value: value_16079}, {key: 'handleLogout', value: function() {
this.guilds.clear();
this.channels.clear();
}}, {key: 'delete', value: function(a0) {
var propertyName;
var property = this.guilds;
for (propertyName in property.get(a0) ?? ({})) {
property = this.channels;
property.delete(propertyName);
}
this.guilds.delete(a0);
}}]);
}
function BasicChannelCacheStore() { // fn#16064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1334, offset: 0x00e46649, size: 250 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
env1_3(this, BasicChannelCacheStore);
const items2 = [importDefault(694) /* metro dependency 694: Dispatcher */];
items2[1] = {CACHE_LOADED_LAZY_NO_CACHE: CACHE_LOADED_LAZY_NO_CACHE_16065,
CACHE_LOADED_LAZY: CACHE_LOADED_LAZY_16066, CONNECTION_OPEN: CONNECTION_OPEN_16067, LOGOUT: LOGOUT_16068};
const value3 = env1_6(BasicChannelCacheStore);
value = env1_5(this, _isNativeReflectConstruct_16060() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
let Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
let map = new Map();
value.channels = map instanceof Object ? map : value4;
Map = global.Map;
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
value.guilds = map instanceof Object ? map : value6;
return value;
}
function value_16076({basicGuildChannels}) { // fn#16076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:2383, offset: 0x00e4682f, size: 272 bytes, params: 2, frame: 27
var environment;
var r2;
var r11;
var value4;
var value5;
var property;
var property2;
var guilds;
var set;
var Object;
var fromEntries;
var value6;
var value7;
var value8;
var channels;
var id;
var value9;
var value10;
let Map = global.Map;
let map = new Map();
this.guilds = map;
Map = global.Map;
this.channels = new Map();
map = environment.__proto__;
const value2 = _createForOfIteratorHelperLoose_16057(basicGuildChannels);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop1: while (true) {
value4 = r2.value;
value5 = env1_2(value4, 2);
property = value5[0];
property2 = value5[1];
guilds = this.guilds;
set = guilds.set;
Object = global.Object;
fromEntries = Object.fromEntries;
map = property2.map;
Reflect.apply(set, guilds, [property, Reflect.apply(fromEntries, Object, [Reflect.apply(map, property2,
[function(a0) {
return [a0.id, a0];
}])])]);
value6 = _createForOfIteratorHelperLoose_16057(property2);
value7 = value6();
done = value7.done;
if (!done) {
r11 = value7;
reducibleLoop2: while (true) {
value8 = r11.value;
channels = this.channels;
set = channels.set;
id = value8.id;
Reflect.apply(set, channels, [id, value8]);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop2;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_16059(a0, value);
r6 = value;
} else {
r6 = value;
}
r11 = value9;
continue reducibleLoop2;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun16058;
}
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 _fun16058() { // fn#16058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:741, 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 _isNativeReflectConstruct_16060() { // fn#16060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1080, offset: 0x00e464a6, size: 94 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_16060_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun16063(a0) { // fn#16063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1322, offset: 0x00e46504, size: 325 bytes, params: 2, frame: 16
const BasicChannelCacheStore2 = BasicChannelCacheStore;
Inherits(BasicChannelCacheStore2, a0);
return CreateClass(BasicChannelCacheStore2, [{key: 'hasChannel', value: function(a0) {
return this.channels.has(a0);
}}, {key: 'hasGuild', value: function(a0) {
return this.guilds.has(a0);
}}, {key: 'getBasicChannel', value: function(a0) {
var value = this.channels.get(a0);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'getGuildBasicChannels', value: function(a0) {
var value = this.guilds.get(a0);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'invalidate', value: function(a0) {
this.delete(a0);
}}, {key: 'restored', value: function(a0) {
this.delete(a0);
}}, {key: 'initialize', value: function() {
this.waitFor(GuildMembershipStore);
}}, {key: 'handleCacheLoadedLazy', value: value_16076}, {key: 'handleCacheLoadedLazyNoCache', value: function() {
this.guilds.clear();
this.channels.clear();
}}, {key: 'handleConnectionOpen', value: value_16079}, {key: 'handleLogout', value: function() {
this.guilds.clear();
this.channels.clear();
}}, {key: 'delete', value: function(a0) {
var propertyName;
var property = this.guilds;
for (propertyName in property.get(a0) ?? ({})) {
property = this.channels;
property.delete(propertyName);
}
this.guilds.delete(a0);
}}]);
function BasicChannelCacheStore() { // fn#16064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1334, offset: 0x00e46649, size: 250 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
env1_3(this, BasicChannelCacheStore);
const items2 = [Dispatcher];
items2[1] = {CACHE_LOADED_LAZY_NO_CACHE: CACHE_LOADED_LAZY_NO_CACHE, CACHE_LOADED_LAZY: CACHE_LOADED_LAZY_16066,
CONNECTION_OPEN: CONNECTION_OPEN_16067, LOGOUT: LOGOUT_16068};
const value3 = env1_6(BasicChannelCacheStore);
value = env1_5(this, _isNativeReflectConstruct_16060() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
let Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
let map = new Map();
value.channels = map instanceof Object ? map : value4;
Map = global.Map;
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
value.guilds = map instanceof Object ? map : value6;
return value;
function CACHE_LOADED_LAZY_NO_CACHE(a0) { // fn#16065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1612, owner: BasicChannelCacheStore.CACHE_LOADED_LAZY_NO_CACHE, offset: 0x00e46743, size: 25 bytes, params: 2, frame: 11
return env0_0.handleCacheLoadedLazyNoCache(a0);
}
function BasicChannelCacheStoreCACHE_LOADED_LAZY(a0) { // fn#16066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1667, owner: BasicChannelCacheStore.CACHE_LOADED_LAZY, offset: 0x00e4675c, size: 23 bytes, params: 2, frame: 11
return env0_0.handleCacheLoadedLazy(a0);
}
function BasicChannelCacheStoreCONNECTION_OPEN(a0) { // fn#16067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1713, owner: BasicChannelCacheStore.CONNECTION_OPEN, offset: 0x00def9e8, size: 23 bytes, params: 2, frame: 11
return env0_0.handleConnectionOpen(a0);
}
function BasicChannelCacheStoreLOGOUT(a0) { // fn#16068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1749, owner: BasicChannelCacheStore.LOGOUT, offset: 0x00e46773, size: 23 bytes, params: 2, frame: 11
return env0_0.handleLogout(a0);
}
}
function value_16076({basicGuildChannels}) { // fn#16076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:2383, offset: 0x00e4682f, size: 272 bytes, params: 2, frame: 27
var environment;
var r2;
var r11;
var value4;
var value5;
var property;
var property2;
var guilds;
var set;
var Object;
var fromEntries;
var value6;
var value7;
var value8;
var channels;
var id;
var value9;
var value10;
let Map = global.Map;
let map = new Map();
this.guilds = map;
Map = global.Map;
this.channels = new Map();
map = environment.__proto__;
const value2 = _createForOfIteratorHelperLoose_16057(basicGuildChannels);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop1: while (true) {
value4 = r2.value;
value5 = env1_2(value4, 2);
property = value5[0];
property2 = value5[1];
guilds = this.guilds;
set = guilds.set;
Object = global.Object;
fromEntries = Object.fromEntries;
map = property2.map;
Reflect.apply(set, guilds, [property, Reflect.apply(fromEntries, Object, [Reflect.apply(map, property2,
[function(a0) {
return [a0.id, a0];
}])])]);
value6 = _createForOfIteratorHelperLoose_16057(property2);
value7 = value6();
done = value7.done;
if (!done) {
r11 = value7;
reducibleLoop2: while (true) {
value8 = r11.value;
channels = this.channels;
set = channels.set;
id = value8.id;
Reflect.apply(set, channels, [id, value8]);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop2;
}
r11 = value9;
continue reducibleLoop2;
}
}
value10 = value2();
done = value10.done;
if (done) {
break reducibleLoop1;
}
r2 = value10;
continue reducibleLoop1;
}
}
value10 = value2();
done = value10.done;
if (done) {
break reducibleLoop1;
}
r2 = value10;
continue reducibleLoop1;
}
}
}
function value_16079() { // fn#16079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:2854, offset: 0x00e4697c, size: 105 bytes, params: 1, frame: 15
var r2;
var value4;
var has;
var value5;
let value = environment.__proto__;
const value2 = GuildMembershipStore.allGuildIds();
const _createForOfIteratorHelperLoose_16057Binding = _createForOfIteratorHelperLoose_16057;
value = this.guilds.keys();
value = _createForOfIteratorHelperLoose_16057Binding(value);
const value3 = value();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
has = value2.has;
if (!Reflect.apply(has, value2, [value4])) {
this.delete(value4);
function value_16079() { // fn#16079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:2854, offset: 0x00e4697c, size: 105 bytes, params: 1, frame: 15
var r2;
var value4;
var has;
var value5;
let value = environment.__proto__;
const value2 = GuildMembershipStore.allGuildIds();
const _createForOfIteratorHelperLoose_16057Binding = _createForOfIteratorHelperLoose_16057;
value = this.guilds.keys();
value = _createForOfIteratorHelperLoose_16057Binding(value);
const value3 = value();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
has = value2.has;
if (!Reflect.apply(has, value2, [value4])) {
this.delete(value4);
}
value5 = value();
done = value5.done;
if (done) {
break;
}
r2 = value5;
continue;
}
}
value5 = value();
done = value5.done;
if (done) {
break;
}
r2 = value5;
continue;
}
}
}
function BasicChannelCacheStoreCACHE_LOADED_LAZY_NO_CACHE(a0) { // fn#16065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1507:1612, owner: BasicChannelCacheStore.CACHE_LOADED_LAZY_NO_CACHE, offset: 0x00e46743, size: 25 bytes, params: 2, frame: 11
return env0_0.handleCacheLoadedLazyNoCache(a0);
}
global.__d(_fun16056, 1380, [57, 6, 7, 15, 17, 18, 1381, 3, 694, 566,
2]) /* metro module 1380, dependencies: [57, 6, 7, 15, 17, 18, 1381, 3, 694, 566, 2] */;
@@ -1,136 +1,156 @@
/* Metro module 4888; source: modules/app_database/stores/FileSystemStore.tsx; dependencies: [5, 6, 7, 15, 17, 18, 3, 672, 694, 1910, 566, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Durations from '../../../utils/Durations.tsx'; /* Metro dependency 672 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import DatabaseDaos from '../DatabaseDaos.tsx'; /* Metro dependency 1910 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43012(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:6, offset: 0x0114845b, size: 318 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('FileSystemStore');
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
const env0_9 = 10 * MINUTE;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
value = _fun43016(Store);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/stores/FileSystemStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/stores/FileSystemStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_43013() { // fn#43013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:158, offset: 0x01148599, size: 94 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) {
function _isNativeReflectConstruct_43013() { // fn#43013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:158, offset: 0x01148599, size: 94 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_43013_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_43013_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun43016(a0) { // fn#43016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:418, offset: 0x011485f7, size: 132 bytes, params: 2, frame: 17
const closure = FileSystemStore;
env0_7(closure, a0);
const binding = env0_4;
const env0_0 = env0_2(_fun43024);
return binding(closure, [{key: 'handlePostConnectionOpen', value: function() {
this.refresh();
return false;
}}, {key: 'handleAppStateUpdate', value: function(a0) {
if (a0.state !== 'active') {
function _fun43016(a0) { // fn#43016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:418, offset: 0x011485f7, size: 132 bytes, params: 2, frame: 17
const FileSystemStore2 = FileSystemStore;
Inherits(FileSystemStore2, a0);
const env0_0 = Module00005(_fun43024);
return CreateClass(FileSystemStore2, [{key: 'handlePostConnectionOpen', value: function() {
this.refresh();
return false;
}}, {key: 'handleAppStateUpdate', value: function(a0) {
if (a0.state !== 'active') {
this.refresh();
}
return false;
}}, {key: 'refresh', value: value_43026}]);
function FileSystemStore() { // fn#43017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:430, offset: 0x0114867b, size: 228 bytes, params: 1, frame: 23
env1_3(this, FileSystemStore);
const items2 = [Dispatcher];
items2[1] = {APP_STATE_UPDATE: APP_STATE_UPDATE_43018, POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_43019};
const value3 = env1_6(FileSystemStore);
const value6 = env1_5(this, _isNativeReflectConstruct_43013() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
value6.isLowDisk = false;
value6.refresh();
value6.waitFor(DatabaseDaos);
global.setInterval(_fun43020, env1_9);
return value6;
function FileSystemStoreAPP_STATE_UPDATE(a0) { // fn#43018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:677, owner: FileSystemStore.APP_STATE_UPDATE, offset: 0x0114875f, size: 23 bytes, params: 2, frame: 11
return env0_0.handleAppStateUpdate(a0);
}
function FileSystemStorePOST_CONNECTION_OPEN() { // fn#43019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:727, owner: FileSystemStore.POST_CONNECTION_OPEN, offset: 0x01148776, size: 19 bytes, params: 1, frame: 9
return env0_0.handlePostConnectionOpen();
}
function _fun43020() { // fn#43020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:821, offset: 0x01148789, size: 19 bytes, params: 1, frame: 9
return env0_0.refresh();
}
}
return false;
}}, {key: 'refresh', value: value_43026}]);
}
function FileSystemStore() { // fn#43017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:430, offset: 0x0114867b, size: 228 bytes, params: 1, frame: 23
env1_3(this, FileSystemStore);
const items2 = [importDefault(694) /* metro dependency 694: Dispatcher */];
items2[1] = {APP_STATE_UPDATE: APP_STATE_UPDATE_43018, POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_43019};
const value3 = env1_6(FileSystemStore);
const value6 = env1_5(this, _isNativeReflectConstruct_43013() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
value6.isLowDisk = false;
value6.refresh();
value6.waitFor(importDefault(1910) /* metro dependency 1910: DatabaseDaos */);
global.setInterval(_fun43020, env1_9);
return value6;
}
function* _fun43024() { // fn#43024, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:1085, offset: 0x011487d7, size: 379 bytes, params: 1, frame: 18
var environment;
var r1;
var r6;
var r7;
var r3;
var value6;
var fs;
var available;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
value = undefined;
const value4 = binding(env2_1[9]).database();
const value5 = null;
if (value5 == value4) {
r1 = value;
} else {
value6 = value4.fsInfo();
r1 = value5 == value6 ? value : value6.catch(_fun43025);
}
yield r1;
const value8 = undefined;
if (false) {
return value8;
}
if (value5 != value8) {
fs = value8.fs;
available = fs.available;
r6 = available < 268435456 || value8.fs.available < 3 * value8.database.used;
r6 = !r6 ? value8.fs.available < 2 * value8.database.total : r6;
fs = value8.fs;
available = fs.available;
r7 = available > 805306368 && value8.fs.available > 4 * value8.database.used;
r7 = r7 && value8.fs.available > 4 * value8.database.total;
r3 = r6 ? !!r6 : !r7 && value5;
if (value5 != r3 && this.isLowDisk !== r3) {
this.isLowDisk = r3;
this.emitChange();
}
}
return value;
function _fun43025(a0) { // fn#43025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:1178, offset: 0x01148952, size: 29 bytes, params: 2, frame: 13
return env3_8.warn("couldn't get fs info", a0);
}
function* _fun43024() { // fn#43024, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:1085, offset: 0x011487d7, size: 379 bytes, params: 1, frame: 18
var environment;
var r1;
var r6;
var r7;
var r3;
var value6;
var fs;
var available;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
value = undefined;
const value4 = binding(env2_1[9]).database();
const value5 = null;
if (value5 == value4) {
r1 = value;
} else {
value6 = value4.fsInfo();
r1 = value5 == value6 ? value : value6.catch(_fun43025);
}
yield r1;
const value8 = undefined;
if (false) {
return value8;
}
if (value5 != value8) {
fs = value8.fs;
available = fs.available;
r6 = available < 268435456 || value8.fs.available < 3 * value8.database.used;
r6 = !r6 ? value8.fs.available < 2 * value8.database.total : r6;
fs = value8.fs;
available = fs.available;
r7 = available > 805306368 && value8.fs.available > 4 * value8.database.used;
r7 = r7 && value8.fs.available > 4 * value8.database.total;
r3 = r6 ? !!r6 : !r7 && value5;
if (value5 != r3 && this.isLowDisk !== r3) {
this.isLowDisk = r3;
this.emitChange();
}
function value_43026() { // fn#43026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:1510, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
return value;
}
function _fun43020() { // fn#43020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:821, offset: 0x01148789, size: 19 bytes, params: 1, frame: 9
return env0_0.refresh();
}
function _fun43025(a0) { // fn#43025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5066:1178, offset: 0x01148952, size: 29 bytes, params: 2, frame: 13
return env3_8.warn("couldn't get fs info", a0);
}
global.__d(_fun43012, 4888, [5, 6, 7, 15, 17, 18, 3, 672, 694, 1910, 566,
2]) /* metro module 4888, dependencies: [5, 6, 7, 15, 17, 18, 3, 672, 694, 1910, 566, 2] */;
@@ -1,45 +1,48 @@
/* Metro module 5228; source: modules/app_database/system/AppDatabaseManager.Entry.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46277(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5406:6, offset: 0x011a4720, size: 124 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun46278();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/system/AppDatabaseManager.Entry.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/system/AppDatabaseManager.Entry.tsx');
exports.Entry = value;
}
function _fun46278() { // fn#46278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5406:118, offset: 0x011a479c, size: 149 bytes, params: 1, frame: 15
return env0_1(Entry_46279, [{key: 'actions', get: function() {
return this.definition.actions;
}}, {key: 'load', value: function() {
if (this.module == null) {
this.module = this.definition.require();
}
}}, {key: 'reset', value: function() {
var module = this.module;
if (module != null) {
module.resetInMemoryState();
}
}}, {key: 'execute', value: function(a0, a1) {
var actions;
var property;
this.load();
if (this.module != null) {
actions = this.module.actions;
property = actions[a0.type];
if (property != null) {
property.call(actions, a0, a1);
function _fun46278() { // fn#46278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5406:118, offset: 0x011a479c, size: 149 bytes, params: 1, frame: 15
return CreateClass(Entry_46279, [{key: 'actions', get: function() {
return this.definition.actions;
}}, {key: 'load', value: function() {
if (this.module == null) {
this.module = this.definition.require();
}
}}, {key: 'reset', value: function() {
var module = this.module;
if (module != null) {
module.resetInMemoryState();
}
}}, {key: 'execute', value: function(a0, a1) {
var actions;
var property;
this.load();
if (this.module != null) {
actions = this.module.actions;
property = actions[a0.type];
if (property != null) {
property.call(actions, a0, a1);
}
}
}}, {key: 'validateInDev', value: function() {
}}]);
function Entry_46279(a0, a1) { // fn#46279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5406:139, offset: 0x011a4831, size: 53 bytes, params: 3, frame: 13
env1_0(this, Entry_46279);
this.parent = a0;
this.module = null;
this.definition = a1;
}
}}, {key: 'validateInDev', value: function() {
}}]);
}
function Entry_46279(a0, a1) { // fn#46279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5406:139, offset: 0x011a4831, size: 53 bytes, params: 3, frame: 13
env1_0(this, Entry_46279);
this.parent = a0;
this.module = null;
this.definition = a1;
}
}
global.__d(_fun46277, 5228, [6, 7, 2]) /* metro module 5228, dependencies: [6, 7, 2] */;
@@ -1,4 +1,14 @@
/* Metro module 5227; source: modules/app_database/system/AppDatabaseManager.tsx; dependencies: [57, 6, 7, 1226, 3, 1926, 1911, 694, 5228, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
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 Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DispatcherModule from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as AppDatabaseManagerEntryModule from './AppDatabaseManager.Entry.tsx'; /* Metro dependency 5228 */
function _fun46257(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:6, offset: 0x011a3d53, size: 266 bytes, params: 8, frame: 20
const env0_0 = require;
const _arrayLikeToArray_46260 = function(a0, a1) {
@@ -46,342 +56,345 @@ function _fun46257(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('AppDatabaseManager');
const Set = global.Set;
let set = new Set(['MESSAGE_CREATE']);
set = _fun46261();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/system/AppDatabaseManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/system/AppDatabaseManager.tsx');
exports.AppDatabaseManager = set;
}
function _createForOfIteratorHelperLoose_46258(a0, a1) { // fn#46258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:140, offset: 0x011a3e5d, size: 370 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)) {
function _createForOfIteratorHelperLoose_46258(a0, a1) { // fn#46258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:140, offset: 0x011a3e5d, size: 370 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);
}
return _fun46259;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46260(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun46259;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_46260(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_46260(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_46260(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun46259;
}
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 _fun46261() { // fn#46261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1123, offset: 0x011a3fcf, size: 208 bytes, params: 1, frame: 17
return env0_5(AppDatabaseManager, [{key: 'handleAction', value: value_46264}, {key: 'resetModules',
value: value_46265}, {key: 'executeModules', value: value_46266}, {key: 'validateInDev', value: function() {
}}], [{key: 'handleException', value: value_46271}, {key: 'computeEntries', value: value_46272}, {key: 'register',
value: value_46274}]);
}
function AppDatabaseManager(a0, a1, a2) { // fn#46262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1134, offset: 0x011a409f, size: 288 bytes, params: 4, frame: 25
let binding = env1_4;
binding(this, AppDatabaseManager);
const value3 = env1_3(AppDatabaseManager.computeEntries(a0, a2), 2);
const property = value3[0];
const property2 = value3[1];
this.name = a0;
this.entries = property2;
this.actions = property;
this.lastDatabase = null;
let register = AppDatabaseManager.register;
const value4 = a0 + '_CLEAR_CACHES';
const closure = _fun46263;
Reflect.apply(register, AppDatabaseManager, [value4, ['CLEAR_CACHES'], [], closure]);
register = AppDatabaseManager.register;
const value5 = this.actions.keys();
items2 = [];
arraySpread(items2, value5, 0, closure);
Reflect.apply(register, AppDatabaseManager, [a0, items2, a1, this.handleAction.bind(this)]);
binding = env1_7;
binding.verbose('' + a0 + ' created with ' + a2.length + ' modules, ' + this.actions.size + ' distinct actions.');
}
function value_46264(a0) { // fn#46264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1728, offset: 0x011a4206, size: 106 bytes, params: 2, frame: 15
this.validateInDev(a0.type);
let value = environment.__proto__;
const id = AuthenticationStore.getId();
value = importDefault(1926) /* metro dependency 1926: DatabaseManager */;
value = value.database(id);
this.resetModules(a0, value);
this.executeModules(a0, value);
return false;
}
function value_46265(a0, a1) { // fn#46265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1891, offset: 0x011a4270, size: 164 bytes, params: 3, frame: 25
var r3;
var value;
var binding;
var verbose;
var type;
var HermesInternal;
var concat;
var _createForOfIteratorHelperLoose_46258Binding;
var entries;
var value2;
var done;
var value3;
var reset;
var value4;
let lastDatabase = this.lastDatabase;
reducibleJoin4: while (true) {
if (a1 === lastDatabase) {
break reducibleJoin4;
}
value = environment.__proto__;
binding = env1_7;
verbose = binding.verbose;
lastDatabase = this.lastDatabase;
type = a0.type;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(verbose, binding,
['database has changed (was: ' + lastDatabase + ', now: ' + a1 + ', action: ' + type + '). resetting modules.']);
_createForOfIteratorHelperLoose_46258Binding = _createForOfIteratorHelperLoose_46258;
entries = this.entries;
value = _createForOfIteratorHelperLoose_46258Binding(entries);
value2 = value();
done = value2.done;
if (!done) {
r3 = value2;
reducibleLoop2: while (true) {
value3 = r3.value;
reset = value3.reset;
Reflect.apply(reset, value3, []);
value4 = value();
done = value4.done;
if (done) {
break reducibleLoop2;
}
r3 = value4;
continue reducibleLoop2;
if (r5) {
}
return _fun46259;
}
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 _fun46259() { // fn#46259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:711, 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]};
}
this.lastDatabase = a1;
break reducibleJoin4;
}
}
function value_46266(a0, a1) { // fn#46266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2184, offset: 0x011a4314, size: 317 bytes, params: 3, frame: 28
var environment;
var binding;
var transaction;
var has;
const env0_0 = a0;
const env0_1 = a1;
let type = a0.type;
let value = this.actions.get(type);
const value2 = null;
const value3 = undefined;
const r13 = value2 == a1 ? value3 : a1.state();
if (value2 != value) {
if (value.length !== 0) {
if (value2 == a1) {
value = environment.__proto__;
env1_7.verbose('no usable database; skipping action (type: ' + type + ', database: ' + a1 + ', state: ' + r13 + ')');
} else {
value = environment.__proto__;
if (r13 === (require(1911) /* metro dependency 1911: js */).DatabaseState.Open) {
transaction = a1.transaction;
binding = env1_8;
has = binding.has;
type = a0.type;
value = Reflect.apply(transaction, a1, [_fun46267, Reflect.apply(has, binding,
[type]) ? value2 : 'Dispatch ' + a0.type]);
value = value.catch(_fun46269);
type = a0.type;
if (type === 'WRITE_CACHES') {
a0.promisesToWaitOn.push(value);
}
function _fun46261() { // fn#46261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1123, offset: 0x011a3fcf, size: 208 bytes, params: 1, frame: 17
return CreateClass(AppDatabaseManager, [{key: 'handleAction', value: value_46264}, {key: 'resetModules',
value: value_46265}, {key: 'executeModules', value: value_46266}, {key: 'validateInDev', value: function() {
}}], [{key: 'handleException', value: value_46271}, {key: 'computeEntries', value: value_46272}, {key: 'register',
value: value_46274}]);
function AppDatabaseManager(a0, a1, a2) { // fn#46262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1134, offset: 0x011a409f, size: 288 bytes, params: 4, frame: 25
let binding = env1_4;
binding(this, AppDatabaseManager);
const value3 = env1_3(AppDatabaseManager.computeEntries(a0, a2), 2);
const property = value3[0];
const property2 = value3[1];
this.name = a0;
this.entries = property2;
this.actions = property;
this.lastDatabase = null;
let register = AppDatabaseManager.register;
const value4 = a0 + '_CLEAR_CACHES';
const closure = _fun46263;
Reflect.apply(register, AppDatabaseManager, [value4, ['CLEAR_CACHES'], [], closure]);
register = AppDatabaseManager.register;
const value5 = this.actions.keys();
items2 = [];
arraySpread(items2, value5, 0, closure);
Reflect.apply(register, AppDatabaseManager, [a0, items2, a1, this.handleAction.bind(this)]);
binding = env1_7;
binding.verbose('' + a0 + ' created with ' + a2.length + ' modules, ' + this.actions.size + ' distinct actions.');
function _fun46263() { // fn#46263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1396, offset: 0x011a41bf, size: 71 bytes, params: 1, frame: 13
var r2;
var value3;
var value4;
let value = environment.__proto__.__proto__;
value = _createForOfIteratorHelperLoose_46258(env0_0.entries);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
value3.reset();
value4 = value();
done = value4.done;
if (done) {
break;
}
}
} else {
value = environment.__proto__;
env1_7.verbose('no usable database; skipping action (type: ' + type + ', database: ' + a1 + ', state: ' + r13 + ')');
}
}
}
}
return value3;
}
function value_46271(a0, {type}, a2) { // fn#46271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2703, offset: 0x011a44b5, size: 133 bytes, params: 4, frame: 19
const value = environment.__proto__;
const binding = env1_7;
binding.info('disabling database · error encountered during dispatch', a2, a2.stack);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RESET_SOCKET', args: {error: a2,
action: 'AppDatabaseManager(' + type + ')'}});
}
function value_46264(a0) { // fn#46264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1728, offset: 0x011a4206, size: 106 bytes, params: 2, frame: 15
this.validateInDev(a0.type);
let value = environment.__proto__;
const id = AuthenticationStore.getId();
value = importDefault(1926) /* metro dependency 1926: DatabaseManager */;
value = value.database(id);
this.resetModules(a0, value);
this.executeModules(a0, value);
return false;
}
function value_46272(a0, a1) { // fn#46272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2919, offset: 0x011a453a, size: 256 bytes, params: 3, frame: 22
var r4;
var r8;
var value6;
var actions;
var value7;
var value8;
var value9;
var has;
var value10;
var value11;
var value12;
const env0_0 = a0;
const Map = global.Map;
const map = new Map();
const value2 = a1.map(_fun46273);
map.set('LOGOUT', []);
map.set('LOGIN_RESET', []);
const value4 = _createForOfIteratorHelperLoose_46258(value2);
const value5 = value4();
let done = value5.done;
if (!done) {
r4 = value5;
while (true) {
value6 = r4.value;
_createForOfIteratorHelperLoose_46258Binding = _createForOfIteratorHelperLoose_46258;
actions = value6.actions;
value7 = _createForOfIteratorHelperLoose_46258Binding(actions);
value8 = value7();
done = value8.done;
function value_46265(a0, a1) { // fn#46265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1891, offset: 0x011a4270, size: 164 bytes, params: 3, frame: 25
var r3;
var value;
var binding;
var verbose;
var type;
var HermesInternal;
var concat;
var _createForOfIteratorHelperLoose_46258Binding;
var entries;
var value2;
var done;
var value3;
var reset;
var value4;
let lastDatabase = this.lastDatabase;
reducibleJoin4: while (true) {
if (a1 === lastDatabase) {
break reducibleJoin4;
}
value = environment.__proto__;
binding = env1_7;
verbose = binding.verbose;
lastDatabase = this.lastDatabase;
type = a0.type;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(verbose, binding,
['database has changed (was: ' + lastDatabase + ', now: ' + a1 + ', action: ' + type + '). resetting modules.']);
_createForOfIteratorHelperLoose_46258Binding = _createForOfIteratorHelperLoose_46258;
entries = this.entries;
value = _createForOfIteratorHelperLoose_46258Binding(entries);
value2 = value();
done = value2.done;
if (!done) {
r3 = value2;
reducibleLoop2: while (true) {
value3 = r3.value;
reset = value3.reset;
Reflect.apply(reset, value3, []);
value4 = value();
done = value4.done;
if (done) {
break reducibleLoop2;
}
r3 = value4;
continue reducibleLoop2;
}
}
this.lastDatabase = a1;
break reducibleJoin4;
}
}
function value_46266(a0, a1) { // fn#46266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2184, offset: 0x011a4314, size: 317 bytes, params: 3, frame: 28
var environment;
var binding;
var transaction;
var has;
const env0_0 = a0;
const env0_1 = a1;
let type = a0.type;
let value = this.actions.get(type);
const value2 = null;
const value3 = undefined;
const r13 = value2 == a1 ? value3 : a1.state();
if (value2 != value) {
if (value.length !== 0) {
if (value2 == a1) {
value = environment.__proto__;
env1_7.verbose('no usable database; skipping action (type: ' + type + ', database: ' + a1 + ', state: ' + r13 + ')');
} else {
value = environment.__proto__;
if (r13 === (require(1911) /* metro dependency 1911: js */).DatabaseState.Open) {
transaction = a1.transaction;
binding = env1_8;
has = binding.has;
type = a0.type;
value = Reflect.apply(transaction, a1, [_fun46267, Reflect.apply(has, binding,
[type]) ? value2 : 'Dispatch ' + a0.type]);
value = value.catch(_fun46269);
type = a0.type;
if (type === 'WRITE_CACHES') {
a0.promisesToWaitOn.push(value);
}
} else {
value = environment.__proto__;
env1_7.verbose('no usable database; skipping action (type: ' + type + ', database: ' + a1 + ', state: ' + r13 + ')');
}
}
}
}
return value3;
function _fun46267(a0) { // fn#46267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2351, offset: 0x011a4451, size: 33 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_2.forEach(_fun46268);
function _fun46268(a0) { // fn#46268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2365, offset: 0x011a4472, size: 31 bytes, params: 2, frame: 13
return a0.execute(env1_0, env0_0);
}
}
function _fun46269(a0) { // fn#46269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2434, offset: 0x011a4491, size: 36 bytes, params: 2, frame: 15
return AppDatabaseManager.handleException(require, env0_0, a0);
}
}
function value_46271(a0, {type}, a2) { // fn#46271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2703, offset: 0x011a44b5, size: 133 bytes, params: 4, frame: 19
const value = environment.__proto__;
const binding = env1_7;
binding.info('disabling database · error encountered during dispatch', a2, a2.stack);
(Dispatcher).dispatch({type: 'RESET_SOCKET', args: {error: a2,
action: 'AppDatabaseManager(' + type + ')'}});
}
function value_46272(a0, a1) { // fn#46272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2919, offset: 0x011a453a, size: 256 bytes, params: 3, frame: 22
var r4;
var r8;
var value6;
var actions;
var value7;
var value8;
var value9;
var has;
var value10;
var value11;
var value12;
const env0_0 = a0;
const Map = global.Map;
const map = new Map();
const value2 = a1.map(_fun46273);
map.set('LOGOUT', []);
map.set('LOGIN_RESET', []);
const value4 = _createForOfIteratorHelperLoose_46258(value2);
const value5 = value4();
let done = value5.done;
if (!done) {
r8 = value8;
r4 = value5;
while (true) {
value9 = r8.value;
has = map.has;
if (!Reflect.apply(has, map, [value9])) {
map.set(value9, []);
value6 = r4.value;
_createForOfIteratorHelperLoose_46258Binding = _createForOfIteratorHelperLoose_46258;
actions = value6.actions;
value7 = _createForOfIteratorHelperLoose_46258Binding(actions);
value8 = value7();
done = value8.done;
if (!done) {
r8 = value8;
while (true) {
value9 = r8.value;
has = map.has;
if (!Reflect.apply(has, map, [value9])) {
map.set(value9, []);
}
value10 = map.get(value9);
value10.push(value6);
value11 = value7();
done = value11.done;
if (done) {
break;
}
r8 = value11;
continue;
}
}
value10 = map.get(value9);
value10.push(value6);
value11 = value7();
done = value11.done;
value12 = value4();
done = value12.done;
if (done) {
break;
}
r8 = value11;
r4 = value12;
continue;
}
}
value12 = value4();
done = value12.done;
if (done) {
break;
return [map, value2];
function _fun46273(a0) { // fn#46273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2956, offset: 0x011a463a, size: 63 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
const Entry = (AppDatabaseManagerEntryModule).Entry;
const binding = env0_0;
value = Object.create(Entry.prototype, {constructor: {value: Entry}});
const entry = new Entry(binding, a0);
return entry instanceof Object ? entry : value;
}
r4 = value12;
continue;
}
}
return [map, value2];
}
function value_46274(a0, a1, a2, a3) { // fn#46274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:3261, offset: 0x011a4679, size: 143 bytes, params: 5, frame: 24
var environment;
const env0_0 = a3;
let value = environment.__proto__;
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
const register = defaultImport.register;
const Object = global.Object;
const value2 = Object.fromEntries(a1.map(function(a0) {
return [a0, importAll];
}));
const DispatchBand = (require(694) /* metro dependency 694: Dispatcher */).DispatchBand;
const Database = DispatchBand.Database;
value = Reflect.apply(register, defaultImport, [a0, value2, function() {
}, Database]);
defaultImport.addDependencies(value, a2);
return value;
}
function _fun46263() { // fn#46263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:1396, offset: 0x011a41bf, size: 71 bytes, params: 1, frame: 13
var r2;
var value3;
var value4;
let value = environment.__proto__.__proto__;
value = _createForOfIteratorHelperLoose_46258(env0_0.entries);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
value3.reset();
value4 = value();
done = value4.done;
if (done) {
break;
}
function value_46274(a0, a1, a2, a3) { // fn#46274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:3261, offset: 0x011a4679, size: 143 bytes, params: 5, frame: 24
var environment;
const env0_0 = a3;
let value = environment.__proto__;
const defaultImport = Dispatcher;
const register = defaultImport.register;
const Object = global.Object;
const value2 = Object.fromEntries(a1.map(function(a0) {
return [a0, importAll];
}));
const DispatchBand = (DispatcherModule).DispatchBand;
const Database = DispatchBand.Database;
value = Reflect.apply(register, defaultImport, [a0, value2, function() {
}, Database]);
defaultImport.addDependencies(value, a2);
return value;
}
}
}
function _fun46267(a0) { // fn#46267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2351, offset: 0x011a4451, size: 33 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_2.forEach(_fun46268);
}
function _fun46269(a0) { // fn#46269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2434, offset: 0x011a4491, size: 36 bytes, params: 2, frame: 15
return AppDatabaseManager.handleException(require, env0_0, a0);
}
function _fun46273(a0) { // fn#46273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2956, offset: 0x011a463a, size: 63 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
const Entry = (require(5228) /* metro dependency 5228: AppDatabaseManagerEntry */).Entry;
const binding = env0_0;
value = Object.create(Entry.prototype, {constructor: {value: Entry}});
const entry = new Entry(binding, a0);
return entry instanceof Object ? entry : value;
}
function _fun46268(a0) { // fn#46268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5405:2365, offset: 0x011a4472, size: 31 bytes, params: 2, frame: 13
return a0.execute(env1_0, env0_0);
}
global.__d(_fun46257, 5227, [57, 6, 7, 1226, 3, 1926, 1911, 694, 5228,
2]) /* metro module 5227, dependencies: [57, 6, 7, 1226, 3, 1926, 1911, 694, 5228, 2] */;
@@ -1,4 +1,18 @@
/* Metro module 1926; source: modules/app_database/system/DatabaseManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 1226, 3, 694, 1927, 1911, 566, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DispatcherModule from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as JsModule from '../../../external/discord_common/js/packages/kv-storage/js/index.tsx'; /* Metro dependency 1911 */
function _fun21293(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:6, offset: 0x00eed014, size: 349 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_21296 = function(a0, a1) {
@@ -49,466 +63,486 @@ function _fun21293(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const env0_7 = importDefault(15) /* metro dependency 15 */;
const env0_8 = importDefault(17) /* metro dependency 17 */;
const env0_9 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('DatabaseManager');
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
value = _fun21304(Store);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/system/DatabaseManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/system/DatabaseManager.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_21294(a0, a1) { // fn#21294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:178, offset: 0x00eed171, size: 370 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)) {
function _createForOfIteratorHelperLoose_21294(a0, a1) { // fn#21294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:178, offset: 0x00eed171, size: 370 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);
}
return _fun21295;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21296(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun21295;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21296(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_21296(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_21296(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun21295;
}
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 _fun21295() { // fn#21295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:749, 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 _isNativeReflectConstruct_21297() { // fn#21297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1088, offset: 0x00eed2e3, size: 94 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_21297_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _trySpeculativelyOpenDatabaseAsync() { // fn#21301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4788, offset: 0x00eed35e, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun21303).apply(this, arguments);
function* _fun21303(a0) { // fn#21303, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4879, offset: 0x00eed397, size: 155 bytes, params: 2, frame: 18
var binding2;
var property;
var value4;
var Database;
var open;
var value5;
var value6;
var value7;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = env2_15(a0);
let binding = env2_11;
binding.verbose('speculatively opening ' + value3);
try {
binding = env2_0;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
binding2 = env2_3;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
property = binding2[10];
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
Database = value4.Database;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
open = Database.open;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
value5 = Reflect.apply(open, Database, [value3]);
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
return value7 ? value6 : value6;
}
}
function _fun21304(a0) { // fn#21304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1322, offset: 0x00eed432, size: 297 bytes, params: 2, frame: 17
const DatabaseManager2 = DatabaseManager;
Inherits(DatabaseManager2, a0);
const items2 = [{key: 'initialize', value: value_21310}];
items2[1] = {key: 'databaseName', value: function(a0) {
return _databaseName(a0);
}};
items2[2] = {key: 'database', value: function(a0) {
var r0;
var value2;
var value = null;
if (value != a0) {
value2 = this.databases.get(a0);
r0 = value != value2 ? value2 : value;
} else {
r0 = value;
}
return r0;
}};
items2[3] = {key: 'carefullyOpenDatabase', value: value_21314};
items2[4] = {key: 'replaceDisableAllDatabases', value: value_21317};
items2[5] = {key: 'remove', value: value_21318};
items2[6] = {key: 'handleClearCaches', value: function(a0) {
if (a0.preventWritingCachesAgainThisSession) {
this.preventWritingCachesAgainThisSession = true;
}
this.replaceDisableAllDatabases('DatabaseManager (' + a0.reason + ')');
}};
items2[7] = {key: 'handleConnectionOpen', value: value_21320};
items2[8] = {key: 'handleAuthenticationStoreChanged', value: value_21321};
const env0_0 = Module00005(_fun21323);
items2[9] = {key: 'carefullySpeculativelyOpen', value: value_21325};
return CreateClass(DatabaseManager2, items2);
function DatabaseManager() { // fn#21305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1334, offset: 0x00eed55b, size: 263 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
env1_5(this, DatabaseManager);
const items2 = [Dispatcher];
items2[1] = {CLEAR_CACHES: CLEAR_CACHES_21306, CONNECTION_CLOSED: CONNECTION_CLOSED_21307,
CONNECTION_OPEN: CONNECTION_OPEN_21308, LOGOUT: LOGOUT_21309};
const DispatchBand = (DispatcherModule).DispatchBand;
const Early = DispatchBand.Early;
items2[2] = Early;
const value3 = env1_8(DatabaseManager);
value = env1_7(this, _isNativeReflectConstruct_21297() ? global.Reflect.construct(value3, items2,
env1_8(this).constructor) : value3.apply(this, items2));
const Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
value.databases = map instanceof Object ? map : value4;
value.activeUserId = null;
value.preventWritingCachesAgainThisSession = false;
return value;
function DatabaseManagerCLEAR_CACHES(a0) { // fn#21306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1578, owner: DatabaseManager.CLEAR_CACHES, offset: 0x00eed662, size: 25 bytes, params: 2, frame: 11
return env0_0.handleClearCaches(a0);
}
function DatabaseManagerCONNECTION_CLOSED() { // fn#21307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1622, owner: DatabaseManager.CONNECTION_CLOSED, offset: 0x00eed67b, size: 19 bytes, params: 1, frame: 9
return env0_0.handleAuthenticationStoreChanged();
}
function DatabaseManagerCONNECTION_OPEN() { // fn#21308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1679, owner: DatabaseManager.CONNECTION_OPEN, offset: 0x00eed68e, size: 19 bytes, params: 1, frame: 9
return env0_0.handleConnectionOpen();
}
function DatabaseManagerLOGOUT() { // fn#21309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1715, owner: DatabaseManager.LOGOUT, offset: 0x00eed67b, size: 19 bytes, params: 1, frame: 9
return env0_0.handleAuthenticationStoreChanged();
}
}
function value_21310() { // fn#21310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1941, offset: 0x00eed6a1, size: 100 bytes, params: 1, frame: 15
var environment;
const waitFor = this.waitFor;
let value = environment.__proto__;
const authenticationStoreBinding = AuthenticationStore;
Reflect.apply(waitFor, this, [authenticationStoreBinding]);
const carefullySpeculativelyOpen = this.carefullySpeculativelyOpen;
value = importAll(1927) /* metro dependency 1927: StartupDataNative */;
const getUserId = value.getUserId;
Reflect.apply(carefullySpeculativelyOpen, this, [Reflect.apply(getUserId, value, [])]);
this.handleAuthenticationStoreChanged();
authenticationStoreBinding.addChangeListener(_fun21311);
function _fun21311() { // fn#21311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2083, offset: 0x00eed67b, size: 19 bytes, params: 1, frame: 9
return env0_0.handleAuthenticationStoreChanged();
}
}
function value_21314(a0) { // fn#21314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2327, offset: 0x00eed747, size: 184 bytes, params: 2, frame: 20
var environment;
var databases;
var value;
var value2;
if (this.preventWritingCachesAgainThisSession) {
value = environment.__proto__;
env1_11.verbose('Not opening database because caches have been manually cleared.');
return null;
}
if (a0 != null) {
databases = this.databases;
if (!databases.has(a0)) {
value = tryOpenDatabase(a0);
value2 = environment.__proto__;
env1_11.verbose('added database (' + a0 + ' → ' + value + ')');
this.databases.set(a0, value);
this.emitChange();
}
}
r5 = r6;
return this.database(a0);
function tryOpenDatabase(a0) { // fn#21315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2515, owner: value_21314.tryOpenDatabase, offset: 0x00eed7ff, size: 140 bytes, params: 2, frame: 23
var r0;
var value4;
var error;
var error2;
var value5;
var value6;
const value2 = _databaseName(a0);
let binding = env2_11;
const verbose = binding.verbose;
let HermesInternal = global.HermesInternal;
Reflect.apply(verbose, binding, ['synchronously opening ' + value2]);
const closure = _fun21316;
let r7 = 0;
exceptionMain1: while (true) {
try {
value4 = closure();
} catch (error) {
while (true) {
binding = env2_11;
error2 = binding.error;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error2, binding, ['tryUntil ' + r7, error]);
value5 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
value6 = null;
if (value5 < 50) {
r7 = value5;
break;
}
r0 = value6;
continue;
return r0;
continue exceptionMain1;
}
}
r0 = value4;
return r0;
}
function _fun21316() { // fn#21316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2724, offset: 0x00eed88b, size: 61 bytes, params: 1, frame: 14
const Database = (JsModule).Database;
return Database.openSyncUnsafe(env0_0, {invalidateDisabledHandles: true});
}
}
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun21295;
}
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 _isNativeReflectConstruct_21297() { // fn#21297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1088, offset: 0x00eed2e3, size: 94 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_21297_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _trySpeculativelyOpenDatabaseAsync() { // fn#21301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4788, offset: 0x00eed35e, size: 48 bytes, params: 1, frame: 14
return env0_4(_fun21303).apply(this, arguments);
}
function _fun21304(a0) { // fn#21304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1322, offset: 0x00eed432, size: 297 bytes, params: 2, frame: 17
const closure = DatabaseManager;
env0_9(closure, a0);
const binding = env0_6;
const items2 = [{key: 'initialize', value: value_21310}];
items2[1] = {key: 'databaseName', value: function(a0) {
return _databaseName(a0);
}};
items2[2] = {key: 'database', value: function(a0) {
var r0;
var value2;
var value = null;
if (value != a0) {
value2 = this.databases.get(a0);
r0 = value != value2 ? value2 : value;
} else {
r0 = value;
}
return r0;
}};
items2[3] = {key: 'carefullyOpenDatabase', value: value_21314};
items2[4] = {key: 'replaceDisableAllDatabases', value: value_21317};
items2[5] = {key: 'remove', value: value_21318};
items2[6] = {key: 'handleClearCaches', value: function(a0) {
if (a0.preventWritingCachesAgainThisSession) {
this.preventWritingCachesAgainThisSession = true;
}
this.replaceDisableAllDatabases('DatabaseManager (' + a0.reason + ')');
}};
items2[7] = {key: 'handleConnectionOpen', value: value_21320};
items2[8] = {key: 'handleAuthenticationStoreChanged', value: value_21321};
const env0_0 = env0_4(_fun21323);
items2[9] = {key: 'carefullySpeculativelyOpen', value: value_21325};
return binding(closure, items2);
}
function* _fun21303(a0) { // fn#21303, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4879, offset: 0x00eed397, size: 155 bytes, params: 2, frame: 18
var binding2;
var property;
var value4;
var Database;
var open;
var value5;
var value6;
var value7;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = env2_15(a0);
let binding = env2_11;
binding.verbose('speculatively opening ' + value3);
try {
binding = env2_0;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
binding2 = env2_3;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
property = binding2[10];
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
Database = value4.Database;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
open = Database.open;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
try {
value5 = Reflect.apply(open, Database, [value3]);
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_11;
binding.warn("couldn't speculatively open database.", error);
return null;
}
return value7 ? value6 : value6;
}
function DatabaseManager() { // fn#21305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1334, offset: 0x00eed55b, size: 263 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
env1_5(this, DatabaseManager);
const items2 = [importDefault(694) /* metro dependency 694: Dispatcher */];
items2[1] = {CLEAR_CACHES: CLEAR_CACHES_21306, CONNECTION_CLOSED: CONNECTION_CLOSED_21307,
CONNECTION_OPEN: CONNECTION_OPEN_21308, LOGOUT: LOGOUT_21309};
const DispatchBand = (require(694) /* metro dependency 694: Dispatcher */).DispatchBand;
const Early = DispatchBand.Early;
items2[2] = Early;
const value3 = env1_8(DatabaseManager);
value = env1_7(this, _isNativeReflectConstruct_21297() ? global.Reflect.construct(value3, items2,
env1_8(this).constructor) : value3.apply(this, items2));
const Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
value.databases = map instanceof Object ? map : value4;
value.activeUserId = null;
value.preventWritingCachesAgainThisSession = false;
return value;
}
function value_21310() { // fn#21310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1941, offset: 0x00eed6a1, size: 100 bytes, params: 1, frame: 15
var environment;
const waitFor = this.waitFor;
let value = environment.__proto__;
Reflect.apply(waitFor, this, [AuthenticationStore]);
const carefullySpeculativelyOpen = this.carefullySpeculativelyOpen;
value = importAll(1927) /* metro dependency 1927: StartupDataNative */;
const getUserId = value.getUserId;
Reflect.apply(carefullySpeculativelyOpen, this, [Reflect.apply(getUserId, value, [])]);
this.handleAuthenticationStoreChanged();
AuthenticationStore.addChangeListener(_fun21311);
}
function value_21314(a0) { // fn#21314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2327, offset: 0x00eed747, size: 184 bytes, params: 2, frame: 20
var environment;
var databases;
var value;
var value2;
if (this.preventWritingCachesAgainThisSession) {
value = environment.__proto__;
env1_11.verbose('Not opening database because caches have been manually cleared.');
return null;
}
if (a0 != null) {
databases = this.databases;
if (!databases.has(a0)) {
value = tryOpenDatabase(a0);
value2 = environment.__proto__;
env1_11.verbose('added database (' + a0 + ' → ' + value + ')');
this.databases.set(a0, value);
function value_21317(a0) { // fn#21317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2954, offset: 0x00eed8c8, size: 189 bytes, params: 2, frame: 18
var r3;
var value3;
var value4;
var value5;
let value = environment.__proto__;
env1_11.info('disabling and nulling all databases (reason: ' + a0 + ')');
const _createForOfIteratorHelperLoose_21294Binding = _createForOfIteratorHelperLoose_21294;
let databases = this.databases;
value = databases.keys();
value = _createForOfIteratorHelperLoose_21294Binding(value);
const value2 = value();
let done = value2.done;
if (!done) {
r3 = value2;
while (true) {
value3 = r3.value;
databases = this.databases;
value4 = databases.get(value3);
if (value4 != null) {
value4.disable(a0);
}
if (value4 == null) {
continue;
}
value4.close();
databases = this.databases;
databases.set(value3, null);
value5 = value();
done = value5.done;
if (done) {
break;
}
r3 = value5;
continue;
}
}
this.emitChange();
}
}
return this.database(a0);
}
function value_21317(a0) { // fn#21317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2954, offset: 0x00eed8c8, size: 189 bytes, params: 2, frame: 18
var r3;
var value3;
var value4;
var value5;
let value = environment.__proto__;
env1_11.info('disabling and nulling all databases (reason: ' + a0 + ')');
const _createForOfIteratorHelperLoose_21294Binding = _createForOfIteratorHelperLoose_21294;
let databases = this.databases;
value = databases.keys();
value = _createForOfIteratorHelperLoose_21294Binding(value);
const value2 = value();
let done = value2.done;
if (!done) {
r3 = value2;
while (true) {
value3 = r3.value;
databases = this.databases;
value4 = databases.get(value3);
if (value4 != null) {
value4.disable(a0);
}
if (value4 == null) {
continue;
}
value4.close();
databases = this.databases;
databases.set(value3, null);
value5 = value();
done = value5.done;
if (done) {
break;
}
r3 = value5;
continue;
}
}
this.emitChange();
}
function value_21318(a0) { // fn#21318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:3256, offset: 0x00eed985, size: 127 bytes, params: 2, frame: 20
const value = this.databases.get(a0);
env1_11.log('removing database (user: ' + a0 + ', database: ' + value + ')');
if (value != null) {
value.close();
}
this.databases.delete(a0);
this.emitChange();
}
function value_21320() { // fn#21320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:3647, offset: 0x00eeda4f, size: 128 bytes, params: 1, frame: 16
const value = environment.__proto__;
const id = AuthenticationStore.getId();
const value3 = this.databases.get(id);
const value4 = undefined;
if (value3 == null && (value3 == null ? value4 : value3.state()) !== (require(1911) /* metro dependency 1911: js */).DatabaseState.Open) {
this.remove(id);
}
this.carefullyOpenDatabase(id);
return value4;
}
function value_21321() { // fn#21321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:3861, offset: 0x00eedacf, size: 189 bytes, params: 1, frame: 24
var databases;
var value3;
const value = environment.__proto__;
const id = AuthenticationStore.getId();
const activeUserId = this.activeUserId;
if (id !== activeUserId) {
databases = this.databases;
value3 = databases.get(activeUserId);
env1_11.verbose('active user changed (now: ' + id + ', was: ' + activeUserId + ', was: ' + value3 + ')');
if (value3 != null) {
value3.close();
}
(importAll(1927) /* metro dependency 1927: StartupDataNative */).setUserId(id);
this.activeUserId = id;
databases = this.databases;
databases.delete(activeUserId);
}
}
function* _fun21323(a0) { // fn#21323, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4148, offset: 0x00eedb95, size: 285 bytes, params: 2, frame: 22
var environment;
var databases;
var value4;
var value5;
let value = undefined;
if (false) {
return value;
}
if (this.preventWritingCachesAgainThisSession) {
value = environment.__proto__.__proto__;
env2_11.verbose('Not opening database because caches have been manually cleared.');
} else {
if (a0 == null) {
return undefined;
}
yield trySpeculativelyOpenDatabaseAsync(a0);
value = undefined;
if (false) {
return value;
}
if (value == null) {
value5 = environment.__proto__.__proto__;
env2_11.verbose('discarding speculative database (' + a0 + ' → ' + value + ')');
function value_21318(a0) { // fn#21318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:3256, offset: 0x00eed985, size: 127 bytes, params: 2, frame: 20
const value = this.databases.get(a0);
env1_11.log('removing database (user: ' + a0 + ', database: ' + value + ')');
if (value != null) {
value.close();
}
} else {
databases = this.databases;
if (databases.has(a0)) {
value5 = environment.__proto__.__proto__;
env2_11.verbose('discarding speculative database (' + a0 + ' → ' + value + ')');
if (value != null) {
value.close();
this.databases.delete(a0);
this.emitChange();
}
function value_21320() { // fn#21320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:3647, offset: 0x00eeda4f, size: 128 bytes, params: 1, frame: 16
const value = environment.__proto__;
const id = AuthenticationStore.getId();
const value3 = this.databases.get(id);
const value4 = undefined;
if (value3 == null && (value3 == null ? value4 : value3.state()) !== (require(1911) /* metro dependency 1911: js */).DatabaseState.Open) {
this.remove(id);
}
this.carefullyOpenDatabase(id);
return value4;
}
function value_21321() { // fn#21321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:3861, offset: 0x00eedacf, size: 189 bytes, params: 1, frame: 24
var databases;
var value3;
const value = environment.__proto__;
const id = AuthenticationStore.getId();
const activeUserId = this.activeUserId;
if (id !== activeUserId) {
databases = this.databases;
value3 = databases.get(activeUserId);
env1_11.verbose('active user changed (now: ' + id + ', was: ' + activeUserId + ', was: ' + value3 + ')');
if (value3 != null) {
value3.close();
}
(importAll(1927) /* metro dependency 1927: StartupDataNative */).setUserId(id);
this.activeUserId = id;
databases = this.databases;
databases.delete(activeUserId);
}
}
function* _fun21323(a0) { // fn#21323, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4148, offset: 0x00eedb95, size: 285 bytes, params: 2, frame: 22
var environment;
var databases;
var value4;
var value5;
let value = undefined;
if (false) {
return value;
}
if (this.preventWritingCachesAgainThisSession) {
value = environment.__proto__.__proto__;
env2_11.verbose('Not opening database because caches have been manually cleared.');
} else {
value4 = environment.__proto__.__proto__;
env2_11.verbose('added speculative database (' + a0 + ' → ' + value + ')');
this.databases.set(a0, value);
this.emitChange();
}
}
}
}
function DatabaseManagerCLEAR_CACHES(a0) { // fn#21306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1578, owner: DatabaseManager.CLEAR_CACHES, offset: 0x00eed662, size: 25 bytes, params: 2, frame: 11
return env0_0.handleClearCaches(a0);
}
function DatabaseManagerCONNECTION_CLOSED() { // fn#21307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:1622, owner: DatabaseManager.CONNECTION_CLOSED, offset: 0x00eed67b, size: 19 bytes, params: 1, frame: 9
return env0_0.handleAuthenticationStoreChanged();
}
function tryOpenDatabase(a0) { // fn#21315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2515, owner: value_21314.tryOpenDatabase, offset: 0x00eed7ff, size: 140 bytes, params: 2, frame: 23
var r0;
var value4;
var error;
var error2;
var value5;
var value6;
const value2 = _databaseName(a0);
let binding = env2_11;
const verbose = binding.verbose;
let HermesInternal = global.HermesInternal;
Reflect.apply(verbose, binding, ['synchronously opening ' + value2]);
const closure = _fun21316;
let r7 = 0;
exceptionMain1: while (true) {
try {
value4 = closure();
} catch (error) {
while (true) {
binding = env2_11;
error2 = binding.error;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error2, binding, ['tryUntil ' + r7, error]);
value5 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
value6 = null;
if (value5 < 50) {
r7 = value5;
break;
if (a0 == null) {
return undefined;
}
yield trySpeculativelyOpenDatabaseAsync(a0);
value = undefined;
if (false) {
return value;
}
if (value == null) {
value5 = environment.__proto__.__proto__;
env2_11.verbose('discarding speculative database (' + a0 + ' → ' + value + ')');
if (value != null) {
value.close();
}
} else {
databases = this.databases;
if (databases.has(a0)) {
value5 = environment.__proto__.__proto__;
env2_11.verbose('discarding speculative database (' + a0 + ' → ' + value + ')');
if (value != null) {
value.close();
}
} else {
value4 = environment.__proto__.__proto__;
env2_11.verbose('added speculative database (' + a0 + ' → ' + value + ')');
this.databases.set(a0, value);
this.emitChange();
}
}
r0 = value6;
continue;
return r0;
continue exceptionMain1;
}
function trySpeculativelyOpenDatabaseAsync() { // fn#21324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4312, offset: 0x00eedcb2, size: 30 bytes, params: 1, frame: 13
return env3_16.apply(this, arguments);
}
}
r0 = value4;
return r0;
function value_21325() { // fn#21325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:4642, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
function _fun21316() { // fn#21316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2053:2724, offset: 0x00eed88b, size: 61 bytes, params: 1, frame: 14
const Database = (require(1911) /* metro dependency 1911: js */).Database;
return Database.openSyncUnsafe(env0_0, {invalidateDisabledHandles: true});
}
global.__d(_fun21293, 1926, [5, 6, 7, 15, 17, 18, 1226, 3, 694, 1927, 1911, 566,
2]) /* metro module 1926, dependencies: [5, 6, 7, 15, 17, 18, 1226, 3, 694, 1927, 1911, 566, 2] */;
@@ -1,35 +1,37 @@
/* Metro module 1927; source: modules/app_database/system/StartupData.native.tsx; dependencies: [27, 477, 1928, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun21326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2054:6, offset: 0x00eedcd0, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/system/StartupData.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/system/StartupData.native.tsx');
exports.getUserId = getUserId;
exports.setUserId = setUserId;
}
function getUserId() { // fn#21327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2054:216, offset: 0x00eedd55, size: 116 bytes, params: 1, frame: 13
var userId;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(1928) /* metro dependency 1928: NativeAppDatabaseModule */;
userId = value.getConstants().userId;
} else {
var DCDAppDatabase = NativeModules.DCDAppDatabase;
userId = DCDAppDatabase.userId;
function getUserId() { // fn#21327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2054:216, offset: 0x00eedd55, size: 116 bytes, params: 1, frame: 13
var userId;
var value;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(1928) /* metro dependency 1928: NativeAppDatabaseModule */;
userId = value.getConstants().userId;
} else {
var DCDAppDatabase = NativeModules.DCDAppDatabase;
userId = DCDAppDatabase.userId;
}
value = null;
return value != userId ? userId : value;
}
value = null;
return value != userId ? userId : value;
}
function setUserId(a0) { // fn#21328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2054:386, offset: 0x00eeddc9, size: 97 bytes, params: 2, frame: 13
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(1928) /* metro dependency 1928: NativeAppDatabaseModule */).setUserId(a0);
} else {
NativeModules.DCDAppDatabase.setUserId(a0);
function setUserId(a0) { // fn#21328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2054:386, offset: 0x00eeddc9, size: 97 bytes, params: 2, frame: 13
if (PlatformUtilsModule.isAndroid()) {
(importDefault(1928) /* metro dependency 1928: NativeAppDatabaseModule */).setUserId(a0);
} else {
NativeModules.DCDAppDatabase.setUserId(a0);
}
}
}
global.__d(_fun21326, 1927, [27, 477, 1928, 2]) /* metro module 1927, dependencies: [27, 477, 1928, 2] */;
@@ -1,4 +1,10 @@
/* Metro module 4889; source: modules/app_database/util/ExtendedMemoryLru.tsx; dependencies: [57, 6, 7, 4890, 4891, 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 Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as LruModule from './Lru.tsx'; /* Metro dependency 4890 */
function _fun43027(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:6, offset: 0x0114896f, size: 173 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_43030 = function(a0, a1) {
@@ -46,196 +52,200 @@ function _fun43027(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
let value = _fun43031();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/util/ExtendedMemoryLru.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/util/ExtendedMemoryLru.tsx');
exports.ExtendedMemoryLru = value;
}
function _createForOfIteratorHelperLoose_43028(a0, a1) { // fn#43028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:130, offset: 0x01148a1c, size: 370 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)) {
function _createForOfIteratorHelperLoose_43028(a0, a1) { // fn#43028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:130, offset: 0x01148a1c, size: 370 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);
}
return _fun43029;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43030(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun43029;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_43030(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_43030(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_43030(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun43029;
}
return _fun43029;
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 _fun43029() { // fn#43029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:701, 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]};
}
}
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 _fun43031() { // fn#43031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:1046, offset: 0x01148b8e, size: 431 bytes, params: 1, frame: 15
return env0_5(ExtendedMemoryLru, [{key: 'totalLength', get: function() {
return this.primary.length + this.extended.length;
}}, {key: 'primaryCapacity', get: function() {
return this.primary.capacity;
}}, {key: 'extendedCapacity', get: function() {
return this.extended.capacity;
}}, {key: 'clear', value: function() {
this.primary.clear();
this.extended.clear();
}}, {key: 'has', value: function(a0) {
return this.primary.has(a0);
}}, {key: 'hasExtended', value: function(a0) {
return this.primary.has(a0) || this.extended.has(a0);
}}, {key: 'get', value: function(a0) {
return this.primary.get(a0);
}}, {key: 'put', value: function(a0, a1) {
var value = this.primary.put(a0, a1);
if (value !== undefined) {
this.extended.put(value[0], value[1]);
function _fun43031() { // fn#43031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:1046, offset: 0x01148b8e, size: 431 bytes, params: 1, frame: 15
return CreateClass(ExtendedMemoryLru, [{key: 'totalLength', get: function() {
return this.primary.length + this.extended.length;
}}, {key: 'primaryCapacity', get: function() {
return this.primary.capacity;
}}, {key: 'extendedCapacity', get: function() {
return this.extended.capacity;
}}, {key: 'clear', value: function() {
this.primary.clear();
this.extended.clear();
}}, {key: 'has', value: function(a0) {
return this.primary.has(a0);
}}, {key: 'hasExtended', value: function(a0) {
return this.primary.has(a0) || this.extended.has(a0);
}}, {key: 'get', value: function(a0) {
return this.primary.get(a0);
}}, {key: 'put', value: function(a0, a1) {
var value = this.primary.put(a0, a1);
if (value !== undefined) {
this.extended.put(value[0], value[1]);
}
}}, {key: 'delete', value: function(a0) {
var value = this.primary.delete(a0);
var value2 = this.extended.delete(a0);
this.upstreamItems();
return value || value2;
}}, {key: 'upstreamItems', value: value_43042}, {key: 'canUpstreamItems', value: function() {
return this.primary.length < this.primary.capacity && this.extended.length > 0;
}}, {key: 'entries', value: function() {
return this.primary.entries();
}}, {key: 'keys', value: function() {
return this.primary.keys();
}}, {key: 'values', value: function() {
return this.primary.values();
}}, {key: 'allEntries', value: value_43047}, {key: 'allKeys', value: value_43048}, {key: 'allValues',
value: value_43049}]);
function ExtendedMemoryLru(a0, a1) { // fn#43032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:1067, offset: 0x01148d3d, size: 126 bytes, params: 3, frame: 17
const value = environment.__proto__;
env1_4(this, ExtendedMemoryLru);
const Lru = (LruModule).Lru;
this.primary = new Lru(a0);
this.extended = new Lru(a1);
}
}}, {key: 'delete', value: function(a0) {
var value = this.primary.delete(a0);
var value2 = this.extended.delete(a0);
this.upstreamItems();
return value || value2;
}}, {key: 'upstreamItems', value: value_43042}, {key: 'canUpstreamItems', value: function() {
return this.primary.length < this.primary.capacity && this.extended.length > 0;
}}, {key: 'entries', value: function() {
return this.primary.entries();
}}, {key: 'keys', value: function() {
return this.primary.keys();
}}, {key: 'values', value: function() {
return this.primary.values();
}}, {key: 'allEntries', value: value_43047}, {key: 'allKeys', value: value_43048}, {key: 'allValues',
value: value_43049}]);
}
function ExtendedMemoryLru(a0, a1) { // fn#43032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:1067, offset: 0x01148d3d, size: 126 bytes, params: 3, frame: 17
const value = environment.__proto__;
env1_4(this, ExtendedMemoryLru);
const Lru = (require(4890) /* metro dependency 4890: Lru */).Lru;
this.primary = new Lru(a0);
this.extended = new Lru(a1);
}
function value_43042() { // fn#43042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:1951, offset: 0x01148efa, size: 158 bytes, params: 1, frame: 21
var r1;
var value;
var _createForOfIteratorHelperLoose_43028Binding;
var extended;
var value3;
var value4;
var done;
var value5;
var value6;
var property;
var property2;
var primary;
var value7;
let canUpstreamItems = this.canUpstreamItems;
if (Reflect.apply(canUpstreamItems, this, [])) {
value = environment.__proto__;
_createForOfIteratorHelperLoose_43028Binding = _createForOfIteratorHelperLoose_43028;
extended = this.extended;
value3 = _createForOfIteratorHelperLoose_43028Binding(extended.entries());
value4 = value3();
done = value4.done;
if (!done) {
r1 = value4;
while (true) {
value5 = r1.value;
value6 = env1_3(value5, 2);
property = value6[0];
property2 = value6[1];
primary = this.primary;
primary.put(property, property2);
function value_43042() { // fn#43042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:1951, offset: 0x01148efa, size: 158 bytes, params: 1, frame: 21
var r1;
var value;
var _createForOfIteratorHelperLoose_43028Binding;
var extended;
var value3;
var value4;
var done;
var value5;
var value6;
var property;
var property2;
var primary;
var value7;
let canUpstreamItems = this.canUpstreamItems;
if (Reflect.apply(canUpstreamItems, this, [])) {
value = environment.__proto__;
_createForOfIteratorHelperLoose_43028Binding = _createForOfIteratorHelperLoose_43028;
extended = this.extended;
extended.delete(property);
canUpstreamItems = this.canUpstreamItems;
if (!Reflect.apply(canUpstreamItems, this, [])) {
break;
value3 = _createForOfIteratorHelperLoose_43028Binding(extended.entries());
value4 = value3();
done = value4.done;
if (!done) {
r1 = value4;
while (true) {
value5 = r1.value;
value6 = env1_3(value5, 2);
property = value6[0];
property2 = value6[1];
primary = this.primary;
primary.put(property, property2);
extended = this.extended;
extended.delete(property);
canUpstreamItems = this.canUpstreamItems;
if (!Reflect.apply(canUpstreamItems, this, [])) {
break;
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r1 = value7;
continue;
}
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r1 = value7;
continue;
}
}
function value_43047() { // fn#43047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:2518, offset: 0x01149009, size: 74 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importAll(4891) /* metro dependency 4891: Iterable */;
const chain = value.chain;
const extended = this.extended;
const value2 = extended.entries();
const primary = this.primary;
return Reflect.apply(chain, value, [value2, primary.entries()]);
}
function value_43048() { // fn#43048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:2622, offset: 0x01149053, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importAll(4891) /* metro dependency 4891: Iterable */;
const chain = value.chain;
const extended = this.extended;
const value2 = extended.keys();
const primary = this.primary;
return Reflect.apply(chain, value, [value2, primary.keys()]);
}
function value_43049() { // fn#43049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:2722, offset: 0x0114909b, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importAll(4891) /* metro dependency 4891: Iterable */;
const chain = value.chain;
const extended = this.extended;
const value2 = extended.values();
const primary = this.primary;
return Reflect.apply(chain, value, [value2, primary.values()]);
}
}
}
function value_43047() { // fn#43047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:2518, offset: 0x01149009, size: 74 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importAll(4891) /* metro dependency 4891: Iterable */;
const chain = value.chain;
const extended = this.extended;
const value2 = extended.entries();
const primary = this.primary;
return Reflect.apply(chain, value, [value2, primary.entries()]);
}
function value_43048() { // fn#43048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:2622, offset: 0x01149053, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importAll(4891) /* metro dependency 4891: Iterable */;
const chain = value.chain;
const extended = this.extended;
const value2 = extended.keys();
const primary = this.primary;
return Reflect.apply(chain, value, [value2, primary.keys()]);
}
function value_43049() { // fn#43049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5067:2722, offset: 0x0114909b, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importAll(4891) /* metro dependency 4891: Iterable */;
const chain = value.chain;
const extended = this.extended;
const value2 = extended.values();
const primary = this.primary;
return Reflect.apply(chain, value, [value2, primary.values()]);
}
global.__d(_fun43027, 4889, [57, 6, 7, 4890, 4891,
2]) /* metro module 4889, dependencies: [57, 6, 7, 4890, 4891, 2] */;
+43 -41
View File
@@ -1,55 +1,57 @@
/* Metro module 4891; source: modules/app_database/util/Iterable.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5069:6, offset: 0x0114947b, size: 133 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = _fun43067();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/util/Iterable.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/util/Iterable.tsx');
exports.chain = chain;
}
function _fun43067() { // fn#43067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5069:118, offset: 0x01149500, size: 88 bytes, params: 1, frame: 15
const binding = env0_1;
const closure = Chained;
const Symbol = global.Symbol;
return binding(closure, [{key: Symbol.iterator, value: function() {
return this;
}}, {key: 'next', value: function() {
var value;
var property = this.index;
if (property < this.items.length) {
loopExit1: while (true) {
property = this.items;
property = property[this.index];
value = property.next();
if (value.done) {
this.index += 1;
property = this.index;
if (!(property < this.items.length)) {
return {done: true, value: undefined};
function _fun43067() { // fn#43067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5069:118, offset: 0x01149500, size: 88 bytes, params: 1, frame: 15
const Chained2 = Chained;
const Symbol = global.Symbol;
return CreateClass(Chained2, [{key: Symbol.iterator, value: function() {
return this;
}}, {key: 'next', value: function() {
var value;
var property = this.index;
if (property < this.items.length) {
loopExit1: while (true) {
property = this.items;
property = property[this.index];
value = property.next();
if (value.done) {
this.index += 1;
property = this.index;
if (!(property < this.items.length)) {
return {done: true, value: undefined};
}
continue;
}
continue;
break loopExit1;
}
break loopExit1;
return value;
}
return value;
return {done: true, value: undefined};
}}]);
function Chained(a0) { // fn#43068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5069:139, offset: 0x01149558, size: 44 bytes, params: 2, frame: 13
env1_0(this, Chained);
this.index = 0;
this.items = a0;
}
return {done: true, value: undefined};
}}]);
}
function chain(a0) { // fn#43071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5069:507, offset: 0x011495f3, size: 35 bytes, params: 2, frame: 11
let value = copyRestArgs(0, undefined);
const binding = env0_2;
const value3 = Object.create(binding.prototype, {constructor: {value: binding}});
value = new binding(value);
return value instanceof Object ? value : value3;
}
}
function chain(a0) { // fn#43071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5069:507, offset: 0x011495f3, size: 35 bytes, params: 2, frame: 11
let value = copyRestArgs(0, undefined);
const binding = env0_2;
const value3 = Object.create(binding.prototype, {constructor: {value: binding}});
value = new binding(value);
return value instanceof Object ? value : value3;
}
function Chained(a0) { // fn#43068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5069:139, offset: 0x01149558, size: 44 bytes, params: 2, frame: 13
env1_0(this, Chained);
this.index = 0;
this.items = a0;
}
global.__d(_fun43066, 4891, [6, 7, 2]) /* metro module 4891, dependencies: [6, 7, 2] */;
+61 -59
View File
@@ -1,69 +1,71 @@
/* Metro module 4890; source: modules/app_database/util/Lru.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43050(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5068:6, offset: 0x011490e3, size: 124 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun43051();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_database/util/Lru.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/util/Lru.tsx');
exports.Lru = value;
}
function _fun43051() { // fn#43051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5068:118, offset: 0x0114915f, size: 343 bytes, params: 1, frame: 15
const binding = env0_1;
const closure = Lru;
const Symbol = global.Symbol;
return binding(closure, [{key: 'length', get: function() {
return this.items.size;
}}, {key: 'capacity', get: function() {
return this.limit;
}}, {key: Symbol.iterator, value: function() {
return this.items.entries();
}}, {key: 'entries', value: function() {
return this.items.entries();
}}, {key: 'keys', value: function() {
return this.items.keys();
}}, {key: 'values', value: function() {
return this.items.values();
}}, {key: 'ordered', value: function() {
var r2;
var value = this.items.values();
var items2 = [];
arraySpread(items2, value, 0, r2);
return items2.reverse();
}}, {key: 'clear', value: function() {
this.items.clear();
}}, {key: 'has', value: function(a0) {
return this.items.has(a0);
}}, {key: 'get', value: function(a0) {
return this.items.get(a0);
}}, {key: 'put', value: function(a0, a1) {
var value;
var value2;
var property = this.items;
property.delete(a0);
this.items.set(a0, a1);
property = this.items.size;
if (property > this.limit) {
value = this.oldestKey();
property = this.items;
value2 = property.get(value);
property = this.items;
property.delete(value);
return [value, value2];
function _fun43051() { // fn#43051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5068:118, offset: 0x0114915f, size: 343 bytes, params: 1, frame: 15
const Lru2 = Lru;
const Symbol = global.Symbol;
return CreateClass(Lru2, [{key: 'length', get: function() {
return this.items.size;
}}, {key: 'capacity', get: function() {
return this.limit;
}}, {key: Symbol.iterator, value: function() {
return this.items.entries();
}}, {key: 'entries', value: function() {
return this.items.entries();
}}, {key: 'keys', value: function() {
return this.items.keys();
}}, {key: 'values', value: function() {
return this.items.values();
}}, {key: 'ordered', value: function() {
var r2;
var value = this.items.values();
var items2 = [];
arraySpread(items2, value, 0, r2);
return items2.reverse();
}}, {key: 'clear', value: function() {
this.items.clear();
}}, {key: 'has', value: function(a0) {
return this.items.has(a0);
}}, {key: 'get', value: function(a0) {
return this.items.get(a0);
}}, {key: 'put', value: function(a0, a1) {
var value;
var value2;
var property = this.items;
property.delete(a0);
this.items.set(a0, a1);
property = this.items.size;
if (property > this.limit) {
value = this.oldestKey();
property = this.items;
value2 = property.get(value);
property = this.items;
property.delete(value);
return [value, value2];
}
}}, {key: 'delete', value: function(a0) {
return this.items.delete(a0);
}}, {key: 'oldestKey', value: function() {
return this.items.keys().next().value;
}}]);
function Lru(a0) { // fn#43052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5068:139, offset: 0x011492b6, size: 70 bytes, params: 2, frame: 13
const value = environment.__proto__;
env1_0(this, Lru);
const Map = global.Map;
this.items = new Map();
this.limit = a0;
}
}}, {key: 'delete', value: function(a0) {
return this.items.delete(a0);
}}, {key: 'oldestKey', value: function() {
return this.items.keys().next().value;
}}]);
}
function Lru(a0) { // fn#43052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5068:139, offset: 0x011492b6, size: 70 bytes, params: 2, frame: 13
const value = environment.__proto__;
env1_0(this, Lru);
const Map = global.Map;
this.items = new Map();
this.limit = a0;
}
}
global.__d(_fun43050, 4890, [6, 7, 2]) /* metro module 4890, dependencies: [6, 7, 2] */;