decord/source/stores/CreateInviteModalStore.tsx

243 lines
6.4 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 8527
// Function ID: 67888
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-24 07:16:23 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1348, 1838, 7543, 653, 8528, 8530, 44, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-24 07:16:23 +00:00
// Module 8527 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
import closure_8 from "_isNativeReflectConstruct";
import closure_9 from "_createForOfIteratorHelperLoose";
import closure_10 from "_isNativeReflectConstruct";
import { FormStates } from "ME";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
function updateWithLatestInvite(channelId, arg1) {
let targetApplicationId;
let targetType;
let targetUserId;
({ targetType, targetUserId, targetApplicationId } = arg1);
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(channelId);
2026-07-20 16:05:17 +00:00
let guild_id;
if (null != channel) {
guild_id = channel.guild_id;
}
2026-07-23 10:11:24 +00:00
guild = guild.getGuild(guild_id);
2026-07-24 07:16:23 +00:00
let obj = require(8530) /* getDefaultInviteExpiration */;
2026-07-20 16:05:17 +00:00
let maxAge = obj.getDefaultInviteExpiration({ guild });
const invite2 = invite.getInvite(channelId, { targetType, targetUserId, targetApplicationId });
obj = { channelId };
if (null != invite2) {
maxAge = invite2.maxAge;
}
obj.maxAge = maxAge;
if (null != invite2) {
let maxUses = invite2.maxUses;
} else {
2026-07-23 10:11:24 +00:00
maxUses = closure_18;
2026-07-20 16:05:17 +00:00
}
obj.maxUses = maxUses;
let temporary = null != invite2;
if (temporary) {
temporary = invite2.temporary;
}
obj.temporary = temporary;
let num = 0;
if (null != invite2) {
num = invite2.flags;
}
obj.flags = num;
obj.targetType = targetType;
obj.targetUserId = targetUserId;
obj.targetApplicationId = targetApplicationId;
let mapped;
if (null != invite2) {
const roles = invite2.roles;
if (null != roles) {
mapped = roles.map((id) => id.id);
}
}
if (null == mapped) {
mapped = [];
}
obj.roleIds = mapped;
}
function init(guildId) {
guildId = guildId.guildId;
2026-07-23 10:11:24 +00:00
let c13 = null;
2026-07-20 16:05:17 +00:00
const targetType = guildId.targetType;
let tmp = null;
if (null != targetType) {
tmp = targetType;
}
const targetUserId = guildId.targetUserId;
let tmp2 = null;
if (null != targetUserId) {
tmp2 = targetUserId;
}
const targetApplicationId = guildId.targetApplicationId;
let tmp3 = null;
if (null != targetApplicationId) {
tmp3 = targetApplicationId;
}
const obj = { targetType: tmp, targetUserId: tmp2, targetApplicationId: tmp3 };
updateWithLatestInvite(guildId.channelId, obj);
}
2026-07-23 10:11:24 +00:00
const value = require("_createForOfIteratorHelperLoose").INVITE_OPTIONS_UNLIMITED.value;
let CLOSED = FormStates.CLOSED;
let c20 = false;
let tmp2 = ((Store) => {
2026-07-20 16:05:17 +00:00
class CreateInviteModalStore {
constructor() {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_3(this, CreateInviteModalStore);
obj = outer1_6(CreateInviteModalStore);
tmp2 = outer1_5;
if (outer1_21()) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_6;
2026-07-20 16:05:17 +00:00
tmp8 = arguments;
2026-07-23 10:11:24 +00:00
constructResult = Reflect.construct(obj, arguments, outer1_6(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(CreateInviteModalStore, Store);
let obj = {
key: "initialize",
value() {
2026-07-23 10:11:24 +00:00
this.waitFor(outer1_8, outer1_9, outer1_10);
2026-07-20 16:05:17 +00:00
}
};
const items = [obj, , , , , , , , , , ];
obj = {
key: "init",
value() {
2026-07-23 10:11:24 +00:00
this.waitFor(outer1_10);
2026-07-20 16:05:17 +00:00
}
};
items[1] = obj;
obj = {
key: "isOpen",
value() {
2026-07-23 10:11:24 +00:00
return outer1_19 !== outer1_11.CLOSED;
2026-07-20 16:05:17 +00:00
}
};
items[2] = obj;
items[3] = {
key: "isSubmitting",
value() {
2026-07-23 10:11:24 +00:00
return outer1_20;
2026-07-20 16:05:17 +00:00
}
};
items[4] = {
key: "getGuildId",
value() {
2026-07-23 10:11:24 +00:00
return outer1_12;
2026-07-20 16:05:17 +00:00
}
};
items[5] = {
key: "getError",
value() {
2026-07-23 10:11:24 +00:00
return outer1_13;
2026-07-20 16:05:17 +00:00
}
};
items[6] = {
key: "getInvite",
value() {
2026-07-23 10:11:24 +00:00
return outer1_14;
2026-07-20 16:05:17 +00:00
}
};
items[7] = {
key: "getInviteSettings",
value() {
2026-07-23 10:11:24 +00:00
return outer1_15;
2026-07-20 16:05:17 +00:00
}
};
items[8] = {
key: "getPendingSettings",
value() {
2026-07-23 10:11:24 +00:00
return outer1_16;
2026-07-20 16:05:17 +00:00
}
};
items[9] = {
key: "getProps",
value() {
return {};
}
};
items[10] = {
key: "onClose",
get() {
2026-07-23 10:11:24 +00:00
return outer1_17;
2026-07-20 16:05:17 +00:00
}
};
return callback(CreateInviteModalStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").Store);
2026-07-20 16:05:17 +00:00
tmp2.displayName = "CreateInviteModalStore";
2026-07-23 10:11:24 +00:00
tmp2 = new tmp2(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
CREATE_INVITE_MODAL_INIT: function handleInit(arg0) {
init(arg0);
},
CREATE_INVITE_MODAL_OPEN: function handleModalOpen(onClose) {
2026-07-23 10:11:24 +00:00
const OPEN = FormStates.OPEN;
2026-07-20 16:05:17 +00:00
onClose = onClose.onClose;
let tmp;
if (null != onClose) {
tmp = onClose;
}
2026-07-23 10:11:24 +00:00
let closure_17 = tmp;
2026-07-20 16:05:17 +00:00
init(onClose);
},
CREATE_INVITE_MODAL_UPDATE_SETTINGS: function handleUpdateSettings(settings) {
settings = settings.settings;
if (null != obj) {
2026-07-23 10:11:24 +00:00
obj = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj);
const merged1 = Object.assign(settings);
}
},
CREATE_INVITE_MODAL_RESET_SETTINGS: function handleResetSettings() {
let closure_16 = closure_15;
},
CREATE_INVITE_MODAL_GENERATE_INVITE: function handleGenerateInvite() {
let closure_15 = closure_16;
2026-07-23 10:11:24 +00:00
let c20 = true;
2026-07-20 16:05:17 +00:00
},
CREATE_INVITE_MODAL_GENERATE_INVITE_SUCCESS: function handleGenerateInviteSuccess(channelId) {
2026-07-23 10:11:24 +00:00
let c13 = null;
let c20 = false;
importDefault(44)(null != closure_15, "No invite settings for generated invite");
2026-07-20 16:05:17 +00:00
updateWithLatestInvite(channelId.channelId, { targetType: closure_15.targetType, targetUserId: closure_15.targetUserId, targetApplicationId: closure_15.targetApplicationId });
},
CREATE_INVITE_MODAL_GENERATE_INVITE_FAILURE: function handleGenerateInviteFailure(message) {
2026-07-23 10:11:24 +00:00
let c14 = null;
let c20 = false;
2026-07-20 16:05:17 +00:00
message = message.message;
},
CREATE_INVITE_MODAL_CLOSE: function handleModalClose() {
const CLOSED = FormStates.CLOSED;
2026-07-23 10:11:24 +00:00
let c17;
2026-07-20 16:05:17 +00:00
}
});
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("stores/CreateInviteModalStore.tsx");
2026-07-20 16:05:17 +00:00
export default tmp2;