642 lines
31 KiB
TypeScript
642 lines
31 KiB
TypeScript
/* Metro module 14997; source: modules/guild_settings/native/GuildSettingsModalMembers.tsx; dependencies: [57, 31, 27, 1226, 4111, 1945, 1938, 1867, 1878, 9113, 661, 33, 7234, 4501, 697, 1484, 11428, 4617, 3995, 1244, 12140, 1585, 3860, 566, 9088, 8811, 14998, 5277, 9139, 6593, 9112, 21, 3869, 6984, 8416, 1305, 8754, 5462, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
|
|
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
|
|
import GuildMemberCountStore from '../../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
|
|
import Autocompleter from '../../autocompleter/index.tsx'; /* Metro dependency 7234 */
|
|
import GuildSettingsStore from '../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
|
|
import Module09139 from '../../../by-id/module-09139.js'; /* Metro dependency 9139 */
|
|
import RolePill from '../../../components_native/common/RolePill.tsx'; /* Metro dependency 11428 */
|
|
import DetailedGuildIdentityUserRow from './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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
|
|
import * as NavScrimAndroidModule from '../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
|
|
import * as SearchFieldNativeModule from '../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
|
|
import * as AutocompleterModule from '../../autocompleter/index.tsx'; /* Metro dependency 7234 */
|
|
import * as ContextMenuNativeModule from '../../../design/components/ContextMenu/native/ContextMenu.native.tsx'; /* Metro dependency 8811 */
|
|
|
|
function _fun113338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:6, offset: 0x023f4eba, size: 538 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_113341 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
let value2 = JsxRuntimeModule;
|
|
const env0_14 = value2.jsx;
|
|
const env0_15 = value2.jsxs;
|
|
const env0_16 = value2.Fragment;
|
|
const AutocompleterResultTypes = (AutocompleterModule).AutocompleterResultTypes;
|
|
const USER = AutocompleterResultTypes.USER;
|
|
object = [USER];
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object.containerInner = {paddingHorizontal: PX_12, flex: 1};
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object.searchFieldContainer = {paddingVertical: PX_12};
|
|
object.roleList = {'flexDirection': 'row', 'flexWrap': 'wrap', 'overflow': 'hidden', 'paddingTop': 4};
|
|
const env0_18 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
const env0_19 = value.memo(_fun113342);
|
|
value = value.memo(GuildSettingsModalMembers);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMembers.tsx');
|
|
exports.default = value;
|
|
function _createForOfIteratorHelperLoose_113339(a0, a1) { // fn#113339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:283, offset: 0x023f50d4, size: 372 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun113340;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_113341(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_113341(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_113341(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun113340;
|
|
}
|
|
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 _fun113340() { // fn#113340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:854, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function _fun113342({guild, guildMember, sortedGuildRoles, start, end}) { // fn#113342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:1480, offset: 0x023f5248, size: 569 bytes, params: 2, frame: 30
|
|
var r1;
|
|
var r18;
|
|
var r9;
|
|
var userStoreBinding;
|
|
var value9;
|
|
var defaultImport;
|
|
var value14;
|
|
var intl;
|
|
const styles = useStyles();
|
|
const env0_2 = (UseNavigationNativeModule).useNavigation();
|
|
if (guild == null) {
|
|
return null;
|
|
}
|
|
let userId = guildMember.userId;
|
|
const r8 = userId === guild.ownerId && AuthenticationStore.getId() === guild.ownerId;
|
|
const value7 = sortedGuildRoles.filter(function(a0) {
|
|
return guildMember.roles.includes(a0.id);
|
|
});
|
|
const value8 = value7.map(_fun113344);
|
|
if (value7.length > 0) {
|
|
userStoreBinding = UserStore;
|
|
value9 = userStoreBinding.getUser(guildMember.userId);
|
|
defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
|
|
r1 = defaultImport.getNickname(guild.id, undefined,
|
|
value9) ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(value9);
|
|
r1 = r1 ?? value9?.username;
|
|
r18 = r1 ?? '';
|
|
value14 = value7.map(function(a0) {
|
|
return a0.name;
|
|
}).join(', ');
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r9 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['6eGpWx'],
|
|
{memberName: r18, roleNames: value14});
|
|
} else {
|
|
r9 = undefined;
|
|
}
|
|
userId = guildMember.userId;
|
|
return (
|
|
<DetailedGuildIdentityUserRow
|
|
userId={userId}
|
|
guildId={guild.id}
|
|
accessibilityLabel={r9}
|
|
subLabel={value8.length > 0
|
|
? (
|
|
<View style={styles.roleList} pointerEvents="none">
|
|
{value8}
|
|
</View>
|
|
)
|
|
: null}
|
|
disabled={r8}
|
|
onPress={onPress_113346}
|
|
arrow
|
|
start={start}
|
|
end={end}
|
|
/>
|
|
);
|
|
function _fun113344(a0) { // fn#113344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:1709, offset: 0x023f54a2, size: 69 bytes, params: 2, frame: 16
|
|
const value = environment.__proto__;
|
|
return ((Component) => <Component role={a0} guildId={guild.id} key={a0.id} />)(RolePill);
|
|
}
|
|
|
|
function onPress_113346() { // fn#113346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:2217, offset: 0x023f54e7, size: 50 bytes, params: 1, frame: 14
|
|
const binding = env0_2;
|
|
const push = binding.push;
|
|
const MEMBER_EDIT = GuildSettingsSections.MEMBER_EDIT;
|
|
const userId = guildMember.userId;
|
|
Reflect.apply(push, binding, [MEMBER_EDIT, {userId: userId}]);
|
|
}
|
|
|
|
}
|
|
|
|
function GuildSettingsModalMembers({guildId}) { // fn#113347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:2305, offset: 0x023f5519, size: 1340 bytes, params: 2, frame: 39
|
|
var r8;
|
|
var EmptyState;
|
|
var FlashList;
|
|
var object3;
|
|
var object4;
|
|
let value2 = (UseNavigationNativeModule).useNavigation();
|
|
const styles = useStyles();
|
|
const bottom = (UseSafeAreaInsetsNative)().bottom;
|
|
const useToken = UseTokenModule.useToken;
|
|
const TABLE_ROW_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_HEIGHT;
|
|
let value3 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_HEIGHT]);
|
|
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore,
|
|
GuildRoleStore], function() {
|
|
var object = {};
|
|
var guildStoreBinding = GuildStore;
|
|
var guildIdBinding = guildId;
|
|
object.guild = guildStoreBinding.getGuild(guildIdBinding);
|
|
object.guildLoaded = guildStoreBinding.getGuild(guildIdBinding) != null;
|
|
object.sortedGuildRoles = GuildRoleStore.getSortedRoles(guildIdBinding);
|
|
return object;
|
|
});
|
|
const guild = value4.guild;
|
|
const guildLoaded = value4.guildLoaded;
|
|
const guildLoaded2 = guildLoaded;
|
|
const sortedGuildRoles = value4.sortedGuildRoles;
|
|
const sortedGuildRoles2 = sortedGuildRoles;
|
|
const selectedRoleId = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
|
|
function() {
|
|
return GuildSettingsStore.getProps().selectedRoleId;
|
|
});
|
|
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberCountStore],
|
|
function() {
|
|
var value2 = GuildMemberCountStore.getMemberCount(guildId);
|
|
var value3 = 0;
|
|
var r3 = value2 ?? value3;
|
|
return r3 > value3 && r3 <= 10000 && guildLoaded;
|
|
}, [guildId, guildLoaded]);
|
|
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore],
|
|
function() {
|
|
return GuildMemberStore.getMembers(guildId);
|
|
}, [guildId]);
|
|
const binding = sortedGuildRoles2;
|
|
let useState = binding.useState;
|
|
const value7 = Reflect.apply(useState, binding, [[]]);
|
|
const binding2 = guildLoaded2;
|
|
const value8 = binding2(value7, 2);
|
|
let property = value8[0];
|
|
const env0_9 = value8[1];
|
|
useState = binding.useState;
|
|
const value9 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property2 = value9[0];
|
|
const env0_11 = value9[1];
|
|
useState = binding.useState;
|
|
const value10 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property3 = value10[0];
|
|
const env0_13 = value10[1];
|
|
useState = binding.useState;
|
|
const value11 = binding2(Reflect.apply(useState, binding, [_fun113352]), 2);
|
|
const property4 = value11[0];
|
|
value11[1];
|
|
const value12 = binding.useMemo(_fun113354, [guildId, value6, property, selectedRoleId, property2]);
|
|
const value13 = value12.length - 1;
|
|
binding.useEffect(_fun113357, [guild, value2]);
|
|
binding.useEffect(_fun113360, [value5, guildId]);
|
|
binding.useEffect(_fun113361, [guildId, guildLoaded, property4]);
|
|
useState = binding.useState;
|
|
const value14 = binding2(Reflect.apply(useState, binding, ['']), 2);
|
|
property = value14[0];
|
|
const env0_18 = value14[1];
|
|
const value15 = binding.useCallback(_fun113363, [guildLoaded, guildId, property4]);
|
|
binding.useEffect(_fun113364, [value12, property, property3]);
|
|
const value16 = binding.useCallback(_fun113365, [guild, value13, sortedGuildRoles]);
|
|
const value17 = binding.useCallback(function(a0) {
|
|
return a0.userId;
|
|
}, []);
|
|
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
|
const SearchField = (SearchFieldNativeModule).SearchField;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
const view = (
|
|
<View style={styles.searchFieldContainer}>
|
|
<SearchField
|
|
size="md"
|
|
placeholder={Reflect.apply(string, intl, [t.pYHobK])}
|
|
onChange={value15}
|
|
isRound
|
|
/>
|
|
</View>
|
|
);
|
|
if (value12.length !== 0) {
|
|
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
|
object3 = {keyExtractor: value17, data: value12, renderItem: value16, estimatedItemSize: value3};
|
|
object4 = {};
|
|
object4.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.contentContainerStyle = object4;
|
|
r8 = <FlashList {...object3} />;
|
|
} else {
|
|
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
|
r8 = (
|
|
<EmptyState
|
|
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
|
|
title={intl.string(t.qVQ9ud)}
|
|
body={intl.string(t.oB9grQ)}
|
|
/>
|
|
);
|
|
}
|
|
const view2 = (
|
|
<View style={styles.containerInner}>
|
|
{view}
|
|
{r8}
|
|
</View>
|
|
);
|
|
const NavScrim = (NavScrimAndroidModule).NavScrim;
|
|
return (
|
|
<>
|
|
{view2}
|
|
<NavScrim />
|
|
</>
|
|
);
|
|
function _fun113352() { // fn#113352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:3049, offset: 0x023f5b17, size: 63 bytes, params: 1, frame: 15
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const defaultImport = Autocompleter;
|
|
const binding = env1_17;
|
|
value = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
|
const defaultImport2 = new defaultImport(_fun113353, binding, 100);
|
|
return defaultImport2 instanceof Object ? defaultImport2 : value;
|
|
function _fun113353(a0) { // fn#113353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:3068, offset: 0x023f5b56, size: 30 bytes, params: 2, frame: 12
|
|
env1_9(a0);
|
|
env1_13(false);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun113354() { // fn#113354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:3129, offset: 0x023f5b74, size: 298 bytes, params: 1, frame: 23
|
|
var r4;
|
|
var r3;
|
|
var r11;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var userStoreBinding;
|
|
var getUser;
|
|
var userId;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var type;
|
|
var AutocompleterResultTypes;
|
|
var USER;
|
|
var guildMemberStoreBinding;
|
|
var getMember;
|
|
var guildIdBinding;
|
|
var record;
|
|
var id;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
const items2 = [];
|
|
const guildRoleIsFiltered2 = guildRoleIsFiltered;
|
|
var value;
|
|
const binding = env0_10;
|
|
const _createForOfIteratorHelperLoose_113339Binding = _createForOfIteratorHelperLoose_113339;
|
|
if (binding) {
|
|
value8 = _createForOfIteratorHelperLoose_113339Binding(env0_8);
|
|
value9 = value8();
|
|
done = value9.done;
|
|
if (!done) {
|
|
r3 = value9;
|
|
while (true) {
|
|
value10 = r3.value;
|
|
type = value10.type;
|
|
AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
|
|
USER = AutocompleterResultTypes.USER;
|
|
if (type === USER) {
|
|
guildMemberStoreBinding = GuildMemberStore;
|
|
getMember = guildMemberStoreBinding.getMember;
|
|
guildIdBinding = guildId;
|
|
record = value10.record;
|
|
id = record.id;
|
|
value11 = Reflect.apply(getMember, guildMemberStoreBinding, [guildIdBinding, id]);
|
|
value12 = value11 == null;
|
|
if (value12) {
|
|
r11 = value12;
|
|
continue;
|
|
}
|
|
value13 = guildRoleIsFiltered2(value11);
|
|
r11 = value13;
|
|
if (r11) {
|
|
break;
|
|
}
|
|
items2.push(value11);
|
|
break;
|
|
}
|
|
value14 = value8();
|
|
done = value14.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r3 = value14;
|
|
continue;
|
|
}
|
|
}
|
|
} else {
|
|
value = _createForOfIteratorHelperLoose_113339Binding(env0_7);
|
|
value3 = value();
|
|
done = value3.done;
|
|
if (!done) {
|
|
r4 = value3;
|
|
while (true) {
|
|
value4 = r4.value;
|
|
userStoreBinding = UserStore;
|
|
getUser = userStoreBinding.getUser;
|
|
userId = value4.userId;
|
|
value5 = Reflect.apply(getUser, userStoreBinding, [userId]) == null;
|
|
if (value5) {
|
|
r3 = value5;
|
|
} else {
|
|
value6 = guildRoleIsFiltered2(value4);
|
|
r3 = value6;
|
|
}
|
|
if (r3) {
|
|
continue;
|
|
}
|
|
items2.push(value4);
|
|
value7 = value();
|
|
done = value7.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r4 = value7;
|
|
continue;
|
|
}
|
|
}
|
|
items2.sort(_fun113356);
|
|
}
|
|
return items2;
|
|
function guildRoleIsFiltered(a0) { // fn#113355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:3163, offset: 0x023f5c9e, size: 103 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var value3;
|
|
var moduleValue;
|
|
var roles;
|
|
let value = environment.__proto__;
|
|
const value2 = selectedRoleId != null;
|
|
if (value2) {
|
|
value3 = environment.__proto__.__proto__;
|
|
moduleValue = require(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
|
|
r0 = !moduleValue.isEveryoneRoleId(guildId, selectedRoleId);
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
if (r0) {
|
|
roles = a0.roles;
|
|
value = roles.indexOf(selectedRoleId);
|
|
value = value === -1;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun113356(a0, a1) { // fn#113356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:3596, offset: 0x023f5d05, size: 150 bytes, params: 3, frame: 15
|
|
var r0;
|
|
var value;
|
|
var userStoreBinding;
|
|
const nick = a0.nick;
|
|
if (nick != null) {
|
|
r0 = nick;
|
|
} else {
|
|
value = environment.__proto__.__proto__;
|
|
userStoreBinding = UserStore;
|
|
value = userStoreBinding.getUser(a0.userId);
|
|
r0 = value?.username;
|
|
}
|
|
value = '';
|
|
return (r0 ?? value).localeCompare(a1.nick ?? UserStore.getUser(a1.userId)?.username ?? value);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun113357() { // fn#113357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:3868, offset: 0x023f5d9b, size: 38 bytes, params: 1, frame: 12
|
|
const binding = env0_1;
|
|
binding.setOptions({headerRight: headerRight_113358});
|
|
function headerRight_113358() { // fn#113358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:3899, offset: 0x023f5dc1, size: 123 bytes, params: 1, frame: 18
|
|
var environment;
|
|
var r4;
|
|
let value = environment.__proto__.__proto__;
|
|
const ContextMenu = (ContextMenuNativeModule).ContextMenu;
|
|
if (guild != null) {
|
|
value = require(14998) /* metro dependency 14998: showMembersManagementActionSheet */;
|
|
value = value.getMembersManagementActions({guild: guild});
|
|
r4 = value;
|
|
} else {
|
|
r4 = [];
|
|
}
|
|
return (
|
|
<ContextMenu items={r4}>
|
|
{children_113359}
|
|
</ContextMenu>
|
|
);
|
|
function headerRight_113358Children(a0) { // fn#113359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:4003, owner: headerRight_113358.children, offset: 0x023f5e3c, size: 158 bytes, params: 2, frame: 21
|
|
const ref = a0.ref;
|
|
const value = Object.create(null);
|
|
value.ref = 0;
|
|
const value2 = copyDataProperties({}, a0, value, undefined);
|
|
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
|
|
const headerActionButtonProps = {source: Module09139};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ogxXGq);
|
|
headerActionButtonProps.ref = ref;
|
|
copyDataProperties(headerActionButtonProps, value2, value);
|
|
return <HeaderActionButton {...headerActionButtonProps} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun113360() { // fn#113360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:4167, offset: 0x023f5eda, size: 68 bytes, params: 1, frame: 17
|
|
var value2;
|
|
var defaultImport;
|
|
if (env0_6) {
|
|
value2 = environment.__proto__;
|
|
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
|
|
defaultImport.requestMembers(guildId, '', 10000, false);
|
|
}
|
|
}
|
|
|
|
function _fun113361() { // fn#113361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:4234, offset: 0x023f5f1e, size: 60 bytes, params: 1, frame: 13
|
|
if (guildLoaded) {
|
|
env0_14.setOptions({userFilters: {guild: guildId, strict: true}});
|
|
}
|
|
return _fun113362;
|
|
function _fun113362() { // fn#113362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:4290, offset: 0x023f5f5a, size: 91 bytes, params: 1, frame: 15
|
|
var value2;
|
|
var defaultImport;
|
|
var selectRole;
|
|
var defaultImport2;
|
|
if (guildLoaded) {
|
|
value2 = environment.__proto__.__proto__;
|
|
defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
|
selectRole = defaultImport.selectRole;
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
Reflect.apply(selectRole, defaultImport, [defaultImport2.castGuildIdAsEveryoneGuildRoleId(guildId)]);
|
|
}
|
|
env1_14.destroy();
|
|
}
|
|
|
|
}
|
|
|
|
function _fun113363(a0) { // fn#113363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:4449, offset: 0x023f5fb5, size: 116 bytes, params: 2, frame: 16
|
|
var binding;
|
|
const value2 = undefined;
|
|
env0_18(a0);
|
|
const value4 = a0.trim() !== '';
|
|
env0_11(value4);
|
|
if (value4) {
|
|
env0_13(true);
|
|
binding = env0_14;
|
|
binding.search(a0, guildLoaded ? guildId : value2);
|
|
} else {
|
|
env0_14.clear();
|
|
env0_13(false);
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function _fun113364() { // fn#113364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:4558, offset: 0x023f6029, size: 228 bytes, params: 1, frame: 17
|
|
var r2;
|
|
var length;
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
var value;
|
|
if (env0_17.trim() !== '') {
|
|
if (!env0_12) {
|
|
length = env0_15.length;
|
|
if (length > 0) {
|
|
value = environment.__proto__;
|
|
value = intl.formatToPlainString(t.ZGVL3g, {count: length});
|
|
r2 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = intl.string(t.oB9grQ);
|
|
r2 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun113365({item, index}) { // fn#113365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15194:4791, offset: 0x023f610d, size: 83 bytes, params: 2, frame: 16
|
|
return ((Component) => <Component guild={guild} guildMember={item} sortedGuildRoles={sortedGuildRoles} start={index === 0} end={index === env0_16} />)(env1_19);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun113338, 14997, [57, 31, 27, 1226, 4111, 1945, 1938, 1867, 1878, 9113, 661, 33, 7234, 4501, 697, 1484,
|
|
11428, 4617, 3995, 1244, 12140, 1585, 3860, 566, 9088, 8811, 14998, 5277, 9139, 6593, 9112, 21, 3869, 6984,
|
|
8416, 1305, 8754, 5462,
|
|
2]) /* metro module 14997, dependencies: [57, 31, 27, 1226, 4111, 1945, 1938, 1867, 1878, 9113, 661, 33, 7234, 4501, 697, 1484, 11428, 4617, 3995, 1244, 12140, 1585, 3860, 566, 9088, 8811, 14998, 5277, 9139, 6593, 9112, 21, 3869, 6984, 8416, 1305, 8754, 5462, 2] */;
|