Files
discord-decomp/sources/modules/channel/useCreateChannelSubmit.tsx
T
2026-07-27 16:20:00 +03:00

751 lines
22 KiB
TypeScript

/* Metro module 9085; source: modules/channel/useCreateChannelSubmit.tsx; dependencies: [5, 57, 31, 661, 1909, 483, 9086, 4002, 1244, 2] */
function _fun71000(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:6, offset: 0x01d119ca, size: 215 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.ChannelTypes;
const env0_8 = constantsModule.Permissions;
object2 = {PREMIUM_CHANNEL: 0};
object2[0] = 'PREMIUM_CHANNEL';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/useCreateChannelSubmit.tsx');
exports.default = useCreateChannelSubmit;
exports.CreateChannelMode = object2;
}
function useCreateChannelSubmit(a0) { // fn#71001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:324, offset: 0x01d11aa1, size: 138 bytes, params: 2, frame: 20
const env0_0 = a0;
const binding = env0_6;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_5;
let value = binding2(value2, 2);
const property = value[0];
const env0_1 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [{}]), 2);
const property2 = value[0];
const env0_2 = value[1];
const useCallback = binding.useCallback;
value = _fun71002();
value = Reflect.apply(useCallback, binding, [value, [a0]]);
return [property, property2, value];
}
function _fun71002() { // fn#71002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:459, offset: 0x01d11b2b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun71004);
return _fun71005;
}
async function _fun71004(a0) { // fn#71004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:479, offset: 0x01d11b63, size: 673 bytes, params: 2, frame: 32
var r15;
var r12;
var errors;
var r2;
var value;
var value2;
var overwrites;
var bitrate;
var userLimit;
var createMode;
var guildId;
var name;
var channelType;
var categoryId;
var value3;
var value4;
var value5;
var PREMIUM_CHANNEL;
var push;
var object2;
var binding;
var binding2;
var PermissionOverwriteType;
var ROLE;
var VIEW_CHANNEL;
var value6;
var getFlag;
var value7;
var binding3;
var property;
var value8;
var createChannel;
var GUILD_CATEGORY;
var value9;
var value10;
var channel;
var value11;
var value12;
var value13;
var body;
var value14;
var id;
var guild_id;
var value15;
var binding4;
var value16;
var AccessibilityAnnouncer;
var announce;
var value17;
var intl;
var formatToPlainString;
var value18;
var t;
var Wke70b;
var value19;
var value20;
var error;
var binding5;
var value21;
var value22;
var string;
var value23;
var value24;
var value25;
var value26;
exceptionLanding100: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
overwrites = a0.overwrites;
bitrate = a0.bitrate;
userLimit = a0.userLimit;
createMode = a0.createMode;
guildId = a0.guildId;
name = a0.name;
channelType = a0.channelType;
categoryId = a0.categoryId;
value = undefined;
await value;
value3 = undefined;
value4 = false;
if (value4) {
return value3;
}
value5 = environment.__proto__.__proto__.__proto__;
PREMIUM_CHANNEL = env3_9.PREMIUM_CHANNEL;
reducibleJoin5: while (true) {
if (createMode !== PREMIUM_CHANNEL) {
break reducibleJoin5;
}
push = overwrites.push;
object2 = {id: guildId};
binding = env3_0;
binding2 = env3_3;
PermissionOverwriteType = binding(binding2[4]).PermissionOverwriteType;
ROLE = PermissionOverwriteType.ROLE;
object2.type = ROLE;
VIEW_CHANNEL = env3_8.VIEW_CHANNEL;
object2.deny = VIEW_CHANNEL;
binding = env3_2;
value6 = binding(binding2[5]);
getFlag = value6.getFlag;
object2.allow = Reflect.apply(getFlag, value6, [0]);
Reflect.apply(push, overwrites, [object2]);
break reducibleJoin5;
}
value7 = environment.__proto__.__proto__;
importDefault(true);
reducibleJoin7: while (true) {
reduciblePort99: while (true) {
exceptionLanding68: while (true) {
try {
try {
binding = env3_1;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
break reducibleJoin7;
}
try {
binding = env3_0;
} catch (error) {
break exceptionLanding100;
}
try {
binding5 = env3_3;
} catch (error) {
break exceptionLanding100;
}
try {
property = binding5[7];
} catch (error) {
break exceptionLanding100;
}
try {
value21 = binding(property);
} catch (error) {
break exceptionLanding100;
}
try {
AccessibilityAnnouncer = value21.AccessibilityAnnouncer;
} catch (error) {
break exceptionLanding100;
}
try {
announce = AccessibilityAnnouncer.announce;
} catch (error) {
break exceptionLanding100;
}
try {
property = binding5[8];
} catch (error) {
break exceptionLanding100;
}
try {
value22 = binding(property);
} catch (error) {
break exceptionLanding100;
}
try {
intl = value22.intl;
} catch (error) {
break exceptionLanding100;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding100;
}
try {
property = binding5[8];
} catch (error) {
break exceptionLanding100;
}
try {
value23 = binding(property);
} catch (error) {
break exceptionLanding100;
}
try {
t = value23.t;
} catch (error) {
break exceptionLanding100;
}
try {
property = t['0SbUzm'];
} catch (error) {
break exceptionLanding100;
}
try {
value24 = Reflect.apply(string, intl, [property]);
} catch (error) {
break exceptionLanding100;
}
try {
Reflect.apply(announce, AccessibilityAnnouncer, [value24]);
} catch (error) {
break exceptionLanding100;
}
try {
} catch (error) {
break exceptionLanding100;
}
try {
body = error.body;
} catch (error) {
break exceptionLanding100;
}
try {
value25 = body == null;
} catch (error) {
break exceptionLanding100;
}
reducibleJoin93: while (true) {
if (value25) {
errors = value;
break reducibleJoin93;
}
try {
errors = body.errors;
} catch (error) {
break exceptionLanding100;
}
break reducibleJoin93;
}
try {
value26 = errors != null;
} catch (error) {
break exceptionLanding100;
}
if (value26) {
r2 = errors;
} else {
try {
object2 = {};
} catch (error) {
break exceptionLanding100;
}
r2 = object2;
}
try {
importAll(r2);
} catch (error) {
break exceptionLanding100;
}
break reduciblePort99;
}
importDefault(false);
return value;
}
try {
try {
binding3 = env3_3;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding3[6];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
createChannel = value8.createChannel;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.guildId = guildId;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.type = channelType;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.name = name;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.permissionOverwrites = overwrites;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.bitrate = bitrate;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.userLimit = userLimit;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
binding = env3_7;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
GUILD_CATEGORY = binding.GUILD_CATEGORY;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
value9 = null;
try {
try {
value10 = channelType === GUILD_CATEGORY;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
reducibleJoin25: while (true) {
if (value10) {
r15 = value9;
break reducibleJoin25;
}
r15 = categoryId;
break reducibleJoin25;
}
try {
try {
object2.parentId = r15;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
channel = Reflect.apply(createChannel, value8, [object2]);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
await channel;
try {
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value12) {
importDefault(false);
return value11;
}
try {
try {
value13 = value9 == value11;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
reducibleJoin66: while (true) {
if (value13) {
break reducibleJoin66;
}
try {
try {
body = value11.body;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value14 = value9 != body;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value14) {
r12 = body;
} else {
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
r12 = object2;
}
try {
try {
id = r12.id;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
guild_id = r12.guild_id;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value15 = value9 == id;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value15) {
break reducibleJoin66;
}
try {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
binding4 = env3_3;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding4[7];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
AccessibilityAnnouncer = value16.AccessibilityAnnouncer;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
announce = AccessibilityAnnouncer.announce;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding4[8];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value17 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
intl = value17.intl;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding4[8];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value18 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
t = value18.t;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
Wke70b = t.Wke70b;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.name = name;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value19 = Reflect.apply(formatToPlainString, intl, [Wke70b, object2]);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
Reflect.apply(announce, AccessibilityAnnouncer, [value19]);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value20 = value9 == require;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value20) {
break reducibleJoin66;
}
try {
try {
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
require(id, guild_id);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
break reducibleJoin66;
}
importDefault(false);
return value;
}
importDefault(false);
throw error;
}