Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,325 @@
/* Metro module 10906; source: modules/guild_antiraid/GuildIncidentsStore.tsx; dependencies: [6, 7, 15, 17, 18, 4107, 1348, 1867, 3784, 8275, 566, 694, 2] */
function _fun83526(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:6, offset: 0x01f1dda1, size: 441 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_83532 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const incidentsDataFromServer = function(a0) {
var r0;
var property;
var value = null;
if (value != a0) {
property = global.Object;
property = property.keys(a0).length;
r0 = property > 0 ? {raidDetectedAt: a0.raid_detected_at, dmSpamDetectedAt: a0.dm_spam_detected_at,
dmsDisabledUntil: a0.dms_disabled_until, invitesDisabledUntil: a0.invites_disabled_until,
lockdownDurationHours: a0.lockdown_duration_hours} : value;
} else {
r0 = value;
}
return r0;
};
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 experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
let env0_11 = {};
const env0_12 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun83535(Store);
value.displayName = 'GuildIncidentsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: CONNECTION_OPEN_83541, GUILD_CREATE: GUILD_CREATE_83542, GUILD_UPDATE: GUILD_UPDATE_83543,
GUILD_DELETE: GUILD_DELETE_83544, LOGOUT: function() {
env0_11 = {};
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildIncidentsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_83527() { // fn#83527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:190, offset: 0x01f1df5a, 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_83527_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_83530(a0, a1) { // fn#83530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:383, offset: 0x01f1dfbc, 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 _fun83531;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_83532(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_83532(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_83532(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun83531;
}
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 computeAlertSettings() { // fn#83533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:1307, offset: 0x01f1e130, size: 140 bytes, params: 1, frame: 19
var r4;
var r2;
var object2;
var value6;
var binding;
var id;
var id2;
var name;
var id3;
var value7;
const guildsProto = UserSettingsProtoStore.getGuildsProto();
reducibleJoin2: while (true) {
if (guildsProto != null) {
r4 = guildsProto;
break reducibleJoin2;
}
r4 = {};
break reducibleJoin2;
}
const guildsArray = GuildStore.getGuildsArray();
env0_12 = {};
const value4 = _createForOfIteratorHelperLoose_83530(guildsArray);
const value5 = value4();
let done = value5.done;
if (!done) {
r2 = value5;
reducibleLoop3: while (true) {
value6 = r2.value;
binding = env0_12;
id = value6.id;
object2 = {};
id2 = value6.id;
object2.guildId = id2;
name = value6.name;
object2.guildName = name;
id3 = value6.id;
copyDataProperties(object2, r4[id3], name);
binding[id] = object2;
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop3;
}
r2 = value7;
continue reducibleLoop3;
}
}
}
function _fun83535(a0) { // fn#83535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:1830, offset: 0x01f1e22e, size: 147 bytes, params: 2, frame: 16
const closure = GuildIncidentsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(UserSettingsProtoStore, GuildStore, PermissionStore, ExperimentStore);
this.syncWith([UserSettingsProtoStore, GuildStore, PermissionStore, ExperimentStore], computeAlertSettings);
}}, {key: 'getGuildIncident', value: value_83538}, {key: 'getIncidentsByGuild', value: value_83539},
{key: 'getGuildAlertSettings', value: value_83540}]);
}
function CONNECTION_OPEN_83541({guilds}) { // fn#83541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:2497, offset: 0x01f1e31a, size: 189 bytes, params: 2, frame: 20
var r2;
var incidents_data;
var r9;
var r7;
var value5;
var incidentsDataFromServerBinding;
var properties;
var value6;
var value7;
var moduleValue;
var hasDetectedActivity2;
var moduleValue2;
var isUnderLockdown2;
var binding;
var id;
var value8;
env0_11 = {};
const value3 = _createForOfIteratorHelperLoose_83530(guilds);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
incidentsDataFromServerBinding = incidentsDataFromServer;
properties = value5.properties;
incidents_data = properties?.incidents_data;
value6 = incidentsDataFromServerBinding(incidents_data);
value7 = value6 != null;
if (!value7) {
r7 = value7;
continue;
}
moduleValue = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
hasDetectedActivity2 = moduleValue.hasDetectedActivity(value6);
if (hasDetectedActivity2) {
r9 = hasDetectedActivity2;
continue;
}
moduleValue2 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
isUnderLockdown2 = moduleValue2.isUnderLockdown(value6);
r9 = isUnderLockdown2;
r7 = r9;
if (!r7) {
continue;
}
binding = env0_11;
id = value5.id;
binding[id] = value6;
value8 = value3();
done = value8.done;
if (done) {
break;
}
r2 = value8;
continue;
}
}
}
function GUILD_CREATE_83542({guild}) { // fn#83542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:2795, offset: 0x01f1e3d7, size: 135 bytes, params: 2, frame: 17
const value3 = incidentsDataFromServer(guild.properties?.incidents_data);
if (value3 != null && ((require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).hasDetectedActivity(value3) || (require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).isUnderLockdown(value3))) {
env0_11[guild.id] = value3;
}
}
function GUILD_UPDATE_83543({guild}) { // fn#83543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:3012, offset: 0x01f1e45e, size: 129 bytes, params: 2, frame: 15
var moduleValue;
var moduleValue2;
const value2 = incidentsDataFromServer(guild.incidents_data);
if (value2 == null) {
delete env0_11[guild.id];
} else {
moduleValue = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
if (moduleValue.hasDetectedActivity(value2)) {
env0_11[guild.id] = value2;
} else {
moduleValue2 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
if (moduleValue2.isUnderLockdown(value2)) {
env0_11[guild.id] = value2;
} else {
delete env0_11[guild.id];
}
}
}
}