1052 lines
50 KiB
TypeScript
1052 lines
50 KiB
TypeScript
/* Metro module 9113; source: modules/guild_settings/GuildSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1419, 9092, 1383, 1422, 8150, 1885, 1867, 1878, 661, 9114, 8295, 21, 507, 694, 9115, 9116, 1418, 3738, 9117, 22, 587, 566, 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 Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import UserRecord from '../../records/UserRecord.tsx'; /* Metro dependency 1885 */
|
|
import Module03738 from '../../by-id/module-03738.js'; /* Metro dependency 3738 */
|
|
import InviteRecord from '../../records/InviteRecord.tsx'; /* Metro dependency 8150 */
|
|
import GuildProfileStore from '../guild_profile/GuildProfileStore.tsx'; /* Metro dependency 9092 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
|
|
import * as PlainRecordModule from '../../lib/PlainRecord.tsx'; /* Metro dependency 1419 */
|
|
import * as GuildRecordModule from '../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
|
|
import * as GlobalDiscoveryServersConstantsModule from '../global_discovery_servers/GlobalDiscoveryServersConstants.tsx'; /* Metro dependency 9114 */
|
|
|
|
function _fun71326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:6, offset: 0x01d1d063, size: 1464 bytes, params: 8, frame: 28
|
|
const env0_0 = require;
|
|
const GUILD_SETTINGS_INIT2 = GUILD_SETTINGS_INIT;
|
|
const closure2 = function() {
|
|
env0_39 = false;
|
|
env0_40 = FormStates.CLOSED;
|
|
env0_29 = null;
|
|
env0_28 = null;
|
|
env0_43 = false;
|
|
env0_45 = false;
|
|
env0_47 = null;
|
|
env0_49 = null;
|
|
env0_50 = 0;
|
|
env0_57 = null;
|
|
env0_60 = null;
|
|
env0_61 = null;
|
|
env0_25 = null;
|
|
env0_26 = null;
|
|
env0_27 = null;
|
|
env0_51 = MFALevels.NONE;
|
|
env0_48 = {};
|
|
env0_33 = undefined;
|
|
};
|
|
const USER_CONNECTIONS_UPDATE_713342 = USER_CONNECTIONS_UPDATE_71334;
|
|
const GUILD_PROFILE_UPDATE_713352 = GUILD_PROFILE_UPDATE_71335;
|
|
const GUILD_PROFILE_UPDATE_FAILURE_713362 = GUILD_PROFILE_UPDATE_FAILURE_71336;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let set = (PlainRecordModule).set;
|
|
let value = ConstantsModule;
|
|
const FormStates = value.FormStates;
|
|
const MFALevels = value.MFALevels;
|
|
const env0_18 = value.GuildSettingsSections;
|
|
const env0_19 = value.GuildSettingsSubsections;
|
|
const env0_20 = value.Endpoints;
|
|
const env0_21 = value.GuildFeatures;
|
|
const DEFAULT_DISCOVERY_CATEGORY_ID = (GlobalDiscoveryServersConstantsModule).DEFAULT_DISCOVERY_CATEGORY_ID;
|
|
value = require(8295) /* metro dependency 8295: PublicGuildsConstants */;
|
|
const env0_23 = value.PUBLIC_SUCCESS_MODAL_SEEN_KEY;
|
|
const env0_24 = value.CREATE_NEW_CHANNEL_VALUE;
|
|
const env0_35 = ['name', 'description', 'icon', 'splash', 'banner', 'homeHeader', 'afkChannelId', 'afkTimeout',
|
|
'systemChannelId', 'verificationLevel', 'defaultMessageNotifications', 'explicitContentFilter', 'features',
|
|
'systemChannelFlags', 'preferredLocale', 'rulesChannelId', 'safetyAlertsChannelId',
|
|
'ownerConfiguredContentLevel', 'discoverySplash', 'publicUpdatesChannelId', 'premiumProgressBarEnabled',
|
|
'officialMessageColor', 'verificationRoleId'];
|
|
const env0_36 = ['brandColorPrimary', 'description', 'icon', 'name', 'traits', 'visibility', 'gameApplicationIds',
|
|
'customBanner', 'tag', 'badge', 'badgeColorPrimary', 'badgeColorSecondary'];
|
|
const Set = global.Set;
|
|
set = new Set(['icon', 'splash', 'banner', 'discoverySplash', 'homeHeader']);
|
|
const env0_38 = {'icon': 'iconOriginalMd5', 'banner': 'bannerOriginalMd5', 'splash': 'splashOriginalMd5',
|
|
'discoverySplash': 'discoverySplashOriginalMd5'};
|
|
let env0_40 = FormStates.CLOSED;
|
|
let env0_41 = {};
|
|
let env0_48 = {};
|
|
let env0_51 = MFALevels.NONE;
|
|
object = {'primaryCategoryId': null, 'secondaryCategoryIds': null, 'keywords': null,
|
|
'emojiDiscoverabilityEnabled': true, 'partnerActionedTimestamp': null, 'partnerApplicationTimestamp': null,
|
|
'isPublished': false};
|
|
object.primaryCategoryId = DEFAULT_DISCOVERY_CATEGORY_ID;
|
|
object.secondaryCategoryIds = [];
|
|
object.keywords = [];
|
|
object.reasonsToJoin = [];
|
|
object.socialLinks = [];
|
|
object.about = '';
|
|
const Store = (Flux).Store;
|
|
_fun71337(Store).displayName = 'GuildSettingsStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {GUILD_SETTINGS_INIT: GUILD_SETTINGS_INIT2,
|
|
GUILD_SETTINGS_OPEN: function(a0) {
|
|
env0_39 = true;
|
|
GUILD_SETTINGS_INIT(a0);
|
|
}, GUILD_SETTINGS_CLOSE: closure2, GUILD_SETTINGS_UPDATE: GUILD_SETTINGS_UPDATE,
|
|
GUILD_SETTINGS_PROFILE_UPDATE: GUILD_SETTINGS_PROFILE_UPDATE,
|
|
GUILD_SETTINGS_CANCEL_CHANGES: function({guildId}) {
|
|
env0_41 = {};
|
|
env0_48 = {};
|
|
var value2 = GuildStore.getGuild(guildId);
|
|
if (value2 != null) {
|
|
env0_29 = value2;
|
|
env0_28 = value2;
|
|
}
|
|
}, GUILD_SETTINGS_SAVE_ROUTE_STACK: function(a0) {
|
|
env0_33 = a0.state;
|
|
return false;
|
|
}, GUILD_SETTINGS_SUBMIT: function() {
|
|
env0_40 = FormStates.SUBMITTING;
|
|
env0_41 = {};
|
|
}, GUILD_SETTINGS_SUBMIT_SUCCESS: function() {
|
|
env0_40 = FormStates.OPEN;
|
|
env0_48 = {};
|
|
}, GUILD_SETTINGS_SUBMIT_FAILURE: GUILD_SETTINGS_SUBMIT_FAILURE,
|
|
GUILD_SETTINGS_SET_SECTION: GUILD_SETTINGS_SET_SECTION, GUILD_SETTINGS_SET_SEARCH_QUERY: function(a0) {
|
|
env0_27 = a0.searchQuery;
|
|
}, GUILD_SETTINGS_LOADED_BANS: GUILD_SETTINGS_LOADED_BANS,
|
|
GUILD_SETTINGS_LOADED_BANS_BATCH: GUILD_SETTINGS_LOADED_BANS_BATCH,
|
|
GUILD_SETTINGS_LOADED_INVITES: function({invites}) {
|
|
env0_60 = invites.reduce(_fun71382, {});
|
|
}, GUILD_SETTINGS_SET_WIDGET: function(a0) {
|
|
env0_43 = true;
|
|
var property = a0.enabled;
|
|
env0_45 = property;
|
|
env0_44 = property;
|
|
property = a0.channelId;
|
|
env0_47 = property;
|
|
env0_46 = property;
|
|
}, GUILD_SETTINGS_SET_VANITY_URL: GUILD_SETTINGS_SET_VANITY_URL, GUILD_SETTINGS_SET_MFA_SUCCESS: function(a0) {
|
|
env0_51 = a0.level;
|
|
}, GUILD_SETTINGS_ROLE_SELECT: GUILD_SETTINGS_ROLE_SELECT, GUILD_SETTINGS_LOADED_INTEGRATIONS: function(a0) {
|
|
env0_61 = a0.integrations;
|
|
}, GUILD_SETTINGS_PIN_PERMISSION_MIGRATED: GUILD_SETTINGS_PIN_PERMISSION_MIGRATED,
|
|
GUILD_SETTINGS_SLOWMODE_PERMISSION_MIGRATED: GUILD_SETTINGS_SLOWMODE_PERMISSION_MIGRATED,
|
|
GUILD_BAN_ADD: GUILD_BAN_ADD, GUILD_BAN_REMOVE: GUILD_BAN_REMOVE, GUILD_ROLE_CREATE: function({guildId}) {
|
|
if (syncGuild(guildId)) {
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}, GUILD_ROLE_UPDATE: function({guildId}) {
|
|
if (syncGuild(guildId)) {
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}, GUILD_ROLE_DELETE: GUILD_ROLE_DELETE_71394, GUILD_UPDATE: GUILD_UPDATE_71395, GUILD_DELETE: GUILD_DELETE_71397,
|
|
GUILD_PROFILE_FETCH_SUCCESS: GUILD_PROFILE_FETCH_SUCCESS_71398,
|
|
GUILD_PROFILE_UPDATE: GUILD_PROFILE_UPDATE_713352,
|
|
GUILD_PROFILE_UPDATE_SUCCESS: GUILD_PROFILE_UPDATE_SUCCESS_71399,
|
|
GUILD_PROFILE_UPDATE_FAILURE: GUILD_PROFILE_UPDATE_FAILURE_713362,
|
|
GUILD_PROFILE_UPDATE_VISIBILITY: GUILD_PROFILE_UPDATE_713352,
|
|
GUILD_PROFILE_UPDATE_VISIBILITY_SUCCESS: GUILD_PROFILE_UPDATE_VISIBILITY_SUCCESS_71400,
|
|
GUILD_PROFILE_UPDATE_VISIBILITY_FAILURE: GUILD_PROFILE_UPDATE_FAILURE_713362,
|
|
USER_CONNECTIONS_UPDATE: USER_CONNECTIONS_UPDATE_713342,
|
|
GUILD_INTEGRATIONS_UPDATE: USER_CONNECTIONS_UPDATE_713342,
|
|
INSTANT_INVITE_REVOKE_SUCCESS: INSTANT_INVITE_REVOKE_SUCCESS_71401,
|
|
INSTANT_INVITE_CREATE_SUCCESS: INSTANT_INVITE_CREATE_SUCCESS_71402,
|
|
GUILD_UPDATE_DISCOVERY_METADATA_FROM_SERVER: GUILD_UPDATE_DISCOVERY_METADATA_FROM_SERVER,
|
|
GUILD_DISCOVERY_METADATA_FETCH_FAIL: GUILD_DISCOVERY_METADATA_FETCH_FAIL,
|
|
GUILD_DISCOVERY_CATEGORY_ADD: GUILD_DISCOVERY_CATEGORY_ADD,
|
|
GUILD_DISCOVERY_CATEGORY_DELETE: GUILD_DISCOVERY_CATEGORY_DELETE,
|
|
GUILD_DISCOVERY_CATEGORY_UPDATE_FAIL: GUILD_DISCOVERY_CATEGORY_UPDATE_FAIL,
|
|
GUILD_UPDATE_DISCOVERY_METADATA: GUILD_UPDATE_DISCOVERY_METADATA,
|
|
GUILD_UPDATE_DISCOVERY_METADATA_FAIL: GUILD_UPDATE_DISCOVERY_METADATA_FAIL,
|
|
GUILD_DISCOVERY_SLUG_FETCH_SUCCESS: function(a0) {
|
|
env0_34 = a0.slug;
|
|
}, GUILD_DISCOVERY_SLUG_FETCH_FAIL: function(a0) {
|
|
if (a0 == null) {
|
|
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", null);
|
|
throw undefined;
|
|
}
|
|
env0_34 = null;
|
|
}, GUILD_SETTINGS_WIDGET_UPDATE: GUILD_SETTINGS_WIDGET_UPDATE});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsStore.tsx');
|
|
exports.default = set;
|
|
exports.EMPTY_METADATA = object;
|
|
function _isNativeReflectConstruct_71327() { // fn#71327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:530, offset: 0x01d1d61b, 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_71327_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function syncGuild(a0) { // fn#71330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:1891, offset: 0x01d1d67d, size: 95 bytes, params: 2, frame: 13
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (env0_28 == null) {
|
|
return false;
|
|
}
|
|
if (env0_28.id !== a0) {
|
|
return false;
|
|
}
|
|
return GuildStore.getGuild(a0) != null && (env0_28 === env0_29 || true);
|
|
}
|
|
|
|
function GUILD_SETTINGS_INIT(a0) { // fn#71331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:2009, offset: 0x01d1d6dc, size: 281 bytes, params: 2, frame: 16
|
|
const guildId = a0.guildId;
|
|
const section = a0.section;
|
|
a0.subsection;
|
|
const location = a0.location;
|
|
const guild = GuildStore.getGuild(guildId);
|
|
if (guild == null) {
|
|
GUILD_SETTINGS_CLOSE();
|
|
} else {
|
|
var value3 = GuildProfileStore.getProfile(guildId);
|
|
guild2 = guild;
|
|
env0_40 = FormStates.OPEN;
|
|
env0_41 = {};
|
|
env0_32 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castGuildIdAsEveryoneGuildRoleId(guildId);
|
|
env0_51 = guild2.mfaLevel;
|
|
env0_48 = {};
|
|
if (section != null) {
|
|
({type: 'stack'}).routes = [{key: 'landing', name: GuildSettingsSections.LANDING}, {key: section,
|
|
name: section}];
|
|
}
|
|
}
|
|
}
|
|
|
|
function _createInvite_71333(a0) { // fn#71333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:2519, offset: 0x01d1d860, size: 295 bytes, params: 2, frame: 18
|
|
var r5;
|
|
var r6;
|
|
var userRecord2;
|
|
var moduleValue;
|
|
const inviteRecordBinding = InviteRecord;
|
|
const object = {};
|
|
object.code = a0.code;
|
|
object.temporary = a0.temporary;
|
|
object.revoked = a0.revoked;
|
|
const inviter = a0.inviter;
|
|
const value2 = null;
|
|
if (value2 != inviter) {
|
|
userRecord2 = new UserRecord(a0.inviter);
|
|
} else {
|
|
r5 = value2;
|
|
}
|
|
object.inviter = r5;
|
|
const createChannelRecordFromInviteBinding = createChannelRecordFromInvite;
|
|
const channel = a0.channel;
|
|
const value5 = undefined;
|
|
object.channel = createChannelRecordFromInviteBinding(channel);
|
|
if (value2 != a0.guild) {
|
|
moduleValue = require(1418) /* metro dependency 1418: GuildRecordUtils */;
|
|
r6 = moduleValue.fromInviteGuild(a0.guild);
|
|
} else {
|
|
r6 = value2;
|
|
}
|
|
object.guild = r6;
|
|
const uses = a0.uses;
|
|
object.uses = uses;
|
|
object.maxUses = a0.max_uses;
|
|
object.maxAge = a0.max_age;
|
|
let value = Module03738;
|
|
const created_at = a0.created_at;
|
|
object.createdAt = value(value2 != created_at ? created_at : value5);
|
|
object.flags = a0.flags;
|
|
object.roles = a0.roles;
|
|
value = Object.create(inviteRecordBinding.prototype, {constructor: {value: inviteRecordBinding}});
|
|
const inviteRecord2 = new inviteRecordBinding(object);
|
|
return inviteRecord2 instanceof Object ? inviteRecord2 : value;
|
|
}
|
|
|
|
function GUILD_INTEGRATIONS_UPDATE(a0) { // fn#71334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:2873, offset: 0x01d1d987, size: 128 bytes, params: 2, frame: 14
|
|
var r1;
|
|
var value6;
|
|
var moduleValue;
|
|
let r0 = env0_29 != null && CLOSED === FormStates.OPEN;
|
|
if (r0) {
|
|
r1 = a0.type !== 'GUILD_INTEGRATIONS_UPDATE' || a0.guildId === env0_29.id;
|
|
if (r1) {
|
|
value6 = undefined;
|
|
moduleValue = require(9117) /* metro dependency 9117: GuildSettingsFetchActionCreators */;
|
|
moduleValue.fetchGuildIntegrationsApplications(env0_29.id);
|
|
r1 = value6;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GUILD_PROFILE_UPDATE_71335({guildId}) { // fn#71335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:3053, offset: 0x01d1da07, size: 46 bytes, params: 2, frame: 4
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (env0_29.id !== guildId) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function GUILD_PROFILE_UPDATE_FAILURE_71336({guildId, error}) { // fn#71336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:3137, offset: 0x01d1da35, size: 51 bytes, params: 2, frame: 5
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (env0_29.id !== guildId) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function _fun71337(a0) { // fn#71337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:3238, offset: 0x01d1da68, size: 642 bytes, params: 2, frame: 16
|
|
const GuildSettingsStore2 = GuildSettingsStore;
|
|
Inherits(GuildSettingsStore2, a0);
|
|
return CreateClass(GuildSettingsStore2, [{key: 'initialize', value: function() {
|
|
this.waitFor(GuildStore, GuildProfileStore, UserStore);
|
|
}}, {key: 'getMetadata', value: value_71340}, {key: 'widgetHasChanges', value: value_71341}, {key: 'hasChanges',
|
|
value: value_71342}, {key: 'isOpen', value: value_71343}, {key: 'getSavedRouteState', value: value_71344},
|
|
{key: 'getSection', value: value_71345}, {key: 'showNotice', value: function() {
|
|
return this.hasChanges();
|
|
}}, {key: 'getGuildId', value: value_71347}, {key: 'showPublicSuccessModal', value: function() {
|
|
var Storage = require(dependencyMap[25]).Storage;
|
|
return !Storage.get(PUBLIC_SUCCESS_MODAL_SEEN_KEY);
|
|
}}, {key: 'getGuild', value: value_71349}, {key: 'getPendingOriginalMd5s', value: value_71350},
|
|
{key: 'getGuildProfile', value: value_71351}, {key: 'getWidget', value: value_71352}, {key: 'isSubmitting',
|
|
value: function() {
|
|
return CLOSED === FormStates.SUBMITTING;
|
|
}}, {key: 'isGuildMetadataLoaded', value: value_71354}, {key: 'getErrors', value: value_71355}, {key: 'getError',
|
|
value: value_71356}, {key: 'getProfileError', value: value_71357}, {key: 'getSelectedRoleId',
|
|
value: value_71358}, {key: 'getSlug', value: value_71359}, {key: 'getBans', value: value_71360},
|
|
{key: 'getProps', value: value_71361}]);
|
|
function GuildSettingsStore() { // fn#71338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:3250, offset: 0x01d1dcea, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_3(this, GuildSettingsStore);
|
|
const value3 = env1_6(GuildSettingsStore);
|
|
return env1_5(this, _isNativeReflectConstruct_71327() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_71340() { // fn#71340, offset: 0x01d1dd7e, size: 9 bytes, params: 1, frame: 1
|
|
return env1_56;
|
|
}
|
|
|
|
function value_71341() { // fn#71341, offset: 0x01d1dd87, size: 48 bytes, params: 1, frame: 4
|
|
const value = environment.__proto__;
|
|
return env1_43 !== false && (env1_45 !== env1_44 || env1_47 !== env1_46);
|
|
}
|
|
|
|
function value_71342() { // fn#71342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:3735, offset: 0x01d1ddb7, size: 154 bytes, params: 1, frame: 18
|
|
var r0;
|
|
var defaultImport2;
|
|
var defaultImport3;
|
|
const value = environment.__proto__;
|
|
const defaultImport = Module00022;
|
|
const isEqual2 = defaultImport.isEqual(env1_29, env1_28);
|
|
if (isEqual2) {
|
|
defaultImport2 = defaultImport;
|
|
r0 = !defaultImport2.isEqual(env1_56, env1_55);
|
|
} else {
|
|
r0 = !isEqual2;
|
|
}
|
|
if (!r0) {
|
|
defaultImport3 = defaultImport;
|
|
r0 = !defaultImport3.isEqual(env1_31, env1_30);
|
|
}
|
|
r0 = !r0 ? this.widgetHasChanges() : r0;
|
|
return r0;
|
|
}
|
|
|
|
function value_71343() { // fn#71343, offset: 0x01d1de51, size: 9 bytes, params: 1, frame: 1
|
|
return env1_39;
|
|
}
|
|
|
|
function value_71344() { // fn#71344, offset: 0x0117839e, size: 9 bytes, params: 1, frame: 1
|
|
return env1_33;
|
|
}
|
|
|
|
function value_71345() { // fn#71345, offset: 0x00df3ad6, size: 9 bytes, params: 1, frame: 1
|
|
return env1_25;
|
|
}
|
|
|
|
function value_71347() { // fn#71347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:4080, offset: 0x01d1de5a, size: 27 bytes, params: 1, frame: 3
|
|
const value2 = null;
|
|
return value2 != env1_29 ? env1_29.id : value2;
|
|
}
|
|
|
|
function value_71349() { // fn#71349, offset: 0x00ef0ca7, size: 9 bytes, params: 1, frame: 1
|
|
return env1_29;
|
|
}
|
|
|
|
function value_71350() { // fn#71350, offset: 0x01d1dea7, size: 9 bytes, params: 1, frame: 1
|
|
return env1_48;
|
|
}
|
|
|
|
function value_71351() { // fn#71351, offset: 0x00df3abb, size: 9 bytes, params: 1, frame: 1
|
|
return env1_31;
|
|
}
|
|
|
|
function value_71352() { // fn#71352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:4375, offset: 0x01d1deb0, size: 23 bytes, params: 1, frame: 3
|
|
return {enabled: env1_45, channelId: env1_47};
|
|
}
|
|
|
|
function value_71354() { // fn#71354, offset: 0x01d1dede, size: 9 bytes, params: 1, frame: 1
|
|
return env1_54;
|
|
}
|
|
|
|
function value_71355() { // fn#71355, offset: 0x00df3c31, size: 9 bytes, params: 1, frame: 1
|
|
return env1_41;
|
|
}
|
|
|
|
function value_71356(a0) { // fn#71356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:4606, offset: 0x01d1dee7, size: 28 bytes, params: 2, frame: 3
|
|
let value = environment.__proto__;
|
|
const property = env1_41[a0];
|
|
value = null;
|
|
return value != property ? property : value;
|
|
}
|
|
|
|
function value_71357() { // fn#71357, offset: 0x00df3c3a, size: 9 bytes, params: 1, frame: 1
|
|
return env1_42;
|
|
}
|
|
|
|
function value_71358() { // fn#71358, offset: 0x01080587, size: 9 bytes, params: 1, frame: 1
|
|
return env1_32;
|
|
}
|
|
|
|
function value_71359() { // fn#71359, offset: 0x00df3b9e, size: 9 bytes, params: 1, frame: 1
|
|
return env1_34;
|
|
}
|
|
|
|
function value_71360() { // fn#71360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:4823, offset: 0x01d1df03, size: 25 bytes, params: 1, frame: 3
|
|
return [env1_57, env1_58];
|
|
}
|
|
|
|
function value_71361() { // fn#71361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:4872, offset: 0x01d1df1c, size: 249 bytes, params: 1, frame: 11
|
|
const object = {};
|
|
object.submitting = this.isSubmitting();
|
|
object.integrations = env1_61;
|
|
object.section = env1_25;
|
|
object.subsection = env1_26;
|
|
object.errors = env1_41;
|
|
object.guild = env1_29;
|
|
object.bans = env1_57;
|
|
object.bansVersion = env1_58;
|
|
object.invites = env1_60;
|
|
object.selectedRoleId = env1_32;
|
|
object.fetchedEmbed = env1_43;
|
|
object.embedEnabled = env1_45;
|
|
object.embedChannelId = env1_47;
|
|
object.mfaLevel = NONE;
|
|
object.searchQuery = env1_27;
|
|
object.vanityURLCode = env1_49;
|
|
object.vanityURLUses = env1_50;
|
|
object.originalGuild = env1_28;
|
|
object.hasChanges = this.hasChanges();
|
|
object.guildMetadata = env1_56;
|
|
object.analyticsLocation = env1_52;
|
|
object.isGuildMetadataLoaded = env1_54;
|
|
object.originalProfile = env1_30;
|
|
object.profile = env1_31;
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_SETTINGS_UPDATE(a0) { // fn#71363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:5518, offset: 0x01d1e02e, size: 173 bytes, params: 2, frame: 19
|
|
var r4;
|
|
var property;
|
|
var hasOwnProperty;
|
|
var property2;
|
|
var value4;
|
|
const env0_0 = a0;
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
env0_35.forEach(_fun71364);
|
|
const Object = global.Object;
|
|
const value2 = Object.keys(env0_38);
|
|
let length = value2.length;
|
|
const value3 = 0;
|
|
if (value3 < length) {
|
|
r4 = value3;
|
|
while (true) {
|
|
property = value2[r4];
|
|
hasOwnProperty = a0.hasOwnProperty;
|
|
if (Reflect.apply(hasOwnProperty, a0, [property])) {
|
|
property2 = a0[env0_38[property]];
|
|
if (property2 != null) {
|
|
env0_48[property] = property2;
|
|
break;
|
|
}
|
|
delete env0_48[property];
|
|
break;
|
|
}
|
|
value4 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
|
length = value2.length;
|
|
if (value4 < length) {
|
|
r4 = value4;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
validateUpdate();
|
|
function _fun71364(a0) { // fn#71364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:5574, offset: 0x01d1e0db, size: 88 bytes, params: 2, frame: 17
|
|
var binding;
|
|
var setBinding;
|
|
var property;
|
|
const value2 = null;
|
|
if (value2 != env1_29 && env0_0.hasOwnProperty(a0)) {
|
|
setBinding = set;
|
|
binding = env1_29;
|
|
property = env0_0[a0];
|
|
env1_29 = setBinding(binding, a0, value2 != property ? property : value2);
|
|
}
|
|
}
|
|
|
|
function validateUpdate() { // fn#71365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:5775, owner: GUILD_SETTINGS_UPDATE.validateUpdate, offset: 0x01d1e133, size: 60 bytes, params: 1, frame: 12
|
|
let binding = env1_29;
|
|
if (binding == null) {
|
|
return false;
|
|
}
|
|
binding = env1_35;
|
|
if (binding.some(_fun71366)) {
|
|
}
|
|
function _fun71366(a0) { // fn#71366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:5837, offset: 0x01d1e16f, size: 31 bytes, params: 2, frame: 3
|
|
return env0_0[a0] !== env2_28[a0];
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_SETTINGS_PROFILE_UPDATE(a0) { // fn#71367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:5895, offset: 0x01d1e18e, size: 77 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const guildId = a0.guildId;
|
|
if (env0_31 == null) {
|
|
return false;
|
|
}
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (env0_29.id !== guildId) {
|
|
return false;
|
|
}
|
|
env0_36.forEach(_fun71368);
|
|
function _fun71368(a0) { // fn#71368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:6001, offset: 0x01d1e1db, size: 77 bytes, params: 2, frame: 14
|
|
var binding;
|
|
var property;
|
|
var object;
|
|
if (env1_31 != null) {
|
|
binding = env0_0;
|
|
if (binding.hasOwnProperty(a0)) {
|
|
property = env0_0[a0];
|
|
if (property !== undefined) {
|
|
object = {};
|
|
copyDataProperties(object, env1_31, binding);
|
|
object[a0] = property;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_SETTINGS_SUBMIT_FAILURE({errors}) { // fn#71373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:6470, offset: 0x01d1e2a9, size: 96 bytes, params: 2, frame: 13
|
|
var value2;
|
|
env0_40 = FormStates.OPEN;
|
|
if (env0_25 == null) {
|
|
value2 = (require(9116) /* metro dependency 9116: getDefaultGuildSettingsSection */).getDefaultGuildSettingsSection();
|
|
}
|
|
const r0 = errors ?? ({});
|
|
}
|
|
|
|
function GUILD_SETTINGS_SET_SECTION(a0) { // fn#71374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:6636, offset: 0x01d1e309, size: 467 bytes, params: 2, frame: 17
|
|
var moduleValue;
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
let binding = section;
|
|
section = a0.section;
|
|
subsection = a0.subsection;
|
|
const binding2 = section;
|
|
const INSTANT_INVITES = GuildSettingsSections.INSTANT_INVITES;
|
|
if (binding2 === INSTANT_INVITES) {
|
|
HTTP.get({'url': null, 'oldFormErrors': true, 'rejectWithError': true,
|
|
url: Endpoints.GUILD_INSTANT_INVITES(env0_29.id)}).then(_fun71375);
|
|
} else {
|
|
var binding3 = section;
|
|
var INVITES = GuildSettingsSections.INVITES;
|
|
if (binding3 === INVITES) {
|
|
HTTP.get({'url': null, 'oldFormErrors': true, 'rejectWithError': true,
|
|
url: Endpoints.GUILD_INSTANT_INVITES(env0_29.id)}).then(_fun71375);
|
|
return undefined;
|
|
}
|
|
var binding4 = section;
|
|
var INTEGRATIONS = GuildSettingsSections.INTEGRATIONS;
|
|
if (binding4 === INTEGRATIONS) {
|
|
if (binding === a0.section) {
|
|
return undefined;
|
|
}
|
|
return USER_CONNECTIONS_UPDATE_71334(a0);
|
|
}
|
|
var binding5 = section;
|
|
var ROLES = GuildSettingsSections.ROLES;
|
|
if (binding5 === ROLES) {
|
|
if (binding === a0.section) {
|
|
return undefined;
|
|
}
|
|
return USER_CONNECTIONS_UPDATE_71334(a0);
|
|
}
|
|
binding = section;
|
|
var MEMBERS = GuildSettingsSections.MEMBERS;
|
|
if (binding === MEMBERS) {
|
|
env0_32 = getGuildEveryoneRoleId(env0_29);
|
|
} else if (section === GuildSettingsSections.VANITY_URL) {
|
|
moduleValue = require(9115) /* metro dependency 9115: GuildSettingsVanityURLActionCreators */;
|
|
moduleValue.fetchVanityUrl(env0_29.id);
|
|
} else if (section === GuildSettingsSections.SAFETY) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_SAFETY_SET_SUBSECTION',
|
|
|
|
|
|
subsection: subsection ?? GuildSettingsSubsections.SAFETY_OVERVIEW});
|
|
}
|
|
}
|
|
function _fun71375({body}) { // fn#71375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:6857, offset: 0x01d1e4dc, size: 62 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_LOADED_INVITES',
|
|
invites: body});
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_SETTINGS_LOADED_BANS({bans}) { // fn#71377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:7338, offset: 0x01d1e52e, size: 80 bytes, params: 2, frame: 13
|
|
const reduce = bans.reduce;
|
|
const Map = global.Map;
|
|
let map = new Map();
|
|
map = Reflect.apply(reduce, bans, [function(a0, a1) {
|
|
if (a1.user != null && a1.user.id != null) {
|
|
a0.set(a1.user.id, a1);
|
|
}
|
|
return a0;
|
|
}, map]);
|
|
const binding = env0_58;
|
|
env0_58 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
|
|
function GUILD_SETTINGS_LOADED_BANS_BATCH({bans, guildId}) { // fn#71379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:7495, offset: 0x01d1e5ba, size: 121 bytes, params: 2, frame: 15
|
|
var map;
|
|
if (!(env0_59 === guildId && env0_57 != null)) {
|
|
map = new global.Map();
|
|
}
|
|
const reduce = bans.reduce;
|
|
let binding = env0_57;
|
|
env0_57 = Reflect.apply(reduce, bans, [function(a0, a1) {
|
|
if (a1.user != null && a1.user.id != null) {
|
|
a0.set(a1.user.id, a1);
|
|
}
|
|
return a0;
|
|
}, binding]);
|
|
binding = env0_58;
|
|
env0_58 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
|
|
function GUILD_SETTINGS_LOADED_INVITES({invites}) { // fn#71381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:7697, offset: 0x01d1e633, size: 43 bytes, params: 2, frame: 13
|
|
const value = invites.reduce(function(a0, a1) {
|
|
a0[a1.code] = _createInvite_71333(a1);
|
|
return a0;
|
|
}, {});
|
|
function _fun71382(a0, a1) { // fn#71382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:7750, offset: 0x01d1e65e, size: 31 bytes, params: 3, frame: 13
|
|
a0[a1.code] = _createInvite_71333(a1);
|
|
return a0;
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_SETTINGS_SET_VANITY_URL({code, uses}) { // fn#71384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:7913, offset: 0x01d1e6a7, size: 41 bytes, params: 2, frame: 4
|
|
const r2 = code ?? null;
|
|
}
|
|
|
|
function GUILD_SETTINGS_ROLE_SELECT({roleId}) { // fn#71386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:8097, offset: 0x01d1e6e4, size: 32 bytes, params: 2, frame: 3
|
|
const r1 = roleId ?? null;
|
|
}
|
|
|
|
function GUILD_SETTINGS_PIN_PERMISSION_MIGRATED({guildId}) { // fn#71388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:8283, offset: 0x01d1e718, size: 141 bytes, params: 2, frame: 17
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (guildId !== env0_29.id) {
|
|
return false;
|
|
}
|
|
const setBinding = set;
|
|
const binding = env0_29;
|
|
const Set = global.Set;
|
|
const features = env0_29.features;
|
|
const items2 = [];
|
|
const value2 = arraySpread(items2, features, 0, undefined);
|
|
const PIN_PERMISSION_MIGRATION_COMPLETE = GuildFeatures.PIN_PERMISSION_MIGRATION_COMPLETE;
|
|
items2[value2] = PIN_PERMISSION_MIGRATION_COMPLETE;
|
|
value2 + 1;
|
|
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set2 = new Set(items2);
|
|
env0_29 = setBinding(binding, 'features', set2 instanceof Object ? set2 : value3);
|
|
}
|
|
|
|
function GUILD_SETTINGS_SLOWMODE_PERMISSION_MIGRATED({guildId}) { // fn#71389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:8487, offset: 0x01d1e7a5, size: 141 bytes, params: 2, frame: 17
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (guildId !== env0_29.id) {
|
|
return false;
|
|
}
|
|
const setBinding = set;
|
|
const binding = env0_29;
|
|
const Set = global.Set;
|
|
const features = env0_29.features;
|
|
const items2 = [];
|
|
const value2 = arraySpread(items2, features, 0, undefined);
|
|
const BYPASS_SLOWMODE_PERMISSION_MIGRATION_COMPLETE = GuildFeatures.BYPASS_SLOWMODE_PERMISSION_MIGRATION_COMPLETE;
|
|
items2[value2] = BYPASS_SLOWMODE_PERMISSION_MIGRATION_COMPLETE;
|
|
value2 + 1;
|
|
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set2 = new Set(items2);
|
|
env0_29 = setBinding(binding, 'features', set2 instanceof Object ? set2 : value3);
|
|
}
|
|
|
|
function GUILD_BAN_ADD({user, guildId}) { // fn#71390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:8678, offset: 0x01d1e832, size: 108 bytes, params: 2, frame: 18
|
|
var r1;
|
|
var r0;
|
|
var binding;
|
|
var value5;
|
|
const value2 = env0_57 != null;
|
|
if (value2) {
|
|
r1 = env0_29 != null && env0_29.id === guildId;
|
|
if (r1) {
|
|
binding = env0_57;
|
|
binding.set(user.id, {user: user, reason: null});
|
|
binding = env0_58;
|
|
value5 = typeof binding === 'bigint' ? binding : +binding;
|
|
env0_58 = typeof value5 === 'bigint' ? value5 + 1n : +value5 + 1;
|
|
r1 = undefined;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GUILD_BAN_REMOVE({user, guildId}) { // fn#71391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:8822, offset: 0x01d1e89e, size: 96 bytes, params: 2, frame: 14
|
|
var r1;
|
|
var r0;
|
|
var binding;
|
|
var value5;
|
|
const value2 = env0_57 != null;
|
|
if (value2) {
|
|
r1 = env0_29 != null && env0_29.id === guildId;
|
|
if (r1) {
|
|
binding = env0_57;
|
|
binding.delete(user.id);
|
|
binding = env0_58;
|
|
value5 = typeof binding === 'bigint' ? binding : +binding;
|
|
env0_58 = typeof value5 === 'bigint' ? value5 + 1n : +value5 + 1;
|
|
r1 = undefined;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GUILD_ROLE_DELETE_71394({guildId, roleId}) { // fn#71394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:9120, offset: 0x01d1e91d, size: 51 bytes, params: 2, frame: 13
|
|
if (syncGuild(guildId)) {
|
|
if (env0_32 !== roleId) {
|
|
}
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function GUILD_UPDATE_71395({guild}) { // fn#71395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:9224, offset: 0x01d1e950, size: 256 bytes, params: 2, frame: 15
|
|
var r3;
|
|
var r5;
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (env0_29.id !== guild.id) {
|
|
return false;
|
|
}
|
|
const guildStoreBinding = GuildStore;
|
|
const getGuild = guildStoreBinding.getGuild;
|
|
if (Reflect.apply(getGuild, guildStoreBinding, [env0_29.id]) == null) {
|
|
return false;
|
|
}
|
|
const guildProfileStoreBinding = GuildProfileStore;
|
|
env0_30 = guildProfileStoreBinding.getProfile(env0_29.id);
|
|
let binding = env0_25;
|
|
let PROFILE = GuildSettingsSections.PROFILE;
|
|
const value3 = binding !== PROFILE;
|
|
if (value3) {
|
|
binding = env0_25;
|
|
r3 = binding !== GuildSettingsSections.TAG;
|
|
r5 = binding;
|
|
} else {
|
|
r3 = value3;
|
|
r5 = guildProfileStoreBinding;
|
|
}
|
|
if (r3) {
|
|
}
|
|
binding = env0_25;
|
|
PROFILE = GuildSettingsSections.PROFILE;
|
|
if (binding !== PROFILE) {
|
|
copyDataProperties({}, env0_29, r5);
|
|
env0_35.forEach(_fun71396);
|
|
}
|
|
function _fun71396(a0) { // fn#71396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:9457, offset: 0x01d1ea50, size: 132 bytes, params: 2, frame: 16
|
|
var r1;
|
|
const binding = env1_37;
|
|
if (!binding.has(a0)) {
|
|
r1 = a0 !== 'rulesChannelId' && a0 !== 'publicUpdatesChannelId';
|
|
r1 = !r1 ? env0_2[a0] !== CREATE_NEW_CHANNEL_VALUE : r1;
|
|
r1 = r1 && a0 !== 'features';
|
|
if (r1) {
|
|
env0_1 = set(env0_1, a0, a0 !== 'ownerConfiguredContentLevel' ? env0_2[a0] : env0_0[a0]);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_DELETE_71397({guild}) { // fn#71397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:9627, offset: 0x01d1ead4, size: 55 bytes, params: 2, frame: 10
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (env0_29.id !== guild.id) {
|
|
return false;
|
|
}
|
|
GUILD_SETTINGS_CLOSE();
|
|
}
|
|
|
|
function GUILD_PROFILE_FETCH_SUCCESS_71398({profile}) { // fn#71398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:9743, offset: 0x01d1eb0b, size: 53 bytes, params: 2, frame: 7
|
|
if (profile.id !== env0_29?.id) {
|
|
}
|
|
}
|
|
|
|
function GUILD_PROFILE_UPDATE_SUCCESS_71399({profile}) { // fn#71399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:9908, offset: 0x01d1eb40, size: 119 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var value4;
|
|
const value3 = env0_31?.id != null;
|
|
if (value3) {
|
|
value4 = syncGuild(env0_31.id);
|
|
r0 = value4 ? profile.id === env0_29?.id ? undefined : undefined : !!value4;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GUILD_PROFILE_UPDATE_VISIBILITY_SUCCESS_71400({guildId}) { // fn#71400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:10234, offset: 0x01d1ebb7, size: 128 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var value4;
|
|
var value6;
|
|
const value3 = env0_31?.id != null;
|
|
if (value3) {
|
|
value4 = syncGuild(env0_31.id);
|
|
if (value4) {
|
|
if (guildId === env0_29?.id) {
|
|
value6 = GuildProfileStore.getProfile(guildId);
|
|
r1 = undefined;
|
|
} else {
|
|
r1 = undefined;
|
|
}
|
|
} else {
|
|
r1 = !!value4;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function INSTANT_INVITE_REVOKE_SUCCESS_71401({code}) { // fn#71401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:10625, offset: 0x01d1ec37, size: 36 bytes, params: 2, frame: 12
|
|
const object = {};
|
|
copyDataProperties(object, env0_60, undefined);
|
|
delete object[code];
|
|
}
|
|
|
|
function INSTANT_INVITE_CREATE_SUCCESS_71402(a0) { // fn#71402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:10714, offset: 0x01d1ec5b, size: 58 bytes, params: 2, frame: 15
|
|
const object = {};
|
|
copyDataProperties(object, env0_60, undefined);
|
|
object[a0.invite.code] = _createInvite_71333(a0.invite);
|
|
}
|
|
|
|
function GUILD_UPDATE_DISCOVERY_METADATA_FROM_SERVER({guildId, metadata}) { // fn#71403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:10848, offset: 0x01d1ec95, size: 295 bytes, params: 2, frame: 7
|
|
var r4;
|
|
var object;
|
|
var isPublished;
|
|
if (env0_29 != null && guildId === env0_29.id) {
|
|
if (env0_54 !== false) {
|
|
}
|
|
object = {};
|
|
r4 = metadata.primaryCategoryId ?? DEFAULT_DISCOVERY_CATEGORY_ID;
|
|
object.primaryCategoryId = r4;
|
|
r4 = metadata.secondaryCategoryIds ?? [];
|
|
object.secondaryCategoryIds = r4;
|
|
r4 = metadata.keywords ?? [];
|
|
object.keywords = r4;
|
|
r4 = metadata.emojiDiscoverabilityEnabled ?? true;
|
|
object.emojiDiscoverabilityEnabled = r4;
|
|
r4 = metadata.partnerActionedTimestamp ?? null;
|
|
object.partnerActionedTimestamp = r4;
|
|
r4 = metadata.partnerApplicationTimestamp ?? null;
|
|
object.partnerApplicationTimestamp = r4;
|
|
isPublished = metadata.isPublished;
|
|
r4 = isPublished != null && isPublished;
|
|
object.isPublished = r4;
|
|
r4 = metadata.reasonsToJoin ?? [];
|
|
object.reasonsToJoin = r4;
|
|
r4 = metadata.socialLinks ?? [];
|
|
object.socialLinks = r4;
|
|
object.about = metadata.about ?? '';
|
|
env0_41 = {};
|
|
}
|
|
}
|
|
|
|
function GUILD_DISCOVERY_METADATA_FETCH_FAIL() { // fn#71404, offset: 0x01d1edbc, size: 19 bytes, params: 1, frame: 3
|
|
}
|
|
|
|
function GUILD_DISCOVERY_CATEGORY_ADD({guildId, categoryId}) { // fn#71405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:11623, offset: 0x01d1edcf, size: 163 bytes, params: 2, frame: 18
|
|
var object;
|
|
var secondaryCategoryIds;
|
|
var items3;
|
|
var value4;
|
|
var items2;
|
|
var value5;
|
|
if (env0_29 != null && guildId === env0_29.id) {
|
|
object = {};
|
|
copyDataProperties(object, env0_56, undefined);
|
|
secondaryCategoryIds = env0_56.secondaryCategoryIds;
|
|
items3 = [];
|
|
value4 = arraySpread(items3, secondaryCategoryIds, 0, undefined);
|
|
items3[value4] = categoryId;
|
|
value4 + 1;
|
|
object['secondaryCategoryIds'] = items3;
|
|
object = {};
|
|
copyDataProperties(object, env0_55, 0);
|
|
secondaryCategoryIds = env0_55.secondaryCategoryIds;
|
|
items2 = [];
|
|
value5 = arraySpread(items2, secondaryCategoryIds, 0, undefined);
|
|
items2[value5] = categoryId;
|
|
value5 + 1;
|
|
object['secondaryCategoryIds'] = items2;
|
|
}
|
|
}
|
|
|
|
function GUILD_DISCOVERY_CATEGORY_DELETE({guildId, categoryId}) { // fn#71406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:11861, offset: 0x01d1ee72, size: 234 bytes, params: 2, frame: 17
|
|
var secondaryCategoryIds;
|
|
var value2;
|
|
var items2;
|
|
var object;
|
|
var value3;
|
|
var object2;
|
|
if (env0_29 != null) {
|
|
if (guildId === env0_29.id) {
|
|
secondaryCategoryIds = env0_56.secondaryCategoryIds;
|
|
value2 = secondaryCategoryIds.indexOf(categoryId);
|
|
if (value2 !== -1) {
|
|
secondaryCategoryIds = env0_56.secondaryCategoryIds;
|
|
items2 = [];
|
|
arraySpread(items2, secondaryCategoryIds, 0, value2);
|
|
items2.splice(value2, 1);
|
|
object = {};
|
|
copyDataProperties(object, env0_56, 0);
|
|
object['secondaryCategoryIds'] = items2;
|
|
}
|
|
secondaryCategoryIds = env0_55.secondaryCategoryIds;
|
|
value3 = secondaryCategoryIds.indexOf(categoryId);
|
|
if (value3 !== -1) {
|
|
secondaryCategoryIds = env0_55.secondaryCategoryIds;
|
|
items2 = [];
|
|
arraySpread(items2, secondaryCategoryIds, 0, value2);
|
|
items2.splice(value3, 1);
|
|
object2 = {};
|
|
copyDataProperties(object2, env0_55, 0);
|
|
object2['secondaryCategoryIds'] = items2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function GUILD_DISCOVERY_CATEGORY_UPDATE_FAIL({guildId, errors}) { // fn#71407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:12241, offset: 0x01d1ef5c, size: 60 bytes, params: 2, frame: 6
|
|
var r1;
|
|
if (env0_29 != null && guildId === env0_29.id) {
|
|
r1 = errors ?? ({});
|
|
}
|
|
}
|
|
|
|
function GUILD_UPDATE_DISCOVERY_METADATA({guildId, primaryCategoryId, keywords, emojiDiscoverabilityEnabled, isPublished, reasonsToJoin, socialLinks, about}) { // fn#71408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:12371, offset: 0x01d1ef98, size: 267 bytes, params: 2, frame: 21
|
|
var object;
|
|
if (env0_29 != null && guildId === env0_29.id) {
|
|
object = {};
|
|
copyDataProperties(object, env0_56, guildId);
|
|
primaryCategoryId = primaryCategoryId ?? env0_56.primaryCategoryId;
|
|
object['primaryCategoryId'] = primaryCategoryId;
|
|
keywords = keywords ?? env0_56.keywords;
|
|
object['keywords'] = keywords;
|
|
emojiDiscoverabilityEnabled = emojiDiscoverabilityEnabled ?? env0_56.emojiDiscoverabilityEnabled;
|
|
object['emojiDiscoverabilityEnabled'] = emojiDiscoverabilityEnabled;
|
|
isPublished = isPublished ?? env0_56.isPublished;
|
|
object['isPublished'] = isPublished;
|
|
reasonsToJoin = reasonsToJoin ?? env0_56.reasonsToJoin;
|
|
object['reasonsToJoin'] = reasonsToJoin;
|
|
socialLinks = socialLinks ?? env0_56.socialLinks;
|
|
object['socialLinks'] = socialLinks;
|
|
about = about ?? env0_56.about;
|
|
object['about'] = about;
|
|
}
|
|
}
|
|
|
|
function GUILD_UPDATE_DISCOVERY_METADATA_FAIL({guildId, errors}) { // fn#71409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:12891, offset: 0x01d1ef5c, size: 60 bytes, params: 2, frame: 6
|
|
var r1;
|
|
if (env0_29 != null && guildId === env0_29.id) {
|
|
r1 = errors ?? ({});
|
|
}
|
|
}
|
|
|
|
function GUILD_SETTINGS_WIDGET_UPDATE({guildId, enabled, channelId}) { // fn#71412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9298:13201, offset: 0x01d1f0dc, size: 60 bytes, params: 2, frame: 6
|
|
if (env0_29 == null) {
|
|
return false;
|
|
}
|
|
if (env0_29.id !== guildId) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun71326, 9113, [6, 7, 15, 17, 18, 1419, 9092, 1383, 1422, 8150, 1885, 1867, 1878, 661, 9114, 8295, 21,
|
|
507, 694, 9115, 9116, 1418, 3738, 9117, 22, 587, 566,
|
|
2]) /* metro module 9113, dependencies: [6, 7, 15, 17, 18, 1419, 9092, 1383, 1422, 8150, 1885, 1867, 1878, 661, 9114, 8295, 21, 507, 694, 9115, 9116, 1418, 3738, 9117, 22, 587, 566, 2] */;
|