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

@@ -1,107 +1,110 @@
/* Metro module 15954; source: modules/guild_settings/roles/GuildSettingsModalRolesActionCreators.tsx; dependencies: [5, 661, 507, 6931, 694, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun123312(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:6, offset: 0x02587f3f, size: 291 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const updateGuildRole = function() {
return _updateGuildRole.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {startReordering: startReordering_123317, stopReordering: stopReordering_123318,
object = {startReordering: startReordering_123317, stopReordering: stopReordering_123318,
updateRoleOrder: updateRoleOrder, toggleRoleSetting: function(a0, a1, a2, a3) {
return updateGuildRole({guildId: a0, roleId: a1.id, name: a1.name, permissions: a1.permissions, color: a1.color,
hoist: a2, mentionable: a3});
}, startEditingPermissions: startEditingPermissions, stopEditingPermissions: stopEditingPermissions,
allowPermission: allowPermission, denyPermission: denyPermission,
cancelPermissionChanges: cancelPermissionChanges, savePermissionChanges: savePermissionChanges};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesActionCreators.tsx');
exports.default = object2;
}
function _updateGuildRole() { // fn#123314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:199, offset: 0x02588062, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun123316).apply(this, arguments);
}
function startReordering_123317(a0) { // fn#123317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:574, offset: 0x02588195, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_START_REORDER',
guildId: a0});
}
function stopReordering_123318() { // fn#123318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:672, offset: 0x025881cd, size: 47 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun123319);
}
function updateRoleOrder(a0, a1) { // fn#123320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:777, offset: 0x0258822d, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER',
from: a0, to: a1});
}
function startEditingPermissions(a0, a1) { // fn#123322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1020, offset: 0x025882bf, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING',
guildId: a0, roleId: a1});
}
function stopEditingPermissions() { // fn#123323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1149, offset: 0x025882ff, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_STOP_EDITING'});
}
function allowPermission(a0) { // fn#123324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1254, offset: 0x02588330, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW',
permission: a0});
}
function denyPermission(a0) { // fn#123325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1358, offset: 0x02588369, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY',
permission: a0});
}
function cancelPermissionChanges() { // fn#123326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1460, offset: 0x025883a2, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL'});
}
function savePermissionChanges({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1560, offset: 0x025883d3, size: 161 bytes, params: 2, frame: 23
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING'});
updateGuildRole({guildId: guildId, roleId: roleId, name: name, permissions: permissions, color: color, hoist: hoist,
mentionable: mentionable}).then(_fun123328, _fun123329);
}
async function _fun123316({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:254, offset: 0x025880a8, size: 237 bytes, params: 2, frame: 25
if (true) {
await undefined;
if (false) {
return undefined;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesActionCreators.tsx');
exports.default = object;
function _updateGuildRole() { // fn#123314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:199, offset: 0x02588062, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun123316).apply(this, arguments);
async function _fun123316({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:254, offset: 0x025880a8, size: 237 bytes, params: 2, frame: 25
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[2]).HTTP;
var patch = HTTP.patch;
var object = {};
object.url = env2_4.GUILD_ROLE(guildId, roleId);
object.body = {name: name, permissions: permissions, color: color ?? 0, hoist: hoist, mentionable: mentionable};
object.oldFormErrors = true;
object.rejectWithError = false;
await Reflect.apply(patch, HTTP, [object]);
if (false) {
return undefined;
}
env2_1(env2_2[3]).checkGuildTemplateDirty(guildId);
}
}
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[2]).HTTP;
var patch = HTTP.patch;
var object2 = {};
object2.url = env2_4.GUILD_ROLE(guildId, roleId);
object2.body = {name: name, permissions: permissions, color: color ?? 0, hoist: hoist,
mentionable: mentionable};
object2.oldFormErrors = true;
object2.rejectWithError = false;
await Reflect.apply(patch, HTTP, [object2]);
if (false) {
return undefined;
}
env2_1(env2_2[3]).checkGuildTemplateDirty(guildId);
}
function startReordering_123317(a0) { // fn#123317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:574, offset: 0x02588195, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_START_REORDER',
guildId: a0});
}
function stopReordering_123318() { // fn#123318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:672, offset: 0x025881cd, size: 47 bytes, params: 1, frame: 12
(Dispatcher).wait(_fun123319);
function _fun123319() { // fn#123319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:703, offset: 0x025881fc, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER'});
}
}
function updateRoleOrder(a0, a1) { // fn#123320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:777, offset: 0x0258822d, size: 63 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER',
from: a0, to: a1});
}
function startEditingPermissions(a0, a1) { // fn#123322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1020, offset: 0x025882bf, size: 64 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING',
guildId: a0, roleId: a1});
}
function stopEditingPermissions() { // fn#123323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1149, offset: 0x025882ff, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_STOP_EDITING'});
}
function allowPermission(a0) { // fn#123324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1254, offset: 0x02588330, size: 57 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW',
permission: a0});
}
function denyPermission(a0) { // fn#123325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1358, offset: 0x02588369, size: 57 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY',
permission: a0});
}
function cancelPermissionChanges() { // fn#123326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1460, offset: 0x025883a2, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL'});
}
function savePermissionChanges({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1560, offset: 0x025883d3, size: 161 bytes, params: 2, frame: 23
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING'});
updateGuildRole({guildId: guildId, roleId: roleId, name: name, permissions: permissions, color: color, hoist: hoist,
mentionable: mentionable}).then(_fun123328, _fun123329);
function _fun123328() { // fn#123328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1827, offset: 0x02588474, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS'});
}
function _fun123329() { // fn#123329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1918, offset: 0x025884a5, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_FAILURE'});
}
}
}
function _fun123319() { // fn#123319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:703, offset: 0x025881fc, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER'});
}
function _fun123328() { // fn#123328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1827, offset: 0x02588474, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS'});
}
function _fun123329() { // fn#123329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1918, offset: 0x025884a5, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_FAILURE'});
}
global.__d(_fun123312, 15954, [5, 661, 507, 6931, 694,
2]) /* metro module 15954, dependencies: [5, 661, 507, 6931, 694, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 15941; source: modules/guild_settings/roles/GuildSettingsModalRolesStore.tsx; dependencies: [6, 7, 15, 17, 18, 1938, 1867, 661, 11879, 4002, 1244, 483, 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 * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
function _fun123078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:6, offset: 0x02580b8b, size: 609 bytes, params: 8, frame: 21
const env0_0 = require;
const getSortedRoleIds = function(a0) {
return a0.map(_fun123083);
};
const closure = GUILD_ROLE_CREATE_123084;
const closure2 = GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL;
const GUILD_ROLE_CREATE_1230842 = GUILD_ROLE_CREATE_123084;
const GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL2 = GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const FormStates = (require(661) /* metro dependency 661: Constants */).FormStates;
const FormStates = (ConstantsModule).FormStates;
let env0_12 = FormStates.CLOSED;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun123087(Store);
value.displayName = 'GuildSettingsModalRolesStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{GUILD_SETTINGS_MODAL_ROLES_START_REORDER: GUILD_SETTINGS_MODAL_ROLES_START_REORDER,
GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER: GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER,
GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER: GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER, GUILD_ROLE_CREATE: closure,
GUILD_ROLE_UPDATE: closure, GUILD_ROLE_DELETE: GUILD_ROLE_DELETE_123102,
GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER: GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER,
GUILD_ROLE_CREATE: GUILD_ROLE_CREATE_1230842, GUILD_ROLE_UPDATE: GUILD_ROLE_CREATE_1230842,
GUILD_ROLE_DELETE: GUILD_ROLE_DELETE_123102,
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING: GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING,
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_STOP_EDITING: function() {
env0_18 = null;
@@ -33,7 +40,7 @@ function _fun123078(global, require, importDefault, importAll, module, exports,
env0_15 = null;
env0_19 = false;
env0_12 = FormStates.CLOSED;
}, GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL: closure2,
}, GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL: GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL2,
GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW: GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW,
GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY: GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY,
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING: function() {
@@ -46,191 +53,224 @@ function _fun123078(global, require, importDefault, importAll, module, exports,
}, GUILD_SETTINGS_SUBMIT: function() {
env0_21 = true;
}, GUILD_SETTINGS_SUBMIT_SUCCESS: GUILD_SETTINGS_SUBMIT_SUCCESS_123111});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_123079() { // fn#123079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:191, offset: 0x02580dec, 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) {
function _isNativeReflectConstruct_123079() { // fn#123079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:191, offset: 0x02580dec, 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_123079_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_123079_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getSortedRoleIds(a0) { // fn#123082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:456, offset: 0x02580e4e, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return a0.id;
});
}
function GUILD_ROLE_CREATE_123084({guildId}) { // fn#123084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:513, offset: 0x02580e66, size: 52 bytes, params: 2, frame: 13
if (env0_13) {
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
}
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL() { // fn#123085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:610, offset: 0x02580e9a, size: 47 bytes, params: 1, frame: 3
if (env0_18 == null) {
return false;
}
if (env0_18 === env0_17) {
return false;
}
}
function checkForPermissionChanges() { // fn#123086, offset: 0x02580ec9, size: 23 bytes, params: 1, frame: 3
result = env0_17 !== env0_18;
}
function _fun123087(a0) { // fn#123087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:739, offset: 0x02580ee0, size: 251 bytes, params: 2, frame: 16
const closure = GuildSettingsModalRolesStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore);
}}, {key: 'submitting', get: function() {
return CLOSED === FormStates.SUBMITTING;
}}, {key: 'getUpdates', value: value_123091}, {key: 'order', get: get_123094}, {key: 'guild', get: get_123095},
{key: 'role', get: get_123096}, {key: 'permissions', get: get_123097}, {key: 'hasPermissionChanges',
get: get_123098}]);
}
function GUILD_SETTINGS_MODAL_ROLES_START_REORDER({guildId}) { // fn#123099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1777, offset: 0x02581113, size: 85 bytes, params: 2, frame: 13
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
env0_15 = GuildStore.getGuild(guildId);
global.clearTimeout(env0_20);
}
function GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER() { // fn#123100, offset: 0x02581168, size: 30 bytes, params: 1, frame: 3
if (env0_21) {
}
}
function GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER({from, to}) { // fn#123101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2028, offset: 0x02581186, size: 290 bytes, params: 2, frame: 21
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (env0_14 == null) {
return false;
}
if ((importDefault(11879) /* metro dependency 11879: DragAndDropUtils */).moveItemFromTo(env0_14, from,
to)[from] !== env0_14[from]) {
AccessibilityAnnouncer.announce(intl.formatToPlainString(t['+tmElp'], {from: from + 1, to: to + 1}));
} else {
AccessibilityAnnouncer.announce(intl.string(t.WaxXjc));
}
}
function GUILD_ROLE_DELETE_123102({roleId}) { // fn#123102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2459, offset: 0x025812a8, size: 78 bytes, params: 2, frame: 13
if (env0_14 == null) {
return false;
}
const value2 = env0_14.indexOf(roleId);
if (value2 === -1) {
return false;
}
env0_14.splice(value2, 1);
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING({guildId, roleId}) { // fn#123103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2628, offset: 0x025812f6, size: 116 bytes, params: 2, frame: 17
var permissions;
const guild = GuildStore.getGuild(guildId);
const r1 = guild != null ? GuildRoleStore.getRole(guild.id, roleId) : undefined;
if (r1 != null) {
permissions = r1.permissions;
}
env0_12 = FormStates.OPEN;
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW({permission}) { // fn#123105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3022, offset: 0x02581397, size: 77 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).add(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY({permission}) { // fn#123106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3181, offset: 0x025813e4, size: 78 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).remove(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS() { // fn#123108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3458, offset: 0x02581447, size: 37 bytes, params: 1, frame: 9
env0_12 = FormStates.OPEN;
checkForPermissionChanges();
}
function GUILD_SETTINGS_SUBMIT_SUCCESS_123111() { // fn#123111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3767, offset: 0x02581489, size: 61 bytes, params: 1, frame: 14
global.clearTimeout(env0_20);
env0_20 = global.setTimeout(function() {
env1_14 = null;
}, 400);
}
function GuildSettingsModalRolesStore() { // fn#123088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:751, offset: 0x02580fdb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, GuildSettingsModalRolesStore);
const value3 = env1_7(GuildSettingsModalRolesStore);
return env1_6(this, _isNativeReflectConstruct_123079() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_123091() { // fn#123091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1223, offset: 0x02581063, size: 166 bytes, params: 1, frame: 17
var environment;
var r0;
var defaultImport;
var calculatePositionDeltas;
var object2;
var getSortedRoles;
var id;
var getManyRoles;
const value = environment.__proto__;
if (env1_14 == null) {
r0 = [];
} else if (env1_15 == null) {
r0 = [];
} else {
defaultImport = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
calculatePositionDeltas = defaultImport.calculatePositionDeltas;
object2 = {};
getSortedRoles = GuildRoleStore.getSortedRoles;
id = env1_15.id;
object2.oldOrdering = Reflect.apply(getSortedRoles, GuildRoleStore, [id]);
getManyRoles = GuildRoleStore.getManyRoles;
id = env1_15.id;
object2.newOrdering = Reflect.apply(getManyRoles, GuildRoleStore, [id, env1_14]);
object2.idGetter = function(a0) {
function getSortedRoleIds(a0) { // fn#123082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:456, offset: 0x02580e4e, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return a0.id;
};
object2.existingPositionGetter = existingPositionGetter_123093;
object2.ascending = false;
r0 = Reflect.apply(calculatePositionDeltas, defaultImport, [object2]);
});
}
return r0;
function GUILD_ROLE_CREATE_123084({guildId}) { // fn#123084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:513, offset: 0x02580e66, size: 52 bytes, params: 2, frame: 13
if (env0_13) {
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
}
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL() { // fn#123085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:610, offset: 0x02580e9a, size: 47 bytes, params: 1, frame: 3
if (env0_18 == null) {
return false;
}
if (env0_18 === env0_17) {
return false;
}
}
function checkForPermissionChanges() { // fn#123086, offset: 0x02580ec9, size: 23 bytes, params: 1, frame: 3
result = env0_17 !== env0_18;
}
function _fun123087(a0) { // fn#123087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:739, offset: 0x02580ee0, size: 251 bytes, params: 2, frame: 16
const GuildSettingsModalRolesStore2 = GuildSettingsModalRolesStore;
Inherits(GuildSettingsModalRolesStore2, a0);
return CreateClass(GuildSettingsModalRolesStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore);
}}, {key: 'submitting', get: function() {
return CLOSED === FormStates.SUBMITTING;
}}, {key: 'getUpdates', value: value_123091}, {key: 'order', get: get_123094}, {key: 'guild', get: get_123095},
{key: 'role', get: get_123096}, {key: 'permissions', get: get_123097}, {key: 'hasPermissionChanges',
get: get_123098}]);
function GuildSettingsModalRolesStore() { // fn#123088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:751, offset: 0x02580fdb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, GuildSettingsModalRolesStore);
const value3 = env1_7(GuildSettingsModalRolesStore);
return env1_6(this, _isNativeReflectConstruct_123079() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_123091() { // fn#123091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1223, offset: 0x02581063, size: 166 bytes, params: 1, frame: 17
var environment;
var r0;
var defaultImport;
var calculatePositionDeltas;
var object;
var guildRoleStoreBinding;
var getSortedRoles;
var id;
var getManyRoles;
const value = environment.__proto__;
if (env1_14 == null) {
r0 = [];
} else if (env1_15 == null) {
r0 = [];
} else {
defaultImport = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
calculatePositionDeltas = defaultImport.calculatePositionDeltas;
object = {};
guildRoleStoreBinding = GuildRoleStore;
getSortedRoles = guildRoleStoreBinding.getSortedRoles;
id = env1_15.id;
object.oldOrdering = Reflect.apply(getSortedRoles, guildRoleStoreBinding, [id]);
guildRoleStoreBinding = GuildRoleStore;
getManyRoles = guildRoleStoreBinding.getManyRoles;
id = env1_15.id;
object.newOrdering = Reflect.apply(getManyRoles, guildRoleStoreBinding, [id, env1_14]);
object.idGetter = function(a0) {
return a0.id;
};
object.existingPositionGetter = existingPositionGetter_123093;
object.ascending = false;
r0 = Reflect.apply(calculatePositionDeltas, defaultImport, [object]);
}
return r0;
}
function get_123094() { // fn#123094, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function get_123095() { // fn#123095, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function get_123096() { // fn#123096, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function get_123097() { // fn#123097, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
function get_123098() { // fn#123098, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
}
function GUILD_SETTINGS_MODAL_ROLES_START_REORDER({guildId}) { // fn#123099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1777, offset: 0x02581113, size: 85 bytes, params: 2, frame: 13
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
env0_15 = GuildStore.getGuild(guildId);
global.clearTimeout(env0_20);
}
function GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER() { // fn#123100, offset: 0x02581168, size: 30 bytes, params: 1, frame: 3
if (env0_21) {
}
}
function GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER({from, to}) { // fn#123101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2028, offset: 0x02581186, size: 290 bytes, params: 2, frame: 21
const AccessibilityAnnouncer = (SharedModule).AccessibilityAnnouncer;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
if (env0_14 == null) {
return false;
}
if ((importDefault(11879) /* metro dependency 11879: DragAndDropUtils */).moveItemFromTo(env0_14, from,
to)[from] !== env0_14[from]) {
AccessibilityAnnouncer.announce(intl.formatToPlainString(t['+tmElp'], {from: from + 1, to: to + 1}));
} else {
AccessibilityAnnouncer.announce(intl.string(t.WaxXjc));
}
}
function GUILD_ROLE_DELETE_123102({roleId}) { // fn#123102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2459, offset: 0x025812a8, size: 78 bytes, params: 2, frame: 13
if (env0_14 == null) {
return false;
}
const value2 = env0_14.indexOf(roleId);
if (value2 === -1) {
return false;
}
env0_14.splice(value2, 1);
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING({guildId, roleId}) { // fn#123103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2628, offset: 0x025812f6, size: 116 bytes, params: 2, frame: 17
var permissions;
const guild = GuildStore.getGuild(guildId);
const r1 = guild != null ? GuildRoleStore.getRole(guild.id, roleId) : undefined;
if (r1 != null) {
permissions = r1.permissions;
}
env0_12 = FormStates.OPEN;
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW({permission}) { // fn#123105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3022, offset: 0x02581397, size: 77 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).add(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY({permission}) { // fn#123106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3181, offset: 0x025813e4, size: 78 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).remove(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS() { // fn#123108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3458, offset: 0x02581447, size: 37 bytes, params: 1, frame: 9
env0_12 = FormStates.OPEN;
checkForPermissionChanges();
}
function GUILD_SETTINGS_SUBMIT_SUCCESS_123111() { // fn#123111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3767, offset: 0x02581489, size: 61 bytes, params: 1, frame: 14
global.clearTimeout(env0_20);
env0_20 = global.setTimeout(function() {
env1_14 = null;
}, 400);
}
}
function _fun123083(a0) { // fn#123083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:499, offset: 0x00e46f8c, size: 10 bytes, params: 2, frame: 1
return a0.id;
}
function value_123091ExistingPositionGetter(a0) { // fn#123093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1404, owner: value_123091.existingPositionGetter, offset: 0x02581109, size: 10 bytes, params: 2, frame: 1
return a0.position;
}
global.__d(_fun123078, 15941, [6, 7, 15, 17, 18, 1938, 1867, 661, 11879, 4002, 1244, 483, 566, 694,
2]) /* metro module 15941, dependencies: [6, 7, 15, 17, 18, 1938, 1867, 661, 11879, 4002, 1244, 483, 566, 694, 2] */;
@@ -1,31 +1,35 @@
/* Metro module 15946; source: modules/guild_settings/roles/GuildSettingsRoleConstants.tsx; dependencies: [15947, 661, 15949, 483, 3789, 696, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BigFlagUtilsModule from '../../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildSettingsRolesStoreModule from './GuildSettingsRolesStore.tsx'; /* Metro dependency 15947 */
function _fun123166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:6, offset: 0x025836d6, size: 1133 bytes, params: 8, frame: 47
var object8;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const RoleColorsStyle = (require(15947) /* metro dependency 15947: GuildSettingsRolesStore */).RoleColorsStyle;
let value = require(661) /* metro dependency 661: Constants */;
const RoleColorsStyle = (GuildSettingsRolesStoreModule).RoleColorsStyle;
let value = ConstantsModule;
const DEFAULT_ROLE_COLOR = value.DEFAULT_ROLE_COLOR;
const Permissions = value.Permissions;
value = require(15949) /* metro dependency 15949: EnhancedRoleColorConstants */;
const DEFAULT_GRADIENT_ROLE_COLORS = value.DEFAULT_GRADIENT_ROLE_COLORS;
const HOLOGRAPHIC_ROLE_COLORS = value.HOLOGRAPHIC_ROLE_COLORS;
object8 = {COSMETIC: 0};
object8[0] = 'COSMETIC';
object8.MEMBER = 1;
object8[1] = 'MEMBER';
object8.MODERATOR = 2;
object8[2] = 'MODERATOR';
object8.MANAGER = 3;
object8[3] = 'MANAGER';
const COSMETIC = object8.COSMETIC;
const remove = (importAll(483) /* metro dependency 483: BigFlagUtils */).remove;
object = {COSMETIC: 0};
object[0] = 'COSMETIC';
object.MEMBER = 1;
object[1] = 'MEMBER';
object.MODERATOR = 2;
object[2] = 'MODERATOR';
object.MANAGER = 3;
object[3] = 'MANAGER';
const COSMETIC = object.COSMETIC;
const remove = (BigFlagUtilsModule).remove;
let DEFAULT = (importAll(3789) /* metro dependency 3789: PermissionUtils */).DEFAULT;
const MENTION_EVERYONE = Permissions.MENTION_EVERYONE;
value = Reflect.apply(remove, value, [DEFAULT, MENTION_EVERYONE]);
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
let combine = bigFlagUtilsModule.combine;
let combine = BigFlagUtilsModule.combine;
DEFAULT = (importAll(3789) /* metro dependency 3789: PermissionUtils */).DEFAULT;
const VIEW_AUDIT_LOG = Permissions.VIEW_AUDIT_LOG;
const MANAGE_NICKNAMES = Permissions.MANAGE_NICKNAMES;
@@ -37,10 +41,9 @@ function _fun123166(global, require, importDefault, importAll, module, exports,
const MOVE_MEMBERS = Permissions.MOVE_MEMBERS;
const PRIORITY_SPEAKER = Permissions.PRIORITY_SPEAKER;
const MODERATE_MEMBERS = Permissions.MODERATE_MEMBERS;
const value3 = Reflect.apply(combine, bigFlagUtilsModule, [DEFAULT, VIEW_AUDIT_LOG, MANAGE_NICKNAMES, KICK_MEMBERS,
const value3 = Reflect.apply(combine, BigFlagUtilsModule, [DEFAULT, VIEW_AUDIT_LOG, MANAGE_NICKNAMES, KICK_MEMBERS,
BAN_MEMBERS, MANAGE_MESSAGES, MUTE_MEMBERS, DEAFEN_MEMBERS, MOVE_MEMBERS, PRIORITY_SPEAKER, MODERATE_MEMBERS]);
const value4 = bigFlagUtilsModule;
combine = value4.combine;
combine = BigFlagUtilsModule.combine;
const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
const MANAGE_THREADS = Permissions.MANAGE_THREADS;
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
@@ -48,130 +51,131 @@ function _fun123166(global, require, importDefault, importAll, module, exports,
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
const MANAGE_WEBHOOKS = Permissions.MANAGE_WEBHOOKS;
const SEND_TTS_MESSAGES = Permissions.SEND_TTS_MESSAGES;
const value5 = Reflect.apply(combine, value4, [value3, MANAGE_CHANNELS, MANAGE_THREADS, MANAGE_ROLES,
const value5 = Reflect.apply(combine, BigFlagUtilsModule, [value3, MANAGE_CHANNELS, MANAGE_THREADS, MANAGE_ROLES,
MANAGE_GUILD_EXPRESSIONS, MANAGE_GUILD, MANAGE_WEBHOOKS, SEND_TTS_MESSAGES]);
const value6 = bigFlagUtilsModule;
const add = value6.add;
const add = BigFlagUtilsModule.add;
const VIEW_GUILD_ANALYTICS = Permissions.VIEW_GUILD_ANALYTICS;
const value7 = Reflect.apply(add, value6, [value5, VIEW_GUILD_ANALYTICS]);
const object9 = {};
const COSMETIC2 = object8.COSMETIC;
const object10 = {key: 'template_cosmetic'};
object10.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('BRAND_500');
const value7 = Reflect.apply(add, BigFlagUtilsModule, [value5, VIEW_GUILD_ANALYTICS]);
const object2 = {};
const COSMETIC2 = object.COSMETIC;
const object3 = {key: 'template_cosmetic'};
object3.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('BRAND_500');
const NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object10.permissions = NONE;
object10.title = function() {
object3.permissions = NONE;
object3.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.M8jQyg);
};
object10.description = function() {
object3.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['7nF/S/']);
};
object10.contents = contents;
object10.contentPreface = function() {
object3.contents = contents;
object3.contentPreface = function() {
return '';
};
object9[COSMETIC2] = object10;
const MEMBER = object8.MEMBER;
const object11 = {key: 'template_member'};
object11.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
object2[COSMETIC2] = object3;
const MEMBER = object.MEMBER;
const object4 = {key: 'template_member'};
object4.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
DEFAULT = (importAll(3789) /* metro dependency 3789: PermissionUtils */).DEFAULT;
object11.permissions = DEFAULT;
object11.communityPermissions = value;
object11.title = function() {
object4.permissions = DEFAULT;
object4.communityPermissions = value;
object4.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['9BsHzh']);
};
object11.description = function() {
object4.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.ywKYtw);
};
object11.contents = contents_123173;
object11.contentPreface = function() {
object4.contents = contents_123173;
object4.contentPreface = function() {
return '';
};
object9[MEMBER] = object11;
const MODERATOR = object8.MODERATOR;
const object12 = {key: 'template_moderator'};
object12.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_300');
object12.permissions = value3;
object12.title = function() {
object2[MEMBER] = object4;
const MODERATOR = object.MODERATOR;
const object5 = {key: 'template_moderator'};
object5.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_300');
object5.permissions = value3;
object5.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['m/GC8z']);
};
object12.description = function() {
object5.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.ERrMJZ);
};
object12.contents = contents_123177;
object12.contentPreface = function() {
object5.contents = contents_123177;
object5.contentPreface = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.amGM7K);
};
object9[MODERATOR] = object12;
const MANAGER = object8.MANAGER;
const object13 = {key: 'template_manager'};
object13.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
object13.permissions = value5;
object13.communityPermissions = value7;
object13.title = function() {
object2[MODERATOR] = object5;
const MANAGER = object.MANAGER;
const object6 = {key: 'template_manager'};
object6.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
object6.permissions = value5;
object6.communityPermissions = value7;
object6.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.qKmu3w);
};
object13.description = function() {
object6.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.WxWPYV);
};
object13.contents = contents_123181;
object13.contentPreface = function() {
object6.contents = contents_123181;
object6.contentPreface = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['7Dkb62']);
};
object9[MANAGER] = object13;
const object14 = {};
object2[MANAGER] = object6;
const object7 = {};
const SOLID = RoleColorsStyle.SOLID;
object14.id = SOLID;
object14.colors = {'primary_color': null, 'secondary_color': null, 'tertiary_color': null,
object7.id = SOLID;
object7.colors = {'primary_color': null, 'secondary_color': null, 'tertiary_color': null,
primary_color: DEFAULT_ROLE_COLOR};
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object14.labelString = t['8Qyahn'];
const items2 = [object14];
const t = (IndexNativeModule).t;
object7.labelString = t['8Qyahn'];
const items2 = [object7];
const GRADIENT = RoleColorsStyle.GRADIENT;
const XpWmJz = t.XpWmJz;
items2[1] = {id: GRADIENT, colors: DEFAULT_GRADIENT_ROLE_COLORS, labelString: XpWmJz};
const HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const QTKppe = t.QTKppe;
items2[2] = {id: HOLOGRAPHIC, colors: HOLOGRAPHIC_ROLE_COLORS, labelString: QTKppe};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRoleConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRoleConstants.tsx');
exports.CREATE_ROLE_DESKTOP_MODAL_WIDTH = 440;
exports.DEFAULT_HEADER_HEIGHT_PX = 371;
exports.MAX_BULK_ROLE_MEMBERS_ADD = 30;
exports.PermissionTemplateTypes = object8;
exports.PermissionTemplateTypes = object;
exports.DEFAULT_TEMPLATE_TYPE = COSMETIC;
exports.PermissionTemplates = object9;
exports.PermissionTemplates = object2;
exports.STYLE_CONFIGS = items2;
function contents() { // fn#123169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1060, offset: 0x02583bc3, size: 122 bytes, params: 1, frame: 15
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return [Reflect.apply(string, intl, [t.uwLDAb]), intl.string(t.gqngN7)];
}
function contents_123173() { // fn#123173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1410, offset: 0x02583cbd, size: 172 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return [Reflect.apply(string, intl, [t['9Vhbnl']]), intl.string(t['0xn+w1']), intl.string(t.ieWVpB)];
}
function contents_123177() { // fn#123177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1774, offset: 0x02583de9, size: 222 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const YOSxcd = t.YOSxcd;
return [Reflect.apply(string, intl, [YOSxcd]), intl.string(t.q9H4Fm), intl.string(t['9nHnCj']),
intl.string(t.iqwXvc)];
}
function contents_123181() { // fn#123181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:2221, offset: 0x02583f87, size: 222 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const Hx1Vox = t.Hx1Vox;
return [Reflect.apply(string, intl, [Hx1Vox]), intl.string(t['aUZ/zD']), intl.string(t['8lQujv']),
intl.string(t.cUP4pl)];
}
}
function contents() { // fn#123169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1060, offset: 0x02583bc3, size: 122 bytes, params: 1, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return [Reflect.apply(string, intl, [t.uwLDAb]), intl.string(t.gqngN7)];
}
function contents_123173() { // fn#123173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1410, offset: 0x02583cbd, size: 172 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return [Reflect.apply(string, intl, [t['9Vhbnl']]), intl.string(t['0xn+w1']), intl.string(t.ieWVpB)];
}
function contents_123177() { // fn#123177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1774, offset: 0x02583de9, size: 222 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const YOSxcd = t.YOSxcd;
return [Reflect.apply(string, intl, [YOSxcd]), intl.string(t.q9H4Fm), intl.string(t['9nHnCj']),
intl.string(t.iqwXvc)];
}
function contents_123181() { // fn#123181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:2221, offset: 0x02583f87, size: 222 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Hx1Vox = t.Hx1Vox;
return [Reflect.apply(string, intl, [Hx1Vox]), intl.string(t['aUZ/zD']), intl.string(t['8lQujv']),
intl.string(t.cUP4pl)];
}
global.__d(_fun123166, 15946, [15947, 661, 15949, 483, 3789, 696, 1244,
2]) /* metro module 15946, dependencies: [15947, 661, 15949, 483, 3789, 696, 1244, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,14 @@
/* Metro module 15951; source: modules/guild_settings/roles/GuildSettingsRolesUtils.tsx; dependencies: [31, 1945, 1878, 15942, 661, 566, 3995, 6738, 6592, 683, 6590, 1360, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import GuildUtils from '../../../utils/GuildUtils.tsx'; /* Metro dependency 6592 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as GlobalUtilsModule from '../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as GuildSettingsConstantsModule from '../GuildSettingsConstants.tsx'; /* Metro dependency 15942 */
function _fun123270(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:6, offset: 0x02586758, size: 313 bytes, params: 8, frame: 20
const env0_0 = require;
const _arrayLikeToArray_123273 = function(a0, a1) {
@@ -44,18 +54,13 @@ function _fun123270(global, require, importDefault, importAll, module, exports,
}
return value;
};
const closure = useGuildMembers;
const useGuildMembers2 = useGuildMembers;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(15942) /* metro dependency 15942: GuildSettingsConstants */).GuildSettingsRoleEditSections;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRolesUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRolesUtils.tsx');
exports.ADD_MEMBER_QUERY_LIMIT = 50;
exports.MAX_PREFETCH_MEMBER_COUNT = 1000;
exports.useGuildMembers = closure;
exports.useGuildMembers = useGuildMembers2;
exports.useGuildRoleMembers = useGuildRoleMembers;
exports.useQueryGuildMembers = useQueryGuildMembers;
exports.filterFullMembersByQuery = filterFullMembersByQuery;
@@ -72,248 +77,260 @@ function _fun123270(global, require, importDefault, importAll, module, exports,
}
return r0;
};
}
function _createForOfIteratorHelperLoose_123271(a0, a1) { // fn#123271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:198, offset: 0x02586891, 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)) {
function _createForOfIteratorHelperLoose_123271(a0, a1) { // fn#123271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:198, offset: 0x02586891, 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);
}
return _fun123272;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123273(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun123272;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123273(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_123273(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_123273(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun123272;
}
return _fun123272;
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 _fun123272() { // fn#123272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:769, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useGuildMembers(a0, a1) { // fn#123274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1108, offset: 0x02586a05, size: 182 bytes, params: 3, frame: 23
const env0_0 = a0;
const env0_1 = a1;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore],
_fun123275, [a0, a1]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserStore], _fun123276,
[value2]);
return value3.useMemo(_fun123278, [value2, value3, a0]);
}
function useGuildMembers(a0, a1) { // fn#123274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1108, offset: 0x02586a05, size: 182 bytes, params: 3, frame: 23
const env0_0 = a0;
const env0_1 = a1;
const value2 = (FluxModule).useStateFromStoresArray([GuildMemberStore],
_fun123275, [a0, a1]);
const value3 = (FluxModule).useStateFromStoresObject([UserStore], _fun123276,
[value2]);
return value3.useMemo(_fun123278, [value2, value3, a0]);
function _fun123275() { // fn#123275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1182, offset: 0x02586abb, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
const members = GuildMemberStore.getMembers(env0_0);
return require == null ? members : members.filter(require);
}
function useGuildRoleMembers(a0, a1, a2) { // fn#123279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1978, offset: 0x02586c5e, size: 143 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3Binding = env0_3.useRef(a2);
env0_3Binding.useEffect(_fun123280);
env0_3Binding.useEffect(_fun123281, [a0, a1]);
return useGuildMembers(a0, env0_3Binding.useCallback(function({roles}) {
return roles.includes(require);
}, [a1]));
}
function _fun123276() { // fn#123276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1288, offset: 0x02586af1, size: 32 bytes, params: 1, frame: 13
return env0_2.reduce(_fun123277, {});
function _fun123277(a0, a1) { // fn#123277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1302, offset: 0x02586b11, size: 46 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__;
const userStoreBinding = UserStore;
const getUser = userStoreBinding.getUser;
const userId = a1.userId;
value = Reflect.apply(getUser, userStoreBinding, [userId]);
if (value != null) {
a0[a1.userId] = value;
}
return a0;
}
function useQueryGuildMembers(a0, a1) { // fn#123283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2248, offset: 0x02586d4f, size: 77 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = env0_3.useRef(false);
env0_3.useEffect(_fun123284, [a0, a1]);
}
}
function filterFullMembersByQuery(a0, a1) { // fn#123285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2485, offset: 0x02586e2b, size: 136 bytes, params: 3, frame: 16
var r0;
var defaultImport;
var name;
var defaultImport2;
var userTag;
let value = a0.trim();
value = value.toLowerCase();
const value2 = a1.id === value;
if (value2) {
r0 = value2;
} else {
defaultImport = importDefault(6590) /* metro dependency 6590 */;
name = a1.name;
r0 = defaultImport(value, name.toLowerCase());
}
if (!r0) {
defaultImport2 = importDefault(6590) /* metro dependency 6590 */;
userTag = a1.userTag;
value = defaultImport2(value, userTag.toLowerCase());
r0 = value;
}
return r0;
}
function getSectionAnalyticsName(a0) { // fn#123286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2668, offset: 0x02586eb3, size: 125 bytes, params: 2, frame: 12
const MEMBERS = GuildSettingsRoleEditSections.MEMBERS;
if (MEMBERS === a0) {
return 'Members';
}
const PERMISSIONS = GuildSettingsRoleEditSections.PERMISSIONS;
if (PERMISSIONS === a0) {
return 'Permissions';
}
const DISPLAY = GuildSettingsRoleEditSections.DISPLAY;
if (DISPLAY === a0) {
return 'Role Settings';
}
const VERIFICATIONS = GuildSettingsRoleEditSections.VERIFICATIONS;
if (VERIFICATIONS === a0) {
return 'Connections';
}
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
}
function _fun123275() { // fn#123275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1182, offset: 0x02586abb, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
const members = GuildMemberStore.getMembers(env0_0);
return require == null ? members : members.filter(require);
}
function _fun123276() { // fn#123276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1288, offset: 0x02586af1, size: 32 bytes, params: 1, frame: 13
return env0_2.reduce(_fun123277, {});
}
function _fun123278() { // fn#123278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1400, offset: 0x02586b3f, size: 287 bytes, params: 1, frame: 27
var r3;
var r15;
var value5;
var binding;
var userId;
var property;
var push;
var object2;
var nick;
var defaultImport;
var name;
var defaultImport2;
var getAvatarSource;
var bot;
var roles;
var value7;
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_123271(env0_2);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
binding = env0_3;
userId = value5.userId;
property = binding[userId];
if (property != null) {
push = items2.push;
object2 = {};
nick = value5.nick;
if (nick != null) {
r15 = nick;
function _fun123278() { // fn#123278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1400, offset: 0x02586b3f, size: 287 bytes, params: 1, frame: 27
var r3;
var r15;
var value5;
var binding;
var userId;
var property;
var push;
var object;
var nick;
var defaultImport;
var name;
var defaultImport2;
var getAvatarSource;
var bot;
var roles;
var value7;
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_123271(env0_2);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
binding = ReactModule;
userId = value5.userId;
property = binding[userId];
if (property != null) {
push = items2.push;
object = {};
nick = value5.nick;
if (nick != null) {
r15 = nick;
continue;
}
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
name = defaultImport.getName(property);
r15 = name;
object.name = r15;
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
object.userTag = defaultImport2.getUserTag(property);
userId = value5.userId;
object.id = userId;
getAvatarSource = property.getAvatarSource;
binding = env0_0;
object.avatarSource = Reflect.apply(getAvatarSource, property, [binding]);
object.avatarURL = property.getAvatarURL(binding, 80);
bot = property.bot;
object.bot = bot;
object.verifiedBot = property.isVerifiedBot();
roles = value5.roles;
object.roles = roles;
userId = value5.userId;
object.key = userId;
object.user = property;
Reflect.apply(push, items2, [object]);
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r3 = value7;
continue;
}
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
name = defaultImport.getName(property);
r15 = name;
object2.name = r15;
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
object2.userTag = defaultImport2.getUserTag(property);
userId = value5.userId;
object2.id = userId;
getAvatarSource = property.getAvatarSource;
binding = env0_0;
object2.avatarSource = Reflect.apply(getAvatarSource, property, [binding]);
object2.avatarURL = property.getAvatarURL(binding, 80);
bot = property.bot;
object2.bot = bot;
object2.verifiedBot = property.isVerifiedBot();
roles = value5.roles;
object2.roles = roles;
userId = value5.userId;
object2.key = userId;
object2.user = property;
Reflect.apply(push, items2, [object2]);
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r3 = value7;
continue;
return items2;
}
}
return items2;
}
function _fun123281() { // fn#123281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2078, offset: 0x02586ced, size: 70 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = Reflect.apply((require(6738) /* metro dependency 6738: GuildRoleMemberActionCreators */).requestMembersForRole,
value, [env0_0, require]);
value.catch(env0_3.current);
}
function useGuildRoleMembers(a0, a1, a2) { // fn#123279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1978, offset: 0x02586c5e, size: 143 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3Binding = ReactModule.useRef(a2);
env0_3Binding.useEffect(_fun123280);
env0_3Binding.useEffect(_fun123281, [a0, a1]);
return useGuildMembers(a0, env0_3Binding.useCallback(function({roles}) {
return roles.includes(require);
}, [a1]));
function _fun123280() { // fn#123280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2045, offset: 0x01be4ab0, size: 21 bytes, params: 1, frame: 2
ReactModule.current = importDefault;
}
function _fun123281() { // fn#123281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2078, offset: 0x02586ced, size: 70 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = Reflect.apply((require(6738) /* metro dependency 6738: GuildRoleMemberActionCreators */).requestMembersForRole,
value, [env0_0, require]);
value.catch(ReactModule.current);
}
function _fun123284() { // fn#123284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2315, offset: 0x02586d9c, size: 143 bytes, params: 1, frame: 18
var defaultImport2;
const defaultImport = importDefault(6592) /* metro dependency 6592: GuildUtils */;
defaultImport.requestMembers(env0_0, require, 200);
if (!(require === '' || env0_2.current)) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Role Members'});
env0_2.current = true;
}
}
function _fun123277(a0, a1) { // fn#123277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1302, offset: 0x02586b11, size: 46 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__;
const getUser = UserStore.getUser;
const userId = a1.userId;
value = Reflect.apply(getUser, UserStore, [userId]);
if (value != null) {
a0[a1.userId] = value;
function useQueryGuildMembers(a0, a1) { // fn#123283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2248, offset: 0x02586d4f, size: 77 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = ReactModule.useRef(false);
ReactModule.useEffect(_fun123284, [a0, a1]);
function _fun123284() { // fn#123284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2315, offset: 0x02586d9c, size: 143 bytes, params: 1, frame: 18
var defaultImport2;
const defaultImport = GuildUtils;
defaultImport.requestMembers(env0_0, require, 200);
if (!(require === '' || env0_2.current)) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Role Members'});
env0_2.current = true;
}
}
}
return a0;
function filterFullMembersByQuery(a0, a1) { // fn#123285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2485, offset: 0x02586e2b, size: 136 bytes, params: 3, frame: 16
var r0;
var defaultImport;
var name;
var defaultImport2;
var userTag;
let value = a0.trim();
value = value.toLowerCase();
const value2 = a1.id === value;
if (value2) {
r0 = value2;
} else {
defaultImport = importDefault(6590) /* metro dependency 6590 */;
name = a1.name;
r0 = defaultImport(value, name.toLowerCase());
}
if (!r0) {
defaultImport2 = importDefault(6590) /* metro dependency 6590 */;
userTag = a1.userTag;
value = defaultImport2(value, userTag.toLowerCase());
r0 = value;
}
return r0;
}
function getSectionAnalyticsName(a0) { // fn#123286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2668, offset: 0x02586eb3, size: 125 bytes, params: 2, frame: 12
const MEMBERS = GuildSettingsRoleEditSections.MEMBERS;
if (MEMBERS === a0) {
return 'Members';
}
const PERMISSIONS = GuildSettingsRoleEditSections.PERMISSIONS;
if (PERMISSIONS === a0) {
return 'Permissions';
}
const DISPLAY = GuildSettingsRoleEditSections.DISPLAY;
if (DISPLAY === a0) {
return 'Role Settings';
}
const VERIFICATIONS = GuildSettingsRoleEditSections.VERIFICATIONS;
if (VERIFICATIONS === a0) {
return 'Connections';
}
(GlobalUtilsModule).assertNever(a0);
}
}
global.__d(_fun123270, 15951, [31, 1945, 1878, 15942, 661, 566, 3995, 6738, 6592, 683, 6590, 1360,
2]) /* metro module 15951, dependencies: [31, 1945, 1878, 15942, 661, 566, 3995, 6738, 6592, 683, 6590, 1360, 2] */;
@@ -1,45 +1,51 @@
/* Metro module 15966; source: modules/guild_settings/roles/hooks/useGuildSettingsRoleExampleMessage.tsx; dependencies: [31, 1885, 661, 4625, 7141, 1244, 8061, 15967, 2] */
import UserRecord from '../../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import CreateMessage from '../../../messages/createMessage.tsx'; /* Metro dependency 7141 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MessageRecordUtilsModule from '../../../messages/MessageRecordUtils.tsx'; /* Metro dependency 4625 */
function _fun123448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:6, offset: 0x0258dec8, size: 163 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageStates;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/hooks/useGuildSettingsRoleExampleMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/hooks/useGuildSettingsRoleExampleMessage.tsx');
exports.useGuildSettingsRoleExampleMessage = useGuildSettingsRoleExampleMessage;
}
function useGuildSettingsRoleExampleMessage(a0) { // fn#123449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:284, offset: 0x0258df6b, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun123450, [a0]);
function _fun123450() { // fn#123450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:349, offset: 0x0258df97, size: 285 bytes, params: 1, frame: 19
var environment;
let value = environment.__proto__;
const createMessageRecord = MessageRecordUtilsModule.createMessageRecord;
let object = {};
copyDataProperties(object, (CreateMessage)({channelId: '1337',
content: env0_0}), require);
const SENT = MessageStates.SENT;
object['state'] = SENT;
object['id'] = '31337';
const messageRecord = Reflect.apply(createMessageRecord, MessageRecordUtilsModule, [object]);
const userRecordBinding = UserRecord;
object = {'id': '313337', 'username': null, 'discriminator': '0000', 'bot': false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.username = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cqpybK);
const userRecord2 = new userRecordBinding(object);
messageRecord.author = userRecord2;
value = importAll(8061) /* metro dependency 8061: UserActionCreators */;
value = value.insertStaticUser(userRecord2);
if (value != null) {
messageRecord.author = value;
messageRecord.author.getAvatarURL = function() {
return importDefault(dependencyMap[7]);
};
}
return messageRecord;
}
function useGuildSettingsRoleExampleMessage(a0) { // fn#123449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:284, offset: 0x0258df6b, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useMemo(_fun123450, [a0]);
}
function _fun123450() { // fn#123450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:349, offset: 0x0258df97, size: 285 bytes, params: 1, frame: 19
var environment;
let value = environment.__proto__;
const messageRecordUtilsModule = require(4625) /* metro dependency 4625: MessageRecordUtils */;
const createMessageRecord = messageRecordUtilsModule.createMessageRecord;
let object2 = {};
copyDataProperties(object2, (importDefault(7141) /* metro dependency 7141: createMessage */)({channelId: '1337',
content: env0_0}), require);
const SENT = MessageStates.SENT;
object2['state'] = SENT;
object2['id'] = '31337';
const messageRecord = Reflect.apply(createMessageRecord, messageRecordUtilsModule, [object2]);
object2 = {'id': '313337', 'username': null, 'discriminator': '0000', 'bot': false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.username = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cqpybK);
const userRecord = new UserRecord(object2);
messageRecord.author = userRecord;
value = importAll(8061) /* metro dependency 8061: UserActionCreators */;
value = value.insertStaticUser(userRecord);
if (value != null) {
messageRecord.author = value;
messageRecord.author.getAvatarURL = function() {
return importDefault(dependencyMap[7]);
};
}
return messageRecord;
}
global.__d(_fun123448, 15966, [31, 1885, 661, 4625, 7141, 1244, 8061, 15967,
2]) /* metro module 15966, dependencies: [31, 1885, 661, 4625, 7141, 1244, 8061, 15967, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,23 +1,26 @@
/* Metro module 15944; source: modules/guild_settings/roles/native/GuildSettingsRoleCreateModalActionCreators.tsx; dependencies: [5080, 15945, 1962, 2] */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun123123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:6, offset: 0x02581853, size: 122 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {open: open_123124, close: close_123125};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleCreateModalActionCreators.tsx');
exports.default = object2;
}
object = {open: open_123124, close: close_123125};
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleCreateModalActionCreators.tsx');
exports.default = object;
function open_123124() { // fn#123124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:140, offset: 0x025818cd, size: 79 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, undefined, 'GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY']);
}
function open_123124() { // fn#123124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:140, offset: 0x025818cd, size: 79 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, undefined, 'GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY']);
}
function close_123125() { // fn#123125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:197, offset: 0x0258191c, size: 43 bytes, params: 1, frame: 12
(ModalActionCreators).popWithKey('GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY');
}
function close_123125() { // fn#123125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:197, offset: 0x0258191c, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY');
}
global.__d(_fun123123, 15944, [5080, 15945, 1962, 2]) /* metro module 15944, dependencies: [5080, 15945, 1962, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,227 +1,304 @@
/* Metro module 15962; source: modules/guild_settings/roles/native/GuildSettingsRoleEditDisplay.tsx; dependencies: [31, 27, 1939, 15947, 15946, 661, 15949, 33, 4501, 697, 6630, 566, 6794, 6793, 1305, 15963, 4080, 14392, 1962, 15961, 15964, 15965, 7981, 1244, 15968, 6231, 6238, 4589, 1360, 673, 13187, 4068, 4573, 2256, 6808, 2] */
import GuildSettingsRolesStore from '../GuildSettingsRolesStore.tsx'; /* Metro dependency 15947 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as GuildRoleRecordModule from '../../../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as UseHasEnhancedRoleColorsModule from '../../../premium/powerups/hooks/useHasEnhancedRoleColors.tsx'; /* Metro dependency 6630 */
import * as RoleIconUtilsModule from '../../../guild_boosting/RoleIconUtils.tsx'; /* Metro dependency 6794 */
import * as TableSwitchRowNativeModule from '../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as TextInputNativeModule from '../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as GuildSettingsRoleConstantsModule from '../GuildSettingsRoleConstants.tsx'; /* Metro dependency 15946 */
import * as GuildSettingsRolesStoreModule from '../GuildSettingsRolesStore.tsx'; /* Metro dependency 15947 */
import * as EnhancedRoleColorConstantsModule from '../../../premium/powerups/constants/EnhancedRoleColorConstants.tsx'; /* Metro dependency 15949 */
function _fun123420(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:6, offset: 0x0258bdb1, size: 646 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).isEveryoneRole;
const guildSettingsRolesStore = importDefault(15947) /* metro dependency 15947: GuildSettingsRolesStore */;
const env0_7 = (require(15947) /* metro dependency 15947: GuildSettingsRolesStore */).RoleColorsStyle;
const env0_8 = (require(15946) /* metro dependency 15946: GuildSettingsRoleConstants */).STYLE_CONFIGS;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_9 = value.DEFAULT_ROLE_COLOR;
const env0_10 = value.MAX_ROLE_LENGTH;
const env0_11 = (require(15949) /* metro dependency 15949: EnhancedRoleColorConstants */).DEFAULT_GRADIENT_ROLE_COLORS;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const object2 = {};
const BACKGROUND_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_INFO;
object.backgroundColor = BACKGROUND_FEEDBACK_INFO;
object2.backgroundColor = BACKGROUND_FEEDBACK_INFO;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.padding = PX_8;
object2.padding = PX_8;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.marginHorizontal = PX_12;
object2.marginHorizontal = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.marginTop = -1 * PX_12;
object2.marginTop = -1 * PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.marginBottom = PX_12;
object.display = 'flex';
object.flexDirection = 'row';
object2.marginBottom = PX_12;
object2.display = 'flex';
object2.flexDirection = 'row';
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.gap = PX_8;
object.justifyContent = 'center';
object.alignItems = 'center';
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.borderWidth = 1;
object2.gap = PX_8;
object2.justifyContent = 'center';
object2.alignItems = 'center';
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderWidth = 1;
const ICON_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO;
object.borderColor = ICON_FEEDBACK_INFO;
object2.borderColor = ICON_FEEDBACK_INFO;
const env0_15 = Reflect.apply(createStyles, value, [{roleIcon: {'paddingTop': 2, 'opacity': 0.5},
trailingColorContainer: {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'},
colorBlock: {'marginHorizontal': 0, 'marginVertical': 0, 'marginRight': 8, 'minWidth': 24, 'height': 24,
'borderRadius': 3}, holographicInfo: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditDisplay.tsx');
'borderRadius': 3}, holographicInfo: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditDisplay.tsx');
exports.default = GuildSettingsRoleEditDisplay;
}
function GuildSettingsRoleEditDisplay({guild, role, name, formErrors, mentionable, hoist, onNameChanged, onMentionableChanged, onHoistChanged, onRoleColorChanged, locked, autoFocusInput}) { // fn#123421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1097, offset: 0x0258c037, size: 2429 bytes, params: 2, frame: 54
var r32;
var r29;
var r23;
var r8;
var r6;
var object6;
var GRADIENT;
var defaultImport3;
var items3;
var int2hex;
var moduleValue6;
var value19;
var value20;
var moduleValue7;
var items4;
var object14;
const styles = useStyles();
const isEveryoneRole2 = isEveryoneRole(role);
let r15 = isEveryoneRole2 || locked;
const id = role.id;
const env0_3 = id;
const value3 = (require(6630) /* metro dependency 6630: useHasEnhancedRoleColors */).useHasEnhancedRoleColorsForRole(guild.id,
role);
const roleStyleData = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsRolesStore],
function() {
return GuildSettingsRolesStore.getRoleStyleData(role.id);
});
const r9 = roleStyleData == null ? RoleColorsStyle.SOLID : value3 ? roleStyleData.currentStyle : RoleColorsStyle.SOLID;
const value5 = STYLE_CONFIGS.find(_fun123423);
let r34 = roleStyleData == null || roleStyleData.styleColors == null ? undefined : roleStyleData.styleColors[r9];
let primary_color = r34?.primary_color;
const r31 = primary_color == null ? DEFAULT_ROLE_COLOR : primary_color !== 0 ? primary_color : DEFAULT_ROLE_COLOR;
r34 = r34 == null || r34?.secondary_color == null ? DEFAULT_GRADIENT_ROLE_COLORS : r34;
const canGuildUseRoleIcons2 = (require(6794) /* metro dependency 6794: RoleIconUtils */).canGuildUseRoleIcons(guild,
role);
const r25 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guild.id,
roleId: role.id,
size: 26}) ?? ((Icon) => <Icon source={importDefault(15963) /* metro dependency 15963 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} />)((require(1305) /* metro dependency 1305: native */).Icon);
const binding = env0_3;
const value8 = binding.useCallback(_fun123424, [id, r34, r31, r9, onRoleColorChanged]);
const value9 = binding.useCallback(_fun123427, [guild.id, role, id, r9, onRoleColorChanged]);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [<TextInput label={Reflect.apply(string, intl,
[t.dLbkBk])} value={name} isDisabled={r15} onChange={onNameChanged} maxLength={MAX_ROLE_LENGTH} autoFocus={autoFocusInput} errorMessage={formErrors.name?.[0]} />];
items2[1] = ((Component) => <Component role={role} />)(importDefault(15968) /* metro dependency 15968: InRolePromptNotice */);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRow = <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9wVJRB'])} onPress={value9} arrow subLabel={value5?.labelString != null ? intl.string(value5.labelString) : ''} disabled={r15} />;
let HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value14 = r9 !== HOLOGRAPHIC;
if (value14) {
var tableRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5NC5YW']),
onPress: value8, arrow: true};
var viewBindingProps = {style: styles.trailingColorContainer};
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
items3 = [r34?.primary_color];
items3[1] = r34?.secondary_color;
items3[2] = r34?.tertiary_color;
r32 = ((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123429)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} style={styles.colorBlock} />)(defaultImport3);
function GuildSettingsRoleEditDisplay({guild, role, name, formErrors, mentionable, hoist, onNameChanged, onMentionableChanged, onHoistChanged, onRoleColorChanged, locked, autoFocusInput}) { // fn#123421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1097, offset: 0x0258c037, size: 2429 bytes, params: 2, frame: 54
var r32;
var r29;
var r23;
var r8;
var r6;
var object;
var GRADIENT;
var defaultImport3;
var items3;
var int2hex;
var moduleValue6;
var value19;
var value20;
var moduleValue7;
var items4;
var object2;
const styles = useStyles();
const isEveryoneRole2 = isEveryoneRole(role);
let r15 = isEveryoneRole2 || locked;
const id = role.id;
const id2 = id;
const value3 = (UseHasEnhancedRoleColorsModule).useHasEnhancedRoleColorsForRole(guild.id,
role);
const roleStyleData = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsRolesStore],
function() {
return GuildSettingsRolesStore.getRoleStyleData(role.id);
});
const r9 = roleStyleData == null ? RoleColorsStyle.SOLID : value3 ? roleStyleData.currentStyle : RoleColorsStyle.SOLID;
const value5 = STYLE_CONFIGS.find(_fun123423);
let r34 = roleStyleData == null || roleStyleData.styleColors == null ? undefined : roleStyleData.styleColors[r9];
let primary_color = r34?.primary_color;
const r31 = primary_color == null ? DEFAULT_ROLE_COLOR : primary_color !== 0 ? primary_color : DEFAULT_ROLE_COLOR;
r34 = r34 == null || r34?.secondary_color == null ? DEFAULT_GRADIENT_ROLE_COLORS : r34;
const canGuildUseRoleIcons2 = (RoleIconUtilsModule).canGuildUseRoleIcons(guild,
role);
const r25 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guild.id,
roleId: role.id,
size: 26}) ?? ((Icon) => <Icon source={importDefault(15963) /* metro dependency 15963 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} />)((require(1305) /* metro dependency 1305: native */).Icon);
const binding = id2;
const value8 = binding.useCallback(_fun123424, [id, r34, r31, r9, onRoleColorChanged]);
const value9 = binding.useCallback(_fun123427, [guild.id, role, id, r9, onRoleColorChanged]);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const TextInput = (TextInputNativeModule).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [
<TextInput
label={Reflect.apply(string, intl, [t.dLbkBk])}
value={name}
isDisabled={r15}
onChange={onNameChanged}
maxLength={MAX_ROLE_LENGTH}
autoFocus={autoFocusInput}
errorMessage={formErrors.name?.[0]}
/>,
];
items2[1] = ((Component) => <Component role={role} />)(importDefault(15968) /* metro dependency 15968: InRolePromptNotice */);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const tableRow = (
<TableRow
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9wVJRB'])}
onPress={value9}
arrow
subLabel={value5?.labelString != null ? intl.string(value5.labelString) : ''}
disabled={r15}
/>
);
let HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value14 = r9 !== HOLOGRAPHIC;
if (value14) {
var tableRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5NC5YW']),
onPress: value8, arrow: true};
var viewBindingProps = {style: styles.trailingColorContainer};
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
items3 = [r34?.primary_color];
items3[1] = r34?.secondary_color;
items3[2] = r34?.tertiary_color;
r32 = ((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123429)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} style={styles.colorBlock} />)(defaultImport3);
} else {
r32 = ((Component) => <Component color={r31} style={styles.colorBlock} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */);
}
tableRowProps.trailing = (
<View {...viewBindingProps}>
{r32}
</View>
);
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
moduleValue6 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue6.int2hex;
primary_color = r34?.primary_color;
value19 = 0;
value20 = Reflect.apply(int2hex, moduleValue6, [primary_color ?? value19]);
moduleValue7 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue7.int2hex;
r29 = '[' + value20 + ', ' + Reflect.apply(int2hex, moduleValue7, [r34?.secondary_color ?? value19]) + ']';
} else {
r29 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(r31);
}
tableRowProps.subLabel = r29;
tableRowProps.disabled = r15;
r23 = <TableRow {...tableRowProps} />;
} else {
r32 = ((Component) => <Component color={r31} style={styles.colorBlock} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */);
r23 = value14;
}
tableRowProps.trailing = <View {...viewBindingProps}>{r32}</View>;
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
moduleValue6 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue6.int2hex;
primary_color = r34?.primary_color;
value19 = 0;
value20 = Reflect.apply(int2hex, moduleValue6, [primary_color ?? value19]);
moduleValue7 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue7.int2hex;
r29 = '[' + value20 + ', ' + Reflect.apply(int2hex, moduleValue7, [r34?.secondary_color ?? value19]) + ']';
items2[2] = (
<TableRowGroup hasIcons={false}>
{tableRow}
{r23}
</TableRowGroup>
);
HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value24 = r9 === HOLOGRAPHIC;
if (value24) {
var viewBindingProps = {style: styles.holographicInfo};
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
items4 = [
<CircleInformationIcon
size="sm"
color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO}
/>,
];
items4[1] = ((Text) => <Text variant="text-sm/normal">{intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).tBhCyr)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r8 = (
<View {...viewBindingProps}>
{items4}
</View>
);
} else {
r29 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(r31);
r8 = value24;
}
tableRowProps.subLabel = r29;
tableRowProps.disabled = r15;
r23 = <TableRow {...tableRowProps} />;
} else {
r23 = value14;
items2[3] = r8;
if (canGuildUseRoleIcons2) {
r6 = (
<TableRowGroup hasIcons={false}>
<TableRow
disabled={r15}
label={intl.string(t.B9grJw)}
trailing={<View style={styles.roleIcon}>
{r25}
</View>}
subLabel={intl.string(t.ZTpgyG)}
/>
</TableRowGroup>
);
} else {
r6 = null;
}
items2[4] = r6;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const tableSwitchRow = (
<TableSwitchRow
disabled={r15 || isEveryoneRole2}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iVW5w4)}
value={hoist}
onValueChange={onHoistChanged}
subLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vceJPk)}
/>
);
r15 = !r15 ? isEveryoneRole2 : r15;
const format = intl.format;
const DTXoJQ = (require(1244) /* metro dependency 1244: indexNative */).t.DTXoJQ;
items2[5] = (
<TableRowGroup hasIcons={false}>
{tableSwitchRow}
<TableSwitchRow
disabled={r15}
label={Reflect.apply(format, intl, [DTXoJQ, {}])}
value={mentionable}
onValueChange={onMentionableChanged}
/>
</TableRowGroup>
);
return (
<>
{items2}
</>
);
function _fun123423({id}) { // fn#123423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1502, offset: 0x0258c9d4, size: 21 bytes, params: 2, frame: 2
return id === ReactNativeModule.View;
}
function _fun123424() { // fn#123424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1864, offset: 0x0258c9e9, size: 247 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
const SOLID = RoleColorsStyle.SOLID;
if (ReactNativeModule.View === SOLID) {
defaultImport2 = importDefault(dependencyMap[16]);
defaultImport2.openLazy(require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths), 'RoleColorPicker',
{color: GuildRoleRecordModule.isEveryoneRole, onSelect: onSelect_123425});
} else if (ReactNativeModule.View === RoleColorsStyle.GRADIENT) {
defaultImport = importDefault(dependencyMap[16]);
defaultImport.openLazy(require(dependencyMap[18])(dependencyMap[20], dependencyMap.paths), 'RoleColorPicker',
{colors: env0_6, onSelect: function(a0) {
require(dependencyMap[19]).updateRoleColors(id, a0, RoleColorsStyle.GRADIENT);
onRoleColorChanged();
}});
}
function onSelect_123425(a0) { // fn#123425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1959, offset: 0x0258cae0, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleColor(id, a0);
onRoleColorChanged();
}
}
function _fun123427() { // fn#123427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2180, offset: 0x0258cb5d, size: 130 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[16]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[18]);
value = value(dependencyMap[21], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'EnhancedRoleColorsSelectStyleModal', {guildId: guild.id, role: role,
roleStyle: ReactNativeModule.View, onStyleChanged: onStyleChanged}]);
function onStyleChanged(a0) { // fn#123428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2312, offset: 0x0258cbdf, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleStyles(id, a0);
onRoleColorChanged();
}
}
function _fun123429(a0) { // fn#123429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:3147, offset: 0x0258cc18, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (ColorUtilsModule).int2hex(a0);
}
}
items2[2] = <TableRowGroup hasIcons={false}>{tableRow}{r23}</TableRowGroup>;
HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value24 = r9 === HOLOGRAPHIC;
if (value24) {
var viewBindingProps = {style: styles.holographicInfo};
items4 = [((CircleInformationIcon) => <CircleInformationIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO} />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)];
items4[1] = ((Text) => <Text variant="text-sm/normal">{intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).tBhCyr)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r8 = <View {...viewBindingProps}>{items4}</View>;
} else {
r8 = value24;
}
items2[3] = r8;
if (canGuildUseRoleIcons2) {
r6 = <TableRowGroup hasIcons={false}><TableRow disabled={r15} label={intl.string(t.B9grJw)} trailing={<View style={styles.roleIcon}>{r25}</View>} subLabel={intl.string(t.ZTpgyG)} /></TableRowGroup>;
} else {
r6 = null;
}
items2[4] = r6;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const tableSwitchRow = <TableSwitchRow disabled={r15 || isEveryoneRole2} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iVW5w4)} value={hoist} onValueChange={onHoistChanged} subLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vceJPk)} />;
r15 = !r15 ? isEveryoneRole2 : r15;
const format = intl.format;
const DTXoJQ = (require(1244) /* metro dependency 1244: indexNative */).t.DTXoJQ;
items2[5] = <TableRowGroup hasIcons={false}>{tableSwitchRow}<TableSwitchRow disabled={r15} label={Reflect.apply(format,
intl, [DTXoJQ, {}])} value={mentionable} onValueChange={onMentionableChanged} /></TableRowGroup>;
return (
<>
{items2}
</>
);
}
function _fun123423({id}) { // fn#123423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1502, offset: 0x0258c9d4, size: 21 bytes, params: 2, frame: 2
return id === env0_4;
}
function _fun123424() { // fn#123424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1864, offset: 0x0258c9e9, size: 247 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
const binding = env0_4;
const SOLID = RoleColorsStyle.SOLID;
if (binding === SOLID) {
defaultImport2 = importDefault(dependencyMap[16]);
defaultImport2.openLazy(require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths), 'RoleColorPicker',
{color: env0_5, onSelect: onSelect_123425});
} else if (env0_4 === RoleColorsStyle.GRADIENT) {
defaultImport = importDefault(dependencyMap[16]);
defaultImport.openLazy(require(dependencyMap[18])(dependencyMap[20], dependencyMap.paths), 'RoleColorPicker',
{colors: env0_6, onSelect: function(a0) {
require(dependencyMap[19]).updateRoleColors(id, a0, RoleColorsStyle.GRADIENT);
onRoleColorChanged();
}});
}
}
function _fun123427() { // fn#123427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2180, offset: 0x0258cb5d, size: 130 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[16]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[18]);
value = value(dependencyMap[21], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'EnhancedRoleColorsSelectStyleModal', {guildId: guild.id, role: role,
roleStyle: env0_4, onStyleChanged: onStyleChanged}]);
}
function _fun123429(a0) { // fn#123429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:3147, offset: 0x0258cc18, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
}
function onSelect_123425(a0) { // fn#123425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1959, offset: 0x0258cae0, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleColor(id, a0);
onRoleColorChanged();
}
function onStyleChanged(a0) { // fn#123428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2312, offset: 0x0258cbdf, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleStyles(id, a0);
onRoleColorChanged();
}
global.__d(_fun123420, 15962, [31, 27, 1939, 15947, 15946, 661, 15949, 33, 4501, 697, 6630, 566, 6794, 6793, 1305,
15963, 4080, 14392, 1962, 15961, 15964, 15965, 7981, 1244, 15968, 6231, 6238, 4589, 1360, 673, 13187, 4068,
4573, 2256, 6808,
2]) /* metro module 15962, dependencies: [31, 27, 1939, 15947, 15946, 661, 15949, 33, 4501, 697, 6630, 566, 6794, 6793, 1305, 15963, 4080, 14392, 1962, 15961, 15964, 15965, 7981, 1244, 15968, 6231, 6238, 4589, 1360, 673, 13187, 4068, 4573, 2256, 6808, 2] */;
@@ -1,18 +1,29 @@
/* Metro module 15970; source: modules/guild_settings/roles/native/GuildSettingsRoleEditPermissions.tsx; dependencies: [57, 31, 27, 1422, 3784, 1878, 661, 33, 4501, 697, 3789, 44, 6766, 1244, 4080, 15971, 1962, 15192, 15968, 6984, 683, 483, 4573, 15196, 6808, 6231, 1305, 9105, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
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 UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import InRolePromptNotice from './InRolePromptNotice.tsx'; /* Metro dependency 15968 */
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 BigFlagUtilsModule from '../../../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as GuildRecordModule from '../../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableSwitchRowNativeModule from '../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as PermissionUtilsModule from '../../../permissions/PermissionUtils.tsx'; /* Metro dependency 15196 */
function _fun123461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:6, offset: 0x0258e76d, size: 432 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.Keyboard;
const env0_8 = value.SectionList;
const env0_9 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.AnalyticEvents;
const env0_13 = value.Permissions;
@@ -22,208 +33,253 @@ function _fun123461(global, require, importDefault, importAll, module, exports,
const env0_16 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {emptyState: {'backgroundColor': 'transparent', 'paddingTop': 40}};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.sectionSeparator = {height: PX_24};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.emptyStateText = {color: TEXT_DEFAULT};
object2.subLabel = {includeFontPadding: true};
const env0_17 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditPermissions.tsx');
object = {emptyState: {'backgroundColor': 'transparent', 'paddingTop': 40}};
const PX_24 = (Native).space.PX_24;
object.sectionSeparator = {height: PX_24};
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
object.emptyStateText = {color: TEXT_DEFAULT};
object.subLabel = {includeFontPadding: true};
const env0_17 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditPermissions.tsx');
exports.default = GuildSettingsRoleEditPermission;
}
function GuildSettingsRoleEditPermission({guild, role, permissions, onPermissionsChanged, contentContainerStyle}) { // fn#123462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:622, offset: 0x0258e91d, size: 1056 bytes, params: 2, frame: 33
var r7;
var r5;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var EmptyState;
const styles = useStyles();
const styles2 = styles;
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r7 = moduleValue.getHighestRole(guild, currentUser.id);
} else {
r7 = undefined;
}
const env0_5 = r7;
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
const isRoleHigher2 = permissionUtilsModule.isRoleHigher(guild, currentUser?.id, r7, role);
const value5 = !isRoleHigher2;
const binding = env0_5;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, ['']);
const binding2 = styles2;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_8 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const env0_9 = value8[0];
const env0_10 = value8[1];
(Module00044)(guild != null, 'Guild cannot be null');
const isGuildOwner2 = isGuildOwner(guild, currentUser);
const moduleValue3 = permissionUtilsModule;
const can = moduleValue3.can;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
const value9 = Reflect.apply(can, moduleValue3, [{permission: ADMINISTRATOR, user: currentUser, context: guild}]);
const env0_11 = binding.useRef(false);
const view = (
<View>
{(isGuildOwner2 || (isRoleHigher2 ? value9 : !value5)) && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ZhSOBy,
{onTemplateOpen: onTemplateOpen})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}
</View>
);
const value16 = (importDefault(15192) /* metro dependency 15192: PermissionSpecUtils */).generateGuildPermissionSpec(guild).map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
object['permissions'] = a0.permissions.filter(_fun123465);
return object;
}).filter(function(a0) {
return a0.permissions.length > 0;
}).map(function(a0) {
return {title: a0.title, data: a0.permissions};
});
const value17 = value16.length > 0;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const items2 = [
((Component) => <Component role={role} />)(InRolePromptNotice),
];
const SearchField = (SearchFieldNativeModule).SearchField;
items2[1] = (
<View>
<SearchField size="md" onChange={onChange_123468} />
</View>
);
items2[2] = view;
if (value17) {
r5 = (
<SectionList
sections={value16}
stickySectionHeadersEnabled={false}
renderItem={renderItem_123469}
renderSectionHeader={renderSectionHeader_123471}
SectionSeparatorComponent={SectionSeparatorComponent}
ItemSeparatorComponent={function() {
return null;
}}
keyExtractor={function({flag}) {
return flag.toString();
}}
keyboardDismissMode="on-drag"
contentContainerStyle={contentContainerStyle}
/>
);
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = (
<EmptyState
Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt}
style={styles.emptyState}
bodyStyle={styles.emptyStateText}
body={intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Psh5OO, {query: property})}
/>
);
}
items2[3] = r5;
return (
<>
{items2}
</>
);
function onTemplateOpen() { // fn#123463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1259, owner: GuildSettingsRoleEditPermission.onTemplateOpen, offset: 0x0258ed3d, size: 168 bytes, params: 1, frame: 21
let value = environment.__proto__;
Keyboard.dismiss();
const defaultImport = importDefault(dependencyMap[14]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[16]);
value = value(dependencyMap[15], dependencyMap.paths);
const guildBinding = guild;
Reflect.apply(openLazy, defaultImport, [value, 'role-permission-templates-' + guildBinding.id + '-' + role.id,
{permissionsEdited: env0_9, onPermissionsChanged: onPermissionsChanged, guildId: guildBinding.id}]);
}
function _fun123464(a0) { // fn#123464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1475, offset: 0x0258ede5, size: 51 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
object['permissions'] = a0.permissions.filter(_fun123465);
return object;
function _fun123465({title}) { // fn#123465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1519, offset: 0x0258ee18, size: 57 bytes, params: 2, frame: 12
const value = title.toLowerCase();
const includes = value.includes;
const value3 = env1_7.trimStart();
return Reflect.apply(includes, value, [value3.toLowerCase()]);
}
}
function GuildSettingsRoleEditPermissionOnChange(a0) { // fn#123468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1788, owner: GuildSettingsRoleEditPermission.onChange, offset: 0x0258ee81, size: 119 bytes, params: 2, frame: 16
var value4;
var defaultImport;
env0_8(a0);
if (!(a0.trimStart() === '' || env0_11.current)) {
value4 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Permissions'});
env0_11.current = true;
}
}
function GuildSettingsRoleEditPermissionRenderItem({item, index, section}) { // fn#123469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1971, owner: GuildSettingsRoleEditPermission.renderItem, offset: 0x0258eef8, size: 429 bytes, params: 2, frame: 28
var environment;
var roleBinding;
var value3;
var permissionStoreBinding;
var can;
var guildBinding;
var value5;
var id;
var object2;
var moduleValue;
const description = item.description;
const title = item.title;
const flag = item.flag;
let r7 = env0_6 && role === env0_5;
r7 = !r7 ? env0_6 : r7;
if (!r7) {
value3 = environment.__proto__;
permissionStoreBinding = PermissionStore;
r7 = !permissionStoreBinding.can(flag, guild);
}
if (!r7) {
value5 = environment.__proto__;
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
guildBinding = guild;
roleBinding = role;
id = roleBinding.id;
object2 = {};
copyDataProperties(object2, roleBinding, undefined);
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
object2['permissions'] = moduleValue.remove(permissions, flag);
r7 = !Reflect.apply(can, permissionStoreBinding, [flag, guildBinding, null, {[id]: object2}]);
}
const Text = (TextModule).Text;
const text = (
<Text
variant="text-xs/medium"
color="text-subtle"
style={styles.subLabel}
>
{(PermissionUtilsModule).renderDescription(description)}
</Text>
);
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const length = section.data.length;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
return (
<TableSwitchRow
start={index === 0}
end={index === length - 1}
value={bigFlagUtilsModule.has(permissions, flag)}
disabled={r7}
onValueChange={onValueChange_123470}
label={title}
subLabel={text}
/>
);
function renderItemOnValueChange(a0) { // fn#123470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2376, owner: GuildSettingsRoleEditPermission.renderItem.onValueChange, offset: 0x0258f0a5, size: 103 bytes, params: 2, frame: 17
const onPermissionsChangedBinding = onPermissionsChanged;
onPermissionsChangedBinding(a0 ? BigFlagUtilsModule.add(permissions, flag) : BigFlagUtilsModule.remove(permissions,
flag));
env1_10(true);
}
}
function GuildSettingsRoleEditPermissionRenderSectionHeader(a0) { // fn#123471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2473, owner: GuildSettingsRoleEditPermission.renderSectionHeader, offset: 0x0258f10c, size: 95 bytes, params: 2, frame: 16
const title = a0.section.title;
const TableRowGroupTitle = (TableRowGroupNativeModule).TableRowGroupTitle;
return (
<View
accessible
accessibilityRole="header"
accessibilityLabel={title}
>
<TableRowGroupTitle title={title} />
</View>
);
}
function SectionSeparatorComponent({leadingItem}) { // fn#123472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2641, owner: GuildSettingsRoleEditPermission.SectionSeparatorComponent, offset: 0x0258f16b, size: 58 bytes, params: 2, frame: 14
var r0;
let value = null;
if (value != leadingItem) {
value = environment.__proto__;
value = <View style={styles.sectionSeparator} />;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function GuildSettingsRoleEditPermission({guild, role, permissions, onPermissionsChanged, contentContainerStyle}) { // fn#123462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:622, offset: 0x0258e91d, size: 1056 bytes, params: 2, frame: 33
var r7;
var r5;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var EmptyState;
const styles = useStyles();
const env0_4 = styles;
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r7 = moduleValue.getHighestRole(guild, currentUser.id);
} else {
r7 = undefined;
}
const env0_5 = r7;
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
const isRoleHigher2 = permissionUtilsModule.isRoleHigher(guild, currentUser?.id, r7, role);
const value5 = !isRoleHigher2;
const binding = env0_5;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_8 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const env0_9 = value8[0];
const env0_10 = value8[1];
(importDefault(44) /* metro dependency 44 */)(guild != null, 'Guild cannot be null');
const isGuildOwner2 = isGuildOwner(guild, currentUser);
const moduleValue3 = permissionUtilsModule;
const can = moduleValue3.can;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
const value9 = Reflect.apply(can, moduleValue3, [{permission: ADMINISTRATOR, user: currentUser, context: guild}]);
const env0_11 = binding.useRef(false);
const view = <View>{(isGuildOwner2 || (isRoleHigher2 ? value9 : !value5)) && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ZhSOBy,
{onTemplateOpen: onTemplateOpen})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}</View>;
const value16 = (importDefault(15192) /* metro dependency 15192: PermissionSpecUtils */).generateGuildPermissionSpec(guild).map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
object['permissions'] = a0.permissions.filter(_fun123465);
return object;
}).filter(function(a0) {
return a0.permissions.length > 0;
}).map(function(a0) {
return {title: a0.title, data: a0.permissions};
});
const value17 = value16.length > 0;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const items2 = [((Component) => <Component role={role} />)(importDefault(15968) /* metro dependency 15968: InRolePromptNotice */)];
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2[1] = <View><SearchField size="md" onChange={onChange_123468} /></View>;
items2[2] = view;
if (value17) {
r5 = <SectionList sections={value16} stickySectionHeadersEnabled={false} renderItem={renderItem_123469} renderSectionHeader={renderSectionHeader_123471} SectionSeparatorComponent={SectionSeparatorComponent} ItemSeparatorComponent={function() {
return null;
}} keyExtractor={function({flag}) {
return flag.toString();
}} keyboardDismissMode="on-drag" contentContainerStyle={contentContainerStyle} />;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = <EmptyState Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt} style={styles.emptyState} bodyStyle={styles.emptyStateText} body={intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Psh5OO,
{query: property})} />;
}
items2[3] = r5;
return (
<>
{items2}
</>
);
}
function onTemplateOpen() { // fn#123463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1259, owner: GuildSettingsRoleEditPermission.onTemplateOpen, offset: 0x0258ed3d, size: 168 bytes, params: 1, frame: 21
let value = environment.__proto__;
Keyboard.dismiss();
const defaultImport = importDefault(dependencyMap[14]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[16]);
value = value(dependencyMap[15], dependencyMap.paths);
const guildBinding = guild;
Reflect.apply(openLazy, defaultImport, [value, 'role-permission-templates-' + guildBinding.id + '-' + role.id,
{permissionsEdited: env0_9, onPermissionsChanged: onPermissionsChanged, guildId: guildBinding.id}]);
}
function _fun123464(a0) { // fn#123464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1475, offset: 0x0258ede5, size: 51 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['permissions'] = a0.permissions.filter(_fun123465);
return object2;
}
function GuildSettingsRoleEditPermissionOnChange(a0) { // fn#123468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1788, owner: GuildSettingsRoleEditPermission.onChange, offset: 0x0258ee81, size: 119 bytes, params: 2, frame: 16
var value4;
var defaultImport;
env0_8(a0);
if (!(a0.trimStart() === '' || env0_11.current)) {
value4 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Permissions'});
env0_11.current = true;
}
}
function GuildSettingsRoleEditPermissionRenderItem({item, index, section}) { // fn#123469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1971, owner: GuildSettingsRoleEditPermission.renderItem, offset: 0x0258eef8, size: 429 bytes, params: 2, frame: 28
var environment;
var roleBinding;
var can;
var guildBinding;
var value5;
var id;
var object;
var moduleValue;
const description = item.description;
const title = item.title;
const flag = item.flag;
let r7 = env0_6 && role === env0_5;
r7 = !r7 ? env0_6 : r7;
r7 = !r7 ? !PermissionStore.can(flag, guild) : r7;
if (!r7) {
value5 = environment.__proto__;
can = PermissionStore.can;
guildBinding = guild;
roleBinding = role;
id = roleBinding.id;
object = {};
copyDataProperties(object, roleBinding, undefined);
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
object['permissions'] = moduleValue.remove(permissions, flag);
r7 = !Reflect.apply(can, PermissionStore, [flag, guildBinding, null, {[id]: object}]);
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-xs/medium" color="text-subtle" style={styles.subLabel}>{(require(15196) /* metro dependency 15196: PermissionUtils */).renderDescription(description)}</Text>;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const length = section.data.length;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
return (
<TableSwitchRow
start={index === 0}
end={index === length - 1}
value={bigFlagUtilsModule.has(permissions, flag)}
disabled={r7}
onValueChange={onValueChange_123470}
label={title}
subLabel={text}
/>
);
}
function GuildSettingsRoleEditPermissionRenderSectionHeader(a0) { // fn#123471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2473, owner: GuildSettingsRoleEditPermission.renderSectionHeader, offset: 0x0258f10c, size: 95 bytes, params: 2, frame: 16
const title = a0.section.title;
const TableRowGroupTitle = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle;
return (
<View
accessible
accessibilityRole="header"
accessibilityLabel={title}
>
<TableRowGroupTitle title={title} />
</View>
);
}
function SectionSeparatorComponent({leadingItem}) { // fn#123472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2641, owner: GuildSettingsRoleEditPermission.SectionSeparatorComponent, offset: 0x0258f16b, size: 58 bytes, params: 2, frame: 14
var r0;
let value = null;
if (value != leadingItem) {
value = environment.__proto__;
value = <View style={styles.sectionSeparator} />;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun123465({title}) { // fn#123465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1519, offset: 0x0258ee18, size: 57 bytes, params: 2, frame: 12
const value = title.toLowerCase();
const includes = value.includes;
const value3 = env1_7.trimStart();
return Reflect.apply(includes, value, [value3.toLowerCase()]);
}
function renderItemOnValueChange(a0) { // fn#123470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2376, owner: GuildSettingsRoleEditPermission.renderItem.onValueChange, offset: 0x0258f0a5, size: 103 bytes, params: 2, frame: 17
const onPermissionsChangedBinding = onPermissionsChanged;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
onPermissionsChangedBinding(a0 ? bigFlagUtilsModule.add(permissions, flag) : bigFlagUtilsModule.remove(permissions,
flag));
env1_10(true);
}
global.__d(_fun123461, 15970, [57, 31, 27, 1422, 3784, 1878, 661, 33, 4501, 697, 3789, 44, 6766, 1244, 4080, 15971,
1962, 15192, 15968, 6984, 683, 483, 4573, 15196, 6808, 6231, 1305, 9105,
2]) /* metro module 15970, dependencies: [57, 31, 27, 1422, 3784, 1878, 661, 33, 4501, 697, 3789, 44, 6766, 1244, 4080, 15971, 1962, 15192, 15968, 6984, 683, 483, 4573, 15196, 6808, 6231, 1305, 9105, 2] */;
@@ -1,117 +1,173 @@
/* Metro module 15959; source: modules/guild_settings/roles/native/GuildSettingsRoleItem.tsx; dependencies: [5, 31, 27, 661, 33, 4501, 697, 4573, 6630, 6793, 4496, 1244, 11374, 6593, 4596, 8341, 4071, 6812, 4589, 1360, 673, 9097, 6238, 6699, 1305, 8592, 6705, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import AlertActionCreators from '../../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import UseHasEnhancedRoleColors from '../../../premium/powerups/hooks/useHasEnhancedRoleColors.tsx'; /* Metro dependency 6630 */
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 ColorUtilsModule from '../../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as RoleIconUtilsModule from '../../../guild_boosting/native/RoleIconUtils.tsx'; /* Metro dependency 6793 */
function _fun123334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:6, offset: 0x025885ee, size: 523 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(5) /* metro dependency 5 */;
const value2 = importAll(31) /* metro dependency 31 */;
const value3 = require(27) /* metro dependency 27 */;
const env0_5 = value3.View;
const StyleSheet = value3.StyleSheet;
const env0_6 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR_HEX;
const value4 = require(33) /* metro dependency 33 */;
const env0_7 = value4.jsx;
const env0_8 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {row: {'flexDirection': 'row', 'gap': 4, 'alignItems': 'center'}};
const object4 = {};
const StyleSheet = ReactNativeModule.StyleSheet;
const createStyles = CreateStylesModule.createStyles;
object = {row: {'flexDirection': 'row', 'gap': 4, 'alignItems': 'center'}};
const object2 = {};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object4.tintColor = INTERACTIVE_TEXT_DEFAULT;
object2.tintColor = INTERACTIVE_TEXT_DEFAULT;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
const value6 = 20;
object4.borderRadius = value6;
object4.padding = 8;
object3.everyone = object4;
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
object2.borderRadius = value6;
object2.padding = 8;
object.everyone = object2;
const TextStyleSheet = (TextModule).TextStyleSheet;
const property = TextStyleSheet['text-md/semibold'];
object3.label = {lineHeight: ((property == null ? value : property.lineHeight) ?? value6) + 1};
object.label = {lineHeight: ((property == null ? value : property.lineHeight) ?? value6) + 1};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object3.sparkleIcon = {tintColor: ICON_MUTED};
const object7 = {'width': 32, 'height': 32, 'borderRadius': null, 'overflow': 'hidden', 'display': 'flex',
object.sparkleIcon = {tintColor: ICON_MUTED};
const object5 = {'width': 32, 'height': 32, 'borderRadius': null, 'overflow': 'hidden', 'display': 'flex',
'alignItems': 'center', 'justifyContent': 'center'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.container = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object3.gradient = object8;
object3.image = {tintColor: 'white'};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
const value7 = value2.memo(GuildSettingsRoleItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleItem.tsx');
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.container = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object.gradient = object6;
object.image = {tintColor: 'white'};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value7 = ReactModule.memo(GuildSettingsRoleItem);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleItem.tsx');
exports.default = value7;
return value;
}
function GuildSettingsRoleItem(a0) { // fn#123335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:818, offset: 0x025887f9, size: 2065 bytes, params: 2, frame: 43
var r24;
var r8;
var r9;
var r10;
var r16;
var r0;
var r11;
var r14;
var push;
var object5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object6;
var object7;
var value9;
var value10;
var IconButton;
var colors;
var iconButton;
var value12;
var defaultImport2;
var items3;
var object8;
var Icon;
const value2 = undefined;
const defaultImport = importDefault(6630) /* metro dependency 6630: useHasEnhancedRoleColors */;
let guildId = a0.guildId;
const value3 = null;
const value4 = defaultImport(guildId, value3);
const styles = useStyles();
const role = a0.role;
const sorting = a0.sorting;
const locked = a0.locked;
const env0_1 = a0.onPress;
const onLongPress = a0.onLongPress;
const onMoveUp = a0.onMoveUp;
const onMoveDown = a0.onMoveDown;
const sortHandlers = a0.sortHandlers;
const isEveryoneRole = a0.isEveryoneRole;
guildId = a0.guildId;
const env0_4 = guildId;
const numMembers = a0.numMembers;
const isLastRole = a0.isLastRole;
const isFirstRole = a0.isFirstRole;
const value5 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guildId,
roleId: role.id, size: 32});
let tags = role.tags;
const value6 = value3 === (value3 == tags ? value2 : tags.guild_connections);
items = [];
if (value3 != onMoveUp) {
push = items.push;
object5 = {name: 'moveup'};
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Yl8E4h);
Reflect.apply(push, items, [object5]);
}
if (value3 != onMoveDown) {
push = items.push;
object6 = {name: 'movedown'};
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5PbXSy']);
Reflect.apply(push, items, [object6]);
}
const binding = env0_4;
const useCallback = binding.useCallback;
if (sorting) {
if (locked) {
function GuildSettingsRoleItem(a0) { // fn#123335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:818, offset: 0x025887f9, size: 2065 bytes, params: 2, frame: 43
var r24;
var r8;
var r9;
var r10;
var r16;
var r0;
var r11;
var r14;
var push;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var object3;
var value9;
var value10;
var IconButton;
var colors;
var iconButton;
var value12;
var defaultImport2;
var items3;
var object4;
var Icon;
const value2 = undefined;
const defaultImport = UseHasEnhancedRoleColors;
let guildId = a0.guildId;
const value3 = null;
const value4 = defaultImport(guildId, value3);
const styles = useStyles();
const role = a0.role;
const sorting = a0.sorting;
const locked = a0.locked;
const env0_1 = a0.onPress;
const onLongPress = a0.onLongPress;
const onMoveUp = a0.onMoveUp;
const onMoveDown = a0.onMoveDown;
const sortHandlers = a0.sortHandlers;
const isEveryoneRole = a0.isEveryoneRole;
guildId = a0.guildId;
const guildId2 = guildId;
const numMembers = a0.numMembers;
const isLastRole = a0.isLastRole;
const isFirstRole = a0.isFirstRole;
const value5 = (RoleIconUtilsModule).useRoleIcon({guildId: guildId,
roleId: role.id, size: 32});
let tags = role.tags;
const value6 = value3 === (value3 == tags ? value2 : tags.guild_connections);
items2 = [];
if (value3 != onMoveUp) {
push = items2.push;
object = {name: 'moveup'};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Yl8E4h);
Reflect.apply(push, items2, [object]);
}
if (value3 != onMoveDown) {
push = items2.push;
object2 = {name: 'movedown'};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5PbXSy']);
Reflect.apply(push, items2, [object2]);
}
const binding = guildId2;
const useCallback = binding.useCallback;
if (sorting) {
if (locked) {
value12 = false;
if (sorting) {
r8 = value12;
r9 = value2;
r10 = value2;
r16 = value12;
} else {
r8 = true;
r9 = value2;
r10 = value2;
r16 = value12;
}
} else {
object3 = {accessibilityRole: 'button'};
object3.accessibilityLabel = intl.string(t['0dOFq+']);
object3.accessibilityHint = intl.string(t.BGMUFB);
object3.accessibilityActions = items2;
object3.onAccessibilityAction = Reflect.apply(useCallback, binding, [_fun123336, [onMoveUp, onMoveDown]]);
object3.delayLongPress = 100;
object3.activeOpacity = 0.8;
object3.hitSlop = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
copyDataProperties(object3, sortHandlers, undefined);
r24 = role.managed && !value6;
value9 = true;
value10 = false;
if (r24) {
r8 = value10;
r9 = value2;
r10 = object3;
r16 = value9;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
iconButton = (
<IconButton
icon={((TrashIcon) => <TrashIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT} />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)}
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FiMFTZ,
{name: role.name})}
size="sm"
variant="destructive"
onPress={onPress_123337}
/>
);
r8 = value10;
r9 = iconButton;
r10 = object3;
r16 = value9;
}
}
} else {
value12 = false;
if (sorting) {
r8 = value12;
@@ -124,187 +180,193 @@ function GuildSettingsRoleItem(a0) { // fn#123335, source: /ci/build/discord/dis
r10 = value2;
r16 = value12;
}
} else {
object7 = {accessibilityRole: 'button'};
object7.accessibilityLabel = intl.string(t['0dOFq+']);
object7.accessibilityHint = intl.string(t.BGMUFB);
object7.accessibilityActions = items;
object7.onAccessibilityAction = Reflect.apply(useCallback, binding, [_fun123336, [onMoveUp, onMoveDown]]);
object7.delayLongPress = 100;
object7.activeOpacity = 0.8;
object7.hitSlop = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
copyDataProperties(object7, sortHandlers, undefined);
r24 = role.managed && !value6;
value9 = true;
value10 = false;
if (r24) {
r8 = value10;
r9 = value2;
r10 = object7;
r16 = value9;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
iconButton = <IconButton icon={((TrashIcon) => <TrashIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT} />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)} accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FiMFTZ,
{name: role.name})} size="sm" variant="destructive" onPress={onPress_123337} />;
r8 = value10;
r9 = iconButton;
r10 = object7;
r16 = value9;
}
}
} else {
value12 = false;
if (sorting) {
r8 = value12;
r9 = value2;
r10 = value2;
r16 = value12;
if (value3 != value5) {
r11 = value5;
} else {
r8 = true;
r9 = value2;
r10 = value2;
r16 = value12;
}
}
if (value3 != value5) {
r11 = value5;
} else {
tags = role.tags;
if (value3 === (value3 == tags ? value2 : tags.guild_connections)) {
r0 = ((Component) => <Component size={32} guildId={guildId} role={role} />)(importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */);
} else if (value4) {
colors = role.colors;
if (value3 == colors) {
r0 = <View style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}>{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
} else {
tags = role.tags;
if (value3 === (value3 == tags ? value2 : tags.guild_connections)) {
r0 = ((Component) => <Component size={32} guildId={guildId} role={role} />)(importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */);
} else if (value4) {
colors = role.colors;
if (value3 != colors.secondary_color) {
var viewBindingProps = {style: styles.container};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
colors = role.colors;
items3 = [colors.primary_color];
colors = role.colors;
items3[1] = colors.secondary_color;
colors = role.colors;
items3[2] = colors.tertiary_color;
r0 = <View {...viewBindingProps}>{((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123341)} start={{'x': 0,
'y': 0}} end={{'x': 1,
'y': 0}} style={styles.gradient} />)(defaultImport2)}{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
if (value3 == colors) {
r0 = (
<View
style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}
>
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
} else {
r0 = <View style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}>{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
colors = role.colors;
if (value3 != colors.secondary_color) {
var viewBindingProps = {style: styles.container};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
colors = role.colors;
items3 = [colors.primary_color];
colors = role.colors;
items3[1] = colors.secondary_color;
colors = role.colors;
items3[2] = colors.tertiary_color;
r0 = (
<View {...viewBindingProps}>
{((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123341)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} style={styles.gradient} />)(defaultImport2)}
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
} else {
r0 = (
<View
style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}
>
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
}
}
} else {
r0 = (
<View
style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}
>
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
}
r11 = r0;
}
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {onLongPress: onLongPress, onPress: sorting ? value2 : function() {
if (onPress != null) {
onPress(role);
}
}, disabled: sorting && !r16, draggable: r16, dragHandlePressableProps: r10, trailing: r9, arrow: r8};
if (isEveryoneRole) {
object4 = {};
object4.style = styles.everyone;
object4.children = ((GroupIcon) => <GroupIcon />)((require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon);
r8 = object4;
} else {
r8 = {children: r11};
}
tableRowProps.icon = <View {...r8} />;
const Text = (TextModule).Text;
const text = (
<Text
lineClamp={1}
style={styles.label}
variant="text-md/semibold"
color="interactive-text-active"
>
{role.name}
</Text>
);
tags = role.tags;
if (value3 != (value3 == tags ? value2 : tags.subscription_listing_id)) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16,
source: importDefault(8592) /* metro dependency 8592 */};
iconProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a2Ak8b);
iconProps.style = styles.sparkleIcon;
r14 = <Icon {...iconProps} />;
} else {
r14 = value3;
}
tableRowProps.label = (
<View style={styles.row}>
{text}
{r14}
{
locked
? ((LockIcon) => <LockIcon size="xxs" color="icon-subtle" />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)
: value3
}
</View>
);
tableRowProps.subLabel = isEveryoneRole ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['72gF3G']) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.AWmdd9,
{count: '' + numMembers});
tableRowProps.start = isFirstRole;
tableRowProps.end = isLastRole;
return <TableRow {...tableRowProps} />;
function _fun123336({nativeEvent}) { // fn#123336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:1381, offset: 0x0258900a, size: 87 bytes, params: 2, frame: 10
const actionName = nativeEvent.actionName;
if (actionName === 'moveup') {
if (onMoveUp != null) {
onMoveUp();
}
} else if (actionName === 'movedown') {
if (onMoveDown != null) {
onMoveDown();
}
}
} else {
r0 = <View style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}>{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
}
r11 = r0;
}
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {onLongPress: onLongPress, onPress: sorting ? value2 : function() {
if (onPress != null) {
onPress(role);
}
}, disabled: sorting && !r16, draggable: r16, dragHandlePressableProps: r10, trailing: r9, arrow: r8};
if (isEveryoneRole) {
object8 = {};
object8.style = styles.everyone;
object8.children = ((GroupIcon) => <GroupIcon />)((require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon);
r8 = object8;
} else {
r8 = {children: r11};
}
tableRowProps.icon = <View {...r8} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text lineClamp={1} style={styles.label} variant="text-md/semibold" color="interactive-text-active">{role.name}</Text>;
tags = role.tags;
if (value3 != (value3 == tags ? value2 : tags.subscription_listing_id)) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16,
source: importDefault(8592) /* metro dependency 8592 */};
iconProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a2Ak8b);
iconProps.style = styles.sparkleIcon;
r14 = <Icon {...iconProps} />;
} else {
r14 = value3;
}
tableRowProps.label = <View style={styles.row}>{text}{r14}{locked ? ((LockIcon) => <LockIcon size="xxs" color="icon-subtle" />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon) : value3}</View>;
tableRowProps.subLabel = isEveryoneRole ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['72gF3G']) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.AWmdd9,
{count: '' + numMembers});
tableRowProps.start = isFirstRole;
tableRowProps.end = isLastRole;
return <TableRow {...tableRowProps} />;
}
function _fun123336({nativeEvent}) { // fn#123336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:1381, offset: 0x0258900a, size: 87 bytes, params: 2, frame: 10
const actionName = nativeEvent.actionName;
if (actionName === 'moveup') {
if (onMoveUp != null) {
onMoveUp();
}
} else if (actionName === 'movedown') {
if (onMoveDown != null) {
onMoveDown();
}
}
}
function GuildSettingsRoleItemOnPress() { // fn#123337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2048, owner: GuildSettingsRoleItem.onPress, offset: 0x02589061, size: 323 bytes, params: 1, frame: 24
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FiMFTZ = t.FiMFTZ;
object2.title = Reflect.apply(formatToPlainString, intl, [FiMFTZ, {name: role.name}]);
object2.body = intl.string(t.qALKny);
object2.cancelText = intl.string(t.gm1Vej);
object2.confirmText = intl.string(t.p89ACt);
const env0_0 = env1_3(_fun123339);
object2.onConfirm = onConfirm_123340;
const Colors = (importDefault(4596) /* metro dependency 4596: Alert */).Colors;
const RED = Colors.RED;
object2.confirmColor = RED;
Reflect.apply(show, defaultImport, [object2]);
}
function _fun123341(a0) { // fn#123341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2827, offset: 0x0258923f, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
}
function* _fun123339() { // fn#123339, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2311, offset: 0x025891af, size: 144 bytes, params: 1, frame: 17
var value3;
var binding;
var value4;
var putRoleConnectionsConfigurations;
var value7;
if (true) {
value = environment.__proto__.__proto__;
if (View) {
value3 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
value4 = binding(env3_2[12]);
putRoleConnectionsConfigurations = value4.putRoleConnectionsConfigurations;
binding = env2_4;
yield Reflect.apply(putRoleConnectionsConfigurations, value4, [binding, require.id, []]);
if (false) {
return undefined;
function GuildSettingsRoleItemOnPress() { // fn#123337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2048, owner: GuildSettingsRoleItem.onPress, offset: 0x02589061, size: 323 bytes, params: 1, frame: 24
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const object = {};
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const FiMFTZ = t.FiMFTZ;
object.title = Reflect.apply(formatToPlainString, intl, [FiMFTZ, {name: role.name}]);
object.body = intl.string(t.qALKny);
object.cancelText = intl.string(t.gm1Vej);
object.confirmText = intl.string(t.p89ACt);
const env0_0 = env1_3(_fun123339);
object.onConfirm = onConfirm_123340;
const Colors = (Alert).Colors;
const RED = Colors.RED;
object.confirmColor = RED;
Reflect.apply(show, defaultImport, [object]);
function* _fun123339() { // fn#123339, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2311, offset: 0x025891af, size: 144 bytes, params: 1, frame: 17
var value3;
var binding;
var value4;
var putRoleConnectionsConfigurations;
var value7;
if (true) {
value = environment.__proto__.__proto__;
if (View) {
value3 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
value4 = binding(env3_2[12]);
putRoleConnectionsConfigurations = value4.putRoleConnectionsConfigurations;
binding = env2_4;
yield Reflect.apply(putRoleConnectionsConfigurations, value4, [binding, require.id, []]);
if (false) {
return undefined;
}
value7 = environment.__proto__.__proto__.__proto__;
}
var value8 = env3_1(env3_2[13]);
value8.deleteRole(env2_4, require.id);
}
}
value7 = environment.__proto__.__proto__.__proto__;
function onPressOnConfirm_123340() { // fn#123340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2418, owner: GuildSettingsRoleItem.onPress.onConfirm, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
var value8 = env3_1(env3_2[13]);
value8.deleteRole(env2_4, require.id);
function _fun123341(a0) { // fn#123341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2827, offset: 0x0258923f, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (ColorUtilsModule).int2hex(a0);
}
}
}
global.__d(_fun123334, 15959, [5, 31, 27, 661, 33, 4501, 697, 4573, 6630, 6793, 4496, 1244, 11374, 6593, 4596, 8341,
4071, 6812, 4589, 1360, 673, 9097, 6238, 6699, 1305, 8592, 6705,
2]) /* metro module 15959, dependencies: [5, 31, 27, 661, 33, 4501, 697, 4573, 6630, 6793, 4496, 1244, 11374, 6593, 4596, 8341, 4071, 6812, 4589, 1360, 673, 9097, 6238, 6699, 1305, 8592, 6705, 2] */;
@@ -1,6 +1,18 @@
/* Metro module 15972; source: modules/guild_settings/roles/native/GuildSettingsRoleMembers.tsx; dependencies: [57, 31, 27, 6737, 661, 33, 4501, 697, 3857, 8947, 1244, 15951, 6902, 566, 4647, 9112, 1305, 683, 4080, 15952, 1962, 12140, 8341, 6988, 6984, 4068, 4573, 6238, 10504, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildRoleMemberCountStore from '../../GuildRoleMemberCountStore.tsx'; /* Metro dependency 6737 */
import DetailedGuildIdentityUserRow from '../../native/DetailedGuildIdentityUserRow.tsx'; /* Metro dependency 12140 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as GuildSettingsRolesUtilsModule from '../GuildSettingsRolesUtils.tsx'; /* Metro dependency 15951 */
function _fun123482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:6, offset: 0x0258f5d8, size: 516 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const onMembersLoadFail = function() {
var defaultImport = importDefault(dependencyMap[8]);
@@ -10,198 +22,210 @@ function _fun123482(global, require, importDefault, importAll, module, exports,
};
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 guildRoleMemberCountStore = importDefault(6737) /* metro dependency 6737: GuildRoleMemberCountStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.container = {paddingHorizontal: PX_12, flex: 1};
object.container = {paddingHorizontal: PX_12, flex: 1};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.containerSearchBar = {paddingBottom: PX_12};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.borderWidth = 1;
object.containerSearchBar = {paddingBottom: PX_12};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.borderWidth = 1;
const ICON_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO;
object3.borderColor = ICON_FEEDBACK_INFO;
object4.borderColor = ICON_FEEDBACK_INFO;
const BACKGROUND_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_INFO;
object3.backgroundColor = BACKGROUND_FEEDBACK_INFO;
object4.backgroundColor = BACKGROUND_FEEDBACK_INFO;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.marginBottom = PX_16;
object4.marginBottom = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.padding = PX_8;
object3.flexDirection = 'row';
object3.alignItems = 'center';
object2.missingMembers = object3;
object4.padding = PX_8;
object4.flexDirection = 'row';
object4.alignItems = 'center';
object.missingMembers = object4;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.missingMembersText = {marginLeft: PX_8, flex: 1};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleMembers.tsx');
object.missingMembersText = {marginLeft: PX_8, flex: 1};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleMembers.tsx');
exports.default = GuildSettingsRoleMembers;
}
function GuildSettingsRoleMembers({guild, role, locked, contentContainerStyle}) { // fn#123484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:906, offset: 0x0258f855, size: 1015 bytes, params: 2, frame: 36
var r12;
var items3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const binding = env0_4;
const [property, property2] = env0_3(binding.useState(''), 2);
(require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useQueryGuildMembers(guild.id,
property.trim().toLowerCase());
const value6 = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useGuildRoleMembers(guild.id,
role.id, onMembersLoadFail);
const value7 = value6.filter(_fun123485);
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers({[guild.id]: value6.map(function(a0) {
return a0.id;
})}, 'GuildSettingsRoleMembers');
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value9 = Reflect.apply(useStateFromStores, fluxModule, [[GuildRoleMemberCountStore], _fun123487, [guild.id,
role.id]]) > value6.length;
const value10 = binding.useCallback(_fun123488, [guild.id, role.id, role.name]);
const value11 = binding.useCallback(_fun123492, [guild, role]);
const env0_6 = binding.useCallback(_fun123493, [value10, guild.id, locked, value7]);
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const view = <View style={styles.containerSearchBar}><SearchField onChange={property2} /></View>;
if (value9) {
var viewBinding2Props = {style: styles.missingMembers};
items3 = [((CircleInformationIcon) => <CircleInformationIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK} size="md" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)];
items3[1] = ((Text) => <Text style={styles.missingMembersText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RQxHZ8)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r12 = <View {...viewBinding2Props}>{items3}</View>;
} else {
r12 = null;
}
const items4 = [r12];
items4[1] = locked ? null : ((TableRow) => <TableRow arrow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZYOK46)} icon={((CirclePlusIcon) => <CirclePlusIcon size="md" />)((require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon)} onPress={value11} start end={value7.length === 0} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow);
items4[2] = value7.map(_fun123495);
return (
<View style={styles.container}>
{view}
<View style={contentContainerStyle}>
{items4}
function GuildSettingsRoleMembers({guild, role, locked, contentContainerStyle}) { // fn#123484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:906, offset: 0x0258f855, size: 1015 bytes, params: 2, frame: 36
var r12;
var items3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const [property, property2] = Module00057(ReactModule.useState(''), 2);
(GuildSettingsRolesUtilsModule).useQueryGuildMembers(guild.id,
property.trim().toLowerCase());
const value6 = (GuildSettingsRolesUtilsModule).useGuildRoleMembers(guild.id,
role.id, onMembersLoadFail);
const value7 = value6.filter(_fun123485);
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers({[guild.id]: value6.map(function(a0) {
return a0.id;
})}, 'GuildSettingsRoleMembers');
const useStateFromStores = FluxModule.useStateFromStores;
const value9 = Reflect.apply(useStateFromStores, FluxModule, [[GuildRoleMemberCountStore], _fun123487, [guild.id,
role.id]]) > value6.length;
const value10 = ReactModule.useCallback(_fun123488, [guild.id, role.id, role.name]);
const value11 = ReactModule.useCallback(_fun123492, [guild, role]);
const env0_6 = ReactModule.useCallback(_fun123493, [value10, guild.id, locked, value7]);
const SearchField = (SearchFieldNativeModule).SearchField;
const view = (
<View style={styles.containerSearchBar}>
<SearchField onChange={property2} />
</View>
</View>
);
}
);
if (value9) {
var viewBinding2Props = {style: styles.missingMembers};
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
items3 = [
<CircleInformationIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK} size="md" />,
];
items3[1] = ((Text) => <Text style={styles.missingMembersText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RQxHZ8)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r12 = (
<View {...viewBinding2Props}>
{items3}
</View>
);
} else {
r12 = null;
}
const items4 = [r12];
items4[1] = (
locked
? null
: ((TableRow) => <TableRow arrow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZYOK46)} icon={((CirclePlusIcon) => <CirclePlusIcon size="md" />)((require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon)} onPress={value11} start end={value7.length === 0} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)
);
items4[2] = value7.map(_fun123495);
return (
<View style={styles.container}>
{view}
<View style={contentContainerStyle}>
{items4}
</View>
</View>
);
function _fun123485({name}) { // fn#123485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1182, offset: 0x0258fc4c, size: 37 bytes, params: 2, frame: 11
return name.toLowerCase().includes(Module00057);
}
function _fun123485({name}) { // fn#123485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1182, offset: 0x0258fc4c, size: 37 bytes, params: 2, frame: 11
return name.toLowerCase().includes(env0_3);
}
function _fun123487() { // fn#123487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1349, offset: 0x0258fc71, size: 68 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildRoleMemberCountStore.getRoleMemberCount(guild.id)?.[role.id] ?? 0;
}
function _fun123487() { // fn#123487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1349, offset: 0x0258fc71, size: 68 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildRoleMemberCountStore.getRoleMemberCount(guild.id)?.[role.id] ?? 0;
}
function _fun123488(a0, a1) { // fn#123488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1476, offset: 0x0258fcb5, size: 373 bytes, params: 3, frame: 22
var environment;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var format;
var scORUv;
var object2;
var name;
const env0_0 = a0;
if (a1.filter(function(a0) {
return a0 !== role.id;
}).length !== a1.length) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t['7sFNfW']);
format = intl.format;
scORUv = t.scORUv;
object2 = {};
name = a0.name;
object2.username = name;
name = role.name;
object2.roleName = name;
object.body = Reflect.apply(format, intl, [scORUv, object2]);
object.cancelText = intl.string(t['ETE/oC']);
object.confirmText = intl.string(t.N86XcP);
object.onConfirm = onConfirm_123490;
object.hideActionSheet = false;
object.confirmColor = (require(1305) /* metro dependency 1305: native */).ButtonColors.RED;
Reflect.apply(show, defaultImport, [object]);
}
function onConfirm_123490() { // fn#123490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1802, offset: 0x0258fe3f, size: 112 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateMemberRoles,
value, [guild.id, env0_0.id, env0_1, [], [role.id]]);
value.catch(function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'ERROR_OCCURRED_TRY_AGAIN'};
object.content = require(dependencyMap[10]).intl.string(require(dependencyMap[10]).t.fEptJP);
object.icon = importDefault(dependencyMap[9]);
defaultImport.open(object);
});
}
}
function _fun123492() { // fn#123492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2083, offset: 0x0258ff28, size: 183 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {'type': 'Add Role Members', 'location_page': 'Role Settings',
'location_section': 'Members'}]);
const defaultImport2 = importDefault(dependencyMap[18]);
const openLazy = defaultImport2.openLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
const guildBinding = guild;
const id = guildBinding.id;
const roleBinding = role;
Reflect.apply(openLazy, defaultImport2, [value, 'role-add-members-' + id + '-' + roleBinding.id,
{guild: guildBinding, role: roleBinding}]);
}
function _fun123493({item, index}) { // fn#123493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2323, offset: 0x0258ffdf, size: 300 bytes, params: 2, frame: 25
var environment;
var r5;
var IconButton;
var intl;
const value = environment.__proto__;
const defaultImportProps2 = {end: index === ReactModule.length - 1, start: index === 0 && locked, guildId: guild.id};
const user = item.user;
defaultImportProps2.userId = user.id;
if (locked) {
r5 = null;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
var iconButtonProps = {icon: ((CircleXIcon) => <CircleXIcon />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7sFNfW']);
iconButtonProps.accessibilityRole = 'button';
iconButtonProps.onPress = onPress_123494;
iconButtonProps.variant = 'icon-only';
r5 = <IconButton {...iconButtonProps} />;
}
defaultImportProps2.trailing = r5;
return <DetailedGuildIdentityUserRow {...defaultImportProps2} key={item.id} />;
function onPress_123494() { // fn#123494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2591, offset: 0x0259010b, size: 30 bytes, params: 1, frame: 13
const binding = env1_5;
const itemBinding = item;
return binding(itemBinding, itemBinding.roles);
}
}
function _fun123495(a0, a1) { // fn#123495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:3221, offset: 0x02590129, size: 32 bytes, params: 3, frame: 11
return env0_6({item: a0, index: a1});
}
function _fun123488(a0, a1) { // fn#123488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1476, offset: 0x0258fcb5, size: 373 bytes, params: 3, frame: 22
var environment;
var defaultImport;
var show;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var format;
var scORUv;
var object4;
var name;
const env0_0 = a0;
if (a1.filter(function(a0) {
return a0 !== role.id;
}).length !== a1.length) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object3 = {};
object3.title = intl.string(t['7sFNfW']);
format = intl.format;
scORUv = t.scORUv;
object4 = {};
name = a0.name;
object4.username = name;
name = role.name;
object4.roleName = name;
object3.body = Reflect.apply(format, intl, [scORUv, object4]);
object3.cancelText = intl.string(t['ETE/oC']);
object3.confirmText = intl.string(t.N86XcP);
object3.onConfirm = onConfirm_123490;
object3.hideActionSheet = false;
object3.confirmColor = (require(1305) /* metro dependency 1305: native */).ButtonColors.RED;
Reflect.apply(show, defaultImport, [object3]);
}
}
function _fun123492() { // fn#123492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2083, offset: 0x0258ff28, size: 183 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {'type': 'Add Role Members', 'location_page': 'Role Settings',
'location_section': 'Members'}]);
const defaultImport2 = importDefault(dependencyMap[18]);
const openLazy = defaultImport2.openLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
const guildBinding = guild;
const id = guildBinding.id;
const roleBinding = role;
Reflect.apply(openLazy, defaultImport2, [value, 'role-add-members-' + id + '-' + roleBinding.id,
{guild: guildBinding, role: roleBinding}]);
}
function _fun123493({item, index}) { // fn#123493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2323, offset: 0x0258ffdf, size: 300 bytes, params: 2, frame: 25
var environment;
var r5;
var IconButton;
var intl;
const value = environment.__proto__;
const DetailedGuildIdentityUserRow = importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */;
const defaultImportProps2 = {end: index === env0_4.length - 1, start: index === 0 && locked, guildId: guild.id};
const user = item.user;
defaultImportProps2.userId = user.id;
if (locked) {
r5 = null;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
var iconButtonProps = {icon: ((CircleXIcon) => <CircleXIcon />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7sFNfW']);
iconButtonProps.accessibilityRole = 'button';
iconButtonProps.onPress = onPress_123494;
iconButtonProps.variant = 'icon-only';
r5 = <IconButton {...iconButtonProps} />;
}
defaultImportProps2.trailing = r5;
return <DetailedGuildIdentityUserRow {...defaultImportProps2} key={item.id} />;
}
function _fun123495(a0, a1) { // fn#123495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:3221, offset: 0x02590129, size: 32 bytes, params: 3, frame: 11
return env0_6({item: a0, index: a1});
}
function onConfirm_123490() { // fn#123490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1802, offset: 0x0258fe3f, size: 112 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateMemberRoles,
value, [guild.id, env0_0.id, env0_1, [], [role.id]]);
value.catch(function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'ERROR_OCCURRED_TRY_AGAIN'};
object.content = require(dependencyMap[10]).intl.string(require(dependencyMap[10]).t.fEptJP);
object.icon = importDefault(dependencyMap[9]);
defaultImport.open(object);
});
}
function onPress_123494() { // fn#123494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2591, offset: 0x0259010b, size: 30 bytes, params: 1, frame: 13
const binding = env1_5;
const itemBinding = item;
return binding(itemBinding, itemBinding.roles);
}
global.__d(_fun123482, 15972, [57, 31, 27, 6737, 661, 33, 4501, 697, 3857, 8947, 1244, 15951, 6902, 566, 4647, 9112,
1305, 683, 4080, 15952, 1962, 12140, 8341, 6988, 6984, 4068, 4573, 6238, 10504,
2]) /* metro module 15972, dependencies: [57, 31, 27, 6737, 661, 33, 4501, 697, 3857, 8947, 1244, 15951, 6902, 566, 4647, 9112, 1305, 683, 4080, 15952, 1962, 12140, 8341, 6988, 6984, 4068, 4573, 6238, 10504, 2] */;
@@ -1,18 +1,31 @@
/* Metro module 15950; source: modules/guild_settings/roles/native/GuildSettingsRoleTemplate.tsx; dependencies: [57, 31, 27, 4502, 1867, 15946, 661, 33, 4501, 697, 7556, 683, 4863, 7992, 5278, 4573, 12812, 1305, 11365, 4578, 1244, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseIsWindowLarge from '../../../screen/native/useIsWindowLarge.tsx'; /* Metro dependency 7556 */
import Module07992 from '../../../../by-id/module-07992.jsx'; /* Metro dependency 7992 */
import Module11365 from '../../../../by-id/module-11365.js'; /* Metro dependency 11365 */
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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as AppAnalyticsUtilsModule from '../../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun123258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:6, offset: 0x02585bb9, size: 731 bytes, params: 8, frame: 23
var object2;
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const Dimensions = value.Dimensions;
const env0_6 = value.AccessibilityInfo;
const env0_7 = value.ScrollView;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
value = require(15946) /* metro dependency 15946: GuildSettingsRoleConstants */;
const env0_10 = value.PermissionTemplateTypes;
const env0_11 = value.PermissionTemplates;
@@ -27,218 +40,276 @@ function _fun123258(global, require, importDefault, importAll, module, exports,
const env0_18 = Reflect.apply(get, Dimensions, ['window']).width - 300;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
object2.carousel = {flex: 1};
object2.cardWrapper = {'paddingHorizontal': 10, 'flex': 1};
const object3 = {'backgroundColor': null, 'borderColor': null, 'borderRadius': null, 'borderStyle': 'solid',
object.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
object.carousel = {flex: 1};
object.cardWrapper = {'paddingHorizontal': 10, 'flex': 1};
const object4 = {'backgroundColor': null, 'borderColor': null, 'borderRadius': null, 'borderStyle': 'solid',
'borderWidth': 1, 'flex': 1, 'flexDirection': 'column', 'marginVertical': 16, 'padding': 16, 'paddingTop': 20};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.borderColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.card = object3;
object2.templateTitle = {'alignItems': 'center', 'textAlign': 'center', 'paddingBottom': 16};
object2.templateSubtitle = {paddingBottom: 16};
object2.templateContentWrapper = {'flex': 1, 'justifyContent': 'flex-start'};
object2.templateContent = {'alignItems': 'center', 'flexDirection': 'row', 'paddingBottom': 8};
object2.templateContentText = {'flex': 1, 'marginLeft': 12};
object2.templateButton = {'justifyContent': 'flex-end', 'flexGrow': 0, 'paddingTop': 16};
object2.sliderContainer = {alignItems: 'center'};
object2.slider = {'marginTop': 8, 'width': 300, 'maxWidth': '72%'};
object2.sliderLabels = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
object4.borderColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.card = object4;
object.templateTitle = {'alignItems': 'center', 'textAlign': 'center', 'paddingBottom': 16};
object.templateSubtitle = {paddingBottom: 16};
object.templateContentWrapper = {'flex': 1, 'justifyContent': 'flex-start'};
object.templateContent = {'alignItems': 'center', 'flexDirection': 'row', 'paddingBottom': 8};
object.templateContentText = {'flex': 1, 'marginLeft': 12};
object.templateButton = {'justifyContent': 'flex-end', 'flexGrow': 0, 'paddingTop': 16};
object.sliderContainer = {alignItems: 'center'};
object.slider = {'marginTop': 8, 'width': 300, 'maxWidth': '72%'};
object.sliderLabels = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
'marginBottom': 16, 'textAlign': 'center', 'width': 380, 'maxWidth': '85%'};
object2.sliderLabel = {'marginHorizontal': 0, 'width': '25%', 'textAlign': 'center', 'alignItems': 'center'};
const env0_19 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleTemplate.tsx');
object.sliderLabel = {'marginHorizontal': 0, 'width': '25%', 'textAlign': 'center', 'alignItems': 'center'};
const env0_19 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleTemplate.tsx');
exports.default = GuildSettingsRoleTemplate;
}
function GuildSettingsRoleTemplate({onSelect, location, guildId}) { // fn#123259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1581, offset: 0x02585e94, size: 721 bytes, params: 2, frame: 35
const closure = onSlidingComplete;
const styles = useStyles();
const env0_3 = styles;
const value2 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const binding = undefined;
const value3 = binding.useRef(null);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [DEFAULT_TEMPLATE_TYPE]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [width]), 2);
const property2 = value6[0];
const env0_8 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [env0_18]), 2);
const property3 = value7[0];
const env0_9 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value8[0];
const env0_10 = value8[1];
binding.useEffect(_fun123261, []);
const Object = global.Object;
const value9 = Object.values(PermissionTemplates);
const viewBindingProps = {style: styles.container, onLayout: onLayout_123263};
const defaultImport = importDefault(7992) /* metro dependency 7992 */;
const COSMETIC = PermissionTemplateTypes.COSMETIC;
let view = <View accessible={false} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{((Component) => <Component maximumValue={value9.length - 1} minimumTrackTintColor={value9[property].color} minimumValue={COSMETIC} onSlidingComplete={closure} style={styles.slider} thumbTintColor={value9[property].color} value={property} accessible={false} accessibilityElementsHidden importantForAccessibility="no" />)(defaultImport)}</View>;
view = <View style={styles.sliderContainer}>{view}<View style={styles.sliderLabels}>{value9.map(_fun123264)}</View></View>;
return (
<View {...viewBindingProps}>
{view}
{((Component) => <Component data={value9} firstItem={0} inactiveSlideScale={1} inactiveSlideOpacity={value2 ? 0.3 : 0.7} itemWidth={property2 - property3} onBeforeSnapToItem={onBeforeSnapToItem} enableMomentum decelerationRate={0.9} ref={value3} renderItem={renderItem_123267} sliderWidth={property2} style={styles.carousel} scrollEnabled={!property4} />)(importDefault(12812) /* metro dependency 12812 */)}
</View>
);
}
function GuildSettingsRoleTemplateOnSlidingComplete(a0) { // fn#123260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1848, owner: GuildSettingsRoleTemplate.onSlidingComplete, offset: 0x02586165, size: 105 bytes, params: 2, frame: 15
var current;
var snapToItem;
var value5;
const Math = global.Math;
const value = Math.round(a0);
env0_6(value);
if (env0_4 != null && env0_4.current != null) {
current = env0_4.current;
snapToItem = current.snapToItem;
value5 = environment.__proto__;
Reflect.apply(snapToItem, current, [value, !AccessibilityStore.useReducedMotion]);
}
}
function _fun123261() { // fn#123261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1980, offset: 0x025861ce, size: 40 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
AccessibilityInfo.isScreenReaderEnabled().then(_fun123262);
}
function GuildSettingsRoleTemplateOnLayout({nativeEvent}) { // fn#123263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2097, owner: GuildSettingsRoleTemplate.onLayout, offset: 0x02586209, size: 65 bytes, params: 2, frame: 12
const width = nativeEvent.layout.width;
if (width !== env0_7) {
env0_8(width);
env0_9(width - 300);
}
}
function _fun123264({title}, a1) { // fn#123264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2616, offset: 0x0258624a, size: 186 bytes, params: 3, frame: 23
const env0_0 = a1;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {selected: env0_5 === a1};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.sliderLabel} key={title()}>
<PressableOpacity
accessibilityRole="button"
accessibilityState={object}
onPress={function() {
onSlidingComplete(require);
}}
function GuildSettingsRoleTemplate({onSelect, location, guildId}) { // fn#123259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1581, offset: 0x02585e94, size: 721 bytes, params: 2, frame: 35
const onSlidingComplete_1232602 = onSlidingComplete_123260;
const styles = useStyles();
const styles2 = styles;
const value2 = (UseIsWindowLarge)();
const binding = undefined;
const value3 = binding.useRef(null);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [DEFAULT_TEMPLATE_TYPE]);
const binding2 = styles2;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [width]), 2);
const property2 = value6[0];
const env0_8 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [env0_18]), 2);
const property3 = value7[0];
const env0_9 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value8[0];
const env0_10 = value8[1];
binding.useEffect(_fun123261, []);
const Object = global.Object;
const value9 = Object.values(PermissionTemplates);
const viewBindingProps = {style: styles.container, onLayout: onLayout_123263};
const defaultImport = Module07992;
const COSMETIC = PermissionTemplateTypes.COSMETIC;
let view = (
<View
accessible={false}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
>
<Text variant="text-sm/medium">
{title()}
</Text>
</PressableOpacity>
</View>
);
}
function GuildSettingsRoleTemplateRenderItem(a0) { // fn#123267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3054, owner: GuildSettingsRoleTemplate.renderItem, offset: 0x0258631b, size: 619 bytes, params: 2, frame: 31
const item = a0.item;
const value2 = a0.index === env0_5;
const value3 = item.contentPreface();
const value5 = !value2;
const r5 = value2 ? undefined : !value5;
const r0 = value2 ? 'yes' : 'no-hide-descendants';
const stylesBinding = styles;
const cardWrapper = stylesBinding.cardWrapper;
const card = stylesBinding.card;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text style={stylesBinding.templateTitle} variant="heading-lg/extrabold">{item.title()}</Text>];
items2[1] = <Text style={stylesBinding.templateSubtitle} variant="text-sm/medium">{item.description()}</Text>;
const templateContentWrapper = stylesBinding.templateContentWrapper;
const value11 = null;
items2[2] = <View style={templateContentWrapper}>{value11 != value3 ? value3 === '' ? value11 : <Text style={styles.templateSubtitle} variant="text-sm/medium">{item.contentPreface()}</Text> : value11}<View accessibilityRole="list">{item.contents().map(_fun123268)}</View></View>;
const scrollView = <ScrollView>{items2}</ScrollView>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View
accessible={r5}
accessibilityElementsHidden={value5}
importantForAccessibility={r0}
style={cardWrapper}
>
<View style={card}>
{scrollView}
<View style={styles.templateButton}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mQS8Is)}
onPress={onPress_123269}
/>
{((Component) => <Component maximumValue={value9.length - 1} minimumTrackTintColor={value9[property].color} minimumValue={COSMETIC} onSlidingComplete={onSlidingComplete_1232602} style={styles.slider} thumbTintColor={value9[property].color} value={property} accessible={false} accessibilityElementsHidden importantForAccessibility="no" />)(defaultImport)}
</View>
);
view = (
<View style={styles.sliderContainer}>
{view}
<View style={styles.sliderLabels}>
{value9.map(_fun123264)}
</View>
</View>
</View>
);
}
function _fun123262(a0) { // fn#123262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2017, offset: 0x025861f6, size: 19 bytes, params: 2, frame: 11
env1_10(a0);
}
function _fun123268(a0, a1) { // fn#123268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3714, offset: 0x02586586, size: 263 bytes, params: 3, frame: 23
const value = environment.__proto__.__proto__;
const stylesBinding = styles;
const templateContent = stylesBinding.templateContent;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11365) /* metro dependency 11365 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const MEDIUM = IconSizes.MEDIUM;
iconProps.size = MEDIUM;
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
iconProps.color = GREEN_360;
const items2 = [<Icon {...iconProps} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={stylesBinding.templateContentText} variant="text-sm/medium">{a0}</Text>;
return (
<View style={templateContent} key={'' + item.key + '_content_' + a1}>
{items2}
</View>
);
}
function renderItemOnPress_123269() { // fn#123269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:4096, owner: GuildSettingsRoleTemplate.renderItem.onPress, offset: 0x0258668d, size: 203 bytes, params: 1, frame: 21
var features;
const {permissions, communityPermissions, key} = item;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ROLE_TEMPLATE_SELECTED = AnalyticEvents.ROLE_TEMPLATE_SELECTED;
const object2 = {};
object2.location_page = location;
object2.template_name = key;
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = appAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const guildIdBinding = guildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, appAnalyticsUtilsModule, [guildIdBinding]),
appAnalyticsUtilsModule);
Reflect.apply(track, defaultImport, [ROLE_TEMPLATE_SELECTED, object2]);
const guild = GuildStore.getGuild(guildIdBinding);
if (guild != null) {
features = guild.features;
if (features.has(GuildFeatures.COMMUNITY)) {
if (communityPermissions != null) {
onSelect(communityPermissions);
} else {
onSelect(permissions);
);
return (
<View {...viewBindingProps}>
{view}
{((Component) => <Component data={value9} firstItem={0} inactiveSlideScale={1} inactiveSlideOpacity={value2 ? 0.3 : 0.7} itemWidth={property2 - property3} onBeforeSnapToItem={onBeforeSnapToItem} enableMomentum decelerationRate={0.9} ref={value3} renderItem={renderItem_123267} sliderWidth={property2} style={styles.carousel} scrollEnabled={!property4} />)(importDefault(12812) /* metro dependency 12812 */)}
</View>
);
function GuildSettingsRoleTemplateOnSlidingComplete(a0) { // fn#123260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1848, owner: GuildSettingsRoleTemplate.onSlidingComplete, offset: 0x02586165, size: 105 bytes, params: 2, frame: 15
var current;
var snapToItem;
var value5;
const Math = global.Math;
const value = Math.round(a0);
env0_6(value);
if (ReactModule != null && ReactModule.current != null) {
current = ReactModule.current;
snapToItem = current.snapToItem;
value5 = environment.__proto__;
Reflect.apply(snapToItem, current, [value, !AccessibilityStore.useReducedMotion]);
}
} else {
onSelect(permissions);
}
function _fun123261() { // fn#123261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1980, offset: 0x025861ce, size: 40 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
AccessibilityInfo.isScreenReaderEnabled().then(_fun123262);
function _fun123262(a0) { // fn#123262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2017, offset: 0x025861f6, size: 19 bytes, params: 2, frame: 11
env1_10(a0);
}
}
function GuildSettingsRoleTemplateOnLayout({nativeEvent}) { // fn#123263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2097, owner: GuildSettingsRoleTemplate.onLayout, offset: 0x02586209, size: 65 bytes, params: 2, frame: 12
const width = nativeEvent.layout.width;
if (width !== env0_7) {
env0_8(width);
env0_9(width - 300);
}
}
function _fun123264({title}, a1) { // fn#123264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2616, offset: 0x0258624a, size: 186 bytes, params: 3, frame: 23
const env0_0 = a1;
const PressableOpacity = (PressablesModule).PressableOpacity;
const object2 = {selected: env0_5 === a1};
const Text = (TextModule).Text;
return (
<View style={styles.sliderLabel} key={title()}>
<PressableOpacity
accessibilityRole="button"
accessibilityState={object2}
onPress={function() {
onSlidingComplete_123260(require);
}}
>
<Text variant="text-sm/medium">
{title()}
</Text>
</PressableOpacity>
</View>
);
}
function onBeforeSnapToItem(a0) { // fn#123266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2981, owner: GuildSettingsRoleTemplate.onBeforeSnapToItem, offset: 0x01fc7eff, size: 19 bytes, params: 2, frame: 11
env0_6(a0);
}
function GuildSettingsRoleTemplateRenderItem(a0) { // fn#123267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3054, owner: GuildSettingsRoleTemplate.renderItem, offset: 0x0258631b, size: 619 bytes, params: 2, frame: 31
const item = a0.item;
const value2 = a0.index === env0_5;
const value3 = item.contentPreface();
const value5 = !value2;
const r5 = value2 ? undefined : !value5;
const r0 = value2 ? 'yes' : 'no-hide-descendants';
const stylesBinding = styles;
const cardWrapper = stylesBinding.cardWrapper;
const card = stylesBinding.card;
const Text = (TextModule).Text;
const items2 = [
<Text style={stylesBinding.templateTitle} variant="heading-lg/extrabold">
{item.title()}
</Text>,
];
items2[1] = (
<Text style={stylesBinding.templateSubtitle} variant="text-sm/medium">
{item.description()}
</Text>
);
const templateContentWrapper = stylesBinding.templateContentWrapper;
const value11 = null;
items2[2] = (
<View style={templateContentWrapper}>
{
value11 != value3
? (
value3 === ''
? value11
: (
<Text style={styles.templateSubtitle} variant="text-sm/medium">
{item.contentPreface()}
</Text>
)
)
: value11
}
<View accessibilityRole="list">
{item.contents().map(_fun123268)}
</View>
</View>
);
const scrollView = (
<ScrollView>
{items2}
</ScrollView>
);
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
return (
<View
accessible={r5}
accessibilityElementsHidden={value5}
importantForAccessibility={r0}
style={cardWrapper}
>
<View style={card}>
{scrollView}
<View style={styles.templateButton}>
<Button
text={intl.string((IndexNativeModule).t.mQS8Is)}
onPress={onPress_123269}
/>
</View>
</View>
</View>
);
function _fun123268(a0, a1) { // fn#123268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3714, offset: 0x02586586, size: 263 bytes, params: 3, frame: 23
const value = environment.__proto__.__proto__;
const stylesBinding = styles;
const templateContent = stylesBinding.templateContent;
const Icon = (NativeModule).Icon;
const iconProps = {source: Module11365};
const IconSizes = (NativeModule).IconSizes;
const MEDIUM = IconSizes.MEDIUM;
iconProps.size = MEDIUM;
const GREEN_360 = (Native).unsafe_rawColors.GREEN_360;
iconProps.color = GREEN_360;
const items2 = [
<Icon {...iconProps} />,
];
const Text = (TextModule).Text;
items2[1] = (
<Text style={stylesBinding.templateContentText} variant="text-sm/medium">
{a0}
</Text>
);
return (
<View style={templateContent} key={'' + item.key + '_content_' + a1}>
{items2}
</View>
);
}
function renderItemOnPress_123269() { // fn#123269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:4096, owner: GuildSettingsRoleTemplate.renderItem.onPress, offset: 0x0258668d, size: 203 bytes, params: 1, frame: 21
var features;
const {permissions, communityPermissions, key} = item;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const ROLE_TEMPLATE_SELECTED = AnalyticEvents.ROLE_TEMPLATE_SELECTED;
const object = {};
object.location_page = location;
object.template_name = key;
const collectGuildAnalyticsMetadata = AppAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const guildIdBinding = guildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, AppAnalyticsUtilsModule, [guildIdBinding]),
AppAnalyticsUtilsModule);
Reflect.apply(track, defaultImport, [ROLE_TEMPLATE_SELECTED, object]);
const guild = GuildStore.getGuild(guildIdBinding);
if (guild != null) {
features = guild.features;
if (features.has(GuildFeatures.COMMUNITY)) {
if (communityPermissions != null) {
onSelect(communityPermissions);
} else {
onSelect(permissions);
}
} else {
onSelect(permissions);
}
}
}
}
}
}
global.__d(_fun123258, 15950, [57, 31, 27, 4502, 1867, 15946, 661, 33, 4501, 697, 7556, 683, 4863, 7992, 5278, 4573,
12812, 1305, 11365, 4578, 1244,
2]) /* metro module 15950, dependencies: [57, 31, 27, 4502, 1867, 15946, 661, 33, 4501, 697, 7556, 683, 4863, 7992, 5278, 4573, 12812, 1305, 11365, 4578, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,23 +1,28 @@
/* Metro module 15943; source: modules/guild_settings/roles/native/GuildSettingsRolesManager.tsx; dependencies: [629, 690, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun123119(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:6, offset: 0x0258176a, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function() {
return {roleJustCreated: false};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRolesManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRolesManager.tsx');
exports.setRoleJustCreated = setRoleJustCreated;
exports.useGuildSettingsRolesManagerState = value;
function setRoleJustCreated(a0) { // fn#123121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:271, offset: 0x025817fb, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun123122);
function _fun123122() { // fn#123122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:324, offset: 0x02581831, size: 34 bytes, params: 1, frame: 12
return env1_2.setState({roleJustCreated: env0_0});
}
}
}
function setRoleJustCreated(a0) { // fn#123121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:271, offset: 0x025817fb, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun123122);
}
function _fun123122() { // fn#123122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:324, offset: 0x02581831, size: 34 bytes, params: 1, frame: 12
return env1_2.setState({roleJustCreated: env0_0});
}
global.__d(_fun123119, 15943, [629, 690, 2]) /* metro module 15943, dependencies: [629, 690, 2] */;
@@ -1,72 +1,100 @@
/* Metro module 15968; source: modules/guild_settings/roles/native/InRolePromptNotice.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1391, 15969, 1305, 9149, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as 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 FlagUtilsModule from '../../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun123453(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16176:6, offset: 0x0258e123, size: 342 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).RoleFlags;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.paddingBottom = PX_4;
object4.flexDirection = 'row';
object4.alignItems = 'center';
object3.promptRow = object4;
object2.paddingBottom = PX_4;
object2.flexDirection = 'row';
object2.alignItems = 'center';
object.promptRow = object2;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.promptText = {marginLeft: PX_4};
object3.icon = {'height': 16, 'width': 16};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/InRolePromptNotice.tsx');
object.promptText = {marginLeft: PX_4};
object.icon = {'height': 16, 'width': 16};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/InRolePromptNotice.tsx');
exports.default = _default_123454;
}
function _default_123454({role}) { // fn#123454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16176:393, offset: 0x0258e279, size: 514 bytes, params: 2, frame: 26
var r1;
var r0;
var isRolePowerful2;
var object2;
var Icon;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var value;
const styles = useStyles();
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = role.flags;
const IN_PROMPT = RoleFlags.IN_PROMPT;
if (Reflect.apply(hasFlag, flagUtilsModule, [flags, IN_PROMPT])) {
isRolePowerful2 = (require(15969) /* metro dependency 15969: GuildSettingsUtils */).isRolePowerful(role);
object2 = {};
object2.style = styles.promptRow;
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
if (isRolePowerful2) {
value = <Icon style={styles.icon} source={importDefault(9149) /* metro dependency 9149 */} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300} />;
items2 = [value];
items2[1] = <Text style={styles.promptText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YRbgXz)}</Text>;
value = <View {...object2}>{items2}</View>;
r1 = value;
function _default_123454({role}) { // fn#123454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16176:393, offset: 0x0258e279, size: 514 bytes, params: 2, frame: 26
var r1;
var r0;
var isRolePowerful2;
var object;
var Icon;
var items3;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var value;
const styles = useStyles();
const hasFlag = FlagUtilsModule.hasFlag;
const flags = role.flags;
const IN_PROMPT = RoleFlags.IN_PROMPT;
if (Reflect.apply(hasFlag, FlagUtilsModule, [flags, IN_PROMPT])) {
isRolePowerful2 = (require(15969) /* metro dependency 15969: GuildSettingsUtils */).isRolePowerful(role);
object = {};
object.style = styles.promptRow;
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
if (isRolePowerful2) {
value = (
<Icon
style={styles.icon}
source={importDefault(9149) /* metro dependency 9149 */}
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300}
/>
);
items2 = [value];
items2[1] = (
<Text style={styles.promptText} variant="text-sm/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YRbgXz)}
</Text>
);
value = (
<View {...object}>
{items2}
</View>
);
r1 = value;
} else {
value = <Icon style={styles.icon} source={importDefault(9149) /* metro dependency 9149 */} />;
items3 = [value];
items3[1] = (
<Text style={styles.promptText} variant="text-sm/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mqeO2v)}
</Text>
);
value = (
<View {...object}>
{items3}
</View>
);
r1 = value;
}
r0 = r1;
} else {
value = <Icon style={styles.icon} source={importDefault(9149) /* metro dependency 9149 */} />;
items3 = [value];
items3[1] = <Text style={styles.promptText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mqeO2v)}</Text>;
value = <View {...object2}>{items3}</View>;
r1 = value;
r0 = null;
}
r0 = r1;
} else {
r0 = null;
return r0;
}
return r0;
}
global.__d(_fun123453, 15968, [31, 27, 661, 33, 4501, 697, 1391, 15969, 1305, 9149, 4573, 1244,
2]) /* metro module 15968, dependencies: [31, 27, 661, 33, 4501, 697, 1391, 15969, 1305, 9149, 4573, 1244, 2] */;
@@ -1,317 +1,380 @@
/* Metro module 15952; source: modules/guild_settings/roles/native/action_sheet/AddMembersActionSheet.tsx; dependencies: [29, 57, 31, 27, 15946, 33, 4501, 697, 3874, 12140, 7974, 5463, 4100, 1305, 3869, 1244, 8416, 9100, 6592, 15951, 21, 9105, 6902, 6275, 6758, 4578, 9112, 4080, 4573, 2] */
import SnowflakeUtils from '../../../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import ObjectWithoutProperties from '../../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import GuildUtils from '../../../../../utils/GuildUtils.tsx'; /* Metro dependency 6592 */
import TagListInputNative from '../../../../../design/components/TagListInput/native/TagListInput.native.tsx'; /* Metro dependency 9100 */
import DetailedGuildIdentityUserRow from '../../../native/DetailedGuildIdentityUserRow.tsx'; /* Metro dependency 12140 */
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 IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseA11yRolesNativeModule from '../../../../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as SubscribeGuildMembersModule from '../../../../../lib/guild/subscribeGuildMembers.tsx'; /* Metro dependency 6902 */
import * as FormCheckboxNativeModule from '../../../../../design/components/Forms/native/FormCheckbox.native.tsx'; /* Metro dependency 7974 */
import * as FlashListModule from '../../../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as GuildSettingsRoleConstantsModule from '../../GuildSettingsRoleConstants.tsx'; /* Metro dependency 15946 */
import * as GuildSettingsRolesUtilsModule from '../../GuildSettingsRolesUtils.tsx'; /* Metro dependency 15951 */
function _fun123288(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:6, offset: 0x02586f66, size: 500 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const closure = AddMembersBody_123291;
const AddMembersBody_1232912 = AddMembersBody_123291;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const env0_7 = (require(15946) /* metro dependency 15946: GuildSettingsRoleConstants */).MAX_BULK_ROLE_MEMBERS_ADD;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingTop = PX_12;
object2.inputContainer = object5;
const object6 = {'width': 16, 'height': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.tagAvatar = object6;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.emptyStateText = {color: TEXT_DEFAULT};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.addMembersDescription = {marginHorizontal: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/AddMembersActionSheet.tsx');
exports.default = AddMembersActionSheet_123304;
exports.AddMembersBody = closure;
}
function MemberRow_123290({start, end, guildId, userId, onPress, disabled, checked}) { // fn#123290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:943, offset: 0x0258715a, size: 200 bytes, params: 2, frame: 25
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: checked,
disabled: disabled});
const DetailedGuildIdentityUserRow = importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */;
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
return (
<DetailedGuildIdentityUserRow
start={start}
end={end}
guildId={guildId}
userId={userId}
onPress={onPress}
disabled={disabled}
trailing={<FormCheckbox checked={checked} />}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
);
}
function AddMembersBody_123291({guild, role, members, pendingAdditions, setPendingAdditions, autoFocusSearch, inActionSheet, maxCount}) { // fn#123291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1298, offset: 0x02587222, size: 898 bytes, params: 2, frame: 36
var r5;
var object;
var space;
var PX_12;
var EmptyState;
const styles = useStyles();
const [property, env0_8] = setPendingAdditions(maxCount.useState(''), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: !inActionSheet}).insets;
const value5 = maxCount.useMemo(function() {
var env0_0 = _fun123293;
return members.filter(_fun123294);
}, [members, property]);
maxCount.useEffect(_fun123295, [value5.length, property]);
const flashListModule = require(8416) /* metro dependency 8416: flashList */;
const r7 = inActionSheet ? flashListModule.BottomSheetFlashList : flashListModule.FlashList;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const TagListInputNative = importDefault(9100) /* metro dependency 9100: TagListInputNative */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const vMiCaQ = (require(1244) /* metro dependency 1244: indexNative */).t.vMiCaQ;
const Object = global.Object;
const view = <View style={styles.inputContainer}><TagListInputNative placeholder={Reflect.apply(string, intl,
[vMiCaQ])} tags={Object.values(pendingAdditions).map(function(a0) {
var display = a0.display;
var id = a0.row.id;
var object = {};
copyDataProperties(object, display, id);
object['id'] = id;
return object;
})} onChangeText={onChangeText} onRemove={onRemove} autoFocus={autoFocusSearch} inActionSheet={inActionSheet} /></View>;
if (value5.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = <EmptyState Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt} bodyStyle={styles.emptyStateText} body={property !== '' ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ErpIY3,
{query: property}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oB9grQ)} />;
} else {
object = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.paddingHorizontal = space.PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object.paddingTop = PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object.paddingBottom = PX_12 + (inActionSheet ? insets.bottom : 0);
r5 = ((Component) => <Component contentContainerStyle={object} renderItem={renderItem_123300} data={value5} estimatedItemSize={56} extraData={pendingAdditions} keyboardShouldPersistTaps="always" />)(r7);
}
return (
<>
{view}
{r5}
</>
);
}
function AddMembersActionSheet_123304({guild, role}) { // fn#123304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3357, offset: 0x025879d4, size: 762 bytes, params: 2, frame: 34
var object4;
const styles = useStyles();
let binding = env0_5;
const [property, property2] = env0_4(binding.useState({}), 2);
binding = env0_5;
const useCallback = binding.useCallback;
let id = role.id;
const value5 = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useGuildMembers(guild.id,
Reflect.apply(useCallback, binding, [function({roles}) {
return !roles.includes(role.id);
}, [id]]));
const subscribeGuildMembersModule = require(6902) /* metro dependency 6902: subscribeGuildMembers */;
const useSubscribeGuildMembers = subscribeGuildMembersModule.useSubscribeGuildMembers;
id = guild.id;
let Object = global.Object;
Reflect.apply(useSubscribeGuildMembers, subscribeGuildMembersModule, [{[id]: Object.keys(property)},
'AddMembersActionSheet']);
Object = global.Object;
const r12 = Object.keys(property).length === 0 || global.Object.keys(property).length > MAX_BULK_ROLE_MEMBERS_ADD;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object4 = {'scrollable': true, 'header': null, 'startExpanded': true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const ZYOK46 = (require(1244) /* metro dependency 1244: indexNative */).t.ZYOK46;
object3.title = Reflect.apply(string, intl, [ZYOK46]);
object3.subtitle = role.name;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const OYkgVk = (require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk;
object3.trailing = <Button size="sm" text={Reflect.apply(string, intl,
[OYkgVk])} onPress={onPress_123306} variant={r12 ? 'secondary' : 'primary'} disabled={r12} />;
object4.header = <BottomSheetTitleHeader {...object3} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<BottomSheet {...object4}>
<View style={styles.container}>
<Text variant="text-sm/normal" style={styles.addMembersDescription}>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['3OxP4q'],
{numMembers: MAX_BULK_ROLE_MEMBERS_ADD})}
</Text>
<AddMembersBody_123291
guild={guild}
role={role}
members={value5}
pendingAdditions={property}
setPendingAdditions={property2}
autoFocusSearch
maxCount={MAX_BULK_ROLE_MEMBERS_ADD}
inActionSheet
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.paddingTop = PX_12;
object.inputContainer = object3;
const object4 = {'width': 16, 'height': 16};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.tagAvatar = object4;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object.emptyStateText = {color: TEXT_DEFAULT};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.addMembersDescription = {marginHorizontal: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/AddMembersActionSheet.tsx');
exports.default = AddMembersActionSheet_123304;
exports.AddMembersBody = AddMembersBody_1232912;
function MemberRow_123290({start, end, guildId, userId, onPress, disabled, checked}) { // fn#123290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:943, offset: 0x0258715a, size: 200 bytes, params: 2, frame: 25
const {accessibilityRole,
accessibilityState} = (UseA11yRolesNativeModule).useCheckboxA11yNative({checked: checked,
disabled: disabled});
const FormCheckbox = (FormCheckboxNativeModule).FormCheckbox;
return (
<DetailedGuildIdentityUserRow
start={start}
end={end}
guildId={guildId}
userId={userId}
onPress={onPress}
disabled={disabled}
trailing={<FormCheckbox checked={checked} />}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
);
}
function AddMembersBody_123291({guild, role, members, pendingAdditions, setPendingAdditions, autoFocusSearch, inActionSheet, maxCount}) { // fn#123291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1298, offset: 0x02587222, size: 898 bytes, params: 2, frame: 36
var r5;
var object2;
var space;
var PX_12;
var EmptyState;
const styles = useStyles();
const [property, env0_8] = setPendingAdditions(maxCount.useState(''), 2);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({isKeyboardAwareOnAndroid: !inActionSheet}).insets;
const value5 = maxCount.useMemo(function() {
var env0_0 = _fun123293;
return members.filter(_fun123294);
}, [members, property]);
maxCount.useEffect(_fun123295, [value5.length, property]);
const r7 = inActionSheet ? FlashListModule.BottomSheetFlashList : FlashListModule.FlashList;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const vMiCaQ = (require(1244) /* metro dependency 1244: indexNative */).t.vMiCaQ;
const Object = global.Object;
const view = (
<View style={styles.inputContainer}>
<TagListInputNative
placeholder={Reflect.apply(string, intl, [vMiCaQ])}
tags={Object.values(pendingAdditions).map(function(a0) {
var display = a0.display;
var id = a0.row.id;
var object = {};
copyDataProperties(object, display, id);
object['id'] = id;
return object;
})}
onChangeText={onChangeText_123297}
onRemove={onRemove_123298}
autoFocus={autoFocusSearch}
inActionSheet={inActionSheet}
/>
</View>
</BottomSheet>
);
}
);
if (value5.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = (
<EmptyState
Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt}
bodyStyle={styles.emptyStateText}
body={property !== '' ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ErpIY3,
{query: property}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oB9grQ)}
/>
);
} else {
object2 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.paddingHorizontal = space.PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object2.paddingTop = PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object2.paddingBottom = PX_12 + (inActionSheet ? insets.bottom : 0);
r5 = ((Component) => <Component contentContainerStyle={object2} renderItem={renderItem_123300} data={value5} estimatedItemSize={56} extraData={pendingAdditions} keyboardShouldPersistTaps="always" />)(r7);
}
return (
<>
{view}
{r5}
</>
);
function _fun123292() { // fn#123292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1549, offset: 0x025875a4, size: 39 bytes, params: 1, frame: 11
return members.filter(_fun123294);
function filterByQuery_123293(a0) { // fn#123293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1572, offset: 0x025875cb, size: 90 bytes, params: 2, frame: 13
const RegExp = global.RegExp;
let value = environment.__proto__.__proto__;
value = importDefault(4100) /* metro dependency 4100: RegexUtils */;
value = value.escape(env1_7);
const value3 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
const regExp = new RegExp(value, 'i');
return (regExp instanceof Object ? regExp : value3).test(a0);
}
function _fun123292() { // fn#123292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1549, offset: 0x025875a4, size: 39 bytes, params: 1, frame: 11
return members.filter(_fun123294);
}
function _fun123294(a0) { // fn#123294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1636, offset: 0x02587625, size: 42 bytes, params: 2, frame: 13
return filterByQuery_123293(a0.name) || filterByQuery_123293(a0.userTag);
}
function _fun123295() { // fn#123295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1726, offset: 0x0258764f, size: 126 bytes, params: 1, frame: 18
var value2;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_7 !== '') {
value2 = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZGVL3g,
{count: length}),
'polite']);
}
}
}
function AddMembersBody_123291OnChangeText(a0) { // fn#123297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2132, owner: AddMembersBody_123291.onChangeText, offset: 0x025876f5, size: 106 bytes, params: 2, frame: 19
let value = a0.trim();
value = value.toLowerCase();
const defaultImport = importDefault(6592) /* metro dependency 6592: GuildUtils */;
const requestMembers = defaultImport.requestMembers;
const id = guild.id;
const ADD_MEMBER_QUERY_LIMIT = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).ADD_MEMBER_QUERY_LIMIT;
Reflect.apply(requestMembers, defaultImport, [id, value, ADD_MEMBER_QUERY_LIMIT]);
env0_8(value);
}
function _fun123295() { // fn#123295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1726, offset: 0x0258764f, size: 126 bytes, params: 1, frame: 18
var value2;
var AccessibilityAnnouncer;
var announce;
var intl;
if (GuildSettingsRoleConstantsModule.MAX_BULK_ROLE_MEMBERS_ADD !== '') {
value2 = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZGVL3g,
{count: length}),
'polite']);
}
}
function AddMembersBody_123291OnRemove(a0) { // fn#123298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2254, owner: AddMembersBody_123291.onRemove, offset: 0x0258775f, size: 73 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys, value, [pendingAdditions]);
const env0_0 = value[a0];
setPendingAdditions(_fun123299);
}
function AddMembersBody_123291OnChangeText(a0) { // fn#123297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2132, owner: AddMembersBody_123291.onChangeText, offset: 0x025876f5, size: 106 bytes, params: 2, frame: 19
let value = a0.trim();
value = value.toLowerCase();
const defaultImport = GuildUtils;
const requestMembers = defaultImport.requestMembers;
const id = guild.id;
const ADD_MEMBER_QUERY_LIMIT = (GuildSettingsRolesUtilsModule).ADD_MEMBER_QUERY_LIMIT;
Reflect.apply(requestMembers, defaultImport, [id, value, ADD_MEMBER_QUERY_LIMIT]);
env0_8(value);
}
function AddMembersBody_123291RenderItem({item, index}) { // fn#123300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2746, owner: AddMembersBody_123291.renderItem, offset: 0x025877dd, size: 238 bytes, params: 2, frame: 22
const value2 = item.roles.includes(role.id);
return (
<MemberRow_123290
start={index === 0}
end={index === env0_9.length - 1}
guildId={guild.id}
userId={item.id}
onPress={function() {
_fun123302(item);
}}
disabled={value2 || maxCount != null && global.Object.keys(pendingAdditions).length >= maxCount && !(item.id in pendingAdditions)}
checked={value2 || item.id in pendingAdditions}
/>
);
}
function AddMembersBody_123291OnRemove(a0) { // fn#123298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2254, owner: AddMembersBody_123291.onRemove, offset: 0x0258775f, size: 73 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys, value, [pendingAdditions]);
const env0_0 = value[a0];
setPendingAdditions(_fun123299);
function _fun123299(a0) { // fn#123299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2296, offset: 0x025877a8, size: 53 bytes, params: 2, frame: 14
const binding = env0_0;
a0[binding];
const value = environment.__proto__.__proto__;
const binding2 = env2_3;
const items2 = [binding];
return binding2(a0, items2.map(_toPropertyKey_123289));
}
function AddMembersActionSheet_123304OnPress() { // fn#123306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3933, owner: AddMembersActionSheet_123304.onPress, offset: 0x02587cce, size: 109 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const bulkAddMemberRoles = value.bulkAddMemberRoles;
const id = guild.id;
const id2 = role.id;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
Reflect.apply(bulkAddMemberRoles, value, [id, id2, defaultImport.keys(env0_2)]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
}
function filterByQuery(a0) { // fn#123293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1572, offset: 0x025875cb, size: 90 bytes, params: 2, frame: 13
const RegExp = global.RegExp;
let value = environment.__proto__.__proto__;
value = importDefault(4100) /* metro dependency 4100: RegexUtils */;
value = value.escape(env1_7);
const value3 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
const regExp = new RegExp(value, 'i');
return (regExp instanceof Object ? regExp : value3).test(a0);
}
function AddMembersBody_123291RenderItem({item, index}) { // fn#123300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2746, owner: AddMembersBody_123291.renderItem, offset: 0x025877dd, size: 238 bytes, params: 2, frame: 22
const value2 = item.roles.includes(role.id);
return (
<MemberRow_123290
start={index === 0}
end={index === env0_9.length - 1}
guildId={guild.id}
userId={item.id}
onPress={function() {
_fun123302(item);
}}
disabled={value2 || maxCount != null && global.Object.keys(pendingAdditions).length >= maxCount && !(item.id in pendingAdditions)}
checked={value2 || item.id in pendingAdditions}
/>
);
function renderItemOnPress_123301() { // fn#123301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2960, owner: AddMembersBody_123291.renderItem.onPress, offset: 0x025878cb, size: 25 bytes, params: 1, frame: 11
((a0) => {
var env0_0 = a0;
if (!a0.roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
})(item);
function onPressUpdatePendingAdditions(a0) { // fn#123302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2964, owner: AddMembersBody_123291.renderItem.onPress.updatePendingAdditions, offset: 0x025878e4, size: 62 bytes, params: 2, frame: 13
const env0_0 = a0;
const roles = a0.roles;
if (!roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
function _fun123303(a0) { // fn#123303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3026, offset: 0x02587922, size: 178 bytes, params: 2, frame: 19
var object;
var value3;
var Avatar;
var value4;
var stylesBinding;
var tagAvatar;
const object2 = {};
copyDataProperties(object2, a0, undefined);
const value2 = env0_0.id in object2;
let binding = env0_0;
if (value2) {
delete object2[binding.id];
} else {
object = {};
object.text = binding.name;
value3 = environment.__proto__.__proto__.__proto__.__proto__;
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var avatarProps = {source: binding.avatarSource};
value4 = environment.__proto__.__proto__.__proto__;
stylesBinding = styles;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.avatarStyle = tagAvatar;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.style = tagAvatar;
object.icon = <Avatar {...avatarProps} />;
if (object != null) {
binding = env0_0;
object2[binding.id] = {display: object, row: binding};
}
}
return object2;
}
function _fun123294(a0) { // fn#123294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1636, offset: 0x02587625, size: 42 bytes, params: 2, frame: 13
return filterByQuery(a0.name) || filterByQuery(a0.userTag);
}
}
function _fun123299(a0) { // fn#123299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2296, offset: 0x025877a8, size: 53 bytes, params: 2, frame: 14
const binding = env0_0;
a0[binding];
const value = environment.__proto__.__proto__;
const binding2 = env2_3;
const items2 = [binding];
return binding2(a0, items2.map(_toPropertyKey_123289));
}
}
function renderItemOnPress_123301() { // fn#123301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2960, owner: AddMembersBody_123291.renderItem.onPress, offset: 0x025878cb, size: 25 bytes, params: 1, frame: 11
((a0) => {
var env0_0 = a0;
if (!a0.roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
})(item);
}
function onPressUpdatePendingAdditions_123302(a0) { // fn#123302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2964, owner: AddMembersBody_123291.renderItem.onPress.updatePendingAdditions, offset: 0x025878e4, size: 62 bytes, params: 2, frame: 13
const env0_0 = a0;
const roles = a0.roles;
if (!roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
function AddMembersActionSheet_123304({guild, role}) { // fn#123304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3357, offset: 0x025879d4, size: 762 bytes, params: 2, frame: 34
var object2;
const styles = useStyles();
let binding = ReactModule;
const [property, property2] = Module00057(binding.useState({}), 2);
binding = ReactModule;
const useCallback = binding.useCallback;
let id = role.id;
const value5 = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useGuildMembers(guild.id,
Reflect.apply(useCallback, binding, [function({roles}) {
return !roles.includes(role.id);
}, [id]]));
const useSubscribeGuildMembers = SubscribeGuildMembersModule.useSubscribeGuildMembers;
id = guild.id;
let Object = global.Object;
Reflect.apply(useSubscribeGuildMembers, SubscribeGuildMembersModule, [{[id]: Object.keys(property)},
'AddMembersActionSheet']);
Object = global.Object;
const r12 = Object.keys(property).length === 0 || global.Object.keys(property).length > MAX_BULK_ROLE_MEMBERS_ADD;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object2 = {'scrollable': true, 'header': null, 'startExpanded': true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const ZYOK46 = (IndexNativeModule).t.ZYOK46;
object.title = Reflect.apply(string, intl, [ZYOK46]);
object.subtitle = role.name;
const Button = (ButtonNativeModule).Button;
string = intl.string;
const OYkgVk = (IndexNativeModule).t.OYkgVk;
object.trailing = (
<Button
size="sm"
text={Reflect.apply(string, intl, [OYkgVk])}
onPress={onPress_123306}
variant={r12 ? 'secondary' : 'primary'}
disabled={r12}
/>
);
object2.header = <BottomSheetTitleHeader {...object} />;
const Text = (TextModule).Text;
return (
<BottomSheet {...object2}>
<View style={styles.container}>
<Text variant="text-sm/normal" style={styles.addMembersDescription}>
{intl.format((IndexNativeModule).t['3OxP4q'],
{numMembers: MAX_BULK_ROLE_MEMBERS_ADD})}
</Text>
<AddMembersBody_123291
guild={guild}
role={role}
members={value5}
pendingAdditions={property}
setPendingAdditions={property2}
autoFocusSearch
maxCount={MAX_BULK_ROLE_MEMBERS_ADD}
inActionSheet
/>
</View>
</BottomSheet>
);
function AddMembersActionSheet_123304OnPress() { // fn#123306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3933, owner: AddMembersActionSheet_123304.onPress, offset: 0x02587cce, size: 109 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const bulkAddMemberRoles = value.bulkAddMemberRoles;
const id = guild.id;
const id2 = role.id;
const defaultImport = SnowflakeUtils;
Reflect.apply(bulkAddMemberRoles, value, [id, id2, defaultImport.keys(env0_2)]);
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function _fun123303(a0) { // fn#123303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3026, offset: 0x02587922, size: 178 bytes, params: 2, frame: 19
var object3;
var value3;
var Avatar;
var value4;
var stylesBinding;
var tagAvatar;
const object4 = {};
copyDataProperties(object4, a0, undefined);
const value2 = env0_0.id in object4;
let binding = env0_0;
if (value2) {
delete object4[binding.id];
} else {
object3 = {};
object3.text = binding.name;
value3 = environment.__proto__.__proto__.__proto__.__proto__;
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var avatarProps = {source: binding.avatarSource};
value4 = environment.__proto__.__proto__.__proto__;
stylesBinding = styles;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.avatarStyle = tagAvatar;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.style = tagAvatar;
object3.icon = <Avatar {...avatarProps} />;
if (object3 != null) {
binding = env0_0;
object4[binding.id] = {display: object3, row: binding};
function _toPropertyKey_123289(a0) { // fn#123289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:226, offset: 0x00deffed, size: 138 bytes, params: 2, frame: 16
var r1;
var property;
let value = a0;
if (typeof value === 'object') {
if (value) {
property = value[global.Symbol.toPrimitive];
if (property !== undefined) {
value = property.call(value, 'string');
if (typeof value !== 'object') {
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
throw new global.TypeError('@@toPrimitive must return a primitive value.');
}
value = global.String(value);
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
}
return object4;
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
global.__d(_fun123288, 15952, [29, 57, 31, 27, 15946, 33, 4501, 697, 3874, 12140, 7974, 5463, 4100, 1305, 3869,
1244, 8416, 9100, 6592, 15951, 21, 9105, 6902, 6275, 6758, 4578, 9112, 4080, 4573,
2]) /* metro module 15952, dependencies: [29, 57, 31, 27, 15946, 33, 4501, 697, 3874, 12140, 7974, 5463, 4100, 1305, 3869, 1244, 8416, 9100, 6592, 15951, 21, 9105, 6902, 6275, 6758, 4578, 9112, 4080, 4573, 2] */;
@@ -1,90 +1,101 @@
/* Metro module 15971; source: modules/guild_settings/roles/native/action_sheet/RolePermissionTemplatesActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 683, 4080, 3856, 6758, 1244, 6805, 15950, 4647, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GuildSettingsRoleTemplate from '../GuildSettingsRoleTemplate.tsx'; /* Metro dependency 15950 */
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 ToastUtilsModule from '../../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
function _fun123475(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:6, offset: 0x0258f1b9, size: 269 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_5 = value.AnalyticEvents;
const env0_6 = value.AnalyticsSections;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const env0_8 = Reflect.apply(createStyles, value, [{templateContainer: {'paddingVertical': 16, 'flex': 1,
backgroundColor: BACKGROUND_BASE_LOWER}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/RolePermissionTemplatesActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/RolePermissionTemplatesActionSheet.tsx');
exports.default = RolePermissionTemplatesActionSheet;
}
function RolePermissionTemplatesActionSheet({permissionsEdited, onPermissionsChanged, guildId}) { // fn#123476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:443, offset: 0x0258f2c6, size: 294 bytes, params: 2, frame: 22
const styles = useStyles();
ReactModule.useEffect(function() {
var defaultImport = importDefault(dependencyMap[6]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT});
}, []);
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const KgCkoQ = (IndexNativeModule).t.KgCkoQ;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [KgCkoQ])} />;
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const GUILD_ROLE_TEMPLATE_POPOUT = AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT;
return (
<ActionSheet header={bottomSheetTitleHeader} startExpanded>
<View style={styles.templateContainer}>
<GuildSettingsRoleTemplate
onSelect={onSelect_123479}
location={GUILD_ROLE_TEMPLATE_POPOUT}
guildId={guildId}
/>
</View>
</ActionSheet>
);
function saveTemplate(a0) { // fn#123477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:553, owner: RolePermissionTemplatesActionSheet.saveTemplate, offset: 0x0258f3ec, size: 78 bytes, params: 2, frame: 13
onPermissionsChanged(a0);
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
(ToastUtilsModule).roleTemplateAppliedToast();
}
function RolePermissionTemplatesActionSheet({permissionsEdited, onPermissionsChanged, guildId}) { // fn#123476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:443, offset: 0x0258f2c6, size: 294 bytes, params: 2, frame: 22
const styles = useStyles();
env0_3.useEffect(function() {
var defaultImport = importDefault(dependencyMap[6]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT});
}, []);
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const KgCkoQ = (require(1244) /* metro dependency 1244: indexNative */).t.KgCkoQ;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [KgCkoQ])} />;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const GuildSettingsRoleTemplate = importDefault(15950) /* metro dependency 15950: GuildSettingsRoleTemplate */;
const GUILD_ROLE_TEMPLATE_POPOUT = AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT;
return (
<ActionSheet header={bottomSheetTitleHeader} startExpanded>
<View style={styles.templateContainer}>
<GuildSettingsRoleTemplate
onSelect={onSelect}
location={GUILD_ROLE_TEMPLATE_POPOUT}
guildId={guildId}
/>
</View>
</ActionSheet>
);
}
function RolePermissionTemplatesActionSheetOnSelect(a0) { // fn#123479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:948, owner: RolePermissionTemplatesActionSheet.onSelect, offset: 0x0258f47a, size: 313 bytes, params: 2, frame: 19
var environment;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const env0_0 = a0;
if (permissionsEdited) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.MVdkgB);
object.body = intl.string(t.LpogjK);
object.cancelText = intl.string(t['ETE/oC']);
object.confirmText = intl.string(t.p89ACt);
object.onConfirm = onConfirm_123480;
object.onCancel = onCancel_123481;
object.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object]);
} else {
saveTemplate(a0);
}
function onSelectOnConfirm() { // fn#123480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1184, owner: RolePermissionTemplatesActionSheet.onSelect.onConfirm, offset: 0x00d6c9a4, size: 23 bytes, params: 1, frame: 11
saveTemplate(env0_0);
}
function saveTemplate(a0) { // fn#123477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:553, owner: RolePermissionTemplatesActionSheet.saveTemplate, offset: 0x0258f3ec, size: 78 bytes, params: 2, frame: 13
onPermissionsChanged(a0);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(3856) /* metro dependency 3856: ToastUtils */).roleTemplateAppliedToast();
}
function onSelectOnCancel() { // fn#123481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1215, owner: RolePermissionTemplatesActionSheet.onSelect.onCancel, offset: 0x0258f5b3, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function RolePermissionTemplatesActionSheetOnSelect(a0) { // fn#123479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:948, owner: RolePermissionTemplatesActionSheet.onSelect, offset: 0x0258f47a, size: 313 bytes, params: 2, frame: 19
var environment;
var defaultImport;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
if (permissionsEdited) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.MVdkgB);
object2.body = intl.string(t.LpogjK);
object2.cancelText = intl.string(t['ETE/oC']);
object2.confirmText = intl.string(t.p89ACt);
object2.onConfirm = onConfirm_123480;
object2.onCancel = onCancel_123481;
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
} else {
saveTemplate(a0);
}
}
function onSelectOnConfirm() { // fn#123480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1184, owner: RolePermissionTemplatesActionSheet.onSelect.onConfirm, offset: 0x00d6c9a4, size: 23 bytes, params: 1, frame: 11
saveTemplate(env0_0);
}
function onSelectOnCancel() { // fn#123481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1215, owner: RolePermissionTemplatesActionSheet.onSelect.onCancel, offset: 0x0258f5b3, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun123475, 15971, [31, 27, 661, 33, 4501, 697, 683, 4080, 3856, 6758, 1244, 6805, 15950, 4647,
2]) /* metro module 15971, dependencies: [31, 27, 661, 33, 4501, 697, 683, 4080, 3856, 6758, 1244, 6805, 15950, 4647, 2] */;
@@ -1,176 +1,202 @@
/* Metro module 15975; source: modules/guild_settings/roles/native/action_sheet/SelectConnectionActionSheet.tsx; dependencies: [57, 31, 27, 33, 11364, 6238, 1305, 4048, 6758, 1244, 5039, 1423, 4002, 4080, 8853, 6805, 9221, 6277, 6618, 6231, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseTheme from '../../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
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 NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as AvatarUtilsModule from '../../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import * as SharedModule from '../../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as Module06277Module from '../../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as SafeAreaViewModule from '../../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as SegmentedControlStateNativeModule from '../../../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as UseGetOrFetchApplicationBatchedModule from '../../../../applications/useGetOrFetchApplicationBatched.tsx'; /* Metro dependency 11364 */
function _fun123552(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:6, offset: 0x025938e8, size: 199 bytes, params: 8, frame: 19
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 value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/SelectConnectionActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/SelectConnectionActionSheet.tsx');
exports.default = SelectConnectionActionSheet;
}
function IdentityApplicationRow({applicationId, onPress}) { // fn#123553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:158, offset: 0x025939af, size: 228 bytes, params: 2, frame: 24
const value3 = (require(11364) /* metro dependency 11364: useGetOrFetchApplicationBatched */).useGetOrFetchApplicationBatched(applicationId);
if (value3 == null) {
return null;
function IdentityApplicationRow({applicationId, onPress}) { // fn#123553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:158, offset: 0x025939af, size: 228 bytes, params: 2, frame: 24
const value3 = (UseGetOrFetchApplicationBatchedModule).useGetOrFetchApplicationBatched(applicationId);
if (value3 == null) {
return null;
}
const bot = value3.bot;
const TableRow = (TableRowNativeModule).TableRow;
const r6 = (
bot != null
? ((Avatar) => <Avatar user={bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar)
: null
);
const name = value3.name;
let description = value3.description;
description = description === '' ? undefined : value3.description;
return (
<TableRow
icon={r6}
label={name}
subLabel={description}
onPress={onPress}
/>
);
}
const bot = value3.bot;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const r6 = bot != null ? ((Avatar) => <Avatar user={bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar) : null;
const name = value3.name;
let description = value3.description;
description = description === '' ? undefined : value3.description;
return (
<TableRow
icon={r6}
label={name}
subLabel={description}
onPress={onPress}
/>
);
}
function SelectConnectionActionSheet({addConnection, excludedConnections, excludedApplications, integrations, onCompleteApplication, gameApplicationIds, onCompleteIdentityApplication}) { // fn#123554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:621, offset: 0x02593a93, size: 984 bytes, params: 2, frame: 31
const env0_4 = onCompleteIdentityApplication;
const env0_5 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Sm0YG7 = (require(1244) /* metro dependency 1244: indexNative */).t.Sm0YG7;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [Sm0YG7])} />;
let [property, property2] = onCompleteApplication(env0_4.useState(0), 2);
const r13 = integrations?.filter(function(a0) {
var property = a0.application;
var value = undefined;
return (property == null ? value : property.roleConnectionsVerificationUrl) != null && !excludedApplications.has(a0.application == null ? value : a0.application.id);
});
const value11 = (require(5039) /* metro dependency 5039: ConnectionsHooks */).usePlatforms().filter(function(a0) {
return !excludedConnections.has(a0.type);
}).map(_fun123557);
const r1 = r13?.map(_fun123559);
const r0 = onCompleteIdentityApplication != null ? (gameApplicationIds ?? []).filter(function(a0) {
return !excludedApplications.has(a0);
}).map(_fun123562) : [];
const value15 = (r1?.length ?? 0) > 0;
const value16 = r0.length > 0;
items = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5'])];
if (value15) {
items.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE));
function SelectConnectionActionSheet({addConnection, excludedConnections, excludedApplications, integrations, onCompleteApplication, gameApplicationIds, onCompleteIdentityApplication}) { // fn#123554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:621, offset: 0x02593a93, size: 984 bytes, params: 2, frame: 31
const onCompleteIdentityApplication2 = onCompleteIdentityApplication;
const env0_5 = (UseTheme)();
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Sm0YG7 = (require(1244) /* metro dependency 1244: indexNative */).t.Sm0YG7;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [Sm0YG7])} />;
let [property, property2] = onCompleteApplication(onCompleteIdentityApplication2.useState(0), 2);
const r13 = integrations?.filter(function(a0) {
var property = a0.application;
var value = undefined;
return (property == null ? value : property.roleConnectionsVerificationUrl) != null && !excludedApplications.has(a0.application == null ? value : a0.application.id);
});
const value11 = (require(5039) /* metro dependency 5039: ConnectionsHooks */).usePlatforms().filter(function(a0) {
return !excludedConnections.has(a0.type);
}).map(_fun123557);
const r1 = r13?.map(_fun123559);
const r0 = onCompleteIdentityApplication != null ? (gameApplicationIds ?? []).filter(function(a0) {
return !excludedApplications.has(a0);
}).map(_fun123562) : [];
const value15 = (r1?.length ?? 0) > 0;
const value16 = r0.length > 0;
items2 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5'])];
if (value15) {
items2.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE));
}
if (value16) {
items2.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y3ZnnU));
}
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
const object = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2};
object.items = items2.map(function(a0) {
return {id: a0, label: a0, page: null};
});
const value18 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [object]);
const r14 = property === 1 ? value15 ? r1 : r0 : property !== 2 ? value11 : r0;
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const r5 = (
value15 || value16
? (
<View>
{((SegmentedControl) => <SegmentedControl state={value18} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}
</View>
)
: null
);
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<ActionSheet
scrollable
header={bottomSheetTitleHeader}
startExpanded
>
{r5}
<BottomSheetScrollView>
<SafeAreaPaddingView bottom>
<TableRowGroup hasIcons>
{r14}
</TableRowGroup>
</SafeAreaPaddingView>
</BottomSheetScrollView>
</ActionSheet>
);
function _fun123557(a0) { // fn#123557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1178, offset: 0x02593ed2, size: 231 bytes, params: 2, frame: 21
const env0_0 = a0;
const makeSource = AvatarUtilsModule.makeSource;
const isThemeDark2 = (SharedModule).isThemeDark(env0_5);
const icon = a0.icon;
const source = Reflect.apply(makeSource, AvatarUtilsModule, [isThemeDark2 ? icon.darkPNG : icon.lightPNG]);
const TableRow = (TableRowNativeModule).TableRow;
const Icon = (NativeModule).Icon;
return (
<TableRow
icon={<Icon source={source} disableColor />}
label={a0.name}
onPress={onPress_123558}
key={'row-' + a0.type}
/>
);
function onPress_123558() { // fn#123558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1360, offset: 0x02593fb9, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
addConnection(env0_0.type);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun123559({application}) { // fn#123559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1448, offset: 0x02593ff6, size: 219 bytes, params: 2, frame: 24
var environment;
var description;
var r0;
var value2;
var TableRow;
let value = null;
if (value == application) {
r0 = value;
} else {
value = environment.__proto__;
value2 = undefined;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {icon: ((Avatar) => <Avatar user={application.bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value2} />)((require(1305) /* metro dependency 1305: native */).Avatar),
label: application.name};
description = application.description;
description = description === '' ? value2 : application.description;
tableRowProps.subLabel = description;
tableRowProps.onPress = onPress_123560;
value = <TableRow {...tableRowProps} key={'row-' + application.id} />;
r0 = value;
}
return r0;
function onPress_123560() { // fn#123560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1665, offset: 0x025940d1, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteApplication(application.id);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun123562(a0) { // fn#123562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1782, offset: 0x0259410e, size: 72 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return (
<IdentityApplicationRow
applicationId={a0}
onPress={onPress_123563}
key={'row-identity-' + a0}
/>
);
function onPress_123563() { // fn#123563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1835, offset: 0x02594156, size: 56 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteIdentityApplication(env0_0);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
}
if (value16) {
items.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y3ZnnU));
}
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object3 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2};
object3.items = items.map(function(a0) {
return {id: a0, label: a0, page: null};
});
const value18 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object3]);
const r14 = property === 1 ? value15 ? r1 : r0 : property !== 2 ? value11 : r0;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const r5 = value15 || value16 ? <View>{((SegmentedControl) => <SegmentedControl state={value18} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View> : null;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<ActionSheet
scrollable
header={bottomSheetTitleHeader}
startExpanded
>
{r5}
<BottomSheetScrollView>
<SafeAreaPaddingView bottom>
<TableRowGroup hasIcons>
{r14}
</TableRowGroup>
</SafeAreaPaddingView>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun123557(a0) { // fn#123557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1178, offset: 0x02593ed2, size: 231 bytes, params: 2, frame: 21
const env0_0 = a0;
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
const makeSource = avatarUtilsModule.makeSource;
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_5);
const icon = a0.icon;
const source = Reflect.apply(makeSource, avatarUtilsModule, [isThemeDark2 ? icon.darkPNG : icon.lightPNG]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<TableRow
icon={<Icon source={source} disableColor />}
label={a0.name}
onPress={onPress_123558}
key={'row-' + a0.type}
/>
);
}
function _fun123559({application}) { // fn#123559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1448, offset: 0x02593ff6, size: 219 bytes, params: 2, frame: 24
var environment;
var description;
var r0;
var value2;
var TableRow;
let value = null;
if (value == application) {
r0 = value;
} else {
value = environment.__proto__;
value2 = undefined;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {icon: ((Avatar) => <Avatar user={application.bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value2} />)((require(1305) /* metro dependency 1305: native */).Avatar),
label: application.name};
description = application.description;
description = description === '' ? value2 : application.description;
tableRowProps.subLabel = description;
tableRowProps.onPress = onPress_123560;
value = <TableRow {...tableRowProps} key={'row-' + application.id} />;
r0 = value;
}
return r0;
}
function _fun123562(a0) { // fn#123562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1782, offset: 0x0259410e, size: 72 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return (
<IdentityApplicationRow
applicationId={a0}
onPress={onPress_123563}
key={'row-identity-' + a0}
/>
);
}
function onPress_123558() { // fn#123558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1360, offset: 0x02593fb9, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
addConnection(env0_0.type);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onPress_123560() { // fn#123560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1665, offset: 0x025940d1, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteApplication(application.id);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onPress_123563() { // fn#123563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1835, offset: 0x02594156, size: 56 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteIdentityApplication(env0_0);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun123552, 15975, [57, 31, 27, 33, 11364, 6238, 1305, 4048, 6758, 1244, 5039, 1423, 4002, 4080, 8853,
6805, 9221, 6277, 6618, 6231,
2]) /* metro module 15975, dependencies: [57, 31, 27, 33, 11364, 6238, 1305, 4048, 6758, 1244, 5039, 1423, 4002, 4080, 8853, 6805, 9221, 6277, 6618, 6231, 2] */;