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C,SAyGN,SAAgCC,EAASC,GACvC,MAAMW,EAAOC,KACb,OAaA,SAAe9B,GACb,OAAO,IAAqB+K,KAC1BlJ,EACAZ,EACAC,EACA,oBACA,0BACA,yBACAiC,EACAC,EACAS,EACAgH,EACAC,GACA,EAZK,CAaL9K,EACJ,CACF,IACF,C","sources":["webpack://typescript/./node_modules/micromark-extension-frontmatter/lib/syntax.js","webpack://typescript/./node_modules/micromark-extension-mdx-jsx/lib/syntax.js","webpack://typescript/./node_modules/micromark-extension-mdxjs-esm/lib/syntax.js","webpack://typescript/./node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js","webpack://typescript/./node_modules/micromark-extension-directive/lib/syntax.js","webpack://typescript/./node_modules/micromark-extension-gfm-table/lib/syntax.js","webpack://typescript/./node_modules/micromark-extension-mdx-expression/lib/syntax.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n *\n * @typedef {import('../matters.js').Info} Info\n * @typedef {import('../matters.js').Matter} Matter\n * @typedef {import('../matters.js').Options} Options\n */\n\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\nimport {matters} from '../matters.js'\n\n/**\n * Create an extension for `micromark` to enable frontmatter syntax.\n *\n * @param {Options | null | undefined} [options='yaml']\n * Configuration.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable frontmatter syntax.\n */\nexport function frontmatter(options) {\n const listOfMatters = matters(options)\n /** @type {ConstructRecord} */\n const flow = {}\n let index = -1\n while (++index < listOfMatters.length) {\n const matter = listOfMatters[index]\n const code = fence(matter, 'open').charCodeAt(0)\n const construct = createConstruct(matter)\n const existing = flow[code]\n if (Array.isArray(existing)) {\n existing.push(construct)\n } else {\n // Never a single object, always an array.\n flow[code] = [construct]\n }\n }\n return {\n flow\n }\n}\n\n/**\n * @param {Matter} matter\n * @returns {Construct}\n */\nfunction createConstruct(matter) {\n const anywhere = matter.anywhere\n const frontmatterType = matter.type\n const fenceType = frontmatterType + 'Fence'\n const sequenceType = fenceType + 'Sequence'\n const valueType = frontmatterType + 'Value'\n const closingFenceConstruct = {\n tokenize: tokenizeClosingFence,\n partial: true\n }\n\n /**\n * Fence to look for.\n *\n * @type {string}\n */\n let buffer\n let bufferIndex = 0\n return {\n tokenize: tokenizeFrontmatter,\n concrete: true\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeFrontmatter(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of frontmatter.\n *\n * ```markdown\n * > | ---\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function start(code) {\n const position = self.now()\n if (\n // Indent not allowed.\n position.column === 1 &&\n // Normally, only allowed in first line.\n (position.line === 1 || anywhere)\n ) {\n buffer = fence(matter, 'open')\n bufferIndex = 0\n if (code === buffer.charCodeAt(bufferIndex)) {\n effects.enter(frontmatterType)\n effects.enter(fenceType)\n effects.enter(sequenceType)\n return openSequence(code)\n }\n }\n return nok(code)\n }\n\n /**\n * In open sequence.\n *\n * ```markdown\n * > | ---\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function openSequence(code) {\n if (bufferIndex === buffer.length) {\n effects.exit(sequenceType)\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n return openSequenceWhitespace(code)\n }\n return openAfter(code)\n }\n if (code === buffer.charCodeAt(bufferIndex++)) {\n effects.consume(code)\n return openSequence\n }\n return nok(code)\n }\n\n /**\n * In whitespace after open sequence.\n *\n * ```markdown\n * > | ---␠\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function openSequenceWhitespace(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return openSequenceWhitespace\n }\n effects.exit('whitespace')\n return openAfter(code)\n }\n\n /**\n * After open sequence.\n *\n * ```markdown\n * > | ---\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function openAfter(code) {\n if (markdownLineEnding(code)) {\n effects.exit(fenceType)\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n // Get ready for closing fence.\n buffer = fence(matter, 'close')\n bufferIndex = 0\n return effects.attempt(closingFenceConstruct, after, contentStart)\n }\n\n // EOF is not okay.\n return nok(code)\n }\n\n /**\n * Start of content chunk.\n *\n * ```markdown\n * | ---\n * > | title: \"Venus\"\n * ^\n * | ---\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n if (code === null || markdownLineEnding(code)) {\n return contentEnd(code)\n }\n effects.enter(valueType)\n return contentInside(code)\n }\n\n /**\n * In content chunk.\n *\n * ```markdown\n * | ---\n * > | title: \"Venus\"\n * ^\n * | ---\n * ```\n *\n * @type {State}\n */\n function contentInside(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(valueType)\n return contentEnd(code)\n }\n effects.consume(code)\n return contentInside\n }\n\n /**\n * End of content chunk.\n *\n * ```markdown\n * | ---\n * > | title: \"Venus\"\n * ^\n * | ---\n * ```\n *\n * @type {State}\n */\n function contentEnd(code) {\n // Require a closing fence.\n if (code === null) {\n return nok(code)\n }\n\n // Can only be an eol.\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(closingFenceConstruct, after, contentStart)\n }\n\n /**\n * After frontmatter.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // `code` must be eol/eof.\n effects.exit(frontmatterType)\n return ok(code)\n }\n }\n\n /** @type {Tokenizer} */\n function tokenizeClosingFence(effects, ok, nok) {\n let bufferIndex = 0\n return closeStart\n\n /**\n * Start of close sequence.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function closeStart(code) {\n if (code === buffer.charCodeAt(bufferIndex)) {\n effects.enter(fenceType)\n effects.enter(sequenceType)\n return closeSequence(code)\n }\n return nok(code)\n }\n\n /**\n * In close sequence.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function closeSequence(code) {\n if (bufferIndex === buffer.length) {\n effects.exit(sequenceType)\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n return closeSequenceWhitespace(code)\n }\n return closeAfter(code)\n }\n if (code === buffer.charCodeAt(bufferIndex++)) {\n effects.consume(code)\n return closeSequence\n }\n return nok(code)\n }\n\n /**\n * In whitespace after close sequence.\n *\n * ```markdown\n * > | ---\n * | title: \"Venus\"\n * | ---␠\n * ^\n * ```\n *\n * @type {State}\n */\n function closeSequenceWhitespace(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return closeSequenceWhitespace\n }\n effects.exit('whitespace')\n return closeAfter(code)\n }\n\n /**\n * After close sequence.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function closeAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(fenceType)\n return ok(code)\n }\n return nok(code)\n }\n }\n}\n\n/**\n * @param {Matter} matter\n * @param {'open' | 'close'} prop\n * @returns {string}\n */\nfunction fence(matter, prop) {\n return matter.marker\n ? pick(matter.marker, prop).repeat(3)\n : // @ts-expect-error: They’re mutually exclusive.\n pick(matter.fence, prop)\n}\n\n/**\n * @param {Info | string} schema\n * @param {'open' | 'close'} prop\n * @returns {string}\n */\nfunction pick(schema, prop) {\n return typeof schema === 'string' ? schema : schema[prop]\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-factory-mdx-expression').Acorn} Acorn\n * @typedef {import('micromark-factory-mdx-expression').AcornOptions} AcornOptions\n */\n\n/**\n * @typedef Options\n * Configuration (optional).\n * @property {Acorn | null | undefined} [acorn]\n * Acorn parser to use (optional).\n * @property {AcornOptions | null | undefined} [acornOptions]\n * Configuration for acorn (default: `{ecmaVersion: 2020, locations: true,\n * sourceType: 'module'}`).\n *\n * All fields except `locations` can be set.\n * @property {boolean | null | undefined} [addResult=false]\n * Whether to add `estree` fields to tokens with results from acorn.\n */\n\nimport {jsxText} from './jsx-text.js'\nimport {jsxFlow} from './jsx-flow.js'\n\n/**\n * Create an extension for `micromark` to enable MDX JSX syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable MDX\n * JSX syntax.\n */\nexport function mdxJsx(options) {\n const settings = options || {}\n const acorn = settings.acorn\n /** @type {AcornOptions | undefined} */\n let acornOptions\n if (acorn) {\n if (!acorn.parse || !acorn.parseExpressionAt) {\n throw new Error(\n 'Expected a proper `acorn` instance passed in as `options.acorn`'\n )\n }\n acornOptions = Object.assign(\n {\n ecmaVersion: 2020,\n sourceType: 'module'\n },\n settings.acornOptions,\n {\n locations: true\n }\n )\n } else if (settings.acornOptions || settings.addResult) {\n throw new Error('Expected an `acorn` instance passed in as `options.acorn`')\n }\n return {\n flow: {\n [60]: jsxFlow(\n acorn || undefined,\n acornOptions,\n settings.addResult || false\n )\n },\n text: {\n [60]: jsxText(\n acorn || undefined,\n acornOptions,\n settings.addResult || false\n )\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-events-to-acorn').Acorn} Acorn\n * @typedef {import('micromark-util-events-to-acorn').AcornOptions} AcornOptions\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\n/**\n * @typedef Options\n * Configuration (required).\n * @property {Acorn} acorn\n * Acorn parser to use (required).\n * @property {AcornOptions | null | undefined} [acornOptions]\n * Configuration for acorn (default: `{ecmaVersion: 2020, locations: true,\n * sourceType: 'module'}`).\n * all fields except `locations` can be set\n * @property {boolean | null | undefined} [addResult=false]\n * Whether to add `estree` fields to tokens with results from acorn.\n */\n\nimport {blankLine} from 'micromark-core-commonmark'\nimport {asciiAlpha, markdownLineEnding} from 'micromark-util-character'\nimport {eventsToAcorn} from 'micromark-util-events-to-acorn'\nimport {positionFromEstree} from 'unist-util-position-from-estree'\nimport {VFileMessage} from 'vfile-message'\nconst blankLineBefore = {\n tokenize: tokenizeNextBlank,\n partial: true\n}\nconst allowedAcornTypes = new Set([\n 'ExportAllDeclaration',\n 'ExportDefaultDeclaration',\n 'ExportNamedDeclaration',\n 'ImportDeclaration'\n])\n\n/**\n * Create an extension for `micromark` to enable MDX ESM syntax.\n *\n * @param {Options} options\n * Configuration (required).\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable MDX\n * ESM syntax.\n */\nexport function mdxjsEsm(options) {\n const exportImportConstruct = {\n tokenize: tokenizeExportImport,\n concrete: true\n }\n if (!options || !options.acorn || !options.acorn.parse) {\n throw new Error('Expected an `acorn` instance passed in as `options.acorn`')\n }\n const acorn = options.acorn\n const acornOptions = Object.assign(\n {\n ecmaVersion: 2020,\n sourceType: 'module'\n },\n options.acornOptions\n )\n return {\n flow: {\n [101]: exportImportConstruct,\n [105]: exportImportConstruct\n }\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeExportImport(effects, ok, nok) {\n const self = this\n /** @type {Array} */\n const definedModuleSpecifiers =\n self.parser.definedModuleSpecifiers ||\n (self.parser.definedModuleSpecifiers = [])\n const eventStart = this.events.length + 1 // Add the main `mdxjsEsm` token\n let buffer = ''\n return self.interrupt ? nok : start\n\n /**\n * Start of MDX ESM.\n *\n * ```markdown\n * > | import a from 'b'\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Only at the start of a line, not at whitespace or in a container.\n if (self.now().column > 1) return nok(code)\n effects.enter('mdxjsEsm')\n effects.enter('mdxjsEsmData')\n effects.consume(code)\n // eslint-disable-next-line unicorn/prefer-code-point\n buffer += String.fromCharCode(code)\n return word\n }\n\n /**\n * In keyword.\n *\n * ```markdown\n * > | import a from 'b'\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function word(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n // @ts-expect-error: definitely a number.\n // eslint-disable-next-line unicorn/prefer-code-point\n buffer += String.fromCharCode(code)\n return word\n }\n if ((buffer === 'import' || buffer === 'export') && code === 32) {\n effects.consume(code)\n return inside\n }\n return nok(code)\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | import a from 'b'\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('mdxjsEsmData')\n return lineStart(code)\n }\n effects.consume(code)\n return inside\n }\n\n /**\n * At line ending.\n *\n * ```markdown\n * > | import a from 'b'\n * ^\n * | export {a}\n * ```\n *\n * @type {State}\n */\n function lineStart(code) {\n if (code === null) {\n return atEnd(code)\n }\n if (markdownLineEnding(code)) {\n return effects.check(blankLineBefore, atEnd, continuationStart)(code)\n }\n effects.enter('mdxjsEsmData')\n return inside(code)\n }\n\n /**\n * At line ending that continues.\n *\n * ```markdown\n * > | import a from 'b'\n * ^\n * | export {a}\n * ```\n *\n * @type {State}\n */\n function continuationStart(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n\n /**\n * At end of line (blank or eof).\n *\n * ```markdown\n * > | import a from 'b'\n * ^\n * ```\n *\n * @type {State}\n */\n function atEnd(code) {\n const result = eventsToAcorn(self.events.slice(eventStart), {\n acorn,\n acornOptions,\n prefix:\n definedModuleSpecifiers.length > 0\n ? 'var ' + definedModuleSpecifiers.join(',') + '\\n'\n : ''\n })\n if (result.error) {\n // There’s an error, which could be solved with more content, and there\n // is more content.\n if (code !== null && result.swallow) {\n return continuationStart(code)\n }\n throw new VFileMessage(\n 'Could not parse import/exports with acorn: ' + String(result.error),\n {\n line: result.error.loc.line,\n column: result.error.loc.column + 1,\n offset: result.error.pos\n },\n 'micromark-extension-mdxjs-esm:acorn'\n )\n }\n // Remove the `VariableDeclaration`.\n if (definedModuleSpecifiers.length > 0) {\n const declaration = result.estree.body.shift()\n }\n let index = -1\n while (++index < result.estree.body.length) {\n const node = result.estree.body[index]\n if (!allowedAcornTypes.has(node.type)) {\n throw new VFileMessage(\n 'Unexpected `' +\n node.type +\n '` in code: only import/exports are supported',\n positionFromEstree(node),\n 'micromark-extension-mdxjs-esm:non-esm'\n )\n }\n\n // Otherwise, when we’re not interrupting (hacky, because `interrupt` is\n // used to parse containers and “sniff” if this is ESM), collect all the\n // local values that are imported.\n if (node.type === 'ImportDeclaration' && !self.interrupt) {\n let index = -1\n while (++index < node.specifiers.length) {\n const specifier = node.specifiers[index]\n definedModuleSpecifiers.push(specifier.local.name)\n }\n }\n }\n Object.assign(\n effects.exit('mdxjsEsm'),\n options.addResult\n ? {\n estree: result.estree\n }\n : undefined\n )\n return ok(code)\n }\n }\n}\n\n/** @type {Tokenizer} */\nfunction tokenizeNextBlank(effects, ok, nok) {\n return start\n\n /**\n * @type {State}\n */\n function start(code) {\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n return effects.attempt(blankLine, ok, nok)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEndingOrSpace,\n markdownLineEnding,\n markdownSpace\n} from 'micromark-util-character'\nconst tasklistCheck = {\n tokenize: tokenizeTasklistCheck\n}\n\n// To do: next major: expose function to make extension.\n\n/**\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable GFM task list items syntax.\n *\n * @type {Extension}\n */\nexport const gfmTaskListItem = {\n text: {\n [91]: tasklistCheck\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTasklistCheck(effects, ok, nok) {\n const self = this\n return open\n\n /**\n * At start of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (\n // Exit if there’s stuff before.\n self.previous !== null ||\n // Exit if not in the first content that is the first child of a list\n // item.\n !self._gfmTasklistFirstContentOfListItem\n ) {\n return nok(code)\n }\n effects.enter('taskListCheck')\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n return inside\n }\n\n /**\n * In task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // Currently we match how GH works in files.\n // To match how GH works in comments, use `markdownSpace` (`[\\t ]`) instead\n // of `markdownLineEndingOrSpace` (`[\\t\\n\\r ]`).\n if (markdownLineEndingOrSpace(code)) {\n effects.enter('taskListCheckValueUnchecked')\n effects.consume(code)\n effects.exit('taskListCheckValueUnchecked')\n return close\n }\n if (code === 88 || code === 120) {\n effects.enter('taskListCheckValueChecked')\n effects.consume(code)\n effects.exit('taskListCheckValueChecked')\n return close\n }\n return nok(code)\n }\n\n /**\n * At close of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function close(code) {\n if (code === 93) {\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n effects.exit('taskListCheck')\n return after\n }\n return nok(code)\n }\n\n /**\n * @type {State}\n */\n function after(code) {\n // EOL in paragraph means there must be something else after it.\n if (markdownLineEnding(code)) {\n return ok(code)\n }\n\n // Space or tab?\n // Check what comes after.\n if (markdownSpace(code)) {\n return effects.check(\n {\n tokenize: spaceThenNonSpace\n },\n ok,\n nok\n )(code)\n }\n\n // EOF, or non-whitespace, both wrong.\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction spaceThenNonSpace(effects, ok, nok) {\n return factorySpace(effects, after, 'whitespace')\n\n /**\n * After whitespace, after task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // EOF means there was nothing, so bad.\n // EOL means there’s content after it, so good.\n // Impossible to have more spaces.\n // Anything else is good.\n return code === null ? nok(code) : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {directiveContainer} from './directive-container.js'\nimport {directiveLeaf} from './directive-leaf.js'\nimport {directiveText} from './directive-text.js'\n\n/**\n * Create an extension for `micromark` to enable directive syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable directive syntax.\n */\nexport function directive() {\n return {\n text: {\n [58]: directiveText\n },\n flow: {\n [58]: [directiveContainer, directiveLeaf]\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\n/**\n * @typedef {[number, number, number, number]} Range\n * Cell info.\n *\n * @typedef {0 | 1 | 2 | 3} RowKind\n * Where we are: `1` for head row, `2` for delimiter row, `3` for body row.\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {EditMap} from './edit-map.js'\nimport {gfmTableAlign} from './infer.js'\n\n// To do: next major: expose functions.\n\n/**\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * table syntax.\n *\n * @type {Extension}\n */\nexport const gfmTable = {\n flow: {\n null: {\n tokenize: tokenizeTable,\n resolveAll: resolveTable\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTable(effects, ok, nok) {\n const self = this\n let size = 0\n let sizeB = 0\n /** @type {boolean | undefined} */\n let seen\n return start\n\n /**\n * Start of a GFM table.\n *\n * If there is a valid table row or table head before, then we try to parse\n * another row.\n * Otherwise, we try to parse a head.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * > | | b |\n * ^\n * ```\n * @type {State}\n */\n function start(code) {\n let index = self.events.length - 1\n while (index > -1) {\n const type = self.events[index][1].type\n if (\n type === 'lineEnding' ||\n // Note: markdown-rs uses `whitespace` instead of `linePrefix`\n type === 'linePrefix'\n )\n index--\n else break\n }\n const tail = index > -1 ? self.events[index][1].type : null\n const next =\n tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore\n\n // Don’t allow lazy body rows.\n if (next === bodyRowStart && self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n return next(code)\n }\n\n /**\n * Before table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBefore(code) {\n effects.enter('tableHead')\n effects.enter('tableRow')\n return headRowStart(code)\n }\n\n /**\n * Before table head row, after whitespace.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowStart(code) {\n if (code === 124) {\n return headRowBreak(code)\n }\n\n // To do: micromark-js should let us parse our own whitespace in extensions,\n // like `markdown-rs`:\n //\n // ```js\n // // 4+ spaces.\n // if (markdownSpace(code)) {\n // return nok(code)\n // }\n // ```\n\n seen = true\n // Count the first character, that isn’t a pipe, double.\n sizeB += 1\n return headRowBreak(code)\n }\n\n /**\n * At break in table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * ^\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBreak(code) {\n if (code === null) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n // If anything other than one pipe (ignoring whitespace) was used, it’s fine.\n if (sizeB > 1) {\n sizeB = 0\n // To do: check if this works.\n // Feel free to interrupt:\n self.interrupt = true\n effects.exit('tableRow')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return headDelimiterStart\n }\n\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n if (markdownSpace(code)) {\n // To do: check if this is fine.\n // effects.attempt(State::Next(StateName::GfmTableHeadRowBreak), State::Nok)\n // State::Retry(space_or_tab(tokenizer))\n return factorySpace(effects, headRowBreak, 'whitespace')(code)\n }\n sizeB += 1\n if (seen) {\n seen = false\n // Header cell count.\n size += 1\n }\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n // Whether a delimiter was seen.\n seen = true\n return headRowBreak\n }\n\n // Anything else is cell data.\n effects.enter('data')\n return headRowData(code)\n }\n\n /**\n * In table head row data.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('data')\n return headRowBreak(code)\n }\n effects.consume(code)\n return code === 92 ? headRowEscape : headRowData\n }\n\n /**\n * In table head row escape.\n *\n * ```markdown\n * > | | a\\-b |\n * ^\n * | | ---- |\n * | | c |\n * ```\n *\n * @type {State}\n */\n function headRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return headRowData\n }\n return headRowData(code)\n }\n\n /**\n * Before delimiter row.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterStart(code) {\n // Reset `interrupt`.\n self.interrupt = false\n\n // Note: in `markdown-rs`, we need to handle piercing here too.\n if (self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n effects.enter('tableDelimiterRow')\n // Track if we’ve seen a `:` or `|`.\n seen = false\n if (markdownSpace(code)) {\n return factorySpace(\n effects,\n headDelimiterBefore,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n }\n return headDelimiterBefore(code)\n }\n\n /**\n * Before delimiter row, after optional whitespace.\n *\n * Reused when a `|` is found later, to parse another cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterBefore(code) {\n if (code === 45 || code === 58) {\n return headDelimiterValueBefore(code)\n }\n if (code === 124) {\n seen = true\n // If we start with a pipe, we open a cell marker.\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return headDelimiterCellBefore\n }\n\n // More whitespace / empty row not allowed at start.\n return headDelimiterNok(code)\n }\n\n /**\n * After `|`, before delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellBefore(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterValueBefore, 'whitespace')(code)\n }\n return headDelimiterValueBefore(code)\n }\n\n /**\n * Before delimiter cell value.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterValueBefore(code) {\n // Align: left.\n if (code === 58) {\n sizeB += 1\n seen = true\n effects.enter('tableDelimiterMarker')\n effects.consume(code)\n effects.exit('tableDelimiterMarker')\n return headDelimiterLeftAlignmentAfter\n }\n\n // Align: none.\n if (code === 45) {\n sizeB += 1\n // To do: seems weird that this *isn’t* left aligned, but that state is used?\n return headDelimiterLeftAlignmentAfter(code)\n }\n if (code === null || markdownLineEnding(code)) {\n return headDelimiterCellAfter(code)\n }\n return headDelimiterNok(code)\n }\n\n /**\n * After delimiter cell left alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | :- |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterLeftAlignmentAfter(code) {\n if (code === 45) {\n effects.enter('tableDelimiterFiller')\n return headDelimiterFiller(code)\n }\n\n // Anything else is not ok after the left-align colon.\n return headDelimiterNok(code)\n }\n\n /**\n * In delimiter cell filler.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterFiller(code) {\n if (code === 45) {\n effects.consume(code)\n return headDelimiterFiller\n }\n\n // Align is `center` if it was `left`, `right` otherwise.\n if (code === 58) {\n seen = true\n effects.exit('tableDelimiterFiller')\n effects.enter('tableDelimiterMarker')\n effects.consume(code)\n effects.exit('tableDelimiterMarker')\n return headDelimiterRightAlignmentAfter\n }\n effects.exit('tableDelimiterFiller')\n return headDelimiterRightAlignmentAfter(code)\n }\n\n /**\n * After delimiter cell right alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterRightAlignmentAfter(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterCellAfter, 'whitespace')(code)\n }\n return headDelimiterCellAfter(code)\n }\n\n /**\n * After delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellAfter(code) {\n if (code === 124) {\n return headDelimiterBefore(code)\n }\n if (code === null || markdownLineEnding(code)) {\n // Exit when:\n // * there was no `:` or `|` at all (it’s a thematic break or setext\n // underline instead)\n // * the header cell count is not the delimiter cell count\n if (!seen || size !== sizeB) {\n return headDelimiterNok(code)\n }\n\n // Note: in markdown-rs`, a reset is needed here.\n effects.exit('tableDelimiterRow')\n effects.exit('tableHead')\n // To do: in `markdown-rs`, resolvers need to be registered manually.\n // effects.register_resolver(ResolveName::GfmTable)\n return ok(code)\n }\n return headDelimiterNok(code)\n }\n\n /**\n * In delimiter row, at a disallowed byte.\n *\n * ```markdown\n * | | a |\n * > | | x |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterNok(code) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n\n /**\n * Before table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowStart(code) {\n // Note: in `markdown-rs` we need to manually take care of a prefix,\n // but in `micromark-js` that is done for us, so if we’re here, we’re\n // never at whitespace.\n effects.enter('tableRow')\n return bodyRowBreak(code)\n }\n\n /**\n * At break in table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ^\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowBreak(code) {\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return bodyRowBreak\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('tableRow')\n return ok(code)\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, bodyRowBreak, 'whitespace')(code)\n }\n\n // Anything else is cell content.\n effects.enter('data')\n return bodyRowData(code)\n }\n\n /**\n * In table body row data.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('data')\n return bodyRowBreak(code)\n }\n effects.consume(code)\n return code === 92 ? bodyRowEscape : bodyRowData\n }\n\n /**\n * In table body row escape.\n *\n * ```markdown\n * | | a |\n * | | ---- |\n * > | | b\\-c |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return bodyRowData\n }\n return bodyRowData(code)\n }\n}\n\n/** @type {Resolver} */\n// eslint-disable-next-line complexity\nfunction resolveTable(events, context) {\n let index = -1\n let inFirstCellAwaitingPipe = true\n /** @type {RowKind} */\n let rowKind = 0\n /** @type {Range} */\n let lastCell = [0, 0, 0, 0]\n /** @type {Range} */\n let cell = [0, 0, 0, 0]\n let afterHeadAwaitingFirstBodyRow = false\n let lastTableEnd = 0\n /** @type {Token | undefined} */\n let currentTable\n /** @type {Token | undefined} */\n let currentBody\n /** @type {Token | undefined} */\n let currentCell\n const map = new EditMap()\n while (++index < events.length) {\n const event = events[index]\n const token = event[1]\n if (event[0] === 'enter') {\n // Start of head.\n if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = false\n\n // Inject previous (body end and) table end.\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)\n currentBody = undefined\n lastTableEnd = 0\n }\n\n // Inject table start.\n currentTable = {\n type: 'table',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n }\n map.add(index, 0, [['enter', currentTable, context]])\n } else if (\n token.type === 'tableRow' ||\n token.type === 'tableDelimiterRow'\n ) {\n inFirstCellAwaitingPipe = true\n currentCell = undefined\n lastCell = [0, 0, 0, 0]\n cell = [0, index + 1, 0, 0]\n\n // Inject table body start.\n if (afterHeadAwaitingFirstBodyRow) {\n afterHeadAwaitingFirstBodyRow = false\n currentBody = {\n type: 'tableBody',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n }\n map.add(index, 0, [['enter', currentBody, context]])\n }\n rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1\n }\n // Cell data.\n else if (\n rowKind &&\n (token.type === 'data' ||\n token.type === 'tableDelimiterMarker' ||\n token.type === 'tableDelimiterFiller')\n ) {\n inFirstCellAwaitingPipe = false\n\n // First value in cell.\n if (cell[2] === 0) {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n undefined,\n currentCell\n )\n lastCell = [0, 0, 0, 0]\n }\n cell[2] = index\n }\n } else if (token.type === 'tableCellDivider') {\n if (inFirstCellAwaitingPipe) {\n inFirstCellAwaitingPipe = false\n } else {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n undefined,\n currentCell\n )\n }\n lastCell = cell\n cell = [lastCell[1], index, 0, 0]\n }\n }\n }\n // Exit events.\n else if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = true\n lastTableEnd = index\n } else if (\n token.type === 'tableRow' ||\n token.type === 'tableDelimiterRow'\n ) {\n lastTableEnd = index\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n index,\n currentCell\n )\n } else if (cell[1] !== 0) {\n currentCell = flushCell(map, context, cell, rowKind, index, currentCell)\n }\n rowKind = 0\n } else if (\n rowKind &&\n (token.type === 'data' ||\n token.type === 'tableDelimiterMarker' ||\n token.type === 'tableDelimiterFiller')\n ) {\n cell[3] = index\n }\n }\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)\n }\n map.consume(context.events)\n\n // To do: move this into `html`, when events are exposed there.\n // That’s what `markdown-rs` does.\n // That needs updates to `mdast-util-gfm-table`.\n index = -1\n while (++index < context.events.length) {\n const event = context.events[index]\n if (event[0] === 'enter' && event[1].type === 'table') {\n event[1]._align = gfmTableAlign(context.events, index)\n }\n }\n return events\n}\n\n/// Generate a cell.\n/**\n *\n * @param {EditMap} map\n * @param {TokenizeContext} context\n * @param {Range} range\n * @param {RowKind} rowKind\n * @param {number | undefined} rowEnd\n * @param {Token | undefined} previousCell\n * @returns {Token | undefined}\n */\n// eslint-disable-next-line max-params\nfunction flushCell(map, context, range, rowKind, rowEnd, previousCell) {\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCell' : 'tableCell'\n const groupName =\n rowKind === 1\n ? 'tableHeader'\n : rowKind === 2\n ? 'tableDelimiter'\n : 'tableData'\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText'\n const valueName = 'tableContent'\n\n // Insert an exit for the previous cell, if there is one.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[0] !== 0) {\n previousCell.end = Object.assign({}, getPoint(context.events, range[0]))\n map.add(range[0], 0, [['exit', previousCell, context]])\n }\n\n // Insert enter of this cell.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^^^^-- this cell\n // ```\n const now = getPoint(context.events, range[1])\n previousCell = {\n type: groupName,\n start: Object.assign({}, now),\n // Note: correct end is set later.\n end: Object.assign({}, now)\n }\n map.add(range[1], 0, [['enter', previousCell, context]])\n\n // Insert text start at first data start and end at last data end, and\n // remove events between.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[2] !== 0) {\n const relatedStart = getPoint(context.events, range[2])\n const relatedEnd = getPoint(context.events, range[3])\n /** @type {Token} */\n const valueToken = {\n type: valueName,\n start: Object.assign({}, relatedStart),\n end: Object.assign({}, relatedEnd)\n }\n map.add(range[2], 0, [['enter', valueToken, context]])\n if (rowKind !== 2) {\n // Fix positional info on remaining events\n const start = context.events[range[2]]\n const end = context.events[range[3]]\n start[1].end = Object.assign({}, end[1].end)\n start[1].type = 'chunkText'\n start[1].contentType = 'text'\n\n // Remove if needed.\n if (range[3] > range[2] + 1) {\n const a = range[2] + 1\n const b = range[3] - range[2] - 1\n map.add(a, b, [])\n }\n }\n map.add(range[3] + 1, 0, [['exit', valueToken, context]])\n }\n\n // Insert an exit for the last cell, if at the row end.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^^^-- this cell (the last one contains two “between” parts)\n // ```\n if (rowEnd !== undefined) {\n previousCell.end = Object.assign({}, getPoint(context.events, rowEnd))\n map.add(rowEnd, 0, [['exit', previousCell, context]])\n previousCell = undefined\n }\n return previousCell\n}\n\n/**\n * Generate table end (and table body end).\n *\n * @param {EditMap} map\n * @param {TokenizeContext} context\n * @param {number} index\n * @param {Token} table\n * @param {Token | undefined} tableBody\n */\n// eslint-disable-next-line max-params\nfunction flushTableEnd(map, context, index, table, tableBody) {\n /** @type {Array} */\n const exits = []\n const related = getPoint(context.events, index)\n if (tableBody) {\n tableBody.end = Object.assign({}, related)\n exits.push(['exit', tableBody, context])\n }\n table.end = Object.assign({}, related)\n exits.push(['exit', table, context])\n map.add(index + 1, 0, exits)\n}\n\n/**\n * @param {Array} events\n * @param {number} index\n * @returns {readonly Point}\n */\nfunction getPoint(events, index) {\n const event = events[index]\n const side = event[0] === 'enter' ? 'start' : 'end'\n return event[1][side]\n}\n","/**\n * @typedef {import('micromark-util-events-to-acorn').Acorn} Acorn\n * @typedef {import('micromark-util-events-to-acorn').AcornOptions} AcornOptions\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\n/**\n * @typedef Options\n * Configuration (optional).\n * @property {Acorn | null | undefined} [acorn]\n * Acorn parser to use (optional).\n * @property {AcornOptions | null | undefined} [acornOptions]\n * Configuration for acorn (default: `{ecmaVersion: 2020, locations: true,\n * sourceType: 'module'}`).\n *\n * All fields except `locations` can be set.\n * @property {boolean | null | undefined} [addResult=false]\n * Whether to add `estree` fields to tokens with results from acorn.\n * @property {boolean | null | undefined} [spread=false]\n * Undocumented option to parse only a spread (used by\n * `micromark-extension-mdx-jsx` to parse spread attributes).\n * @property {boolean | null | undefined} [allowEmpty=true]\n * Undocumented option to disallow empty attributes (used by\n * `micromark-extension-mdx-jsx` to prohobit empty attribute values).\n */\n\nimport {factoryMdxExpression} from 'micromark-factory-mdx-expression'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/**\n * Create an extension for `micromark` to enable MDX expression syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable MDX\n * expression syntax.\n */\nexport function mdxExpression(options) {\n const options_ = options || {}\n const addResult = options_.addResult\n const acorn = options_.acorn\n // Hidden: `micromark-extension-mdx-jsx` supports expressions in tags,\n // and one of them is only “spread” elements.\n // It also has expressions that are not allowed to be empty (``).\n // Instead of duplicating code there, this are two small hidden feature here\n // to test that behavior.\n const spread = options_.spread\n let allowEmpty = options_.allowEmpty\n /** @type {AcornOptions} */\n let acornOptions\n if (allowEmpty === null || allowEmpty === undefined) {\n allowEmpty = true\n }\n if (acorn) {\n if (!acorn.parseExpressionAt) {\n throw new Error(\n 'Expected a proper `acorn` instance passed in as `options.acorn`'\n )\n }\n acornOptions = Object.assign(\n {\n ecmaVersion: 2020,\n sourceType: 'module'\n },\n options_.acornOptions\n )\n } else if (options_.acornOptions || options_.addResult) {\n throw new Error('Expected an `acorn` instance passed in as `options.acorn`')\n }\n return {\n flow: {\n [123]: {\n tokenize: tokenizeFlowExpression,\n concrete: true\n }\n },\n text: {\n [123]: {\n tokenize: tokenizeTextExpression\n }\n }\n }\n\n /**\n * MDX expression (flow).\n *\n * ```markdown\n * > | {Math.PI}\n * ^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeFlowExpression(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of an MDX expression (flow).\n *\n * ```markdown\n * > | {Math.PI}\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: in `markdown-rs`, constructs need to parse the indent themselves.\n // This should also be introduced in `micromark-js`.\n\n return before(code)\n }\n\n /**\n * After optional whitespace, before expression.\n *\n * ```markdown\n * > | {Math.PI}\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n return factoryMdxExpression.call(\n self,\n effects,\n after,\n 'mdxFlowExpression',\n 'mdxFlowExpressionMarker',\n 'mdxFlowExpressionChunk',\n acorn,\n acornOptions,\n addResult,\n spread,\n allowEmpty\n )(code)\n }\n\n /**\n * After expression.\n *\n * ```markdown\n * > | {Math.PI}\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return markdownSpace(code)\n ? factorySpace(effects, end, 'whitespace')(code)\n : end(code)\n }\n\n /**\n * After expression, after optional whitespace.\n *\n * ```markdown\n * > | {Math.PI}␠␊\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n }\n\n /**\n * MDX expression (text).\n *\n * ```markdown\n * > | a {Math.PI} c.\n * ^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeTextExpression(effects, ok) {\n const self = this\n return start\n\n /**\n * Start of an MDX expression (text).\n *\n * ```markdown\n * > | a {Math.PI} c.\n * ^\n * ```\n *\n *\n * @type {State}\n */\n function start(code) {\n return factoryMdxExpression.call(\n self,\n effects,\n ok,\n 'mdxTextExpression',\n 'mdxTextExpressionMarker',\n 'mdxTextExpressionChunk',\n acorn,\n acornOptions,\n addResult,\n spread,\n allowEmpty,\n true\n )(code)\n }\n }\n}\n"],"names":["frontmatter","options","listOfMatters","flow","index","length","matter","code","fence","charCodeAt","construct","createConstruct","existing","Array","isArray","push","anywhere","frontmatterType","type","fenceType","sequenceType","valueType","closingFenceConstruct","tokenize","effects","ok","nok","bufferIndex","buffer","enter","closeSequence","exit","closeSequenceWhitespace","closeAfter","consume","partial","self","this","position","now","column","line","openSequence","openSequenceWhitespace","openAfter","attempt","after","contentStart","contentEnd","contentInside","concrete","prop","marker","pick","repeat","schema","mdxJsx","settings","acorn","acornOptions","parse","parseExpressionAt","Error","Object","assign","ecmaVersion","sourceType","locations","addResult","undefined","text","blankLineBefore","allowedAcornTypes","Set","mdxjsEsm","exportImportConstruct","definedModuleSpecifiers","parser","eventStart","events","interrupt","String","fromCharCode","word","inside","lineStart","atEnd","check","continuationStart","result","slice","prefix","join","error","swallow","loc","offset","pos","estree","body","shift","node","has","specifiers","specifier","local","name","gfmTaskListItem","previous","_gfmTasklistFirstContentOfListItem","close","spaceThenNonSpace","directive","gfmTable","null","seen","size","sizeB","tail","next","bodyRowStart","headRowBefore","lazy","headRowBreak","headRowStart","headDelimiterStart","headRowData","headRowEscape","headDelimiterBefore","constructs","disable","includes","headDelimiterValueBefore","headDelimiterCellBefore","headDelimiterNok","headDelimiterLeftAlignmentAfter","headDelimiterCellAfter","headDelimiterFiller","headDelimiterRightAlignmentAfter","bodyRowBreak","bodyRowData","bodyRowEscape","resolveAll","context","currentTable","currentBody","currentCell","inFirstCellAwaitingPipe","rowKind","lastCell","cell","afterHeadAwaitingFirstBodyRow","lastTableEnd","map","event","token","flushTableEnd","start","end","add","flushCell","_align","range","rowEnd","previousCell","groupName","getPoint","relatedStart","relatedEnd","valueToken","contentType","a","b","table","tableBody","exits","related","side","mdxExpression","options_","spread","allowEmpty","call","before"],"sourceRoot":""}