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

File diff suppressed because it is too large. Load diff
@@ -1,4 +1,20 @@
/* Metro module 15878; source: modules/guild_settings/audit_log/GuildSettingsAuditLogStore.tsx; dependencies: [6, 7, 15, 17, 18, 15879, 1383, 1939, 1945, 1938, 1867, 661, 483, 22, 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 GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import AuditLogRecord from '../../../records/AuditLogRecord.tsx'; /* Metro dependency 15879 */
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 */
import * as GuildRoleRecordModule from '../../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
import * as AuditLogRecordModule from '../../../records/AuditLogRecord.tsx'; /* Metro dependency 15879 */
function _fun122237(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:6, offset: 0x0255f32b, size: 891 bytes, params: 8, frame: 45
const _arrayLikeToArray_122243 = function(a0, a1) {
var r0;
@@ -48,22 +64,10 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
a0.reverse().forEach(_fun122245);
return [];
};
const closure = GUILD_SETTINGS_SET_SECTION_122246;
const GUILD_SETTINGS_SET_SECTION_1222462 = GUILD_SETTINGS_SET_SECTION_122246;
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 auditLogRecord = importDefault(15879) /* metro dependency 15879: AuditLogRecord */;
const env0_8 = (require(15879) /* metro dependency 15879: AuditLogRecord */).AuditLogChange;
const env0_9 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildSelectableChannelType;
const env0_10 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).hasAnyPermission;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const AuditLogActions = value.AuditLogActions;
const env0_15 = value.AuditLogActionTypes;
const env0_16 = value.AuditLogTargetTypes;
@@ -99,7 +103,7 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
const env0_29 = [];
let env0_36 = AuditLogActions.ALL;
let env0_38 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun122250(Store).displayName = 'GuildSettingsAuditLogStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {AUDIT_LOG_FETCH_START: function() {
env0_31 = true;
@@ -117,7 +121,8 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
env0_35 = a0.userId;
}, AUDIT_LOG_FILTER_BY_TARGET: function(a0) {
env0_37 = a0.targetId;
}, GUILD_SETTINGS_SET_SECTION: closure, GUILD_SETTINGS_INIT: function({guildId, section}) {
}, GUILD_SETTINGS_SET_SECTION: GUILD_SETTINGS_SET_SECTION_1222462, GUILD_SETTINGS_INIT: function({guildId,
section}) {
env0_21 = guildId;
env0_37 = null;
return GUILD_SETTINGS_SET_SECTION_122246({section: section});
@@ -136,441 +141,517 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
env0_27 = [];
env0_28 = [];
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/audit_log/GuildSettingsAuditLogStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/audit_log/GuildSettingsAuditLogStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_122238() { // fn#122238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:455, offset: 0x0255f6a6, 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_122238_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_122241(a0, a1) { // fn#122241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:648, offset: 0x0255f708, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_122238() { // fn#122238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:455, offset: 0x0255f6a6, 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 _fun122242;
return (_isNativeReflectConstruct_122238_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_122243(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') {
function _createForOfIteratorHelperLoose_122241(a0, a1) { // fn#122241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:648, offset: 0x0255f708, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun122242;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_122243(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_122243(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun122242;
}
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 transformEntries(a0) { // fn#122244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1908, offset: 0x0255f87c, size: 48 bytes, params: 2, frame: 12
a0.reverse().forEach(_fun122245);
return [];
}
function GUILD_SETTINGS_SET_SECTION_122246({section}) { // fn#122246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:3900, offset: 0x0255fe8a, size: 199 bytes, params: 2, frame: 16
var value4;
const AUDIT_LOG = GuildSettingsSections.AUDIT_LOG;
if (section !== AUDIT_LOG) {
return false;
}
const members = GuildMemberStore.getMembers(env0_21);
let env0_0 = GuildStore.getGuild(env0_21);
if (env0_21 != null) {
value4 = GuildRoleStore.getUnsafeMutableRoles(env0_21);
}
env0_24 = (importDefault(22) /* metro dependency 22 */)(members).filter(function(a0) {
var env0_0 = a0;
return a0.roles.some(_fun122248);
}).map(function(a0) {
return a0.userId;
}).value();
}
function _fun122250(a0) { // fn#122250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4233, offset: 0x0255ffd7, size: 528 bytes, params: 2, frame: 16
const closure = GuildSettingsAuditLogStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore, GuildMemberStore);
}}, {key: 'logs', get: get_122253}, {key: 'integrations', get: get_122254}, {key: 'webhooks', get: get_122255},
{key: 'guildScheduledEvents', get: get_122256}, {key: 'automodRules', get: get_122257}, {key: 'threads',
get: get_122258}, {key: 'applicationCommands', get: get_122259}, {key: 'isInitialLoading', get: get_122260},
{key: 'isLoading', get: get_122261}, {key: 'isLoadingNextPage', get: get_122262}, {key: 'hasOlderLogs',
get: get_122263}, {key: 'hasError', get: get_122264}, {key: 'userIds', get: get_122265}, {key: 'userIdFilter',
get: get_122266}, {key: 'targetIdFilter', get: get_122267}, {key: 'actionFilter', get: function() {
return ALL;
}}, {key: 'deletedTargets', get: get_122269}, {key: 'groupedFetchCount', get: get_122270}]);
}
function AUDIT_LOG_FETCH_SUCCESS(a0) { // fn#122272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5629, offset: 0x0256027b, size: 148 bytes, params: 2, frame: 14
env0_22 = transformEntries(a0.logs);
env0_23 = a0.integrations;
env0_25 = a0.webhooks;
env0_26 = a0.guildScheduledEvents;
env0_27 = a0.automodRules ?? [];
env0_28 = a0.threads;
env0_29 = a0.applicationCommands;
if (a0.logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_START({isGroupedFetch}) { // fn#122274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5966, offset: 0x0256032a, size: 36 bytes, params: 2, frame: 3
var binding;
if (isGroupedFetch) {
binding = env0_39;
env0_39 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS({logs, integrations, webhooks, guildScheduledEvents, automodRules, threads, applicationCommands}) { // fn#122275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:6067, offset: 0x0256034e, size: 167 bytes, params: 2, frame: 20
var value4;
var binding;
var items2;
if (logs.length === 0 || logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
if (logs.length > 0) {
value4 = transformEntries(logs);
binding = env0_22;
items2 = [];
arraySpread(items2, value4, arraySpread(items2, binding, 0, undefined), undefined);
}
}
function _fun122245(a0) { // fn#122245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1978, offset: 0x0255f8ac, size: 1502 bytes, params: 2, frame: 29
var r18;
var r2;
var r5;
var r9;
var r10;
var r14;
var r15;
var r16;
var key;
var r1;
var r7;
var r8;
var auto_moderation_rule_name;
var status;
var oldValue;
var push;
var value2;
var REASON;
var prototype;
var value3;
var auditLogChange;
var value5;
var value6;
var value7;
var done;
var value8;
var old_value;
var new_value;
var value9;
var value10;
var NAME;
var TYPE;
var TITLE;
var value11;
var options;
var PRUNE_DELETE_DAYS;
var value14;
var AUTO_MODERATION_TRIGGERED_RULE_NAME;
var value17;
var STATUS;
var value22;
var defaultImport;
var targetType;
var value44;
var merge;
var items2;
const items3 = [];
let reason = a0.reason;
let value = null;
if (value != reason) {
push = items3.push;
value2 = environment.__proto__;
REASON = AuditLogChangeKeys.REASON;
reason = a0.reason;
prototype = AuditLogChange.prototype;
value3 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(REASON, value, reason);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value3]);
}
let changes = a0.changes;
if (value != changes) {
value5 = environment.__proto__;
value6 = _createForOfIteratorHelperLoose_122241(a0.changes);
value7 = value6();
done = value7.done;
if (done) {
r1 = value;
r7 = value;
r8 = value;
} else {
r2 = value7;
r5 = value;
r9 = value;
r10 = value;
while (true) {
value8 = r2.value;
key = value8.key;
old_value = value8.old_value;
new_value = value8.new_value;
prototype = AuditLogChange.prototype;
value9 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange();
value10 = auditLogChange instanceof Object ? auditLogChange : value9;
items3.push(value10);
key = value10.key;
NAME = AuditLogChangeKeys.NAME;
if (key !== NAME) {
key = value10.key;
TYPE = AuditLogChangeKeys.TYPE;
if (key === TYPE) {
r14 = value10;
r15 = r9;
r16 = r10;
break;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_122243(a0, value);
r6 = value;
} else {
r6 = value;
}
key = value10.key;
TITLE = AuditLogChangeKeys.TITLE;
if (key !== TITLE) {
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun122242;
}
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 _fun122242() { // fn#122242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1219, 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 transformEntries(a0) { // fn#122244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1908, offset: 0x0255f87c, size: 48 bytes, params: 2, frame: 12
a0.reverse().forEach(_fun122245);
return [];
function _fun122245(a0) { // fn#122245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1978, offset: 0x0255f8ac, size: 1502 bytes, params: 2, frame: 29
var r18;
var r2;
var r5;
var r9;
var r10;
var r14;
var r15;
var r16;
var key;
var r1;
var r7;
var r8;
var auto_moderation_rule_name;
var status;
var oldValue;
var push;
var value2;
var REASON;
var prototype;
var value3;
var auditLogChange;
var value5;
var value6;
var value7;
var done;
var value8;
var old_value;
var new_value;
var value9;
var value10;
var NAME;
var TYPE;
var TITLE;
var value11;
var options;
var PRUNE_DELETE_DAYS;
var value14;
var AUTO_MODERATION_TRIGGERED_RULE_NAME;
var value17;
var STATUS;
var value22;
var defaultImport;
var targetType;
var value44;
var merge;
var items2;
const items3 = [];
let reason = a0.reason;
let value = null;
if (value != reason) {
push = items3.push;
value2 = environment.__proto__;
REASON = AuditLogChangeKeys.REASON;
reason = a0.reason;
prototype = AuditLogChange.prototype;
value3 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(REASON, value, reason);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value3]);
}
let changes = a0.changes;
if (value != changes) {
value5 = environment.__proto__;
value6 = _createForOfIteratorHelperLoose_122241(a0.changes);
value7 = value6();
done = value7.done;
if (done) {
r1 = value;
r7 = value;
r8 = value;
} else {
r2 = value7;
r5 = value;
r9 = value;
r10 = value;
while (true) {
value8 = r2.value;
key = value8.key;
old_value = value8.old_value;
new_value = value8.new_value;
prototype = AuditLogChange.prototype;
value9 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange();
value10 = auditLogChange instanceof Object ? auditLogChange : value9;
items3.push(value10);
key = value10.key;
NAME = AuditLogChangeKeys.NAME;
if (key !== NAME) {
key = value10.key;
TYPE = AuditLogChangeKeys.TYPE;
if (key === TYPE) {
r14 = value10;
r15 = r9;
r16 = r10;
break;
}
key = value10.key;
TITLE = AuditLogChangeKeys.TITLE;
if (key !== TITLE) {
r14 = r5;
r15 = r9;
r16 = r10;
break;
}
r14 = r5;
r15 = value10;
r16 = r10;
break;
}
r14 = r5;
r15 = r9;
r16 = r10;
break;
r16 = value10;
value11 = value6();
done = value11.done;
if (done) {
r1 = r16;
r7 = r14;
r8 = r15;
r18 = key;
break;
}
r2 = value11;
r5 = r14;
r9 = r15;
r10 = r16;
continue;
}
r14 = r5;
r15 = value10;
r16 = r10;
break;
}
r14 = r5;
r15 = r9;
r16 = value10;
value11 = value6();
done = value11.done;
if (done) {
r1 = r16;
r7 = r14;
r8 = r15;
r18 = key;
break;
}
r2 = value11;
r5 = r14;
r9 = r15;
r10 = r16;
continue;
} else {
r1 = value;
r7 = value;
r8 = value;
}
}
} else {
r1 = value;
r7 = value;
r8 = value;
}
let action_type = a0.action_type;
const MEMBER_PRUNE = AuditLogActions.MEMBER_PRUNE;
if (action_type === MEMBER_PRUNE) {
r10 = value != a0 && value != a0.options && value != a0.options.delete_member_days ? a0.options.delete_member_days : 1;
PRUNE_DELETE_DAYS = AuditLogChangeKeys.PRUNE_DELETE_DAYS;
value14 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(PRUNE_DELETE_DAYS, value);
items3.push(auditLogChange instanceof Object ? auditLogChange : value14);
}
action_type = a0.action_type;
const AUTO_MODERATION_BLOCK_MESSAGE = AuditLogActions.AUTO_MODERATION_BLOCK_MESSAGE;
if (action_type === AUTO_MODERATION_BLOCK_MESSAGE) {
options = a0.options;
auto_moderation_rule_name = value == options ? undefined : options.auto_moderation_rule_name;
if (value != auto_moderation_rule_name) {
push = items3.push;
AUTO_MODERATION_TRIGGERED_RULE_NAME = AuditLogChangeKeys.AUTO_MODERATION_TRIGGERED_RULE_NAME;
auto_moderation_rule_name = a0.options.auto_moderation_rule_name;
value17 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(AUTO_MODERATION_TRIGGERED_RULE_NAME, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value17]);
}
}
action_type = a0.action_type;
const VOICE_CHANNEL_STATUS_CREATE = AuditLogActions.VOICE_CHANNEL_STATUS_CREATE;
if (action_type === VOICE_CHANNEL_STATUS_CREATE && value != (value == a0.options ? undefined : a0.options.status)) {
push = items3.push;
STATUS = AuditLogChangeKeys.STATUS;
status = a0.options.status;
value22 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(STATUS, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value22]);
}
const user_id = a0.user_id;
const auditLogRecord = new AuditLogRecord({id: a0.id, action: a0.action_type, targetId: a0.target_id,
userId: user_id, changes: items3, options: a0.options});
const property = env0_0[0];
let binding = env0_1;
r9 = value != property && property.action === auditLogRecord.action && property.targetId === auditLogRecord.targetId && property.userId === auditLogRecord.userId;
if (r9) {
defaultImport = importDefault(22) /* metro dependency 22 */;
r9 = defaultImport.isEqual(property.options, auditLogRecord.options);
}
r9 = r9 && auditLogRecord.timestampStart.diff(property.timestampStart, 'minutes') < 30 && binding < 50;
r9 = r9 && auditLogRecord.targetType !== AuditLogTargetTypes.INVITE && auditLogRecord.action !== AuditLogActions.MESSAGE_DELETE;
r9 = r9 && auditLogRecord.action !== AuditLogActions.MESSAGE_BULK_DELETE && auditLogRecord.action !== AuditLogActions.MESSAGE_PIN;
r9 = r9 && auditLogRecord.action !== AuditLogActions.MESSAGE_UNPIN && auditLogRecord.action !== AuditLogActions.MEMBER_MOVE;
r9 = r9 && auditLogRecord.action !== AuditLogActions.MEMBER_DISCONNECT && auditLogRecord.action !== AuditLogActions.BOT_ADD;
r9 = r9 && auditLogRecord.action !== AuditLogActions.APPLICATION_COMMAND_PERMISSION_UPDATE && auditLogRecord.action !== AuditLogActions.MEMBER_PRUNE;
if (r9) {
binding = env0_0;
merge = property.merge;
changes = property.changes;
items2 = [];
value = arraySpread(items2, changes, 0, r18);
changes = auditLogRecord.changes;
arraySpread(items2, changes, value, r18);
binding[0] = Reflect.apply(merge, property, [{changes: items2, timestampEnd: auditLogRecord.timestampStart}]);
binding = env0_1;
value = typeof binding === 'bigint' ? binding : +binding;
env0_1 = typeof value === 'bigint' ? value + 1n : +value + 1;
} else {
var actionType = auditLogRecord.actionType;
var DELETE = AuditLogActionTypes.DELETE;
if (actionType === DELETE) {
if (value != r1) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord.targetType] = {[auditLogRecord.targetId]: r8};
} else {
env1_38[auditLogRecord.targetType][auditLogRecord.targetId] = r8;
}
} else if (value != r8) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord.targetType] = {[auditLogRecord.targetId]: r8};
} else {
env1_38[auditLogRecord.targetType][auditLogRecord.targetId] = r8;
let action_type = a0.action_type;
const MEMBER_PRUNE = AuditLogActions.MEMBER_PRUNE;
if (action_type === MEMBER_PRUNE) {
r10 = value != a0 && value != a0.options && value != a0.options.delete_member_days ? a0.options.delete_member_days : 1;
PRUNE_DELETE_DAYS = AuditLogChangeKeys.PRUNE_DELETE_DAYS;
value14 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(PRUNE_DELETE_DAYS, value);
items3.push(auditLogChange instanceof Object ? auditLogChange : value14);
}
action_type = a0.action_type;
const AUTO_MODERATION_BLOCK_MESSAGE = AuditLogActions.AUTO_MODERATION_BLOCK_MESSAGE;
if (action_type === AUTO_MODERATION_BLOCK_MESSAGE) {
options = a0.options;
auto_moderation_rule_name = value == options ? undefined : options.auto_moderation_rule_name;
if (value != auto_moderation_rule_name) {
push = items3.push;
AUTO_MODERATION_TRIGGERED_RULE_NAME = AuditLogChangeKeys.AUTO_MODERATION_TRIGGERED_RULE_NAME;
auto_moderation_rule_name = a0.options.auto_moderation_rule_name;
value17 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(AUTO_MODERATION_TRIGGERED_RULE_NAME, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value17]);
}
}
action_type = a0.action_type;
const VOICE_CHANNEL_STATUS_CREATE = AuditLogActions.VOICE_CHANNEL_STATUS_CREATE;
if (action_type === VOICE_CHANNEL_STATUS_CREATE && value != (value == a0.options ? undefined : a0.options.status)) {
push = items3.push;
STATUS = AuditLogChangeKeys.STATUS;
status = a0.options.status;
value22 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(STATUS, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value22]);
}
const auditLogRecordBinding = AuditLogRecord;
const user_id = a0.user_id;
const auditLogRecord2 = new auditLogRecordBinding({id: a0.id, action: a0.action_type, targetId: a0.target_id,
userId: user_id, changes: items3, options: a0.options});
const property = env0_0[0];
let binding = env0_1;
r9 = value != property && property.action === auditLogRecord2.action && property.targetId === auditLogRecord2.targetId && property.userId === auditLogRecord2.userId;
if (r9) {
defaultImport = importDefault(22) /* metro dependency 22 */;
r9 = defaultImport.isEqual(property.options, auditLogRecord2.options);
}
r9 = r9 && auditLogRecord2.timestampStart.diff(property.timestampStart, 'minutes') < 30 && binding < 50;
r9 = r9 && auditLogRecord2.targetType !== AuditLogTargetTypes.INVITE && auditLogRecord2.action !== AuditLogActions.MESSAGE_DELETE;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.MESSAGE_BULK_DELETE && auditLogRecord2.action !== AuditLogActions.MESSAGE_PIN;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.MESSAGE_UNPIN && auditLogRecord2.action !== AuditLogActions.MEMBER_MOVE;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.MEMBER_DISCONNECT && auditLogRecord2.action !== AuditLogActions.BOT_ADD;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.APPLICATION_COMMAND_PERMISSION_UPDATE && auditLogRecord2.action !== AuditLogActions.MEMBER_PRUNE;
if (r9) {
binding = env0_0;
merge = property.merge;
changes = property.changes;
items2 = [];
value = arraySpread(items2, changes, 0, r18);
changes = auditLogRecord2.changes;
arraySpread(items2, changes, value, r18);
binding[0] = Reflect.apply(merge, property, [{changes: items2, timestampEnd: auditLogRecord2.timestampStart}]);
binding = env0_1;
value = typeof binding === 'bigint' ? binding : +binding;
env0_1 = typeof value === 'bigint' ? value + 1n : +value + 1;
} else {
var actionType = auditLogRecord2.actionType;
var DELETE = AuditLogActionTypes.DELETE;
if (actionType === DELETE) {
if (value != r1) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord2.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord2.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord2.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord2.targetType] = {[auditLogRecord2.targetId]: r8};
} else {
env1_38[auditLogRecord2.targetType][auditLogRecord2.targetId] = r8;
}
} else if (value != r8) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord2.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord2.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord2.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord2.targetType] = {[auditLogRecord2.targetId]: r8};
} else {
env1_38[auditLogRecord2.targetType][auditLogRecord2.targetId] = r8;
}
}
}
binding = env0_0;
binding.unshift(auditLogRecord2);
}
}
binding = env0_0;
binding.unshift(auditLogRecord);
}
}
function _fun122247(a0) { // fn#122247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4079, offset: 0x0255ff51, size: 35 bytes, params: 2, frame: 11
const env0_0 = a0;
return a0.roles.some(_fun122248);
}
function GuildSettingsAuditLogStore() { // fn#122251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4245, offset: 0x025601e7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildSettingsAuditLogStore);
const value3 = env1_5(GuildSettingsAuditLogStore);
return env1_4(this, _isNativeReflectConstruct_122238() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function _fun122248(a0) { // fn#122248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4096, offset: 0x0255ff74, size: 99 bytes, params: 2, frame: 14
var r3;
var r0;
let value = environment.__proto__;
if (env1_0 != null) {
if (env0_0.userId === env1_0.ownerId) {
return true;
function GUILD_SETTINGS_SET_SECTION_122246({section}) { // fn#122246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:3900, offset: 0x0255fe8a, size: 199 bytes, params: 2, frame: 16
var value4;
const AUDIT_LOG = GuildSettingsSections.AUDIT_LOG;
if (section !== AUDIT_LOG) {
return false;
}
r3 = env1_1?.[a0];
value = r3 != null;
if (value) {
value = environment.__proto__.__proto__;
value = hasAnyPermission(r3, env2_20);
r0 = value;
} else {
r0 = value;
const members = GuildMemberStore.getMembers(env0_21);
let env0_0 = GuildStore.getGuild(env0_21);
if (env0_21 != null) {
value4 = GuildRoleStore.getUnsafeMutableRoles(env0_21);
}
return r0;
env0_24 = (importDefault(22) /* metro dependency 22 */)(members).filter(function(a0) {
var env0_0 = a0;
return a0.roles.some(_fun122248);
}).map(function(a0) {
return a0.userId;
}).value();
function _fun122247(a0) { // fn#122247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4079, offset: 0x0255ff51, size: 35 bytes, params: 2, frame: 11
const env0_0 = a0;
return a0.roles.some(_fun122248);
function _fun122248(a0) { // fn#122248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4096, offset: 0x0255ff74, size: 99 bytes, params: 2, frame: 14
var r3;
var r0;
let value = environment.__proto__;
if (env1_0 != null) {
if (env0_0.userId === env1_0.ownerId) {
return true;
}
r3 = env1_1?.[a0];
value = r3 != null;
if (value) {
value = environment.__proto__.__proto__;
value = hasAnyPermission(r3, env2_20);
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
}
}
function _fun122250(a0) { // fn#122250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4233, offset: 0x0255ffd7, size: 528 bytes, params: 2, frame: 16
const GuildSettingsAuditLogStore2 = GuildSettingsAuditLogStore;
Inherits(GuildSettingsAuditLogStore2, a0);
return CreateClass(GuildSettingsAuditLogStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore, GuildMemberStore);
}}, {key: 'logs', get: get_122253}, {key: 'integrations', get: get_122254}, {key: 'webhooks', get: get_122255},
{key: 'guildScheduledEvents', get: get_122256}, {key: 'automodRules', get: get_122257}, {key: 'threads',
get: get_122258}, {key: 'applicationCommands', get: get_122259}, {key: 'isInitialLoading', get: get_122260},
{key: 'isLoading', get: get_122261}, {key: 'isLoadingNextPage', get: get_122262}, {key: 'hasOlderLogs',
get: get_122263}, {key: 'hasError', get: get_122264}, {key: 'userIds', get: get_122265}, {key: 'userIdFilter',
get: get_122266}, {key: 'targetIdFilter', get: get_122267}, {key: 'actionFilter', get: function() {
return ALL;
}}, {key: 'deletedTargets', get: get_122269}, {key: 'groupedFetchCount', get: get_122270}]);
function GuildSettingsAuditLogStore() { // fn#122251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4245, offset: 0x025601e7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildSettingsAuditLogStore);
const value3 = env1_5(GuildSettingsAuditLogStore);
return env1_4(this, _isNativeReflectConstruct_122238() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function get_122253() { // fn#122253, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
return env1_22;
}
function get_122254() { // fn#122254, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1
return env1_23;
}
function get_122255() { // fn#122255, offset: 0x00df3ad6, size: 9 bytes, params: 1, frame: 1
return env1_25;
}
function get_122256() { // fn#122256, offset: 0x00df3adf, size: 9 bytes, params: 1, frame: 1
return env1_26;
}
function get_122257() { // fn#122257, offset: 0x00df3b32, size: 9 bytes, params: 1, frame: 1
return env1_27;
}
function get_122258() { // fn#122258, offset: 0x0108042c, size: 9 bytes, params: 1, frame: 1
return env1_28;
}
function get_122259() { // fn#122259, offset: 0x00ef0ca7, size: 9 bytes, params: 1, frame: 1
return env1_29;
}
function get_122260() { // fn#122260, offset: 0x00e45481, size: 9 bytes, params: 1, frame: 1
return env1_30;
}
function get_122261() { // fn#122261, offset: 0x00df3abb, size: 9 bytes, params: 1, frame: 1
return env1_31;
}
function get_122262() { // fn#122262, offset: 0x01080587, size: 9 bytes, params: 1, frame: 1
return env1_32;
}
function get_122263() { // fn#122263, offset: 0x0117839e, size: 9 bytes, params: 1, frame: 1
return env1_33;
}
function get_122264() { // fn#122264, offset: 0x00df3b9e, size: 9 bytes, params: 1, frame: 1
return env1_34;
}
function get_122265() { // fn#122265, offset: 0x00df3acd, size: 9 bytes, params: 1, frame: 1
return env1_24;
}
function get_122266() { // fn#122266, offset: 0x00e427c1, size: 9 bytes, params: 1, frame: 1
return env1_35;
}
function get_122267() { // fn#122267, offset: 0x00e42916, size: 9 bytes, params: 1, frame: 1
return env1_37;
}
function get_122269() { // fn#122269, offset: 0x010e2754, size: 9 bytes, params: 1, frame: 1
return env1_38;
}
function get_122270() { // fn#122270, offset: 0x01d1de51, size: 9 bytes, params: 1, frame: 1
return env1_39;
}
}
function AUDIT_LOG_FETCH_SUCCESS(a0) { // fn#122272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5629, offset: 0x0256027b, size: 148 bytes, params: 2, frame: 14
env0_22 = transformEntries(a0.logs);
env0_23 = a0.integrations;
env0_25 = a0.webhooks;
env0_26 = a0.guildScheduledEvents;
env0_27 = a0.automodRules ?? [];
env0_28 = a0.threads;
env0_29 = a0.applicationCommands;
if (a0.logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_START({isGroupedFetch}) { // fn#122274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5966, offset: 0x0256032a, size: 36 bytes, params: 2, frame: 3
var binding;
if (isGroupedFetch) {
binding = env0_39;
env0_39 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS({logs, integrations, webhooks, guildScheduledEvents, automodRules, threads, applicationCommands}) { // fn#122275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:6067, offset: 0x0256034e, size: 167 bytes, params: 2, frame: 20
var value4;
var binding;
var items2;
if (logs.length === 0 || logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
if (logs.length > 0) {
value4 = transformEntries(logs);
binding = env0_22;
items2 = [];
arraySpread(items2, value4, arraySpread(items2, binding, 0, undefined), undefined);
}
}
}
global.__d(_fun122237, 15878, [6, 7, 15, 17, 18, 15879, 1383, 1939, 1945, 1938, 1867, 661, 483, 22, 566, 694,
2]) /* metro module 15878, dependencies: [6, 7, 15, 17, 18, 15879, 1383, 1939, 1945, 1938, 1867, 661, 483, 22, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,19 +1,28 @@
/* Metro module 15877; source: modules/guild_settings/audit_log/native/GuildSettingsModalAuditLog.tsx; dependencies: [57, 31, 27, 1379, 1867, 1934, 1878, 15878, 661, 33, 4501, 697, 1484, 566, 15880, 1244, 6802, 15887, 15897, 5277, 15888, 5461, 6238, 4573, 6243, 1305, 15898, 5462, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import GuildSettingsAuditLogStore from '../GuildSettingsAuditLogStore.tsx'; /* Metro dependency 15878 */
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 ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HeaderActionButtonNativeModule from '../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as ActivityIndicatorNativeModule from '../../../../design/components/ActivityIndicator/native/ActivityIndicator.native.tsx'; /* Metro dependency 5461 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as GuildSettingsModalAuditLogFilterModule from './GuildSettingsModalAuditLogFilter.tsx'; /* Metro dependency 15887 */
function _fun122220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:6, offset: 0x0255e655, size: 549 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.FlatList;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsAuditLogStore = importDefault(15878) /* metro dependency 15878: GuildSettingsAuditLogStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_13 = value.GuildSettingsSections;
const env0_14 = value.AuditLogFilterTypes;
@@ -23,249 +32,289 @@ function _fun122220(global, require, importDefault, importAll, module, exports,
const env0_17 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.listView = {marginVertical: 12};
object2.spinner = {marginTop: 40};
const object3 = {'borderRadius': null, 'paddingVertical': 6, 'paddingHorizontal': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object = {};
object.listView = {marginVertical: 12};
object.spinner = {marginTop: 40};
const object4 = {'borderRadius': null, 'paddingVertical': 6, 'paddingHorizontal': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object3.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object2.filterTextWrapper = object3;
const object6 = {};
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object.filterTextWrapper = object4;
const object5 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.paddingTop = PX_12;
object5.paddingTop = PX_12;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingHorizontal = PX_8;
object2.filtersWrapper = object6;
object2.firstAuditRow = {marginTop: 0};
object2.lastAuditRow = {marginBottom: 0};
object2.filterTrailing = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 8};
const env0_18 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLog.tsx');
object5.paddingHorizontal = PX_8;
object.filtersWrapper = object5;
object.firstAuditRow = {marginTop: 0};
object.lastAuditRow = {marginBottom: 0};
object.filterTrailing = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 8};
const env0_18 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLog.tsx');
exports.default = ConnectedGuildSettingsModalAuditLog;
}
function ConnectedGuildSettingsModalAuditLog({guildId, contentContainerStyle}) { // fn#122221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:862, offset: 0x0255e87a, size: 1349 bytes, params: 2, frame: 47
var r13;
var r6;
var jsxRuntimeEnv0_17Binding2;
var TableRow;
var object;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var filterTextWrapper;
var items3;
var items2;
var EmptyState;
var object2;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore,
SelectedChannelStore], function() {
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsAuditLogStore,
UserStore], _fun122223);
const isInitialLoading = value3.isInitialLoading;
const isLoading = value3.isLoading;
const isLoadingNextPage = value3.isLoadingNextPage;
const hasError = value3.hasError;
const actionFilter = value3.actionFilter;
const env0_4 = actionFilter;
const userIdFilter = value3.userIdFilter;
const env0_5 = userIdFilter;
const userIdFilterLabel = value3.userIdFilterLabel;
const actionFilterLabel = value3.actionFilterLabel;
const _logs = value3._logs;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const binding = env0_5;
const value4 = binding.useMemo(_fun122226, [_logs, guild]);
const [property, env0_10] = env0_4(binding.useState({'current': null, 'prev': null}), 2);
const value7 = binding.useCallback(_fun122227, [actionFilter, userIdFilter, value2]);
const value8 = binding.useCallback(_fun122230, [styles, property, channel, guildId, value4.length]);
binding.useLayoutEffect(_fun122232, [value7, value2]);
binding.useEffect(_fun122234, [guildId]);
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
const activityIndicator = <ActivityIndicator style={styles.spinner} />;
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
if (isLoading) {
r6 = activityIndicator;
} else if (isInitialLoading) {
r6 = activityIndicator;
} else {
jsxRuntimeEnv0_17Binding2 = jsxRuntimeEnv0_17;
var viewBindingProps = {style: styles.filtersWrapper};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object = {'start': true, 'end': true};
string = intl.string;
object.icon = <Text variant="text-md/semibold">{Reflect.apply(string, intl, [t.kP6oFy])}</Text>;
var viewBindingProps2 = {style: styles.filterTrailing};
filterTextWrapper = styles.filterTextWrapper;
items3 = [<View style={filterTextWrapper}><Text variant="text-sm/semibold">{userIdFilterLabel}</Text></View>];
filterTextWrapper = styles.filterTextWrapper;
items3[1] = <View style={filterTextWrapper}><Text variant="text-sm/semibold">{actionFilterLabel}</Text></View>;
object.label = <View {...viewBindingProps2}>{items3}</View>;
object.onPress = value7;
object.trailing = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
items2 = [<View {...viewBindingProps}><TableRow {...object} /></View>];
if (value4.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
object2 = {};
string = intl.string;
object2.body = hasError ? Reflect.apply(string, intl, [t.tzkaD7]) : Reflect.apply(string, intl, [t.lNuYhh]);
string = intl.string;
object2.title = hasError ? Reflect.apply(string, intl, [t.Ww5Tjy]) : Reflect.apply(string, intl,
[t['RHhk+P']]);
object2.Illustration = (require(15898) /* metro dependency 15898: EmptyServerSettingsAuditLog */).EmptyServerSettingsAuditLog;
r13 = <EmptyState {...object2} />;
function ConnectedGuildSettingsModalAuditLog({guildId, contentContainerStyle}) { // fn#122221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:862, offset: 0x0255e87a, size: 1349 bytes, params: 2, frame: 47
var r13;
var r6;
var jsxRuntimeEnv0_17Binding2;
var TableRow;
var object3;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var filterTextWrapper;
var items3;
var items2;
var EmptyState;
var object4;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore,
SelectedChannelStore], function() {
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsAuditLogStore,
UserStore], _fun122223);
const isInitialLoading = value3.isInitialLoading;
const isLoading = value3.isLoading;
const isLoadingNextPage = value3.isLoadingNextPage;
const hasError = value3.hasError;
const actionFilter = value3.actionFilter;
const actionFilter2 = actionFilter;
const userIdFilter = value3.userIdFilter;
const userIdFilter2 = userIdFilter;
const userIdFilterLabel = value3.userIdFilterLabel;
const actionFilterLabel = value3.actionFilterLabel;
const _logs = value3._logs;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const binding = userIdFilter2;
const value4 = binding.useMemo(_fun122226, [_logs, guild]);
const [property, env0_10] = actionFilter2(binding.useState({'current': null, 'prev': null}), 2);
const value7 = binding.useCallback(_fun122227, [actionFilter, userIdFilter, value2]);
const value8 = binding.useCallback(_fun122230, [styles, property, channel, guildId, value4.length]);
binding.useLayoutEffect(_fun122232, [value7, value2]);
binding.useEffect(_fun122234, [guildId]);
const ActivityIndicator = (ActivityIndicatorNativeModule).ActivityIndicator;
const activityIndicator = <ActivityIndicator style={styles.spinner} />;
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
if (isLoading) {
r6 = activityIndicator;
} else if (isInitialLoading) {
r6 = activityIndicator;
} else {
r13 = <FlatList style={[styles.listView]} contentContainerStyle={contentContainerStyle} data={value4} extraData={property} keyExtractor={function(a0) {
return a0.id;
}} renderItem={value8} onEndReached={onEndReached} />;
jsxRuntimeEnv0_17Binding2 = jsxRuntimeEnv0_17;
var viewBindingProps = {style: styles.filtersWrapper};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object3 = {'start': true, 'end': true};
string = intl.string;
object3.icon = (
<Text variant="text-md/semibold">
{Reflect.apply(string, intl, [t.kP6oFy])}
</Text>
);
var viewBindingProps2 = {style: styles.filterTrailing};
filterTextWrapper = styles.filterTextWrapper;
items3 = [
<View style={filterTextWrapper}>
<Text variant="text-sm/semibold">
{userIdFilterLabel}
</Text>
</View>,
];
filterTextWrapper = styles.filterTextWrapper;
items3[1] = (
<View style={filterTextWrapper}>
<Text variant="text-sm/semibold">
{actionFilterLabel}
</Text>
</View>
);
object3.label = (
<View {...viewBindingProps2}>
{items3}
</View>
);
object3.onPress = value7;
object3.trailing = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
items2 = [
<View {...viewBindingProps}>
<TableRow {...object3} />
</View>,
];
if (value4.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
object4 = {};
string = intl.string;
object4.body = hasError ? Reflect.apply(string, intl, [t.tzkaD7]) : Reflect.apply(string, intl, [t.lNuYhh]);
string = intl.string;
object4.title = hasError ? Reflect.apply(string, intl, [t.Ww5Tjy]) : Reflect.apply(string, intl,
[t['RHhk+P']]);
object4.Illustration = (require(15898) /* metro dependency 15898: EmptyServerSettingsAuditLog */).EmptyServerSettingsAuditLog;
r13 = <EmptyState {...object4} />;
} else {
r13 = (
<FlatList
style={[styles.listView]}
contentContainerStyle={contentContainerStyle}
data={value4}
extraData={property}
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value8}
onEndReached={onEndReached_122236}
/>
);
}
items2[1] = r13;
items2[2] = isLoadingNextPage ? activityIndicator : null;
r6 = (
<>
{items2}
</>
);
}
items2[1] = r13;
items2[2] = isLoadingNextPage ? activityIndicator : null;
r6 = <>{items2}</>;
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{r6}
<NavScrim />
</>
);
function _fun122223() { // fn#122223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1098, offset: 0x0255ede0, size: 324 bytes, params: 1, frame: 17
var environment;
var r2;
var intl;
const value = environment.__proto__;
const property = (importAll(15880) /* metro dependency 15880: AuditLogUtils */).ACTION_FILTER_ITEMS().filter(function({value}) {
return value === GuildSettingsAuditLogStore.actionFilter;
})[0];
let userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
const value4 = null;
const r3 = value4 != userIdFilter ? UserStore.getUser(GuildSettingsAuditLogStore.userIdFilter) : value4;
const object = {};
guildSettingsAuditLogStoreBinding = GuildSettingsAuditLogStore;
object.isInitialLoading = guildSettingsAuditLogStoreBinding.isInitialLoading;
object.isLoading = guildSettingsAuditLogStoreBinding.isLoading;
object.isLoadingNextPage = guildSettingsAuditLogStoreBinding.isLoadingNextPage;
object.showLoadMore = guildSettingsAuditLogStoreBinding.groupedFetchCount > 2;
object.hasError = guildSettingsAuditLogStoreBinding.hasError;
object.hasOlderLogs = guildSettingsAuditLogStoreBinding.hasOlderLogs;
object.actionFilter = guildSettingsAuditLogStoreBinding.actionFilter;
object.actionFilterLabel = value4 != property ? property.label : '';
userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
object.userIdFilter = userIdFilter;
if (value4 != r3) {
r2 = r3.tag;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZRFdsL);
}
object.userIdFilterLabel = r2;
object._logs = GuildSettingsAuditLogStore.logs;
return object;
}
function _fun122226() { // fn#122226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1829, offset: 0x0255ef3f, size: 74 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
if (_logs == null) {
r0 = [];
} else if (guild != null) {
value2 = environment.__proto__;
moduleValue = importAll(15880) /* metro dependency 15880: AuditLogUtils */;
r0 = moduleValue.transformLogs(_logs, guild);
} else {
r0 = [];
}
return r0;
}
function _fun122227() { // fn#122227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1968, offset: 0x0255ef89, size: 197 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
Reflect.apply(showSimpleActionSheet, value, [{'key': 'GuildSettingsAuditLogFilter', 'options': null,
'hasIcons': false, options: [{label: Reflect.apply(string, intl, [t['hxnY/q']]), onPress: onPress_122228},
{label: intl.string(t.rautds), onPress: onPress_122229}]}]);
function onPress_122228() { // fn#122228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2098, offset: 0x0255f04e, size: 106 bytes, params: 1, frame: 19
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object = {};
const USER = AuditLogFilterTypes.USER;
object.filterType = USER;
const value3 = undefined;
const createAuditLogFilterUserData = GuildSettingsModalAuditLogFilterModule.createAuditLogFilterUserData;
const userIdFilter2 = userIdFilter ?? value3;
object.data = Reflect.apply(createAuditLogFilterUserData, GuildSettingsModalAuditLogFilterModule, [userIdFilter2]);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object]);
return value3;
}
function onPress_122229() { // fn#122229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2265, offset: 0x0255f0b8, size: 91 bytes, params: 1, frame: 17
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object = {};
const ACTION = AuditLogFilterTypes.ACTION;
object.filterType = ACTION;
object.data = GuildSettingsModalAuditLogFilterModule.createAuditLogFilterActionData(actionFilter);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object]);
}
}
function _fun122230({item, index}) { // fn#122230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2417, offset: 0x0255f113, size: 210 bytes, params: 2, frame: 23
const binding = env0_9;
return ((Component) => <Component containerStyle={[index === 0 && styles.firstAuditRow,
index === env0_8.length - 1 && styles.lastAuditRow]} onHeaderClick={onHeaderClick} log={item} expanded={binding.current === item.id} lastExpanded={binding.prev === item.id} guildId={guildId} channel={channel} key={item.id} />)(importDefault(15897) /* metro dependency 15897: AuditLog */);
function onHeaderClick(a0) { // fn#122231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2585, offset: 0x0255f1e5, size: 91 bytes, params: 2, frame: 13
if (env1_9.current !== a0.id) {
env1_10({current: a0.id, prev: env1_9.current});
} else {
env1_10({'current': null, 'prev': null});
}
}
}
function _fun122232() { // fn#122232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2768, offset: 0x0255f240, size: 38 bytes, params: 1, frame: 12
const binding = env0_2;
binding.setOptions({headerRight: headerRight_122233});
function headerRight_122233() { // fn#122233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2799, offset: 0x0255f266, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const headerActionButtonProps = {onPress: env1_11};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEasFX);
return <HeaderActionButton {...headerActionButtonProps} />;
}
}
function _fun122234() { // fn#122234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2915, offset: 0x0255f2d1, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchLogs(guildId);
}
function ConnectedGuildSettingsModalAuditLogOnEndReached() { // fn#122236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:3898, owner: ConnectedGuildSettingsModalAuditLog.onEndReached, offset: 0x0255f2fe, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchNextLogPage(guildId);
}
}
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{r6}
<NavScrim />
</>
);
}
function _fun122223() { // fn#122223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1098, offset: 0x0255ede0, size: 324 bytes, params: 1, frame: 17
var environment;
var r2;
var intl;
const value = environment.__proto__;
const property = (importAll(15880) /* metro dependency 15880: AuditLogUtils */).ACTION_FILTER_ITEMS().filter(function({value}) {
return value === GuildSettingsAuditLogStore.actionFilter;
})[0];
let userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
const value4 = null;
const r3 = value4 != userIdFilter ? UserStore.getUser(GuildSettingsAuditLogStore.userIdFilter) : value4;
const object2 = {};
object2.isInitialLoading = GuildSettingsAuditLogStore.isInitialLoading;
object2.isLoading = GuildSettingsAuditLogStore.isLoading;
object2.isLoadingNextPage = GuildSettingsAuditLogStore.isLoadingNextPage;
object2.showLoadMore = GuildSettingsAuditLogStore.groupedFetchCount > 2;
object2.hasError = GuildSettingsAuditLogStore.hasError;
object2.hasOlderLogs = GuildSettingsAuditLogStore.hasOlderLogs;
object2.actionFilter = GuildSettingsAuditLogStore.actionFilter;
object2.actionFilterLabel = value4 != property ? property.label : '';
userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
object2.userIdFilter = userIdFilter;
if (value4 != r3) {
r2 = r3.tag;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZRFdsL);
}
object2.userIdFilterLabel = r2;
object2._logs = GuildSettingsAuditLogStore.logs;
return object2;
}
function _fun122226() { // fn#122226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1829, offset: 0x0255ef3f, size: 74 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
if (_logs == null) {
r0 = [];
} else if (guild != null) {
value2 = environment.__proto__;
moduleValue = importAll(15880) /* metro dependency 15880: AuditLogUtils */;
r0 = moduleValue.transformLogs(_logs, guild);
} else {
r0 = [];
}
return r0;
}
function _fun122227() { // fn#122227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1968, offset: 0x0255ef89, size: 197 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(showSimpleActionSheet, value, [{'key': 'GuildSettingsAuditLogFilter', 'options': null,
'hasIcons': false, options: [{label: Reflect.apply(string, intl, [t['hxnY/q']]), onPress: onPress_122228},
{label: intl.string(t.rautds), onPress: onPress_122229}]}]);
}
function _fun122230({item, index}) { // fn#122230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2417, offset: 0x0255f113, size: 210 bytes, params: 2, frame: 23
const binding = env0_9;
return ((Component) => <Component containerStyle={[index === 0 && styles.firstAuditRow,
index === env0_8.length - 1 && styles.lastAuditRow]} onHeaderClick={onHeaderClick} log={item} expanded={binding.current === item.id} lastExpanded={binding.prev === item.id} guildId={guildId} channel={channel} key={item.id} />)(importDefault(15897) /* metro dependency 15897: AuditLog */);
}
function _fun122232() { // fn#122232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2768, offset: 0x0255f240, size: 38 bytes, params: 1, frame: 12
const binding = env0_2;
binding.setOptions({headerRight: headerRight_122233});
}
function _fun122234() { // fn#122234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2915, offset: 0x0255f2d1, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchLogs(guildId);
}
function ConnectedGuildSettingsModalAuditLogOnEndReached() { // fn#122236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:3898, owner: ConnectedGuildSettingsModalAuditLog.onEndReached, offset: 0x0255f2fe, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchNextLogPage(guildId);
}
function onPress_122228() { // fn#122228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2098, offset: 0x0255f04e, size: 106 bytes, params: 1, frame: 19
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object2 = {};
const USER = AuditLogFilterTypes.USER;
object2.filterType = USER;
const value3 = undefined;
const guildSettingsModalAuditLogFilterModule = require(15887) /* metro dependency 15887: GuildSettingsModalAuditLogFilter */;
const createAuditLogFilterUserData = guildSettingsModalAuditLogFilterModule.createAuditLogFilterUserData;
const userIdFilter2 = userIdFilter ?? value3;
object2.data = Reflect.apply(createAuditLogFilterUserData, guildSettingsModalAuditLogFilterModule, [userIdFilter2]);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object2]);
return value3;
}
function onPress_122229() { // fn#122229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2265, offset: 0x0255f0b8, size: 91 bytes, params: 1, frame: 17
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object2 = {};
const ACTION = AuditLogFilterTypes.ACTION;
object2.filterType = ACTION;
const guildSettingsModalAuditLogFilterModule = require(15887) /* metro dependency 15887: GuildSettingsModalAuditLogFilter */;
object2.data = guildSettingsModalAuditLogFilterModule.createAuditLogFilterActionData(actionFilter);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object2]);
}
function onHeaderClick(a0) { // fn#122231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2585, offset: 0x0255f1e5, size: 91 bytes, params: 2, frame: 13
if (env1_9.current !== a0.id) {
env1_10({current: a0.id, prev: env1_9.current});
} else {
env1_10({'current': null, 'prev': null});
}
}
function headerRight_122233() { // fn#122233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2799, offset: 0x0255f266, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {onPress: env1_11};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEasFX);
return <HeaderActionButton {...headerActionButtonProps} />;
}
global.__d(_fun122220, 15877, [57, 31, 27, 1379, 1867, 1934, 1878, 15878, 661, 33, 4501, 697, 1484, 566, 15880,
1244, 6802, 15887, 15897, 5277, 15888, 5461, 6238, 4573, 6243, 1305, 15898, 5462,
2]) /* metro module 15877, dependencies: [57, 31, 27, 1379, 1867, 1934, 1878, 15878, 661, 33, 4501, 697, 1484, 566, 15880, 1244, 6802, 15887, 15897, 5277, 15888, 5461, 6238, 4573, 6243, 1305, 15898, 5462, 2] */;
@@ -1,241 +1,293 @@
/* Metro module 15887; source: modules/guild_settings/audit_log/native/GuildSettingsModalAuditLogFilter.tsx; dependencies: [57, 31, 27, 1878, 15878, 661, 33, 4501, 697, 1244, 3995, 15880, 1585, 1484, 6590, 15888, 12140, 7989, 6238, 1305, 10856, 15889, 6984, 8754, 8416, 5462, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildSettingsAuditLogStore from '../GuildSettingsAuditLogStore.tsx'; /* Metro dependency 15878 */
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 ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as AuditLogUtilsModule from '../AuditLogUtils.tsx'; /* Metro dependency 15880 */
function _fun122593(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:6, offset: 0x0256cf7b, size: 383 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsAuditLogStore = importDefault(15878) /* metro dependency 15878: GuildSettingsAuditLogStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AuditLogFilterTypes;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.Fragment;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingVertical = PX_16;
const env0_12 = Reflect.apply(createStyles, value, [{searchBar: object, allUsersIconContainer: {'height': 30,
const object2 = {};
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
const PX_16 = (Native).space.PX_16;
object2.paddingVertical = PX_16;
const env0_12 = Reflect.apply(createStyles, value, [{searchBar: object2, allUsersIconContainer: {'height': 30,
'width': 30, 'alignItems': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLogFilter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLogFilter.tsx');
exports.default = GuildSettingsModalAuditLogFilter;
exports.createAuditLogFilterUserData = createAuditLogFilterUserData;
exports.createAuditLogFilterActionData = createAuditLogFilterActionData;
}
function GuildSettingsModalAuditLogFilter({data, filterType, guildId}) { // fn#122594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:519, offset: 0x0256d0fa, size: 959 bytes, params: 2, frame: 31
var r6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var FlashList;
var object;
var object2;
var EmptyState;
var object6;
const styles = useStyles();
const env0_3 = styles;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = value2;
const [property, property2] = env0_3(binding.useState(''), 2);
const {data, keyExtractor} = binding.useMemo(function() {
var object = {};
object.data = data.filter(_fun122596);
object.keyExtractor = _fun122597;
return object;
}, [property, dataBinding]);
binding.useEffect(_fun122598, [filterType, value2]);
const value7 = binding.useCallback(_fun122600, [filterType, guildId, binding.useCallback(_fun122599, [filterType,
guildId, value2]), dataBinding.length, styles.allUsersIconContainer]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const USER = AuditLogFilterTypes.USER;
const view = <View style={styles.searchBar}><SearchField size="md" placeholder={filterType === USER ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK) : filterType === AuditLogFilterTypes.ACTION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I288Zx) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])} onChange={property2} /></View>;
if (dataBinding.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r6 = <EmptyState body={intl.string(t.V6nAfF)} title={intl.formatToPlainString(t.ZGVL3g,
{count: 0})} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} />;
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
object = {keyExtractor: keyExtractor, renderItem: value7, estimatedItemSize: 50, data: dataBinding};
object2 = {};
object2.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingBottom = bottom;
object.contentContainerStyle = object2;
r6 = <FlashList {...object} />;
}
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{view}
{r6}
<NavScrim />
</>
);
}
function createAuditLogFilterUserData(a0) { // fn#122603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2472, offset: 0x0256d91f, size: 227 bytes, params: 2, frame: 20
const env0_0 = a0;
const items2 = [];
const push = items2.push;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const ZRFdsL = (require(1244) /* metro dependency 1244: indexNative */).t.ZRFdsL;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ZRFdsL]), value: null, selected: a0 == null,
index: 0}]);
const Set = global.Set;
const set = new Set();
GuildSettingsAuditLogStore.logs.forEach(function({userId}) {
userIdResolver(userId);
});
const userIds = GuildSettingsAuditLogStore.userIds;
userIds.forEach(function(a0) {
userIdResolver(a0);
});
items2.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
return items2;
}
function createAuditLogFilterActionData(a0) { // fn#122608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2987, offset: 0x0256daed, size: 81 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = require(15880) /* metro dependency 15880: AuditLogUtils */;
value = value.ACTION_FILTER_ITEMS();
value = value.map(_fun122609);
return value.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
}
function _fun122595() { // fn#122595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:704, offset: 0x0256d4b9, size: 46 bytes, params: 1, frame: 13
const object2 = {};
object2.data = data.filter(_fun122596);
object2.keyExtractor = function(a0) {
return a0.value != null ? a0.value.toString() : a0.index.toString();
};
return object2;
}
function _fun122598() { // fn#122598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:895, offset: 0x0256d559, size: 242 bytes, params: 1, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const binding = env0_4;
const setOptions = binding.setOptions;
const filterTypeBinding = filterType;
const value = environment.__proto__;
const USER = AuditLogFilterTypes.USER;
Reflect.apply(setOptions, binding,
[{headerTitle: USER === filterTypeBinding ? intl.string(t['hxnY/q']) : AuditLogFilterTypes.ACTION === filterTypeBinding ? intl.string(t.rautds) : intl.string(t.pEasFX)}]);
}
function _fun122599(a0, a1) { // fn#122599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1151, offset: 0x0256d64b, size: 164 bytes, params: 3, frame: 15
var filterTypeBinding;
var value2;
var moduleValue;
var moduleValue2;
var value3;
if (a0) {
filterTypeBinding = filterType;
value2 = environment.__proto__;
if (filterTypeBinding === AuditLogFilterTypes.USER) {
moduleValue2 = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value3 = null;
moduleValue2.filterByUserId(value3 != a1 ? a1.id : value3, guildId);
} else if (filterType === AuditLogFilterTypes.ACTION) {
moduleValue = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
moduleValue.filterByAction(a1, guildId);
function GuildSettingsModalAuditLogFilter({data, filterType, guildId}) { // fn#122594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:519, offset: 0x0256d0fa, size: 959 bytes, params: 2, frame: 31
var r6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var FlashList;
var object4;
var object5;
var EmptyState;
var object3;
const styles = useStyles();
const styles2 = styles;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value2 = (UseNavigationNativeModule).useNavigation();
const binding = value2;
const [property, property2] = styles2(binding.useState(''), 2);
const {data, keyExtractor} = binding.useMemo(function() {
var object = {};
object.data = data.filter(_fun122596);
object.keyExtractor = _fun122597;
return object;
}, [property, dataBinding]);
binding.useEffect(_fun122598, [filterType, value2]);
const value7 = binding.useCallback(_fun122600, [filterType, guildId, binding.useCallback(_fun122599, [filterType,
guildId, value2]), dataBinding.length, styles.allUsersIconContainer]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const SearchField = (SearchFieldNativeModule).SearchField;
const USER = AuditLogFilterTypes.USER;
const view = (
<View style={styles.searchBar}>
<SearchField
size="md"
placeholder={filterType === USER ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK) : filterType === AuditLogFilterTypes.ACTION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I288Zx) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}
onChange={property2}
/>
</View>
);
if (dataBinding.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r6 = (
<EmptyState
body={intl.string(t.V6nAfF)}
title={intl.formatToPlainString(t.ZGVL3g, {count: 0})}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
/>
);
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
object4 = {keyExtractor: keyExtractor, renderItem: value7, estimatedItemSize: 50, data: dataBinding};
object5 = {};
object5.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingBottom = bottom;
object4.contentContainerStyle = object5;
r6 = <FlashList {...object4} />;
}
env0_4.pop();
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{view}
{r6}
<NavScrim />
</>
);
function _fun122595() { // fn#122595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:704, offset: 0x0256d4b9, size: 46 bytes, params: 1, frame: 13
const object = {};
object.data = data.filter(_fun122596);
object.keyExtractor = function(a0) {
return a0.value != null ? a0.value.toString() : a0.index.toString();
};
return object;
function _fun122596({label}) { // fn#122596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:725, offset: 0x0256d4e7, size: 68 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(6590) /* metro dependency 6590 */;
const binding = env1_5;
return value(binding.toLowerCase(), label.toLowerCase());
}
}
function _fun122598() { // fn#122598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:895, offset: 0x0256d559, size: 242 bytes, params: 1, frame: 19
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const setOptions = ReactModule.setOptions;
const filterTypeBinding = filterType;
const value = environment.__proto__;
const USER = AuditLogFilterTypes.USER;
Reflect.apply(setOptions, ReactModule,
[{headerTitle: USER === filterTypeBinding ? intl.string(t['hxnY/q']) : AuditLogFilterTypes.ACTION === filterTypeBinding ? intl.string(t.rautds) : intl.string(t.pEasFX)}]);
}
function _fun122599(a0, a1) { // fn#122599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1151, offset: 0x0256d64b, size: 164 bytes, params: 3, frame: 15
var filterTypeBinding;
var value2;
var moduleValue;
var moduleValue2;
var value3;
if (a0) {
filterTypeBinding = filterType;
value2 = environment.__proto__;
if (filterTypeBinding === AuditLogFilterTypes.USER) {
moduleValue2 = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value3 = null;
moduleValue2.filterByUserId(value3 != a1 ? a1.id : value3, guildId);
} else if (filterType === AuditLogFilterTypes.ACTION) {
moduleValue = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
moduleValue.filterByAction(a1, guildId);
}
ReactModule.pop();
}
}
function _fun122600({item, index}) { // fn#122600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1299, offset: 0x0256d6ef, size: 529 bytes, params: 2, frame: 29
var r8;
var r0;
const TableRow = (TableRowNativeModule).TableRow;
let value = item.value;
const selected = item.selected;
const label = item.label;
const filterTypeBinding = filterType;
const USER = AuditLogFilterTypes.USER;
if (filterTypeBinding !== USER) {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = (
<View style={styles.allUsersIconContainer}>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</View>
);
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
} else if (value !== null) {
value = ((Component) => <Component start={index === 0} end={index === data.length - 1} userId={value.id} guildId={guildId} onPress={onPress_122601} trailing={((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio)} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
r0 = value;
} else {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = (
<View style={styles.allUsersIconContainer}>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</View>
);
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
}
return r0;
function onPress_122601() { // fn#122601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1440, offset: 0x0256d900, size: 31 bytes, params: 1, frame: 13
return env1_7(!selected, value);
}
function onPress_122602() { // fn#122602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1718, offset: 0x0256d900, size: 31 bytes, params: 1, frame: 13
return env1_7(!selected, value);
}
}
}
function createAuditLogFilterUserData(a0) { // fn#122603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2472, offset: 0x0256d91f, size: 227 bytes, params: 2, frame: 20
const env0_0 = a0;
const items2 = [];
const push = items2.push;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const ZRFdsL = (IndexNativeModule).t.ZRFdsL;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ZRFdsL]), value: null, selected: a0 == null,
index: 0}]);
const Set = global.Set;
const set = new Set();
const guildSettingsAuditLogStoreBinding = GuildSettingsAuditLogStore;
guildSettingsAuditLogStoreBinding.logs.forEach(function({userId}) {
userIdResolver(userId);
});
const userIds = guildSettingsAuditLogStoreBinding.userIds;
userIds.forEach(function(a0) {
userIdResolver(a0);
});
items2.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
return items2;
function userIdResolver(a0) { // fn#122604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2641, owner: createAuditLogFilterUserData.userIdResolver, offset: 0x0256da02, size: 159 bytes, params: 2, frame: 16
var value;
var user;
var binding;
var push;
var object;
if (a0 != null) {
value = environment.__proto__;
user = UserStore.getUser(a0);
binding = env0_2;
if (!(binding.has(a0) || user == null)) {
binding = env0_2;
binding.add(a0);
binding = env0_1;
push = binding.push;
object = {};
object.label = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
object.value = user;
object.selected = user.id === env0_0;
object.index = binding.length;
Reflect.apply(push, binding, [object]);
}
}
}
}
function createAuditLogFilterActionData(a0) { // fn#122608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2987, offset: 0x0256daed, size: 81 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = AuditLogUtilsModule;
value = value.ACTION_FILTER_ITEMS();
value = value.map(_fun122609);
return value.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
function _fun122609(a0, a1) { // fn#122609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:3073, offset: 0x0256db3e, size: 53 bytes, params: 3, frame: 3
return {label: a0.label, value: a0.value, selected: env0_0 === a0.value, index: a1};
}
}
}
function _fun122600({item, index}) { // fn#122600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1299, offset: 0x0256d6ef, size: 529 bytes, params: 2, frame: 29
var r8;
function keyExtractor_122597(a0) { // fn#122597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:791, offset: 0x0256d52b, size: 46 bytes, params: 2, frame: 10
var r0;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let value = item.value;
const selected = item.selected;
const label = item.label;
const filterTypeBinding = filterType;
const USER = AuditLogFilterTypes.USER;
if (filterTypeBinding !== USER) {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = <View style={styles.allUsersIconContainer}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
} else if (value !== null) {
value = ((Component) => <Component start={index === 0} end={index === data.length - 1} userId={value.id} guildId={guildId} onPress={onPress_122601} trailing={((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio)} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
let value = a0.value;
if (value != null) {
value = a0.value;
value = value.toString();
r0 = value;
} else {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = <View style={styles.allUsersIconContainer}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
r0 = a0.index.toString();
}
return r0;
}
function userIdResolver(a0) { // fn#122604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2641, owner: createAuditLogFilterUserData.userIdResolver, offset: 0x0256da02, size: 159 bytes, params: 2, frame: 16
var value;
var user;
var binding;
var push;
var object2;
if (a0 != null) {
value = environment.__proto__;
user = UserStore.getUser(a0);
binding = env0_2;
if (!(binding.has(a0) || user == null)) {
binding = env0_2;
binding.add(a0);
binding = env0_1;
push = binding.push;
object2 = {};
object2.label = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
object2.value = user;
object2.selected = user.id === env0_0;
object2.index = binding.length;
Reflect.apply(push, binding, [object2]);
}
}
}
function _fun122609(a0, a1) { // fn#122609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:3073, offset: 0x0256db3e, size: 53 bytes, params: 3, frame: 3
return {label: a0.label, value: a0.value, selected: env0_0 === a0.value, index: a1};
}
function _fun122596({label}) { // fn#122596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:725, offset: 0x0256d4e7, size: 68 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(6590) /* metro dependency 6590 */;
const binding = env1_5;
return value(binding.toLowerCase(), label.toLowerCase());
}
function onPress_122601() { // fn#122601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1440, offset: 0x0256d900, size: 31 bytes, params: 1, frame: 13
return env1_7(!selected, value);
}
global.__d(_fun122593, 15887, [57, 31, 27, 1878, 15878, 661, 33, 4501, 697, 1244, 3995, 15880, 1585, 1484, 6590,
15888, 12140, 7989, 6238, 1305, 10856, 15889, 6984, 8754, 8416, 5462,
2]) /* metro module 15887, dependencies: [57, 31, 27, 1878, 15878, 661, 33, 4501, 697, 1244, 3995, 15880, 1585, 1484, 6590, 15888, 12140, 7989, 6238, 1305, 10856, 15889, 6984, 8754, 8416, 5462, 2] */;