Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
152 lines
6.1 KiB
TypeScript
152 lines
6.1 KiB
TypeScript
// Module ID: 9656
|
|
// Function ID: 9657
|
|
// Name: activityLaunchErrorUtils
|
|
// Dependencies: [5, 8980, 1074, 1114, 9657, 1935, 9634, 4865, 8233, 2]
|
|
// Exports: getActivityLaunchErrorInfo
|
|
|
|
// Module 9656 (activityLaunchErrorUtils)
|
|
import util from "util" /* 1114 */;
|
|
import UserSettings from "UserSettings" /* 1935 */;
|
|
import InteractionCallbackErrorDefault from "InteractionCallbackError" /* 4865 */;
|
|
import InteractionUtils from "InteractionUtils" /* 8233 */;
|
|
import EmbeddedActivitiesActionCreators from "EmbeddedActivitiesActionCreators" /* 9634 */;
|
|
import EmbeddedActivityClientErrorDefault from "EmbeddedActivityClientError" /* 9657 */;
|
|
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
|
|
import DeveloperActivityShelfStore from "DeveloperActivityShelfStore" /* 8980 */;
|
|
|
|
require = fn;
|
|
let closure_8 = async function _getActivityLaunchErrorInfo(arg0, value) {
|
|
if (c6 === 2) {
|
|
c6 = 3;
|
|
throw new TypeError("Generator functions may not be called on executing generators");
|
|
} else if (tmp4 === 3) {
|
|
if (arg0 === 1) {
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
const obj3 = { value, done: true };
|
|
return obj3;
|
|
} else {
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} else {
|
|
try {
|
|
c6 = 2;
|
|
if (0 === c5) {
|
|
if (arg0 === 1) {
|
|
c6 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c6 = 3;
|
|
const obj5 = { value, done: true };
|
|
return obj5;
|
|
} else {
|
|
closure_4 = tmp5;
|
|
closure_3 = tmp2;
|
|
closure_131_0 = closure_0;
|
|
closure_131_1 = closure_1;
|
|
let ClientError2;
|
|
let detailCode;
|
|
let reason2;
|
|
closure_131_5 = undefined;
|
|
const intl9 = util.intl;
|
|
closure_131_5 = intl9.string(util.t["IOy+I5"]);
|
|
if (closure_0 instanceof EmbeddedActivityClientErrorDefault) {
|
|
ClientError2 = ClientError.ClientError;
|
|
reason2 = tmp83.reason;
|
|
fetchState = fetchState.getFetchState();
|
|
const DeveloperMode = UserSettings.DeveloperMode;
|
|
let setting = DeveloperMode.getSetting();
|
|
if (setting) {
|
|
setting = fetchState !== constants.LOADED;
|
|
}
|
|
if (setting) {
|
|
c5 = 1;
|
|
c6 = 1;
|
|
const obj6 = { value: EmbeddedActivitiesActionCreators.fetchDeveloperApplications(), done: false };
|
|
return obj6;
|
|
}
|
|
} else if (tmp83 instanceof InteractionCallbackErrorDefault) {
|
|
ClientError2 = tmp8.CallbackError;
|
|
reason2 = tmp83.reason;
|
|
const result = InteractionUtils.interactionCallbackErrorReason(tmp83.reason, tmp84);
|
|
closure_2 = result;
|
|
if (result == null) {
|
|
closure_2 = closure_131_5;
|
|
}
|
|
closure_131_5 = closure_2;
|
|
} else {
|
|
ClientError2 = tmp8.ApiError;
|
|
({ status: closure_131_3, code: closure_131_4, code } = tmp83);
|
|
if (constants2.INVALID_ACTIVITY_LAUNCH_NO_ACCESS === code) {
|
|
const intl6 = util.intl;
|
|
closure_131_5 = intl6.string(util.t.GyzcrS);
|
|
} else if (tmp9.INVALID_ACTIVITY_LAUNCH_PREMIUM_TIER === code) {
|
|
const intl5 = util.intl;
|
|
closure_131_5 = intl5.string(util.t.zxv7EF);
|
|
} else if (tmp9.INVALID_PERMISSIONS === code) {
|
|
const intl4 = util.intl;
|
|
closure_131_5 = intl4.string(util.t.hHGrWz);
|
|
} else if (tmp9.INVALID_ACTIVITY_LAUNCH_AFK_CHANNEL === code) {
|
|
const intl3 = util.intl;
|
|
closure_131_5 = intl3.string(util.t.j29zCr);
|
|
} else {
|
|
if (tmp9.INVALID_ACTIVITY_LAUNCH_AGE_GATED === code) {
|
|
const intl2 = util.intl;
|
|
closure_131_5 = intl2.string(util.t["4WuFRE"]);
|
|
} else if (tmp9.INVALID_ACTIVITY_LAUNCH_DEV_PREVIEW_GUILD_SIZE !== code) {
|
|
if (tmp9.ACTIVITY_CONFIGURATION_DOES_NOT_SUPPORT_PLATFORM === code) {
|
|
const intl10 = util.intl;
|
|
closure_131_5 = intl10.string(util.t.uGDCcw);
|
|
}
|
|
}
|
|
const intl = util.intl;
|
|
closure_131_5 = intl.string(util.t.RvkXdb);
|
|
}
|
|
}
|
|
const obj7 = { message: closure_131_5, errorType: ClientError2, errorStatus: detailCode, errorCode: reason2 };
|
|
c6 = 3;
|
|
tmp84 = closure_1;
|
|
}
|
|
} else if (arg0 === 1) {
|
|
c6 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c6 = 3;
|
|
const obj = { value, done: true };
|
|
return obj;
|
|
}
|
|
const reason = closure_131_0.reason;
|
|
if (closure_132_1(closure_132_2[4]).Reasons.PRIMARY_APP_COMMAND_NOT_FOUND === reason) {
|
|
if (closure_132_4.inDevModeForApplication(closure_131_1)) {
|
|
const intl8 = closure_132_0(closure_132_2[3]).intl;
|
|
closure_131_5 = intl8.string(closure_132_0(closure_132_2[3]).t.hXRXfz);
|
|
}
|
|
} else if (closure_132_1(closure_132_2[4]).Reasons.INVALID_CHANNEL === reason) {
|
|
const intl7 = closure_132_0(closure_132_2[3]).intl;
|
|
closure_131_5 = intl7.string(closure_132_0(closure_132_2[3]).t.j29zCr);
|
|
} else if (closure_132_1(closure_132_2[4]).Reasons.LEGACY_LAUNCH_CLIENT_VALIDATION_FAILED === reason) {
|
|
detailCode = closure_131_0.detailCode;
|
|
}
|
|
} catch (tmp78) {
|
|
c6 = tmp;
|
|
throw tmp78;
|
|
}
|
|
}
|
|
};
|
|
const DevShelfFetchState = fn(8980).DevShelfFetchState;
|
|
const AbortCodes = fn(1074).AbortCodes;
|
|
const ActivityLaunchFailErrorType = { ClientError: 0, [0]: "ClientError", CallbackError: 1, [1]: "CallbackError", ApiError: 2, [2]: "ApiError" };
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/activities/utils/activityLaunchErrorUtils.tsx");
|
|
|
|
export { ActivityLaunchFailErrorType };
|
|
export const getActivityLaunchErrorInfo = function getActivityLaunchErrorInfo() {
|
|
const self = this;
|
|
const apply = closure_8.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
};
|