decord/source/modules/markup/BioMarkupUtils.tsx

68 lines
2.7 KiB
TypeScript
Raw Normal View History

// Module ID: 9424
// Function ID: 9425
2026-07-29 08:29:29 +00:00
// Name: parseBioReact
// Dependencies: [4997, 4998, 4551, 1437, 7987, 4550, 4257, 12, 2]
2026-08-26 06:04:24 +00:00
// Exports: getOrParseBioAST, parseBioReact, parseBioReactWithCachedAST
2026-07-20 16:05:17 +00:00
// Module 9424 (parseBioReact)
import privDefault from "priv" /* 1437 */;
import tDefault from "t" /* 4257 */;
import MarkupTextDefault from "MarkupText" /* 4551 */;
import parseLinkDefault from "parseLink" /* 4998 */;
import MarkupText from "MarkupText" /* 4551 */;
import importDefaultResult from "combineMarkupRules" /* 4997 */;
import importAllResult from "reactParserFor" /* 7987 */;
import importDefaultResult1 from "get defaultRules" /* 4550 */;
2026-08-24 06:08:38 +00:00
import importDefaultResult3 from "apply" /* 12 */;
2026-07-23 10:11:24 +00:00
2026-08-26 06:04:24 +00:00
const items = [parseLinkDefault.PROFILE_BIO_RULES, MarkupTextDefault({ enableBuildOverrides: false, mustConfirmExternalLink: true }), ];
items[2] = MarkupText.createFetchingGameMentionRule();
2026-08-24 06:08:38 +00:00
const importDefaultResultResult = importDefaultResult(items);
let closure_3 = new privDefault({ max: 2000 });
2026-08-26 06:04:24 +00:00
let closure_4 = { allowGameMentions: true };
2026-08-24 06:08:38 +00:00
let tmp4 = new privDefault({ max: 2000 });
2026-08-26 06:04:24 +00:00
let closure_5 = importAllResult.reactParserFor(importDefaultResultResult);
let closure_6 = importDefaultResult1.astParserFor(importDefaultResultResult);
2026-08-24 06:08:38 +00:00
const importAllResult1 = importAllResult;
const importDefaultResult2 = importDefaultResult;
2026-08-26 06:04:24 +00:00
const items1 = [importDefaultResult3.omit(importDefaultResultResult, ["link", "url", "autolink", "customEmoji", "emoji", "commandMention"]), ];
MarkupText = {
2026-07-20 16:05:17 +00:00
react() {
return null;
}
};
2026-08-26 06:04:24 +00:00
items1[1] = { emoji: MarkupText };
const reactParserForResult = importAllResult1.reactParserFor(importDefaultResult2(items1));
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/markup/BioMarkupUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-08-26 06:04:24 +00:00
export const parseBioReact = function parseBioReact(arg0, arg1, arg2) {
const merged = Object.assign(closure_4);
const merged1 = Object.assign(arg2);
return callback(arg0, arg1, {}, arg3);
};
2026-07-29 08:29:29 +00:00
export const getOrParseBioAST = function getOrParseBioAST(arg0) {
2026-08-24 06:08:38 +00:00
let value = store.get(arg0);
2026-07-29 08:29:29 +00:00
if (null == value) {
2026-08-26 06:04:24 +00:00
const tmp3 = callback2(arg0, true);
2026-08-24 06:08:38 +00:00
const result = store.set(arg0, tmp3);
2026-07-29 08:29:29 +00:00
value = tmp3;
}
return value;
};
2026-07-20 16:05:17 +00:00
export const parseBioReactWithCachedAST = function parseBioReactWithCachedAST(description) {
if (0 === description.trim().length) {
return null;
} else {
2026-08-24 06:08:38 +00:00
let value = store.get(description);
2026-07-29 08:29:29 +00:00
if (null == value) {
2026-08-26 06:04:24 +00:00
const tmp4 = callback2(description, true);
2026-07-29 08:29:29 +00:00
const result = obj.set(description, tmp4);
value = tmp4;
}
2026-08-24 06:08:38 +00:00
obj = store;
const obj2 = tDefault;
return obj2.reactFor(tDefault.ruleOutput(closure_2, "react"))(value);
2026-07-20 16:05:17 +00:00
}
};
2026-08-26 06:04:24 +00:00
export const parseBioReactWithoutScrolling = reactParserForResult;