Initial commit

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

No files matched your search

@@ -0,0 +1,151 @@
/* Metro module 11929; source: modules/channel_permissions/native/components/ChannelAccessInfo.tsx; dependencies: [31, 27, 1422, 1945, 1938, 33, 4501, 697, 1244, 566, 9088, 1360, 4573, 5278, 11392, 1305, 11928, 6699, 9099, 9097, 10787, 2] */
function _fun91525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:6, offset: 0x02068d4b, size: 459 bytes, params: 8, frame: 25
var object3;
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(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object4 = {'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null, 'color': null,
'flexDirection': 'row', 'marginBottom': 8, 'marginTop': 8, 'padding': 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object4.color = TEXT_DEFAULT;
const env0_11 = Reflect.apply(createStyles, value, [{section: object4, sectionContent: {'alignItems': 'center',
'flexDirection': 'row', 'flexGrow': 1}, avatar: {marginRight: 8}, labelDetail: {marginRight: 12},
sectionIcon: {marginRight: 6}}]);
object3 = {MEMBERS: 0};
object3[0] = 'MEMBERS';
object3.ROLES = 1;
object3[1] = 'ROLES';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/ChannelAccessInfo.tsx');
exports.default = ChannelAccessInfo;
}
function ChannelAccessInfo({guild, channel}) { // fn#91526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:780, offset: 0x02068f16, size: 984 bytes, params: 2, frame: 37
var object;
var binding;
var MEMBERS;
var items3;
var ROLES;
var items4;
var items5;
const closure = renderCounts;
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value3 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.li1wKf);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildRoleStore], _fun91528,
[guild, channel]);
const existingMembers = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembers(GuildMemberStore.getMemberIds(guild?.id),
channel, guild, channel.accessPermissions);
let length = value4.length;
const r22 = length === 0 && existingMembers.length === 1 && isGuildOwner(guild,
existingMembers[0]) ? existingMembers[0] : null;
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="eyebrow">{value3}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {accessibilityLabel: value3, accessibilityRole: 'button', onPress: onPress_91529,
style: styles.section};
if (r22 != null) {
items4 = [((Avatar) => <Avatar style={styles.avatar} user={r22} guildId={guild.id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
items5 = [<Text variant="text-sm/semibold">{r22.tag}</Text>];
items5[1] = <Text variant="text-xs/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt0ERW)}</Text>;
items4[1] = <View>{items5}</View>;
object = {children: items4};
} else {
binding = env0_12;
MEMBERS = binding.MEMBERS;
length = existingMembers.length;
importDefault(11928) /* metro dependency 11928 */;
items3 = [closure(MEMBERS, length, undefined,
(require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon)];
ROLES = binding.ROLES;
length = value4.length;
importDefault(9099) /* metro dependency 9099 */;
items3[1] = closure(ROLES, length, undefined,
(require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon);
object = {children: items3};
}
const view = <View style={styles.sectionContent}>{((Fragment) => <Fragment {...object} />)(jsxRuntimeEnv0_10Binding)}</View>;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(10787) /* metro dependency 10787 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
iconProps.size = SMALL;
return (
<>
{text}
<PressableOpacity {...pressableOpacityProps}>
{view}
<Icon {...iconProps} />
</PressableOpacity>
</>
);
}
function renderCounts(a0, a1, a2, a3) { // fn#91527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:1105, owner: ChannelAccessInfo.renderCounts, offset: 0x020692ee, size: 529 bytes, params: 5, frame: 20
var r8;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (a1 === 0) {
return null;
}
const MEMBERS = env1_12.MEMBERS;
if (MEMBERS === a0) {
r8 = a1 > 100 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.PR5l07,
{count: 100}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.bu5sya,
{count: a1});
} else if (env1_12.ROLES === a0) {
r8 = a1 > 100 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['+OYnFQ'],
{count: 100}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.T2BEtm,
{count: a1});
} else {
value2 = undefined;
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
r8 = value2;
}
const Fragment = env1_3.Fragment;
const value8 = ((Component) => <Component size="sm" style={styles.sectionIcon} />)(a3);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Fragment>
{value8}
<Text style={styles.labelDetail} variant="text-sm/medium">
{r8}
</Text>
</Fragment>
);
}
function _fun91528() { // fn#91528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:917, offset: 0x020694ff, size: 83 bytes, params: 1, frame: 18
let value = environment.__proto__;
const channelPermissionsUtilsModule = require(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
const getExistingRoles = channelPermissionsUtilsModule.getExistingRoles;
const guildBinding = guild;
value = GuildRoleStore.getSortedRoles(guildBinding.id);
const channelBinding = channel;
return Reflect.apply(getExistingRoles, channelPermissionsUtilsModule, [guildBinding, value, channelBinding,
channelBinding.accessPermissions]);
}
function ChannelAccessInfoOnPress() { // fn#91529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:1853, owner: ChannelAccessInfo.onPress, offset: 0x02069552, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
const openChannelMembersActionSheet = value.openChannelMembersActionSheet;
const channelBinding = channel;
Reflect.apply(openChannelMembersActionSheet, value, [channelBinding.id, channelBinding.guild_id]);
}
@@ -0,0 +1,205 @@
/* Metro module 9096; source: modules/channel_permissions/native/components/ChannelOverwritesItem.tsx; dependencies: [31, 27, 1878, 8120, 33, 4501, 4500, 1244, 4603, 3856, 5278, 6988, 6238, 9097, 9088, 4573, 1305, 9098, 9099, 3874, 7974, 2] */
function _fun71166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:6, offset: 0x01d17473, size: 393 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = ChannelOverwritesItem;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).RowType;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({nameWrapper: {'flexDirection': 'row',
'alignItems': 'flex-end', 'marginRight': 16}, name: {paddingRight: 4}, memberName: {flexShrink: 1},
ownerIcon: {alignSelf: 'center'}, roleIcon: {'height': 30, 'width': 30}, rowRemoveIconDisabled: {opacity: 0.3}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/ChannelOverwritesItem.tsx');
exports.default = closure;
exports.ChannelOverwritesCheckboxItem = ChannelOverwritesCheckboxItem;
}
function RemoveIcon({item, channelId, onRemove}) { // fn#71167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:415, offset: 0x01d175fc, size: 231 bytes, params: 2, frame: 23
var r0;
var PressableOpacity;
var object2;
var disabled;
var intl;
var CircleXIcon;
const styles = useStyles();
if (channelId == null) {
r0 = null;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object2 = {};
disabled = item.disabled;
object2.disabled = disabled;
object2.accessibilityRole = 'button';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
object2.onPress = function() {
var itemBinding;
if (onRemove != null) {
return onRemove(item);
}
itemBinding = item;
_fun71169(itemBinding.id, itemBinding.name, channelId);
};
CircleXIcon = (require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon;
disabled = item.disabled;
r0 = <PressableOpacity {...object2}><CircleXIcon style={disabled ? styles.rowRemoveIconDisabled : undefined} /></PressableOpacity>;
}
return r0;
}
function RoleItem_71172({disabled, item, subLabel, channelId, showType, showRemove, start, end, trailing, onPress, accessibilityRole, accessibilityState, accessible}) { // fn#71172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:1122, offset: 0x01d1789b, size: 285 bytes, params: 2, frame: 31
var r16;
var moduleValue;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
object2.icon = <ShieldUserIcon size="lg" color={item.colorString} />;
object2.label = item.name;
if (showType) {
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
r16 = moduleValue.getRowTypeLabel(item.rowType);
} else {
r16 = subLabel;
}
object2.subLabel = r16;
object2.start = start;
object2.end = end;
object2.trailing = showRemove ? <RemoveIcon item={item} channelId={channelId} /> : trailing;
object2.onPress = onPress;
object2.disabled = disabled;
object2.accessibilityRole = accessibilityRole;
object2.accessibilityState = accessibilityState;
object2.accessible = accessible;
return <TableRow {...object2} />;
}
function MemberItem({item, channelId, showRemove, onRemove, guildId, start, end, trailing, onPress, disabled, accessibilityRole, accessibilityState, accessible}) { // fn#71173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:1590, offset: 0x01d179b8, size: 574 bytes, params: 2, frame: 37
var object2;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={[styles.name,
styles.memberName]} lineClamp={1} variant="text-md/semibold" color="interactive-text-active">{item.name}</Text>;
const rowType = item.rowType;
const OWNER = RowType.OWNER;
const view = <View style={styles.nameWrapper}>{text}{rowType !== OWNER ? null : ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(9098) /* metro dependency 9098 */} disableColor style={styles.ownerIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarSource = UserStore.getUser(item.id)?.getAvatarSource(guildId);
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
object2.icon = <Avatar source={avatarSource} size={SMALL} />;
object2.label = view;
const username = item.username;
object2.subLabel = username;
object2.start = start;
object2.end = end;
object2.trailing = showRemove ? <RemoveIcon item={item} channelId={channelId} onRemove={onRemove} /> : trailing;
object2.onPress = onPress;
object2.disabled = disabled;
object2.accessibilityRole = accessibilityRole;
object2.accessibilityState = accessibilityState;
object2.accessible = accessible;
return <TableRow {...object2} />;
}
function EmptyRoleItem({item}) { // fn#71174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:2413, offset: 0x01d17bf6, size: 168 bytes, params: 2, frame: 23
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(9099) /* metro dependency 9099 */, color: item.colorString};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const MEDIUM = IconSizes.MEDIUM;
iconProps.size = MEDIUM;
iconProps.style = styles.roleIcon;
return <TableRow icon={<Icon {...iconProps} />} label={item.name} />;
}
function ChannelOverwritesItem(a0) { // fn#71175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:2607, offset: 0x01d17c9e, size: 217 bytes, params: 2, frame: 17
const item = a0.item;
const value = Object.create(null);
value.item = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const rowType = item.rowType;
const ADMINISTRATOR = RowType.ADMINISTRATOR;
if (ADMINISTRATOR === rowType) {
return <RoleItem_71172 item={item} {...value2} />;
}
const ROLE = RowType.ROLE;
if (ROLE === rowType) {
return <RoleItem_71172 item={item} {...value2} />;
}
const OWNER = RowType.OWNER;
if (OWNER === rowType) {
return <MemberItem item={item} {...value2} />;
}
const MEMBER = RowType.MEMBER;
if (MEMBER === rowType) {
return <MemberItem item={item} {...value2} />;
}
const EMPTY_STATE = RowType.EMPTY_STATE;
if (EMPTY_STATE === rowType) {
return <EmptyRoleItem item={item} {...value2} />;
}
return null;
}
function ChannelOverwritesCheckboxItem(a0) { // fn#71176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:3055, offset: 0x01d17d77, size: 185 bytes, params: 2, frame: 22
const checked = a0.checked;
const value = Object.create(null);
value.checked = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: checked});
const channelOverwritesItemBindingProps = {...value2};
channelOverwritesItemBindingProps['accessible'] = true;
channelOverwritesItemBindingProps['accessibilityRole'] = accessibilityRole;
channelOverwritesItemBindingProps['accessibilityState'] = accessibilityState;
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
channelOverwritesItemBindingProps['trailing'] = <FormCheckbox checked={checked} />;
return <ChannelOverwritesItem {...channelOverwritesItemBindingProps} />;
}
function RemoveIconOnPress() { // fn#71168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:639, owner: RemoveIcon.onPress, offset: 0x01d176e3, size: 68 bytes, params: 1, frame: 16
if (onRemove != null) {
return onRemove(item);
}
const itemBinding = item;
removeMemberOrRole(itemBinding.id, itemBinding.name, channelId);
}
function removeMemberOrRole(a0, a1, a2) { // fn#71169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:668, owner: RemoveIcon.onPress.removeMemberOrRole, offset: 0x01d17727, size: 258 bytes, params: 4, frame: 22
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let value = environment.__proto__.__proto__;
value = require(4500) /* metro dependency 4500: AlertModalNative */;
const showConfirmModal = value.showConfirmModal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const GuPYQB = t.GuPYQB;
Reflect.apply(showConfirmModal, value, [{key: 'remove-channel-overwrite-' + a0, title: Reflect.apply(string, intl,
[GuPYQB]), content: intl.format(t.xERCnZ, {name: a1}), confirmText: intl.string(t.fKxYb0),
onConfirm: onConfirm_71170}]);
}
function removeMemberOrRoleOnConfirm() { // fn#71170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:924, owner: RemoveIcon.onPress.removeMemberOrRole.onConfirm, offset: 0x01d17829, size: 69 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value = value.clearPermissionOverwrite(importDefault, env0_0);
value.then(_fun71171);
}
function _fun71171() { // fn#71171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:973, offset: 0x01d1786e, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__.__proto__;
(require(3856) /* metro dependency 3856: ToastUtils */).memberOrRoleRemovedToast(require);
}
@@ -0,0 +1,479 @@
/* Metro module 15185; source: modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx; dependencies: [57, 5, 31, 27, 15186, 1379, 1945, 1938, 1867, 3784, 3793, 1878, 8120, 661, 33, 4501, 697, 1484, 566, 9088, 9089, 9090, 1244, 4805, 4647, 9096, 3789, 4572, 6231, 6808, 1305, 6238, 10504, 11392, 5286, 4863, 8853, 9221, 15187, 15189, 2] */
function _fun116013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:6, offset: 0x02477fc1, size: 622 bytes, params: 8, frame: 22
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 = importDefault(5) /* metro dependency 5 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_7 = value.View;
const env0_8 = value.ScrollView;
const channelSettingsPermissionsStore = importDefault(15186) /* metro dependency 15186: ChannelSettingsPermissionsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_17 = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).SettingMode;
value = require(661) /* metro dependency 661: Constants */;
const env0_18 = value.ChannelTypes;
const env0_19 = value.Permissions;
const env0_20 = value.AnalyticEvents;
const env0_21 = value.ChannelSettingsSections;
const env0_22 = value.SettingsPaneTypes;
value = require(33) /* metro dependency 33 */;
const env0_23 = value.jsx;
const env0_24 = value.jsxs;
object2 = {BASIC: 0};
object2[0] = 'BASIC';
object2.ADVANCED = 1;
object2[1] = 'ADVANCED';
object2.MODERATORS = 2;
object2[2] = 'MODERATORS';
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {'flex': 1, 'paddingTop': 16, backgroundColor: BACKGROUND_BASE_LOWER};
object2.content = {'marginTop': 16, 'flex': 1};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.adminWarning = {marginTop: PX_12};
const env0_26 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx');
exports.default = EasyChannelPermissionSettings;
}
function ChannelPermissionSettingsBasicView({channel, privateToggleState, setPrivateToggleState}) { // fn#116014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:706, offset: 0x0247822f, size: 1584 bytes, params: 2, frame: 39
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
let env0_6 = undefined;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const {guild,
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore,
GuildRoleStore], _fun116016);
env0_6.useLayoutEffect(_fun116017, [value3]);
const value5 = env0_6.useMemo(_fun116018, [guild, sortedGuildRoles, channel]);
if (guild == null) {
return null;
}
if (sortedGuildRoles == null) {
return null;
}
const isCategory2 = channel.isCategory();
const existingMembersRows = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembersRows(GuildMemberStore.getMemberIds(guild?.id),
channel, guild, channel.accessPermissions);
env0_6 = _fun116019();
const value8 = _fun116023();
const isPrivateGuildChannel2 = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).isPrivateGuildChannel(channel);
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
let canEveryoneRole = permissionUtilsModule.canEveryoneRole;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
const canEveryoneRole2 = Reflect.apply(canEveryoneRole, permissionUtilsModule, [VIEW_CHANNEL, guild]);
const moduleValue6 = permissionUtilsModule;
canEveryoneRole = moduleValue6.canEveryoneRole;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
const canEveryoneRole3 = Reflect.apply(canEveryoneRole, moduleValue6, [ADMINISTRATOR, guild]);
const type = channel.type;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value9 = Reflect.apply(string, intl, [t.hfbjIH]);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const r17 = type === GUILD_CATEGORY ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RQUk61) : type !== ChannelTypes.GUILD_VOICE ? value9 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cLjvKg);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
string = intl.string;
const items2 = [<TableRowGroup title={r17} hasIcons={false}><TableSwitchRow label={isCategory2 ? Reflect.apply(string,
intl, [t.lEPAZ5]) : Reflect.apply(string, intl,
[t.aUI70g])} value={privateToggleState} onValueChange={value8} /></TableRowGroup>];
items2[1] = canEveryoneRole3 && <View style={styles.adminWarning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5f3HIC'])}</HelpMessage></View>;
items2[2] = !canEveryoneRole3 && !canEveryoneRole2 && !isPrivateGuildChannel2 && <View style={styles.adminWarning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZAk4Q9)}</HelpMessage></View>;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const CirclePlusIcon = (require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon;
items2[3] = <TableRowGroup hasIcons><TableRow arrow icon={<CirclePlusIcon />} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6)} onPress={onPress_116028} /></TableRowGroup>;
string = intl.string;
const ES4CC6 = (require(1244) /* metro dependency 1244: indexNative */).t.ES4CC6;
items2[4] = <TableRowGroup title={Reflect.apply(string, intl, [ES4CC6])} hasIcons>{value5.map(function(a0) {
return ChannelPermissionSettingsBasicViewRenderRowItem(a0);
})}</TableRowGroup>;
items2[5] = <TableRowGroup hasIcons>{existingMembersRows.map(function(a0) {
return ChannelPermissionSettingsBasicViewRenderRowItem(a0);
})}</TableRowGroup>;
return (
<Stack style={object} spacing={PX_16}>
{items2}
</Stack>
);
}
function onBack() { // fn#116031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:3892, offset: 0x02478d56, size: 39 bytes, params: 1, frame: 11
(importDefault(4647) /* metro dependency 4647: AlertActionCreators */).close();
return false;
}
function EasyChannelPermissionSettings({channelId, origin}) { // fn#116032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:4061, offset: 0x02478d7d, size: 1018 bytes, params: 2, frame: 28
var r0;
var object3;
let env0_4 = undefined;
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(onBack);
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const advancedMode = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSettingsPermissionsStore],
function() {
return ChannelSettingsPermissionsStore.advancedMode;
});
let binding = env0_6;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding,
[channel == null ? advancedMode ? env0_25.ADVANCED : env0_25.BASIC : channel.isGuildStageVoice() ? env0_25.MODERATORS : advancedMode ? env0_25.ADVANCED : env0_25.BASIC]);
binding = env0_4;
const value5 = binding(value4, 2);
let property = value5[0];
env0_4 = value5[1];
const binding3 = env0_6;
useState = binding3.useState;
const channelPermissionsUtilsModule = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
const value6 = binding(Reflect.apply(useState, binding3,
[channelPermissionsUtilsModule.isPrivateGuildChannel(channel)]), 2);
const property2 = value6[0];
const property3 = value6[1];
env0_6.useEffect(function() {
var originBinding = origin;
var property = ChannelSettingsSections.OVERVIEW;
var defaultImport = importDefault(dependencyMap[35]);
var trackWithMetadata = defaultImport.trackWithMetadata;
var SETTINGS_PANE_VIEWED = AnalyticEvents.SETTINGS_PANE_VIEWED;
Reflect.apply(trackWithMetadata, defaultImport, [SETTINGS_PANE_VIEWED, {settings_type: 'channel',
origin_pane: originBinding !== property ? null : SettingsPaneTypes.CHANNEL_SETTINGS,
destination_pane: ChannelSettingsSections.PERMISSIONS}]);
}, [origin]);
const value7 = env0_6.useCallback(_fun116036, [channel]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Mw/UDN'])];
items[1] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0a6awf']);
if (channel?.isGuildStageVoice() === true) {
items.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YIIUJ3));
}
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object5 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: value7};
object5.items = items.map(function(a0) {
return {id: a0, label: a0, page: null};
});
const value9 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object5]);
env0_6.useEffect(_fun116038, [channel, property]);
if (channel != null) {
var viewBindingProps = {style: styles.container};
object3 = {};
object3.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
r0 = <View {...viewBindingProps}><View style={object3}>{((SegmentedControl) => <SegmentedControl state={value9} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View><ScrollView style={styles.content}>{property === env0_25.BASIC ? <ChannelPermissionSettingsBasicView channel={channel} privateToggleState={property2} setPrivateToggleState={property3} /> : property === env0_25.MODERATORS ? ((Component) => <Component channel={channel} />)(importDefault(15187) /* metro dependency 15187: ViewModerators */) : ((Component) => <Component channelId={channel.id} />)(importDefault(15189) /* metro dependency 15189: ChannelSettingsPermissionsOverview */)}</ScrollView></View>;
} else {
r0 = null;
}
return r0;
}
function ChannelPermissionSettingsBasicViewRenderRowItem(a0) { // fn#116015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:2394, owner: ChannelPermissionSettingsBasicView.renderRowItem, offset: 0x0247885f, size: 89 bytes, params: 2, frame: 18
let value = environment.__proto__;
value = importDefault(9096) /* metro dependency 9096: ChannelOverwritesItem */;
const channelBinding = channel;
return ((Component) => <Component item={a0} channelId={channelBinding.id} showType showRemove guildId={channelBinding.guild_id} key={a0.id} />)(value);
}
function _fun116016() { // fn#116016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:888, offset: 0x024788b8, size: 79 bytes, params: 1, frame: 13
const value = environment.__proto__;
const getGuild = GuildStore.getGuild;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
const value3 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channelBinding, [])]);
return {guild: value3, sortedGuildRoles: value3 != null ? GuildRoleStore.getSortedRoles(value3.id) : undefined};
}
function _fun116017() { // fn#116017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1050, offset: 0x02478907, size: 29 bytes, params: 1, frame: 13
env0_3.setOptions({headerRight: undefined});
}
function _fun116018() { // fn#116018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1114, offset: 0x02478924, size: 88 bytes, params: 1, frame: 17
var r0;
var sortedGuildRolesBinding;
var value2;
var moduleValue;
var getExistingRolesRows;
var channelBinding;
let guildBinding = guild;
if (guildBinding == null) {
r0 = [];
} else {
sortedGuildRolesBinding = sortedGuildRoles;
if (sortedGuildRolesBinding == null) {
r0 = [];
} else {
value2 = environment.__proto__;
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
getExistingRolesRows = moduleValue.getExistingRolesRows;
guildBinding = guild;
sortedGuildRolesBinding = sortedGuildRoles;
channelBinding = channel;
r0 = Reflect.apply(getExistingRolesRows, moduleValue, [guildBinding, sortedGuildRolesBinding,
channelBinding,
channelBinding.accessPermissions]);
}
}
return r0;
}
function _fun116019() { // fn#116019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1359, offset: 0x0247897c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_5(_fun116021);
return _fun116022;
}
function _fun116023() { // fn#116023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1707, offset: 0x02478aaf, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_5(_fun116025);
return _fun116027;
}
function ChannelPermissionSettingsBasicViewOnPress() { // fn#116028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:3630, owner: ChannelPermissionSettingsBasicView.onPress, offset: 0x02478d1d, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (channel != null) {
value2 = environment.__proto__;
moduleValue = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
moduleValue.openAddMembersActionSheet(channel);
}
}
function _fun116036(a0) { // fn#116036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:4679, offset: 0x024791f7, size: 151 bytes, params: 2, frame: 16
var binding;
var moduleValue;
const value = environment.__proto__;
const ADVANCED = env1_25.ADVANCED;
if (a0 === ADVANCED) {
(require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */).setAdvancedMode(true);
} else {
binding = env0_5;
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
binding(moduleValue.isPrivateGuildChannel(channel));
(require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */).setAdvancedMode(false);
}
env0_4(a0);
}
function _fun116038() { // fn#116038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:5144, offset: 0x0247928e, size: 140 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const CHANNEL_PERMISSIONS_PAGE_VIEWED = AnalyticEvents.CHANNEL_PERMISSIONS_PAGE_VIEWED;
const object2 = {};
const binding = env0_3;
const BASIC = env1_25.BASIC;
object2.mode = binding === BASIC ? SettingMode.BASIC : SettingMode.ADVANCED;
value = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
object2.channel_is_private = value.isPrivateGuildChannel(channel);
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_PERMISSIONS_PAGE_VIEWED, object2]);
}
function* _fun116021() { // fn#116021, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1379, offset: 0x024789ab, size: 260 bytes, params: 1, frame: 22
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_2;
var binding2 = env3_3;
var isPrivateGuildChannel2 = binding(binding2[19]).isPrivateGuildChannel(require);
var accessPermissions = require.accessPermissions;
var value6 = binding(binding2[19]).flipEveryonePermission(require, accessPermissions, isPrivateGuildChannel2);
var currentUser = env3_16.getCurrentUser();
binding = env3_14;
var can = binding.can;
var ADMINISTRATOR = env3_19.ADMINISTRATOR;
var value8 = Reflect.apply(can, binding, [ADMINISTRATOR, env2_4]);
var r4 = View || currentUser == null;
r4 = !r4 ? value8 : r4;
if (!r4) {
var value10 = env3_2(env3_3[19]);
yield value10.grantUserChannelAccess(require, accessPermissions);
if (false) {
return undefined;
}
}
value = env3_0(env3_3[20]);
yield value.savePermissionUpdates(require.id, [value6]);
}
}
function* _fun116025() { // fn#116025, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1727, offset: 0x02478ade, size: 521 bytes, params: 1, frame: 23
var environment;
var r9;
var r8;
var binding;
var value7;
var binding2;
var intl;
var string;
var t;
var value10;
var computeChannelName;
var channelName;
var binding3;
var format;
var object2;
var binding4;
var value13;
var show;
if (true) {
value = environment.__proto__.__proto__;
if (require.guild_id == null) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
intl = binding(binding2[22]).intl;
string = intl.string;
t = binding(binding2[22]).t;
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl, [t['47gQYL']]);
binding = env3_0;
value10 = binding(env3_3[23]);
computeChannelName = value10.computeChannelName;
binding = env3_16;
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
binding = env3_0;
binding3 = env3_3;
intl = binding(binding3[22]).intl;
format = intl.format;
t = binding(binding3[22]).t;
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
{channelName: channelName}]) : Reflect.apply(format,
intl, [t.rKzX1E, {channelName: channelName}]);
importAll(!importDefault);
binding = env3_1;
binding4 = env3_3;
value13 = binding(binding4[24]);
show = value13.show;
object2 = {title: r9, body: r8};
binding = env3_0;
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
object2.onConfirm = env2_6;
object2.hideActionSheet = false;
object2.onCancel = onCancel_116026;
Reflect.apply(show, value13, [object2]);
} else {
if (importDefault) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
intl = binding(binding2[22]).intl;
string = intl.string;
t = binding(binding2[22]).t;
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl,
[t['47gQYL']]);
binding = env3_0;
value10 = binding(env3_3[23]);
computeChannelName = value10.computeChannelName;
binding = env3_16;
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
binding = env3_0;
binding3 = env3_3;
intl = binding(binding3[22]).intl;
format = intl.format;
t = binding(binding3[22]).t;
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
{channelName: channelName}]) : Reflect.apply(format,
intl, [t.rKzX1E, {channelName: channelName}]);
importAll(!importDefault);
binding = env3_1;
binding4 = env3_3;
value13 = binding(binding4[24]);
show = value13.show;
object2 = {title: r9, body: r8};
binding = env3_0;
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
object2.onConfirm = env2_6;
object2.hideActionSheet = false;
object2.onCancel = onCancel_116026;
Reflect.apply(show, value13, [object2]);
return undefined;
}
binding = env3_0;
var value4 = binding(env3_3[21]);
var checkChattableChannelThresholdMetAfterChannelPermissionDeny = value4.checkChattableChannelThresholdMetAfterChannelPermissionDeny;
var VIEW_CHANNEL = env3_19.VIEW_CHANNEL;
yield Reflect.apply(checkChattableChannelThresholdMetAfterChannelPermissionDeny, value4, [require,
VIEW_CHANNEL]);
var value5 = undefined;
if (false) {
return value5;
}
if (value5) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
intl = binding(binding2[22]).intl;
string = intl.string;
t = binding(binding2[22]).t;
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl,
[t['47gQYL']]);
binding = env3_0;
value10 = binding(env3_3[23]);
computeChannelName = value10.computeChannelName;
binding = env3_16;
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
binding = env3_0;
binding3 = env3_3;
intl = binding(binding3[22]).intl;
format = intl.format;
t = binding(binding3[22]).t;
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
{channelName: channelName}]) : Reflect.apply(format,
intl, [t.rKzX1E, {channelName: channelName}]);
importAll(!importDefault);
binding = env3_1;
binding4 = env3_3;
value13 = binding(binding4[24]);
show = value13.show;
object2 = {title: r9, body: r8};
binding = env3_0;
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
object2.onConfirm = env2_6;
object2.hideActionSheet = false;
object2.onCancel = onCancel_116026;
Reflect.apply(show, value13, [object2]);
return undefined;
}
}
}
}
function onCancel_116026() { // fn#116026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:2293, offset: 0x02478ce7, size: 54 bytes, params: 1, frame: 13
const value3 = env4_2(env4_3[19]);
importAll(value3.isPrivateGuildChannel(require));
}