Files
discord-decomp/sources/lib/guild/subscribeGuildMembers.tsx
T
2026-07-28 01:06:53 +03:00

207 lines
13 KiB
TypeScript

/* Metro module 6902; source: lib/guild/subscribeGuildMembers.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 22, 6903, 628, 1216, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
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 JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as GuildSubscriptionsActionCreatorsModule from '../../actions/GuildSubscriptionsActionCreators.tsx'; /* Metro dependency 6903 */
function _fun54904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:6, offset: 0x01370aa8, size: 287 bytes, params: 8, frame: 19
let env0_0 = require;
const env0_3 = ['forwardedRef'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('lib/guild/subscribeGuildMembers.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return _fun54909;
};
exports.MAX_GUILD_MEMBER_SUBSCRIPTIONS = 50;
exports.useSubscribeGuildMembers = useSubscribeGuildMembers;
function _isNativeReflectConstruct_54905() { // fn#54905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:205, offset: 0x01370bc7, size: 94 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_54905_isNativeReflectConstruct = function() {
return !!result;
})();
}
function subscribeGuildMembers(a0) { // fn#54908, offset: 0x01370c25, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun54909;
function _fun54909(a0) { // fn#54909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:529, offset: 0x01370c35, size: 152 bytes, params: 2, frame: 17
const env0_0 = a0;
value = 'SubscribeGuildMembersContainer(' + (a0.displayName ?? a0.name ?? 'Component') + ')';
const binding = env1_10;
const Component = binding.Component;
_fun54910(Component).displayName = value;
const value4 = binding.forwardRef(_fun54919);
value4.displayName = 'ForwardRef(' + value + ')';
return value4;
function _fun54910(a0) { // fn#54910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:681, offset: 0x01370ccd, size: 114 bytes, params: 2, frame: 16
const WrappedComponent_549112 = WrappedComponent_54911;
env2_9(WrappedComponent_549112, a0);
return env2_6(WrappedComponent_549112, [{key: 'componentDidUpdate', value: value_54913},
{key: 'componentWillUnmount', value: value_54916}, {key: 'render', value: value_54918}]);
function WrappedComponent_54911(a0) { // fn#54911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:693, offset: 0x01370d3f, size: 171 bytes, params: 2, frame: 21
var environment;
const value = environment.__proto__.__proto__.__proto__;
env3_5(this, WrappedComponent_54911);
const items2 = [a0];
const value3 = env3_8(WrappedComponent_54911);
const value6 = env3_7(this, _isNativeReflectConstruct_54905() ? global.Reflect.construct(value3, items2,
env3_8(this).constructor) : value3.apply(this, items2));
const value8 = env2_0(a0);
(Module00022).forEach(value8, _fun54912);
value6._subscriptions = value8;
return value6;
function _fun54912(a0, a1) { // fn#54912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:951, offset: 0x01370dea, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).subscribeMembers(a1, a0);
}
}
function value_54913(a0) { // fn#54913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1092, offset: 0x01370e17, size: 219 bytes, params: 2, frame: 19
var environment;
var r5;
var value2;
var value3;
var value4;
var defaultImport2;
var defaultImport3;
const value = environment.__proto__.__proto__.__proto__;
if (!(importDefault(628) /* metro dependency 628: shallowEqual */)(this.props, a0)) {
value2 = environment.__proto__.__proto__;
value3 = env2_0(this.props);
value4 = this._subscriptions != null;
if (value4) {
defaultImport2 = importDefault(22) /* metro dependency 22 */;
r5 = defaultImport2.isEqual(this._subscriptions, value3);
} else {
r5 = value4;
}
if (!r5) {
if (this._subscriptions != null) {
defaultImport3 = importDefault(22) /* metro dependency 22 */;
defaultImport3.forEach(this._subscriptions, _fun54914);
}
(importDefault(22) /* metro dependency 22 */).forEach(value3, _fun54915);
this._subscriptions = value3;
}
}
function _fun54914(a0, a1) { // fn#54914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1284, offset: 0x01370ef2, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).unsubscribeMembers(a1, a0);
}
function _fun54915(a0, a1) { // fn#54915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1344, offset: 0x01370dea, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).subscribeMembers(a1, a0);
}
}
function value_54916() { // fn#54916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1443, offset: 0x01370f1f, size: 68 bytes, params: 1, frame: 13
var environment;
var value;
if (this._subscriptions != null) {
value = environment.__proto__.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._subscriptions, _fun54917);
}
function _fun54917(a0, a1) { // fn#54917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1518, offset: 0x01370ef2, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).unsubscribeMembers(a1, a0);
}
}
function value_54918() { // fn#54918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1581, offset: 0x01370f63, size: 65 bytes, params: 1, frame: 15
const props = this.props;
return ((Component) => <Component ref={props.forwardedRef} {...env3_4(props, env3_3)} />)(env1_0);
}
}
function _fun54919(a0, a1) { // fn#54919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1714, offset: 0x01370fa4, size: 48 bytes, params: 3, frame: 14
return ((Component) => <Component {...a0} {...{['forwardedRef']: a1}} />)(env0_1);
}
}
}
function useSubscribeGuildMembers(a0, a1) { // fn#54920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1859, offset: 0x01370fd4, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
ReactModule.useEffect(_fun54921, [a0, a1]);
function _fun54921() { // fn#54921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1911, offset: 0x0137100b, size: 57 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(env0_0, _fun54922);
return _fun54923;
function _fun54922(a0, a1) { // fn#54922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1935, offset: 0x01371044, size: 150 bytes, params: 3, frame: 17
var defaultImport;
var captureMessage;
var value4;
const value = environment.__proto__.__proto__;
if (!env2_12 && a0.length > 50) {
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
captureMessage = defaultImport.captureMessage;
value4 = environment.__proto__;
Reflect.apply(captureMessage, defaultImport, ['SubscribeGuildMembers called with more than 50 userIds.',
{extra: {count: a0.length, guildId: a1, reason: require}}]);
}
(GuildSubscriptionsActionCreatorsModule).subscribeMembers(a1, a0);
}
function _fun54923() { // fn#54923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2127, offset: 0x013710da, size: 52 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(env1_0, _fun54924);
function _fun54924(a0, a1) { // fn#54924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2151, offset: 0x0137110e, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).unsubscribeMembers(a1, a0);
}
}
}
}
}
global.__d(_fun54904, 6902, [29, 6, 7, 15, 17, 18, 31, 33, 22, 6903, 628, 1216,
2]) /* metro module 6902, dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 22, 6903, 628, 1216, 2] */;