decord/source/modules/markup/MarkupRules.tsx

1220 lines
94 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 4837
// Function ID: 4838
2026-07-20 16:05:17 +00:00
// Name: parseLink
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 853, 1391, 1985, 1910, 1922, 676, 4838, 4839, 4840, 1236, 4843, 1988, 4573, 4224, 4096, 4844, 4845, 4848, 4038, 4850, 4860, 4861, 4862, 4863, 4864, 4836, 4865, 12, 2]
2026-07-29 08:29:29 +00:00
// Exports: hydrateCommandMention
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 4837 (parseLink)
2026-08-24 06:08:38 +00:00
import getSystemLocale from "getSystemLocale" /* 1236 */;
2026-08-25 06:04:03 +00:00
import extractColorStringsFromServerColors from "extractColorStringsFromServerColors" /* 1988 */;
import parseRawEmojiObjectDefault from "parseRawEmojiObject" /* 4038 */;
import getNicknameDefault from "getNickname" /* 4573 */;
import validateContentTypes from "validateContentTypes" /* 4840 */;
import validateContentTypesDefault from "validateContentTypes" /* 4840 */;
import useHasEnhancedRoleColors from "useHasEnhancedRoleColors" /* 4843 */;
import textRegexpDefault from "textRegexp" /* 4844 */;
import getChannelDefault from "getChannel" /* 4845 */;
import regExpDefault from "regExp" /* 4848 */;
import getSoundmojiASTFromString from "getSoundmojiASTFromString" /* 4850 */;
import getSoundmojiASTFromStringDefault from "getSoundmojiASTFromString" /* 4850 */;
import TIMESTAMP_FORMATS from "TIMESTAMP_FORMATS" /* 4860 */;
import staticRouteToTranslation from "staticRouteToTranslation" /* 4861 */;
import matchDefault from "match" /* 4862 */;
import regExpDefault2 from "regExp" /* 4863 */;
import _modDef4864 from "module_4864" /* 4864 */;
import matchDefault2 from "match" /* 4865 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "_toArray" /* 853 */;
import closure_5 from "ensureGuildLoaded" /* 1391 */;
2026-08-25 06:04:03 +00:00
import closure_6 from "createGuildRoleRecordFromRust" /* 1985 */;
2026-08-24 06:08:38 +00:00
import closure_7 from "createGuildRecordFromRust" /* 1910 */;
import closure_8 from "mergeGuildAvatar" /* 1922 */;
import ME from "ME" /* 676 */;
2026-08-25 06:04:03 +00:00
import { SUB_COMMAND_KEY_SEPARATOR } from "TRUE_OPTION_NAME" /* 4838 */;
import { GAME_MENTION_RAW_RE } from "regExp" /* 4839 */;
import importDefaultResult from "t" /* 4096 */;
import importDefaultResult3 from "combineMarkupRules" /* 4836 */;
2026-08-24 06:08:38 +00:00
import importDefaultResult4 from "apply" /* 12 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function parseLink(arg0) {
2026-08-24 06:08:38 +00:00
let obj = validateContentTypes;
2026-07-20 16:05:17 +00:00
const punycodeLinkResult = obj.punycodeLink(arg0[1]);
if (null == punycodeLinkResult) {
2026-07-29 08:29:29 +00:00
obj = { type: "text", content: null };
obj[1] = arg0[1];
2026-07-20 16:05:17 +00:00
} else {
2026-08-08 06:10:11 +00:00
obj = { type: "link", content: null, target: null, title: "call" };
2026-08-24 06:08:38 +00:00
obj1 = { type: "text", content: null };
2026-07-29 08:29:29 +00:00
obj1[1] = punycodeLinkResult.displayTarget;
2026-07-20 16:05:17 +00:00
const items = [obj1];
2026-07-29 08:29:29 +00:00
obj[1] = items;
obj[2] = punycodeLinkResult.target;
2026-07-20 16:05:17 +00:00
}
return obj;
}
2026-07-29 08:29:29 +00:00
function hydrateRoleMention(arg0, guildId) {
2026-07-20 16:05:17 +00:00
if (null != guildId.guildId) {
let guild = store2.getGuild(guildId.guildId);
} else {
guild = null;
if (null != guildId.channelId) {
2026-07-29 08:29:29 +00:00
const channel = store.getChannel(guildId.channelId);
guildId = undefined;
if (channel != null) {
guildId = channel.getGuildId();
}
guild = store2.getGuild(guildId);
2026-07-20 16:05:17 +00:00
}
}
let role = null;
2026-07-29 08:29:29 +00:00
if (null != guild) {
role = role.getRole(guild.id, arg0);
2026-07-20 16:05:17 +00:00
}
if (null == role) {
2026-07-29 08:29:29 +00:00
let obj = { type: "text", content: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const _HermesInternal3 = HermesInternal;
2026-08-24 06:08:38 +00:00
obj[1] = "@" + intl.string(getSystemLocale.t["YV4F/n"]);
2026-07-20 16:05:17 +00:00
return obj;
} else {
let id;
2026-07-29 08:29:29 +00:00
if (guild != null) {
id = guild.id;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
let hasEnhancedRoleColorsForRole = useHasEnhancedRoleColors.getHasEnhancedRoleColorsForRole(id, role);
2026-07-20 16:05:17 +00:00
if (hasEnhancedRoleColorsForRole) {
2026-08-24 06:08:38 +00:00
hasEnhancedRoleColorsForRole = !extractColorStringsFromServerColors.getIsDefaultErc(role);
const tmp19Result = extractColorStringsFromServerColors;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { type: "mention", channelId: null, guildId: null, roleId: null, roleColor: null, roleColors: null, roleName: null, color: null, colorString: null, content: null };
obj[1] = guildId.channelId;
2026-07-20 16:05:17 +00:00
let id1 = null;
2026-07-29 08:29:29 +00:00
if (null != guild) {
id1 = guild.id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = id1;
obj[3] = arg0;
obj[4] = role.color;
let tmp11 = null;
2026-07-20 16:05:17 +00:00
if (hasEnhancedRoleColorsForRole) {
const colors = role.colors;
let primary_color;
2026-07-29 08:29:29 +00:00
if (colors != null) {
2026-07-20 16:05:17 +00:00
primary_color = colors.primary_color;
}
2026-08-24 06:08:38 +00:00
obj1 = { primaryColor: null, secondaryColor: null, tertiaryColor: null };
2026-07-29 08:29:29 +00:00
obj1[0] = primary_color;
2026-07-20 16:05:17 +00:00
const colors2 = role.colors;
let secondary_color;
2026-07-29 08:29:29 +00:00
if (colors2 != null) {
2026-07-20 16:05:17 +00:00
secondary_color = colors2.secondary_color;
}
2026-07-29 08:29:29 +00:00
obj1[1] = secondary_color;
2026-07-20 16:05:17 +00:00
const colors3 = role.colors;
let tertiary_color;
2026-07-29 08:29:29 +00:00
if (colors3 != null) {
2026-07-20 16:05:17 +00:00
tertiary_color = colors3.tertiary_color;
}
2026-07-29 08:29:29 +00:00
obj1[2] = tertiary_color;
tmp11 = obj1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[5] = tmp11;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
obj[6] = "@" + role.name;
({ color: obj3[7], colorString: obj3[8] } = role);
const obj2 = { type: "text", content: null };
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal;
2026-07-29 08:29:29 +00:00
obj2[1] = "@" + role.name;
2026-07-20 16:05:17 +00:00
const items = [obj2];
2026-07-29 08:29:29 +00:00
obj[9] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
}
function hydrateUserMention(everyoneOrHere, channelId) {
({ fullMatch, id } = everyoneOrHere);
let str = user.getUser(id);
const channel = store.getChannel(channelId.channelId);
id = undefined;
2026-07-29 08:29:29 +00:00
let tmp2;
2026-07-20 16:05:17 +00:00
if (null != str) {
str = str.toString();
if (null != channel) {
2026-08-24 06:08:38 +00:00
let nickname = getNicknameDefault.getNickname(channel.getGuildId(), channelId.channelId, str);
2026-07-29 08:29:29 +00:00
if (nickname == null) {
2026-08-25 06:04:03 +00:00
nickname = tmp4(4224).getName(str);
const tmp4Result = tmp4(4224);
2026-07-20 16:05:17 +00:00
}
str = nickname;
2026-08-24 06:08:38 +00:00
const obj2 = getNicknameDefault;
2026-07-29 08:29:29 +00:00
tmp4 = importDefault;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = str;
2026-07-20 16:05:17 +00:00
id = str.id;
}
let isMatch = null != id;
if (isMatch) {
isMatch = regex.test(id.trim());
}
let combined = fullMatch;
if (isMatch) {
combined = fullMatch;
if (channelId.unknownUserMentionPlaceholder) {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-08-24 06:08:38 +00:00
combined = "@" + intl.string(getSystemLocale.t.sKdZ6U);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const obj = { type: "mention", userId: id, channelId: channelId.channelId, viewingChannelId: channelId.viewingChannelId, guildId: null, parsedUserId: null, roleName: null, content: null };
2026-07-20 16:05:17 +00:00
let guildId;
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
guildId = channel.getGuildId();
}
2026-07-29 08:29:29 +00:00
obj[4] = guildId;
let tmp14 = null;
2026-07-20 16:05:17 +00:00
if (isMatch) {
2026-07-29 08:29:29 +00:00
tmp14 = id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[5] = tmp14;
obj[6] = everyoneOrHere.everyoneOrHere;
if (null != tmp2) {
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal;
2026-07-29 08:29:29 +00:00
combined = "@" + tmp2;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items = [{ type: "text", content: combined }];
obj[7] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
2026-08-06 08:05:19 +00:00
({ ID_REGEX: c9, MARKDOWN_SPOILER_REGEXP: c10, MARKDOWN_STATIC_ROUTE_NAME_REGEXP: unpackModuleId } = ME);
const re14 = /^( *>>> +([\s\S]*))|^( *>(?!>>) +[^\n]*(\n *>(?!>>) +[^\n]*)*\n?)/;
const re15 = /^$|\n *$/;
const re16 = /^ *>>> ?/;
const re17 = /^ *> ?/gm;
const re18 = /^((?:https?|steam):\/\/[^\s<]+[^<.,:;"'\]\s])/;
2026-08-24 06:08:38 +00:00
let obj = { newline: importDefaultResult.defaultRules.newline, paragraph: importDefaultResult.defaultRules.paragraph, escape: null, blockQuote: null, link: null, autolink: null, mailto: null, tel: null, url: null, strong: null, em: null, u: null, br: null, text: null, inlineCode: null, emoticon: null, codeBlock: null, roleMention: null, mention: null, silentPrefix: null, channelMention: null, channelOrMessageUrl: null, mediaPostLink: null, attachmentLink: null, commandMention: null, timestampMentionInput: null, gameMention: null, emoji: null, soundboard: null, customEmoji: null, timestamp: null, s: null, spoiler: null, staticRouteLink: null, heading: null, list: null, subtext: null };
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-24 06:08:38 +00:00
let merged = Object.assign(importDefaultResult.defaultRules.escape);
2026-07-29 08:29:29 +00:00
obj.match = function match(arg0, allowEscape) {
2026-07-20 16:05:17 +00:00
let match = null;
if (false !== allowEscape.allowEscape) {
2026-08-24 06:08:38 +00:00
match = importDefaultResult.defaultRules.escape.match(arg0, allowEscape, arg2);
const str = importDefaultResult.defaultRules.escape;
2026-07-20 16:05:17 +00:00
}
return match;
};
2026-07-29 08:29:29 +00:00
obj[2] = obj;
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-24 06:08:38 +00:00
const merged1 = Object.assign(importDefaultResult.defaultRules.blockQuote);
2026-07-29 08:29:29 +00:00
obj.requiredFirstCharacters = [" ", ">"];
obj.match = function match(arg0, prevCapture) {
2026-07-20 16:05:17 +00:00
prevCapture = prevCapture.prevCapture;
if (!prevCapture.inQuote) {
if (!prevCapture.nested) {
if (null == prevCapture) {
return regex4.exec(arg0);
} else {
let match = null;
if (regex5.test(prevCapture[0])) {
match = regex4.exec(arg0);
}
return match;
}
}
}
return null;
};
2026-07-29 08:29:29 +00:00
obj.parse = function parse(arg0, arg1, inQuote) {
2026-07-20 16:05:17 +00:00
const BooleanResult = Boolean(regex6.exec(arg0[0]));
2026-07-29 08:29:29 +00:00
let tmp2 = regex6;
if (!BooleanResult) {
2026-08-06 08:05:19 +00:00
tmp2 = closure_17;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
let flag = inQuote.inQuote;
2026-07-29 08:29:29 +00:00
const replaced = str.replace(tmp2, "");
2026-07-20 16:05:17 +00:00
if (!flag) {
flag = false;
}
inQuote.inQuote = true;
if (!BooleanResult) {
inQuote.inline = true;
}
const content = arg1(replaced, inQuote);
inQuote.inQuote = flag;
inQuote.inline = inQuote.inline || false;
if (0 === content.length) {
2026-07-23 10:11:24 +00:00
content.push({ type: "text", content: " " });
2026-07-20 16:05:17 +00:00
}
return { content, type: "blockQuote" };
};
2026-07-29 08:29:29 +00:00
obj[3] = obj;
2026-08-24 06:08:38 +00:00
obj[4] = validateContentTypesDefault;
2026-07-23 10:11:24 +00:00
let obj1 = {};
2026-08-24 06:08:38 +00:00
const merged2 = Object.assign(importDefaultResult.defaultRules.autolink);
2026-07-29 08:29:29 +00:00
obj1.parse = parseLink;
obj[5] = obj1;
2026-07-23 10:11:24 +00:00
let obj2 = {};
2026-08-24 06:08:38 +00:00
const merged3 = Object.assign(importDefaultResult.defaultRules.mailto);
obj2.match = importDefaultResult.inlineRegex(/^<([^\s<>@]+@[^\s<>@]+\.[^\s<>@]+)>/);
2026-07-29 08:29:29 +00:00
obj2.requiredFirstCharacters = ["<"];
obj2.parse = function parse(content) {
let target = obj;
if (!content[1].startsWith("mailto:")) {
target = `mailto:${obj}`;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
content = [{ type: "text", content: content[1] }];
return { type: "link", content, target };
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[6] = obj2;
const obj3 = {};
2026-08-24 06:08:38 +00:00
const merged4 = Object.assign(importDefaultResult.defaultRules.mailto);
2026-07-29 08:29:29 +00:00
obj3.requiredFirstCharacters = ["<"];
2026-08-24 06:08:38 +00:00
obj3.match = importDefaultResult.inlineRegex(/^<((?:(?:tel|sms):\+?|\+)(?:(?:[0-9]|\([0-9]+\)))(?:[- .\/]?(?:[0-9]|\([0-9]+\)))+)>/);
2026-07-29 08:29:29 +00:00
obj3.parse = function parse(content) {
const replaced = content[1].replaceAll(/[ \/]+/g, "-");
2026-07-20 16:05:17 +00:00
let startsWithResult = replaced.startsWith("tel:");
if (!startsWithResult) {
startsWithResult = replaced.startsWith("sms:");
}
2026-07-29 08:29:29 +00:00
let target = replaced;
2026-07-20 16:05:17 +00:00
if (!startsWithResult) {
2026-07-29 08:29:29 +00:00
target = `tel:${obj2}`;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
content = [{ type: "text", content: content[1] }];
return { type: "link", content, target };
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[7] = obj3;
2026-07-20 16:05:17 +00:00
const obj4 = {};
2026-08-24 06:08:38 +00:00
const merged5 = Object.assign(importDefaultResult.defaultRules.url);
2026-07-29 08:29:29 +00:00
obj4.requiredFirstCharacters = ["h", "s"];
obj4.match = function match(arg0, inline) {
2026-07-20 16:05:17 +00:00
if (inline.inline) {
const match = regex7.exec(arg0);
if (null == match) {
return match;
} else {
const first = match[0];
let diff = first.length - 1;
let substr = first;
2026-07-29 08:29:29 +00:00
if (0 <= diff) {
2026-07-20 16:05:17 +00:00
let num2 = 0;
substr = first;
if (")" === first[diff]) {
const index = first.indexOf("(", num2);
while (-1 !== index) {
2026-07-29 08:29:29 +00:00
let diff1 = diff - 1;
2026-07-20 16:05:17 +00:00
substr = first;
2026-07-29 08:29:29 +00:00
if (0 <= diff1) {
diff = diff1;
num2 = tmp7;
2026-07-20 16:05:17 +00:00
substr = first;
}
break;
}
}
substr = first.slice(0, first.length - 1);
}
match[1] = substr;
match[0] = substr;
}
} else {
return null;
}
};
2026-07-29 08:29:29 +00:00
obj4.parse = parseLink;
obj[8] = obj4;
2026-08-24 06:08:38 +00:00
obj[9] = importDefaultResult.defaultRules.strong;
obj[10] = importDefaultResult.defaultRules.em;
obj[11] = importDefaultResult.defaultRules.u;
obj[12] = importDefaultResult.defaultRules.br;
obj[13] = textRegexpDefault;
2026-07-20 16:05:17 +00:00
const obj5 = {};
2026-08-24 06:08:38 +00:00
const merged6 = Object.assign(importDefaultResult.defaultRules.inlineCode);
2026-07-29 08:29:29 +00:00
obj5.parse = function parse(arg0, arg1, parseInlineCodeChildContent) {
2026-08-24 06:08:38 +00:00
const inlineCode = importDefaultResult.defaultRules.inlineCode;
2026-07-20 16:05:17 +00:00
const parsed = inlineCode.parse(arg0, arg1, parseInlineCodeChildContent);
let tmp2 = parsed;
if (true === parseInlineCodeChildContent.parseInlineCodeChildContent) {
const obj = {};
const merged = Object.assign(parsed);
2026-07-29 08:29:29 +00:00
obj.validationChildContent = arg1(parsed.content, parseInlineCodeChildContent);
2026-07-20 16:05:17 +00:00
tmp2 = obj;
}
return tmp2;
};
2026-07-29 08:29:29 +00:00
obj[14] = obj5;
2026-08-24 06:08:38 +00:00
const importDefaultResult1 = importDefaultResult;
2026-07-29 08:29:29 +00:00
obj[15] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["\u00AF"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^(¯\\_\(ツ\)_\/¯)/.exec(arg0);
},
parse(content) {
return { type: "text", content: content[1] };
}
};
const obj6 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["\u00AF"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^(¯\\_\(ツ\)_\/¯)/.exec(arg0);
},
parse(content) {
return { type: "text", content: content[1] };
}
};
2026-07-29 08:29:29 +00:00
obj[16] = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.codeBlock.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["`"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^```(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*```/i.exec(arg0);
},
parse(arg0, arg1, inQuote) {
2026-07-29 08:29:29 +00:00
let str = arg0[1];
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = { lang: str, content: null, inQuote: null };
let str2 = arg0[2];
if (str2 == null) {
str2 = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = str2;
obj[2] = inQuote.inQuote || inQuote.formatInline || false;
2026-07-20 16:05:17 +00:00
return obj;
}
};
const obj7 = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.codeBlock.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["`"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^```(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*```/i.exec(arg0);
},
parse(arg0, arg1, inQuote) {
2026-07-29 08:29:29 +00:00
let str = arg0[1];
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = { lang: str, content: null, inQuote: null };
let str2 = arg0[2];
if (str2 == null) {
str2 = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = str2;
obj[2] = inQuote.inQuote || inQuote.formatInline || false;
2026-07-20 16:05:17 +00:00
return obj;
}
};
2026-07-29 08:29:29 +00:00
obj[17] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^<@&(\d+)>/.exec(arg0);
},
parse(arg0, arg1, returnMentionIds) {
[, tmp] = arg0;
if (returnMentionIds.returnMentionIds) {
2026-07-29 08:29:29 +00:00
const obj = { type: "roleMention", id: null };
obj[1] = tmp;
2026-07-20 16:05:17 +00:00
let tmp3 = obj;
} else {
tmp3 = hydrateRoleMention(tmp, returnMentionIds);
}
return tmp3;
}
};
const obj8 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^<@&(\d+)>/.exec(arg0);
},
parse(arg0, arg1, returnMentionIds) {
[, tmp] = arg0;
if (returnMentionIds.returnMentionIds) {
2026-07-29 08:29:29 +00:00
const obj = { type: "roleMention", id: null };
obj[1] = tmp;
2026-07-20 16:05:17 +00:00
let tmp3 = obj;
} else {
tmp3 = hydrateRoleMention(tmp, returnMentionIds);
}
return tmp3;
}
};
2026-07-29 08:29:29 +00:00
obj[18] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<", "@"],
2026-07-20 16:05:17 +00:00
match(arg0) {
const match = /^<@!?(\d+)>|^(@(?:everyone|here))/.exec(arg0);
let tmp2 = null;
if (null != match) {
tmp2 = match;
}
return tmp2;
},
parse(arg0, arg1, returnMentionIds) {
2026-07-29 08:29:29 +00:00
let first = arg0;
2026-07-20 16:05:17 +00:00
if (returnMentionIds.returnMentionIds) {
2026-07-29 08:29:29 +00:00
if (null == first[1]) {
let obj = { type: "mention", text: null };
first = first[0];
obj[1] = first;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { type: "mention", id: null };
obj[1] = first[1];
2026-07-20 16:05:17 +00:00
}
} else {
2026-07-29 08:29:29 +00:00
obj = { fullMatch: null, id: null, everyoneOrHere: null };
[obj[0], obj[1], obj[2]] = first;
2026-07-20 16:05:17 +00:00
return hydrateUserMention(obj, returnMentionIds);
}
}
};
const obj9 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<", "@"],
2026-07-20 16:05:17 +00:00
match(arg0) {
const match = /^<@!?(\d+)>|^(@(?:everyone|here))/.exec(arg0);
let tmp2 = null;
if (null != match) {
tmp2 = match;
}
return tmp2;
},
parse(arg0, arg1, returnMentionIds) {
2026-07-29 08:29:29 +00:00
let first = arg0;
2026-07-20 16:05:17 +00:00
if (returnMentionIds.returnMentionIds) {
2026-07-29 08:29:29 +00:00
if (null == first[1]) {
let obj = { type: "mention", text: null };
first = first[0];
obj[1] = first;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { type: "mention", id: null };
obj[1] = first[1];
2026-07-20 16:05:17 +00:00
}
} else {
2026-07-29 08:29:29 +00:00
obj = { fullMatch: null, id: null, everyoneOrHere: null };
[obj[0], obj[1], obj[2]] = first;
2026-07-20 16:05:17 +00:00
return hydrateUserMention(obj, returnMentionIds);
}
}
};
2026-07-29 08:29:29 +00:00
obj[19] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["@"],
2026-07-20 16:05:17 +00:00
match(arg0, arg1, arg2) {
if (null == arg2) {
let match = /^(@silent(?![^\s]))/.exec(arg0);
const obj = /^(@silent(?![^\s]))/;
} else {
match = null;
}
return match;
},
parse(content) {
return { type: "silentPrefix", content: content[0] };
}
};
2026-08-24 06:08:38 +00:00
obj[20] = getChannelDefault.channelMention;
obj[21] = getChannelDefault.channelOrMessageUrl;
obj[22] = getChannelDefault.mediaPostLink;
obj[23] = regExpDefault.attachmentLink;
2026-07-20 16:05:17 +00:00
const obj10 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["@"],
2026-07-20 16:05:17 +00:00
match(arg0, arg1, arg2) {
if (null == arg2) {
let match = /^(@silent(?![^\s]))/.exec(arg0);
const obj = /^(@silent(?![^\s]))/;
} else {
match = null;
}
return match;
},
parse(content) {
return { type: "silentPrefix", content: content[0] };
}
};
2026-07-29 08:29:29 +00:00
obj[24] = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.text.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^<\/((?:(?:[\x2D0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0900-\u0950\u0955-\u0963\u0966-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E3A\u0E40-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8E0-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\
},
parse(arg0, arg1, returnMentionIds) {
if (returnMentionIds.returnMentionIds) {
2026-07-29 08:29:29 +00:00
let obj = { type: "commandMention", id: null };
obj[1] = arg0[2];
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const items = [];
HermesBuiltin.arraySpread(callback2(arg0[1].split(" ")).slice(1), 0);
2026-08-06 08:05:19 +00:00
const mapped = items.map((arg0) => "" + closure_12 + arg0);
2026-07-29 08:29:29 +00:00
const _HermesInternal = HermesInternal;
obj = { type: "commandMention", channelId: null, commandId: null, commandName: null, commandKey: null, content: null };
obj[1] = returnMentionIds.channelId;
obj[2] = arg0[2];
obj[3] = arg0[1];
obj[4] = "" + arg0[2] + mapped.join("");
2026-08-24 06:08:38 +00:00
obj1 = { type: "text", content: null };
2026-07-29 08:29:29 +00:00
const _HermesInternal2 = HermesInternal;
obj1[1] = "" + arg0[1];
const items1 = [obj1];
obj[5] = items1;
const arr = callback2(arg0[1].split(" "));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return obj;
2026-07-20 16:05:17 +00:00
}
};
const obj11 = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.text.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^<\/((?:(?:[\x2D0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0900-\u0950\u0955-\u0963\u0966-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E3A\u0E40-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8E0-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\
},
parse(arg0, arg1, returnMentionIds) {
if (returnMentionIds.returnMentionIds) {
2026-07-29 08:29:29 +00:00
let obj = { type: "commandMention", id: null };
obj[1] = arg0[2];
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const items = [];
HermesBuiltin.arraySpread(callback2(arg0[1].split(" ")).slice(1), 0);
2026-08-06 08:05:19 +00:00
const mapped = items.map((arg0) => "" + closure_12 + arg0);
2026-07-29 08:29:29 +00:00
const _HermesInternal = HermesInternal;
obj = { type: "commandMention", channelId: null, commandId: null, commandName: null, commandKey: null, content: null };
obj[1] = returnMentionIds.channelId;
obj[2] = arg0[2];
obj[3] = arg0[1];
obj[4] = "" + arg0[2] + mapped.join("");
2026-08-24 06:08:38 +00:00
obj1 = { type: "text", content: null };
2026-07-29 08:29:29 +00:00
const _HermesInternal2 = HermesInternal;
obj1[1] = "" + arg0[1];
const items1 = [obj1];
obj[5] = items1;
const arr = callback2(arg0[1].split(" "));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return obj;
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj[25] = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.text.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0, allowTimeMentionInput) {
let match = null;
if (allowTimeMentionInput.allowTimeMentionInput) {
match = /^<@time:([^>]*)>/.exec(arg0);
const obj = /^<@time:([^>]*)>/;
}
return match;
},
parse(content) {
return { type: "timestampMentionInput", content: content[1] };
}
};
const obj12 = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.text.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0, allowTimeMentionInput) {
let match = null;
if (allowTimeMentionInput.allowTimeMentionInput) {
match = /^<@time:([^>]*)>/.exec(arg0);
const obj = /^<@time:([^>]*)>/;
}
return match;
},
parse(content) {
return { type: "timestampMentionInput", content: content[1] };
}
};
2026-07-29 08:29:29 +00:00
obj[26] = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.text.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0, allowGameMentions) {
let match = null;
if (allowGameMentions.allowGameMentions) {
match = GAME_MENTION_RAW_RE.exec(arg0);
}
return match;
},
2026-08-06 08:05:19 +00:00
parse(gameId) {
return { type: "gameMention", gameId: gameId[1] };
2026-07-20 16:05:17 +00:00
}
};
const obj13 = {
2026-08-24 06:08:38 +00:00
order: importDefaultResult.defaultRules.text.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0, allowGameMentions) {
let match = null;
if (allowGameMentions.allowGameMentions) {
match = GAME_MENTION_RAW_RE.exec(arg0);
}
return match;
},
2026-08-06 08:05:19 +00:00
parse(gameId) {
return { type: "gameMention", gameId: gameId[1] };
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj[27] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: [":"],
2026-07-20 16:05:17 +00:00
match(arg0) {
2026-08-24 06:08:38 +00:00
const EMOJI_NAME_RE = parseRawEmojiObjectDefault.EMOJI_NAME_RE;
2026-07-20 16:05:17 +00:00
const match = EMOJI_NAME_RE.exec(arg0);
2026-07-29 08:29:29 +00:00
let tmp4 = null;
2026-07-20 16:05:17 +00:00
if (null != match) {
2026-07-29 08:29:29 +00:00
tmp4 = null;
if ("" !== tmpResult.convertNameToSurrogate(match[1])) {
tmp4 = match;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
tmpResult = parseRawEmojiObjectDefault;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp4;
2026-07-20 16:05:17 +00:00
},
parse(arg0) {
2026-08-24 06:08:38 +00:00
let content = parseRawEmojiObjectDefault.convertNameToSurrogate(arg0[1]);
2026-07-29 08:29:29 +00:00
if (null == content) {
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
content = ":" + arg0[1] + ":";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return { type: "text", content };
2026-07-20 16:05:17 +00:00
}
};
const obj14 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: [":"],
2026-07-20 16:05:17 +00:00
match(arg0) {
2026-08-24 06:08:38 +00:00
const EMOJI_NAME_RE = parseRawEmojiObjectDefault.EMOJI_NAME_RE;
2026-07-20 16:05:17 +00:00
const match = EMOJI_NAME_RE.exec(arg0);
2026-07-29 08:29:29 +00:00
let tmp4 = null;
2026-07-20 16:05:17 +00:00
if (null != match) {
2026-07-29 08:29:29 +00:00
tmp4 = null;
if ("" !== tmpResult.convertNameToSurrogate(match[1])) {
tmp4 = match;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
tmpResult = parseRawEmojiObjectDefault;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp4;
2026-07-20 16:05:17 +00:00
},
parse(arg0) {
2026-08-24 06:08:38 +00:00
let content = parseRawEmojiObjectDefault.convertNameToSurrogate(arg0[1]);
2026-07-29 08:29:29 +00:00
if (null == content) {
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
content = ":" + arg0[1] + ":";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return { type: "text", content };
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj[28] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
2026-08-24 06:08:38 +00:00
const soundmojiRawFormatRegex = getSoundmojiASTFromString.soundmojiRawFormatRegex;
2026-07-20 16:05:17 +00:00
return soundmojiRawFormatRegex.exec(arg0);
},
parse(arg0, arg1, arg2) {
2026-08-24 06:08:38 +00:00
return getSoundmojiASTFromStringDefault(arg0, arg2);
2026-07-20 16:05:17 +00:00
}
};
const obj15 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
2026-08-24 06:08:38 +00:00
const soundmojiRawFormatRegex = getSoundmojiASTFromString.soundmojiRawFormatRegex;
2026-07-20 16:05:17 +00:00
return soundmojiRawFormatRegex.exec(arg0);
},
parse(arg0, arg1, arg2) {
2026-08-24 06:08:38 +00:00
return getSoundmojiASTFromStringDefault(arg0, arg2);
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj[29] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^<a?:(\w+):(\d+)>/.exec(arg0);
},
parse(arg0) {
return { type: "text", content: ":" + arg0[1] + ":" };
}
};
const obj16 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return /^<a?:(\w+):(\d+)>/.exec(arg0);
},
parse(arg0) {
return { type: "text", content: ":" + arg0[1] + ":" };
}
};
2026-07-29 08:29:29 +00:00
obj[30] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order - 1,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
2026-08-24 06:08:38 +00:00
const TIMESTAMP_REGEX = TIMESTAMP_FORMATS.TIMESTAMP_REGEX;
2026-07-20 16:05:17 +00:00
return TIMESTAMP_REGEX.exec(arg0);
},
parse(arg0) {
[tmp, tmp2, tmp3] = arg0;
2026-08-24 06:08:38 +00:00
let obj = TIMESTAMP_FORMATS;
2026-07-20 16:05:17 +00:00
let parseTimestampResult = obj.parseTimestamp(tmp2, tmp3);
if (null == parseTimestampResult) {
2026-07-29 08:29:29 +00:00
obj = { type: "text", content: null };
obj[1] = tmp;
2026-07-20 16:05:17 +00:00
parseTimestampResult = obj;
} else {
parseTimestampResult.type = "timestamp";
}
return parseTimestampResult;
}
};
2026-08-24 06:08:38 +00:00
const obj18 = { order: importDefaultResult.defaultRules.u.order, requiredFirstCharacters: ["~"], match: null, parse: null };
2026-07-20 16:05:17 +00:00
const obj17 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order - 1,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
2026-08-24 06:08:38 +00:00
const TIMESTAMP_REGEX = TIMESTAMP_FORMATS.TIMESTAMP_REGEX;
2026-07-20 16:05:17 +00:00
return TIMESTAMP_REGEX.exec(arg0);
},
parse(arg0) {
[tmp, tmp2, tmp3] = arg0;
2026-08-24 06:08:38 +00:00
let obj = TIMESTAMP_FORMATS;
2026-07-20 16:05:17 +00:00
let parseTimestampResult = obj.parseTimestamp(tmp2, tmp3);
if (null == parseTimestampResult) {
2026-07-29 08:29:29 +00:00
obj = { type: "text", content: null };
obj[1] = tmp;
2026-07-20 16:05:17 +00:00
parseTimestampResult = obj;
} else {
parseTimestampResult.type = "timestamp";
}
return parseTimestampResult;
}
};
2026-08-24 06:08:38 +00:00
obj18[2] = importDefaultResult.inlineRegex(/^~~([\s\S]+?)~~(?!_)/);
obj18[3] = importDefaultResult.defaultRules.u.parse;
2026-07-29 08:29:29 +00:00
obj[31] = obj18;
2026-08-24 06:08:38 +00:00
const importDefaultResult2 = importDefaultResult;
2026-07-29 08:29:29 +00:00
obj[32] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["|"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return regex2.exec(arg0);
},
parse(arg0, arg1, channelId) {
return { content: arg1(arg0[1], channelId), channelId: channelId.channelId };
}
};
const obj19 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["|"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return regex2.exec(arg0);
},
parse(arg0, arg1, channelId) {
return { content: arg1(arg0[1], channelId), channelId: channelId.channelId };
}
};
2026-07-29 08:29:29 +00:00
obj[33] = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return regex3.exec(arg0);
},
2026-07-29 08:29:29 +00:00
parse(arg0, arg1, guildId) {
const tmp = callback(arg0, 3);
2026-08-24 06:08:38 +00:00
let obj = staticRouteToTranslation;
2026-07-29 08:29:29 +00:00
const result = obj.staticRouteToTranslation(tmp2);
2026-08-24 06:08:38 +00:00
obj1 = staticRouteToTranslation;
2026-07-29 08:29:29 +00:00
if (null != guildId.guildId) {
let guild = store2.getGuild(guildId.guildId);
} else {
guild = null;
if (null != guildId.channelId) {
const channel = store.getChannel(guildId.channelId);
guildId = undefined;
if (channel != null) {
guildId = channel.getGuildId();
}
guild = store2.getGuild(guildId);
2026-07-20 16:05:17 +00:00
}
}
let id;
2026-07-29 08:29:29 +00:00
if (guild != null) {
id = guild.id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const result1 = obj1.staticRouteToItemString(tmp2, tmp3, id);
2026-07-20 16:05:17 +00:00
let str = "";
if (null != result1) {
const _HermesInternal = HermesInternal;
str = " \u203A " + result1;
}
2026-07-29 08:29:29 +00:00
obj = { content: items, mainContent: null, itemContent: null, itemId: null, id: null, guildId: null, channelId: null };
obj = { type: "text", content: result + str };
items = [obj];
let tmp13 = null;
if (null != result) {
obj1 = { type: "text", content: null };
obj1[1] = result;
const items1 = [obj1];
tmp13 = items1;
}
obj[1] = tmp13;
let tmp14 = null;
if (null != result1) {
const obj2 = { type: "text", content: null };
obj2[1] = result1;
const items2 = [obj2];
tmp14 = items2;
}
obj[2] = tmp14;
obj[3] = tmp[2];
obj[4] = tmp[1];
const channel1 = store.getChannel(guildId.channelId);
let guildId1;
if (channel1 != null) {
guildId1 = channel1.getGuildId();
}
obj[5] = guildId1;
obj[6] = tmp[1];
2026-07-20 16:05:17 +00:00
return obj;
}
};
2026-08-24 06:08:38 +00:00
obj[34] = matchDefault;
obj[35] = regExpDefault2;
2026-08-25 06:04:03 +00:00
obj[36] = _modDef4864;
2026-07-23 10:11:24 +00:00
let items = [obj, ];
2026-07-20 16:05:17 +00:00
const obj20 = {
2026-08-24 06:08:38 +00:00
order: textRegexpDefault.order,
2026-07-23 10:11:24 +00:00
requiredFirstCharacters: ["<"],
2026-07-20 16:05:17 +00:00
match(arg0) {
return regex3.exec(arg0);
},
2026-07-29 08:29:29 +00:00
parse(arg0, arg1, guildId) {
const tmp = callback(arg0, 3);
2026-08-24 06:08:38 +00:00
let obj = staticRouteToTranslation;
2026-07-29 08:29:29 +00:00
const result = obj.staticRouteToTranslation(tmp2);
2026-08-24 06:08:38 +00:00
obj1 = staticRouteToTranslation;
2026-07-29 08:29:29 +00:00
if (null != guildId.guildId) {
let guild = store2.getGuild(guildId.guildId);
} else {
guild = null;
if (null != guildId.channelId) {
const channel = store.getChannel(guildId.channelId);
guildId = undefined;
if (channel != null) {
guildId = channel.getGuildId();
}
guild = store2.getGuild(guildId);
2026-07-20 16:05:17 +00:00
}
}
let id;
2026-07-29 08:29:29 +00:00
if (guild != null) {
id = guild.id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const result1 = obj1.staticRouteToItemString(tmp2, tmp3, id);
2026-07-20 16:05:17 +00:00
let str = "";
if (null != result1) {
const _HermesInternal = HermesInternal;
str = " \u203A " + result1;
}
2026-07-29 08:29:29 +00:00
obj = { content: items, mainContent: null, itemContent: null, itemId: null, id: null, guildId: null, channelId: null };
obj = { type: "text", content: result + str };
items = [obj];
let tmp13 = null;
if (null != result) {
obj1 = { type: "text", content: null };
obj1[1] = result;
const items1 = [obj1];
tmp13 = items1;
}
obj[1] = tmp13;
let tmp14 = null;
if (null != result1) {
const obj2 = { type: "text", content: null };
obj2[1] = result1;
const items2 = [obj2];
tmp14 = items2;
}
obj[2] = tmp14;
obj[3] = tmp[2];
obj[4] = tmp[1];
const channel1 = store.getChannel(guildId.channelId);
let guildId1;
if (channel1 != null) {
guildId1 = channel1.getGuildId();
}
obj[5] = guildId1;
obj[6] = tmp[1];
2026-07-20 16:05:17 +00:00
return obj;
}
};
2026-08-24 06:08:38 +00:00
items[1] = matchDefault2;
const importDefaultResult3Result = importDefaultResult3(items);
const omitResult = importDefaultResult4.omit(importDefaultResult3Result, ["inlineCode", "codeBlock", "br", "blockQuote", "subtext", "soundboard"]);
const importDefaultResult5 = importDefaultResult4;
const omitResult1 = importDefaultResult4.omit(importDefaultResult3Result, ["inlineCode", "codeBlock", "br", "blockQuote", "autolink", "url", "attachmentLink", "mention", "roleMention", "channelMention", "channelOrMessageUrl", "mediaPostLink", "subtext", "soundboard", "gameMention"]);
const importDefaultResult6 = importDefaultResult4;
const omitResult2 = importDefaultResult4.omit(importDefaultResult3Result, ["codeBlock", "br", "mention", "channel", "roleMention", "attachmentLink", "subtext", "soundboard", "gameMention"]);
2026-07-23 10:11:24 +00:00
let items1 = [
2026-07-20 16:05:17 +00:00
importDefaultResult3Result,
{
inlineCode: {
match(arg0, arg1, arg2) {
const match = importDefaultResult3Result.codeBlock.match(arg0, arg1, arg2);
if (null != match) {
return match;
} else {
2026-07-29 08:29:29 +00:00
const match1 = tmp.inlineCode.match(arg0, arg1, arg2);
2026-07-20 16:05:17 +00:00
let tmp4;
if (null != match1) {
tmp4 = match1;
}
return tmp4;
}
const str = importDefaultResult3Result.codeBlock;
2026-07-29 08:29:29 +00:00
tmp = importDefaultResult3Result;
2026-07-20 16:05:17 +00:00
}
}
}
];
2026-08-24 06:08:38 +00:00
const importDefaultResult7 = importDefaultResult4;
2026-07-20 16:05:17 +00:00
const obj21 = {
match(arg0, arg1, arg2) {
const match = importDefaultResult3Result.codeBlock.match(arg0, arg1, arg2);
if (null != match) {
return match;
} else {
2026-07-29 08:29:29 +00:00
const match1 = tmp.inlineCode.match(arg0, arg1, arg2);
2026-07-20 16:05:17 +00:00
let tmp4;
if (null != match1) {
tmp4 = match1;
}
return tmp4;
}
const str = importDefaultResult3Result.codeBlock;
2026-07-29 08:29:29 +00:00
tmp = importDefaultResult3Result;
2026-07-20 16:05:17 +00:00
}
};
2026-08-24 06:08:38 +00:00
const omitResult3 = importDefaultResult4.omit(importDefaultResult3(items1), ["blockQuote", "codeBlock", "br"]);
const importDefaultResult8 = importDefaultResult4;
const omitResult4 = importDefaultResult4.omit(importDefaultResult3Result, ["codeBlock", "br", "blockQuote"]);
const importDefaultResult9 = importDefaultResult4;
const omitResult5 = importDefaultResult4.omit(importDefaultResult3Result, ["codeBlock", "br", "attachmentLink", "mention", "roleMention", "channel", "paragraph", "newline", "subtext", "soundboard"]);
const importDefaultResult10 = importDefaultResult4;
const omitResult6 = importDefaultResult4.omit(importDefaultResult3Result, ["codeBlock", "blockQuote", "br"]);
const importDefaultResult11 = importDefaultResult4;
2026-07-29 08:29:29 +00:00
let items2 = [
2026-07-20 16:05:17 +00:00
{
highlightWord: {
order: -1,
match(arr, parseDepth) {
if (null != parseDepth.parseDepth) {
if (parseDepth.parseDepth > 10) {
return null;
}
}
if (null != parseDepth.highlightWord) {
if (0 !== parseDepth.highlightWord.length) {
const index = arr.indexOf(parseDepth.highlightWord);
if (-1 === index) {
return null;
} else {
2026-07-29 08:29:29 +00:00
let tmp2 = 0 === arr.length;
if (!tmp2) {
let tmp = 0 === index;
if (!tmp) {
tmp = "" === arr.charAt(index - 1).trim();
const str = arr.charAt(index - 1);
}
tmp2 = tmp;
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp3 = !tmp2;
2026-07-24 07:16:23 +00:00
if (tmp2) {
2026-07-29 08:29:29 +00:00
const sum = index + parseDepth.highlightWord.length;
let tmp5 = sum === arr.length;
if (!tmp5) {
tmp5 = "" === arr.charAt(sum).trim();
const str3 = arr.charAt(sum);
}
tmp3 = !tmp5;
}
let tmp6 = index;
let tmp7 = index;
if (tmp3) {
2026-07-24 07:16:23 +00:00
while (true) {
2026-07-29 08:29:29 +00:00
let index1 = arr.indexOf(parseDepth.highlightWord, tmp6 + 1);
let tmp9 = 0 === arr.length;
if (!tmp9) {
let tmp10 = 0 === index1;
if (!tmp10) {
let str6 = arr.charAt(index1 - 1);
tmp10 = "" === str6.trim();
}
tmp9 = tmp10;
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp11 = !tmp9;
if (tmp9) {
let sum1 = index1 + parseDepth.highlightWord.length;
let tmp13 = sum1 === arr.length;
if (!tmp13) {
let str7 = arr.charAt(sum1);
tmp13 = "" === str7.trim();
}
tmp11 = !tmp13;
}
tmp7 = index1;
if (!tmp11) {
2026-07-20 16:05:17 +00:00
break;
2026-07-24 07:16:23 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp6 = index1;
tmp7 = index1;
2026-07-24 07:16:23 +00:00
if (-1 === index1) {
break;
}
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
if (-1 === tmp7) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-29 08:29:29 +00:00
const substr = arr.substring(0, tmp7);
const items = [arr, parseDepth.highlightWord, substr, arr.substring(tmp7 + parseDepth.highlightWord.length)];
2026-07-20 16:05:17 +00:00
return items;
}
}
}
}
return null;
},
parse(arg0, arg1, arg2) {
2026-07-29 08:29:29 +00:00
let num = module.parseDepth;
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
let obj = {};
const merged = Object.assign(module);
2026-07-29 08:29:29 +00:00
obj.parseDepth = num + 1;
2026-07-20 16:05:17 +00:00
const _module = require(global[2], obj);
const _module1 = require(global[3], obj);
const items = [..._module, obj, ..._module1];
obj = { type: "highlight", content: global[1] };
return items;
}
}
},
];
const obj22 = {
order: -1,
match(arr, parseDepth) {
if (null != parseDepth.parseDepth) {
if (parseDepth.parseDepth > 10) {
return null;
}
}
if (null != parseDepth.highlightWord) {
if (0 !== parseDepth.highlightWord.length) {
const index = arr.indexOf(parseDepth.highlightWord);
if (-1 === index) {
return null;
} else {
2026-07-29 08:29:29 +00:00
let tmp2 = 0 === arr.length;
if (!tmp2) {
let tmp = 0 === index;
if (!tmp) {
tmp = "" === arr.charAt(index - 1).trim();
const str = arr.charAt(index - 1);
}
tmp2 = tmp;
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp3 = !tmp2;
2026-07-24 07:16:23 +00:00
if (tmp2) {
2026-07-29 08:29:29 +00:00
const sum = index + parseDepth.highlightWord.length;
let tmp5 = sum === arr.length;
if (!tmp5) {
tmp5 = "" === arr.charAt(sum).trim();
const str3 = arr.charAt(sum);
}
tmp3 = !tmp5;
}
let tmp6 = index;
let tmp7 = index;
if (tmp3) {
2026-07-24 07:16:23 +00:00
while (true) {
2026-07-29 08:29:29 +00:00
let index1 = arr.indexOf(parseDepth.highlightWord, tmp6 + 1);
let tmp9 = 0 === arr.length;
if (!tmp9) {
let tmp10 = 0 === index1;
if (!tmp10) {
let str6 = arr.charAt(index1 - 1);
tmp10 = "" === str6.trim();
}
tmp9 = tmp10;
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp11 = !tmp9;
if (tmp9) {
let sum1 = index1 + parseDepth.highlightWord.length;
let tmp13 = sum1 === arr.length;
if (!tmp13) {
let str7 = arr.charAt(sum1);
tmp13 = "" === str7.trim();
}
tmp11 = !tmp13;
}
tmp7 = index1;
if (!tmp11) {
2026-07-20 16:05:17 +00:00
break;
2026-07-24 07:16:23 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp6 = index1;
tmp7 = index1;
2026-07-24 07:16:23 +00:00
if (-1 === index1) {
break;
}
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
if (-1 === tmp7) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-29 08:29:29 +00:00
const substr = arr.substring(0, tmp7);
const items = [arr, parseDepth.highlightWord, substr, arr.substring(tmp7 + parseDepth.highlightWord.length)];
2026-07-20 16:05:17 +00:00
return items;
}
}
}
}
return null;
},
parse(arg0, arg1, arg2) {
2026-07-29 08:29:29 +00:00
let num = module.parseDepth;
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
let obj = {};
const merged = Object.assign(module);
2026-07-29 08:29:29 +00:00
obj.parseDepth = num + 1;
2026-07-20 16:05:17 +00:00
const _module = require(global[2], obj);
const _module1 = require(global[3], obj);
const items = [..._module, obj, ..._module1];
obj = { type: "highlight", content: global[1] };
return items;
}
};
2026-08-24 06:08:38 +00:00
const omitResult7 = importDefaultResult4.omit(importDefaultResult3Result, ["codeBlock", "br", "inlineCode"]);
const importDefaultResult12 = importDefaultResult3;
items2[1] = importDefaultResult4.omit(importDefaultResult3Result, ["url"]);
const importDefaultResult13 = importDefaultResult4;
2026-07-20 16:05:17 +00:00
const obj23 = { RULES: importDefaultResult3Result, CHANNEL_TOPIC_RULES: omitResult, VOICE_CHANNEL_STATUS_RULES: omitResult1, EMBED_TITLE_RULES: omitResult2, INLINE_REPLY_RULES: omitResult3, GUILD_VERIFICATION_FORM_RULES: omitResult4, GUILD_EVENT_RULES: omitResult6, PROFILE_BIO_RULES: omitResult5, AUTO_MODERATION_SYSTEM_MESSAGE_RULES: importDefaultResult12(items2), NATIVE_SEARCH_RESULT_LINK_RULES: omitResult7 };
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/markup/MarkupRules.tsx");
2026-07-20 16:05:17 +00:00
export default obj23;
export { hydrateRoleMention };
export { hydrateUserMention };
2026-07-29 08:29:29 +00:00
export const hydrateCommandMention = function hydrateCommandMention(commandName, commandId, channelId) {
const items = [...callback2(commandName.split(" ")).slice(1)];
2026-08-06 08:05:19 +00:00
const mapped = items.map((arg0) => "" + closure_12 + arg0);
2026-07-29 08:29:29 +00:00
let obj = { type: "commandMention", channelId: channelId.channelId, commandId, commandName, commandKey: "" + commandId + mapped.join(""), content: null };
obj = { type: "text", content: "" + commandName };
const items1 = [obj];
obj[5] = items1;
return obj;
};