b`).
+ // Includes `lineEnding`, `htmlTextData`.
+ htmlText: 'htmlText',
- if (current === null || current.child === null) {
- // If we hydrated, pop so that we can delete any remaining children
- // that weren't hydrated.
- var wasHydrated = popHydrationState(workInProgress);
+ htmlTextData: 'htmlTextData',
- if (wasHydrated) {
- // If we hydrated, then we'll need to schedule an update for
- // the commit side-effects on the root.
- markUpdate(workInProgress);
- }
- }
+ // Whole image (`![alpha](bravo)`, `![alpha][bravo]`, `![alpha][]`, or
+ // `![alpha]`).
+ // Includes `label` and an optional `resource` or `reference`.
+ image: 'image',
- updateHostContainer(workInProgress);
- return null;
- }
+ // Whole link label (`[*alpha*]`).
+ // Includes `labelLink` or `labelImage`, `labelText`, and `labelEnd`.
+ label: 'label',
- case HostComponent:
- {
- popHostContext(workInProgress);
- var rootContainerInstance = getRootHostContainer();
- var type = workInProgress.type;
+ // Text in an label (`*alpha*`).
+ // Includes text.
+ labelText: 'labelText',
- if (current !== null && workInProgress.stateNode != null) {
- updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
+ // Start a link label (`[`).
+ // Includes a `labelMarker`.
+ labelLink: 'labelLink',
- if (current.ref !== workInProgress.ref) {
- markRef$1(workInProgress);
- }
- } else {
- if (!newProps) {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
+ // Start an image label (`![`).
+ // Includes `labelImageMarker` and `labelMarker`.
+ labelImage: 'labelImage',
+ // Marker of a label (`[` or `]`).
+ labelMarker: 'labelMarker',
- return null;
- }
+ // Marker to start an image (`!`).
+ labelImageMarker: 'labelImageMarker',
- var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
- // "stack" as the parent. Then append children as we go in beginWork
- // or completeWork depending on whether we want to add them top->down or
- // bottom->up. Top->down is faster in IE11.
+ // End a label (`]`).
+ // Includes `labelMarker`.
+ labelEnd: 'labelEnd',
- var _wasHydrated = popHydrationState(workInProgress);
+ // Whole link (`[alpha](bravo)`, `[alpha][bravo]`, `[alpha][]`, or `[alpha]`).
+ // Includes `label` and an optional `resource` or `reference`.
+ link: 'link',
- if (_wasHydrated) {
- // TODO: Move this and createInstance step into the beginPhase
- // to consolidate.
- if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
- // If changes to the hydrated node need to be applied at the
- // commit-phase we mark this as such.
- markUpdate(workInProgress);
- }
- } else {
- var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
- appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners
+ // Whole paragraph:
+ //
+ // ```markdown
+ // alpha
+ // bravo.
+ // ```
+ //
+ // Includes text.
+ paragraph: 'paragraph',
- workInProgress.stateNode = instance;
- // (eg DOM renderer supports auto-focus for certain elements).
- // Make sure such renderers get scheduled for later work.
+ // A reference (`[alpha]` or `[]`).
+ // Includes `referenceMarker` and an optional `referenceString`.
+ reference: 'reference',
+ // A reference marker (`[` or `]`).
+ referenceMarker: 'referenceMarker',
- if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
- markUpdate(workInProgress);
- }
- }
+ // Reference text (`alpha`).
+ // Includes string.
+ referenceString: 'referenceString',
- if (workInProgress.ref !== null) {
- // If there is a ref on a host node we need to schedule a callback
- markRef$1(workInProgress);
- }
- }
+ // A resource (`(https://example.com "alpha")`).
+ // Includes `resourceMarker`, an optional `resourceDestination` with an optional
+ // `whitespace` and `resourceTitle`.
+ resource: 'resource',
- return null;
- }
+ // A resource destination (`https://example.com`).
+ // Includes `resourceDestinationLiteral` or `resourceDestinationRaw`.
+ resourceDestination: 'resourceDestination',
- case HostText:
- {
- var newText = newProps;
+ // A literal resource destination (`
`).
+ // Includes `resourceDestinationLiteralMarker` and optionally
+ // `resourceDestinationString`.
+ resourceDestinationLiteral: 'resourceDestinationLiteral',
- if (current && workInProgress.stateNode != null) {
- var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
- // to schedule a side-effect to do the updates.
+ // A resource destination marker (`<` or `>`).
+ resourceDestinationLiteralMarker: 'resourceDestinationLiteralMarker',
- updateHostText$1(current, workInProgress, oldText, newText);
- } else {
- if (typeof newText !== 'string') {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
+ // A raw resource destination (`https://example.com`).
+ // Includes `resourceDestinationString`.
+ resourceDestinationRaw: 'resourceDestinationRaw',
- }
+ // Resource destination text (`https://example.com`).
+ // Includes string.
+ resourceDestinationString: 'resourceDestinationString',
- var _rootContainerInstance = getRootHostContainer();
+ // A resource marker (`(` or `)`).
+ resourceMarker: 'resourceMarker',
- var _currentHostContext = getHostContext();
+ // A resource title (`"alpha"`, `'alpha'`, or `(alpha)`).
+ // Includes `resourceTitleMarker` and optionally `resourceTitleString`.
+ resourceTitle: 'resourceTitle',
- var _wasHydrated2 = popHydrationState(workInProgress);
+ // A resource title marker (`"`, `'`, `(`, or `)`).
+ resourceTitleMarker: 'resourceTitleMarker',
- if (_wasHydrated2) {
- if (prepareToHydrateHostTextInstance(workInProgress)) {
- markUpdate(workInProgress);
- }
- } else {
- workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
- }
- }
+ // Resource destination title (`alpha`).
+ // Includes string.
+ resourceTitleString: 'resourceTitleString',
- return null;
- }
+ // Whole setext heading:
+ //
+ // ```markdown
+ // alpha
+ // bravo
+ // =====
+ // ```
+ //
+ // Includes `setextHeadingText`, `lineEnding`, `linePrefix`, and
+ // `setextHeadingLine`.
+ setextHeading: 'setextHeading',
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
- var nextState = workInProgress.memoizedState;
+ // Content in a setext heading (`alpha\nbravo`).
+ // Includes text.
+ setextHeadingText: 'setextHeadingText',
- if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
- // Something suspended. Re-render with the fallback children.
- workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.
+ // Underline in a setext heading, including whitespace suffix (`==`).
+ // Includes `setextHeadingLineSequence`.
+ setextHeadingLine: 'setextHeadingLine',
- return workInProgress;
- }
+ // Sequence of equals or dash characters in underline in a setext heading (`-`).
+ setextHeadingLineSequence: 'setextHeadingLineSequence',
- var nextDidTimeout = nextState !== null;
- var prevDidTimeout = false;
+ // Strong (`**alpha**`).
+ // Includes `strongSequence` and `strongText`.
+ strong: 'strong',
- if (current === null) {
- if (workInProgress.memoizedProps.fallback !== undefined) {
- popHydrationState(workInProgress);
- }
- } else {
- var prevState = current.memoizedState;
- prevDidTimeout = prevState !== null;
+ // Sequence of strong markers (`**` or `__`).
+ strongSequence: 'strongSequence',
- if (!nextDidTimeout && prevState !== null) {
- // We just switched from the fallback to the normal children.
- // Delete the fallback.
- // TODO: Would it be better to store the fallback fragment on
- // the stateNode during the begin phase?
- var currentFallbackChild = current.child.sibling;
+ // Strong text (`alpha`).
+ // Includes text.
+ strongText: 'strongText',
- if (currentFallbackChild !== null) {
- // Deletions go at the beginning of the return fiber's effect list
- var first = workInProgress.firstEffect;
+ // Whole thematic break:
+ //
+ // ```markdown
+ // * * *
+ // ```
+ //
+ // Includes `thematicBreakSequence` and `whitespace`.
+ thematicBreak: 'thematicBreak',
- if (first !== null) {
- workInProgress.firstEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = first;
- } else {
- workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = null;
- }
+ // A sequence of one or more thematic break markers (`***`).
+ thematicBreakSequence: 'thematicBreakSequence',
- currentFallbackChild.effectTag = Deletion;
- }
- }
- }
+ // 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 unordered list:
+ //
+ // ```markdown
+ // - a
+ // b
+ // ```
+ //
+ // Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further
+ // lines.
+ listOrdered: 'listOrdered',
- if (nextDidTimeout && !prevDidTimeout) {
- // If this subtreee is running in blocking mode we can suspend,
- // otherwise we won't suspend.
- // TODO: This will still suspend a synchronous tree if anything
- // in the concurrent tree already suspended during this render.
- // This is a known bug.
- if ((workInProgress.mode & BlockingMode) !== NoMode) {
- // TODO: Move this back to throwException because this is too late
- // if this is a large tree which is common for initial loads. We
- // don't know if we should restart a render or not until we get
- // this marker, and this is too late.
- // If this render already had a ping or lower pri updates,
- // and this is the first time we know we're going to suspend we
- // should be able to immediately restart from within throwException.
- var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;
+ // Whole ordered list:
+ //
+ // ```markdown
+ // 1. a
+ // b
+ // ```
+ //
+ // Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further
+ // lines.
+ listUnordered: 'listUnordered',
- if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
- // If this was in an invisible tree or a new render, then showing
- // this boundary is ok.
- renderDidSuspend();
- } else {
- // Otherwise, we're going to have to hide content so we should
- // suspend for longer if possible.
- renderDidSuspendDelayIfPossible();
- }
- }
- }
+ // The indent of further list item lines.
+ listItemIndent: 'listItemIndent',
- {
- // TODO: Only schedule updates if these values are non equal, i.e. it changed.
- if (nextDidTimeout || prevDidTimeout) {
- // If this boundary just timed out, schedule an effect to attach a
- // retry listener to the promise. This flag is also used to hide the
- // primary children. In mutation mode, we also need the flag to
- // *unhide* children that were previously hidden, so check if this
- // is currently timed out, too.
- workInProgress.effectTag |= Update;
- }
- }
+ // A marker, as in, `*`, `+`, `-`, `.`, or `)`.
+ listItemMarker: 'listItemMarker',
- return null;
- }
+ // 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',
- case HostPortal:
- popHostContainer(workInProgress);
- updateHostContainer(workInProgress);
- return null;
+ // The whitespace after a marker.
+ listItemPrefixWhitespace: 'listItemPrefixWhitespace',
- case ContextProvider:
- // Pop provider fiber
- popProvider(workInProgress);
- return null;
+ // The numerical value of an ordered item.
+ listItemValue: 'listItemValue',
- case IncompleteClassComponent:
- {
- // Same as class component case. I put it down here so that the tags are
- // sequential to ensure this switch is compiled to a jump table.
- var _Component = workInProgress.type;
+ // Internal types used for subtokenizers, compiled away
+ chunkDocument: 'chunkDocument',
+ chunkContent: 'chunkContent',
+ chunkFlow: 'chunkFlow',
+ chunkText: 'chunkText',
+ chunkString: 'chunkString'
+}
- if (isContextProvider(_Component)) {
- popContext(workInProgress);
- }
- return null;
- }
+/***/ }),
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress);
- var renderState = workInProgress.memoizedState;
+/***/ "./node_modules/micromark-util-symbol/values.js":
+/*!******************************************************!*\
+ !*** ./node_modules/micromark-util-symbol/values.js ***!
+ \******************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (renderState === null) {
- // We're running in the default, "independent" mode.
- // We don't do anything in this mode.
- return null;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "values": () => (/* binding */ values)
+/* harmony export */ });
+// This module is compiled away!
+//
+// While micromark works based on character codes, this module includes the
+// string versions of ’em.
+// The C0 block, except for LF, CR, HT, and w/ the replacement character added,
+// are available here.
+const values = {
+ ht: '\t',
+ 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: '�'
+}
- var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;
- var renderedTail = renderState.rendering;
- if (renderedTail === null) {
- // We just rendered the head.
- if (!didSuspendAlready) {
- // This is the first pass. We need to figure out if anything is still
- // suspended in the rendered set.
- // If new content unsuspended, but there's still some content that
- // didn't. Then we need to do a second pass that forces everything
- // to keep showing their fallbacks.
- // We might be suspended if something in this render pass suspended, or
- // something in the previous committed pass suspended. Otherwise,
- // there's no chance so we can skip the expensive call to
- // findFirstSuspended.
- var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);
+/***/ }),
- if (!cannotBeSuspended) {
- var row = workInProgress.child;
+/***/ "./node_modules/react-markdown/index.js":
+/*!**********************************************!*\
+ !*** ./node_modules/react-markdown/index.js ***!
+ \**********************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- while (row !== null) {
- var suspended = findFirstSuspended(row);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "uriTransformer": () => (/* reexport safe */ _lib_uri_transformer_js__WEBPACK_IMPORTED_MODULE_0__.uriTransformer),
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _lib_react_markdown_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/react-markdown.js */ "./node_modules/react-markdown/lib/react-markdown.js");
+/* harmony import */ var _lib_uri_transformer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/uri-transformer.js */ "./node_modules/react-markdown/lib/uri-transformer.js");
+/**
+ * @typedef {import('./lib/react-markdown.js').ReactMarkdownOptions} Options
+ * @typedef {import('./lib/ast-to-react.js').Components} Components
+ */
- if (suspended !== null) {
- didSuspendAlready = true;
- workInProgress.effectTag |= DidCapture;
- cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
- // part of the second pass. In that case nothing will subscribe to
- // its thennables. Instead, we'll transfer its thennables to the
- // SuspenseList so that it can retry if they resolve.
- // There might be multiple of these in the list but since we're
- // going to wait for all of them anyway, it doesn't really matter
- // which ones gets to ping. In theory we could get clever and keep
- // track of how many dependencies remain but it gets tricky because
- // in the meantime, we can add/remove/change items and dependencies.
- // We might bail out of the loop before finding any but that
- // doesn't matter since that means that the other boundaries that
- // we did find already has their listeners attached.
- var newThennables = suspended.updateQueue;
- if (newThennables !== null) {
- workInProgress.updateQueue = newThennables;
- workInProgress.effectTag |= Update;
- } // Rerender the whole list, but this time, we'll force fallbacks
- // to stay in place.
- // Reset the effect list before doing the second pass since that's now invalid.
- if (renderState.lastEffect === null) {
- workInProgress.firstEffect = null;
- }
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_lib_react_markdown_js__WEBPACK_IMPORTED_MODULE_1__.ReactMarkdown);
- workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
- resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately
- // rerender the children.
+/***/ }),
- pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
- return workInProgress.child;
- }
+/***/ "./node_modules/react-markdown/lib/ast-to-react.js":
+/*!*********************************************************!*\
+ !*** ./node_modules/react-markdown/lib/ast-to-react.js ***!
+ \*********************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- row = row.sibling;
- }
- }
- } else {
- cutOffTailIfNeeded(renderState, false);
- } // Next we're going to render the tail.
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "childrenToReact": () => (/* binding */ childrenToReact)
+/* harmony export */ });
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
+/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-is */ "./node_modules/react-markdown/node_modules/react-is/index.js");
+/* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! property-information */ "./node_modules/react-markdown/node_modules/property-information/index.js");
+/* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! property-information */ "./node_modules/react-markdown/node_modules/property-information/lib/find.js");
+/* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! property-information */ "./node_modules/react-markdown/node_modules/property-information/lib/hast-to-react.js");
+/* harmony import */ var space_separated_tokens__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! space-separated-tokens */ "./node_modules/react-markdown/node_modules/space-separated-tokens/index.js");
+/* harmony import */ var comma_separated_tokens__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! comma-separated-tokens */ "./node_modules/react-markdown/node_modules/comma-separated-tokens/index.js");
+/* harmony import */ var style_to_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! style-to-object */ "./node_modules/style-to-object/index.js");
+/**
+ * @typedef {import('react').ReactNode} ReactNode
+ * @typedef {import('unist').Position} Position
+ * @typedef {import('hast').Element} Element
+ * @typedef {import('hast').ElementContent} ElementContent
+ * @typedef {import('hast').Root} Root
+ * @typedef {import('hast').Text} Text
+ * @typedef {import('hast').Comment} Comment
+ * @typedef {import('hast').DocType} Doctype
+ * @typedef {import('property-information').Info} Info
+ * @typedef {import('property-information').Schema} Schema
+ * @typedef {import('./complex-types').ReactMarkdownProps} ReactMarkdownProps
+ *
+ * @typedef Raw
+ * @property {'raw'} type
+ * @property {string} value
+ *
+ * @typedef Context
+ * @property {Options} options
+ * @property {Schema} schema
+ * @property {number} listDepth
+ *
+ * @callback TransformLink
+ * @param {string} href
+ * @param {Array.} children
+ * @param {string?} title
+ * @returns {string}
+ *
+ * @callback TransformImage
+ * @param {string} src
+ * @param {string} alt
+ * @param {string?} title
+ * @returns {string}
+ *
+ * @typedef {import("react").HTMLAttributeAnchorTarget} TransformLinkTargetType
+ *
+ * @callback TransformLinkTarget
+ * @param {string} href
+ * @param {Array.} children
+ * @param {string?} title
+ * @returns {TransformLinkTargetType|undefined}
+ *
+ * @typedef {keyof JSX.IntrinsicElements} ReactMarkdownNames
+ *
+ * To do: is `data-sourcepos` typeable?
+ *
+ * @callback CodeComponent
+ * @param {JSX.IntrinsicElements['code'] & ReactMarkdownProps & {inline?: boolean}} props
+ * @returns {ReactNode}
+ *
+ * @callback HeadingComponent
+ * @param {JSX.IntrinsicElements['h1'] & ReactMarkdownProps & {level: number}} props
+ * @returns {ReactNode}
+ *
+ * @callback LiComponent
+ * @param {JSX.IntrinsicElements['li'] & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} props
+ * @returns {ReactNode}
+ *
+ * @callback OrderedListComponent
+ * @param {JSX.IntrinsicElements['ol'] & ReactMarkdownProps & {depth: number, ordered: true}} props
+ * @returns {ReactNode}
+ *
+ * @callback TableCellComponent
+ * @param {JSX.IntrinsicElements['table'] & ReactMarkdownProps & {style?: Object., isHeader: boolean}} props
+ * @returns {ReactNode}
+ *
+ * @callback TableRowComponent
+ * @param {JSX.IntrinsicElements['tr'] & ReactMarkdownProps & {isHeader: boolean}} props
+ * @returns {ReactNode}
+ *
+ * @callback UnorderedListComponent
+ * @param {JSX.IntrinsicElements['ul'] & ReactMarkdownProps & {depth: number, ordered: false}} props
+ * @returns {ReactNode}
+ *
+ * @typedef SpecialComponents
+ * @property {CodeComponent|ReactMarkdownNames} code
+ * @property {HeadingComponent|ReactMarkdownNames} h1
+ * @property {HeadingComponent|ReactMarkdownNames} h2
+ * @property {HeadingComponent|ReactMarkdownNames} h3
+ * @property {HeadingComponent|ReactMarkdownNames} h4
+ * @property {HeadingComponent|ReactMarkdownNames} h5
+ * @property {HeadingComponent|ReactMarkdownNames} h6
+ * @property {LiComponent|ReactMarkdownNames} li
+ * @property {OrderedListComponent|ReactMarkdownNames} ol
+ * @property {TableCellComponent|ReactMarkdownNames} td
+ * @property {TableCellComponent|ReactMarkdownNames} th
+ * @property {TableRowComponent|ReactMarkdownNames} tr
+ * @property {UnorderedListComponent|ReactMarkdownNames} ul
+ *
+ * @typedef {Partial & SpecialComponents>} Components
+ *
+ * @typedef Options
+ * @property {boolean} [sourcePos=false]
+ * @property {boolean} [rawSourcePos=false]
+ * @property {boolean} [skipHtml=false]
+ * @property {boolean} [includeElementIndex=false]
+ * @property {null|false|TransformLink} [transformLinkUri]
+ * @property {TransformImage} [transformImageUri]
+ * @property {TransformLinkTargetType|TransformLinkTarget} [linkTarget]
+ * @property {Components} [components]
+ */
- } else {
- // Append the rendered row to the child list.
- if (!didSuspendAlready) {
- var _suspended = findFirstSuspended(renderedTail);
- if (_suspended !== null) {
- workInProgress.effectTag |= DidCapture;
- didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
- // get lost if this row ends up dropped during a second pass.
- var _newThennables = _suspended.updateQueue;
- if (_newThennables !== null) {
- workInProgress.updateQueue = _newThennables;
- workInProgress.effectTag |= Update;
- }
- cutOffTailIfNeeded(renderState, true); // This might have been modified.
- if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {
- // We need to delete the row we just rendered.
- // Reset the effect list to what it was before we rendered this
- // child. The nested children have already appended themselves.
- var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
- if (lastEffect !== null) {
- lastEffect.nextEffect = null;
- } // We're done.
+const own = {}.hasOwnProperty
- return null;
- }
- } else if ( // The time it took to render last row is greater than time until
- // the expiration.
- now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {
- // We have now passed our CPU deadline and we'll just give up further
- // attempts to render the main content and only render fallbacks.
- // The assumption is that this is usually faster.
- workInProgress.effectTag |= DidCapture;
- didSuspendAlready = true;
- cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. If we can show
- // them, then they really have the same priority as this render.
- // So we'll pick it back up the very next render pass once we've had
- // an opportunity to yield for paint.
+// The table-related elements that must not contain whitespace text according
+// to React.
+const tableElements = new Set(['table', 'thead', 'tbody', 'tfoot', 'tr'])
- var nextPriority = renderExpirationTime - 1;
- workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;
+/**
+ * @param {Context} context
+ * @param {Element|Root} node
+ */
+function childrenToReact(context, node) {
+ /** @type {Array.} */
+ const children = []
+ let childIndex = -1
+ /** @type {Comment|Doctype|Element|Raw|Text} */
+ let child
- {
- markSpawnedWork(nextPriority);
- }
- }
- }
+ while (++childIndex < node.children.length) {
+ child = node.children[childIndex]
- if (renderState.isBackwards) {
- // The effect list of the backwards tail will have been added
- // to the end. This breaks the guarantee that life-cycles fire in
- // sibling order but that isn't a strong guarantee promised by React.
- // Especially since these might also just pop in during future commits.
- // Append to the beginning of the list.
- renderedTail.sibling = workInProgress.child;
- workInProgress.child = renderedTail;
- } else {
- var previousSibling = renderState.last;
+ if (child.type === 'element') {
+ children.push(toReact(context, child, childIndex, node))
+ } else if (child.type === 'text') {
+ // React does not permit whitespace text elements as children of table:
+ // cf. https://github.com/remarkjs/react-markdown/issues/576
+ if (
+ node.type !== 'element' ||
+ !tableElements.has(node.tagName) ||
+ child.value !== '\n'
+ ) {
+ children.push(child.value)
+ }
+ } else if (child.type === 'raw' && !context.options.skipHtml) {
+ // Default behavior is to show (encoded) HTML.
+ children.push(child.value)
+ }
+ }
- if (previousSibling !== null) {
- previousSibling.sibling = renderedTail;
- } else {
- workInProgress.child = renderedTail;
- }
+ return children
+}
- renderState.last = renderedTail;
- }
- }
+/**
+ * @param {Context} context
+ * @param {Element} node
+ * @param {number} index
+ * @param {Element|Root} parent
+ */
+function toReact(context, node, index, parent) {
+ const options = context.options
+ const parentSchema = context.schema
+ /** @type {ReactMarkdownNames} */
+ // @ts-expect-error assume a known HTML/SVG element.
+ const name = node.tagName
+ /** @type {Object.} */
+ const properties = {}
+ let schema = parentSchema
+ /** @type {string} */
+ let property
- if (renderState.tail !== null) {
- // We still have tail rows to render.
- if (renderState.tailExpiration === 0) {
- // Heuristic for how long we're willing to spend rendering rows
- // until we just give up and show what we have so far.
- var TAIL_EXPIRATION_TIMEOUT_MS = 500;
- renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this
- // is a per component value. It should really be since the start
- // of the total render or last commit. Consider using something like
- // globalMostRecentFallbackTime. That doesn't account for being
- // suspended for part of the time or when it's a new render.
- // It should probably use a global start time value instead.
- } // Pop a row.
+ if (parentSchema.space === 'html' && name === 'svg') {
+ schema = property_information__WEBPACK_IMPORTED_MODULE_3__.svg
+ context.schema = schema
+ }
+ if (node.properties) {
+ for (property in node.properties) {
+ if (own.call(node.properties, property)) {
+ addProperty(properties, property, node.properties[property], context)
+ }
+ }
+ }
- var next = renderState.tail;
- renderState.rendering = next;
- renderState.tail = next.sibling;
- renderState.lastEffect = workInProgress.lastEffect;
- renderState.renderingStartTime = now();
- next.sibling = null; // Restore the context.
- // TODO: We can probably just avoid popping it instead and only
- // setting it the first time we go from not suspended to suspended.
+ if (name === 'ol' || name === 'ul') {
+ context.listDepth++
+ }
- var suspenseContext = suspenseStackCursor.current;
+ const children = childrenToReact(context, node)
- if (didSuspendAlready) {
- suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- } else {
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- }
+ if (name === 'ol' || name === 'ul') {
+ context.listDepth--
+ }
- pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
+ // Restore parent schema.
+ context.schema = parentSchema
- return next;
- }
+ // Nodes created by plugins do not have positional info, in which case we use
+ // an object that matches the position interface.
+ const position = node.position || {
+ start: {line: null, column: null, offset: null},
+ end: {line: null, column: null, offset: null}
+ }
+ const component =
+ options.components && own.call(options.components, name)
+ ? options.components[name]
+ : name
+ const basic = typeof component === 'string' || component === react__WEBPACK_IMPORTED_MODULE_0__.Fragment
- return null;
- }
+ if (!react_is__WEBPACK_IMPORTED_MODULE_1__.isValidElementType(component)) {
+ throw new TypeError(
+ `Component for name \`${name}\` not defined or is not renderable`
+ )
}
- {
- {
- throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
- }
+ properties.key = [
+ name,
+ position.start.line,
+ position.start.column,
+ index
+ ].join('-')
+
+ if (name === 'a' && options.linkTarget) {
+ properties.target =
+ typeof options.linkTarget === 'function'
+ ? options.linkTarget(
+ String(properties.href || ''),
+ node.children,
+ typeof properties.title === 'string' ? properties.title : null
+ )
+ : options.linkTarget
+ }
+
+ if (name === 'a' && options.transformLinkUri) {
+ properties.href = options.transformLinkUri(
+ String(properties.href || ''),
+ node.children,
+ typeof properties.title === 'string' ? properties.title : null
+ )
}
-}
-function unwindWork(workInProgress, renderExpirationTime) {
- switch (workInProgress.tag) {
- case ClassComponent:
- {
- var Component = workInProgress.type;
+ if (
+ !basic &&
+ name === 'code' &&
+ parent.type === 'element' &&
+ parent.tagName !== 'pre'
+ ) {
+ properties.inline = true
+ }
- if (isContextProvider(Component)) {
- popContext(workInProgress);
- }
+ if (
+ !basic &&
+ (name === 'h1' ||
+ name === 'h2' ||
+ name === 'h3' ||
+ name === 'h4' ||
+ name === 'h5' ||
+ name === 'h6')
+ ) {
+ properties.level = Number.parseInt(name.charAt(1), 10)
+ }
- var effectTag = workInProgress.effectTag;
+ if (name === 'img' && options.transformImageUri) {
+ properties.src = options.transformImageUri(
+ String(properties.src || ''),
+ String(properties.alt || ''),
+ typeof properties.title === 'string' ? properties.title : null
+ )
+ }
- if (effectTag & ShouldCapture) {
- workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
- return workInProgress;
- }
+ if (!basic && name === 'li' && parent.type === 'element') {
+ const input = getInputElement(node)
+ properties.checked =
+ input && input.properties ? Boolean(input.properties.checked) : null
+ properties.index = getElementsBeforeCount(parent, node)
+ properties.ordered = parent.tagName === 'ol'
+ }
- return null;
- }
+ if (!basic && (name === 'ol' || name === 'ul')) {
+ properties.ordered = name === 'ol'
+ properties.depth = context.listDepth
+ }
- case HostRoot:
- {
- popHostContainer(workInProgress);
- popTopLevelContextObject(workInProgress);
- var _effectTag = workInProgress.effectTag;
+ if (name === 'td' || name === 'th') {
+ if (properties.align) {
+ if (!properties.style) properties.style = {}
+ // @ts-expect-error assume `style` is an object
+ properties.style.textAlign = properties.align
+ delete properties.align
+ }
- if (!((_effectTag & DidCapture) === NoEffect)) {
- {
- throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
- }
- }
+ if (!basic) {
+ properties.isHeader = name === 'th'
+ }
+ }
- workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
- return workInProgress;
- }
+ if (!basic && name === 'tr' && parent.type === 'element') {
+ properties.isHeader = Boolean(parent.tagName === 'thead')
+ }
- case HostComponent:
- {
- // TODO: popHydrationState
- popHostContext(workInProgress);
- return null;
- }
+ // If `sourcePos` is given, pass source information (line/column info from markdown source).
+ if (options.sourcePos) {
+ properties['data-sourcepos'] = flattenPosition(position)
+ }
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
+ if (!basic && options.rawSourcePos) {
+ properties.sourcePosition = node.position
+ }
- var _effectTag2 = workInProgress.effectTag;
+ // If `includeElementIndex` is given, pass node index info to components.
+ if (!basic && options.includeElementIndex) {
+ properties.index = getElementsBeforeCount(parent, node)
+ properties.siblingCount = getElementsBeforeCount(parent)
+ }
- if (_effectTag2 & ShouldCapture) {
- workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
+ if (!basic) {
+ properties.node = node
+ }
- return workInProgress;
- }
+ // Ensure no React warnings are emitted for void elements w/ children.
+ return children.length > 0
+ ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(component, properties, children)
+ : react__WEBPACK_IMPORTED_MODULE_0__.createElement(component, properties)
+}
- return null;
- }
+/**
+ * @param {Element|Root} node
+ * @returns {Element?}
+ */
+function getInputElement(node) {
+ let index = -1
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
- // caught by a nested boundary. If not, it should bubble through.
+ while (++index < node.children.length) {
+ const child = node.children[index]
- return null;
- }
+ if (child.type === 'element' && child.tagName === 'input') {
+ return child
+ }
+ }
- case HostPortal:
- popHostContainer(workInProgress);
- return null;
+ return null
+}
- case ContextProvider:
- popProvider(workInProgress);
- return null;
+/**
+ * @param {Element|Root} parent
+ * @param {Element} [node]
+ * @returns {number}
+ */
+function getElementsBeforeCount(parent, node) {
+ let index = -1
+ let count = 0
- default:
- return null;
+ while (++index < parent.children.length) {
+ if (parent.children[index] === node) break
+ if (parent.children[index].type === 'element') count++
}
+
+ return count
}
-function unwindInterruptedWork(interruptedWork) {
- switch (interruptedWork.tag) {
- case ClassComponent:
- {
- var childContextTypes = interruptedWork.type.childContextTypes;
+/**
+ * @param {Object.} props
+ * @param {string} prop
+ * @param {unknown} value
+ * @param {Context} ctx
+ */
+function addProperty(props, prop, value, ctx) {
+ const info = (0,property_information__WEBPACK_IMPORTED_MODULE_4__.find)(ctx.schema, prop)
+ let result = value
- if (childContextTypes !== null && childContextTypes !== undefined) {
- popContext(interruptedWork);
- }
+ // Ignore nullish and `NaN` values.
+ // eslint-disable-next-line no-self-compare
+ if (result === null || result === undefined || result !== result) {
+ return
+ }
- break;
- }
+ // Accept `array`.
+ // Most props are space-separated.
+ if (Array.isArray(result)) {
+ result = info.commaSeparated ? (0,comma_separated_tokens__WEBPACK_IMPORTED_MODULE_5__.stringify)(result) : (0,space_separated_tokens__WEBPACK_IMPORTED_MODULE_6__.stringify)(result)
+ }
- case HostRoot:
- {
- popHostContainer(interruptedWork);
- popTopLevelContextObject(interruptedWork);
- break;
- }
+ if (info.property === 'style' && typeof result === 'string') {
+ result = parseStyle(result)
+ }
- case HostComponent:
- {
- popHostContext(interruptedWork);
- break;
- }
+ if (info.space && info.property) {
+ props[
+ own.call(property_information__WEBPACK_IMPORTED_MODULE_7__.hastToReact, info.property)
+ ? property_information__WEBPACK_IMPORTED_MODULE_7__.hastToReact[info.property]
+ : info.property
+ ] = result
+ } else if (info.attribute) {
+ props[info.attribute] = result
+ }
+}
- case HostPortal:
- popHostContainer(interruptedWork);
- break;
+/**
+ * @param {string} value
+ * @returns {Object.}
+ */
+function parseStyle(value) {
+ /** @type {Object.} */
+ const result = {}
- case SuspenseComponent:
- popSuspenseContext(interruptedWork);
- break;
+ try {
+ style_to_object__WEBPACK_IMPORTED_MODULE_2__(value, iterator)
+ } catch {
+ // Silent.
+ }
- case SuspenseListComponent:
- popSuspenseContext(interruptedWork);
- break;
+ return result
- case ContextProvider:
- popProvider(interruptedWork);
- break;
+ /**
+ * @param {string} name
+ * @param {string} v
+ */
+ function iterator(name, v) {
+ const k = name.slice(0, 4) === '-ms-' ? `ms-${name.slice(4)}` : name
+ result[k.replace(/-([a-z])/g, styleReplacer)] = v
}
}
-function createCapturedValue(value, source) {
- // If the value is an error, call this function immediately after it is thrown
- // so the stack is accurate.
- return {
- value: value,
- source: source,
- stack: getStackByFiberInDevAndProd(source)
- };
+/**
+ * @param {unknown} _
+ * @param {string} $1
+ */
+function styleReplacer(_, $1) {
+ return $1.toUpperCase()
}
-function logCapturedError(capturedError) {
+/**
+ * @param {Position|{start: {line: null, column: null, offset: null}, end: {line: null, column: null, offset: null}}} pos
+ * @returns {string}
+ */
+function flattenPosition(pos) {
+ return [
+ pos.start.line,
+ ':',
+ pos.start.column,
+ '-',
+ pos.end.line,
+ ':',
+ pos.end.column
+ ]
+ .map((d) => String(d))
+ .join('')
+}
- var error = capturedError.error;
- {
- var componentName = capturedError.componentName,
- componentStack = capturedError.componentStack,
- errorBoundaryName = capturedError.errorBoundaryName,
- errorBoundaryFound = capturedError.errorBoundaryFound,
- willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling
- // `preventDefault()` in window `error` handler.
- // We record this information as an expando on the error.
+/***/ }),
- if (error != null && error._suppressLogging) {
- if (errorBoundaryFound && willRetry) {
- // The error is recoverable and was silenced.
- // Ignore it and don't print the stack addendum.
- // This is handy for testing error boundaries without noise.
- return;
- } // The error is fatal. Since the silencing might have
- // been accidental, we'll surface it anyway.
- // However, the browser would have silenced the original error
- // so we'll print it first, and then print the stack addendum.
+/***/ "./node_modules/react-markdown/lib/react-markdown.js":
+/*!***********************************************************!*\
+ !*** ./node_modules/react-markdown/lib/react-markdown.js ***!
+ \***********************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "ReactMarkdown": () => (/* binding */ ReactMarkdown)
+/* harmony export */ });
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
+/* harmony import */ var vfile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vfile */ "./node_modules/react-markdown/node_modules/vfile/lib/index.js");
+/* harmony import */ var unified__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! unified */ "./node_modules/unified/lib/index.js");
+/* harmony import */ var remark_parse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! remark-parse */ "./node_modules/react-markdown/node_modules/remark-parse/index.js");
+/* harmony import */ var remark_rehype__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! remark-rehype */ "./node_modules/remark-rehype/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
+/* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! property-information */ "./node_modules/react-markdown/node_modules/property-information/index.js");
+/* harmony import */ var _rehype_filter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./rehype-filter.js */ "./node_modules/react-markdown/lib/rehype-filter.js");
+/* harmony import */ var _uri_transformer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./uri-transformer.js */ "./node_modules/react-markdown/lib/uri-transformer.js");
+/* harmony import */ var _ast_to_react_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ast-to-react.js */ "./node_modules/react-markdown/lib/ast-to-react.js");
+/**
+ * @typedef {import('react').ReactNode} ReactNode
+ * @typedef {import('react').ReactElement<{}>} ReactElement
+ * @typedef {import('unified').PluggableList} PluggableList
+ * @typedef {import('hast').Root} Root
+ * @typedef {import('./rehype-filter.js').Options} FilterOptions
+ * @typedef {import('./ast-to-react.js').Options} TransformOptions
+ *
+ * @typedef CoreOptions
+ * @property {string} children
+ *
+ * @typedef PluginOptions
+ * @property {PluggableList} [plugins=[]] **deprecated**: use `remarkPlugins` instead
+ * @property {PluggableList} [remarkPlugins=[]]
+ * @property {PluggableList} [rehypePlugins=[]]
+ *
+ * @typedef LayoutOptions
+ * @property {string} [className]
+ *
+ * @typedef {CoreOptions & PluginOptions & LayoutOptions & FilterOptions & TransformOptions} ReactMarkdownOptions
+ *
+ * @typedef Deprecation
+ * @property {string} id
+ * @property {string} [to]
+ */
- console['error'](error); // Don't transform to our wrapper
- // For a more detailed description of this block, see:
- // https://github.com/facebook/react/pull/13384
- }
- var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
- var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
- if (errorBoundaryFound && errorBoundaryName) {
- if (willRetry) {
- errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
- } else {
- errorBoundaryMessage = "This error was initially handled by the error boundary " + errorBoundaryName + ".\n" + "Recreating the tree from scratch failed so React will unmount the tree.";
- }
- } else {
- errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
- }
- var combinedMessage = "" + componentNameMessage + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
- // We don't include the original error message and JS stack because the browser
- // has already printed it. Even if the application swallows the error, it is still
- // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
- console['error'](combinedMessage); // Don't transform to our wrapper
- }
-}
-var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
-{
- didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
-}
-var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
-function logError(boundary, errorInfo) {
- var source = errorInfo.source;
- var stack = errorInfo.stack;
- if (stack === null && source !== null) {
- stack = getStackByFiberInDevAndProd(source);
- }
- var capturedError = {
- componentName: source !== null ? getComponentName(source.type) : null,
- componentStack: stack !== null ? stack : '',
- error: errorInfo.value,
- errorBoundary: null,
- errorBoundaryName: null,
- errorBoundaryFound: false,
- willRetry: false
- };
- if (boundary !== null && boundary.tag === ClassComponent) {
- capturedError.errorBoundary = boundary.stateNode;
- capturedError.errorBoundaryName = getComponentName(boundary.type);
- capturedError.errorBoundaryFound = true;
- capturedError.willRetry = true;
- }
- try {
- logCapturedError(capturedError);
- } catch (e) {
- // This method must not throw, or React internal state will get messed up.
- // If console.error is overridden, or logCapturedError() shows a dialog that throws,
- // we want to report this error outside of the normal stack as a last resort.
- // https://github.com/facebook/react/issues/13188
- setTimeout(function () {
- throw e;
- });
+const own = {}.hasOwnProperty
+const changelog =
+ 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'
+
+/** @type {Object.} */
+const deprecated = {
+ renderers: {to: 'components', id: 'change-renderers-to-components'},
+ astPlugins: {id: 'remove-buggy-html-in-markdown-parser'},
+ allowDangerousHtml: {id: 'remove-buggy-html-in-markdown-parser'},
+ escapeHtml: {id: 'remove-buggy-html-in-markdown-parser'},
+ source: {to: 'children', id: 'change-source-to-children'},
+ allowNode: {
+ to: 'allowElement',
+ id: 'replace-allownode-allowedtypes-and-disallowedtypes'
+ },
+ allowedTypes: {
+ to: 'allowedElements',
+ id: 'replace-allownode-allowedtypes-and-disallowedtypes'
+ },
+ disallowedTypes: {
+ to: 'disallowedElements',
+ id: 'replace-allownode-allowedtypes-and-disallowedtypes'
+ },
+ includeNodeIndex: {
+ to: 'includeElementIndex',
+ id: 'change-includenodeindex-to-includeelementindex'
}
}
-var callComponentWillUnmountWithTimer = function (current, instance) {
- startPhaseTimer(current, 'componentWillUnmount');
- instance.props = current.memoizedProps;
- instance.state = current.memoizedState;
- instance.componentWillUnmount();
- stopPhaseTimer();
-}; // Capture errors so they don't interrupt unmounting.
+/**
+ * @param {ReactMarkdownOptions} options
+ * @returns {ReactElement}
+ */
+function ReactMarkdown(options) {
+ for (const key in deprecated) {
+ if (own.call(deprecated, key) && own.call(options, key)) {
+ const deprecation = deprecated[key]
+ console.warn(
+ `[react-markdown] Warning: please ${
+ deprecation.to ? `use \`${deprecation.to}\` instead of` : 'remove'
+ } \`${key}\` (see <${changelog}#${deprecation.id}> for more info)`
+ )
+ delete deprecated[key]
+ }
+ }
+
+ const processor = (0,unified__WEBPACK_IMPORTED_MODULE_2__.unified)()
+ .use(remark_parse__WEBPACK_IMPORTED_MODULE_3__.default)
+ // TODO: deprecate `plugins` in v8.0.0.
+ .use(options.remarkPlugins || options.plugins || [])
+ .use(remark_rehype__WEBPACK_IMPORTED_MODULE_4__.default, {allowDangerousHtml: true})
+ .use(options.rehypePlugins || [])
+ .use(_rehype_filter_js__WEBPACK_IMPORTED_MODULE_5__.default, options)
+
+ const file = new vfile__WEBPACK_IMPORTED_MODULE_6__.VFile()
+
+ if (typeof options.children === 'string') {
+ file.value = options.children
+ } else if (options.children !== undefined && options.children !== null) {
+ console.warn(
+ `[react-markdown] Warning: please pass a string as \`children\` (not: \`${options.children}\`)`
+ )
+ }
+
+ const hastNode = processor.runSync(processor.parse(file), file)
+
+ if (hastNode.type !== 'root') {
+ throw new TypeError('Expected a `root` node')
+ }
+
+ /** @type {ReactElement} */
+ let result = react__WEBPACK_IMPORTED_MODULE_0__.createElement(
+ react__WEBPACK_IMPORTED_MODULE_0__.Fragment,
+ {},
+ (0,_ast_to_react_js__WEBPACK_IMPORTED_MODULE_7__.childrenToReact)({options, schema: property_information__WEBPACK_IMPORTED_MODULE_8__.html, listDepth: 0}, hastNode)
+ )
+
+ if (options.className) {
+ result = react__WEBPACK_IMPORTED_MODULE_0__.createElement('div', {className: options.className}, result)
+ }
+
+ return result
+}
+
+ReactMarkdown.defaultProps = {transformLinkUri: _uri_transformer_js__WEBPACK_IMPORTED_MODULE_9__.uriTransformer}
+
+ReactMarkdown.propTypes = {
+ // Core options:
+ children: prop_types__WEBPACK_IMPORTED_MODULE_1__.string,
+ // Layout options:
+ className: prop_types__WEBPACK_IMPORTED_MODULE_1__.string,
+ // Filter options:
+ allowElement: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,
+ allowedElements: prop_types__WEBPACK_IMPORTED_MODULE_1__.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1__.string),
+ disallowedElements: prop_types__WEBPACK_IMPORTED_MODULE_1__.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1__.string),
+ unwrapDisallowed: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,
+ // Plugin options:
+ remarkPlugins: prop_types__WEBPACK_IMPORTED_MODULE_1__.arrayOf(
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.object,
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.func,
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1__.object, prop_types__WEBPACK_IMPORTED_MODULE_1__.func]))
+ ])
+ ),
+ rehypePlugins: prop_types__WEBPACK_IMPORTED_MODULE_1__.arrayOf(
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.object,
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.func,
+ prop_types__WEBPACK_IMPORTED_MODULE_1__.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1__.object, prop_types__WEBPACK_IMPORTED_MODULE_1__.func]))
+ ])
+ ),
+ // Transform options:
+ sourcePos: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,
+ rawSourcePos: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,
+ skipHtml: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,
+ includeElementIndex: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,
+ transformLinkUri: prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1__.func, prop_types__WEBPACK_IMPORTED_MODULE_1__.bool]),
+ linkTarget: prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1__.func, prop_types__WEBPACK_IMPORTED_MODULE_1__.string]),
+ transformImageUri: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,
+ components: prop_types__WEBPACK_IMPORTED_MODULE_1__.object
+}
-function safelyCallComponentWillUnmount(current, instance) {
- {
- invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);
+/***/ }),
- if (hasCaughtError()) {
- var unmountError = clearCaughtError();
- captureCommitPhaseError(current, unmountError);
- }
- }
-}
+/***/ "./node_modules/react-markdown/lib/rehype-filter.js":
+/*!**********************************************************!*\
+ !*** ./node_modules/react-markdown/lib/rehype-filter.js ***!
+ \**********************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-function safelyDetachRef(current) {
- var ref = current.ref;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ rehypeFilter)
+/* harmony export */ });
+/* harmony import */ var unist_util_visit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! unist-util-visit */ "./node_modules/react-markdown/node_modules/unist-util-visit/index.js");
- if (ref !== null) {
- if (typeof ref === 'function') {
- {
- invokeGuardedCallback(null, ref, null, null);
- if (hasCaughtError()) {
- var refError = clearCaughtError();
- captureCommitPhaseError(current, refError);
- }
- }
- } else {
- ref.current = null;
- }
+/**
+ * @typedef {import('unist').Node} Node
+ * @typedef {import('hast').Root} Root
+ * @typedef {import('hast').Element} Element
+ *
+ * @callback AllowElement
+ * @param {Element} element
+ * @param {number} index
+ * @param {Element|Root} parent
+ * @returns {boolean|undefined}
+ *
+ * @typedef Options
+ * @property {Array.} [allowedElements]
+ * @property {Array.} [disallowedElements=[]]
+ * @property {AllowElement} [allowElement]
+ * @property {boolean} [unwrapDisallowed=false]
+ */
+
+/**
+ * @type {import('unified').Plugin<[Options], Root>}
+ */
+function rehypeFilter(options) {
+ if (options.allowedElements && options.disallowedElements) {
+ throw new TypeError(
+ 'Only one of `allowedElements` and `disallowedElements` should be defined'
+ )
}
-}
-function safelyCallDestroy(current, destroy) {
- {
- invokeGuardedCallback(null, destroy, null);
+ if (
+ options.allowedElements ||
+ options.disallowedElements ||
+ options.allowElement
+ ) {
+ return (tree) => {
+ (0,unist_util_visit__WEBPACK_IMPORTED_MODULE_0__.visit)(tree, 'element', (node, index, parent_) => {
+ const parent = /** @type {Element|Root} */ (parent_)
+ /** @type {boolean|undefined} */
+ let remove
+
+ if (options.allowedElements) {
+ remove = !options.allowedElements.includes(node.tagName)
+ } else if (options.disallowedElements) {
+ remove = options.disallowedElements.includes(node.tagName)
+ }
- if (hasCaughtError()) {
- var error = clearCaughtError();
- captureCommitPhaseError(current, error);
+ if (!remove && options.allowElement && typeof index === 'number') {
+ remove = !options.allowElement(node, index, parent)
+ }
+
+ if (remove && typeof index === 'number') {
+ if (options.unwrapDisallowed && node.children) {
+ parent.children.splice(index, 1, ...node.children)
+ } else {
+ parent.children.splice(index, 1)
+ }
+
+ return index
+ }
+
+ return undefined
+ })
}
}
}
-function commitBeforeMutationLifeCycles(current, finishedWork) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- return;
- }
- case ClassComponent:
- {
- if (finishedWork.effectTag & Snapshot) {
- if (current !== null) {
- var prevProps = current.memoizedProps;
- var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
- var instance = finishedWork.stateNode; // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
+/***/ }),
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
+/***/ "./node_modules/react-markdown/lib/uri-transformer.js":
+/*!************************************************************!*\
+ !*** ./node_modules/react-markdown/lib/uri-transformer.js ***!
+ \************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "uriTransformer": () => (/* binding */ uriTransformer)
+/* harmony export */ });
+const protocols = ['http', 'https', 'mailto', 'tel']
- var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
+/**
+ * @param {string} uri
+ * @returns {string}
+ */
+function uriTransformer(uri) {
+ const url = (uri || '').trim()
+ const first = url.charAt(0)
- {
- var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
+ if (first === '#' || first === '/') {
+ return url
+ }
- if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
- didWarnSet.add(finishedWork.type);
+ const colon = url.indexOf(':')
+ if (colon === -1) {
+ return url
+ }
- error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
- }
- }
+ let index = -1
- instance.__reactInternalSnapshotBeforeUpdate = snapshot;
- stopPhaseTimer();
- }
- }
+ while (++index < protocols.length) {
+ const protocol = protocols[index]
- return;
- }
+ if (
+ colon === protocol.length &&
+ url.slice(0, protocol.length).toLowerCase() === protocol
+ ) {
+ return url
+ }
+ }
- case HostRoot:
- case HostComponent:
- case HostText:
- case HostPortal:
- case IncompleteClassComponent:
- // Nothing to do for these component types
- return;
+ index = url.indexOf('?')
+ if (index !== -1 && colon > index) {
+ return url
}
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
+ index = url.indexOf('#')
+ if (index !== -1 && colon > index) {
+ return url
}
-}
-function commitHookEffectListUnmount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
+ // eslint-disable-next-line no-script-url
+ return 'javascript:void(0)'
+}
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
- do {
- if ((effect.tag & tag) === tag) {
- // Unmount
- var destroy = effect.destroy;
- effect.destroy = undefined;
+/***/ }),
- if (destroy !== undefined) {
- destroy();
- }
- }
+/***/ "./node_modules/react-markdown/node_modules/character-entities/index.js":
+/*!******************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/character-entities/index.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- effect = effect.next;
- } while (effect !== firstEffect);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "characterEntities": () => (/* binding */ characterEntities)
+/* harmony export */ });
+var characterEntities = {
+ AEli: 'Æ',
+ AElig: 'Æ',
+ AM: '&',
+ AMP: '&',
+ Aacut: 'Á',
+ Aacute: 'Á',
+ Abreve: 'Ă',
+ Acir: 'Â',
+ Acirc: 'Â',
+ Acy: 'А',
+ Afr: '𝔄',
+ Agrav: 'À',
+ Agrave: 'À',
+ Alpha: 'Α',
+ Amacr: 'Ā',
+ And: '⩓',
+ Aogon: 'Ą',
+ Aopf: '𝔸',
+ ApplyFunction: '',
+ Arin: 'Å',
+ Aring: 'Å',
+ Ascr: '𝒜',
+ Assign: '≔',
+ Atild: 'Ã',
+ Atilde: 'Ã',
+ Aum: 'Ä',
+ Auml: 'Ä',
+ Backslash: '∖',
+ Barv: '⫧',
+ Barwed: '⌆',
+ Bcy: 'Б',
+ Because: '∵',
+ Bernoullis: 'ℬ',
+ Beta: 'Β',
+ Bfr: '𝔅',
+ Bopf: '𝔹',
+ Breve: '˘',
+ Bscr: 'ℬ',
+ Bumpeq: '≎',
+ CHcy: 'Ч',
+ COP: '©',
+ COPY: '©',
+ Cacute: 'Ć',
+ Cap: '⋒',
+ CapitalDifferentialD: 'ⅅ',
+ Cayleys: 'ℭ',
+ Ccaron: 'Č',
+ Ccedi: 'Ç',
+ Ccedil: 'Ç',
+ Ccirc: 'Ĉ',
+ Cconint: '∰',
+ Cdot: 'Ċ',
+ Cedilla: '¸',
+ CenterDot: '·',
+ Cfr: 'ℭ',
+ Chi: 'Χ',
+ CircleDot: '⊙',
+ CircleMinus: '⊖',
+ CirclePlus: '⊕',
+ CircleTimes: '⊗',
+ ClockwiseContourIntegral: '∲',
+ CloseCurlyDoubleQuote: '”',
+ CloseCurlyQuote: '’',
+ Colon: '∷',
+ Colone: '⩴',
+ Congruent: '≡',
+ Conint: '∯',
+ ContourIntegral: '∮',
+ Copf: 'ℂ',
+ Coproduct: '∐',
+ CounterClockwiseContourIntegral: '∳',
+ Cross: '⨯',
+ Cscr: '𝒞',
+ Cup: '⋓',
+ CupCap: '≍',
+ DD: 'ⅅ',
+ DDotrahd: '⤑',
+ DJcy: 'Ђ',
+ DScy: 'Ѕ',
+ DZcy: 'Џ',
+ Dagger: '‡',
+ Darr: '↡',
+ Dashv: '⫤',
+ Dcaron: 'Ď',
+ Dcy: 'Д',
+ Del: '∇',
+ Delta: 'Δ',
+ Dfr: '𝔇',
+ DiacriticalAcute: '´',
+ DiacriticalDot: '˙',
+ DiacriticalDoubleAcute: '˝',
+ DiacriticalGrave: '`',
+ DiacriticalTilde: '˜',
+ Diamond: '⋄',
+ DifferentialD: 'ⅆ',
+ Dopf: '𝔻',
+ Dot: '¨',
+ DotDot: '⃜',
+ DotEqual: '≐',
+ DoubleContourIntegral: '∯',
+ DoubleDot: '¨',
+ DoubleDownArrow: '⇓',
+ DoubleLeftArrow: '⇐',
+ DoubleLeftRightArrow: '⇔',
+ DoubleLeftTee: '⫤',
+ DoubleLongLeftArrow: '⟸',
+ DoubleLongLeftRightArrow: '⟺',
+ DoubleLongRightArrow: '⟹',
+ DoubleRightArrow: '⇒',
+ DoubleRightTee: '⊨',
+ DoubleUpArrow: '⇑',
+ DoubleUpDownArrow: '⇕',
+ DoubleVerticalBar: '∥',
+ DownArrow: '↓',
+ DownArrowBar: '⤓',
+ DownArrowUpArrow: '⇵',
+ DownBreve: '̑',
+ DownLeftRightVector: '⥐',
+ DownLeftTeeVector: '⥞',
+ DownLeftVector: '↽',
+ DownLeftVectorBar: '⥖',
+ DownRightTeeVector: '⥟',
+ DownRightVector: '⇁',
+ DownRightVectorBar: '⥗',
+ DownTee: '⊤',
+ DownTeeArrow: '↧',
+ Downarrow: '⇓',
+ Dscr: '𝒟',
+ Dstrok: 'Đ',
+ ENG: 'Ŋ',
+ ET: 'Ð',
+ ETH: 'Ð',
+ Eacut: 'É',
+ Eacute: 'É',
+ Ecaron: 'Ě',
+ Ecir: 'Ê',
+ Ecirc: 'Ê',
+ Ecy: 'Э',
+ Edot: 'Ė',
+ Efr: '𝔈',
+ Egrav: 'È',
+ Egrave: 'È',
+ Element: '∈',
+ Emacr: 'Ē',
+ EmptySmallSquare: '◻',
+ EmptyVerySmallSquare: '▫',
+ Eogon: 'Ę',
+ Eopf: '𝔼',
+ Epsilon: 'Ε',
+ Equal: '⩵',
+ EqualTilde: '≂',
+ Equilibrium: '⇌',
+ Escr: 'ℰ',
+ Esim: '⩳',
+ Eta: 'Η',
+ Eum: 'Ë',
+ Euml: 'Ë',
+ Exists: '∃',
+ ExponentialE: 'ⅇ',
+ Fcy: 'Ф',
+ Ffr: '𝔉',
+ FilledSmallSquare: '◼',
+ FilledVerySmallSquare: '▪',
+ Fopf: '𝔽',
+ ForAll: '∀',
+ Fouriertrf: 'ℱ',
+ Fscr: 'ℱ',
+ GJcy: 'Ѓ',
+ G: '>',
+ GT: '>',
+ Gamma: 'Γ',
+ Gammad: 'Ϝ',
+ Gbreve: 'Ğ',
+ Gcedil: 'Ģ',
+ Gcirc: 'Ĝ',
+ Gcy: 'Г',
+ Gdot: 'Ġ',
+ Gfr: '𝔊',
+ Gg: '⋙',
+ Gopf: '𝔾',
+ GreaterEqual: '≥',
+ GreaterEqualLess: '⋛',
+ GreaterFullEqual: '≧',
+ GreaterGreater: '⪢',
+ GreaterLess: '≷',
+ GreaterSlantEqual: '⩾',
+ GreaterTilde: '≳',
+ Gscr: '𝒢',
+ Gt: '≫',
+ HARDcy: 'Ъ',
+ Hacek: 'ˇ',
+ Hat: '^',
+ Hcirc: 'Ĥ',
+ Hfr: 'ℌ',
+ HilbertSpace: 'ℋ',
+ Hopf: 'ℍ',
+ HorizontalLine: '─',
+ Hscr: 'ℋ',
+ Hstrok: 'Ħ',
+ HumpDownHump: '≎',
+ HumpEqual: '≏',
+ IEcy: 'Е',
+ IJlig: 'IJ',
+ IOcy: 'Ё',
+ Iacut: 'Í',
+ Iacute: 'Í',
+ Icir: 'Î',
+ Icirc: 'Î',
+ Icy: 'И',
+ Idot: 'İ',
+ Ifr: 'ℑ',
+ Igrav: 'Ì',
+ Igrave: 'Ì',
+ Im: 'ℑ',
+ Imacr: 'Ī',
+ ImaginaryI: 'ⅈ',
+ Implies: '⇒',
+ Int: '∬',
+ Integral: '∫',
+ Intersection: '⋂',
+ InvisibleComma: '',
+ InvisibleTimes: '',
+ Iogon: 'Į',
+ Iopf: '𝕀',
+ Iota: 'Ι',
+ Iscr: 'ℐ',
+ Itilde: 'Ĩ',
+ Iukcy: 'І',
+ Ium: 'Ï',
+ Iuml: 'Ï',
+ Jcirc: 'Ĵ',
+ Jcy: 'Й',
+ Jfr: '𝔍',
+ Jopf: '𝕁',
+ Jscr: '𝒥',
+ Jsercy: 'Ј',
+ Jukcy: 'Є',
+ KHcy: 'Х',
+ KJcy: 'Ќ',
+ Kappa: 'Κ',
+ Kcedil: 'Ķ',
+ Kcy: 'К',
+ Kfr: '𝔎',
+ Kopf: '𝕂',
+ Kscr: '𝒦',
+ LJcy: 'Љ',
+ L: '<',
+ LT: '<',
+ Lacute: 'Ĺ',
+ Lambda: 'Λ',
+ Lang: '⟪',
+ Laplacetrf: 'ℒ',
+ Larr: '↞',
+ Lcaron: 'Ľ',
+ Lcedil: 'Ļ',
+ Lcy: 'Л',
+ LeftAngleBracket: '⟨',
+ LeftArrow: '←',
+ LeftArrowBar: '⇤',
+ LeftArrowRightArrow: '⇆',
+ LeftCeiling: '⌈',
+ LeftDoubleBracket: '⟦',
+ LeftDownTeeVector: '⥡',
+ LeftDownVector: '⇃',
+ LeftDownVectorBar: '⥙',
+ LeftFloor: '⌊',
+ LeftRightArrow: '↔',
+ LeftRightVector: '⥎',
+ LeftTee: '⊣',
+ LeftTeeArrow: '↤',
+ LeftTeeVector: '⥚',
+ LeftTriangle: '⊲',
+ LeftTriangleBar: '⧏',
+ LeftTriangleEqual: '⊴',
+ LeftUpDownVector: '⥑',
+ LeftUpTeeVector: '⥠',
+ LeftUpVector: '↿',
+ LeftUpVectorBar: '⥘',
+ LeftVector: '↼',
+ LeftVectorBar: '⥒',
+ Leftarrow: '⇐',
+ Leftrightarrow: '⇔',
+ LessEqualGreater: '⋚',
+ LessFullEqual: '≦',
+ LessGreater: '≶',
+ LessLess: '⪡',
+ LessSlantEqual: '⩽',
+ LessTilde: '≲',
+ Lfr: '𝔏',
+ Ll: '⋘',
+ Lleftarrow: '⇚',
+ Lmidot: 'Ŀ',
+ LongLeftArrow: '⟵',
+ LongLeftRightArrow: '⟷',
+ LongRightArrow: '⟶',
+ Longleftarrow: '⟸',
+ Longleftrightarrow: '⟺',
+ Longrightarrow: '⟹',
+ Lopf: '𝕃',
+ LowerLeftArrow: '↙',
+ LowerRightArrow: '↘',
+ Lscr: 'ℒ',
+ Lsh: '↰',
+ Lstrok: 'Ł',
+ Lt: '≪',
+ Map: '⤅',
+ Mcy: 'М',
+ MediumSpace: ' ',
+ Mellintrf: 'ℳ',
+ Mfr: '𝔐',
+ MinusPlus: '∓',
+ Mopf: '𝕄',
+ Mscr: 'ℳ',
+ Mu: 'Μ',
+ NJcy: 'Њ',
+ Nacute: 'Ń',
+ Ncaron: 'Ň',
+ Ncedil: 'Ņ',
+ Ncy: 'Н',
+ NegativeMediumSpace: '',
+ NegativeThickSpace: '',
+ NegativeThinSpace: '',
+ NegativeVeryThinSpace: '',
+ NestedGreaterGreater: '≫',
+ NestedLessLess: '≪',
+ NewLine: '\n',
+ Nfr: '𝔑',
+ NoBreak: '',
+ NonBreakingSpace: ' ',
+ Nopf: 'ℕ',
+ Not: '⫬',
+ NotCongruent: '≢',
+ NotCupCap: '≭',
+ NotDoubleVerticalBar: '∦',
+ NotElement: '∉',
+ NotEqual: '≠',
+ NotEqualTilde: '≂̸',
+ NotExists: '∄',
+ NotGreater: '≯',
+ NotGreaterEqual: '≱',
+ NotGreaterFullEqual: '≧̸',
+ NotGreaterGreater: '≫̸',
+ NotGreaterLess: '≹',
+ NotGreaterSlantEqual: '⩾̸',
+ NotGreaterTilde: '≵',
+ NotHumpDownHump: '≎̸',
+ NotHumpEqual: '≏̸',
+ NotLeftTriangle: '⋪',
+ NotLeftTriangleBar: '⧏̸',
+ NotLeftTriangleEqual: '⋬',
+ NotLess: '≮',
+ NotLessEqual: '≰',
+ NotLessGreater: '≸',
+ NotLessLess: '≪̸',
+ NotLessSlantEqual: '⩽̸',
+ NotLessTilde: '≴',
+ NotNestedGreaterGreater: '⪢̸',
+ NotNestedLessLess: '⪡̸',
+ NotPrecedes: '⊀',
+ NotPrecedesEqual: '⪯̸',
+ NotPrecedesSlantEqual: '⋠',
+ NotReverseElement: '∌',
+ NotRightTriangle: '⋫',
+ NotRightTriangleBar: '⧐̸',
+ NotRightTriangleEqual: '⋭',
+ NotSquareSubset: '⊏̸',
+ NotSquareSubsetEqual: '⋢',
+ NotSquareSuperset: '⊐̸',
+ NotSquareSupersetEqual: '⋣',
+ NotSubset: '⊂⃒',
+ NotSubsetEqual: '⊈',
+ NotSucceeds: '⊁',
+ NotSucceedsEqual: '⪰̸',
+ NotSucceedsSlantEqual: '⋡',
+ NotSucceedsTilde: '≿̸',
+ NotSuperset: '⊃⃒',
+ NotSupersetEqual: '⊉',
+ NotTilde: '≁',
+ NotTildeEqual: '≄',
+ NotTildeFullEqual: '≇',
+ NotTildeTilde: '≉',
+ NotVerticalBar: '∤',
+ Nscr: '𝒩',
+ Ntild: 'Ñ',
+ Ntilde: 'Ñ',
+ Nu: 'Ν',
+ OElig: 'Œ',
+ Oacut: 'Ó',
+ Oacute: 'Ó',
+ Ocir: 'Ô',
+ Ocirc: 'Ô',
+ Ocy: 'О',
+ Odblac: 'Ő',
+ Ofr: '𝔒',
+ Ograv: 'Ò',
+ Ograve: 'Ò',
+ Omacr: 'Ō',
+ Omega: 'Ω',
+ Omicron: 'Ο',
+ Oopf: '𝕆',
+ OpenCurlyDoubleQuote: '“',
+ OpenCurlyQuote: '‘',
+ Or: '⩔',
+ Oscr: '𝒪',
+ Oslas: 'Ø',
+ Oslash: 'Ø',
+ Otild: 'Õ',
+ Otilde: 'Õ',
+ Otimes: '⨷',
+ Oum: 'Ö',
+ Ouml: 'Ö',
+ OverBar: '‾',
+ OverBrace: '⏞',
+ OverBracket: '⎴',
+ OverParenthesis: '⏜',
+ PartialD: '∂',
+ Pcy: 'П',
+ Pfr: '𝔓',
+ Phi: 'Φ',
+ Pi: 'Π',
+ PlusMinus: '±',
+ Poincareplane: 'ℌ',
+ Popf: 'ℙ',
+ Pr: '⪻',
+ Precedes: '≺',
+ PrecedesEqual: '⪯',
+ PrecedesSlantEqual: '≼',
+ PrecedesTilde: '≾',
+ Prime: '″',
+ Product: '∏',
+ Proportion: '∷',
+ Proportional: '∝',
+ Pscr: '𝒫',
+ Psi: 'Ψ',
+ QUO: '"',
+ QUOT: '"',
+ Qfr: '𝔔',
+ Qopf: 'ℚ',
+ Qscr: '𝒬',
+ RBarr: '⤐',
+ RE: '®',
+ REG: '®',
+ Racute: 'Ŕ',
+ Rang: '⟫',
+ Rarr: '↠',
+ Rarrtl: '⤖',
+ Rcaron: 'Ř',
+ Rcedil: 'Ŗ',
+ Rcy: 'Р',
+ Re: 'ℜ',
+ ReverseElement: '∋',
+ ReverseEquilibrium: '⇋',
+ ReverseUpEquilibrium: '⥯',
+ Rfr: 'ℜ',
+ Rho: 'Ρ',
+ RightAngleBracket: '⟩',
+ RightArrow: '→',
+ RightArrowBar: '⇥',
+ RightArrowLeftArrow: '⇄',
+ RightCeiling: '⌉',
+ RightDoubleBracket: '⟧',
+ RightDownTeeVector: '⥝',
+ RightDownVector: '⇂',
+ RightDownVectorBar: '⥕',
+ RightFloor: '⌋',
+ RightTee: '⊢',
+ RightTeeArrow: '↦',
+ RightTeeVector: '⥛',
+ RightTriangle: '⊳',
+ RightTriangleBar: '⧐',
+ RightTriangleEqual: '⊵',
+ RightUpDownVector: '⥏',
+ RightUpTeeVector: '⥜',
+ RightUpVector: '↾',
+ RightUpVectorBar: '⥔',
+ RightVector: '⇀',
+ RightVectorBar: '⥓',
+ Rightarrow: '⇒',
+ Ropf: 'ℝ',
+ RoundImplies: '⥰',
+ Rrightarrow: '⇛',
+ Rscr: 'ℛ',
+ Rsh: '↱',
+ RuleDelayed: '⧴',
+ SHCHcy: 'Щ',
+ SHcy: 'Ш',
+ SOFTcy: 'Ь',
+ Sacute: 'Ś',
+ Sc: '⪼',
+ Scaron: 'Š',
+ Scedil: 'Ş',
+ Scirc: 'Ŝ',
+ Scy: 'С',
+ Sfr: '𝔖',
+ ShortDownArrow: '↓',
+ ShortLeftArrow: '←',
+ ShortRightArrow: '→',
+ ShortUpArrow: '↑',
+ Sigma: 'Σ',
+ SmallCircle: '∘',
+ Sopf: '𝕊',
+ Sqrt: '√',
+ Square: '□',
+ SquareIntersection: '⊓',
+ SquareSubset: '⊏',
+ SquareSubsetEqual: '⊑',
+ SquareSuperset: '⊐',
+ SquareSupersetEqual: '⊒',
+ SquareUnion: '⊔',
+ Sscr: '𝒮',
+ Star: '⋆',
+ Sub: '⋐',
+ Subset: '⋐',
+ SubsetEqual: '⊆',
+ Succeeds: '≻',
+ SucceedsEqual: '⪰',
+ SucceedsSlantEqual: '≽',
+ SucceedsTilde: '≿',
+ SuchThat: '∋',
+ Sum: '∑',
+ Sup: '⋑',
+ Superset: '⊃',
+ SupersetEqual: '⊇',
+ Supset: '⋑',
+ THOR: 'Þ',
+ THORN: 'Þ',
+ TRADE: '™',
+ TSHcy: 'Ћ',
+ TScy: 'Ц',
+ Tab: '\t',
+ Tau: 'Τ',
+ Tcaron: 'Ť',
+ Tcedil: 'Ţ',
+ Tcy: 'Т',
+ Tfr: '𝔗',
+ Therefore: '∴',
+ Theta: 'Θ',
+ ThickSpace: ' ',
+ ThinSpace: ' ',
+ Tilde: '∼',
+ TildeEqual: '≃',
+ TildeFullEqual: '≅',
+ TildeTilde: '≈',
+ Topf: '𝕋',
+ TripleDot: '⃛',
+ Tscr: '𝒯',
+ Tstrok: 'Ŧ',
+ Uacut: 'Ú',
+ Uacute: 'Ú',
+ Uarr: '↟',
+ Uarrocir: '⥉',
+ Ubrcy: 'Ў',
+ Ubreve: 'Ŭ',
+ Ucir: 'Û',
+ Ucirc: 'Û',
+ Ucy: 'У',
+ Udblac: 'Ű',
+ Ufr: '𝔘',
+ Ugrav: 'Ù',
+ Ugrave: 'Ù',
+ Umacr: 'Ū',
+ UnderBar: '_',
+ UnderBrace: '⏟',
+ UnderBracket: '⎵',
+ UnderParenthesis: '⏝',
+ Union: '⋃',
+ UnionPlus: '⊎',
+ Uogon: 'Ų',
+ Uopf: '𝕌',
+ UpArrow: '↑',
+ UpArrowBar: '⤒',
+ UpArrowDownArrow: '⇅',
+ UpDownArrow: '↕',
+ UpEquilibrium: '⥮',
+ UpTee: '⊥',
+ UpTeeArrow: '↥',
+ Uparrow: '⇑',
+ Updownarrow: '⇕',
+ UpperLeftArrow: '↖',
+ UpperRightArrow: '↗',
+ Upsi: 'ϒ',
+ Upsilon: 'Υ',
+ Uring: 'Ů',
+ Uscr: '𝒰',
+ Utilde: 'Ũ',
+ Uum: 'Ü',
+ Uuml: 'Ü',
+ VDash: '⊫',
+ Vbar: '⫫',
+ Vcy: 'В',
+ Vdash: '⊩',
+ Vdashl: '⫦',
+ Vee: '⋁',
+ Verbar: '‖',
+ Vert: '‖',
+ VerticalBar: '∣',
+ VerticalLine: '|',
+ VerticalSeparator: '❘',
+ VerticalTilde: '≀',
+ VeryThinSpace: ' ',
+ Vfr: '𝔙',
+ Vopf: '𝕍',
+ Vscr: '𝒱',
+ Vvdash: '⊪',
+ Wcirc: 'Ŵ',
+ Wedge: '⋀',
+ Wfr: '𝔚',
+ Wopf: '𝕎',
+ Wscr: '𝒲',
+ Xfr: '𝔛',
+ Xi: 'Ξ',
+ Xopf: '𝕏',
+ Xscr: '𝒳',
+ YAcy: 'Я',
+ YIcy: 'Ї',
+ YUcy: 'Ю',
+ Yacut: 'Ý',
+ Yacute: 'Ý',
+ Ycirc: 'Ŷ',
+ Ycy: 'Ы',
+ Yfr: '𝔜',
+ Yopf: '𝕐',
+ Yscr: '𝒴',
+ Yuml: 'Ÿ',
+ ZHcy: 'Ж',
+ Zacute: 'Ź',
+ Zcaron: 'Ž',
+ Zcy: 'З',
+ Zdot: 'Ż',
+ ZeroWidthSpace: '',
+ Zeta: 'Ζ',
+ Zfr: 'ℨ',
+ Zopf: 'ℤ',
+ Zscr: '𝒵',
+ aacut: 'á',
+ aacute: 'á',
+ abreve: 'ă',
+ ac: '∾',
+ acE: '∾̳',
+ acd: '∿',
+ acir: 'â',
+ acirc: 'â',
+ acut: '´',
+ acute: '´',
+ acy: 'а',
+ aeli: 'æ',
+ aelig: 'æ',
+ af: '',
+ afr: '𝔞',
+ agrav: 'à',
+ agrave: 'à',
+ alefsym: 'ℵ',
+ aleph: 'ℵ',
+ alpha: 'α',
+ amacr: 'ā',
+ amalg: '⨿',
+ am: '&',
+ amp: '&',
+ and: '∧',
+ andand: '⩕',
+ andd: '⩜',
+ andslope: '⩘',
+ andv: '⩚',
+ ang: '∠',
+ ange: '⦤',
+ angle: '∠',
+ angmsd: '∡',
+ angmsdaa: '⦨',
+ angmsdab: '⦩',
+ angmsdac: '⦪',
+ angmsdad: '⦫',
+ angmsdae: '⦬',
+ angmsdaf: '⦭',
+ angmsdag: '⦮',
+ angmsdah: '⦯',
+ angrt: '∟',
+ angrtvb: '⊾',
+ angrtvbd: '⦝',
+ angsph: '∢',
+ angst: 'Å',
+ angzarr: '⍼',
+ aogon: 'ą',
+ aopf: '𝕒',
+ ap: '≈',
+ apE: '⩰',
+ apacir: '⩯',
+ ape: '≊',
+ apid: '≋',
+ apos: "'",
+ approx: '≈',
+ approxeq: '≊',
+ arin: 'å',
+ aring: 'å',
+ ascr: '𝒶',
+ ast: '*',
+ asymp: '≈',
+ asympeq: '≍',
+ atild: 'ã',
+ atilde: 'ã',
+ aum: 'ä',
+ auml: 'ä',
+ awconint: '∳',
+ awint: '⨑',
+ bNot: '⫭',
+ backcong: '≌',
+ backepsilon: '϶',
+ backprime: '‵',
+ backsim: '∽',
+ backsimeq: '⋍',
+ barvee: '⊽',
+ barwed: '⌅',
+ barwedge: '⌅',
+ bbrk: '⎵',
+ bbrktbrk: '⎶',
+ bcong: '≌',
+ bcy: 'б',
+ bdquo: '„',
+ becaus: '∵',
+ because: '∵',
+ bemptyv: '⦰',
+ bepsi: '϶',
+ bernou: 'ℬ',
+ beta: 'β',
+ beth: 'ℶ',
+ between: '≬',
+ bfr: '𝔟',
+ bigcap: '⋂',
+ bigcirc: '◯',
+ bigcup: '⋃',
+ bigodot: '⨀',
+ bigoplus: '⨁',
+ bigotimes: '⨂',
+ bigsqcup: '⨆',
+ bigstar: '★',
+ bigtriangledown: '▽',
+ bigtriangleup: '△',
+ biguplus: '⨄',
+ bigvee: '⋁',
+ bigwedge: '⋀',
+ bkarow: '⤍',
+ blacklozenge: '⧫',
+ blacksquare: '▪',
+ blacktriangle: '▴',
+ blacktriangledown: '▾',
+ blacktriangleleft: '◂',
+ blacktriangleright: '▸',
+ blank: '␣',
+ blk12: '▒',
+ blk14: '░',
+ blk34: '▓',
+ block: '█',
+ bne: '=⃥',
+ bnequiv: '≡⃥',
+ bnot: '⌐',
+ bopf: '𝕓',
+ bot: '⊥',
+ bottom: '⊥',
+ bowtie: '⋈',
+ boxDL: '╗',
+ boxDR: '╔',
+ boxDl: '╖',
+ boxDr: '╓',
+ boxH: '═',
+ boxHD: '╦',
+ boxHU: '╩',
+ boxHd: '╤',
+ boxHu: '╧',
+ boxUL: '╝',
+ boxUR: '╚',
+ boxUl: '╜',
+ boxUr: '╙',
+ boxV: '║',
+ boxVH: '╬',
+ boxVL: '╣',
+ boxVR: '╠',
+ boxVh: '╫',
+ boxVl: '╢',
+ boxVr: '╟',
+ boxbox: '⧉',
+ boxdL: '╕',
+ boxdR: '╒',
+ boxdl: '┐',
+ boxdr: '┌',
+ boxh: '─',
+ boxhD: '╥',
+ boxhU: '╨',
+ boxhd: '┬',
+ boxhu: '┴',
+ boxminus: '⊟',
+ boxplus: '⊞',
+ boxtimes: '⊠',
+ boxuL: '╛',
+ boxuR: '╘',
+ boxul: '┘',
+ boxur: '└',
+ boxv: '│',
+ boxvH: '╪',
+ boxvL: '╡',
+ boxvR: '╞',
+ boxvh: '┼',
+ boxvl: '┤',
+ boxvr: '├',
+ bprime: '‵',
+ breve: '˘',
+ brvba: '¦',
+ brvbar: '¦',
+ bscr: '𝒷',
+ bsemi: '⁏',
+ bsim: '∽',
+ bsime: '⋍',
+ bsol: '\\',
+ bsolb: '⧅',
+ bsolhsub: '⟈',
+ bull: '•',
+ bullet: '•',
+ bump: '≎',
+ bumpE: '⪮',
+ bumpe: '≏',
+ bumpeq: '≏',
+ cacute: 'ć',
+ cap: '∩',
+ capand: '⩄',
+ capbrcup: '⩉',
+ capcap: '⩋',
+ capcup: '⩇',
+ capdot: '⩀',
+ caps: '∩︀',
+ caret: '⁁',
+ caron: 'ˇ',
+ ccaps: '⩍',
+ ccaron: 'č',
+ ccedi: 'ç',
+ ccedil: 'ç',
+ ccirc: 'ĉ',
+ ccups: '⩌',
+ ccupssm: '⩐',
+ cdot: 'ċ',
+ cedi: '¸',
+ cedil: '¸',
+ cemptyv: '⦲',
+ cen: '¢',
+ cent: '¢',
+ centerdot: '·',
+ cfr: '𝔠',
+ chcy: 'ч',
+ check: '✓',
+ checkmark: '✓',
+ chi: 'χ',
+ cir: '○',
+ cirE: '⧃',
+ circ: 'ˆ',
+ circeq: '≗',
+ circlearrowleft: '↺',
+ circlearrowright: '↻',
+ circledR: '®',
+ circledS: 'Ⓢ',
+ circledast: '⊛',
+ circledcirc: '⊚',
+ circleddash: '⊝',
+ cire: '≗',
+ cirfnint: '⨐',
+ cirmid: '⫯',
+ cirscir: '⧂',
+ clubs: '♣',
+ clubsuit: '♣',
+ colon: ':',
+ colone: '≔',
+ coloneq: '≔',
+ comma: ',',
+ commat: '@',
+ comp: '∁',
+ compfn: '∘',
+ complement: '∁',
+ complexes: 'ℂ',
+ cong: '≅',
+ congdot: '⩭',
+ conint: '∮',
+ copf: '𝕔',
+ coprod: '∐',
+ cop: '©',
+ copy: '©',
+ copysr: '℗',
+ crarr: '↵',
+ cross: '✗',
+ cscr: '𝒸',
+ csub: '⫏',
+ csube: '⫑',
+ csup: '⫐',
+ csupe: '⫒',
+ ctdot: '⋯',
+ cudarrl: '⤸',
+ cudarrr: '⤵',
+ cuepr: '⋞',
+ cuesc: '⋟',
+ cularr: '↶',
+ cularrp: '⤽',
+ cup: '∪',
+ cupbrcap: '⩈',
+ cupcap: '⩆',
+ cupcup: '⩊',
+ cupdot: '⊍',
+ cupor: '⩅',
+ cups: '∪︀',
+ curarr: '↷',
+ curarrm: '⤼',
+ curlyeqprec: '⋞',
+ curlyeqsucc: '⋟',
+ curlyvee: '⋎',
+ curlywedge: '⋏',
+ curre: '¤',
+ curren: '¤',
+ curvearrowleft: '↶',
+ curvearrowright: '↷',
+ cuvee: '⋎',
+ cuwed: '⋏',
+ cwconint: '∲',
+ cwint: '∱',
+ cylcty: '⌭',
+ dArr: '⇓',
+ dHar: '⥥',
+ dagger: '†',
+ daleth: 'ℸ',
+ darr: '↓',
+ dash: '‐',
+ dashv: '⊣',
+ dbkarow: '⤏',
+ dblac: '˝',
+ dcaron: 'ď',
+ dcy: 'д',
+ dd: 'ⅆ',
+ ddagger: '‡',
+ ddarr: '⇊',
+ ddotseq: '⩷',
+ de: '°',
+ deg: '°',
+ delta: 'δ',
+ demptyv: '⦱',
+ dfisht: '⥿',
+ dfr: '𝔡',
+ dharl: '⇃',
+ dharr: '⇂',
+ diam: '⋄',
+ diamond: '⋄',
+ diamondsuit: '♦',
+ diams: '♦',
+ die: '¨',
+ digamma: 'ϝ',
+ disin: '⋲',
+ div: '÷',
+ divid: '÷',
+ divide: '÷',
+ divideontimes: '⋇',
+ divonx: '⋇',
+ djcy: 'ђ',
+ dlcorn: '⌞',
+ dlcrop: '⌍',
+ dollar: '$',
+ dopf: '𝕕',
+ dot: '˙',
+ doteq: '≐',
+ doteqdot: '≑',
+ dotminus: '∸',
+ dotplus: '∔',
+ dotsquare: '⊡',
+ doublebarwedge: '⌆',
+ downarrow: '↓',
+ downdownarrows: '⇊',
+ downharpoonleft: '⇃',
+ downharpoonright: '⇂',
+ drbkarow: '⤐',
+ drcorn: '⌟',
+ drcrop: '⌌',
+ dscr: '𝒹',
+ dscy: 'ѕ',
+ dsol: '⧶',
+ dstrok: 'đ',
+ dtdot: '⋱',
+ dtri: '▿',
+ dtrif: '▾',
+ duarr: '⇵',
+ duhar: '⥯',
+ dwangle: '⦦',
+ dzcy: 'џ',
+ dzigrarr: '⟿',
+ eDDot: '⩷',
+ eDot: '≑',
+ eacut: 'é',
+ eacute: 'é',
+ easter: '⩮',
+ ecaron: 'ě',
+ ecir: 'ê',
+ ecirc: 'ê',
+ ecolon: '≕',
+ ecy: 'э',
+ edot: 'ė',
+ ee: 'ⅇ',
+ efDot: '≒',
+ efr: '𝔢',
+ eg: '⪚',
+ egrav: 'è',
+ egrave: 'è',
+ egs: '⪖',
+ egsdot: '⪘',
+ el: '⪙',
+ elinters: '⏧',
+ ell: 'ℓ',
+ els: '⪕',
+ elsdot: '⪗',
+ emacr: 'ē',
+ empty: '∅',
+ emptyset: '∅',
+ emptyv: '∅',
+ emsp13: ' ',
+ emsp14: ' ',
+ emsp: ' ',
+ eng: 'ŋ',
+ ensp: ' ',
+ eogon: 'ę',
+ eopf: '𝕖',
+ epar: '⋕',
+ eparsl: '⧣',
+ eplus: '⩱',
+ epsi: 'ε',
+ epsilon: 'ε',
+ epsiv: 'ϵ',
+ eqcirc: '≖',
+ eqcolon: '≕',
+ eqsim: '≂',
+ eqslantgtr: '⪖',
+ eqslantless: '⪕',
+ equals: '=',
+ equest: '≟',
+ equiv: '≡',
+ equivDD: '⩸',
+ eqvparsl: '⧥',
+ erDot: '≓',
+ erarr: '⥱',
+ escr: 'ℯ',
+ esdot: '≐',
+ esim: '≂',
+ eta: 'η',
+ et: 'ð',
+ eth: 'ð',
+ eum: 'ë',
+ euml: 'ë',
+ euro: '€',
+ excl: '!',
+ exist: '∃',
+ expectation: 'ℰ',
+ exponentiale: 'ⅇ',
+ fallingdotseq: '≒',
+ fcy: 'ф',
+ female: '♀',
+ ffilig: 'ffi',
+ fflig: 'ff',
+ ffllig: 'ffl',
+ ffr: '𝔣',
+ filig: 'fi',
+ fjlig: 'fj',
+ flat: '♭',
+ fllig: 'fl',
+ fltns: '▱',
+ fnof: 'ƒ',
+ fopf: '𝕗',
+ forall: '∀',
+ fork: '⋔',
+ forkv: '⫙',
+ fpartint: '⨍',
+ frac1: '¼',
+ frac12: '½',
+ frac13: '⅓',
+ frac14: '¼',
+ frac15: '⅕',
+ frac16: '⅙',
+ frac18: '⅛',
+ frac23: '⅔',
+ frac25: '⅖',
+ frac3: '¾',
+ frac34: '¾',
+ frac35: '⅗',
+ frac38: '⅜',
+ frac45: '⅘',
+ frac56: '⅚',
+ frac58: '⅝',
+ frac78: '⅞',
+ frasl: '⁄',
+ frown: '⌢',
+ fscr: '𝒻',
+ gE: '≧',
+ gEl: '⪌',
+ gacute: 'ǵ',
+ gamma: 'γ',
+ gammad: 'ϝ',
+ gap: '⪆',
+ gbreve: 'ğ',
+ gcirc: 'ĝ',
+ gcy: 'г',
+ gdot: 'ġ',
+ ge: '≥',
+ gel: '⋛',
+ geq: '≥',
+ geqq: '≧',
+ geqslant: '⩾',
+ ges: '⩾',
+ gescc: '⪩',
+ gesdot: '⪀',
+ gesdoto: '⪂',
+ gesdotol: '⪄',
+ gesl: '⋛︀',
+ gesles: '⪔',
+ gfr: '𝔤',
+ gg: '≫',
+ ggg: '⋙',
+ gimel: 'ℷ',
+ gjcy: 'ѓ',
+ gl: '≷',
+ glE: '⪒',
+ gla: '⪥',
+ glj: '⪤',
+ gnE: '≩',
+ gnap: '⪊',
+ gnapprox: '⪊',
+ gne: '⪈',
+ gneq: '⪈',
+ gneqq: '≩',
+ gnsim: '⋧',
+ gopf: '𝕘',
+ grave: '`',
+ gscr: 'ℊ',
+ gsim: '≳',
+ gsime: '⪎',
+ gsiml: '⪐',
+ g: '>',
+ gt: '>',
+ gtcc: '⪧',
+ gtcir: '⩺',
+ gtdot: '⋗',
+ gtlPar: '⦕',
+ gtquest: '⩼',
+ gtrapprox: '⪆',
+ gtrarr: '⥸',
+ gtrdot: '⋗',
+ gtreqless: '⋛',
+ gtreqqless: '⪌',
+ gtrless: '≷',
+ gtrsim: '≳',
+ gvertneqq: '≩︀',
+ gvnE: '≩︀',
+ hArr: '⇔',
+ hairsp: ' ',
+ half: '½',
+ hamilt: 'ℋ',
+ hardcy: 'ъ',
+ harr: '↔',
+ harrcir: '⥈',
+ harrw: '↭',
+ hbar: 'ℏ',
+ hcirc: 'ĥ',
+ hearts: '♥',
+ heartsuit: '♥',
+ hellip: '…',
+ hercon: '⊹',
+ hfr: '𝔥',
+ hksearow: '⤥',
+ hkswarow: '⤦',
+ hoarr: '⇿',
+ homtht: '∻',
+ hookleftarrow: '↩',
+ hookrightarrow: '↪',
+ hopf: '𝕙',
+ horbar: '―',
+ hscr: '𝒽',
+ hslash: 'ℏ',
+ hstrok: 'ħ',
+ hybull: '⁃',
+ hyphen: '‐',
+ iacut: 'í',
+ iacute: 'í',
+ ic: '',
+ icir: 'î',
+ icirc: 'î',
+ icy: 'и',
+ iecy: 'е',
+ iexc: '¡',
+ iexcl: '¡',
+ iff: '⇔',
+ ifr: '𝔦',
+ igrav: 'ì',
+ igrave: 'ì',
+ ii: 'ⅈ',
+ iiiint: '⨌',
+ iiint: '∭',
+ iinfin: '⧜',
+ iiota: '℩',
+ ijlig: 'ij',
+ imacr: 'ī',
+ image: 'ℑ',
+ imagline: 'ℐ',
+ imagpart: 'ℑ',
+ imath: 'ı',
+ imof: '⊷',
+ imped: 'Ƶ',
+ in: '∈',
+ incare: '℅',
+ infin: '∞',
+ infintie: '⧝',
+ inodot: 'ı',
+ int: '∫',
+ intcal: '⊺',
+ integers: 'ℤ',
+ intercal: '⊺',
+ intlarhk: '⨗',
+ intprod: '⨼',
+ iocy: 'ё',
+ iogon: 'į',
+ iopf: '𝕚',
+ iota: 'ι',
+ iprod: '⨼',
+ iques: '¿',
+ iquest: '¿',
+ iscr: '𝒾',
+ isin: '∈',
+ isinE: '⋹',
+ isindot: '⋵',
+ isins: '⋴',
+ isinsv: '⋳',
+ isinv: '∈',
+ it: '',
+ itilde: 'ĩ',
+ iukcy: 'і',
+ ium: 'ï',
+ iuml: 'ï',
+ jcirc: 'ĵ',
+ jcy: 'й',
+ jfr: '𝔧',
+ jmath: 'ȷ',
+ jopf: '𝕛',
+ jscr: '𝒿',
+ jsercy: 'ј',
+ jukcy: 'є',
+ kappa: 'κ',
+ kappav: 'ϰ',
+ kcedil: 'ķ',
+ kcy: 'к',
+ kfr: '𝔨',
+ kgreen: 'ĸ',
+ khcy: 'х',
+ kjcy: 'ќ',
+ kopf: '𝕜',
+ kscr: '𝓀',
+ lAarr: '⇚',
+ lArr: '⇐',
+ lAtail: '⤛',
+ lBarr: '⤎',
+ lE: '≦',
+ lEg: '⪋',
+ lHar: '⥢',
+ lacute: 'ĺ',
+ laemptyv: '⦴',
+ lagran: 'ℒ',
+ lambda: 'λ',
+ lang: '⟨',
+ langd: '⦑',
+ langle: '⟨',
+ lap: '⪅',
+ laqu: '«',
+ laquo: '«',
+ larr: '←',
+ larrb: '⇤',
+ larrbfs: '⤟',
+ larrfs: '⤝',
+ larrhk: '↩',
+ larrlp: '↫',
+ larrpl: '⤹',
+ larrsim: '⥳',
+ larrtl: '↢',
+ lat: '⪫',
+ latail: '⤙',
+ late: '⪭',
+ lates: '⪭︀',
+ lbarr: '⤌',
+ lbbrk: '❲',
+ lbrace: '{',
+ lbrack: '[',
+ lbrke: '⦋',
+ lbrksld: '⦏',
+ lbrkslu: '⦍',
+ lcaron: 'ľ',
+ lcedil: 'ļ',
+ lceil: '⌈',
+ lcub: '{',
+ lcy: 'л',
+ ldca: '⤶',
+ ldquo: '“',
+ ldquor: '„',
+ ldrdhar: '⥧',
+ ldrushar: '⥋',
+ ldsh: '↲',
+ le: '≤',
+ leftarrow: '←',
+ leftarrowtail: '↢',
+ leftharpoondown: '↽',
+ leftharpoonup: '↼',
+ leftleftarrows: '⇇',
+ leftrightarrow: '↔',
+ leftrightarrows: '⇆',
+ leftrightharpoons: '⇋',
+ leftrightsquigarrow: '↭',
+ leftthreetimes: '⋋',
+ leg: '⋚',
+ leq: '≤',
+ leqq: '≦',
+ leqslant: '⩽',
+ les: '⩽',
+ lescc: '⪨',
+ lesdot: '⩿',
+ lesdoto: '⪁',
+ lesdotor: '⪃',
+ lesg: '⋚︀',
+ lesges: '⪓',
+ lessapprox: '⪅',
+ lessdot: '⋖',
+ lesseqgtr: '⋚',
+ lesseqqgtr: '⪋',
+ lessgtr: '≶',
+ lesssim: '≲',
+ lfisht: '⥼',
+ lfloor: '⌊',
+ lfr: '𝔩',
+ lg: '≶',
+ lgE: '⪑',
+ lhard: '↽',
+ lharu: '↼',
+ lharul: '⥪',
+ lhblk: '▄',
+ ljcy: 'љ',
+ ll: '≪',
+ llarr: '⇇',
+ llcorner: '⌞',
+ llhard: '⥫',
+ lltri: '◺',
+ lmidot: 'ŀ',
+ lmoust: '⎰',
+ lmoustache: '⎰',
+ lnE: '≨',
+ lnap: '⪉',
+ lnapprox: '⪉',
+ lne: '⪇',
+ lneq: '⪇',
+ lneqq: '≨',
+ lnsim: '⋦',
+ loang: '⟬',
+ loarr: '⇽',
+ lobrk: '⟦',
+ longleftarrow: '⟵',
+ longleftrightarrow: '⟷',
+ longmapsto: '⟼',
+ longrightarrow: '⟶',
+ looparrowleft: '↫',
+ looparrowright: '↬',
+ lopar: '⦅',
+ lopf: '𝕝',
+ loplus: '⨭',
+ lotimes: '⨴',
+ lowast: '∗',
+ lowbar: '_',
+ loz: '◊',
+ lozenge: '◊',
+ lozf: '⧫',
+ lpar: '(',
+ lparlt: '⦓',
+ lrarr: '⇆',
+ lrcorner: '⌟',
+ lrhar: '⇋',
+ lrhard: '⥭',
+ lrm: '',
+ lrtri: '⊿',
+ lsaquo: '‹',
+ lscr: '𝓁',
+ lsh: '↰',
+ lsim: '≲',
+ lsime: '⪍',
+ lsimg: '⪏',
+ lsqb: '[',
+ lsquo: '‘',
+ lsquor: '‚',
+ lstrok: 'ł',
+ l: '<',
+ lt: '<',
+ ltcc: '⪦',
+ ltcir: '⩹',
+ ltdot: '⋖',
+ lthree: '⋋',
+ ltimes: '⋉',
+ ltlarr: '⥶',
+ ltquest: '⩻',
+ ltrPar: '⦖',
+ ltri: '◃',
+ ltrie: '⊴',
+ ltrif: '◂',
+ lurdshar: '⥊',
+ luruhar: '⥦',
+ lvertneqq: '≨︀',
+ lvnE: '≨︀',
+ mDDot: '∺',
+ mac: '¯',
+ macr: '¯',
+ male: '♂',
+ malt: '✠',
+ maltese: '✠',
+ map: '↦',
+ mapsto: '↦',
+ mapstodown: '↧',
+ mapstoleft: '↤',
+ mapstoup: '↥',
+ marker: '▮',
+ mcomma: '⨩',
+ mcy: 'м',
+ mdash: '—',
+ measuredangle: '∡',
+ mfr: '𝔪',
+ mho: '℧',
+ micr: 'µ',
+ micro: 'µ',
+ mid: '∣',
+ midast: '*',
+ midcir: '⫰',
+ middo: '·',
+ middot: '·',
+ minus: '−',
+ minusb: '⊟',
+ minusd: '∸',
+ minusdu: '⨪',
+ mlcp: '⫛',
+ mldr: '…',
+ mnplus: '∓',
+ models: '⊧',
+ mopf: '𝕞',
+ mp: '∓',
+ mscr: '𝓂',
+ mstpos: '∾',
+ mu: 'μ',
+ multimap: '⊸',
+ mumap: '⊸',
+ nGg: '⋙̸',
+ nGt: '≫⃒',
+ nGtv: '≫̸',
+ nLeftarrow: '⇍',
+ nLeftrightarrow: '⇎',
+ nLl: '⋘̸',
+ nLt: '≪⃒',
+ nLtv: '≪̸',
+ nRightarrow: '⇏',
+ nVDash: '⊯',
+ nVdash: '⊮',
+ nabla: '∇',
+ nacute: 'ń',
+ nang: '∠⃒',
+ nap: '≉',
+ napE: '⩰̸',
+ napid: '≋̸',
+ napos: 'ʼn',
+ napprox: '≉',
+ natur: '♮',
+ natural: '♮',
+ naturals: 'ℕ',
+ nbs: ' ',
+ nbsp: ' ',
+ nbump: '≎̸',
+ nbumpe: '≏̸',
+ ncap: '⩃',
+ ncaron: 'ň',
+ ncedil: 'ņ',
+ ncong: '≇',
+ ncongdot: '⩭̸',
+ ncup: '⩂',
+ ncy: 'н',
+ ndash: '–',
+ ne: '≠',
+ neArr: '⇗',
+ nearhk: '⤤',
+ nearr: '↗',
+ nearrow: '↗',
+ nedot: '≐̸',
+ nequiv: '≢',
+ nesear: '⤨',
+ nesim: '≂̸',
+ nexist: '∄',
+ nexists: '∄',
+ nfr: '𝔫',
+ ngE: '≧̸',
+ nge: '≱',
+ ngeq: '≱',
+ ngeqq: '≧̸',
+ ngeqslant: '⩾̸',
+ nges: '⩾̸',
+ ngsim: '≵',
+ ngt: '≯',
+ ngtr: '≯',
+ nhArr: '⇎',
+ nharr: '↮',
+ nhpar: '⫲',
+ ni: '∋',
+ nis: '⋼',
+ nisd: '⋺',
+ niv: '∋',
+ njcy: 'њ',
+ nlArr: '⇍',
+ nlE: '≦̸',
+ nlarr: '↚',
+ nldr: '‥',
+ nle: '≰',
+ nleftarrow: '↚',
+ nleftrightarrow: '↮',
+ nleq: '≰',
+ nleqq: '≦̸',
+ nleqslant: '⩽̸',
+ nles: '⩽̸',
+ nless: '≮',
+ nlsim: '≴',
+ nlt: '≮',
+ nltri: '⋪',
+ nltrie: '⋬',
+ nmid: '∤',
+ nopf: '𝕟',
+ no: '¬',
+ not: '¬',
+ notin: '∉',
+ notinE: '⋹̸',
+ notindot: '⋵̸',
+ notinva: '∉',
+ notinvb: '⋷',
+ notinvc: '⋶',
+ notni: '∌',
+ notniva: '∌',
+ notnivb: '⋾',
+ notnivc: '⋽',
+ npar: '∦',
+ nparallel: '∦',
+ nparsl: '⫽⃥',
+ npart: '∂̸',
+ npolint: '⨔',
+ npr: '⊀',
+ nprcue: '⋠',
+ npre: '⪯̸',
+ nprec: '⊀',
+ npreceq: '⪯̸',
+ nrArr: '⇏',
+ nrarr: '↛',
+ nrarrc: '⤳̸',
+ nrarrw: '↝̸',
+ nrightarrow: '↛',
+ nrtri: '⋫',
+ nrtrie: '⋭',
+ nsc: '⊁',
+ nsccue: '⋡',
+ nsce: '⪰̸',
+ nscr: '𝓃',
+ nshortmid: '∤',
+ nshortparallel: '∦',
+ nsim: '≁',
+ nsime: '≄',
+ nsimeq: '≄',
+ nsmid: '∤',
+ nspar: '∦',
+ nsqsube: '⋢',
+ nsqsupe: '⋣',
+ nsub: '⊄',
+ nsubE: '⫅̸',
+ nsube: '⊈',
+ nsubset: '⊂⃒',
+ nsubseteq: '⊈',
+ nsubseteqq: '⫅̸',
+ nsucc: '⊁',
+ nsucceq: '⪰̸',
+ nsup: '⊅',
+ nsupE: '⫆̸',
+ nsupe: '⊉',
+ nsupset: '⊃⃒',
+ nsupseteq: '⊉',
+ nsupseteqq: '⫆̸',
+ ntgl: '≹',
+ ntild: 'ñ',
+ ntilde: 'ñ',
+ ntlg: '≸',
+ ntriangleleft: '⋪',
+ ntrianglelefteq: '⋬',
+ ntriangleright: '⋫',
+ ntrianglerighteq: '⋭',
+ nu: 'ν',
+ num: '#',
+ numero: '№',
+ numsp: ' ',
+ nvDash: '⊭',
+ nvHarr: '⤄',
+ nvap: '≍⃒',
+ nvdash: '⊬',
+ nvge: '≥⃒',
+ nvgt: '>⃒',
+ nvinfin: '⧞',
+ nvlArr: '⤂',
+ nvle: '≤⃒',
+ nvlt: '<⃒',
+ nvltrie: '⊴⃒',
+ nvrArr: '⤃',
+ nvrtrie: '⊵⃒',
+ nvsim: '∼⃒',
+ nwArr: '⇖',
+ nwarhk: '⤣',
+ nwarr: '↖',
+ nwarrow: '↖',
+ nwnear: '⤧',
+ oS: 'Ⓢ',
+ oacut: 'ó',
+ oacute: 'ó',
+ oast: '⊛',
+ ocir: 'ô',
+ ocirc: 'ô',
+ ocy: 'о',
+ odash: '⊝',
+ odblac: 'ő',
+ odiv: '⨸',
+ odot: '⊙',
+ odsold: '⦼',
+ oelig: 'œ',
+ ofcir: '⦿',
+ ofr: '𝔬',
+ ogon: '˛',
+ ograv: 'ò',
+ ograve: 'ò',
+ ogt: '⧁',
+ ohbar: '⦵',
+ ohm: 'Ω',
+ oint: '∮',
+ olarr: '↺',
+ olcir: '⦾',
+ olcross: '⦻',
+ oline: '‾',
+ olt: '⧀',
+ omacr: 'ō',
+ omega: 'ω',
+ omicron: 'ο',
+ omid: '⦶',
+ ominus: '⊖',
+ oopf: '𝕠',
+ opar: '⦷',
+ operp: '⦹',
+ oplus: '⊕',
+ or: '∨',
+ orarr: '↻',
+ ord: 'º',
+ order: 'ℴ',
+ orderof: 'ℴ',
+ ordf: 'ª',
+ ordm: 'º',
+ origof: '⊶',
+ oror: '⩖',
+ orslope: '⩗',
+ orv: '⩛',
+ oscr: 'ℴ',
+ oslas: 'ø',
+ oslash: 'ø',
+ osol: '⊘',
+ otild: 'õ',
+ otilde: 'õ',
+ otimes: '⊗',
+ otimesas: '⨶',
+ oum: 'ö',
+ ouml: 'ö',
+ ovbar: '⌽',
+ par: '¶',
+ para: '¶',
+ parallel: '∥',
+ parsim: '⫳',
+ parsl: '⫽',
+ part: '∂',
+ pcy: 'п',
+ percnt: '%',
+ period: '.',
+ permil: '‰',
+ perp: '⊥',
+ pertenk: '‱',
+ pfr: '𝔭',
+ phi: 'φ',
+ phiv: 'ϕ',
+ phmmat: 'ℳ',
+ phone: '☎',
+ pi: 'π',
+ pitchfork: '⋔',
+ piv: 'ϖ',
+ planck: 'ℏ',
+ planckh: 'ℎ',
+ plankv: 'ℏ',
+ plus: '+',
+ plusacir: '⨣',
+ plusb: '⊞',
+ pluscir: '⨢',
+ plusdo: '∔',
+ plusdu: '⨥',
+ pluse: '⩲',
+ plusm: '±',
+ plusmn: '±',
+ plussim: '⨦',
+ plustwo: '⨧',
+ pm: '±',
+ pointint: '⨕',
+ popf: '𝕡',
+ poun: '£',
+ pound: '£',
+ pr: '≺',
+ prE: '⪳',
+ prap: '⪷',
+ prcue: '≼',
+ pre: '⪯',
+ prec: '≺',
+ precapprox: '⪷',
+ preccurlyeq: '≼',
+ preceq: '⪯',
+ precnapprox: '⪹',
+ precneqq: '⪵',
+ precnsim: '⋨',
+ precsim: '≾',
+ prime: '′',
+ primes: 'ℙ',
+ prnE: '⪵',
+ prnap: '⪹',
+ prnsim: '⋨',
+ prod: '∏',
+ profalar: '⌮',
+ profline: '⌒',
+ profsurf: '⌓',
+ prop: '∝',
+ propto: '∝',
+ prsim: '≾',
+ prurel: '⊰',
+ pscr: '𝓅',
+ psi: 'ψ',
+ puncsp: ' ',
+ qfr: '𝔮',
+ qint: '⨌',
+ qopf: '𝕢',
+ qprime: '⁗',
+ qscr: '𝓆',
+ quaternions: 'ℍ',
+ quatint: '⨖',
+ quest: '?',
+ questeq: '≟',
+ quo: '"',
+ quot: '"',
+ rAarr: '⇛',
+ rArr: '⇒',
+ rAtail: '⤜',
+ rBarr: '⤏',
+ rHar: '⥤',
+ race: '∽̱',
+ racute: 'ŕ',
+ radic: '√',
+ raemptyv: '⦳',
+ rang: '⟩',
+ rangd: '⦒',
+ range: '⦥',
+ rangle: '⟩',
+ raqu: '»',
+ raquo: '»',
+ rarr: '→',
+ rarrap: '⥵',
+ rarrb: '⇥',
+ rarrbfs: '⤠',
+ rarrc: '⤳',
+ rarrfs: '⤞',
+ rarrhk: '↪',
+ rarrlp: '↬',
+ rarrpl: '⥅',
+ rarrsim: '⥴',
+ rarrtl: '↣',
+ rarrw: '↝',
+ ratail: '⤚',
+ ratio: '∶',
+ rationals: 'ℚ',
+ rbarr: '⤍',
+ rbbrk: '❳',
+ rbrace: '}',
+ rbrack: ']',
+ rbrke: '⦌',
+ rbrksld: '⦎',
+ rbrkslu: '⦐',
+ rcaron: 'ř',
+ rcedil: 'ŗ',
+ rceil: '⌉',
+ rcub: '}',
+ rcy: 'р',
+ rdca: '⤷',
+ rdldhar: '⥩',
+ rdquo: '”',
+ rdquor: '”',
+ rdsh: '↳',
+ real: 'ℜ',
+ realine: 'ℛ',
+ realpart: 'ℜ',
+ reals: 'ℝ',
+ rect: '▭',
+ re: '®',
+ reg: '®',
+ rfisht: '⥽',
+ rfloor: '⌋',
+ rfr: '𝔯',
+ rhard: '⇁',
+ rharu: '⇀',
+ rharul: '⥬',
+ rho: 'ρ',
+ rhov: 'ϱ',
+ rightarrow: '→',
+ rightarrowtail: '↣',
+ rightharpoondown: '⇁',
+ rightharpoonup: '⇀',
+ rightleftarrows: '⇄',
+ rightleftharpoons: '⇌',
+ rightrightarrows: '⇉',
+ rightsquigarrow: '↝',
+ rightthreetimes: '⋌',
+ ring: '˚',
+ risingdotseq: '≓',
+ rlarr: '⇄',
+ rlhar: '⇌',
+ rlm: '',
+ rmoust: '⎱',
+ rmoustache: '⎱',
+ rnmid: '⫮',
+ roang: '⟭',
+ roarr: '⇾',
+ robrk: '⟧',
+ ropar: '⦆',
+ ropf: '𝕣',
+ roplus: '⨮',
+ rotimes: '⨵',
+ rpar: ')',
+ rpargt: '⦔',
+ rppolint: '⨒',
+ rrarr: '⇉',
+ rsaquo: '›',
+ rscr: '𝓇',
+ rsh: '↱',
+ rsqb: ']',
+ rsquo: '’',
+ rsquor: '’',
+ rthree: '⋌',
+ rtimes: '⋊',
+ rtri: '▹',
+ rtrie: '⊵',
+ rtrif: '▸',
+ rtriltri: '⧎',
+ ruluhar: '⥨',
+ rx: '℞',
+ sacute: 'ś',
+ sbquo: '‚',
+ sc: '≻',
+ scE: '⪴',
+ scap: '⪸',
+ scaron: 'š',
+ sccue: '≽',
+ sce: '⪰',
+ scedil: 'ş',
+ scirc: 'ŝ',
+ scnE: '⪶',
+ scnap: '⪺',
+ scnsim: '⋩',
+ scpolint: '⨓',
+ scsim: '≿',
+ scy: 'с',
+ sdot: '⋅',
+ sdotb: '⊡',
+ sdote: '⩦',
+ seArr: '⇘',
+ searhk: '⤥',
+ searr: '↘',
+ searrow: '↘',
+ sec: '§',
+ sect: '§',
+ semi: ';',
+ seswar: '⤩',
+ setminus: '∖',
+ setmn: '∖',
+ sext: '✶',
+ sfr: '𝔰',
+ sfrown: '⌢',
+ sharp: '♯',
+ shchcy: 'щ',
+ shcy: 'ш',
+ shortmid: '∣',
+ shortparallel: '∥',
+ sh: '',
+ shy: '',
+ sigma: 'σ',
+ sigmaf: 'ς',
+ sigmav: 'ς',
+ sim: '∼',
+ simdot: '⩪',
+ sime: '≃',
+ simeq: '≃',
+ simg: '⪞',
+ simgE: '⪠',
+ siml: '⪝',
+ simlE: '⪟',
+ simne: '≆',
+ simplus: '⨤',
+ simrarr: '⥲',
+ slarr: '←',
+ smallsetminus: '∖',
+ smashp: '⨳',
+ smeparsl: '⧤',
+ smid: '∣',
+ smile: '⌣',
+ smt: '⪪',
+ smte: '⪬',
+ smtes: '⪬︀',
+ softcy: 'ь',
+ sol: '/',
+ solb: '⧄',
+ solbar: '⌿',
+ sopf: '𝕤',
+ spades: '♠',
+ spadesuit: '♠',
+ spar: '∥',
+ sqcap: '⊓',
+ sqcaps: '⊓︀',
+ sqcup: '⊔',
+ sqcups: '⊔︀',
+ sqsub: '⊏',
+ sqsube: '⊑',
+ sqsubset: '⊏',
+ sqsubseteq: '⊑',
+ sqsup: '⊐',
+ sqsupe: '⊒',
+ sqsupset: '⊐',
+ sqsupseteq: '⊒',
+ squ: '□',
+ square: '□',
+ squarf: '▪',
+ squf: '▪',
+ srarr: '→',
+ sscr: '𝓈',
+ ssetmn: '∖',
+ ssmile: '⌣',
+ sstarf: '⋆',
+ star: '☆',
+ starf: '★',
+ straightepsilon: 'ϵ',
+ straightphi: 'ϕ',
+ strns: '¯',
+ sub: '⊂',
+ subE: '⫅',
+ subdot: '⪽',
+ sube: '⊆',
+ subedot: '⫃',
+ submult: '⫁',
+ subnE: '⫋',
+ subne: '⊊',
+ subplus: '⪿',
+ subrarr: '⥹',
+ subset: '⊂',
+ subseteq: '⊆',
+ subseteqq: '⫅',
+ subsetneq: '⊊',
+ subsetneqq: '⫋',
+ subsim: '⫇',
+ subsub: '⫕',
+ subsup: '⫓',
+ succ: '≻',
+ succapprox: '⪸',
+ succcurlyeq: '≽',
+ succeq: '⪰',
+ succnapprox: '⪺',
+ succneqq: '⪶',
+ succnsim: '⋩',
+ succsim: '≿',
+ sum: '∑',
+ sung: '♪',
+ sup: '⊃',
+ sup1: '¹',
+ sup2: '²',
+ sup3: '³',
+ supE: '⫆',
+ supdot: '⪾',
+ supdsub: '⫘',
+ supe: '⊇',
+ supedot: '⫄',
+ suphsol: '⟉',
+ suphsub: '⫗',
+ suplarr: '⥻',
+ supmult: '⫂',
+ supnE: '⫌',
+ supne: '⊋',
+ supplus: '⫀',
+ supset: '⊃',
+ supseteq: '⊇',
+ supseteqq: '⫆',
+ supsetneq: '⊋',
+ supsetneqq: '⫌',
+ supsim: '⫈',
+ supsub: '⫔',
+ supsup: '⫖',
+ swArr: '⇙',
+ swarhk: '⤦',
+ swarr: '↙',
+ swarrow: '↙',
+ swnwar: '⤪',
+ szli: 'ß',
+ szlig: 'ß',
+ target: '⌖',
+ tau: 'τ',
+ tbrk: '⎴',
+ tcaron: 'ť',
+ tcedil: 'ţ',
+ tcy: 'т',
+ tdot: '⃛',
+ telrec: '⌕',
+ tfr: '𝔱',
+ there4: '∴',
+ therefore: '∴',
+ theta: 'θ',
+ thetasym: 'ϑ',
+ thetav: 'ϑ',
+ thickapprox: '≈',
+ thicksim: '∼',
+ thinsp: ' ',
+ thkap: '≈',
+ thksim: '∼',
+ thor: 'þ',
+ thorn: 'þ',
+ tilde: '˜',
+ time: '×',
+ times: '×',
+ timesb: '⊠',
+ timesbar: '⨱',
+ timesd: '⨰',
+ tint: '∭',
+ toea: '⤨',
+ top: '⊤',
+ topbot: '⌶',
+ topcir: '⫱',
+ topf: '𝕥',
+ topfork: '⫚',
+ tosa: '⤩',
+ tprime: '‴',
+ trade: '™',
+ triangle: '▵',
+ triangledown: '▿',
+ triangleleft: '◃',
+ trianglelefteq: '⊴',
+ triangleq: '≜',
+ triangleright: '▹',
+ trianglerighteq: '⊵',
+ tridot: '◬',
+ trie: '≜',
+ triminus: '⨺',
+ triplus: '⨹',
+ trisb: '⧍',
+ tritime: '⨻',
+ trpezium: '⏢',
+ tscr: '𝓉',
+ tscy: 'ц',
+ tshcy: 'ћ',
+ tstrok: 'ŧ',
+ twixt: '≬',
+ twoheadleftarrow: '↞',
+ twoheadrightarrow: '↠',
+ uArr: '⇑',
+ uHar: '⥣',
+ uacut: 'ú',
+ uacute: 'ú',
+ uarr: '↑',
+ ubrcy: 'ў',
+ ubreve: 'ŭ',
+ ucir: 'û',
+ ucirc: 'û',
+ ucy: 'у',
+ udarr: '⇅',
+ udblac: 'ű',
+ udhar: '⥮',
+ ufisht: '⥾',
+ ufr: '𝔲',
+ ugrav: 'ù',
+ ugrave: 'ù',
+ uharl: '↿',
+ uharr: '↾',
+ uhblk: '▀',
+ ulcorn: '⌜',
+ ulcorner: '⌜',
+ ulcrop: '⌏',
+ ultri: '◸',
+ umacr: 'ū',
+ um: '¨',
+ uml: '¨',
+ uogon: 'ų',
+ uopf: '𝕦',
+ uparrow: '↑',
+ updownarrow: '↕',
+ upharpoonleft: '↿',
+ upharpoonright: '↾',
+ uplus: '⊎',
+ upsi: 'υ',
+ upsih: 'ϒ',
+ upsilon: 'υ',
+ upuparrows: '⇈',
+ urcorn: '⌝',
+ urcorner: '⌝',
+ urcrop: '⌎',
+ uring: 'ů',
+ urtri: '◹',
+ uscr: '𝓊',
+ utdot: '⋰',
+ utilde: 'ũ',
+ utri: '▵',
+ utrif: '▴',
+ uuarr: '⇈',
+ uum: 'ü',
+ uuml: 'ü',
+ uwangle: '⦧',
+ vArr: '⇕',
+ vBar: '⫨',
+ vBarv: '⫩',
+ vDash: '⊨',
+ vangrt: '⦜',
+ varepsilon: 'ϵ',
+ varkappa: 'ϰ',
+ varnothing: '∅',
+ varphi: 'ϕ',
+ varpi: 'ϖ',
+ varpropto: '∝',
+ varr: '↕',
+ varrho: 'ϱ',
+ varsigma: 'ς',
+ varsubsetneq: '⊊︀',
+ varsubsetneqq: '⫋︀',
+ varsupsetneq: '⊋︀',
+ varsupsetneqq: '⫌︀',
+ vartheta: 'ϑ',
+ vartriangleleft: '⊲',
+ vartriangleright: '⊳',
+ vcy: 'в',
+ vdash: '⊢',
+ vee: '∨',
+ veebar: '⊻',
+ veeeq: '≚',
+ vellip: '⋮',
+ verbar: '|',
+ vert: '|',
+ vfr: '𝔳',
+ vltri: '⊲',
+ vnsub: '⊂⃒',
+ vnsup: '⊃⃒',
+ vopf: '𝕧',
+ vprop: '∝',
+ vrtri: '⊳',
+ vscr: '𝓋',
+ vsubnE: '⫋︀',
+ vsubne: '⊊︀',
+ vsupnE: '⫌︀',
+ vsupne: '⊋︀',
+ vzigzag: '⦚',
+ wcirc: 'ŵ',
+ wedbar: '⩟',
+ wedge: '∧',
+ wedgeq: '≙',
+ weierp: '℘',
+ wfr: '𝔴',
+ wopf: '𝕨',
+ wp: '℘',
+ wr: '≀',
+ wreath: '≀',
+ wscr: '𝓌',
+ xcap: '⋂',
+ xcirc: '◯',
+ xcup: '⋃',
+ xdtri: '▽',
+ xfr: '𝔵',
+ xhArr: '⟺',
+ xharr: '⟷',
+ xi: 'ξ',
+ xlArr: '⟸',
+ xlarr: '⟵',
+ xmap: '⟼',
+ xnis: '⋻',
+ xodot: '⨀',
+ xopf: '𝕩',
+ xoplus: '⨁',
+ xotime: '⨂',
+ xrArr: '⟹',
+ xrarr: '⟶',
+ xscr: '𝓍',
+ xsqcup: '⨆',
+ xuplus: '⨄',
+ xutri: '△',
+ xvee: '⋁',
+ xwedge: '⋀',
+ yacut: 'ý',
+ yacute: 'ý',
+ yacy: 'я',
+ ycirc: 'ŷ',
+ ycy: 'ы',
+ ye: '¥',
+ yen: '¥',
+ yfr: '𝔶',
+ yicy: 'ї',
+ yopf: '𝕪',
+ yscr: '𝓎',
+ yucy: 'ю',
+ yum: 'ÿ',
+ yuml: 'ÿ',
+ zacute: 'ź',
+ zcaron: 'ž',
+ zcy: 'з',
+ zdot: 'ż',
+ zeetrf: 'ℨ',
+ zeta: 'ζ',
+ zfr: '𝔷',
+ zhcy: 'ж',
+ zigrarr: '⇝',
+ zopf: '𝕫',
+ zscr: '𝓏',
+ zwj: '',
+ zwnj: ''
}
-function commitHookEffectListMount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
- do {
- if ((effect.tag & tag) === tag) {
- // Mount
- var create = effect.create;
- effect.destroy = create();
+/***/ }),
- {
- var destroy = effect.destroy;
+/***/ "./node_modules/react-markdown/node_modules/comma-separated-tokens/index.js":
+/*!**********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/comma-separated-tokens/index.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (destroy !== undefined && typeof destroy !== 'function') {
- var addendum = void 0;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "parse": () => (/* binding */ parse),
+/* harmony export */ "stringify": () => (/* binding */ stringify)
+/* harmony export */ });
+/**
+ * @typedef {Object} StringifyOptions
+ * @property {boolean} [padLeft=true] Whether to pad a space before a token (`boolean`, default: `true`).
+ * @property {boolean} [padRight=false] Whether to pad a space after a token (`boolean`, default: `false`).
+ */
- if (destroy === null) {
- addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
- } else if (typeof destroy.then === 'function') {
- addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
- } else {
- addendum = ' You returned: ' + destroy;
- }
+/**
+ * Parse comma separated tokens to an array.
+ *
+ * @param {string} value
+ * @returns {Array.}
+ */
+function parse(value) {
+ /** @type {Array.} */
+ var tokens = []
+ var input = String(value || '')
+ var index = input.indexOf(',')
+ var start = 0
+ /** @type {boolean} */
+ var end
+ /** @type {string} */
+ var token
- error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
- }
- }
- }
+ while (!end) {
+ if (index === -1) {
+ index = input.length
+ end = true
+ }
- effect = effect.next;
- } while (effect !== firstEffect);
- }
-}
+ token = input.slice(start, index).trim()
-function commitPassiveHookEffects(finishedWork) {
- if ((finishedWork.effectTag & Passive) !== NoEffect) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // TODO (#17945) We should call all passive destroy functions (for all fibers)
- // before calling any create functions. The current approach only serializes
- // these for a single fiber.
- commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);
- commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
- break;
- }
+ if (token || !end) {
+ tokens.push(token)
}
+
+ start = index + 1
+ index = input.indexOf(',', start)
}
-}
-function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // At this point layout effects have already been destroyed (during mutation phase).
- // This is done to prevent sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- commitHookEffectListMount(Layout | HasEffect, finishedWork);
+ return tokens
+}
- return;
- }
+/**
+ * Serialize an array of strings to comma separated tokens.
+ *
+ * @param {Array.} values
+ * @param {StringifyOptions} [options]
+ * @returns {string}
+ */
+function stringify(values, options) {
+ var settings = options || {}
- case ClassComponent:
- {
- var instance = finishedWork.stateNode;
+ // Ensure the last empty entry is seen.
+ if (values[values.length - 1] === '') {
+ values = values.concat('')
+ }
- if (finishedWork.effectTag & Update) {
- if (current === null) {
- startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
+ return values
+ .join(
+ (settings.padRight ? ' ' : '') +
+ ',' +
+ (settings.padLeft === false ? '' : ' ')
+ )
+ .trim()
+}
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
+/***/ }),
- instance.componentDidMount();
- stopPhaseTimer();
- } else {
- var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
- var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
+/***/ "./node_modules/react-markdown/node_modules/mdast-util-from-markdown/dev/lib/index.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/mdast-util-from-markdown/dev/lib/index.js ***!
+ \********************************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "fromMarkdown": () => (/* binding */ fromMarkdown)
+/* harmony export */ });
+/* harmony import */ var power_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! power-assert */ "./node_modules/power-assert/index.js");
+/* harmony import */ var mdast_util_to_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mdast-util-to-string */ "./node_modules/react-markdown/node_modules/mdast-util-to-string/index.js");
+/* harmony import */ var micromark_lib_parse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark/lib/parse.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/parse.js");
+/* harmony import */ var micromark_lib_preprocess_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark/lib/preprocess.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/preprocess.js");
+/* harmony import */ var micromark_lib_postprocess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark/lib/postprocess.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/postprocess.js");
+/* harmony import */ var micromark_util_decode_numeric_character_reference__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! micromark-util-decode-numeric-character-reference */ "./node_modules/micromark-util-decode-numeric-character-reference/dev/index.js");
+/* harmony import */ var micromark_util_decode_string__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! micromark-util-decode-string */ "./node_modules/micromark-util-decode-string/dev/index.js");
+/* harmony import */ var micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! micromark-util-normalize-identifier */ "./node_modules/micromark-util-normalize-identifier/dev/index.js");
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "./node_modules/micromark-util-symbol/constants.js");
+/* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "./node_modules/micromark-util-symbol/types.js");
+/* harmony import */ var parse_entities_decode_entity_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! parse-entities/decode-entity.js */ "./node_modules/react-markdown/node_modules/parse-entities/decode-entity.js");
+/* harmony import */ var unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! unist-util-stringify-position */ "./node_modules/react-markdown/node_modules/unist-util-stringify-position/index.js");
+/**
+ * @typedef {import('micromark-util-types').Encoding} Encoding
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Value} Value
+ * @typedef {import('unist').Parent} UnistParent
+ * @typedef {import('unist').Point} Point
+ * @typedef {import('mdast').PhrasingContent} PhrasingContent
+ * @typedef {import('mdast').Content} Content
+ * @typedef {Root|Content} Node
+ * @typedef {Extract} Parent
+ * @typedef {import('mdast').Break} Break
+ * @typedef {import('mdast').Blockquote} Blockquote
+ * @typedef {import('mdast').Code} Code
+ * @typedef {import('mdast').Definition} Definition
+ * @typedef {import('mdast').Emphasis} Emphasis
+ * @typedef {import('mdast').Heading} Heading
+ * @typedef {import('mdast').HTML} HTML
+ * @typedef {import('mdast').Image} Image
+ * @typedef {import('mdast').ImageReference} ImageReference
+ * @typedef {import('mdast').InlineCode} InlineCode
+ * @typedef {import('mdast').Link} Link
+ * @typedef {import('mdast').LinkReference} LinkReference
+ * @typedef {import('mdast').List} List
+ * @typedef {import('mdast').ListItem} ListItem
+ * @typedef {import('mdast').Paragraph} Paragraph
+ * @typedef {import('mdast').Root} Root
+ * @typedef {import('mdast').Strong} Strong
+ * @typedef {import('mdast').Text} Text
+ * @typedef {import('mdast').ThematicBreak} ThematicBreak
+ *
+ * @typedef {UnistParent & {type: 'fragment', children: PhrasingContent[]}} Fragment
+ */
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
+/**
+ * @typedef _CompileDataFields
+ * @property {boolean|undefined} expectingFirstListItemValue
+ * @property {boolean|undefined} flowCodeInside
+ * @property {boolean|undefined} setextHeadingSlurpLineEnding
+ * @property {boolean|undefined} atHardBreak
+ * @property {'collapsed'|'full'} referenceType
+ * @property {boolean|undefined} inReference
+ * @property {'characterReferenceMarkerHexadecimal'|'characterReferenceMarkerNumeric'} characterReferenceType
+ *
+ * @typedef {Record & Partial<_CompileDataFields>} CompileData
+ *
+ * @typedef {(tree: Root) => Root|void} Transform
+ * @typedef {(this: CompileContext, token: Token) => void} Handle
+ * @typedef {Record} Handles
+ * Token types mapping to handles
+ * @typedef {Record|Array.> & {canContainEols: Array., transforms: Array., enter: Handles, exit: Handles}} NormalizedExtension
+ * @typedef {Partial} Extension
+ * An mdast extension changes how markdown tokens are turned into mdast.
+ *
+ * @typedef CompileContext
+ * mdast compiler context
+ * @property {Array.} stack
+ * @property {Array.} tokenStack
+ * @property {(key: string, value?: unknown) => void} setData
+ * Set data into the key-value store.
+ * @property {(key: K) => CompileData[K]} getData
+ * Get data from the key-value store.
+ * @property {(this: CompileContext) => void} buffer
+ * Capture some of the output data.
+ * @property {(this: CompileContext) => string} resume
+ * Stop capturing and access the output data.
+ * @property {(this: CompileContext, node: N, token: Token) => N} enter
+ * Enter a token.
+ * @property {(this: CompileContext, token: Token) => Node} exit
+ * Exit a token.
+ * @property {TokenizeContext['sliceSerialize']} sliceSerialize
+ * Get the string value of a token.
+ * @property {NormalizedExtension} config
+ * Configuration.
+ *
+ * @typedef {{mdastExtensions?: Array.>}} FromMarkdownOptions
+ * @typedef {ParseOptions & FromMarkdownOptions} Options
+ */
- instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
- stopPhaseTimer();
- }
- }
- var updateQueue = finishedWork.updateQueue;
- if (updateQueue !== null) {
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- } // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
- commitUpdateQueue(finishedWork, updateQueue, instance);
- }
- return;
- }
- case HostRoot:
- {
- var _updateQueue = finishedWork.updateQueue;
- if (_updateQueue !== null) {
- var _instance = null;
- if (finishedWork.child !== null) {
- switch (finishedWork.child.tag) {
- case HostComponent:
- _instance = getPublicInstance(finishedWork.child.stateNode);
- break;
- case ClassComponent:
- _instance = finishedWork.child.stateNode;
- break;
- }
- }
- commitUpdateQueue(finishedWork, _updateQueue, _instance);
- }
- return;
- }
- case HostComponent:
- {
- var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
- // (eg DOM renderer may schedule auto-focus for inputs and form controls).
- // These effects should only be committed when components are first mounted,
- // aka when there is no current/alternate.
- if (current === null && finishedWork.effectTag & Update) {
- var type = finishedWork.type;
- var props = finishedWork.memoizedProps;
- commitMount(_instance2, type, props);
- }
+const own = {}.hasOwnProperty
- return;
+/**
+ * @param value Markdown to parse (`string` or `Buffer`).
+ * @param [encoding] Character encoding to understand `value` as when it’s a `Buffer` (`string`, default: `'utf8'`).
+ * @param [options] Configuration
+ */
+const fromMarkdown =
+ /**
+ * @type {(
+ * ((value: Value, encoding: Encoding, options?: Options) => Root) &
+ * ((value: Value, options?: Options) => Root)
+ * )}
+ */
+ (
+ /**
+ * @param {Value} value
+ * @param {Encoding} [encoding]
+ * @param {Options} [options]
+ * @returns {Root}
+ */
+ function (value, encoding, options) {
+ if (typeof encoding !== 'string') {
+ options = encoding
+ encoding = undefined
}
- case HostText:
- {
- // We have no life-cycles associated with text.
- return;
- }
+ return compiler(options)(
+ (0,micromark_lib_postprocess_js__WEBPACK_IMPORTED_MODULE_1__.postprocess)(
+ (0,micromark_lib_parse_js__WEBPACK_IMPORTED_MODULE_2__.parse)(options).document().write((0,micromark_lib_preprocess_js__WEBPACK_IMPORTED_MODULE_3__.preprocess)()(value, encoding, true))
+ )
+ )
+ }
+ )
- case HostPortal:
- {
- // We have no life-cycles associated with portals.
- return;
+/**
+ * Note this compiler only understand complete buffering, not streaming.
+ *
+ * @param {Options} [options]
+ */
+function compiler(options = {}) {
+ /** @type {NormalizedExtension} */
+ // @ts-expect-error: our base has all required fields, so the result will too.
+ const config = configure(
+ {
+ transforms: [],
+ canContainEols: [
+ 'emphasis',
+ 'fragment',
+ 'heading',
+ 'paragraph',
+ 'strong'
+ ],
+ enter: {
+ autolink: opener(link),
+ autolinkProtocol: onenterdata,
+ autolinkEmail: onenterdata,
+ atxHeading: opener(heading),
+ blockQuote: opener(blockQuote),
+ characterEscape: onenterdata,
+ characterReference: onenterdata,
+ codeFenced: opener(codeFlow),
+ codeFencedFenceInfo: buffer,
+ codeFencedFenceMeta: buffer,
+ codeIndented: opener(codeFlow, buffer),
+ codeText: opener(codeText, buffer),
+ codeTextData: onenterdata,
+ data: onenterdata,
+ codeFlowValue: onenterdata,
+ definition: opener(definition),
+ definitionDestinationString: buffer,
+ definitionLabelString: buffer,
+ definitionTitleString: buffer,
+ emphasis: opener(emphasis),
+ hardBreakEscape: opener(hardBreak),
+ hardBreakTrailing: opener(hardBreak),
+ htmlFlow: opener(html, buffer),
+ htmlFlowData: onenterdata,
+ htmlText: opener(html, buffer),
+ htmlTextData: onenterdata,
+ image: opener(image),
+ label: buffer,
+ link: opener(link),
+ listItem: opener(listItem),
+ listItemValue: onenterlistitemvalue,
+ listOrdered: opener(list, onenterlistordered),
+ listUnordered: opener(list),
+ paragraph: opener(paragraph),
+ reference: onenterreference,
+ referenceString: buffer,
+ resourceDestinationString: buffer,
+ resourceTitleString: buffer,
+ setextHeading: opener(heading),
+ strong: opener(strong),
+ thematicBreak: opener(thematicBreak)
+ },
+ exit: {
+ atxHeading: closer(),
+ atxHeadingSequence: onexitatxheadingsequence,
+ autolink: closer(),
+ autolinkEmail: onexitautolinkemail,
+ autolinkProtocol: onexitautolinkprotocol,
+ blockQuote: closer(),
+ characterEscapeValue: onexitdata,
+ characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
+ characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
+ characterReferenceValue: onexitcharacterreferencevalue,
+ codeFenced: closer(onexitcodefenced),
+ codeFencedFence: onexitcodefencedfence,
+ codeFencedFenceInfo: onexitcodefencedfenceinfo,
+ codeFencedFenceMeta: onexitcodefencedfencemeta,
+ codeFlowValue: onexitdata,
+ codeIndented: closer(onexitcodeindented),
+ codeText: closer(onexitcodetext),
+ codeTextData: onexitdata,
+ data: onexitdata,
+ definition: closer(),
+ definitionDestinationString: onexitdefinitiondestinationstring,
+ definitionLabelString: onexitdefinitionlabelstring,
+ definitionTitleString: onexitdefinitiontitlestring,
+ emphasis: closer(),
+ hardBreakEscape: closer(onexithardbreak),
+ hardBreakTrailing: closer(onexithardbreak),
+ htmlFlow: closer(onexithtmlflow),
+ htmlFlowData: onexitdata,
+ htmlText: closer(onexithtmltext),
+ htmlTextData: onexitdata,
+ image: closer(onexitimage),
+ label: onexitlabel,
+ labelText: onexitlabeltext,
+ lineEnding: onexitlineending,
+ link: closer(onexitlink),
+ listItem: closer(),
+ listOrdered: closer(),
+ listUnordered: closer(),
+ paragraph: closer(),
+ referenceString: onexitreferencestring,
+ resourceDestinationString: onexitresourcedestinationstring,
+ resourceTitleString: onexitresourcetitlestring,
+ resource: onexitresource,
+ setextHeading: closer(onexitsetextheading),
+ setextHeadingLineSequence: onexitsetextheadinglinesequence,
+ setextHeadingText: onexitsetextheadingtext,
+ strong: closer(),
+ thematicBreak: closer()
}
+ },
+ options.mdastExtensions || []
+ )
- case Profiler:
- {
- {
- var onRender = finishedWork.memoizedProps.onRender;
+ /** @type {CompileData} */
+ const data = {}
- if (typeof onRender === 'function') {
- {
- onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
- }
- }
- }
+ return compile
- return;
+ /**
+ * @param {Array.} events
+ * @returns {Root}
+ */
+ function compile(events) {
+ /** @type {Root} */
+ let tree = {type: 'root', children: []}
+ /** @type {CompileContext['stack']} */
+ const stack = [tree]
+ /** @type {CompileContext['tokenStack']} */
+ const tokenStack = []
+ /** @type {Array.} */
+ const listStack = []
+ /** @type {Omit} */
+ const context = {
+ stack,
+ tokenStack,
+ config,
+ enter,
+ exit,
+ buffer,
+ resume,
+ setData,
+ getData
+ }
+ let index = -1
+
+ while (++index < events.length) {
+ // We preprocess lists to add `listItem` tokens, and to infer whether
+ // items the list itself are spread out.
+ if (
+ events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listOrdered ||
+ events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listUnordered
+ ) {
+ if (events[index][0] === 'enter') {
+ listStack.push(index)
+ } else {
+ const tail = listStack.pop()
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(typeof tail === 'number', 'expected list ot be open')
+ index = prepareList(events, tail, index)
+ }
}
+ }
- case SuspenseComponent:
- {
- commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
- return;
+ index = -1
+
+ while (++index < events.length) {
+ const handler = config[events[index][0]]
+
+ if (own.call(handler, events[index][1].type)) {
+ handler[events[index][1].type].call(
+ Object.assign(
+ {sliceSerialize: events[index][2].sliceSerialize},
+ context
+ ),
+ events[index][1]
+ )
}
+ }
- case SuspenseListComponent:
- case IncompleteClassComponent:
- case FundamentalComponent:
- case ScopeComponent:
- return;
- }
+ if (tokenStack.length > 0) {
+ throw new Error(
+ 'Cannot close document, a token (`' +
+ tokenStack[tokenStack.length - 1].type +
+ '`, ' +
+ (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({
+ start: tokenStack[tokenStack.length - 1].start,
+ end: tokenStack[tokenStack.length - 1].end
+ }) +
+ ') is still open'
+ )
+ }
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
+ // Figure out `root` position.
+ tree.position = {
+ start: point(
+ events.length > 0 ? events[0][1].start : {line: 1, column: 1, offset: 0}
+ ),
+ end: point(
+ events.length > 0
+ ? events[events.length - 2][1].end
+ : {line: 1, column: 1, offset: 0}
+ )
}
- }
-}
-function hideOrUnhideAllChildren(finishedWork, isHidden) {
- {
- // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = finishedWork;
+ index = -1
+ while (++index < config.transforms.length) {
+ tree = config.transforms[index](tree) || tree
+ }
- while (true) {
- if (node.tag === HostComponent) {
- var instance = node.stateNode;
+ return tree
+ }
- if (isHidden) {
- hideInstance(instance);
+ /**
+ * @param {Array.} events
+ * @param {number} start
+ * @param {number} length
+ * @returns {number}
+ */
+ function prepareList(events, start, length) {
+ let index = start - 1
+ let containerBalance = -1
+ let listSpread = false
+ /** @type {Token|undefined} */
+ let listItem
+ /** @type {number|undefined} */
+ let lineIndex
+ /** @type {number|undefined} */
+ let firstBlankLineIndex
+ /** @type {boolean|undefined} */
+ let atMarker
+
+ while (++index <= length) {
+ const event = events[index]
+
+ if (
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listUnordered ||
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listOrdered ||
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuote
+ ) {
+ if (event[0] === 'enter') {
+ containerBalance++
} else {
- unhideInstance(node.stateNode, node.memoizedProps);
+ containerBalance--
}
- } else if (node.tag === HostText) {
- var _instance3 = node.stateNode;
- if (isHidden) {
- hideTextInstance(_instance3);
- } else {
- unhideTextInstance(_instance3, node.memoizedProps);
+ atMarker = undefined
+ } else if (event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank) {
+ if (event[0] === 'enter') {
+ if (
+ listItem &&
+ !atMarker &&
+ !containerBalance &&
+ !firstBlankLineIndex
+ ) {
+ firstBlankLineIndex = index
+ }
+
+ atMarker = undefined
}
- } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {
- // Found a nested Suspense component that timed out. Skip over the
- // primary child fragment, which should remain hidden.
- var fallbackChildFragment = node.child.sibling;
- fallbackChildFragment.return = node;
- node = fallbackChildFragment;
- continue;
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
+ } else if (
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix ||
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemValue ||
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemMarker ||
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefix ||
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefixWhitespace
+ ) {
+ // Empty.
+ } else {
+ atMarker = undefined
+ }
+
+ if (
+ (!containerBalance &&
+ event[0] === 'enter' &&
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefix) ||
+ (containerBalance === -1 &&
+ event[0] === 'exit' &&
+ (event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listUnordered ||
+ event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listOrdered))
+ ) {
+ if (listItem) {
+ let tailIndex = index
+ lineIndex = undefined
+
+ while (tailIndex--) {
+ const tailEvent = events[tailIndex]
+
+ if (
+ tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding ||
+ tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank
+ ) {
+ if (tailEvent[0] === 'exit') continue
+
+ if (lineIndex) {
+ events[lineIndex][1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank
+ listSpread = true
+ }
- if (node === finishedWork) {
- return;
- }
+ tailEvent[1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding
+ lineIndex = tailIndex
+ } else if (
+ tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix ||
+ tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuotePrefix ||
+ tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuotePrefixWhitespace ||
+ tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuoteMarker ||
+ tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemIndent
+ ) {
+ // Empty
+ } else {
+ break
+ }
+ }
- while (node.sibling === null) {
- if (node.return === null || node.return === finishedWork) {
- return;
+ if (
+ firstBlankLineIndex &&
+ (!lineIndex || firstBlankLineIndex < lineIndex)
+ ) {
+ // @ts-expect-error Patched.
+ listItem._spread = true
+ }
+
+ // Fix position.
+ listItem.end = Object.assign(
+ {},
+ lineIndex ? events[lineIndex][1].start : event[1].end
+ )
+
+ events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])
+ index++
+ length++
}
- node = node.return;
+ // Create a new list item.
+ if (event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefix) {
+ listItem = {
+ type: 'listItem',
+ // @ts-expect-error Patched
+ _spread: false,
+ start: Object.assign({}, event[1].start)
+ }
+ // @ts-expect-error: `listItem` is most definitely defined, TS...
+ events.splice(index, 0, ['enter', listItem, event[2]])
+ index++
+ length++
+ firstBlankLineIndex = undefined
+ atMarker = true
+ }
}
-
- node.sibling.return = node.return;
- node = node.sibling;
}
- }
-}
-function commitAttachRef(finishedWork) {
- var ref = finishedWork.ref;
+ // @ts-expect-error Patched.
+ events[start][1]._spread = listSpread
+ return length
+ }
- if (ref !== null) {
- var instance = finishedWork.stateNode;
- var instanceToUse;
+ /**
+ * @type {CompileContext['setData']}
+ * @param [value]
+ */
+ function setData(key, value) {
+ data[key] = value
+ }
- switch (finishedWork.tag) {
- case HostComponent:
- instanceToUse = getPublicInstance(instance);
- break;
+ /**
+ * @type {CompileContext['getData']}
+ * @template {string} K
+ * @param {K} key
+ * @returns {CompileData[K]}
+ */
+ function getData(key) {
+ return data[key]
+ }
- default:
- instanceToUse = instance;
- } // Moved outside to ensure DCE works with this flag
+ /**
+ * @param {Point} d
+ * @returns {Point}
+ */
+ function point(d) {
+ return {line: d.line, column: d.column, offset: d.offset}
+ }
- if (typeof ref === 'function') {
- ref(instanceToUse);
- } else {
- {
- if (!ref.hasOwnProperty('current')) {
- error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
- }
- }
+ /**
+ * @param {(token: Token) => Node} create
+ * @param {Handle} [and]
+ * @returns {Handle}
+ */
+ function opener(create, and) {
+ return open
- ref.current = instanceToUse;
+ /**
+ * @this {CompileContext}
+ * @param {Token} token
+ * @returns {void}
+ */
+ function open(token) {
+ enter.call(this, create(token), token)
+ if (and) and.call(this, token)
}
}
-}
-function commitDetachRef(current) {
- var currentRef = current.ref;
+ /** @type {CompileContext['buffer']} */
+ function buffer() {
+ this.stack.push({type: 'fragment', children: []})
+ }
- if (currentRef !== null) {
- if (typeof currentRef === 'function') {
- currentRef(null);
- } else {
- currentRef.current = null;
- }
+ /**
+ * @type {CompileContext['enter']}
+ * @template {Node} N
+ * @this {CompileContext}
+ * @param {N} node
+ * @param {Token} token
+ * @returns {N}
+ */
+ function enter(node, token) {
+ const parent = this.stack[this.stack.length - 1]
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(parent, 'expected `parent`')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__('children' in parent, 'expected `parent`')
+ // @ts-expect-error: Assume `Node` can exist as a child of `parent`.
+ parent.children.push(node)
+ this.stack.push(node)
+ this.tokenStack.push(token)
+ // @ts-expect-error: `end` will be patched later.
+ node.position = {start: point(token.start)}
+ return node
}
-} // User-originating errors (lifecycles and refs) should not interrupt
-// deletion, so don't let them throw. Host-originating errors should
-// interrupt deletion, so it's okay
+ /**
+ * @param {Handle} [and]
+ * @returns {Handle}
+ */
+ function closer(and) {
+ return close
-function commitUnmount(finishedRoot, current, renderPriorityLevel) {
- onCommitUnmount(current);
+ /**
+ * @this {CompileContext}
+ * @param {Token} token
+ * @returns {void}
+ */
+ function close(token) {
+ if (and) and.call(this, token)
+ exit.call(this, token)
+ }
+ }
+
+ /** @type {CompileContext['exit']} */
+ function exit(token) {
+ const node = this.stack.pop()
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(node, 'expected `node`')
+ const open = this.tokenStack.pop()
+
+ if (!open) {
+ throw new Error(
+ 'Cannot close `' +
+ token.type +
+ '` (' +
+ (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({start: token.start, end: token.end}) +
+ '): it’s not open'
+ )
+ } else if (open.type !== token.type) {
+ throw new Error(
+ 'Cannot close `' +
+ token.type +
+ '` (' +
+ (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({start: token.start, end: token.end}) +
+ '): a different token (`' +
+ open.type +
+ '`, ' +
+ (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({start: open.start, end: open.end}) +
+ ') is open'
+ )
+ }
+
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(node.type !== 'fragment', 'unexpected fragment `exit`ed')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(node.position, 'expected `position` to be defined')
+ node.position.end = point(token.end)
+ return node
+ }
- switch (current.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- var updateQueue = current.updateQueue;
+ /**
+ * @this {CompileContext}
+ * @returns {string}
+ */
+ function resume() {
+ return (0,mdast_util_to_string__WEBPACK_IMPORTED_MODULE_6__.toString)(this.stack.pop())
+ }
- if (updateQueue !== null) {
- var lastEffect = updateQueue.lastEffect;
+ //
+ // Handlers.
+ //
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
+ /** @type {Handle} */
+ function onenterlistordered() {
+ setData('expectingFirstListItemValue', true)
+ }
- {
- // When the owner fiber is deleted, the destroy function of a passive
- // effect hook is called during the synchronous commit phase. This is
- // a concession to implementation complexity. Calling it in the
- // passive effect phase (like they usually are, when dependencies
- // change during an update) would require either traversing the
- // children of the deleted fiber again, or including unmount effects
- // as part of the fiber effect list.
- //
- // Because this is during the sync commit phase, we need to change
- // the priority.
- //
- // TODO: Reconsider this implementation trade off.
- var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
- runWithPriority$1(priorityLevel, function () {
- var effect = firstEffect;
-
- do {
- var _destroy = effect.destroy;
-
- if (_destroy !== undefined) {
- safelyCallDestroy(current, _destroy);
- }
+ /** @type {Handle} */
+ function onenterlistitemvalue(token) {
+ if (getData('expectingFirstListItemValue')) {
+ const ancestor = /** @type {List} */ (this.stack[this.stack.length - 2])
+ ancestor.start = Number.parseInt(
+ this.sliceSerialize(token),
+ micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__.constants.numericBaseDecimal
+ )
+ setData('expectingFirstListItemValue')
+ }
+ }
- effect = effect.next;
- } while (effect !== firstEffect);
- });
- }
- }
- }
+ /** @type {Handle} */
+ function onexitcodefencedfenceinfo() {
+ const data = this.resume()
+ const node = /** @type {Code} */ (this.stack[this.stack.length - 1])
+ node.lang = data
+ }
- return;
- }
+ /** @type {Handle} */
+ function onexitcodefencedfencemeta() {
+ const data = this.resume()
+ const node = /** @type {Code} */ (this.stack[this.stack.length - 1])
+ node.meta = data
+ }
- case ClassComponent:
- {
- safelyDetachRef(current);
- var instance = current.stateNode;
+ /** @type {Handle} */
+ function onexitcodefencedfence() {
+ // Exit if this is the closing fence.
+ if (getData('flowCodeInside')) return
+ this.buffer()
+ setData('flowCodeInside', true)
+ }
- if (typeof instance.componentWillUnmount === 'function') {
- safelyCallComponentWillUnmount(current, instance);
- }
+ /** @type {Handle} */
+ function onexitcodefenced() {
+ const data = this.resume()
+ const node = /** @type {Code} */ (this.stack[this.stack.length - 1])
- return;
- }
+ node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '')
- case HostComponent:
- {
+ setData('flowCodeInside')
+ }
- safelyDetachRef(current);
- return;
- }
+ /** @type {Handle} */
+ function onexitcodeindented() {
+ const data = this.resume()
+ const node = /** @type {Code} */ (this.stack[this.stack.length - 1])
- case HostPortal:
- {
- // TODO: this is recursive.
- // We are also not using this parent because
- // the portal will get pushed immediately.
- {
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
- }
+ node.value = data.replace(/(\r?\n|\r)$/g, '')
+ }
- return;
- }
+ /** @type {Handle} */
+ function onexitdefinitionlabelstring(token) {
+ // Discard label, use the source content instead.
+ const label = this.resume()
+ const node = /** @type {Definition} */ (this.stack[this.stack.length - 1])
+ node.label = label
+ node.identifier = (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__.normalizeIdentifier)(
+ this.sliceSerialize(token)
+ ).toLowerCase()
+ }
- case FundamentalComponent:
- {
+ /** @type {Handle} */
+ function onexitdefinitiontitlestring() {
+ const data = this.resume()
+ const node = /** @type {Definition} */ (this.stack[this.stack.length - 1])
+ node.title = data
+ }
- return;
- }
+ /** @type {Handle} */
+ function onexitdefinitiondestinationstring() {
+ const data = this.resume()
+ const node = /** @type {Definition} */ (this.stack[this.stack.length - 1])
+ node.url = data
+ }
- case DehydratedFragment:
- {
+ /** @type {Handle} */
+ function onexitatxheadingsequence(token) {
+ const node = /** @type {Heading} */ (this.stack[this.stack.length - 1])
+ if (!node.depth) {
+ const depth = this.sliceSerialize(token).length
- return;
- }
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ depth === 1 ||
+ depth === 2 ||
+ depth === 3 ||
+ depth === 4 ||
+ depth === 5 ||
+ depth === 6,
+ 'expected `depth` between `1` and `6`'
+ )
- case ScopeComponent:
- {
+ node.depth = depth
+ }
+ }
- return;
- }
+ /** @type {Handle} */
+ function onexitsetextheadingtext() {
+ setData('setextHeadingSlurpLineEnding', true)
}
-}
-function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
- // While we're inside a removed host node we don't want to call
- // removeChild on the inner nodes because they're removed by the top
- // call anyway. We also want to call componentWillUnmount on all
- // composites before this host node is removed from the tree. Therefore
- // we do an inner loop while we're still inside the host node.
- var node = root;
+ /** @type {Handle} */
+ function onexitsetextheadinglinesequence(token) {
+ const node = /** @type {Heading} */ (this.stack[this.stack.length - 1])
- while (true) {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.
- // Skip portals because commitUnmount() currently visits them recursively.
+ node.depth =
+ this.sliceSerialize(token).charCodeAt(0) === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_9__.codes.equalsTo ? 1 : 2
+ }
- if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
- // If we don't use mutation we drill down into portals here instead.
- node.tag !== HostPortal)) {
- node.child.return = node;
- node = node.child;
- continue;
- }
+ /** @type {Handle} */
+ function onexitsetextheading() {
+ setData('setextHeadingSlurpLineEnding')
+ }
- if (node === root) {
- return;
+ /** @type {Handle} */
+ function onenterdata(token) {
+ const parent = /** @type {Parent} */ (this.stack[this.stack.length - 1])
+ /** @type {Node} */
+ let tail = parent.children[parent.children.length - 1]
+
+ if (!tail || tail.type !== 'text') {
+ // Add a new text node.
+ tail = text()
+ // @ts-expect-error: we’ll add `end` later.
+ tail.position = {start: point(token.start)}
+ // @ts-expect-error: Assume `parent` accepts `text`.
+ parent.children.push(tail)
}
- while (node.sibling === null) {
- if (node.return === null || node.return === root) {
- return;
- }
+ this.stack.push(tail)
+ }
- node = node.return;
+ /** @type {Handle} */
+ function onexitdata(token) {
+ const tail = this.stack.pop()
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(tail, 'expected a `node` to be on the stack')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__('value' in tail, 'expected a `literal` to be on the stack')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(tail.position, 'expected `node` to have an open position')
+ tail.value += this.sliceSerialize(token)
+ tail.position.end = point(token.end)
+ }
+
+ /** @type {Handle} */
+ function onexitlineending(token) {
+ const context = this.stack[this.stack.length - 1]
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(context, 'expected `node`')
+
+ // If we’re at a hard break, include the line ending in there.
+ if (getData('atHardBreak')) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__('children' in context, 'expected `parent`')
+ const tail = context.children[context.children.length - 1]
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(tail.position, 'expected tail to have a starting position')
+ tail.position.end = point(token.end)
+ setData('atHardBreak')
+ return
}
- node.sibling.return = node.return;
- node = node.sibling;
+ if (
+ !getData('setextHeadingSlurpLineEnding') &&
+ config.canContainEols.includes(context.type)
+ ) {
+ onenterdata.call(this, token)
+ onexitdata.call(this, token)
+ }
}
-}
-function detachFiber(current) {
- var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we
- // should clear the child pointer of the parent alternate to let this
- // get GC:ed but we don't know which for sure which parent is the current
- // one so we'll settle for GC:ing the subtree of this child. This child
- // itself will be GC:ed when the parent updates the next time.
+ /** @type {Handle} */
+ function onexithardbreak() {
+ setData('atHardBreak', true)
+ }
- current.return = null;
- current.child = null;
- current.memoizedState = null;
- current.updateQueue = null;
- current.dependencies = null;
- current.alternate = null;
- current.firstEffect = null;
- current.lastEffect = null;
- current.pendingProps = null;
- current.memoizedProps = null;
- current.stateNode = null;
+ /** @type {Handle} */
+ function onexithtmlflow() {
+ const data = this.resume()
+ const node = /** @type {HTML} */ (this.stack[this.stack.length - 1])
+ node.value = data
+ }
- if (alternate !== null) {
- detachFiber(alternate);
+ /** @type {Handle} */
+ function onexithtmltext() {
+ const data = this.resume()
+ const node = /** @type {HTML} */ (this.stack[this.stack.length - 1])
+ node.value = data
}
-}
-function getHostParentFiber(fiber) {
- var parent = fiber.return;
+ /** @type {Handle} */
+ function onexitcodetext() {
+ const data = this.resume()
+ const node = /** @type {InlineCode} */ (this.stack[this.stack.length - 1])
+ node.value = data
+ }
- while (parent !== null) {
- if (isHostParent(parent)) {
- return parent;
+ /** @type {Handle} */
+ function onexitlink() {
+ const context = /** @type {Link & {identifier: string, label: string}} */ (
+ this.stack[this.stack.length - 1]
+ )
+
+ // To do: clean.
+ if (getData('inReference')) {
+ context.type += 'Reference'
+ // @ts-expect-error: mutate.
+ context.referenceType = getData('referenceType') || 'shortcut'
+ // @ts-expect-error: mutate.
+ delete context.url
+ delete context.title
+ } else {
+ // @ts-expect-error: mutate.
+ delete context.identifier
+ // @ts-expect-error: mutate.
+ delete context.label
}
- parent = parent.return;
+ setData('referenceType')
}
- {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
+ /** @type {Handle} */
+ function onexitimage() {
+ const context = /** @type {Image & {identifier: string, label: string}} */ (
+ this.stack[this.stack.length - 1]
+ )
+
+ // To do: clean.
+ if (getData('inReference')) {
+ context.type += 'Reference'
+ // @ts-expect-error: mutate.
+ context.referenceType = getData('referenceType') || 'shortcut'
+ // @ts-expect-error: mutate.
+ delete context.url
+ delete context.title
+ } else {
+ // @ts-expect-error: mutate.
+ delete context.identifier
+ // @ts-expect-error: mutate.
+ delete context.label
}
+
+ setData('referenceType')
}
-}
-function isHostParent(fiber) {
- return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
-}
+ /** @type {Handle} */
+ function onexitlabeltext(token) {
+ const ancestor =
+ /** @type {(Link|Image) & {identifier: string, label: string}} */ (
+ this.stack[this.stack.length - 2]
+ )
+ const string = this.sliceSerialize(token)
-function getHostSibling(fiber) {
- // We're going to search forward into the tree until we find a sibling host
- // node. Unfortunately, if multiple insertions are done in a row we have to
- // search past them. This leads to exponential search for the next sibling.
- // TODO: Find a more efficient way to do this.
- var node = fiber;
+ ancestor.label = (0,micromark_util_decode_string__WEBPACK_IMPORTED_MODULE_10__.decodeString)(string)
+ ancestor.identifier = (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__.normalizeIdentifier)(string).toLowerCase()
+ }
- siblings: while (true) {
- // If we didn't find anything, let's try the next sibling.
- while (node.sibling === null) {
- if (node.return === null || isHostParent(node.return)) {
- // If we pop out of the root or hit the parent the fiber we are the
- // last sibling.
- return null;
- }
+ /** @type {Handle} */
+ function onexitlabel() {
+ const fragment = /** @type {Fragment} */ (this.stack[this.stack.length - 1])
+ const value = this.resume()
+ const node =
+ /** @type {(Link|Image) & {identifier: string, label: string}} */ (
+ this.stack[this.stack.length - 1]
+ )
- node = node.return;
+ // Assume a reference.
+ setData('inReference', true)
+
+ if (node.type === 'link') {
+ // @ts-expect-error: Assume static phrasing content.
+ node.children = fragment.children
+ } else {
+ node.alt = value
}
+ }
- node.sibling.return = node.return;
- node = node.sibling;
+ /** @type {Handle} */
+ function onexitresourcedestinationstring() {
+ const data = this.resume()
+ const node = /** @type {Link|Image} */ (this.stack[this.stack.length - 1])
+ node.url = data
+ }
- while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
- // If it is not host node and, we might have a host node inside it.
- // Try to search down until we find one.
- if (node.effectTag & Placement) {
- // If we don't have a child, try the siblings instead.
- continue siblings;
- } // If we don't have a child, try the siblings instead.
- // We also skip portals because they are not part of this host tree.
+ /** @type {Handle} */
+ function onexitresourcetitlestring() {
+ const data = this.resume()
+ const node = /** @type {Link|Image} */ (this.stack[this.stack.length - 1])
+ node.title = data
+ }
+ /** @type {Handle} */
+ function onexitresource() {
+ setData('inReference')
+ }
- if (node.child === null || node.tag === HostPortal) {
- continue siblings;
- } else {
- node.child.return = node;
- node = node.child;
- }
- } // Check if this host node is stable or about to be placed.
+ /** @type {Handle} */
+ function onenterreference() {
+ setData('referenceType', 'collapsed')
+ }
+ /** @type {Handle} */
+ function onexitreferencestring(token) {
+ const label = this.resume()
+ const node = /** @type {LinkReference|ImageReference} */ (
+ this.stack[this.stack.length - 1]
+ )
+ node.label = label
+ node.identifier = (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__.normalizeIdentifier)(
+ this.sliceSerialize(token)
+ ).toLowerCase()
+ setData('referenceType', 'full')
+ }
- if (!(node.effectTag & Placement)) {
- // Found it!
- return node.stateNode;
+ /** @type {Handle} */
+ function onexitcharacterreferencemarker(token) {
+ setData('characterReferenceType', token.type)
+ }
+
+ /** @type {Handle} */
+ function onexitcharacterreferencevalue(token) {
+ const data = this.sliceSerialize(token)
+ const type = getData('characterReferenceType')
+ /** @type {string} */
+ let value
+
+ if (type) {
+ value = (0,micromark_util_decode_numeric_character_reference__WEBPACK_IMPORTED_MODULE_11__.decodeNumericCharacterReference)(
+ data,
+ type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.characterReferenceMarkerNumeric
+ ? micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__.constants.numericBaseDecimal
+ : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__.constants.numericBaseHexadecimal
+ )
+ setData('characterReferenceType')
+ } else {
+ // @ts-expect-error `decodeEntity` can return false for invalid named
+ // character references, but everything we’ve tokenized is valid.
+ value = (0,parse_entities_decode_entity_js__WEBPACK_IMPORTED_MODULE_12__.decodeEntity)(data)
}
+
+ const tail = this.stack.pop()
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(tail, 'expected `node`')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(tail.position, 'expected `node.position`')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__('value' in tail, 'expected `node.value`')
+ tail.value += value
+ tail.position.end = point(token.end)
}
-}
-function commitPlacement(finishedWork) {
+ /** @type {Handle} */
+ function onexitautolinkprotocol(token) {
+ onexitdata.call(this, token)
+ const node = /** @type {Link} */ (this.stack[this.stack.length - 1])
+ node.url = this.sliceSerialize(token)
+ }
+ /** @type {Handle} */
+ function onexitautolinkemail(token) {
+ onexitdata.call(this, token)
+ const node = /** @type {Link} */ (this.stack[this.stack.length - 1])
+ node.url = 'mailto:' + this.sliceSerialize(token)
+ }
- var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.
+ //
+ // Creaters.
+ //
- var parent;
- var isContainer;
- var parentStateNode = parentFiber.stateNode;
+ /** @returns {Blockquote} */
+ function blockQuote() {
+ return {type: 'blockquote', children: []}
+ }
- switch (parentFiber.tag) {
- case HostComponent:
- parent = parentStateNode;
- isContainer = false;
- break;
+ /** @returns {Code} */
+ function codeFlow() {
+ return {type: 'code', lang: null, meta: null, value: ''}
+ }
- case HostRoot:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
+ /** @returns {InlineCode} */
+ function codeText() {
+ return {type: 'inlineCode', value: ''}
+ }
- case HostPortal:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
+ /** @returns {Definition} */
+ function definition() {
+ return {
+ type: 'definition',
+ identifier: '',
+ label: null,
+ title: null,
+ url: ''
+ }
+ }
- case FundamentalComponent:
+ /** @returns {Emphasis} */
+ function emphasis() {
+ return {type: 'emphasis', children: []}
+ }
- // eslint-disable-next-line-no-fallthrough
+ /** @returns {Heading} */
+ function heading() {
+ // @ts-expect-error `depth` will be set later.
+ return {type: 'heading', depth: undefined, children: []}
+ }
- default:
- {
- {
- throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
+ /** @returns {Break} */
+ function hardBreak() {
+ return {type: 'break'}
+ }
+ /** @returns {HTML} */
+ function html() {
+ return {type: 'html', value: ''}
}
- if (parentFiber.effectTag & ContentReset) {
- // Reset the text content of the parent before doing any insertions
- resetTextContent(parent); // Clear ContentReset from the effect tag
+ /** @returns {Image} */
+ function image() {
+ return {type: 'image', title: null, url: '', alt: null}
+ }
- parentFiber.effectTag &= ~ContentReset;
+ /** @returns {Link} */
+ function link() {
+ return {type: 'link', title: null, url: '', children: []}
}
- var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
+ /**
+ * @param {Token} token
+ * @returns {List}
+ */
+ function list(token) {
+ return {
+ type: 'list',
+ ordered: token.type === 'listOrdered',
+ start: null,
+ // @ts-expect-error Patched.
+ spread: token._spread,
+ children: []
+ }
+ }
- if (isContainer) {
- insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
- } else {
- insertOrAppendPlacementNode(finishedWork, before, parent);
+ /**
+ * @param {Token} token
+ * @returns {ListItem}
+ */
+ function listItem(token) {
+ return {
+ type: 'listItem',
+ // @ts-expect-error Patched.
+ spread: token._spread,
+ checked: null,
+ children: []
+ }
+ }
+
+ /** @returns {Paragraph} */
+ function paragraph() {
+ return {type: 'paragraph', children: []}
+ }
+
+ /** @returns {Strong} */
+ function strong() {
+ return {type: 'strong', children: []}
+ }
+
+ /** @returns {Text} */
+ function text() {
+ return {type: 'text', value: ''}
+ }
+
+ /** @returns {ThematicBreak} */
+ function thematicBreak() {
+ return {type: 'thematicBreak'}
}
}
-function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
+/**
+ * @param {Extension} combined
+ * @param {Array.>} extensions
+ * @returns {Extension}
+ */
+function configure(combined, extensions) {
+ let index = -1
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
+ while (++index < extensions.length) {
+ const value = extensions[index]
- if (before) {
- insertInContainerBefore(parent, stateNode, before);
+ if (Array.isArray(value)) {
+ configure(combined, value)
} else {
- appendChildToContainer(parent, stateNode);
+ extension(combined, value)
}
- } else if (tag === HostPortal) ; else {
- var child = node.child;
+ }
- if (child !== null) {
- insertOrAppendPlacementNodeIntoContainer(child, before, parent);
- var sibling = child.sibling;
+ return combined
+}
- while (sibling !== null) {
- insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
- sibling = sibling.sibling;
+/**
+ * @param {Extension} combined
+ * @param {Extension} extension
+ * @returns {void}
+ */
+function extension(combined, extension) {
+ /** @type {string} */
+ let key
+
+ for (key in extension) {
+ if (own.call(extension, key)) {
+ const list = key === 'canContainEols' || key === 'transforms'
+ const maybe = own.call(combined, key) ? combined[key] : undefined
+ /* c8 ignore next */
+ const left = maybe || (combined[key] = list ? [] : {})
+ const right = extension[key]
+
+ if (right) {
+ if (list) {
+ // @ts-expect-error: `left` is an array.
+ combined[key] = [...left, ...right]
+ } else {
+ Object.assign(left, right)
+ }
}
}
}
}
-function insertOrAppendPlacementNode(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
+/***/ }),
- if (before) {
- insertBefore(parent, stateNode, before);
- } else {
- appendChild(parent, stateNode);
- }
- } else if (tag === HostPortal) ; else {
- var child = node.child;
+/***/ "./node_modules/react-markdown/node_modules/mdast-util-to-string/index.js":
+/*!********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/mdast-util-to-string/index.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "toString": () => (/* binding */ toString)
+/* harmony export */ });
+/**
+ * @typedef Options
+ * @property {boolean} [includeImageAlt=true]
+ */
+
+/**
+ * Get the text content of a node.
+ * Prefer the node’s plain-text fields, otherwise serialize its children,
+ * and if the given value is an array, serialize the nodes in it.
+ *
+ * @param {unknown} node
+ * @param {Options} [options]
+ * @returns {string}
+ */
+function toString(node, options) {
+ var {includeImageAlt = true} = options || {}
+ return one(node, includeImageAlt)
+}
+
+/**
+ * @param {unknown} node
+ * @param {boolean} includeImageAlt
+ * @returns {string}
+ */
+function one(node, includeImageAlt) {
+ return (
+ (node &&
+ typeof node === 'object' &&
+ // @ts-ignore looks like a literal.
+ (node.value ||
+ // @ts-ignore looks like an image.
+ (includeImageAlt ? node.alt : '') ||
+ // @ts-ignore looks like a parent.
+ ('children' in node && all(node.children, includeImageAlt)) ||
+ (Array.isArray(node) && all(node, includeImageAlt)))) ||
+ ''
+ )
+}
- if (child !== null) {
- insertOrAppendPlacementNode(child, before, parent);
- var sibling = child.sibling;
+/**
+ * @param {Array.} values
+ * @param {boolean} includeImageAlt
+ * @returns {string}
+ */
+function all(values, includeImageAlt) {
+ /** @type {Array.} */
+ var result = []
+ var index = -1
- while (sibling !== null) {
- insertOrAppendPlacementNode(sibling, before, parent);
- sibling = sibling.sibling;
- }
- }
+ while (++index < values.length) {
+ result[index] = one(values[index], includeImageAlt)
}
+
+ return result.join('')
}
-function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
- // We only have the top Fiber that was deleted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = current; // Each iteration, currentParent is populated with node's host parent if not
- // currentParentIsValid.
- var currentParentIsValid = false; // Note: these two variables *must* always be updated together.
+/***/ }),
- var currentParent;
- var currentParentIsContainer;
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/constructs.js":
+/*!**********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/constructs.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- while (true) {
- if (!currentParentIsValid) {
- var parent = node.return;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "document": () => (/* binding */ document),
+/* harmony export */ "contentInitial": () => (/* binding */ contentInitial),
+/* harmony export */ "flowInitial": () => (/* binding */ flowInitial),
+/* harmony export */ "flow": () => (/* binding */ flow),
+/* harmony export */ "string": () => (/* binding */ string),
+/* harmony export */ "text": () => (/* binding */ text),
+/* harmony export */ "insideSpan": () => (/* binding */ insideSpan),
+/* harmony export */ "attentionMarkers": () => (/* binding */ attentionMarkers),
+/* harmony export */ "disable": () => (/* binding */ disable)
+/* harmony export */ });
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/list.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/block-quote.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/definition.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/code-indented.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/heading-atx.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/thematic-break.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/setext-underline.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/html-flow.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/code-fenced.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/character-reference.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/character-escape.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/line-ending.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/label-start-image.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/attention.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/autolink.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/html-text.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/label-start-link.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/label-end.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/code-text.js");
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var _initialize_text_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./initialize/text.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/text.js");
+/**
+ * @typedef {import('micromark-util-types').Extension} Extension
+ */
- findParent: while (true) {
- if (!(parent !== null)) {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- var parentStateNode = parent.stateNode;
- switch (parent.tag) {
- case HostComponent:
- currentParent = parentStateNode;
- currentParentIsContainer = false;
- break findParent;
- case HostRoot:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
- case HostPortal:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
+/** @type {Extension['document']} */
+const document = {
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.plusSign]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.dash]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit0]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit1]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit2]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit3]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit4]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit5]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit6]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit7]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit8]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit9]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.greaterThan]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_2__.blockQuote
+}
- }
+/** @type {Extension['contentInitial']} */
+const contentInitial = {
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.leftSquareBracket]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__.definition
+}
- parent = parent.return;
- }
+/** @type {Extension['flowInitial']} */
+const flowInitial = {
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__.codeIndented,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.virtualSpace]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__.codeIndented,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__.codeIndented
+}
- currentParentIsValid = true;
- }
+/** @type {Extension['flow']} */
+const flow = {
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.numberSign]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_5__.headingAtx,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__.thematicBreak,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.dash]: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_7__.setextUnderline, micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__.thematicBreak],
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lessThan]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_8__.htmlFlow,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.equalsTo]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_7__.setextUnderline,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.underscore]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__.thematicBreak,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.graveAccent]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_9__.codeFenced,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.tilde]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_9__.codeFenced
+}
- if (node.tag === HostComponent || node.tag === HostText) {
- commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the
- // node from the tree.
+/** @type {Extension['string']} */
+const string = {
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.ampersand]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_10__.characterReference,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_11__.characterEscape
+}
- if (currentParentIsContainer) {
- removeChildFromContainer(currentParent, node.stateNode);
- } else {
- removeChild(currentParent, node.stateNode);
- } // Don't visit children because we already visited them.
+/** @type {Extension['text']} */
+const text = {
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturn]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__.lineEnding,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lineFeed]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__.lineEnding,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturnLineFeed]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__.lineEnding,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.exclamationMark]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_13__.labelStartImage,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.ampersand]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_10__.characterReference,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__.attention,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lessThan]: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_15__.autolink, micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_16__.htmlText],
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.leftSquareBracket]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_17__.labelStartLink,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash]: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_18__.hardBreakEscape, micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_11__.characterEscape],
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.rightSquareBracket]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_19__.labelEnd,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.underscore]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__.attention,
+ [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.graveAccent]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_20__.codeText
+}
- } else if (node.tag === HostPortal) {
- if (node.child !== null) {
- // When we go into a portal, it becomes the parent to remove from.
- // We will reassign it back when we pop the portal on the way up.
- currentParent = node.stateNode.containerInfo;
- currentParentIsContainer = true; // Visit children because portals might contain host components.
+/** @type {Extension['insideSpan']} */
+const insideSpan = {null: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__.attention, _initialize_text_js__WEBPACK_IMPORTED_MODULE_21__.resolver]}
- node.child.return = node;
- node = node.child;
- continue;
- }
- } else {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.
+/** @type {Extension['attentionMarkers']} */
+const attentionMarkers = {null: [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk, micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.underscore]}
- if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- }
+/** @type {Extension['disable']} */
+const disable = {null: []}
- if (node === current) {
- return;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === current) {
- return;
- }
+/***/ }),
- node = node.return;
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/create-tokenizer.js":
+/*!****************************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/create-tokenizer.js ***!
+ \****************************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (node.tag === HostPortal) {
- // When we go out of the portal, we need to restore the parent.
- // Since we don't keep a stack of them, we will search for it.
- currentParentIsValid = false;
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "createTokenizer": () => (/* binding */ createTokenizer)
+/* harmony export */ });
+/* harmony import */ var power_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! power-assert */ "./node_modules/power-assert/index.js");
+/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ "./node_modules/react-markdown/node_modules/debug/src/index.js");
+/* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-character */ "./node_modules/micromark-util-character/dev/index.js");
+/* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-chunked */ "./node_modules/micromark-util-chunked/dev/index.js");
+/* harmony import */ var micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-resolve-all */ "./node_modules/micromark-util-resolve-all/index.js");
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-util-symbol/values.js */ "./node_modules/micromark-util-symbol/values.js");
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Chunk} Chunk
+ * @typedef {import('micromark-util-types').Point} Point
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').Effects} Effects
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').ParseContext} ParseContext
+ */
- node.sibling.return = node.return;
- node = node.sibling;
- }
-}
+/**
+ * @typedef Info
+ * @property {() => void} restore
+ * @property {number} from
+ *
+ * @callback ReturnHandle
+ * Handle a successful run.
+ * @param {Construct} construct
+ * @param {Info} info
+ * @returns {void}
+ */
-function commitDeletion(finishedRoot, current, renderPriorityLevel) {
- {
- // Recursively delete all host nodes from the parent.
- // Detach refs and call componentWillUnmount() on the whole subtree.
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
- }
- detachFiber(current);
-}
-function commitWork(current, finishedWork) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- // Layout effects are destroyed during the mutation phase so that all
- // destroy functions for all fibers are called before any create functions.
- // This prevents sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
- return;
- }
- case ClassComponent:
- {
- return;
- }
- case HostComponent:
- {
- var instance = finishedWork.stateNode;
- if (instance != null) {
- // Commit the work prepared earlier.
- var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
- var oldProps = current !== null ? current.memoizedProps : newProps;
- var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.
- var updatePayload = finishedWork.updateQueue;
- finishedWork.updateQueue = null;
+const debug = debug__WEBPACK_IMPORTED_MODULE_1__('micromark')
- if (updatePayload !== null) {
- commitUpdate(instance, updatePayload, type, oldProps, newProps);
- }
- }
+/**
+ * Create a tokenizer.
+ * Tokenizers deal with one type of data (e.g., containers, flow, text).
+ * The parser is the object dealing with it all.
+ * `initialize` works like other constructs, except that only its `tokenize`
+ * function is used, in which case it doesn’t receive an `ok` or `nok`.
+ * `from` can be given to set the point before the first character, although
+ * when further lines are indented, they must be set with `defineSkip`.
+ *
+ * @param {ParseContext} parser
+ * @param {InitialConstruct} initialize
+ * @param {Omit} [from]
+ * @returns {TokenizeContext}
+ */
+function createTokenizer(parser, initialize, from) {
+ /** @type {Point} */
+ let point = Object.assign(
+ from ? Object.assign({}, from) : {line: 1, column: 1, offset: 0},
+ {_index: 0, _bufferIndex: -1}
+ )
+ /** @type {Record} */
+ const columnStart = {}
+ /** @type {Construct[]} */
+ const resolveAllConstructs = []
+ /** @type {Chunk[]} */
+ let chunks = []
+ /** @type {Token[]} */
+ let stack = []
+ /** @type {boolean|undefined} */
+ let consumed = true
- return;
- }
+ /**
+ * Tools used for tokenizing.
+ *
+ * @type {Effects}
+ */
+ const effects = {
+ consume,
+ enter,
+ exit,
+ attempt: constructFactory(onsuccessfulconstruct),
+ check: constructFactory(onsuccessfulcheck),
+ interrupt: constructFactory(onsuccessfulcheck, {interrupt: true})
+ }
- case HostText:
- {
- if (!(finishedWork.stateNode !== null)) {
- {
- throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
+ /**
+ * State and tools for resolving and serializing.
+ *
+ * @type {TokenizeContext}
+ */
+ const context = {
+ previous: micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof,
+ code: micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof,
+ containerState: {},
+ events: [],
+ parser,
+ sliceStream,
+ sliceSerialize,
+ now,
+ defineSkip,
+ write
+ }
- var textInstance = finishedWork.stateNode;
- var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
+ /**
+ * The state function.
+ *
+ * @type {State|void}
+ */
+ let state = initialize.tokenize.call(context, effects)
- var oldText = current !== null ? current.memoizedProps : newText;
- commitTextUpdate(textInstance, oldText, newText);
- return;
- }
+ /**
+ * Track which character we expect to be consumed, to catch bugs.
+ *
+ * @type {Code}
+ */
+ let expectedCode
- case HostRoot:
- {
- {
- var _root = finishedWork.stateNode;
+ if (initialize.resolveAll) {
+ resolveAllConstructs.push(initialize)
+ }
- if (_root.hydrate) {
- // We've just hydrated. No need to hydrate again.
- _root.hydrate = false;
- commitHydratedContainer(_root.containerInfo);
- }
- }
+ return context
- return;
- }
+ /** @type {TokenizeContext['write']} */
+ function write(slice) {
+ chunks = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__.push)(chunks, slice)
- case Profiler:
- {
- return;
- }
+ main()
- case SuspenseComponent:
- {
- commitSuspenseComponent(finishedWork);
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
+ // Exit if we’re not done, resolve might change stuff.
+ if (chunks[chunks.length - 1] !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof) {
+ return []
+ }
- case SuspenseListComponent:
- {
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
+ addResult(initialize, 0)
- case IncompleteClassComponent:
- {
- return;
- }
+ // Otherwise, resolve, and exit.
+ context.events = (0,micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_4__.resolveAll)(resolveAllConstructs, context.events, context)
+
+ return context.events
}
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
+ //
+ // Tools.
+ //
+
+ /** @type {TokenizeContext['sliceSerialize']} */
+ function sliceSerialize(token, expandTabs) {
+ return serializeChunks(sliceStream(token), expandTabs)
}
-}
-function commitSuspenseComponent(finishedWork) {
- var newState = finishedWork.memoizedState;
- var newDidTimeout;
- var primaryChildParent = finishedWork;
+ /** @type {TokenizeContext['sliceStream']} */
+ function sliceStream(token) {
+ return sliceChunks(chunks, token)
+ }
- if (newState === null) {
- newDidTimeout = false;
- } else {
- newDidTimeout = true;
- primaryChildParent = finishedWork.child;
- markCommitTimeOfFallback();
+ /** @type {TokenizeContext['now']} */
+ function now() {
+ return Object.assign({}, point)
}
- if ( primaryChildParent !== null) {
- hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
+ /** @type {TokenizeContext['defineSkip']} */
+ function defineSkip(value) {
+ columnStart[value.line] = value.column
+ accountForPotentialSkip()
+ debug('position: define skip: `%j`', point)
}
-}
-function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
+ //
+ // State management.
+ //
- var newState = finishedWork.memoizedState;
+ /**
+ * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by
+ * `consume`).
+ * Here is where we walk through the chunks, which either include strings of
+ * several characters, or numerical character codes.
+ * The reason to do this in a loop instead of a call is so the stack can
+ * drain.
+ *
+ * @returns {void}
+ */
+ function main() {
+ /** @type {number} */
+ let chunkIndex
- if (newState === null) {
- var current = finishedWork.alternate;
+ while (point._index < chunks.length) {
+ const chunk = chunks[point._index]
- if (current !== null) {
- var prevState = current.memoizedState;
+ // If we’re in a buffer chunk, loop through it.
+ if (typeof chunk === 'string') {
+ chunkIndex = point._index
- if (prevState !== null) {
- var suspenseInstance = prevState.dehydrated;
+ if (point._bufferIndex < 0) {
+ point._bufferIndex = 0
+ }
- if (suspenseInstance !== null) {
- commitHydratedSuspenseInstance(suspenseInstance);
+ while (
+ point._index === chunkIndex &&
+ point._bufferIndex < chunk.length
+ ) {
+ go(chunk.charCodeAt(point._bufferIndex))
}
+ } else {
+ go(chunk)
}
}
}
-}
-function attachSuspenseRetryListeners(finishedWork) {
- // If this boundary just timed out, then it will have a set of thenables.
- // For each thenable, attach a listener so that when it resolves, React
- // attempts to re-render the boundary in the primary (pre-timeout) state.
- var thenables = finishedWork.updateQueue;
-
- if (thenables !== null) {
- finishedWork.updateQueue = null;
- var retryCache = finishedWork.stateNode;
+ /**
+ * Deal with one code.
+ *
+ * @param {Code} code
+ * @returns {void}
+ */
+ function go(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.strictEqual(consumed, true, 'expected character to be consumed')
+ consumed = undefined
+ debug('main: passing `%s` to %s', code, state && state.name)
+ expectedCode = code
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(typeof state === 'function', 'expected state')
+ state = state(code)
+ }
+
+ /** @type {Effects['consume']} */
+ function consume(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.strictEqual(
+ code,
+ expectedCode,
+ 'expected given code to equal expected code'
+ )
+
+ debug('consume: `%s`', code)
+
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.strictEqual(
+ consumed,
+ undefined,
+ 'expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used'
+ )
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ code === null
+ ? context.events.length === 0 ||
+ context.events[context.events.length - 1][0] === 'exit'
+ : context.events[context.events.length - 1][0] === 'enter',
+ 'expected last token to be open'
+ )
+
+ if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
+ point.line++
+ point.column = 1
+ point.offset += code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.carriageReturnLineFeed ? 2 : 1
+ accountForPotentialSkip()
+ debug('position: after eol: `%j`', point)
+ } else if (code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.virtualSpace) {
+ point.column++
+ point.offset++
+ }
+
+ // Not in a string chunk.
+ if (point._bufferIndex < 0) {
+ point._index++
+ } else {
+ point._bufferIndex++
- if (retryCache === null) {
- retryCache = finishedWork.stateNode = new PossiblyWeakSet();
+ // At end of string chunk.
+ // @ts-expect-error Points w/ non-negative `_bufferIndex` reference
+ // strings.
+ if (point._bufferIndex === chunks[point._index].length) {
+ point._bufferIndex = -1
+ point._index++
+ }
}
- thenables.forEach(function (thenable) {
- // Memoize using the boundary fiber to prevent redundant listeners.
- var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
-
- if (!retryCache.has(thenable)) {
- {
- if (thenable.__reactDoNotTraceInteractions !== true) {
- retry = tracing.unstable_wrap(retry);
- }
- }
+ // Expose the previous character.
+ context.previous = code
- retryCache.add(thenable);
- thenable.then(retry, retry);
- }
- });
+ // Mark as consumed.
+ consumed = true
}
-}
-function commitResetTextContent(current) {
+ /** @type {Effects['enter']} */
+ function enter(type, fields) {
+ /** @type {Token} */
+ // @ts-expect-error Patch instead of assign required fields to help GC.
+ const token = fields || {}
+ token.type = type
+ token.start = now()
- resetTextContent(current.stateNode);
-}
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(typeof type === 'string', 'expected string type')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.notStrictEqual(type.length, 0, 'expected non-empty string')
+ debug('enter: `%s`', type)
-var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
+ context.events.push(['enter', token, context])
-function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.
+ stack.push(token)
- update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
- // being called "element".
+ return token
+ }
- update.payload = {
- element: null
- };
- var error = errorInfo.value;
+ /** @type {Effects['exit']} */
+ function exit(type) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(typeof type === 'string', 'expected string type')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.notStrictEqual(type.length, 0, 'expected non-empty string')
- update.callback = function () {
- onUncaughtError(error);
- logError(fiber, errorInfo);
- };
+ const token = stack.pop()
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(token, 'cannot close w/o open tokens')
+ token.end = now()
- return update;
-}
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.strictEqual(
+ type,
+ token.type,
+ 'expected exit token to match current token'
+ )
-function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null);
- update.tag = CaptureUpdate;
- var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ !(
+ token.start._index === token.end._index &&
+ token.start._bufferIndex === token.end._bufferIndex
+ ),
+ 'expected non-empty token (`' + type + '`)'
+ )
- if (typeof getDerivedStateFromError === 'function') {
- var error$1 = errorInfo.value;
+ debug('exit: `%s`', token.type)
+ context.events.push(['exit', token, context])
- update.payload = function () {
- logError(fiber, errorInfo);
- return getDerivedStateFromError(error$1);
- };
+ return token
}
- var inst = fiber.stateNode;
+ /**
+ * Use results.
+ *
+ * @type {ReturnHandle}
+ */
+ function onsuccessfulconstruct(construct, info) {
+ addResult(construct, info.from)
+ }
- if (inst !== null && typeof inst.componentDidCatch === 'function') {
- update.callback = function callback() {
- {
- markFailedErrorBoundaryForHotReloading(fiber);
+ /**
+ * Discard results.
+ *
+ * @type {ReturnHandle}
+ */
+ function onsuccessfulcheck(_, info) {
+ info.restore()
+ }
+
+ /**
+ * Factory to attempt/check/interrupt.
+ *
+ * @param {ReturnHandle} onreturn
+ * @param {Record} [fields]
+ */
+ function constructFactory(onreturn, fields) {
+ return hook
+
+ /**
+ * Handle either an object mapping codes to constructs, a list of
+ * constructs, or a single construct.
+ *
+ * @param {Construct|Construct[]|ConstructRecord} constructs
+ * @param {State} returnState
+ * @param {State} [bogusState]
+ * @returns {State}
+ */
+ function hook(constructs, returnState, bogusState) {
+ /** @type {Construct[]} */
+ let listOfConstructs
+ /** @type {number} */
+ let constructIndex
+ /** @type {Construct} */
+ let currentConstruct
+ /** @type {Info} */
+ let info
+
+ return Array.isArray(constructs)
+ ? /* c8 ignore next 1 */
+ handleListOfConstructs(constructs)
+ : 'tokenize' in constructs
+ ? // @ts-expect-error Looks like a construct.
+ handleListOfConstructs([constructs])
+ : handleMapOfConstructs(constructs)
+
+ /**
+ * Handle a list of construct.
+ *
+ * @param {ConstructRecord} map
+ * @returns {State}
+ */
+ function handleMapOfConstructs(map) {
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ const def = code !== null && map[code]
+ const all = code !== null && map.null
+ const list = [
+ // To do: add more extension tests.
+ /* c8 ignore next 2 */
+ ...(Array.isArray(def) ? def : def ? [def] : []),
+ ...(Array.isArray(all) ? all : all ? [all] : [])
+ ]
+
+ return handleListOfConstructs(list)(code)
+ }
}
- if (typeof getDerivedStateFromError !== 'function') {
- // To preserve the preexisting retry behavior of error boundaries,
- // we keep track of which ones already failed during this batch.
- // This gets reset before we yield back to the browser.
- // TODO: Warn in strict mode if getDerivedStateFromError is
- // not defined.
- markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
+ /**
+ * Handle a list of construct.
+ *
+ * @param {Construct[]} list
+ * @returns {State}
+ */
+ function handleListOfConstructs(list) {
+ listOfConstructs = list
+ constructIndex = 0
+
+ if (list.length === 0) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(bogusState, 'expected `bogusState` to be given')
+ return bogusState
+ }
- logError(fiber, errorInfo);
+ return handleConstruct(list[constructIndex])
}
- var error$1 = errorInfo.value;
- var stack = errorInfo.stack;
- this.componentDidCatch(error$1, {
- componentStack: stack !== null ? stack : ''
- });
+ /**
+ * Handle a single construct.
+ *
+ * @param {Construct} construct
+ * @returns {State}
+ */
+ function handleConstruct(construct) {
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ // To do: not needed to store if there is no bogus state, probably?
+ // Currently doesn’t work because `inspect` in document does a check
+ // w/o a bogus, which doesn’t make sense. But it does seem to help perf
+ // by not storing.
+ info = store()
+ currentConstruct = construct
+
+ if (!construct.partial) {
+ context.currentConstruct = construct
+ }
- {
- if (typeof getDerivedStateFromError !== 'function') {
- // If componentDidCatch is the only error boundary method defined,
- // then it needs to call setState to recover from errors.
- // If no state update is scheduled then the boundary will swallow the error.
- if (fiber.expirationTime !== Sync) {
- error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
+ if (
+ construct.name &&
+ context.parser.constructs.disable.null.includes(construct.name)
+ ) {
+ return nok(code)
}
+
+ return construct.tokenize.call(
+ // If we do have fields, create an object w/ `context` as its
+ // prototype.
+ // This allows a “live binding”, which is needed for `interrupt`.
+ fields ? Object.assign(Object.create(context), fields) : context,
+ effects,
+ ok,
+ nok
+ )(code)
}
}
- };
- } else {
- update.callback = function () {
- markFailedErrorBoundaryForHotReloading(fiber);
- };
+
+ /** @type {State} */
+ function ok(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.strictEqual(code, expectedCode, 'expected code')
+ consumed = true
+ onreturn(currentConstruct, info)
+ return returnState
+ }
+
+ /** @type {State} */
+ function nok(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__.strictEqual(code, expectedCode, 'expected code')
+ consumed = true
+ info.restore()
+
+ if (++constructIndex < listOfConstructs.length) {
+ return handleConstruct(listOfConstructs[constructIndex])
+ }
+
+ return bogusState
+ }
+ }
}
- return update;
-}
+ /**
+ * @param {Construct} construct
+ * @param {number} from
+ * @returns {void}
+ */
+ function addResult(construct, from) {
+ if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
+ resolveAllConstructs.push(construct)
+ }
-function attachPingListener(root, renderExpirationTime, thenable) {
- // Attach a listener to the promise to "ping" the root and retry. But
- // only if one does not already exist for the current render expiration
- // time (which acts like a "thread ID" here).
- var pingCache = root.pingCache;
- var threadIDs;
+ if (construct.resolve) {
+ (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__.splice)(
+ context.events,
+ from,
+ context.events.length - from,
+ construct.resolve(context.events.slice(from), context)
+ )
+ }
- if (pingCache === null) {
- pingCache = root.pingCache = new PossiblyWeakMap$1();
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
- } else {
- threadIDs = pingCache.get(thenable);
+ if (construct.resolveTo) {
+ context.events = construct.resolveTo(context.events, context)
+ }
- if (threadIDs === undefined) {
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ construct.partial ||
+ context.events.length === 0 ||
+ context.events[context.events.length - 1][0] === 'exit',
+ 'expected last token to end'
+ )
+ }
+
+ /**
+ * Store state.
+ *
+ * @returns {Info}
+ */
+ function store() {
+ const startPoint = now()
+ const startPrevious = context.previous
+ const startCurrentConstruct = context.currentConstruct
+ const startEventsIndex = context.events.length
+ const startStack = Array.from(stack)
+
+ return {restore, from: startEventsIndex}
+
+ /**
+ * Restore state.
+ *
+ * @returns {void}
+ */
+ function restore() {
+ point = startPoint
+ context.previous = startPrevious
+ context.currentConstruct = startCurrentConstruct
+ context.events.length = startEventsIndex
+ stack = startStack
+ accountForPotentialSkip()
+ debug('position: restore: `%j`', point)
}
}
- if (!threadIDs.has(renderExpirationTime)) {
- // Memoize using the thread ID to prevent redundant listeners.
- threadIDs.add(renderExpirationTime);
- var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
- thenable.then(ping, ping);
+ /**
+ * Move the current point a bit forward in the line when it’s on a column
+ * skip.
+ *
+ * @returns {void}
+ */
+ function accountForPotentialSkip() {
+ if (point.line in columnStart && point.column < 2) {
+ point.column = columnStart[point.line]
+ point.offset += columnStart[point.line] - 1
+ }
}
}
-function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
- // The source fiber did not complete.
- sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.
+/**
+ * Get the chunks from a slice of chunks in the range of a token.
+ *
+ * @param {Chunk[]} chunks
+ * @param {Pick} token
+ * @returns {Chunk[]}
+ */
+function sliceChunks(chunks, token) {
+ const startIndex = token.start._index
+ const startBufferIndex = token.start._bufferIndex
+ const endIndex = token.end._index
+ const endBufferIndex = token.end._bufferIndex
+ /** @type {Chunk[]} */
+ let view
+
+ if (startIndex === endIndex) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(endBufferIndex > -1, 'expected non-negative end buffer index')
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(startBufferIndex > -1, 'expected non-negative start buffer index')
+ // @ts-expect-error `_bufferIndex` is used on string chunks.
+ view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]
+ } else {
+ view = chunks.slice(startIndex, endIndex)
- sourceFiber.firstEffect = sourceFiber.lastEffect = null;
+ if (startBufferIndex > -1) {
+ // @ts-expect-error `_bufferIndex` is used on string chunks.
+ view[0] = view[0].slice(startBufferIndex)
+ }
- if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
- // This is a thenable.
- var thenable = value;
+ if (endBufferIndex > 0) {
+ // @ts-expect-error `_bufferIndex` is used on string chunks.
+ view.push(chunks[endIndex].slice(0, endBufferIndex))
+ }
+ }
- if ((sourceFiber.mode & BlockingMode) === NoMode) {
- // Reset the memoizedState to what it was before we attempted
- // to render it.
- var currentSource = sourceFiber.alternate;
+ return view
+}
- if (currentSource) {
- sourceFiber.updateQueue = currentSource.updateQueue;
- sourceFiber.memoizedState = currentSource.memoizedState;
- sourceFiber.expirationTime = currentSource.expirationTime;
- } else {
- sourceFiber.updateQueue = null;
- sourceFiber.memoizedState = null;
- }
- }
+/**
+ * Get the string value of a slice of chunks.
+ *
+ * @param {Chunk[]} chunks
+ * @param {boolean} [expandTabs=false]
+ * @returns {string}
+ */
+function serializeChunks(chunks, expandTabs) {
+ let index = -1
+ /** @type {string[]} */
+ const result = []
+ /** @type {boolean|undefined} */
+ let atTab
+
+ while (++index < chunks.length) {
+ const chunk = chunks[index]
+ /** @type {string} */
+ let value
+
+ if (typeof chunk === 'string') {
+ value = chunk
+ } else
+ switch (chunk) {
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.carriageReturn: {
+ value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.cr
+
+ break
+ }
- var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.lineFeed: {
+ value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.lf
- var _workInProgress = returnFiber;
+ break
+ }
- do {
- if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
- // Found the nearest boundary.
- // Stash the promise on the boundary fiber. If the boundary times out, we'll
- // attach another listener to flip the boundary back to its normal state.
- var thenables = _workInProgress.updateQueue;
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.carriageReturnLineFeed: {
+ value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.cr + micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.lf
- if (thenables === null) {
- var updateQueue = new Set();
- updateQueue.add(thenable);
- _workInProgress.updateQueue = updateQueue;
- } else {
- thenables.add(thenable);
- } // If the boundary is outside of blocking mode, we should *not*
- // suspend the commit. Pretend as if the suspended component rendered
- // null and keep rendering. In the commit phase, we'll schedule a
- // subsequent synchronous update to re-render the Suspense.
- //
- // Note: It doesn't matter whether the component that suspended was
- // inside a blocking mode tree. If the Suspense is outside of it, we
- // should *not* suspend the commit.
+ break
+ }
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.horizontalTab: {
+ value = expandTabs ? micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.space : micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.ht
- if ((_workInProgress.mode & BlockingMode) === NoMode) {
- _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.
- // But we shouldn't call any lifecycle methods or callbacks. Remove
- // all lifecycle effect tags.
+ break
+ }
- sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.virtualSpace: {
+ if (!expandTabs && atTab) continue
+ value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.space
- if (sourceFiber.tag === ClassComponent) {
- var currentSourceFiber = sourceFiber.alternate;
+ break
+ }
- if (currentSourceFiber === null) {
- // This is a new mount. Change the tag so it's not mistaken for a
- // completed class component. For example, we should not call
- // componentWillUnmount if it is deleted.
- sourceFiber.tag = IncompleteClassComponent;
- } else {
- // When we try rendering again, we should not reuse the current fiber,
- // since it's known to be in an inconsistent state. Use a force update to
- // prevent a bail out.
- var update = createUpdate(Sync, null);
- update.tag = ForceUpdate;
- enqueueUpdate(sourceFiber, update);
- }
- } // The source fiber did not complete. Mark it with Sync priority to
- // indicate that it still has pending work.
+ default: {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(typeof chunk === 'number', 'expected number')
+ // Currently only replacement character.
+ value = String.fromCharCode(chunk)
+ }
+ }
+ atTab = chunk === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.horizontalTab
+ result.push(value)
+ }
- sourceFiber.expirationTime = Sync; // Exit without suspending.
+ return result.join('')
+}
- return;
- } // Confirmed that the boundary is in a concurrent mode tree. Continue
- // with the normal suspend path.
- //
- // After this we'll use a set of heuristics to determine whether this
- // render pass will run to completion or restart or "suspend" the commit.
- // The actual logic for this is spread out in different places.
- //
- // This first principle is that if we're going to suspend when we complete
- // a root, then we should also restart if we get an update or ping that
- // might unsuspend it, and vice versa. The only reason to suspend is
- // because you think you might want to restart before committing. However,
- // it doesn't make sense to restart only while in the period we're suspended.
- //
- // Restarting too aggressively is also not good because it starves out any
- // intermediate loading state. So we use heuristics to determine when.
- // Suspense Heuristics
- //
- // If nothing threw a Promise or all the same fallbacks are already showing,
- // then don't suspend/restart.
- //
- // If this is an initial render of a new tree of Suspense boundaries and
- // those trigger a fallback, then don't suspend/restart. We want to ensure
- // that we can show the initial loading state as quickly as possible.
- //
- // If we hit a "Delayed" case, such as when we'd switch from content back into
- // a fallback, then we should always suspend/restart. SuspenseConfig applies to
- // this case. If none is defined, JND is used instead.
- //
- // If we're already showing a fallback and it gets "retried", allowing us to show
- // another level, but there's still an inner boundary that would show a fallback,
- // then we suspend/restart for 500ms since the last time we showed a fallback
- // anywhere in the tree. This effectively throttles progressive loading into a
- // consistent train of commits. This also gives us an opportunity to restart to
- // get to the completed state slightly earlier.
- //
- // If there's ambiguity due to batching it's resolved in preference of:
- // 1) "delayed", 2) "initial render", 3) "retry".
- //
- // We want to ensure that a "busy" state doesn't get force committed. We want to
- // ensure that new initial loading states can commit as soon as possible.
+
+/***/ }),
+
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/content.js":
+/*!******************************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/content.js ***!
+ \******************************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "content": () => (/* binding */ content)
+/* harmony export */ });
+/* harmony import */ var power_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! power-assert */ "./node_modules/power-assert/index.js");
+/* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-factory-space */ "./node_modules/micromark-factory-space/dev/index.js");
+/* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-character */ "./node_modules/micromark-util-character/dev/index.js");
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "./node_modules/micromark-util-symbol/constants.js");
+/* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "./node_modules/micromark-util-symbol/types.js");
+/**
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').State} State
+ */
- attachPingListener(root, renderExpirationTime, thenable);
- _workInProgress.effectTag |= ShouldCapture;
- _workInProgress.expirationTime = renderExpirationTime;
- return;
- } // This boundary already captured during this render. Continue to the next
- // boundary.
- _workInProgress = _workInProgress.return;
- } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
- // TODO: Use invariant so the message is stripped in prod?
- value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
- } // We didn't find a boundary that could handle this type of exception. Start
- // over and traverse parent path again, this time treating the exception
- // as an error.
- renderDidError();
- value = createCapturedValue(value, sourceFiber);
- var workInProgress = returnFiber;
+/** @type {InitialConstruct} */
+const content = {tokenize: initializeContent}
- do {
- switch (workInProgress.tag) {
- case HostRoot:
- {
- var _errorInfo = value;
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime;
+/** @type {Initializer} */
+function initializeContent(effects) {
+ const contentStart = effects.attempt(
+ this.parser.constructs.contentInitial,
+ afterContentStartConstruct,
+ paragraphInitial
+ )
+ /** @type {Token} */
+ let previous
- var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
+ return contentStart
- enqueueCapturedUpdate(workInProgress, _update);
- return;
- }
+ /** @type {State} */
+ function afterContentStartConstruct(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code),
+ 'expected eol or eof'
+ )
- case ClassComponent:
- // Capture and retry
- var errorInfo = value;
- var ctor = workInProgress.type;
- var instance = workInProgress.stateNode;
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
+ effects.consume(code)
+ return
+ }
- if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state
+ effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.lineEnding)
+ effects.consume(code)
+ effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.lineEnding)
+ return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(effects, contentStart, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.linePrefix)
+ }
- var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
+ /** @type {State} */
+ function paragraphInitial(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof && !(0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code),
+ 'expected anything other than a line ending or EOF'
+ )
+ effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.paragraph)
+ return lineStart(code)
+ }
- enqueueCapturedUpdate(workInProgress, _update2);
- return;
- }
+ /** @type {State} */
+ function lineStart(code) {
+ const token = effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkText, {
+ contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.contentTypeText,
+ previous
+ })
- break;
+ if (previous) {
+ previous.next = token
}
- workInProgress = workInProgress.return;
- } while (workInProgress !== null);
-}
+ previous = token
-var ceil = Math.ceil;
-var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
- ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
- IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
-var NoContext =
-/* */
-0;
-var BatchedContext =
-/* */
-1;
-var EventContext =
-/* */
-2;
-var DiscreteEventContext =
-/* */
-4;
-var LegacyUnbatchedContext =
-/* */
-8;
-var RenderContext =
-/* */
-16;
-var CommitContext =
-/* */
-32;
-var RootIncomplete = 0;
-var RootFatalErrored = 1;
-var RootErrored = 2;
-var RootSuspended = 3;
-var RootSuspendedWithDelay = 4;
-var RootCompleted = 5;
-// Describes where we are in the React execution stack
-var executionContext = NoContext; // The root we're working on
+ return data(code)
+ }
-var workInProgressRoot = null; // The fiber we're working on
+ /** @type {State} */
+ function data(code) {
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
+ effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkText)
+ effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.paragraph)
+ effects.consume(code)
+ return
+ }
-var workInProgress = null; // The expiration time we're rendering
+ if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code)) {
+ effects.consume(code)
+ effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkText)
+ return lineStart
+ }
-var renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.
+ // Data.
+ effects.consume(code)
+ return data
+ }
+}
-var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
-var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.
-// This is conceptually a time stamp but expressed in terms of an ExpirationTime
-// because we deal mostly with expiration times in the hot path, so this avoids
-// the conversion happening in the hot path.
+/***/ }),
-var workInProgressRootLatestProcessedExpirationTime = Sync;
-var workInProgressRootLatestSuspenseTimeout = Sync;
-var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only
-// includes unprocessed updates, not work in bailed out children.
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/document.js":
+/*!*******************************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/document.js ***!
+ \*******************************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.
-// This flag determines if it might be worthwhile to restart if an opportunity
-// happens latere.
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "document": () => (/* binding */ document)
+/* harmony export */ });
+/* harmony import */ var power_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! power-assert */ "./node_modules/power-assert/index.js");
+/* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-factory-space */ "./node_modules/micromark-factory-space/dev/index.js");
+/* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-character */ "./node_modules/micromark-util-character/dev/index.js");
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "./node_modules/micromark-util-symbol/constants.js");
+/* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "./node_modules/micromark-util-symbol/types.js");
+/* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-chunked */ "./node_modules/micromark-util-chunked/dev/index.js");
+/**
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Point} Point
+ */
-var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train
-// model where we don't commit new loading states in too quick succession.
+/**
+ * @typedef {Record} StackState
+ * @typedef {[Construct, StackState]} StackItem
+ */
-var globalMostRecentFallbackTime = 0;
-var FALLBACK_THROTTLE_MS = 500;
-var nextEffect = null;
-var hasUncaughtError = false;
-var firstUncaughtError = null;
-var legacyErrorBoundariesThatAlreadyFailed = null;
-var rootDoesHavePassiveEffects = false;
-var rootWithPendingPassiveEffects = null;
-var pendingPassiveEffectsRenderPriority = NoPriority;
-var pendingPassiveEffectsExpirationTime = NoWork;
-var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
-var NESTED_UPDATE_LIMIT = 50;
-var nestedUpdateCount = 0;
-var rootWithNestedUpdates = null;
-var NESTED_PASSIVE_UPDATE_LIMIT = 50;
-var nestedPassiveUpdateCount = 0;
-var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times
-// during the commit phase. This enables them to be traced across components
-// that spawn new work during render. E.g. hidden boundaries, suspended SSR
-// hydration or SuspenseList.
-var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start
-// time). However, if two updates are scheduled within the same event, we
-// should treat their start times as simultaneous, even if the actual clock
-// time has advanced between the first and second call.
-// In other words, because expiration times determine how updates are batched,
-// we want all updates of like priority that occur within the same event to
-// receive the same expiration time. Otherwise we get tearing.
-var currentEventTime = NoWork;
-function requestCurrentTimeForUpdate() {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
- // We're inside React, so it's fine to read the actual time.
- return msToExpirationTime(now());
- } // We're not inside React, so we may be in the middle of a browser event.
- if (currentEventTime !== NoWork) {
- // Use the same start time for all updates until we enter React again.
- return currentEventTime;
- } // This is the first update since React yielded. Compute a new start time.
- currentEventTime = msToExpirationTime(now());
- return currentEventTime;
-}
-function getCurrentTime() {
- return msToExpirationTime(now());
-}
-function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
- var mode = fiber.mode;
- if ((mode & BlockingMode) === NoMode) {
- return Sync;
- }
+/** @type {InitialConstruct} */
+const document = {tokenize: initializeDocument}
- var priorityLevel = getCurrentPriorityLevel();
+/** @type {Construct} */
+const containerConstruct = {tokenize: tokenizeContainer}
- if ((mode & ConcurrentMode) === NoMode) {
- return priorityLevel === ImmediatePriority ? Sync : Batched;
- }
+/** @type {Initializer} */
+function initializeDocument(effects) {
+ const self = this
+ /** @type {StackItem[]} */
+ const stack = []
+ let continued = 0
+ /** @type {TokenizeContext|undefined} */
+ let childFlow
+ /** @type {Token|undefined} */
+ let childToken
+ /** @type {number} */
+ let lineStartOffset
- if ((executionContext & RenderContext) !== NoContext) {
- // Use whatever time we're already rendering
- // TODO: Should there be a way to opt out, like with `runWithPriority`?
- return renderExpirationTime$1;
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ // First we iterate through the open blocks, starting with the root
+ // document, and descending through last children down to the last open
+ // block.
+ // Each block imposes a condition that the line must satisfy if the block is
+ // to remain open.
+ // For example, a block quote requires a `>` character.
+ // A paragraph requires a non-blank line.
+ // In this phase we may match all or just some of the open blocks.
+ // But we cannot close unmatched blocks yet, because we may have a lazy
+ // continuation line.
+ if (continued < stack.length) {
+ const item = stack[continued]
+ self.containerState = item[1]
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ item[0].continuation,
+ 'expected `continuation` to be defined on container construct'
+ )
+ return effects.attempt(
+ item[0].continuation,
+ documentContinue,
+ checkNewContainers
+ )(code)
+ }
+
+ // Done.
+ return checkNewContainers(code)
}
- var expirationTime;
+ /** @type {State} */
+ function documentContinue(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ self.containerState,
+ 'expected `containerState` to be defined after continuation'
+ )
- if (suspenseConfig !== null) {
- // Compute an expiration time based on the Suspense timeout.
- expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
- } else {
- // Compute an expiration time based on the Scheduler priority.
- switch (priorityLevel) {
- case ImmediatePriority:
- expirationTime = Sync;
- break;
+ continued++
- case UserBlockingPriority$1:
- // TODO: Rename this to computeUserBlockingExpiration
- expirationTime = computeInteractiveExpiration(currentTime);
- break;
+ // Note: this field is called `_closeFlow` but it also closes containers.
+ // Perhaps a good idea to rename it but it’s already used in the wild by
+ // extensions.
+ if (self.containerState._closeFlow) {
+ self.containerState._closeFlow = undefined
- case NormalPriority:
- case LowPriority:
- // TODO: Handle LowPriority
- // TODO: Rename this to... something better.
- expirationTime = computeAsyncExpiration(currentTime);
- break;
+ if (childFlow) {
+ closeFlow()
+ }
- case IdlePriority:
- expirationTime = Idle;
- break;
+ // Note: this algorithm for moving events around is similar to the
+ // algorithm when dealing with lazy lines in `writeToChild`.
+ const indexBeforeExits = self.events.length
+ let indexBeforeFlow = indexBeforeExits
+ /** @type {Point|undefined} */
+ let point
- default:
- {
- {
- throw Error( "Expected a valid priority level" );
- }
+ // Find the flow chunk.
+ while (indexBeforeFlow--) {
+ if (
+ self.events[indexBeforeFlow][0] === 'exit' &&
+ self.events[indexBeforeFlow][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow
+ ) {
+ point = self.events[indexBeforeFlow][1].end
+ break
}
+ }
- }
- } // If we're in the middle of rendering a tree, do not update at the same
- // expiration time that is already rendering.
- // TODO: We shouldn't have to do this if the update is on a different root.
- // Refactor computeExpirationForFiber + scheduleUpdate so we have access to
- // the root when we check for this condition.
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(point, 'could not find previous flow chunk')
+ exitContainers(continued)
- if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {
- // This is a trick to move this update into a separate batch
- expirationTime -= 1;
- }
+ // Fix positions.
+ let index = indexBeforeExits
- return expirationTime;
-}
-function scheduleUpdateOnFiber(fiber, expirationTime) {
- checkForNestedUpdates();
- warnAboutRenderPhaseUpdatesInDEV(fiber);
- var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
+ while (index < self.events.length) {
+ self.events[index][1].end = Object.assign({}, point)
+ index++
+ }
- if (root === null) {
- warnAboutUpdateOnUnmountedFiberInDEV(fiber);
- return;
- }
+ // Inject the exits earlier (they’re still also at the end).
+ (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(
+ self.events,
+ indexBeforeFlow + 1,
+ 0,
+ self.events.slice(indexBeforeExits)
+ )
- checkForInterruption(fiber, expirationTime);
- recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the
- // priority as an argument to that function and this one.
+ // Discard the duplicate exits.
+ self.events.length = index
- var priorityLevel = getCurrentPriorityLevel();
+ return checkNewContainers(code)
+ }
- if (expirationTime === Sync) {
- if ( // Check if we're inside unbatchedUpdates
- (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
- (executionContext & (RenderContext | CommitContext)) === NoContext) {
- // Register pending interactions on the root to avoid losing traced interaction data.
- schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
- // root inside of batchedUpdates should be synchronous, but layout updates
- // should be deferred until the end of the batch.
+ return start(code)
+ }
- performSyncWorkOnRoot(root);
- } else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
+ /** @type {State} */
+ function checkNewContainers(code) {
+ // Next, after consuming the continuation markers for existing blocks, we
+ // look for new block starts (e.g. `>` for a block quote).
+ // If we encounter a new block start, we close any blocks unmatched in
+ // step 1 before creating the new block as a child of the last matched
+ // block.
+ if (continued === stack.length) {
+ // No need to `check` whether there’s a container, of `exitContainers`
+ // would be moot.
+ // We can instead immediately `attempt` to parse one.
+ if (!childFlow) {
+ return documentContinued(code)
+ }
- if (executionContext === NoContext) {
- // Flush the synchronous work now, unless we're already working or inside
- // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
- // scheduleCallbackForFiber to preserve the ability to schedule a callback
- // without immediately flushing it. We only do this for user-initiated
- // updates, to preserve historical behavior of legacy mode.
- flushSyncCallbackQueue();
+ // If we have concrete content, such as block HTML or fenced code,
+ // we can’t have containers “pierce” into them, so we can immediately
+ // start.
+ if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
+ return flowStart(code)
}
+
+ // If we do have flow, it could still be a blank line,
+ // but we’d be interrupting it w/ a new container if there’s a current
+ // construct.
+ self.interrupt = Boolean(childFlow.currentConstruct)
}
- } else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
- }
- if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
- // discrete, even inside a discrete event.
- priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {
- // This is the result of a discrete event. Track the lowest priority
- // discrete update per root so we can flush them early, if needed.
- if (rootsWithPendingDiscreteUpdates === null) {
- rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);
- } else {
- var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);
+ // Check if there is a new container.
+ self.containerState = {}
+ return effects.check(
+ containerConstruct,
+ thereIsANewContainer,
+ thereIsNoNewContainer
+ )(code)
+ }
- if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {
- rootsWithPendingDiscreteUpdates.set(root, expirationTime);
- }
- }
+ /** @type {State} */
+ function thereIsANewContainer(code) {
+ if (childFlow) closeFlow()
+ exitContainers(continued)
+ return documentContinued(code)
}
-}
-var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending
-// work without treating it as a typical update that originates from an event;
-// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
-// on a fiber.
-function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
- // Update the source fiber's expiration time
- if (fiber.expirationTime < expirationTime) {
- fiber.expirationTime = expirationTime;
+ /** @type {State} */
+ function thereIsNoNewContainer(code) {
+ self.parser.lazy[self.now().line] = continued !== stack.length
+ lineStartOffset = self.now().offset
+ return flowStart(code)
}
- var alternate = fiber.alternate;
+ /** @type {State} */
+ function documentContinued(code) {
+ // Try new containers.
+ self.containerState = {}
+ return effects.attempt(
+ containerConstruct,
+ containerContinue,
+ flowStart
+ )(code)
+ }
- if (alternate !== null && alternate.expirationTime < expirationTime) {
- alternate.expirationTime = expirationTime;
- } // Walk the parent path to the root and update the child expiration time.
+ /** @type {State} */
+ function containerContinue(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ self.currentConstruct,
+ 'expected `currentConstruct` to be defined on tokenizer'
+ )
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ self.containerState,
+ 'expected `containerState` to be defined on tokenizer'
+ )
+ continued++
+ stack.push([self.currentConstruct, self.containerState])
+ // Try another.
+ return documentContinued(code)
+ }
+
+ /** @type {State} */
+ function flowStart(code) {
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof) {
+ if (childFlow) closeFlow()
+ exitContainers(0)
+ effects.consume(code)
+ return
+ }
+
+ childFlow = childFlow || self.parser.flow(self.now())
+ effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow, {
+ contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.contentTypeFlow,
+ previous: childToken,
+ _tokenizer: childFlow
+ })
+ return flowContinue(code)
+ }
- var node = fiber.return;
- var root = null;
+ /** @type {State} */
+ function flowContinue(code) {
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof) {
+ writeToChild(effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow), true)
+ exitContainers(0)
+ effects.consume(code)
+ return
+ }
- if (node === null && fiber.tag === HostRoot) {
- root = fiber.stateNode;
- } else {
- while (node !== null) {
- alternate = node.alternate;
+ if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
+ effects.consume(code)
+ writeToChild(effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow))
+ // Get ready for the next line.
+ continued = 0
+ self.interrupt = undefined
+ return start
+ }
- if (node.childExpirationTime < expirationTime) {
- node.childExpirationTime = expirationTime;
+ effects.consume(code)
+ return flowContinue
+ }
- if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
+ /**
+ * @param {Token} token
+ * @param {boolean} [eof]
+ * @returns {void}
+ */
+ function writeToChild(token, eof) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(childFlow, 'expected `childFlow` to be defined when continuing')
+ const stream = self.sliceStream(token)
+ if (eof) stream.push(null)
+ token.previous = childToken
+ if (childToken) childToken.next = token
+ childToken = token
+ childFlow.defineSkip(token.start)
+ childFlow.write(stream)
+
+ // Alright, so we just added a lazy line:
+ //
+ // ```markdown
+ // > a
+ // b.
+ //
+ // Or:
+ //
+ // > ~~~c
+ // d
+ //
+ // Or:
+ //
+ // > | e |
+ // f
+ // ```
+ //
+ // The construct in the second example (fenced code) does not accept lazy
+ // lines, so it marked itself as done at the end of its first line, and
+ // then the content construct parses `d`.
+ // Most constructs in markdown match on the first line: if the first line
+ // forms a construct, a non-lazy line can’t “unmake” it.
+ //
+ // The construct in the third example is potentially a GFM table, and
+ // those are *weird*.
+ // It *could* be a table, from the first line, if the following line
+ // matches a condition.
+ // In this case, that second line is lazy, which “unmakes” the first line
+ // and turns the whole into one content block.
+ //
+ // We’ve now parsed the non-lazy and the lazy line, and can figure out
+ // whether the lazy line started a new flow block.
+ // If it did, we exit the current containers between the two flow blocks.
+ if (self.parser.lazy[token.start.line]) {
+ let index = childFlow.events.length
+
+ while (index--) {
+ if (
+ // The token starts before the line ending…
+ childFlow.events[index][1].start.offset < lineStartOffset &&
+ // …and either is not ended yet…
+ (!childFlow.events[index][1].end ||
+ // …or ends after it.
+ childFlow.events[index][1].end.offset > lineStartOffset)
+ ) {
+ // Exit: there’s still something open, which means it’s a lazy line
+ // part of something.
+ return
}
- } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
}
- if (node.return === null && node.tag === HostRoot) {
- root = node.stateNode;
- break;
+ // Note: this algorithm for moving events around is similar to the
+ // algorithm when closing flow in `documentContinue`.
+ const indexBeforeExits = self.events.length
+ let indexBeforeFlow = indexBeforeExits
+ /** @type {boolean|undefined} */
+ let seen
+ /** @type {Point|undefined} */
+ let point
+
+ // Find the previous chunk (the one before the lazy line).
+ while (indexBeforeFlow--) {
+ if (
+ self.events[indexBeforeFlow][0] === 'exit' &&
+ self.events[indexBeforeFlow][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow
+ ) {
+ if (seen) {
+ point = self.events[indexBeforeFlow][1].end
+ break
+ }
+
+ seen = true
+ }
}
- node = node.return;
- }
- }
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(point, 'could not find previous flow chunk')
- if (root !== null) {
- if (workInProgressRoot === root) {
- // Received an update to a tree that's in the middle of rendering. Mark
- // that's unprocessed work on this root.
- markUnprocessedUpdateTime(expirationTime);
+ exitContainers(continued)
- if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
- // The root already suspended with a delay, which means this render
- // definitely won't finish. Since we have a new update, let's mark it as
- // suspended now, right before marking the incoming update. This has the
- // effect of interrupting the current render and switching to the update.
- // TODO: This happens to work when receiving an update during the render
- // phase, because of the trick inside computeExpirationForFiber to
- // subtract 1 from `renderExpirationTime` to move it into a
- // separate bucket. But we should probably model it with an exception,
- // using the same mechanism we use to force hydration of a subtree.
- // TODO: This does not account for low pri updates that were already
- // scheduled before the root started rendering. Need to track the next
- // pending expiration time (perhaps by backtracking the return path) and
- // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.
- markRootSuspendedAtTime(root, renderExpirationTime$1);
+ // Fix positions.
+ index = indexBeforeExits
+
+ while (index < self.events.length) {
+ self.events[index][1].end = Object.assign({}, point)
+ index++
}
- } // Mark that the root has a pending update.
+ // Inject the exits earlier (they’re still also at the end).
+ (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(
+ self.events,
+ indexBeforeFlow + 1,
+ 0,
+ self.events.slice(indexBeforeExits)
+ )
- markRootUpdatedAtTime(root, expirationTime);
+ // Discard the duplicate exits.
+ self.events.length = index
+ }
}
- return root;
-}
+ /**
+ * @param {number} size
+ * @returns {void}
+ */
+ function exitContainers(size) {
+ let index = stack.length
-function getNextRootExpirationTimeToWorkOn(root) {
- // Determines the next expiration time that the root should render, taking
- // into account levels that may be suspended, or levels that may have
- // received a ping.
- var lastExpiredTime = root.lastExpiredTime;
+ // Exit open containers.
+ while (index-- > size) {
+ const entry = stack[index]
+ self.containerState = entry[1]
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ entry[0].exit,
+ 'expected `exit` to be defined on container construct'
+ )
+ entry[0].exit.call(self, effects)
+ }
- if (lastExpiredTime !== NoWork) {
- return lastExpiredTime;
- } // "Pending" refers to any update that hasn't committed yet, including if it
- // suspended. The "suspended" range is therefore a subset.
+ stack.length = size
+ }
+ function closeFlow() {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ self.containerState,
+ 'expected `containerState` to be defined when closing flow'
+ )
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(childFlow, 'expected `childFlow` to be defined when closing it')
+ childFlow.write([micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof])
+ childToken = undefined
+ childFlow = undefined
+ self.containerState._closeFlow = undefined
+ }
+}
- var firstPendingTime = root.firstPendingTime;
+/** @type {Tokenizer} */
+function tokenizeContainer(effects, ok, nok) {
+ return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__.factorySpace)(
+ effects,
+ effects.attempt(this.parser.constructs.document, ok, nok),
+ micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix,
+ this.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.tabSize
+ )
+}
- if (!isRootSuspendedAtTime(root, firstPendingTime)) {
- // The highest priority pending time is not suspended. Let's work on that.
- return firstPendingTime;
- } // If the first pending time is suspended, check if there's a lower priority
- // pending level that we know about. Or check if we received a ping. Work
- // on whichever is higher priority.
+/***/ }),
- var lastPingedTime = root.lastPingedTime;
- var nextKnownPendingLevel = root.nextKnownPendingLevel;
- var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/flow.js":
+/*!***************************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/flow.js ***!
+ \***************************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if ( nextLevel <= Idle && firstPendingTime !== nextLevel) {
- // Don't work on Idle/Never priority unless everything else is committed.
- return NoWork;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "flow": () => (/* binding */ flow)
+/* harmony export */ });
+/* harmony import */ var power_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! power-assert */ "./node_modules/power-assert/index.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/blank-line.js");
+/* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-core-commonmark */ "./node_modules/micromark-core-commonmark/dev/lib/content.js");
+/* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-factory-space */ "./node_modules/micromark-factory-space/dev/index.js");
+/* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-util-character */ "./node_modules/micromark-util-character/dev/index.js");
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "./node_modules/micromark-util-symbol/types.js");
+/**
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').State} State
+ */
- return nextLevel;
-} // Use this function to schedule a task for a root. There's only one task per
-// root; if a task was already scheduled, we'll check to make sure the
-// expiration time of the existing task is the same as the expiration time of
-// the next level that the root has work on. This function is called on every
-// update, and right before exiting a task.
-function ensureRootIsScheduled(root) {
- var lastExpiredTime = root.lastExpiredTime;
- if (lastExpiredTime !== NoWork) {
- // Special case: Expired work should flush synchronously.
- root.callbackExpirationTime = Sync;
- root.callbackPriority = ImmediatePriority;
- root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- return;
- }
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
- var existingCallbackNode = root.callbackNode;
- if (expirationTime === NoWork) {
- // There's nothing to work on.
- if (existingCallbackNode !== null) {
- root.callbackNode = null;
- root.callbackExpirationTime = NoWork;
- root.callbackPriority = NoPriority;
- }
- return;
- } // TODO: If this is an update, we already read the current time. Pass the
- // time as an argument.
+/** @type {InitialConstruct} */
+const flow = {tokenize: initializeFlow}
- var currentTime = requestCurrentTimeForUpdate();
- var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and
- // expiration time. Otherwise, we'll cancel it and schedule a new one.
+/** @type {Initializer} */
+function initializeFlow(effects) {
+ const self = this
+ const initial = effects.attempt(
+ // Try to parse a blank line.
+ micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.blankLine,
+ atBlankEnding,
+ // Try to parse initial flow (essentially, only code).
+ effects.attempt(
+ this.parser.constructs.flowInitial,
+ afterConstruct,
+ (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_2__.factorySpace)(
+ effects,
+ effects.attempt(
+ this.parser.constructs.flow,
+ afterConstruct,
+ effects.attempt(micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__.content, afterConstruct)
+ ),
+ micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix
+ )
+ )
+ )
- if (existingCallbackNode !== null) {
- var existingCallbackPriority = root.callbackPriority;
- var existingCallbackExpirationTime = root.callbackExpirationTime;
+ return initial
- if ( // Callback must have the exact same expiration time.
- existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.
- existingCallbackPriority >= priorityLevel) {
- // Existing callback is sufficient.
- return;
- } // Need to schedule a new task.
- // TODO: Instead of scheduling a new task, we should be able to change the
- // priority of the existing one.
+ /** @type {State} */
+ function atBlankEnding(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_6__.markdownLineEnding)(code),
+ 'expected eol or eof'
+ )
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof) {
+ effects.consume(code)
+ return
+ }
- cancelCallback(existingCallbackNode);
+ effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank)
+ effects.consume(code)
+ effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank)
+ self.currentConstruct = undefined
+ return initial
}
- root.callbackExpirationTime = expirationTime;
- root.callbackPriority = priorityLevel;
- var callbackNode;
+ /** @type {State} */
+ function afterConstruct(code) {
+ power_assert__WEBPACK_IMPORTED_MODULE_0__(
+ code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_6__.markdownLineEnding)(code),
+ 'expected eol or eof'
+ )
- if (expirationTime === Sync) {
- // Sync React callbacks are scheduled on a special internal queue
- callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- } else {
- callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects
- // ordering because tasks are processed in timeout order.
- {
- timeout: expirationTimeToMs(expirationTime) - now()
- });
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof) {
+ effects.consume(code)
+ return
+ }
+
+ effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
+ effects.consume(code)
+ effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
+ self.currentConstruct = undefined
+ return initial
}
+}
- root.callbackNode = callbackNode;
-} // This is the entry point for every concurrent task, i.e. anything that
-// goes through Scheduler.
+/***/ }),
-function performConcurrentWorkOnRoot(root, didTimeout) {
- // Since we know we're in a React event, we can clear the current
- // event time. The next update will compute a new event time.
- currentEventTime = NoWork;
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/text.js":
+/*!***************************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/text.js ***!
+ \***************************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (didTimeout) {
- // The render task took too long to complete. Mark the current time as
- // expired to synchronously render all expired work in a single batch.
- var currentTime = requestCurrentTimeForUpdate();
- markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "resolver": () => (/* binding */ resolver),
+/* harmony export */ "string": () => (/* binding */ string),
+/* harmony export */ "text": () => (/* binding */ text)
+/* harmony export */ });
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "./node_modules/micromark-util-symbol/constants.js");
+/* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "./node_modules/micromark-util-symbol/types.js");
+/**
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Code} Code
+ */
- ensureRootIsScheduled(root);
- return null;
- } // Determine the next expiration time to work on, using the fields stored
- // on the root.
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
- if (expirationTime !== NoWork) {
- var originalCallbackNode = root.callbackNode;
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
+const resolver = {resolveAll: createResolver()}
+const string = initializeFactory('string')
+const text = initializeFactory('text')
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
+/**
+ * @param {'string'|'text'} field
+ * @returns {InitialConstruct}
+ */
+function initializeFactory(field) {
+ return {
+ tokenize: initializeText,
+ resolveAll: createResolver(
+ field === 'text' ? resolveAllLineSuffixes : undefined
+ )
+ }
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
+ /** @type {Initializer} */
+ function initializeText(effects) {
+ const self = this
+ const constructs = this.parser.constructs[field]
+ const text = effects.attempt(constructs, start, notText)
+ return start
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
+ /** @type {State} */
+ function start(code) {
+ return atBreak(code) ? text(code) : notText(code)
+ }
- do {
- try {
- workLoopConcurrent();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
+ /** @type {State} */
+ function notText(code) {
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof) {
+ effects.consume(code)
+ return
+ }
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
+ effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data)
+ effects.consume(code)
+ return data
+ }
- {
- popInteractions(prevInteractions);
+ /** @type {State} */
+ function data(code) {
+ if (atBreak(code)) {
+ effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data)
+ return text(code)
}
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
- }
+ // Data.
+ effects.consume(code)
+ return data
+ }
- if (workInProgress !== null) {
- // There's still work left over. Exit without committing.
- stopInterruptedWorkLoopTimer();
- } else {
- // We now have a consistent tree. The next step is either to commit it,
- // or, if something suspended, wait to commit it after a timeout.
- stopFinishedWorkLoopTimer();
- var finishedWork = root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);
+ /**
+ * @param {Code} code
+ * @returns {boolean}
+ */
+ function atBreak(code) {
+ if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof) {
+ return true
}
- ensureRootIsScheduled(root);
+ const list = constructs[code]
+ let index = -1
- if (root.callbackNode === originalCallbackNode) {
- // The task node scheduled for this root is the same one that's
- // currently executed. Need to return a continuation.
- return performConcurrentWorkOnRoot.bind(null, root);
+ if (list) {
+ while (++index < list.length) {
+ const item = list[index]
+ if (!item.previous || item.previous.call(self, self.previous)) {
+ return true
+ }
+ }
}
+
+ return false
}
}
-
- return null;
}
-function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
-
- switch (exitStatus) {
- case RootIncomplete:
- case RootFatalErrored:
- {
- {
- {
- throw Error( "Root did not complete. This is a bug in React." );
- }
+/**
+ * @param {Resolver} [extraResolver]
+ * @returns {Resolver}
+ */
+function createResolver(extraResolver) {
+ return resolveAllText
+
+ /** @type {Resolver} */
+ function resolveAllText(events, context) {
+ let index = -1
+ /** @type {number|undefined} */
+ let enter
+
+ // A rather boring computation (to merge adjacent `data` events) which
+ // improves mm performance by 29%.
+ while (++index <= events.length) {
+ if (enter === undefined) {
+ if (events[index] && events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data) {
+ enter = index
+ index++
+ }
+ } else if (!events[index] || events[index][1].type !== micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data) {
+ // Don’t do anything if there is one data token.
+ if (index !== enter + 2) {
+ events[enter][1].end = events[index - 1][1].end
+ events.splice(enter + 2, index - enter - 2)
+ index = enter + 2
}
- }
- // Flow knows about invariant, so it complains if I add a break
- // statement, but eslint doesn't know about invariant, so it complains
- // if I do. eslint-disable-next-line no-fallthrough
-
- case RootErrored:
- {
- // If this was an async render, the error may have happened due to
- // a mutation in a concurrent event. Try rendering one more time,
- // synchronously, to see if the error goes away. If there are
- // lower priority updates, let's include those, too, in case they
- // fix the inconsistency. Render at Idle to include all updates.
- // If it was Idle or Never or some not-yet-invented time, render
- // at that time.
- markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous
- // and therefore not hit this path again.
- break;
+ enter = undefined
}
+ }
- case RootSuspended:
- {
- markRootSuspendedAtTime(root, expirationTime);
- var lastSuspendedTime = root.lastSuspendedTime;
-
- if (expirationTime === lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
- } // We have an acceptable loading state. We need to figure out if we
- // should immediately commit it or wait a bit.
- // If we have processed new updates during this render, we may now
- // have a new loading state ready. We want to ensure that we commit
- // that as soon as possible.
-
-
- var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;
-
- if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // If we have not processed any new updates during this pass, then
- // this is either a retry of an existing fallback state or a
- // hidden tree. Hidden trees shouldn't be batched with other work
- // and after that's fixed it can only be a retry. We're going to
- // throttle committing retries so that we don't show too many
- // loading states too quickly.
- var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
+ return extraResolver ? extraResolver(events, context) : events
+ }
+}
- if (msUntilTimeout > 10) {
- if (workInProgressRootHasPendingPing) {
- var lastPingedTime = root.lastPingedTime;
-
- if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart
- // earlier so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
+/**
+ * A rather ugly set of instructions which again looks at chunks in the input
+ * stream.
+ * The reason to do this here is that it is *much* faster to parse in reverse.
+ * And that we can’t hook into `null` to split the line suffix before an EOF.
+ * To do: figure out if we can make this into a clean utility, or even in core.
+ * As it will be useful for GFMs literal autolink extension (and maybe even
+ * tables?)
+ *
+ * @type {Resolver}
+ */
+function resolveAllLineSuffixes(events, context) {
+ let eventIndex = -1
+
+ while (++eventIndex <= events.length) {
+ if (
+ (eventIndex === events.length ||
+ events[eventIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding) &&
+ events[eventIndex - 1][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data
+ ) {
+ const data = events[eventIndex - 1][1]
+ const chunks = context.sliceStream(data)
+ let index = chunks.length
+ let bufferIndex = -1
+ let size = 0
+ /** @type {boolean|undefined} */
+ let tabs
+
+ while (index--) {
+ const chunk = chunks[index]
+
+ if (typeof chunk === 'string') {
+ bufferIndex = chunk.length
+
+ while (chunk.charCodeAt(bufferIndex - 1) === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space) {
+ size++
+ bufferIndex--
+ }
- var nextTime = getNextRootExpirationTimeToWorkOn(root);
+ if (bufferIndex) break
+ bufferIndex = -1
+ }
+ // Number
+ else if (chunk === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab) {
+ tabs = true
+ size++
+ } else if (chunk === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.virtualSpace) {
+ // Empty
+ } else {
+ // Replacement character, exit.
+ index++
+ break
+ }
+ }
- if (nextTime !== NoWork && nextTime !== expirationTime) {
- // There's additional work on this root.
- break;
- }
+ if (size) {
+ const token = {
+ type:
+ eventIndex === events.length ||
+ tabs ||
+ size < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.hardBreakPrefixSizeMin
+ ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineSuffix
+ : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.hardBreakTrailing,
+ start: {
+ line: data.end.line,
+ column: data.end.column - size,
+ offset: data.end.offset - size,
+ _index: data.start._index + index,
+ _bufferIndex: index
+ ? bufferIndex
+ : data.start._bufferIndex + bufferIndex
+ },
+ end: Object.assign({}, data.end)
+ }
- if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- root.lastPingedTime = lastSuspendedTime;
- break;
- } // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
+ data.end = Object.assign({}, token.start)
+ if (data.start.offset === data.end.offset) {
+ Object.assign(data, token)
+ } else {
+ events.splice(
+ eventIndex,
+ 0,
+ ['enter', token, context],
+ ['exit', token, context]
+ )
+ eventIndex += 2
+ }
+ }
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
- break;
- }
- } // The work expired. Commit immediately.
+ eventIndex++
+ }
+ }
+ return events
+}
- commitRoot(root);
- break;
- }
- case RootSuspendedWithDelay:
- {
- markRootSuspendedAtTime(root, expirationTime);
- var _lastSuspendedTime = root.lastSuspendedTime;
+/***/ }),
- if (expirationTime === _lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
- }
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/parse.js":
+/*!*****************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/parse.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // We're suspended in a state that should be avoided. We'll try to
- // avoid committing it for as long as the timeouts let us.
- if (workInProgressRootHasPendingPing) {
- var _lastPingedTime = root.lastPingedTime;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "parse": () => (/* binding */ parse)
+/* harmony export */ });
+/* harmony import */ var micromark_util_combine_extensions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-combine-extensions */ "./node_modules/micromark-util-combine-extensions/index.js");
+/* harmony import */ var _initialize_content_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./initialize/content.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/content.js");
+/* harmony import */ var _initialize_document_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./initialize/document.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/document.js");
+/* harmony import */ var _initialize_flow_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./initialize/flow.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/flow.js");
+/* harmony import */ var _initialize_text_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./initialize/text.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/initialize/text.js");
+/* harmony import */ var _create_tokenizer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./create-tokenizer.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/create-tokenizer.js");
+/* harmony import */ var _constructs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructs.js */ "./node_modules/react-markdown/node_modules/micromark/dev/lib/constructs.js");
+/**
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension
+ * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
+ * @typedef {import('micromark-util-types').ParseContext} ParseContext
+ * @typedef {import('micromark-util-types').Create} Create
+ */
- if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart earlier
- // so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
- var _nextTime = getNextRootExpirationTimeToWorkOn(root);
- if (_nextTime !== NoWork && _nextTime !== expirationTime) {
- // There's additional work on this root.
- break;
- }
- if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- root.lastPingedTime = _lastSuspendedTime;
- break;
- }
- var _msUntilTimeout;
-
- if (workInProgressRootLatestSuspenseTimeout !== Sync) {
- // We have processed a suspense config whose expiration time we
- // can use as the timeout.
- _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();
- } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {
- // This should never normally happen because only new updates
- // cause delayed states, so we should have processed something.
- // However, this could also happen in an offscreen tree.
- _msUntilTimeout = 0;
- } else {
- // If we don't have a suspense config, we're going to use a
- // heuristic to determine how long we can suspend.
- var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);
- var currentTimeMs = now();
- var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;
- var timeElapsed = currentTimeMs - eventTimeMs;
-
- if (timeElapsed < 0) {
- // We get this wrong some time since we estimate the time.
- timeElapsed = 0;
- }
- _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the
- // event time is exact instead of inferred from expiration time
- // we don't need this.
- if (timeUntilExpirationMs < _msUntilTimeout) {
- _msUntilTimeout = timeUntilExpirationMs;
- }
- } // Don't bother with a very short suspense time.
- if (_msUntilTimeout > 10) {
- // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
- break;
- }
- } // The work expired. Commit immediately.
+/**
+ * @param {ParseOptions} [options]
+ * @returns {ParseContext}
+ */
+function parse(options = {}) {
+ /** @type {FullNormalizedExtension} */
+ // @ts-expect-error `defaultConstructs` is full, so the result will be too.
+ const constructs = (0,micromark_util_combine_extensions__WEBPACK_IMPORTED_MODULE_0__.combineExtensions)(
+ // @ts-expect-error Same as above.
+ [_constructs_js__WEBPACK_IMPORTED_MODULE_1__].concat(options.extensions || [])
+ )
+ /** @type {ParseContext} */
+ const parser = {
+ defined: [],
+ lazy: {},
+ constructs,
+ content: create(_initialize_content_js__WEBPACK_IMPORTED_MODULE_2__.content),
+ document: create(_initialize_document_js__WEBPACK_IMPORTED_MODULE_3__.document),
+ flow: create(_initialize_flow_js__WEBPACK_IMPORTED_MODULE_4__.flow),
+ string: create(_initialize_text_js__WEBPACK_IMPORTED_MODULE_5__.string),
+ text: create(_initialize_text_js__WEBPACK_IMPORTED_MODULE_5__.text)
+ }
+
+ return parser
+ /**
+ * @param {InitialConstruct} initial
+ */
+ function create(initial) {
+ return creator
+ /** @type {Create} */
+ function creator(from) {
+ return (0,_create_tokenizer_js__WEBPACK_IMPORTED_MODULE_6__.createTokenizer)(parser, initial, from)
+ }
+ }
+}
- commitRoot(root);
- break;
- }
- case RootCompleted:
- {
- // The work completed. Ready to commit.
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {
- // If we have exceeded the minimum loading delay, which probably
- // means we have shown a spinner already, we might have to suspend
- // a bit longer to ensure that the spinner is shown for
- // enough time.
- var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);
-
- if (_msUntilTimeout2 > 10) {
- markRootSuspendedAtTime(root, expirationTime);
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);
- break;
- }
- }
+/***/ }),
- commitRoot(root);
- break;
- }
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/postprocess.js":
+/*!***********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/postprocess.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- default:
- {
- {
- {
- throw Error( "Unknown root exit status." );
- }
- }
- }
- }
-} // This is the entry point for synchronous tasks that don't go
-// through Scheduler
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "postprocess": () => (/* binding */ postprocess)
+/* harmony export */ });
+/* harmony import */ var micromark_util_subtokenize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-subtokenize */ "./node_modules/micromark-util-subtokenize/dev/index.js");
+/**
+ * @typedef {import('micromark-util-types').Event} Event
+ */
-function performSyncWorkOnRoot(root) {
- // Check if there's expired work on this root. Otherwise, render at Sync.
- var lastExpiredTime = root.lastExpiredTime;
- var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
+/**
+ * @param {Event[]} events
+ * @returns {Event[]}
+ */
+function postprocess(events) {
+ while (!(0,micromark_util_subtokenize__WEBPACK_IMPORTED_MODULE_0__.subtokenize)(events)) {
+ // Empty
}
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
-
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
+ return events
+}
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
+/***/ }),
- do {
- try {
- workLoopSync();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
+/***/ "./node_modules/react-markdown/node_modules/micromark/dev/lib/preprocess.js":
+/*!**********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/micromark/dev/lib/preprocess.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "preprocess": () => (/* binding */ preprocess)
+/* harmony export */ });
+/* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "./node_modules/micromark-util-symbol/codes.js");
+/* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "./node_modules/micromark-util-symbol/constants.js");
+/**
+ * @typedef {import('micromark-util-types').Encoding} Encoding
+ * @typedef {import('micromark-util-types').Value} Value
+ * @typedef {import('micromark-util-types').Chunk} Chunk
+ * @typedef {import('micromark-util-types').Code} Code
+ */
- {
- popInteractions(prevInteractions);
- }
+/**
+ * @callback Preprocessor
+ * @param {Value} value
+ * @param {Encoding} [encoding]
+ * @param {boolean} [end=false]
+ * @returns {Chunk[]}
+ */
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
- }
- if (workInProgress !== null) {
- // This is a sync render, so we should have finished the whole tree.
- {
- {
- throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } else {
- // We now have a consistent tree. Because this is a sync render, we
- // will commit it even if something suspended.
- stopFinishedWorkLoopTimer();
- root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishSyncRender(root);
- } // Before exiting, make sure there's a callback scheduled for the next
- // pending level.
- ensureRootIsScheduled(root);
- }
+const search = /[\0\t\n\r]/g
- return null;
-}
+/**
+ * @returns {Preprocessor}
+ */
+function preprocess() {
+ let column = 1
+ let buffer = ''
+ /** @type {boolean|undefined} */
+ let start = true
+ /** @type {boolean|undefined} */
+ let atCarriageReturn
+
+ return preprocessor
+
+ /** @type {Preprocessor} */
+ function preprocessor(value, encoding, end) {
+ /** @type {Chunk[]} */
+ const chunks = []
+ /** @type {RegExpMatchArray|null} */
+ let match
+ /** @type {number} */
+ let next
+ /** @type {number} */
+ let startPosition
+ /** @type {number} */
+ let endPosition
+ /** @type {Code} */
+ let code
+
+ // @ts-expect-error `Buffer` does allow an encoding.
+ value = buffer + value.toString(encoding)
+ startPosition = 0
+ buffer = ''
+
+ if (start) {
+ if (value.charCodeAt(0) === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.byteOrderMarker) {
+ startPosition++
+ }
+
+ start = undefined
+ }
+
+ while (startPosition < value.length) {
+ search.lastIndex = startPosition
+ match = search.exec(value)
+ endPosition =
+ match && match.index !== undefined ? match.index : value.length
+ code = value.charCodeAt(endPosition)
-function finishSyncRender(root) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
- commitRoot(root);
-}
-function flushDiscreteUpdates() {
- // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
- // However, `act` uses `batchedUpdates`, so there's no way to distinguish
- // those two cases. Need to fix this before exposing flushDiscreteUpdates
- // as a public API.
- if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
- {
- if ((executionContext & RenderContext) !== NoContext) {
- error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
+ if (!match) {
+ buffer = value.slice(startPosition)
+ break
}
- } // We're already rendering, so we can't synchronously flush pending work.
- // This is probably a nested event dispatch triggered by a lifecycle/effect,
- // like `el.focus()`. Exit.
+ if (
+ code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lf &&
+ startPosition === endPosition &&
+ atCarriageReturn
+ ) {
+ chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturnLineFeed)
+ atCarriageReturn = undefined
+ } else {
+ if (atCarriageReturn) {
+ chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturn)
+ atCarriageReturn = undefined
+ }
- return;
- }
+ if (startPosition < endPosition) {
+ chunks.push(value.slice(startPosition, endPosition))
+ column += endPosition - startPosition
+ }
- flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that
- // they fire before the next serial event.
+ switch (code) {
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.nul: {
+ chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.replacementCharacter)
+ column++
- flushPassiveEffects();
-}
-function syncUpdates(fn, a, b, c) {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));
-}
+ break
+ }
-function flushPendingDiscreteUpdates() {
- if (rootsWithPendingDiscreteUpdates !== null) {
- // For each root with pending discrete updates, schedule a callback to
- // immediately flush them.
- var roots = rootsWithPendingDiscreteUpdates;
- rootsWithPendingDiscreteUpdates = null;
- roots.forEach(function (expirationTime, root) {
- markRootExpiredAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- }); // Now flush the immediate queue.
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.ht: {
+ next = Math.ceil(column / micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_1__.constants.tabSize) * micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_1__.constants.tabSize
+ chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab)
+ while (column++ < next) chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.virtualSpace)
- flushSyncCallbackQueue();
- }
-}
+ break
+ }
-function batchedUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= BatchedContext;
+ case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lf: {
+ chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lineFeed)
+ column = 1
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
+ break
+ }
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
- }
- }
-}
-function batchedEventUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= EventContext;
+ default: {
+ atCarriageReturn = true
+ column = 1
+ }
+ }
+ }
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
+ startPosition = endPosition + 1
+ }
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
+ if (end) {
+ if (atCarriageReturn) chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturn)
+ if (buffer) chunks.push(buffer)
+ chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof)
}
+
+ return chunks
}
}
-function discreteUpdates$1(fn, a, b, c, d) {
- var prevExecutionContext = executionContext;
- executionContext |= DiscreteEventContext;
- try {
- // Should this
- return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));
- } finally {
- executionContext = prevExecutionContext;
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
- }
- }
-}
-function unbatchedUpdates(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext &= ~BatchedContext;
- executionContext |= LegacyUnbatchedContext;
+/***/ }),
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
+/***/ "./node_modules/react-markdown/node_modules/parse-entities/decode-entity.js":
+/*!**********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/parse-entities/decode-entity.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
- }
- }
-}
-function flushSync(fn, a) {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
- {
- {
- throw Error( "flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering." );
- }
- }
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "decodeEntity": () => (/* binding */ decodeEntity)
+/* harmony export */ });
+/* harmony import */ var character_entities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! character-entities */ "./node_modules/react-markdown/node_modules/character-entities/index.js");
- var prevExecutionContext = executionContext;
- executionContext |= BatchedContext;
- try {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a));
- } finally {
- executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
- // Note that this will happen even if batchedUpdates is higher up
- // the stack.
+var own = {}.hasOwnProperty
- flushSyncCallbackQueue();
- }
+/**
+ * @param {string} characters
+ * @returns {string|false}
+ */
+function decodeEntity(characters) {
+ return own.call(character_entities__WEBPACK_IMPORTED_MODULE_0__.characterEntities, characters)
+ ? character_entities__WEBPACK_IMPORTED_MODULE_0__.characterEntities[characters]
+ : false
}
-function prepareFreshStack(root, expirationTime) {
- root.finishedWork = null;
- root.finishedExpirationTime = NoWork;
- var timeoutHandle = root.timeoutHandle;
- if (timeoutHandle !== noTimeout) {
- // The root previous suspended and scheduled a timeout to commit a fallback
- // state. Now that we have additional work, cancel the timeout.
- root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
+/***/ }),
- cancelTimeout(timeoutHandle);
- }
+/***/ "./node_modules/react-markdown/node_modules/property-information/index.js":
+/*!********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/property-information/index.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (workInProgress !== null) {
- var interruptedWork = workInProgress.return;
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "find": () => (/* reexport safe */ _lib_find_js__WEBPACK_IMPORTED_MODULE_0__.find),
+/* harmony export */ "hastToReact": () => (/* reexport safe */ _lib_hast_to_react_js__WEBPACK_IMPORTED_MODULE_1__.hastToReact),
+/* harmony export */ "normalize": () => (/* reexport safe */ _lib_normalize_js__WEBPACK_IMPORTED_MODULE_2__.normalize),
+/* harmony export */ "html": () => (/* binding */ html),
+/* harmony export */ "svg": () => (/* binding */ svg)
+/* harmony export */ });
+/* harmony import */ var _lib_util_merge_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/util/merge.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/merge.js");
+/* harmony import */ var _lib_xlink_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/xlink.js */ "./node_modules/react-markdown/node_modules/property-information/lib/xlink.js");
+/* harmony import */ var _lib_xml_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/xml.js */ "./node_modules/react-markdown/node_modules/property-information/lib/xml.js");
+/* harmony import */ var _lib_xmlns_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/xmlns.js */ "./node_modules/react-markdown/node_modules/property-information/lib/xmlns.js");
+/* harmony import */ var _lib_aria_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./lib/aria.js */ "./node_modules/react-markdown/node_modules/property-information/lib/aria.js");
+/* harmony import */ var _lib_html_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./lib/html.js */ "./node_modules/react-markdown/node_modules/property-information/lib/html.js");
+/* harmony import */ var _lib_svg_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./lib/svg.js */ "./node_modules/react-markdown/node_modules/property-information/lib/svg.js");
+/* harmony import */ var _lib_find_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/find.js */ "./node_modules/react-markdown/node_modules/property-information/lib/find.js");
+/* harmony import */ var _lib_hast_to_react_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/hast-to-react.js */ "./node_modules/react-markdown/node_modules/property-information/lib/hast-to-react.js");
+/* harmony import */ var _lib_normalize_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/normalize.js */ "./node_modules/react-markdown/node_modules/property-information/lib/normalize.js");
+/**
+ * @typedef {import('./lib/util/info.js').Info} Info
+ * @typedef {import('./lib/util/schema.js').Schema} Schema
+ */
- while (interruptedWork !== null) {
- unwindInterruptedWork(interruptedWork);
- interruptedWork = interruptedWork.return;
- }
- }
- workInProgressRoot = root;
- workInProgress = createWorkInProgress(root.current, null);
- renderExpirationTime$1 = expirationTime;
- workInProgressRootExitStatus = RootIncomplete;
- workInProgressRootFatalError = null;
- workInProgressRootLatestProcessedExpirationTime = Sync;
- workInProgressRootLatestSuspenseTimeout = Sync;
- workInProgressRootCanSuspendUsingConfig = null;
- workInProgressRootNextUnprocessedUpdateTime = NoWork;
- workInProgressRootHasPendingPing = false;
- {
- spawnedWorkDuringRender = null;
- }
- {
- ReactStrictModeWarnings.discardPendingWarnings();
- }
-}
-function handleError(root, thrownValue) {
- do {
- try {
- // Reset module-level state that was set during the render phase.
- resetContextDependencies();
- resetHooksAfterThrow();
- resetCurrentFiber();
- if (workInProgress === null || workInProgress.return === null) {
- // Expected to be working on a non-root fiber. This is a fatal error
- // because there's no ancestor that can handle it; the root is
- // supposed to capture all errors that weren't caught by an error
- // boundary.
- workInProgressRootExitStatus = RootFatalErrored;
- workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
- // sibling, or the parent if there are no siblings. But since the root
- // has no siblings nor a parent, we set it to null. Usually this is
- // handled by `completeUnitOfWork` or `unwindWork`, but since we're
- // interntionally not calling those, we need set it here.
- // TODO: Consider calling `unwindWork` to pop the contexts.
- workInProgress = null;
- return null;
- }
- if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
- // Record the time spent rendering before an error was thrown. This
- // avoids inaccurate Profiler durations in the case of a
- // suspended render.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
- }
- throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);
- workInProgress = completeUnitOfWork(workInProgress);
- } catch (yetAnotherThrownValue) {
- // Something in the return path also threw.
- thrownValue = yetAnotherThrownValue;
- continue;
- } // Return to the normal work loop.
- return;
- } while (true);
-}
-function pushDispatcher(root) {
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
+var html = (0,_lib_util_merge_js__WEBPACK_IMPORTED_MODULE_3__.merge)([_lib_xml_js__WEBPACK_IMPORTED_MODULE_4__.xml, _lib_xlink_js__WEBPACK_IMPORTED_MODULE_5__.xlink, _lib_xmlns_js__WEBPACK_IMPORTED_MODULE_6__.xmlns, _lib_aria_js__WEBPACK_IMPORTED_MODULE_7__.aria, _lib_html_js__WEBPACK_IMPORTED_MODULE_8__.html], 'html')
+var svg = (0,_lib_util_merge_js__WEBPACK_IMPORTED_MODULE_3__.merge)([_lib_xml_js__WEBPACK_IMPORTED_MODULE_4__.xml, _lib_xlink_js__WEBPACK_IMPORTED_MODULE_5__.xlink, _lib_xmlns_js__WEBPACK_IMPORTED_MODULE_6__.xmlns, _lib_aria_js__WEBPACK_IMPORTED_MODULE_7__.aria, _lib_svg_js__WEBPACK_IMPORTED_MODULE_9__.svg], 'svg')
- if (prevDispatcher === null) {
- // The React isomorphic package does not include a default dispatcher.
- // Instead the first renderer will lazily attach one, in order to give
- // nicer error messages.
- return ContextOnlyDispatcher;
- } else {
- return prevDispatcher;
- }
-}
-function popDispatcher(prevDispatcher) {
- ReactCurrentDispatcher$1.current = prevDispatcher;
-}
+/***/ }),
-function pushInteractions(root) {
- {
- var prevInteractions = tracing.__interactionsRef.current;
- tracing.__interactionsRef.current = root.memoizedInteractions;
- return prevInteractions;
- }
-}
+/***/ "./node_modules/react-markdown/node_modules/property-information/lib/aria.js":
+/*!***********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/property-information/lib/aria.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-function popInteractions(prevInteractions) {
- {
- tracing.__interactionsRef.current = prevInteractions;
- }
-}
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "aria": () => (/* binding */ aria)
+/* harmony export */ });
+/* harmony import */ var _util_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/types.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/types.js");
+/* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/create.js");
+
+
+
+var aria = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
+ transform: ariaTransform,
+ properties: {
+ ariaActiveDescendant: null,
+ ariaAtomic: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaAutoComplete: null,
+ ariaBusy: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaChecked: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaColCount: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaColIndex: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaColSpan: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaControls: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
+ ariaCurrent: null,
+ ariaDescribedBy: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
+ ariaDetails: null,
+ ariaDisabled: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaDropEffect: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
+ ariaErrorMessage: null,
+ ariaExpanded: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaFlowTo: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
+ ariaGrabbed: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaHasPopup: null,
+ ariaHidden: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaInvalid: null,
+ ariaKeyShortcuts: null,
+ ariaLabel: null,
+ ariaLabelledBy: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
+ ariaLevel: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaLive: null,
+ ariaModal: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaMultiLine: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaMultiSelectable: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaOrientation: null,
+ ariaOwns: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
+ ariaPlaceholder: null,
+ ariaPosInSet: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaPressed: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaReadOnly: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaRelevant: null,
+ ariaRequired: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaRoleDescription: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
+ ariaRowCount: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaRowIndex: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaRowSpan: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaSelected: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
+ ariaSetSize: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaSort: null,
+ ariaValueMax: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaValueMin: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaValueNow: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
+ ariaValueText: null,
+ role: null
+ }
+})
-function markCommitTimeOfFallback() {
- globalMostRecentFallbackTime = now();
+/**
+ * @param {unknown} _
+ * @param {string} prop
+ * @returns {string}
+ */
+function ariaTransform(_, prop) {
+ return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()
}
-function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
- if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {
- workInProgressRootLatestProcessedExpirationTime = expirationTime;
- }
- if (suspenseConfig !== null) {
- if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {
- workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.
- workInProgressRootCanSuspendUsingConfig = suspenseConfig;
- }
- }
-}
-function markUnprocessedUpdateTime(expirationTime) {
- if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {
- workInProgressRootNextUnprocessedUpdateTime = expirationTime;
- }
-}
-function renderDidSuspend() {
- if (workInProgressRootExitStatus === RootIncomplete) {
- workInProgressRootExitStatus = RootSuspended;
- }
-}
-function renderDidSuspendDelayIfPossible() {
- if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
- workInProgressRootExitStatus = RootSuspendedWithDelay;
- } // Check if there's a lower priority update somewhere else in the tree.
+/***/ }),
+/***/ "./node_modules/react-markdown/node_modules/property-information/lib/find.js":
+/*!***********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/property-information/lib/find.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {
- // Mark the current render as suspended, and then mark that there's a
- // pending update.
- // TODO: This should immediately interrupt the current render, instead
- // of waiting until the next time we yield.
- markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);
- markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);
- }
-}
-function renderDidError() {
- if (workInProgressRootExitStatus !== RootCompleted) {
- workInProgressRootExitStatus = RootErrored;
- }
-} // Called during render to determine if anything has suspended.
-// Returns false if we're not sure.
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "find": () => (/* binding */ find)
+/* harmony export */ });
+/* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normalize.js */ "./node_modules/react-markdown/node_modules/property-information/lib/normalize.js");
+/* harmony import */ var _util_defined_info_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/defined-info.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/defined-info.js");
+/* harmony import */ var _util_info_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/info.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/info.js");
-function renderHasNotSuspendedYet() {
- // If something errored or completed, we can't really be sure,
- // so those are false.
- return workInProgressRootExitStatus === RootIncomplete;
-}
-function inferTimeFromExpirationTime(expirationTime) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
-}
-function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time by subtracting the timeout
- // that was added to the event time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
-} // The work loop is an extremely hot path. Tell Closure not to inline it.
-/** @noinline */
+var valid = /^data[-\w.:]+$/i
+var dash = /-[a-z]/g
+var cap = /[A-Z]/g
+/**
+ * @param {import('./util/schema.js').Schema} schema
+ * @param {string} value
+ * @returns {import('./util/info.js').Info}
+ */
+function find(schema, value) {
+ var normal = (0,_normalize_js__WEBPACK_IMPORTED_MODULE_0__.normalize)(value)
+ var prop = value
+ var Type = _util_info_js__WEBPACK_IMPORTED_MODULE_1__.Info
-function workLoopSync() {
- // Already timed out, so perform work without checking if we need to yield.
- while (workInProgress !== null) {
- workInProgress = performUnitOfWork(workInProgress);
+ if (normal in schema.normal) {
+ return schema.property[schema.normal[normal]]
}
-}
-/** @noinline */
+ if (normal.length > 4 && normal.slice(0, 4) === 'data' && valid.test(value)) {
+ // Attribute or property.
+ if (value.charAt(4) === '-') {
+ prop = datasetToProperty(value)
+ } else {
+ value = datasetToAttribute(value)
+ }
-function workLoopConcurrent() {
- // Perform work until Scheduler asks us to yield
- while (workInProgress !== null && !shouldYield()) {
- workInProgress = performUnitOfWork(workInProgress);
+ Type = _util_defined_info_js__WEBPACK_IMPORTED_MODULE_2__.DefinedInfo
}
+
+ return new Type(prop, value)
}
-function performUnitOfWork(unitOfWork) {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = unitOfWork.alternate;
- startWorkTimer(unitOfWork);
- setCurrentFiber(unitOfWork);
- var next;
+/**
+ * @param {string} attribute
+ * @returns {string}
+ */
+function datasetToProperty(attribute) {
+ var value = attribute.slice(5).replace(dash, camelcase)
+ return 'data' + value.charAt(0).toUpperCase() + value.slice(1)
+}
- if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
- startProfilerTimer(unitOfWork);
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
- stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
- } else {
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
+/**
+ * @param {string} property
+ * @returns {string}
+ */
+function datasetToAttribute(property) {
+ var value = property.slice(4)
+
+ if (dash.test(value)) {
+ return property
}
- resetCurrentFiber();
- unitOfWork.memoizedProps = unitOfWork.pendingProps;
+ value = value.replace(cap, kebab)
- if (next === null) {
- // If this doesn't spawn new work, complete the current work.
- next = completeUnitOfWork(unitOfWork);
+ if (value.charAt(0) !== '-') {
+ value = '-' + value
}
- ReactCurrentOwner$2.current = null;
- return next;
+ return 'data' + value
}
-function completeUnitOfWork(unitOfWork) {
- // Attempt to complete the current unit of work, then move to the next
- // sibling. If there are no more siblings, return to the parent fiber.
- workInProgress = unitOfWork;
-
- do {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = workInProgress.alternate;
- var returnFiber = workInProgress.return; // Check if the work completed or if something threw.
+/**
+ * @param {string} $0
+ * @returns {string}
+ */
+function kebab($0) {
+ return '-' + $0.toLowerCase()
+}
- if ((workInProgress.effectTag & Incomplete) === NoEffect) {
- setCurrentFiber(workInProgress);
- var next = void 0;
+/**
+ * @param {string} $0
+ * @returns {string}
+ */
+function camelcase($0) {
+ return $0.charAt(1).toUpperCase()
+}
- if ( (workInProgress.mode & ProfileMode) === NoMode) {
- next = completeWork(current, workInProgress, renderExpirationTime$1);
- } else {
- startProfilerTimer(workInProgress);
- next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
- }
+/***/ }),
- stopWorkTimer(workInProgress);
- resetCurrentFiber();
- resetChildExpirationTime(workInProgress);
+/***/ "./node_modules/react-markdown/node_modules/property-information/lib/hast-to-react.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/property-information/lib/hast-to-react.js ***!
+ \********************************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
- if (next !== null) {
- // Completing this fiber spawned new work. Work on that next.
- return next;
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "hastToReact": () => (/* binding */ hastToReact)
+/* harmony export */ });
+var hastToReact = {
+ classId: 'classID',
+ dataType: 'datatype',
+ itemId: 'itemID',
+ strokeDashArray: 'strokeDasharray',
+ strokeDashOffset: 'strokeDashoffset',
+ strokeLineCap: 'strokeLinecap',
+ strokeLineJoin: 'strokeLinejoin',
+ strokeMiterLimit: 'strokeMiterlimit',
+ typeOf: 'typeof',
+ xLinkActuate: 'xlinkActuate',
+ xLinkArcRole: 'xlinkArcrole',
+ xLinkHref: 'xlinkHref',
+ xLinkRole: 'xlinkRole',
+ xLinkShow: 'xlinkShow',
+ xLinkTitle: 'xlinkTitle',
+ xLinkType: 'xlinkType',
+ xmlnsXLink: 'xmlnsXlink'
+}
- if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
- (returnFiber.effectTag & Incomplete) === NoEffect) {
- // Append all the effects of the subtree and this fiber onto the effect
- // list of the parent. The completion order of the children affects the
- // side-effect order.
- if (returnFiber.firstEffect === null) {
- returnFiber.firstEffect = workInProgress.firstEffect;
- }
- if (workInProgress.lastEffect !== null) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
- }
+/***/ }),
- returnFiber.lastEffect = workInProgress.lastEffect;
- } // If this fiber had side-effects, we append it AFTER the children's
- // side-effects. We can perform certain side-effects earlier if needed,
- // by doing multiple passes over the effect list. We don't want to
- // schedule our own side-effect on our own list because if end up
- // reusing children we'll schedule this effect onto itself since we're
- // at the end.
+/***/ "./node_modules/react-markdown/node_modules/property-information/lib/html.js":
+/*!***********************************************************************************!*\
+ !*** ./node_modules/react-markdown/node_modules/property-information/lib/html.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "html": () => (/* binding */ html)
+/* harmony export */ });
+/* harmony import */ var _util_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/types.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/types.js");
+/* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/create.js");
+/* harmony import */ var _util_case_insensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/case-insensitive-transform.js */ "./node_modules/react-markdown/node_modules/property-information/lib/util/case-insensitive-transform.js");
- var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect
- // list. PerformedWork effect is read by React DevTools but shouldn't be
- // committed.
- if (effectTag > PerformedWork) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress;
- } else {
- returnFiber.firstEffect = workInProgress;
- }
- returnFiber.lastEffect = workInProgress;
- }
- }
- } else {
- // This fiber did not complete because something threw. Pop values off
- // the stack without entering the complete phase. If this is a boundary,
- // capture values if possible.
- var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.
+var html = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
+ space: 'html',
+ attributes: {
+ acceptcharset: 'accept-charset',
+ classname: 'class',
+ htmlfor: 'for',
+ httpequiv: 'http-equiv'
+ },
+ transform: _util_case_insensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__.caseInsensitiveTransform,
+ mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],
+ properties: {
+ // Standard Properties.
+ abbr: null,
+ accept: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
+ acceptCharset: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ accessKey: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ action: null,
+ allow: null,
+ allowFullScreen: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ allowPaymentRequest: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ allowUserMedia: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ alt: null,
+ as: null,
+ async: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ autoCapitalize: null,
+ autoComplete: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ autoFocus: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ autoPlay: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ capture: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ charSet: null,
+ checked: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ cite: null,
+ className: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ cols: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ colSpan: null,
+ content: null,
+ contentEditable: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
+ controls: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ controlsList: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ coords: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number | _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
+ crossOrigin: null,
+ data: null,
+ dateTime: null,
+ decoding: null,
+ default: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ defer: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ dir: null,
+ dirName: null,
+ disabled: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ download: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.overloadedBoolean,
+ draggable: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
+ encType: null,
+ enterKeyHint: null,
+ form: null,
+ formAction: null,
+ formEncType: null,
+ formMethod: null,
+ formNoValidate: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ formTarget: null,
+ headers: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ height: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ hidden: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ high: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ href: null,
+ hrefLang: null,
+ htmlFor: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ httpEquiv: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ id: null,
+ imageSizes: null,
+ imageSrcSet: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
+ inputMode: null,
+ integrity: null,
+ is: null,
+ isMap: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ itemId: null,
+ itemProp: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ itemRef: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ itemScope: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ itemType: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ kind: null,
+ label: null,
+ lang: null,
+ language: null,
+ list: null,
+ loading: null,
+ loop: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ low: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ manifest: null,
+ max: null,
+ maxLength: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ media: null,
+ method: null,
+ min: null,
+ minLength: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ multiple: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ muted: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ name: null,
+ nonce: null,
+ noModule: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ noValidate: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ onAbort: null,
+ onAfterPrint: null,
+ onAuxClick: null,
+ onBeforePrint: null,
+ onBeforeUnload: null,
+ onBlur: null,
+ onCancel: null,
+ onCanPlay: null,
+ onCanPlayThrough: null,
+ onChange: null,
+ onClick: null,
+ onClose: null,
+ onContextMenu: null,
+ onCopy: null,
+ onCueChange: null,
+ onCut: null,
+ onDblClick: null,
+ onDrag: null,
+ onDragEnd: null,
+ onDragEnter: null,
+ onDragExit: null,
+ onDragLeave: null,
+ onDragOver: null,
+ onDragStart: null,
+ onDrop: null,
+ onDurationChange: null,
+ onEmptied: null,
+ onEnded: null,
+ onError: null,
+ onFocus: null,
+ onFormData: null,
+ onHashChange: null,
+ onInput: null,
+ onInvalid: null,
+ onKeyDown: null,
+ onKeyPress: null,
+ onKeyUp: null,
+ onLanguageChange: null,
+ onLoad: null,
+ onLoadedData: null,
+ onLoadedMetadata: null,
+ onLoadEnd: null,
+ onLoadStart: null,
+ onMessage: null,
+ onMessageError: null,
+ onMouseDown: null,
+ onMouseEnter: null,
+ onMouseLeave: null,
+ onMouseMove: null,
+ onMouseOut: null,
+ onMouseOver: null,
+ onMouseUp: null,
+ onOffline: null,
+ onOnline: null,
+ onPageHide: null,
+ onPageShow: null,
+ onPaste: null,
+ onPause: null,
+ onPlay: null,
+ onPlaying: null,
+ onPopState: null,
+ onProgress: null,
+ onRateChange: null,
+ onRejectionHandled: null,
+ onReset: null,
+ onResize: null,
+ onScroll: null,
+ onSecurityPolicyViolation: null,
+ onSeeked: null,
+ onSeeking: null,
+ onSelect: null,
+ onSlotChange: null,
+ onStalled: null,
+ onStorage: null,
+ onSubmit: null,
+ onSuspend: null,
+ onTimeUpdate: null,
+ onToggle: null,
+ onUnhandledRejection: null,
+ onUnload: null,
+ onVolumeChange: null,
+ onWaiting: null,
+ onWheel: null,
+ open: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ optimum: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ pattern: null,
+ ping: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ placeholder: null,
+ playsInline: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ poster: null,
+ preload: null,
+ readOnly: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ referrerPolicy: null,
+ rel: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ required: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ reversed: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ rows: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ rowSpan: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ sandbox: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
+ scope: null,
+ scoped: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ seamless: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ selected: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ shape: null,
+ size: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ sizes: null,
+ slot: null,
+ span: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ spellCheck: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
+ src: null,
+ srcDoc: null,
+ srcLang: null,
+ srcSet: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
+ start: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ step: null,
+ style: null,
+ tabIndex: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ target: null,
+ title: null,
+ translate: null,
+ type: null,
+ typeMustMatch: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
+ useMap: null,
+ value: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
+ width: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
+ wrap: null,
+
+ // Legacy.
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
+ align: null, // Several. Use CSS `text-align` instead,
+ aLink: null, // ``. Use CSS `a:active {color}` instead
+ archive: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated, // `