decord/source/modules/forwarding/handleForwardBreadcrumb.tsx

171 lines
5.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11156
// Function ID: 11157
2026-07-20 16:05:17 +00:00
// Name: _handleForwardBreadcrumb
2026-08-24 06:08:38 +00:00
// Dependencies: [5, 1391, 1910, 676, 7339, 6815, 698, 7249, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 11156 (_handleForwardBreadcrumb)
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "ensureGuildLoaded" /* 1391 */;
import closure_5 from "createGuildRecordFromRust" /* 1910 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function _handleForwardBreadcrumb() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c4 = 0;
c5 = 0;
c3 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0) {
if (guild === 2) {
guild = 3;
HermesBuiltin.throwTypeError();
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
guild = 2;
if (0 === store) {
if (arg0 === 1) {
guild = 3;
throw arg1;
} else if (arg0 === 2) {
guild = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
let channel_id = tmp3;
let guild_id = tmp7;
guild_id = undefined;
channel_id = undefined;
let message_id;
store = undefined;
guild = undefined;
let constants;
if (null != lib.messageReference) {
guild_id = tmp60.messageReference.guild_id;
channel_id = tmp60.messageReference.channel_id;
message_id = tmp60.messageReference.message_id;
store = store.getChannel(channel_id);
guild = false;
if (null == store) {
if (null != guild_id) {
if (null == guild.getGuild(guild_id)) {
message_id = 1;
2026-08-24 06:08:38 +00:00
obj1 = { object: null };
obj1[0] = closure_1_7.FORWARD_BREADCRUMB;
2026-07-29 08:29:29 +00:00
store = 2;
guild = 1;
const obj2 = { value: null, done: false };
2026-08-24 06:08:38 +00:00
obj2[0] = lib(closure_1_2[4]).startLurking(guild_id, obj1, { shouldNavigate: false });
2026-07-29 08:29:29 +00:00
return obj2;
}
}
}
}
guild = 3;
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else if (1 === tmp7) {
message_id = 0;
} else if (2 === tmp7) {
if (arg0 === 1) {
guild = 3;
throw arg1;
} else if (arg0 === 2) {
message_id = 0;
guild = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
} else {
guild = true;
obj1 = lib(channel_id[5]);
store = 3;
guild = 1;
let obj4 = { value: null, done: false };
obj4[0] = obj1.waitForGuild(guild_id);
return obj4;
}
} else if (arg0 === 1) {
guild = 3;
throw arg1;
} else if (arg0 === 2) {
message_id = 0;
guild = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
store = store.getChannel(channel_id);
message_id = 0;
}
obj4 = guild_id(channel_id[6]);
const basicChannel = store.getBasicChannel(lib.channel_id);
guild_id = undefined;
if (basicChannel != null) {
guild_id = basicChannel.guild_id;
}
const obj5 = { guild_id: null, channel_id: null, message_id: null, breadcrumb_guild_id: null, breadcrumb_channel_id: null, breadcrumb_message_id: null, did_lurk: null };
obj5[0] = guild_id;
obj5[1] = lib.channel_id;
obj5[2] = lib.id;
obj5[3] = guild_id;
obj5[4] = channel_id;
obj5[5] = message_id;
obj5[6] = guild;
obj4.track(constants.FORWARD_BREADCRUMB_CLICKED, obj5);
let tmp36;
if (guild) {
tmp36 = channel_id;
}
constants = tmp36;
const obj6 = { navigationReplace: false, welcomeModalChannelId: null };
obj6[1] = constants;
guild_id(channel_id[7])(closure_8.CHANNEL(guild_id, channel_id, message_id), obj6);
const tmp42 = guild_id(channel_id[7]);
} catch (tmp52) {
if (tmp4 === message_id) {
guild = tmp2;
throw tmp52;
} else {
store = tmp;
}
}
}
})();
});
2026-08-24 06:08:38 +00:00
closure_9 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
({ AnalyticEvents: closure_6, AnalyticsObjects: error, Routes: closure_8 } = ME);
const result = require("set").fileFinishedImporting("modules/forwarding/handleForwardBreadcrumb.tsx");
2026-07-20 16:05:17 +00:00
export default function handleForwardBreadcrumb() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _handleForwardBreadcrumb.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};