decord/source/modules/rpc/helpers/internalDeepLinks.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

63 lines
2.1 KiB
TypeScript

// Module ID: 14485
// Function ID: 14486
// Name: set
// Dependencies: [32, 1365, 4249, 8377, 2]
// Exports: openInternalDeepLink, resolveInternalDeepLink
// Module 14485 (set)
import isDiscordProxiedAssetUrlDefault from "isDiscordProxiedAssetUrl" /* 1365 */;
import _openURL from "_openURL" /* 4249 */;
import closure_3 from "_slicedToArray" /* 32 */;
import set from "set" /* 2 */;
require = arg1;
let set = new Set(["channels", "users", "events"]);
const set1 = new Set(["", "-"]);
const result = set.fileFinishedImporting("modules/rpc/helpers/internalDeepLinks.tsx");
export const resolveInternalDeepLink = function resolveInternalDeepLink(closure_1_1) {
const toURLSafeResult = isDiscordProxiedAssetUrlDefault.toURLSafe(closure_1_1);
if (null == toURLSafeResult) {
return null;
} else {
({ hostname: hostname2, protocol, host } = toURLSafeResult);
let tmpResult = tmp(1365);
if (tmpResult.isDiscordProtocol(protocol)) {
({ hostname, pathname } = toURLSafeResult);
if (!set1.has(hostname)) {
tmpResult = tmp(1365);
if (!tmpResult.isDiscordHostname(hostname)) {
const _HermesInternal = HermesInternal;
let combined = "/" + hostname + pathname;
}
}
let combined1 = pathname;
if (!pathname.startsWith("/")) {
const _HermesInternal2 = HermesInternal;
combined1 = "/" + pathname;
}
combined = combined1;
} else {
if (!tmpResult1.isDiscordHostname(hostname2)) {
if (!tmpResult2.isDiscordLocalhost(host, hostname2)) {
return null;
}
tmpResult2 = tmp(1365);
}
const tmp11 = callback(toURLSafeResult.pathname.split("/"), 2)[1];
let combined2 = null;
if (null != tmp11) {
combined2 = null;
if (set.has(tmp11)) {
const _HermesInternal3 = HermesInternal;
combined2 = "https://discord.com" + str + toURLSafeResult.search + toURLSafeResult.hash;
}
}
return combined2;
}
}
};
export const openInternalDeepLink = function openInternalDeepLink(internalDeepLink) {
_openURL.default(internalDeepLink);
return true;
};