704 lines
30 KiB
TypeScript
704 lines
30 KiB
TypeScript
/* Metro module 6875; source: stores/ChannelMemberStore.tsx; dependencies: [15, 17, 18, 6, 7, 4107, 4492, 1226, 1379, 4111, 1945, 1938, 1867, 4396, 6876, 1878, 661, 1244, 3789, 1225, 22, 483, 566, 694, 2] */
|
|
function _fun54470(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:6, offset: 0x0136612b, size: 760 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const closure = CONNECTION_OPEN_54480;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
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 env0_7 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_8 = importDefault(7) /* metro dependency 7 */;
|
|
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
|
|
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
|
|
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
|
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
|
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_20 = value.StatusTypes;
|
|
const env0_21 = value.Permissions;
|
|
const env0_24 = _fun54486();
|
|
value = _fun54501();
|
|
value = new value();
|
|
const env0_26 = [];
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun54508(Store).displayName = 'ChannelMemberStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
|
|
OVERLAY_INITIALIZE: closure, GUILD_MEMBER_LIST_UPDATE: GUILD_MEMBER_LIST_UPDATE_54513,
|
|
GUILD_UPDATE: GUILD_UPDATE_54515, GUILD_DELETE: GUILD_DELETE_54517, GUILD_ROLE_UPDATE: GUILD_ROLE_UPDATE_54518,
|
|
GUILD_MEMBER_UPDATE: GUILD_MEMBER_UPDATE_54520, CHANNEL_UPDATES: function() {
|
|
return true;
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelMemberStore.tsx');
|
|
exports.default = value;
|
|
exports.EVERYONE_ID = 'everyone';
|
|
exports.EVERYONE_CHANNEL_ID = 0;
|
|
exports.MemberListRowTypes = {GROUP: 'GROUP', MEMBER: 'MEMBER', CONTENT_INVENTORY: 'CONTENT_INVENTORY',
|
|
CONTENT_INVENTORY_GROUP: 'CONTENT_INVENTORY_GROUP', HIDDEN_CONTENT_INVENTORY: 'HIDDEN_CONTENT_INVENTORY',
|
|
CONTENT_INVENTORY_LEADERBOARD: 'CONTENT_INVENTORY_LEADERBOARD'};
|
|
}
|
|
|
|
function _isNativeReflectConstruct_54471() { // fn#54471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:324, offset: 0x01366423, 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_54471_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function makeGroup(a0, a1, a2, a3) { // fn#54474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:806, offset: 0x01366481, size: 218 bytes, params: 5, frame: 19
|
|
var object2;
|
|
const env0_0 = a1;
|
|
const ONLINE = StatusTypes.ONLINE;
|
|
if (ONLINE === a1) {
|
|
object2 = {};
|
|
object2.type = env0_23.GROUP;
|
|
object2.key = a1;
|
|
object2.id = a1;
|
|
Object.defineProperty(object2, 'title', {get: _fun54475, set: undefined, enumerable: true, configurable: true});
|
|
object2.count = a2;
|
|
object2.index = a3;
|
|
return object2;
|
|
}
|
|
const OFFLINE = StatusTypes.OFFLINE;
|
|
if (OFFLINE === a1) {
|
|
object2 = {};
|
|
object2.type = env0_23.GROUP;
|
|
object2.key = a1;
|
|
object2.id = a1;
|
|
Object.defineProperty(object2, 'title', {get: _fun54475, set: undefined, enumerable: true, configurable: true});
|
|
object2.count = a2;
|
|
object2.index = a3;
|
|
return object2;
|
|
}
|
|
const UNKNOWN = StatusTypes.UNKNOWN;
|
|
if (UNKNOWN === a1) {
|
|
object2 = {};
|
|
object2.type = env0_23.GROUP;
|
|
object2.key = a1;
|
|
object2.id = a1;
|
|
Object.defineProperty(object2, 'title', {get: _fun54475, set: undefined, enumerable: true, configurable: true});
|
|
object2.count = a2;
|
|
object2.index = a3;
|
|
return object2;
|
|
}
|
|
const guild = GuildStore.getGuild(a0);
|
|
const value3 = null;
|
|
const r7 = value3 != guild ? GuildRoleStore.getRole(guild.id, a1) : value3;
|
|
const GROUP = env0_23.GROUP;
|
|
return {type: GROUP, key: a1, id: a1, title: value3 != r7 ? r7.name : '', count: a2, index: a3};
|
|
}
|
|
|
|
function makeMember(a0, a1, a2) { // fn#54476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:1275, offset: 0x01366635, size: 283 bytes, params: 4, frame: 21
|
|
var r0;
|
|
var object2;
|
|
const getId = AuthenticationStore.getId;
|
|
const value2 = a2 === Reflect.apply(getId, AuthenticationStore, []);
|
|
const isMobileOnline2 = PresenceStore.isMobileOnline(a2);
|
|
const isVROnline2 = PresenceStore.isVROnline(a2);
|
|
const r8 = value2 ? SelfPresenceStore.getStatus() : PresenceStore.getStatus(a2, a0);
|
|
const r7 = value2 ? SelfPresenceStore.getActivities() : PresenceStore.getActivities(a2, a0);
|
|
const streamForUser = ApplicationStreamingStore.getStreamForUser(a2, a0);
|
|
const user = UserStore.getUser(a2);
|
|
const value9 = null;
|
|
if (value9 == user) {
|
|
r0 = value9;
|
|
} else {
|
|
object2 = {};
|
|
object2.type = env0_23.MEMBER;
|
|
copyDataProperties(object2, GuildMemberStore.getMember(a0, a2), a0);
|
|
object2['user'] = user;
|
|
object2['status'] = r8;
|
|
object2['activities'] = r7;
|
|
object2['applicationStream'] = streamForUser;
|
|
object2['isOwner'] = a1 === a2;
|
|
object2['isMobileOnline'] = isMobileOnline2;
|
|
object2['isVROnline'] = isVROnline2;
|
|
r0 = object2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getMemberListId(a0) { // fn#54477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:1630, offset: 0x01366750, size: 66 bytes, params: 2, frame: 13
|
|
const channel = ChannelStore.getChannel(a0);
|
|
return channel == null ? env0_22 : channel.memberListId ?? computeMemberListId(channel);
|
|
}
|
|
|
|
function CONNECTION_OPEN_54480() { // fn#54480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4666, offset: 0x013668f6, size: 21 bytes, params: 1, frame: 9
|
|
env0_25.reset();
|
|
}
|
|
|
|
function handleApplicationStreamUpdate() { // fn#54481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4717, offset: 0x0136690b, size: 56 bytes, params: 1, frame: 12
|
|
env0_26.concat(ApplicationStreamingStore.getAllApplicationStreams()).forEach(_fun54482);
|
|
}
|
|
|
|
function handleLocalPresenceUpdate() { // fn#54484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4877, offset: 0x01366986, size: 49 bytes, params: 1, frame: 13
|
|
const env0_0 = AuthenticationStore.getId();
|
|
env0_25.forEach(null, _fun54485);
|
|
}
|
|
|
|
function _fun54486() { // fn#54486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2057, offset: 0x013669ce, size: 264 bytes, params: 1, frame: 15
|
|
return env0_8(MemberList, [{key: 'updateOwnerId', value: value_54488}, {key: 'setGroups', value: value_54489},
|
|
{key: 'sync', value: function(a0, a1) {
|
|
var env0_0 = this;
|
|
var iterator = a0[Symbol.iterator]();
|
|
var item2 = iterator.next();
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
var value = undefined;
|
|
var value2 = item2 === value;
|
|
var env0_1 = value2 ? value : item;
|
|
if (!value2) {
|
|
item2.return();
|
|
}
|
|
a1.forEach(_fun54492);
|
|
return value;
|
|
}}, {key: 'invalidate', value: value_54493}, {key: 'insert', value: value_54494}, {key: 'update',
|
|
value: value_54495}, {key: 'delete', value: value_54496}, {key: 'rebuildMember', value: value_54497},
|
|
{key: 'rebuildMembers', value: function() {
|
|
var r1;
|
|
var value3;
|
|
var property = global.Object;
|
|
var value = property.keys(this.members);
|
|
var value2 = 0;
|
|
if (value2 < value.length) {
|
|
for (r1 = value2; true; r1 = value3) {
|
|
property = value[r1];
|
|
this.rebuildMember(property);
|
|
value3 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (!(value3 < value.length)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}}, {key: 'rebuildGroup', value: value_54499}]);
|
|
}
|
|
|
|
function _fun54501() { // fn#54501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4098, offset: 0x0136705b, size: 124 bytes, params: 1, frame: 15
|
|
return env0_8(MemberLists, [{key: 'get', value: value_54503}, {key: 'forEach', value: value_54504}, {key: 'delete',
|
|
value: function(a0) {
|
|
delete this._guildLists[a0];
|
|
}}, {key: 'reset', value: function() {
|
|
this._guildLists = {};
|
|
}}]);
|
|
}
|
|
|
|
function _fun54508(a0) { // fn#54508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4976, offset: 0x0136724c, size: 114 bytes, params: 2, frame: 16
|
|
const closure = ChannelMemberStore;
|
|
env0_6(closure, a0);
|
|
return env0_8(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(UserStore, GuildStore, GuildRoleStore, ChannelStore, GuildMemberStore, PresenceStore,
|
|
SelfPresenceStore, AuthenticationStore, GuildMemberCountStore, ApplicationStreamingStore, ExperimentStore);
|
|
this.syncWith([SelfPresenceStore], handleLocalPresenceUpdate);
|
|
this.syncWith([ApplicationStreamingStore], handleApplicationStreamUpdate);
|
|
}}, {key: 'getProps', value: value_54511}, {key: 'getRows', value: value_54512}]);
|
|
}
|
|
|
|
function GUILD_MEMBER_LIST_UPDATE_54513({guildId, id, ops, groups}) { // fn#54513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:5856, offset: 0x01367449, size: 79 bytes, params: 2, frame: 15
|
|
const value = env0_25.get(guildId, id);
|
|
ops.forEach(_fun54514);
|
|
value.setGroups(groups);
|
|
}
|
|
|
|
function GUILD_UPDATE_54515({guild}) { // fn#54515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:6201, offset: 0x01367563, size: 42 bytes, params: 2, frame: 13
|
|
const binding = env0_25;
|
|
binding.forEach(guild.id, function(a0) {
|
|
if (a0.updateOwnerId()) {
|
|
a0.rebuildMembers();
|
|
}
|
|
});
|
|
}
|
|
|
|
function GUILD_DELETE_54517({guild}) { // fn#54517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:6314, offset: 0x013675ab, size: 34 bytes, params: 2, frame: 11
|
|
env0_25.delete(guild.id);
|
|
}
|
|
|
|
function GUILD_ROLE_UPDATE_54518({guildId, role}) { // fn#54518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:6386, offset: 0x013675cd, size: 47 bytes, params: 2, frame: 13
|
|
env0_25.forEach(guildId, function(a0) {
|
|
a0.rebuildGroup(role.id);
|
|
a0.rebuildMembers();
|
|
});
|
|
}
|
|
|
|
function GUILD_MEMBER_UPDATE_54520({guildId, user}) { // fn#54520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:6518, offset: 0x01367626, size: 46 bytes, params: 2, frame: 13
|
|
env0_25.forEach(guildId, function(a0) {
|
|
return a0.rebuildMember(user.id);
|
|
});
|
|
}
|
|
|
|
function _fun54475() { // fn#54475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:919, offset: 0x0136655b, size: 218 bytes, params: 1, frame: 15
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const ONLINE = StatusTypes.ONLINE;
|
|
if (ONLINE === require) {
|
|
return intl.string(t.WbGtnH);
|
|
}
|
|
const OFFLINE = StatusTypes.OFFLINE;
|
|
if (OFFLINE === require) {
|
|
return intl.string(t.Vv0abJ);
|
|
}
|
|
return intl.string(t['UQMV/E']);
|
|
}
|
|
|
|
function computeMemberListId(a0) { // fn#54478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:1718, owner: getMemberListId.computeMemberListId, offset: 0x01366792, size: 171 bytes, params: 2, frame: 17
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
|
const canEveryone = permissionUtilsModule.canEveryone;
|
|
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
|
if (Reflect.apply(canEveryone, permissionUtilsModule, [VIEW_CHANNEL, a0])) {
|
|
return env1_22;
|
|
}
|
|
const v3 = (importDefault(1225) /* metro dependency 1225 */).v3;
|
|
const value4 = (importDefault(22) /* metro dependency 22 */)(a0.permissionOverwrites).reduce(_fun54479, []).sort();
|
|
value = Reflect.apply(v3, value, [value4.join(',')]);
|
|
return value.toString();
|
|
}
|
|
|
|
function _fun54482(a0) { // fn#54482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4822, offset: 0x01366943, size: 38 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
env1_25.forEach(null, _fun54483);
|
|
}
|
|
|
|
function _fun54485(a0) { // fn#54485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4946, offset: 0x013669b7, size: 23 bytes, params: 2, frame: 11
|
|
return a0.rebuildMember(env0_0);
|
|
}
|
|
|
|
function MemberList(a0, a1) { // fn#54487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2078, offset: 0x01366ad6, size: 91 bytes, params: 3, frame: 13
|
|
env1_7(this, MemberList);
|
|
this.rows = [];
|
|
this.groups = [];
|
|
this.members = {};
|
|
this.version = 0;
|
|
this.guildId = a0;
|
|
this.listId = a1;
|
|
this.updateOwnerId();
|
|
}
|
|
|
|
function value_54488() { // fn#54488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2261, offset: 0x01366b31, size: 92 bytes, params: 1, frame: 13
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
const guild = GuildStore.getGuild(this.guildId);
|
|
if (guild == null) {
|
|
return false;
|
|
}
|
|
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
|
value = value.getGuildVisualOwnerId(guild);
|
|
const value3 = this.ownerId !== value;
|
|
if (value3) {
|
|
this.ownerId = value;
|
|
value = true;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_54489(a0) { // fn#54489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2433, offset: 0x01366b8d, size: 59 bytes, params: 2, frame: 13
|
|
const env0_1 = 0;
|
|
this.groups = a0.map(_fun54490);
|
|
this.rows.length = env0_1;
|
|
}
|
|
|
|
function value_54491(a0, a1) { // fn#54491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2611, offset: 0x01366c30, size: 66 bytes, params: 3, frame: 16
|
|
const iterator = a0[Symbol.iterator]();
|
|
let item2 = iterator.next();
|
|
const item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const env0_1 = value2 ? value : item;
|
|
if (!value2) {
|
|
item2.return();
|
|
}
|
|
a1.forEach(_fun54492);
|
|
return value;
|
|
}
|
|
|
|
function value_54493(a0) { // fn#54493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2692, offset: 0x01366c95, size: 162 bytes, params: 2, frame: 9
|
|
var r1;
|
|
var r3;
|
|
var r4;
|
|
var item3;
|
|
var value3;
|
|
var rows;
|
|
var property;
|
|
var type;
|
|
var MEMBER;
|
|
var members;
|
|
var user;
|
|
var id;
|
|
var value5;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
let r5 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = item2;
|
|
r3 = value2;
|
|
r4 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r3 = value3;
|
|
r4 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r3 = value3;
|
|
r4 = item;
|
|
}
|
|
}
|
|
if (!r3) {
|
|
r1.return();
|
|
}
|
|
if (r5 <= r4) {
|
|
while (true) {
|
|
rows = this.rows;
|
|
property = rows[r5];
|
|
if (property == null) {
|
|
break;
|
|
}
|
|
rows = this.rows;
|
|
delete rows[r5];
|
|
type = property.type;
|
|
MEMBER = env1_23.MEMBER;
|
|
if (type !== MEMBER) {
|
|
continue;
|
|
}
|
|
members = this.members;
|
|
user = property.user;
|
|
id = user.id;
|
|
delete members[id];
|
|
value5 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
|
|
if (value5 <= r4) {
|
|
r5 = value5;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
const version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
return value;
|
|
}
|
|
|
|
function value_54494(a0, {group, member}) { // fn#54494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2873, offset: 0x01366d37, size: 191 bytes, params: 3, frame: 20
|
|
var value;
|
|
var guildId;
|
|
var id;
|
|
var rows;
|
|
var splice;
|
|
var version;
|
|
if (group != null) {
|
|
rows = this.rows;
|
|
splice = rows.splice;
|
|
value = environment.__proto__;
|
|
value = makeGroup(this.guildId, group.id, group.count);
|
|
Reflect.apply(splice, rows, [a0, 0, value]);
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
} else {
|
|
if (member == null) {
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
var makeMemberBinding = makeMember;
|
|
guildId = this.guildId;
|
|
var ownerId = this.ownerId;
|
|
var user = member.user;
|
|
id = user.id;
|
|
value = makeMemberBinding(guildId, ownerId, id);
|
|
if (value == null) {
|
|
return undefined;
|
|
}
|
|
this.rows.splice(a0, 0, value);
|
|
var members = this.members;
|
|
user = member.user;
|
|
id = user.id;
|
|
members[id] = value;
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
}
|
|
}
|
|
|
|
function value_54495(a0, {group, member}) { // fn#54495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:3150, offset: 0x01366df6, size: 228 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var type;
|
|
var members;
|
|
var user;
|
|
var id;
|
|
var guildId;
|
|
var version;
|
|
let rows = this.rows;
|
|
const property = rows[a0];
|
|
let value = property != null;
|
|
if (value) {
|
|
type = property.type;
|
|
value = environment.__proto__;
|
|
value = type === env1_23.MEMBER;
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
if (r6) {
|
|
delete this.members[property.user.id];
|
|
}
|
|
if (group != null) {
|
|
rows = this.rows;
|
|
value = environment.__proto__;
|
|
rows[a0] = makeGroup(this.guildId, group.id, group.count);
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
} else {
|
|
if (member == null) {
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
var makeMemberBinding = makeMember;
|
|
guildId = this.guildId;
|
|
var ownerId = this.ownerId;
|
|
user = member.user;
|
|
id = user.id;
|
|
value = makeMemberBinding(guildId, ownerId, id);
|
|
if (value == null) {
|
|
return undefined;
|
|
}
|
|
this.rows[a0] = value;
|
|
members = this.members;
|
|
user = member.user;
|
|
id = user.id;
|
|
members[id] = value;
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
}
|
|
}
|
|
|
|
function value_54496(a0) { // fn#54496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:3487, offset: 0x01366eda, size: 104 bytes, params: 2, frame: 14
|
|
var type;
|
|
var value;
|
|
var version;
|
|
const property = this.rows[a0];
|
|
if (property != null) {
|
|
type = property.type;
|
|
value = environment.__proto__;
|
|
if (type === env1_23.MEMBER) {
|
|
delete this.members[property.user.id];
|
|
}
|
|
this.rows.splice(a0, 1);
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
}
|
|
}
|
|
|
|
function value_54497(a0) { // fn#54497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:3645, offset: 0x01366f42, size: 87 bytes, params: 2, frame: 19
|
|
var Object;
|
|
var assign;
|
|
var value;
|
|
var version;
|
|
const property = this.members[a0];
|
|
if (property != null) {
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
value = environment.__proto__;
|
|
Reflect.apply(assign, Object, [property, makeMember(this.guildId, this.ownerId, a0)]);
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
}
|
|
}
|
|
|
|
function value_54499(a0) { // fn#54499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:3921, offset: 0x01366fe1, size: 122 bytes, params: 2, frame: 21
|
|
var environment;
|
|
var splice;
|
|
var value;
|
|
var version;
|
|
const env0_0 = a0;
|
|
let groups = this.groups;
|
|
const index = groups.findIndex(_fun54500);
|
|
const property = this.groups[index];
|
|
if (property != null) {
|
|
groups = this.groups;
|
|
splice = groups.splice;
|
|
value = environment.__proto__;
|
|
Reflect.apply(splice, groups, [index, 1, makeGroup(this.guildId, a0, property.count, property.index)]);
|
|
version = this.version;
|
|
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
|
}
|
|
}
|
|
|
|
function MemberLists() { // fn#54502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4119, offset: 0x013670d7, size: 35 bytes, params: 1, frame: 13
|
|
env1_7(this, MemberLists);
|
|
this._guildLists = {};
|
|
}
|
|
|
|
function value_54503(a0, a1) { // fn#54503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4202, offset: 0x013670fa, size: 131 bytes, params: 3, frame: 16
|
|
var r2;
|
|
var r0;
|
|
var object2;
|
|
var value;
|
|
var env1_242;
|
|
let _guildLists = this._guildLists;
|
|
let property = _guildLists[a0];
|
|
if (property != null) {
|
|
r2 = property;
|
|
} else {
|
|
_guildLists = this._guildLists;
|
|
object2 = {};
|
|
_guildLists[a0] = object2;
|
|
r2 = object2;
|
|
}
|
|
property = r2[a1];
|
|
if (property != null) {
|
|
r0 = property;
|
|
} else {
|
|
value = environment.__proto__;
|
|
env1_242 = new env1_24(a0, a1);
|
|
env1_242.setGroups([{id: StatusTypes.UNKNOWN, count: 0}]);
|
|
r2[a1] = env1_242;
|
|
r0 = env1_242;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_54504(a0, a1) { // fn#54504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4390, offset: 0x0136717d, size: 124 bytes, params: 3, frame: 16
|
|
var environment;
|
|
var property;
|
|
var value;
|
|
const env0_0 = a1;
|
|
if (a0 == null) {
|
|
value = environment.__proto__;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
value.forEach(this._guildLists, _fun54505);
|
|
} else {
|
|
property = this._guildLists[a0];
|
|
if (property != null) {
|
|
value = environment.__proto__;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
value.forEach(property, a1);
|
|
}
|
|
}
|
|
}
|
|
|
|
function ChannelMemberStore() { // fn#54509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4988, offset: 0x013672be, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_7(this, ChannelMemberStore);
|
|
const value3 = env1_5(ChannelMemberStore);
|
|
return env1_4(this, _isNativeReflectConstruct_54471() ? global.Reflect.construct(value3, arguments,
|
|
env1_5(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_54511(a0, a1) { // fn#54511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:5461, offset: 0x013673aa, size: 116 bytes, params: 3, frame: 17
|
|
let value = environment.__proto__;
|
|
const binding = env1_25;
|
|
const get = binding.get;
|
|
value = getMemberListId(a1);
|
|
value = Reflect.apply(get, binding, [a0, value]);
|
|
return {listId: '' + value.guildId + ':' + value.listId, groups: value.groups, rows: value.rows,
|
|
version: value.version};
|
|
}
|
|
|
|
function value_54512(a0, a1) { // fn#54512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:5620, offset: 0x0136741e, size: 43 bytes, params: 3, frame: 14
|
|
const value = environment.__proto__;
|
|
const binding = env1_25;
|
|
const get = binding.get;
|
|
return Reflect.apply(get, binding, [a0, getMemberListId(a1)]).rows;
|
|
}
|
|
|
|
function _fun54514(a0) { // fn#54514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:5939, offset: 0x01367498, size: 203 bytes, params: 2, frame: 14
|
|
var binding;
|
|
const op = a0.op;
|
|
if (op === 'SYNC') {
|
|
binding = env0_0;
|
|
binding.sync(a0.range, a0.items);
|
|
} else if (op === 'INVALIDATE') {
|
|
binding = env0_0;
|
|
binding.invalidate(a0.range);
|
|
} else if (op === 'INSERT') {
|
|
binding = env0_0;
|
|
binding.insert(a0.index, a0.item);
|
|
} else if (op === 'UPDATE') {
|
|
binding = env0_0;
|
|
binding.update(a0.index, a0.item);
|
|
} else if (op === 'DELETE') {
|
|
env0_0.delete(a0.index);
|
|
}
|
|
}
|
|
|
|
function _fun54479(a0, {id, allow, deny}) { // fn#54479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:1863, offset: 0x0136683d, size: 185 bytes, params: 3, frame: 19
|
|
var moduleValue2;
|
|
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
const has = bigFlagUtilsModule.has;
|
|
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
|
if (Reflect.apply(has, bigFlagUtilsModule, [allow, VIEW_CHANNEL])) {
|
|
a0.push('allow:' + id);
|
|
} else {
|
|
moduleValue2 = bigFlagUtilsModule;
|
|
if (moduleValue2.has(deny, Permissions.VIEW_CHANNEL)) {
|
|
a0.push('deny:' + id);
|
|
}
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function _fun54483(a0) { // fn#54483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4842, offset: 0x01366969, size: 29 bytes, params: 2, frame: 11
|
|
return a0.rebuildMember(env0_0.ownerId);
|
|
}
|
|
|
|
function _fun54490({count, id}) { // fn#54490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2472, offset: 0x01366bc8, size: 104 bytes, params: 2, frame: 20
|
|
const binding = env0_1;
|
|
const Math = global.Math;
|
|
const value3 = Math.max(0, count ?? 0);
|
|
env0_1 = env0_1 + (value3 + 1);
|
|
return makeGroup(env0_0.guildId, id, value3, binding);
|
|
}
|
|
|
|
function _fun54492(a0, a1) { // fn#54492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:2638, offset: 0x01366c72, size: 35 bytes, params: 3, frame: 13
|
|
return env0_0.update(env0_1 + a1, a0);
|
|
}
|
|
|
|
function _fun54505(a0) { // fn#54505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7053:4451, offset: 0x013671f9, size: 48 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__.__proto__;
|
|
(importDefault(22) /* metro dependency 22 */).forEach(a0, require);
|
|
}
|
|
|