818 lines
22 KiB
JavaScript
Raw Normal View History

2025-09-05 14:59:21 +08:00
// node_modules/micromark-util-symbol/lib/codes.js
var codes = (
/** @type {const} */
{
carriageReturn: -5,
lineFeed: -4,
carriageReturnLineFeed: -3,
horizontalTab: -2,
virtualSpace: -1,
eof: null,
nul: 0,
soh: 1,
stx: 2,
etx: 3,
eot: 4,
enq: 5,
ack: 6,
bel: 7,
bs: 8,
ht: 9,
// `\t`
lf: 10,
// `\n`
vt: 11,
// `\v`
ff: 12,
// `\f`
cr: 13,
// `\r`
so: 14,
si: 15,
dle: 16,
dc1: 17,
dc2: 18,
dc3: 19,
dc4: 20,
nak: 21,
syn: 22,
etb: 23,
can: 24,
em: 25,
sub: 26,
esc: 27,
fs: 28,
gs: 29,
rs: 30,
us: 31,
space: 32,
exclamationMark: 33,
// `!`
quotationMark: 34,
// `"`
numberSign: 35,
// `#`
dollarSign: 36,
// `$`
percentSign: 37,
// `%`
ampersand: 38,
// `&`
apostrophe: 39,
// `'`
leftParenthesis: 40,
// `(`
rightParenthesis: 41,
// `)`
asterisk: 42,
// `*`
plusSign: 43,
// `+`
comma: 44,
// `,`
dash: 45,
// `-`
dot: 46,
// `.`
slash: 47,
// `/`
digit0: 48,
// `0`
digit1: 49,
// `1`
digit2: 50,
// `2`
digit3: 51,
// `3`
digit4: 52,
// `4`
digit5: 53,
// `5`
digit6: 54,
// `6`
digit7: 55,
// `7`
digit8: 56,
// `8`
digit9: 57,
// `9`
colon: 58,
// `:`
semicolon: 59,
// `;`
lessThan: 60,
// `<`
equalsTo: 61,
// `=`
greaterThan: 62,
// `>`
questionMark: 63,
// `?`
atSign: 64,
// `@`
uppercaseA: 65,
// `A`
uppercaseB: 66,
// `B`
uppercaseC: 67,
// `C`
uppercaseD: 68,
// `D`
uppercaseE: 69,
// `E`
uppercaseF: 70,
// `F`
uppercaseG: 71,
// `G`
uppercaseH: 72,
// `H`
uppercaseI: 73,
// `I`
uppercaseJ: 74,
// `J`
uppercaseK: 75,
// `K`
uppercaseL: 76,
// `L`
uppercaseM: 77,
// `M`
uppercaseN: 78,
// `N`
uppercaseO: 79,
// `O`
uppercaseP: 80,
// `P`
uppercaseQ: 81,
// `Q`
uppercaseR: 82,
// `R`
uppercaseS: 83,
// `S`
uppercaseT: 84,
// `T`
uppercaseU: 85,
// `U`
uppercaseV: 86,
// `V`
uppercaseW: 87,
// `W`
uppercaseX: 88,
// `X`
uppercaseY: 89,
// `Y`
uppercaseZ: 90,
// `Z`
leftSquareBracket: 91,
// `[`
backslash: 92,
// `\`
rightSquareBracket: 93,
// `]`
caret: 94,
// `^`
underscore: 95,
// `_`
graveAccent: 96,
// `` ` ``
lowercaseA: 97,
// `a`
lowercaseB: 98,
// `b`
lowercaseC: 99,
// `c`
lowercaseD: 100,
// `d`
lowercaseE: 101,
// `e`
lowercaseF: 102,
// `f`
lowercaseG: 103,
// `g`
lowercaseH: 104,
// `h`
lowercaseI: 105,
// `i`
lowercaseJ: 106,
// `j`
lowercaseK: 107,
// `k`
lowercaseL: 108,
// `l`
lowercaseM: 109,
// `m`
lowercaseN: 110,
// `n`
lowercaseO: 111,
// `o`
lowercaseP: 112,
// `p`
lowercaseQ: 113,
// `q`
lowercaseR: 114,
// `r`
lowercaseS: 115,
// `s`
lowercaseT: 116,
// `t`
lowercaseU: 117,
// `u`
lowercaseV: 118,
// `v`
lowercaseW: 119,
// `w`
lowercaseX: 120,
// `x`
lowercaseY: 121,
// `y`
lowercaseZ: 122,
// `z`
leftCurlyBrace: 123,
// `{`
verticalBar: 124,
// `|`
rightCurlyBrace: 125,
// `}`
tilde: 126,
// `~`
del: 127,
// Unicode Specials block.
byteOrderMarker: 65279,
// Unicode Specials block.
replacementCharacter: 65533
// `<60>`
}
);
// node_modules/micromark-util-symbol/lib/constants.js
var constants = (
/** @type {const} */
{
attentionSideAfter: 2,
// Symbol to mark an attention sequence as after content: `a*`
attentionSideBefore: 1,
// Symbol to mark an attention sequence as before content: `*a`
atxHeadingOpeningFenceSizeMax: 6,
// 6 number signs is fine, 7 isnt.
autolinkDomainSizeMax: 63,
// 63 characters is fine, 64 is too many.
autolinkSchemeSizeMax: 32,
// 32 characters is fine, 33 is too many.
cdataOpeningString: "CDATA[",
// And preceded by `<![`.
characterGroupPunctuation: 2,
// Symbol used to indicate a character is punctuation
characterGroupWhitespace: 1,
// Symbol used to indicate a character is whitespace
characterReferenceDecimalSizeMax: 7,
// `&#9999999;`.
characterReferenceHexadecimalSizeMax: 6,
// `&#xff9999;`.
characterReferenceNamedSizeMax: 31,
// `&CounterClockwiseContourIntegral;`.
codeFencedSequenceSizeMin: 3,
// At least 3 ticks or tildes are needed.
contentTypeContent: "content",
contentTypeDocument: "document",
contentTypeFlow: "flow",
contentTypeString: "string",
contentTypeText: "text",
hardBreakPrefixSizeMin: 2,
// At least 2 trailing spaces are needed.
htmlBasic: 6,
// Symbol for `<div`
htmlCdata: 5,
// Symbol for `<![CDATA[]]>`
htmlComment: 2,
// Symbol for `<!---->`
htmlComplete: 7,
// Symbol for `<x>`
htmlDeclaration: 4,
// Symbol for `<!doctype>`
htmlInstruction: 3,
// Symbol for `<?php?>`
htmlRawSizeMax: 8,
// Length of `textarea`.
htmlRaw: 1,
// Symbol for `<script>`
linkResourceDestinationBalanceMax: 32,
// See: <https://spec.commonmark.org/0.30/#link-destination>, <https://github.com/remarkjs/react-markdown/issues/658#issuecomment-984345577>
linkReferenceSizeMax: 999,
// See: <https://spec.commonmark.org/0.30/#link-label>
listItemValueSizeMax: 10,
// See: <https://spec.commonmark.org/0.30/#ordered-list-marker>
numericBaseDecimal: 10,
numericBaseHexadecimal: 16,
tabSize: 4,
// Tabs have a hard-coded size of 4, per CommonMark.
thematicBreakMarkerCountMin: 3,
// At least 3 asterisks, dashes, or underscores are needed.
v8MaxSafeChunkSize: 1e4
// V8 (and potentially others) have problems injecting giant arrays into other arrays, hence we operate in chunks.
}
);
// node_modules/micromark-util-symbol/lib/types.js
var types = (
/** @type {const} */
{
// Generic type for data, such as in a title, a destination, etc.
data: "data",
// Generic type for syntactic whitespace (tabs, virtual spaces, spaces).
// Such as, between a fenced code fence and an info string.
whitespace: "whitespace",
// Generic type for line endings (line feed, carriage return, carriage return +
// line feed).
lineEnding: "lineEnding",
// A line ending, but ending a blank line.
lineEndingBlank: "lineEndingBlank",
// Generic type for whitespace (tabs, virtual spaces, spaces) at the start of a
// line.
linePrefix: "linePrefix",
// Generic type for whitespace (tabs, virtual spaces, spaces) at the end of a
// line.
lineSuffix: "lineSuffix",
// Whole ATX heading:
//
// ```markdown
// #
// ## Alpha
// ### Bravo ###
// ```
//
// Includes `atxHeadingSequence`, `whitespace`, `atxHeadingText`.
atxHeading: "atxHeading",
// Sequence of number signs in an ATX heading (`###`).
atxHeadingSequence: "atxHeadingSequence",
// Content in an ATX heading (`alpha`).
// Includes text.
atxHeadingText: "atxHeadingText",
// Whole autolink (`<https://example.com>` or `<admin@example.com>`)
// Includes `autolinkMarker` and `autolinkProtocol` or `autolinkEmail`.
autolink: "autolink",
// Email autolink w/o markers (`admin@example.com`)
autolinkEmail: "autolinkEmail",
// Marker around an `autolinkProtocol` or `autolinkEmail` (`<` or `>`).
autolinkMarker: "autolinkMarker",
// Protocol autolink w/o markers (`https://example.com`)
autolinkProtocol: "autolinkProtocol",
// A whole character escape (`\-`).
// Includes `escapeMarker` and `characterEscapeValue`.
characterEscape: "characterEscape",
// The escaped character (`-`).
characterEscapeValue: "characterEscapeValue",
// A whole character reference (`&amp;`, `&#8800;`, or `&#x1D306;`).
// Includes `characterReferenceMarker`, an optional
// `characterReferenceMarkerNumeric`, in which case an optional
// `characterReferenceMarkerHexadecimal`, and a `characterReferenceValue`.
characterReference: "characterReference",
// The start or end marker (`&` or `;`).
characterReferenceMarker: "characterReferenceMarker",
// Mark reference as numeric (`#`).
characterReferenceMarkerNumeric: "characterReferenceMarkerNumeric",
// Mark reference as numeric (`x` or `X`).
characterReferenceMarkerHexadecimal: "characterReferenceMarkerHexadecimal",
// Value of character reference w/o markers (`amp`, `8800`, or `1D306`).
characterReferenceValue: "characterReferenceValue",
// Whole fenced code:
//
// ````markdown
// ```js
// alert(1)
// ```
// ````
codeFenced: "codeFenced",
// A fenced code fence, including whitespace, sequence, info, and meta
// (` ```js `).
codeFencedFence: "codeFencedFence",
// Sequence of grave accent or tilde characters (` ``` `) in a fence.
codeFencedFenceSequence: "codeFencedFenceSequence",
// Info word (`js`) in a fence.
// Includes string.
codeFencedFenceInfo: "codeFencedFenceInfo",
// Meta words (`highlight="1"`) in a fence.
// Includes string.
codeFencedFenceMeta: "codeFencedFenceMeta",
// A line of code.
codeFlowValue: "codeFlowValue",
// Whole indented code:
//
// ```markdown
// alert(1)
// ```
//
// Includes `lineEnding`, `linePrefix`, and `codeFlowValue`.
codeIndented: "codeIndented",
// A text code (``` `alpha` ```).
// Includes `codeTextSequence`, `codeTextData`, `lineEnding`, and can include
// `codeTextPadding`.
codeText: "codeText",
codeTextData: "codeTextData",
// A space or line ending right after or before a tick.
codeTextPadding: "codeTextPadding",
// A text code fence (` `` `).
codeTextSequence: "codeTextSequence",
// Whole content:
//
// ```markdown
// [a]: b
// c
// =
// d
// ```
//
// Includes `paragraph` and `definition`.
content: "content",
// Whole definition:
//
// ```markdown
// [micromark]: https://github.com/micromark/micromark
// ```
//
// Includes `definitionLabel`, `definitionMarker`, `whitespace`,
// `definitionDestination`, and optionally `lineEnding` and `definitionTitle`.
definition: "definition",
// Destination of a definition (`https://github.com/micromark/micromark` or
// `<https://github.com/micromark/micromark>`).
// Includes `definitionDestinationLiteral` or `definitionDestinationRaw`.
definitionDestination: "definitionDestination",
// Enclosed destination of a definition
// (`<https://github.com/micromark/micromark>`).
// Includes `definitionDestinationLiteralMarker` and optionally
// `definitionDestinationString`.
definitionDestinationLiteral: "definitionDestinationLiteral",
// Markers of an enclosed definition destination (`<` or `>`).
definitionDestinationLiteralMarker: "definitionDestinationLiteralMarker",
// Unenclosed destination of a definition
// (`https://github.com/micromark/micromark`).
// Includes `definitionDestinationString`.
definitionDestinationRaw: "definitionDestinationRaw",
// Text in an destination (`https://github.com/micromark/micromark`).
// Includes string.
definitionDestinationString: "definitionDestinationString",
// Label of a definition (`[micromark]`).
// Includes `definitionLabelMarker` and `definitionLabelString`.
definitionLabel: "definitionLabel",
// Markers of a definition label (`[` or `]`).
definitionLabelMarker: "definitionLabelMarker",
// Value of a definition label (`micromark`).
// Includes string.
definitionLabelString: "definitionLabelString",
// Marker between a label and a destination (`:`).
definitionMarker: "definitionMarker",
// Title of a definition (`"x"`, `'y'`, or `(z)`).
// Includes `definitionTitleMarker` and optionally `definitionTitleString`.
definitionTitle: "definitionTitle",
// Marker around a title of a definition (`"`, `'`, `(`, or `)`).
definitionTitleMarker: "definitionTitleMarker",
// Data without markers in a title (`z`).
// Includes string.
definitionTitleString: "definitionTitleString",
// Emphasis (`*alpha*`).
// Includes `emphasisSequence` and `emphasisText`.
emphasis: "emphasis",
// Sequence of emphasis markers (`*` or `_`).
emphasisSequence: "emphasisSequence",
// Emphasis text (`alpha`).
// Includes text.
emphasisText: "emphasisText",
// The character escape marker (`\`).
escapeMarker: "escapeMarker",
// A hard break created with a backslash (`\\n`).
// Note: does not include the line ending.
hardBreakEscape: "hardBreakEscape",
// A hard break created with trailing spaces (` \n`).
// Does not include the line ending.
hardBreakTrailing: "hardBreakTrailing",
// Flow HTML:
//
// ```markdown
// <div
// ```
//
// Inlcudes `lineEnding`, `htmlFlowData`.
htmlFlow: "htmlFlow",
htmlFlowData: "htmlFlowData",
// HTML in text (the tag in `a <i> b`).
// Includes `lineEnding`, `htmlTextData`.
htmlText: "htmlText",
htmlTextData: "htmlTextData",
// Whole image (`![alpha](bravo)`, `![alpha][bravo]`, `![alpha][]`, or
// `![alpha]`).
// Includes `label` and an optional `resource` or `reference`.
image: "image",
// Whole link label (`[*alpha*]`).
// Includes `labelLink` or `labelImage`, `labelText`, and `labelEnd`.
label: "label",
// Text in an label (`*alpha*`).
// Includes text.
labelText: "labelText",
// Start a link label (`[`).
// Includes a `labelMarker`.
labelLink: "labelLink",
// Start an image label (`![`).
// Includes `labelImageMarker` and `labelMarker`.
labelImage: "labelImage",
// Marker of a label (`[` or `]`).
labelMarker: "labelMarker",
// Marker to start an image (`!`).
labelImageMarker: "labelImageMarker",
// End a label (`]`).
// Includes `labelMarker`.
labelEnd: "labelEnd",
// Whole link (`[alpha](bravo)`, `[alpha][bravo]`, `[alpha][]`, or `[alpha]`).
// Includes `label` and an optional `resource` or `reference`.
link: "link",
// Whole paragraph:
//
// ```markdown
// alpha
// bravo.
// ```
//
// Includes text.
paragraph: "paragraph",
// A reference (`[alpha]` or `[]`).
// Includes `referenceMarker` and an optional `referenceString`.
reference: "reference",
// A reference marker (`[` or `]`).
referenceMarker: "referenceMarker",
// Reference text (`alpha`).
// Includes string.
referenceString: "referenceString",
// A resource (`(https://example.com "alpha")`).
// Includes `resourceMarker`, an optional `resourceDestination` with an optional
// `whitespace` and `resourceTitle`.
resource: "resource",
// A resource destination (`https://example.com`).
// Includes `resourceDestinationLiteral` or `resourceDestinationRaw`.
resourceDestination: "resourceDestination",
// A literal resource destination (`<https://example.com>`).
// Includes `resourceDestinationLiteralMarker` and optionally
// `resourceDestinationString`.
resourceDestinationLiteral: "resourceDestinationLiteral",
// A resource destination marker (`<` or `>`).
resourceDestinationLiteralMarker: "resourceDestinationLiteralMarker",
// A raw resource destination (`https://example.com`).
// Includes `resourceDestinationString`.
resourceDestinationRaw: "resourceDestinationRaw",
// Resource destination text (`https://example.com`).
// Includes string.
resourceDestinationString: "resourceDestinationString",
// A resource marker (`(` or `)`).
resourceMarker: "resourceMarker",
// A resource title (`"alpha"`, `'alpha'`, or `(alpha)`).
// Includes `resourceTitleMarker` and optionally `resourceTitleString`.
resourceTitle: "resourceTitle",
// A resource title marker (`"`, `'`, `(`, or `)`).
resourceTitleMarker: "resourceTitleMarker",
// Resource destination title (`alpha`).
// Includes string.
resourceTitleString: "resourceTitleString",
// Whole setext heading:
//
// ```markdown
// alpha
// bravo
// =====
// ```
//
// Includes `setextHeadingText`, `lineEnding`, `linePrefix`, and
// `setextHeadingLine`.
setextHeading: "setextHeading",
// Content in a setext heading (`alpha\nbravo`).
// Includes text.
setextHeadingText: "setextHeadingText",
// Underline in a setext heading, including whitespace suffix (`==`).
// Includes `setextHeadingLineSequence`.
setextHeadingLine: "setextHeadingLine",
// Sequence of equals or dash characters in underline in a setext heading (`-`).
setextHeadingLineSequence: "setextHeadingLineSequence",
// Strong (`**alpha**`).
// Includes `strongSequence` and `strongText`.
strong: "strong",
// Sequence of strong markers (`**` or `__`).
strongSequence: "strongSequence",
// Strong text (`alpha`).
// Includes text.
strongText: "strongText",
// Whole thematic break:
//
// ```markdown
// * * *
// ```
//
// Includes `thematicBreakSequence` and `whitespace`.
thematicBreak: "thematicBreak",
// A sequence of one or more thematic break markers (`***`).
thematicBreakSequence: "thematicBreakSequence",
// Whole block quote:
//
// ```markdown
// > a
// >
// > b
// ```
//
// Includes `blockQuotePrefix` and flow.
blockQuote: "blockQuote",
// The `>` or `> ` of a block quote.
blockQuotePrefix: "blockQuotePrefix",
// The `>` of a block quote prefix.
blockQuoteMarker: "blockQuoteMarker",
// The optional ` ` of a block quote prefix.
blockQuotePrefixWhitespace: "blockQuotePrefixWhitespace",
// Whole ordered list:
//
// ```markdown
// 1. a
// b
// ```
//
// Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further
// lines.
listOrdered: "listOrdered",
// Whole unordered list:
//
// ```markdown
// - a
// b
// ```
//
// Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further
// lines.
listUnordered: "listUnordered",
// The indent of further list item lines.
listItemIndent: "listItemIndent",
// A marker, as in, `*`, `+`, `-`, `.`, or `)`.
listItemMarker: "listItemMarker",
// The thing that starts a list item, such as `1. `.
// Includes `listItemValue` if ordered, `listItemMarker`, and
// `listItemPrefixWhitespace` (unless followed by a line ending).
listItemPrefix: "listItemPrefix",
// The whitespace after a marker.
listItemPrefixWhitespace: "listItemPrefixWhitespace",
// The numerical value of an ordered item.
listItemValue: "listItemValue",
// Internal types used for subtokenizers, compiled away
chunkDocument: "chunkDocument",
chunkContent: "chunkContent",
chunkFlow: "chunkFlow",
chunkText: "chunkText",
chunkString: "chunkString"
}
);
// node_modules/micromark-util-symbol/lib/values.js
var values = (
/** @type {const} */
{
ht: " ",
lf: "\n",
cr: "\r",
space: " ",
exclamationMark: "!",
quotationMark: '"',
numberSign: "#",
dollarSign: "$",
percentSign: "%",
ampersand: "&",
apostrophe: "'",
leftParenthesis: "(",
rightParenthesis: ")",
asterisk: "*",
plusSign: "+",
comma: ",",
dash: "-",
dot: ".",
slash: "/",
digit0: "0",
digit1: "1",
digit2: "2",
digit3: "3",
digit4: "4",
digit5: "5",
digit6: "6",
digit7: "7",
digit8: "8",
digit9: "9",
colon: ":",
semicolon: ";",
lessThan: "<",
equalsTo: "=",
greaterThan: ">",
questionMark: "?",
atSign: "@",
uppercaseA: "A",
uppercaseB: "B",
uppercaseC: "C",
uppercaseD: "D",
uppercaseE: "E",
uppercaseF: "F",
uppercaseG: "G",
uppercaseH: "H",
uppercaseI: "I",
uppercaseJ: "J",
uppercaseK: "K",
uppercaseL: "L",
uppercaseM: "M",
uppercaseN: "N",
uppercaseO: "O",
uppercaseP: "P",
uppercaseQ: "Q",
uppercaseR: "R",
uppercaseS: "S",
uppercaseT: "T",
uppercaseU: "U",
uppercaseV: "V",
uppercaseW: "W",
uppercaseX: "X",
uppercaseY: "Y",
uppercaseZ: "Z",
leftSquareBracket: "[",
backslash: "\\",
rightSquareBracket: "]",
caret: "^",
underscore: "_",
graveAccent: "`",
lowercaseA: "a",
lowercaseB: "b",
lowercaseC: "c",
lowercaseD: "d",
lowercaseE: "e",
lowercaseF: "f",
lowercaseG: "g",
lowercaseH: "h",
lowercaseI: "i",
lowercaseJ: "j",
lowercaseK: "k",
lowercaseL: "l",
lowercaseM: "m",
lowercaseN: "n",
lowercaseO: "o",
lowercaseP: "p",
lowercaseQ: "q",
lowercaseR: "r",
lowercaseS: "s",
lowercaseT: "t",
lowercaseU: "u",
lowercaseV: "v",
lowercaseW: "w",
lowercaseX: "x",
lowercaseY: "y",
lowercaseZ: "z",
leftCurlyBrace: "{",
verticalBar: "|",
rightCurlyBrace: "}",
tilde: "~",
replacementCharacter: "<22>"
}
);
// node_modules/micromark-util-character/dev/index.js
var asciiAlpha = regexCheck(/[A-Za-z]/);
var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
function asciiControl(code) {
return (
// Special whitespace codes (which have negative values), C0 and Control
// character DEL
code !== null && (code < codes.space || code === codes.del)
);
}
var asciiDigit = regexCheck(/\d/);
var asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
function markdownLineEnding(code) {
return code !== null && code < codes.horizontalTab;
}
function markdownLineEndingOrSpace(code) {
return code !== null && (code < codes.nul || code === codes.space);
}
function markdownSpace(code) {
return code === codes.horizontalTab || code === codes.virtualSpace || code === codes.space;
}
var unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);
var unicodeWhitespace = regexCheck(/\s/);
function regexCheck(regex) {
return check;
function check(code) {
return code !== null && code > -1 && regex.test(String.fromCharCode(code));
}
}
export {
codes,
constants,
types,
values,
asciiAlpha,
asciiAlphanumeric,
asciiControl,
markdownLineEnding,
markdownLineEndingOrSpace,
markdownSpace,
unicodePunctuation,
unicodeWhitespace
};
//# sourceMappingURL=chunk-QZZOH36M.js.map