decord/source/modules/guild_onboarding/GuildOnboardingStore.tsx

140 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 5089
// Function ID: 43872
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 653, 1841, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-28 08:39:19 +00:00
// Module 5089 (_isNativeReflectConstruct)
2026-07-25 08:10:48 +00:00
import isFavoritesGuildId from "isFavoritesGuildId";
2026-07-23 10:11:24 +00:00
import initialize from "initialize";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
2026-07-25 08:10:48 +00:00
import { ME } from "ME";
2026-07-23 10:11:24 +00:00
2026-07-25 08:10:48 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
2026-07-25 08:10:48 +00:00
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
2026-07-20 16:05:17 +00:00
}));
function _isNativeReflectConstruct() {
2026-07-25 08:10:48 +00:00
return closure_0;
2026-07-20 16:05:17 +00:00
}
const result = _isNativeReflectConstruct();
}
function isOnboarding(arg0) {
let hasItem = null != arg0;
if (hasItem) {
const items = [obj.STARTED, obj.READY];
hasItem = items.includes(arg0);
}
return hasItem;
}
let obj = { STARTED: "started", READY: "ready", COMPLETED: "completed", NOT_APPLICABLE: "not_applicable" };
let closure_9 = {};
2026-07-25 08:10:48 +00:00
let closure_10 = {};
let tmp2 = ((Store) => {
2026-07-20 16:05:17 +00:00
class GuildOnboardingStore {
constructor() {
self = this;
2026-07-25 08:10:48 +00:00
tmp = outer1_2(this, GuildOnboardingStore);
obj = outer1_5(GuildOnboardingStore);
tmp2 = outer1_4;
if (outer1_11()) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis;
_Reflect = Reflect;
2026-07-25 08:10:48 +00:00
tmp7 = outer1_5;
2026-07-20 16:05:17 +00:00
tmp8 = arguments;
2026-07-25 08:10:48 +00:00
constructResult = Reflect.construct(obj, arguments, outer1_5(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(GuildOnboardingStore, Store);
let obj = {
key: "shouldShowOnboarding",
2026-07-25 08:10:48 +00:00
value(guildId) {
let tmp = guildId !== outer1_7;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-25 08:10:48 +00:00
tmp = !GuildOnboardingStore(outer1_1[6]).isFavoritesGuildId(guildId);
const obj = GuildOnboardingStore(outer1_1[6]);
2026-07-20 16:05:17 +00:00
}
if (tmp) {
2026-07-25 08:10:48 +00:00
tmp = outer1_12(outer1_9[guildId]);
2026-07-20 16:05:17 +00:00
}
return tmp;
}
};
const items = [obj, , , ];
obj = {
key: "getOnboardingStatus",
value(arg0) {
2026-07-25 08:10:48 +00:00
return outer1_9[arg0];
2026-07-20 16:05:17 +00:00
}
};
items[1] = obj;
obj = {
key: "resetOnboardingStatus",
value(arg0) {
2026-07-25 08:10:48 +00:00
outer1_9[arg0] = outer1_8.STARTED;
outer1_10[arg0] = "cover";
2026-07-20 16:05:17 +00:00
}
};
items[2] = obj;
items[3] = {
key: "getCurrentOnboardingStep",
value(arg0) {
let str = "cover";
2026-07-25 08:10:48 +00:00
if (null != outer1_10[arg0]) {
2026-07-20 16:05:17 +00:00
str = tmp;
}
return str;
}
};
return callback(GuildOnboardingStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").Store);
2026-07-25 08:10:48 +00:00
tmp2.displayName = "GuildOnboardingStore";
2026-07-20 16:05:17 +00:00
obj = {
LOGOUT: function handleReset() {
let closure_9 = {};
2026-07-25 08:10:48 +00:00
let closure_10 = {};
2026-07-20 16:05:17 +00:00
},
GUILD_DELETE: function handleDelete(guild) {
guild = guild.guild;
2026-07-23 10:11:24 +00:00
delete tmp4[tmp3];
delete tmp2[tmp];
2026-07-20 16:05:17 +00:00
},
GUILD_ONBOARDING_START: function handleOnboardingStart(guildId) {
2026-07-25 08:10:48 +00:00
closure_9[guildId.guildId] = obj.STARTED;
2026-07-20 16:05:17 +00:00
},
GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS: function handlePromptsFetchSuccess(guildId) {
guildId = guildId.guildId;
2026-07-23 10:11:24 +00:00
if (table[guildId] !== obj.STARTED) {
2026-07-20 16:05:17 +00:00
return false;
} else {
2026-07-23 10:11:24 +00:00
table[guildId] = tmp ? obj.READY : obj.NOT_APPLICABLE;
2026-07-20 16:05:17 +00:00
}
},
GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE: function handlePromptsFetchFailure(guildId) {
2026-07-25 08:10:48 +00:00
closure_9[guildId.guildId] = obj.NOT_APPLICABLE;
2026-07-20 16:05:17 +00:00
},
GUILD_ONBOARDING_COMPLETE: function handleCompleteOnboarding(guildId) {
2026-07-25 08:10:48 +00:00
closure_9[guildId.guildId] = obj.COMPLETED;
2026-07-20 16:05:17 +00:00
},
GUILD_ONBOARDING_SET_STEP: function handleOnboardingStep(guildId) {
2026-07-25 08:10:48 +00:00
closure_10[guildId.guildId] = guildId.step;
2026-07-20 16:05:17 +00:00
},
CONNECTION_OPEN: function handleResetOnboardingStep() {
2026-07-25 08:10:48 +00:00
let closure_10 = {};
2026-07-20 16:05:17 +00:00
}
};
2026-07-25 08:10:48 +00:00
tmp2 = new tmp2(require("dispatcher"), obj);
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("modules/guild_onboarding/GuildOnboardingStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
export default tmp2;
2026-07-20 16:05:17 +00:00
export const GuildOnboardingStatus = obj;
export { isOnboarding };