@design.estate/dees-catalog 21.45.0 → 21.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +299 -84
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/bundle.js.third-party-notices.json +1 -1
- package/dist_bundle/bundle.js.third-party-notices.txt +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-L4Z3DS4M.js → chunk-FCUX4QGD.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Y2OCV2BV.js → chunk-LWT7IIPZ.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-L3H6FV4W.js → chunk-VJVZHESI.js} +37 -14
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-VJVZHESI.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-SOLSWJ7V.js → de-7PGZC4IF.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-VDA5LOS7.js → dees-modal-VOIWY235.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-SD4GXHX5.js → dees-workspace-terminal-EJRHSZ5F.js} +4 -4
- package/dist_bundle/third-party-notices.md +2 -2
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-appui/dees-appui/dees-appui.d.ts +37 -3
- package/dist_ts_web/elements/00group-appui/dees-appui/dees-appui.js +79 -19
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.d.ts +24 -7
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.js +53 -18
- package/dist_ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.d.ts +11 -1
- package/dist_ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.demo.js +17 -1
- package/dist_ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.js +19 -2
- package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.d.ts +33 -2
- package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.demo.js +92 -13
- package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.js +58 -15
- package/dist_ts_web/elements/00group-layout/dees-stepper/styles.js +31 -2
- package/dist_ts_web/elements/interfaces/appconfig.d.ts +9 -2
- package/package.json +2 -2
- package/readme.md +35 -6
- package/third-party-notices.md +2 -2
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-appui/dees-appui/dees-appui.ts +95 -21
- package/ts_web/elements/00group-appui/dees-appui/readme.md +16 -4
- package/ts_web/elements/00group-dataview/dees-table/dees-table.ts +54 -17
- package/ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.demo.ts +20 -0
- package/ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.ts +18 -1
- package/ts_web/elements/00group-layout/dees-stepper/dees-stepper.demo.ts +79 -4
- package/ts_web/elements/00group-layout/dees-stepper/dees-stepper.ts +69 -13
- package/ts_web/elements/00group-layout/dees-stepper/styles.ts +32 -1
- package/ts_web/elements/interfaces/appconfig.ts +9 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-L3H6FV4W.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-L4Z3DS4M.js.map → chunk-FCUX4QGD.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Y2OCV2BV.js.map → chunk-LWT7IIPZ.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-SOLSWJ7V.js.map → de-7PGZC4IF.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-VDA5LOS7.js.map → dees-modal-VOIWY235.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-SD4GXHX5.js.map → dees-workspace-terminal-EJRHSZ5F.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js","../../../node_modules/.pnpm/format@0.2.2/node_modules/format/format.js","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/index.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/countrycodes.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.errors.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.records.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.parser.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.locale.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.format.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.catalog.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.render.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.pseudo.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.classes.i18n.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.localizederror.ts","../../../node_modules/.pnpm/@push.rocks+smarti18n@1.5.0/node_modules/@push.rocks/smarti18n/ts/i18n.verify.ts","../../../node_modules/.pnpm/@push.rocks+smartmarkdown@3.5.0/node_modules/@push.rocks/smartmarkdown/ts/iso/index.ts","../../../node_modules/.pnpm/@push.rocks+smartyaml@3.0.5/node_modules/@push.rocks/smartyaml/ts/index.ts","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/index.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/index.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/visit.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Alias.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyComment.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/foldFlowLines.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/map.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLSeq.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/string.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/null.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/bool.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyNumber.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/int.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/schema.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/tags.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-scalar.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-stringify.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/line-counter.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js","../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js","../../../node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.js","../../../node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.js","../../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js","../../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.js","../../../node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js","../../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.js","../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.js","../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.js","../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.js","../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.js","../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.js","../../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.js","../../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js","../../../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js","../../../node_modules/.pnpm/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.dom.js","../../../node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.js","../../../node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js","../../../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js","../../../node_modules/.pnpm/micromark-util-encode@2.0.1/node_modules/micromark-util-encode/index.js","../../../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js","../../../node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js","../../../node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/compile.js","../../../node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.js","../../../node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js","../../../node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.js","../../../node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.js","../../../node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.js","../../../node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.js","../../../node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.js","../../../node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.js","../../../node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.js","../../../node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.js","../../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.js","../../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/index.js","../../../node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js","../../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3/node_modules/mdast-util-from-markdown/lib/index.js","../../../node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js","../../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js","../../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js","../../../node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js","../../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js","../../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js","../../../node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js","../../../node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js","../../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js","../../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js","../../../node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js","../../../node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/configure.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.js","../../../node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js","../../../node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js","../../../node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/join.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/unsafe.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/association.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/container-flow.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/safe.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/track.js","../../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/index.js","../../../node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js","../../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js","../../../node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js","../../../node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js","../../../node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/html.js","../../../node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.js","../../../node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/html.js","../../../node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/html.js","../../../node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js","../../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/html.js","../../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.js","../../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.js","../../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.js","../../../node_modules/.pnpm/micromark-extension-gfm-tagfilter@2.0.0/node_modules/micromark-extension-gfm-tagfilter/lib/index.js","../../../node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/html.js","../../../node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js","../../../node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js","../../../node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js","../../../node_modules/.pnpm/fault@2.0.1/node_modules/fault/index.js","../../../node_modules/.pnpm/micromark-extension-frontmatter@2.0.0/node_modules/micromark-extension-frontmatter/lib/to-matters.js","../../../node_modules/.pnpm/micromark-extension-frontmatter@2.0.0/node_modules/micromark-extension-frontmatter/lib/syntax.js","../../../node_modules/.pnpm/mdast-util-frontmatter@2.0.1/node_modules/mdast-util-frontmatter/lib/index.js","../../../node_modules/.pnpm/remark-frontmatter@5.0.0/node_modules/remark-frontmatter/lib/index.js","../../../node_modules/.pnpm/@push.rocks+smartmarkdown@3.5.0/node_modules/@push.rocks/smartmarkdown/ts/iso/parser.ts","../../../node_modules/.pnpm/@push.rocks+smartmarkdown@3.5.0/node_modules/@push.rocks/smartmarkdown/ts/iso/frontmatter.ts","../../../node_modules/.pnpm/@push.rocks+smartpromise@4.3.0/node_modules/@push.rocks/smartpromise/ts/index.ts","../../../node_modules/.pnpm/@push.rocks+smartpromise@4.3.0/node_modules/@push.rocks/smartpromise/ts/smartpromise.classes.deferred.ts","../../../node_modules/.pnpm/@push.rocks+smartpromise@4.3.0/node_modules/@push.rocks/smartpromise/ts/smartpromise.classes.timeout.ts","../../../node_modules/.pnpm/@push.rocks+smartpromise@4.3.0/node_modules/@push.rocks/smartpromise/ts/smartpromise.classes.cumulativedeferred.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/authentication/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/business/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/database/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/finance/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/code/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/container/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/descriptors/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/events/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/content/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/general/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/network/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/network/cname.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/saas/index.ts","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/dist_ts/storage/index.js","../../../node_modules/.pnpm/@tsclass+tsclass@10.4.0/node_modules/@tsclass/tsclass/ts/website/index.ts","../../../ts_web/i18n/formats.ts","../../../ts_web/i18n/messages.ts"],"sourcesContent":["'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n","//\n// format - printf-like string formatting for JavaScript\n// github.com/samsonjs/format\n// @_sjs\n//\n// Copyright 2010 - 2013 Sami Samhuri <sami@samhuri.net>\n//\n// MIT License\n// http://sjs.mit-license.org\n//\n\n;(function() {\n\n //// Export the API\n var namespace;\n\n // CommonJS / Node module\n if (typeof module !== 'undefined') {\n namespace = module.exports = format;\n }\n\n // Browsers and other environments\n else {\n // Get the global object. Works in ES3, ES5, and ES5 strict mode.\n namespace = (function(){ return this || (1,eval)('this') }());\n }\n\n namespace.format = format;\n namespace.vsprintf = vsprintf;\n\n if (typeof console !== 'undefined' && typeof console.log === 'function') {\n namespace.printf = printf;\n }\n\n function printf(/* ... */) {\n console.log(format.apply(null, arguments));\n }\n\n function vsprintf(fmt, replacements) {\n return format.apply(null, [fmt].concat(replacements));\n }\n\n function format(fmt) {\n var argIndex = 1 // skip initial format argument\n , args = [].slice.call(arguments)\n , i = 0\n , n = fmt.length\n , result = ''\n , c\n , escaped = false\n , arg\n , tmp\n , leadingZero = false\n , precision\n , nextArg = function() { return args[argIndex++]; }\n , slurpNumber = function() {\n var digits = '';\n while (/\\d/.test(fmt[i])) {\n digits += fmt[i++];\n c = fmt[i];\n }\n return digits.length > 0 ? parseInt(digits) : null;\n }\n ;\n for (; i < n; ++i) {\n c = fmt[i];\n if (escaped) {\n escaped = false;\n if (c == '.') {\n leadingZero = false;\n c = fmt[++i];\n }\n else if (c == '0' && fmt[i + 1] == '.') {\n leadingZero = true;\n i += 2;\n c = fmt[i];\n }\n else {\n leadingZero = true;\n }\n precision = slurpNumber();\n switch (c) {\n case 'b': // number in binary\n result += parseInt(nextArg(), 10).toString(2);\n break;\n case 'c': // character\n arg = nextArg();\n if (typeof arg === 'string' || arg instanceof String)\n result += arg;\n else\n result += String.fromCharCode(parseInt(arg, 10));\n break;\n case 'd': // number in decimal\n result += parseInt(nextArg(), 10);\n break;\n case 'f': // floating point number\n tmp = String(parseFloat(nextArg()).toFixed(precision || 6));\n result += leadingZero ? tmp : tmp.replace(/^0/, '');\n break;\n case 'j': // JSON\n result += JSON.stringify(nextArg());\n break;\n case 'o': // number in octal\n result += '0' + parseInt(nextArg(), 10).toString(8);\n break;\n case 's': // string\n result += nextArg();\n break;\n case 'x': // lowercase hexadecimal\n result += '0x' + parseInt(nextArg(), 10).toString(16);\n break;\n case 'X': // uppercase hexadecimal\n result += '0x' + parseInt(nextArg(), 10).toString(16).toUpperCase();\n break;\n default:\n result += c;\n break;\n }\n } else if (c === '%') {\n escaped = true;\n } else {\n result += c;\n }\n }\n return result;\n }\n\n}());\n","export * from './countrycodes.js';\nexport * from './i18n.values.js';\nexport type * from './i18n.types.js';\nexport * from './i18n.errors.js';\nexport * from './i18n.parser.js';\nexport * from './i18n.locale.js';\nexport * from './i18n.format.js';\nexport * from './i18n.catalog.js';\nexport * from './i18n.render.js';\nexport * from './i18n.pseudo.js';\nexport * from './i18n.classes.i18n.js';\nexport * from './i18n.localizederror.js';\nexport * from './i18n.verify.js';\n","export interface ICountryCode {\n code: string;\n name: string;\n phonePrefix: string;\n}\n\nexport const countryCodeArray: ICountryCode[] = [\n { \"code\": \"AD\", \"name\": \"Andorra\", \"phonePrefix\": \"376\" },\n { \"code\": \"AE\", \"name\": \"United Arab Emirates\", \"phonePrefix\": \"971\" },\n { \"code\": \"AF\", \"name\": \"Afghanistan\", \"phonePrefix\": \"93\" },\n { \"code\": \"AG\", \"name\": \"Antigua and Barbuda\", \"phonePrefix\": \"1-268\" },\n { \"code\": \"AI\", \"name\": \"Anguilla\", \"phonePrefix\": \"1-264\" },\n { \"code\": \"AL\", \"name\": \"Albania\", \"phonePrefix\": \"355\" },\n { \"code\": \"AM\", \"name\": \"Armenia\", \"phonePrefix\": \"374\" },\n { \"code\": \"AO\", \"name\": \"Angola\", \"phonePrefix\": \"244\" },\n { \"code\": \"AQ\", \"name\": \"Antarctica\", \"phonePrefix\": \"672\" },\n { \"code\": \"AR\", \"name\": \"Argentina\", \"phonePrefix\": \"54\" },\n { \"code\": \"AS\", \"name\": \"American Samoa\", \"phonePrefix\": \"1-684\" },\n { \"code\": \"AT\", \"name\": \"Austria\", \"phonePrefix\": \"43\" },\n { \"code\": \"AU\", \"name\": \"Australia\", \"phonePrefix\": \"61\" },\n { \"code\": \"AW\", \"name\": \"Aruba\", \"phonePrefix\": \"297\" },\n { \"code\": \"AX\", \"name\": \"Åland Islands\", \"phonePrefix\": \"358\" },\n { \"code\": \"AZ\", \"name\": \"Azerbaijan\", \"phonePrefix\": \"994\" },\n { \"code\": \"BA\", \"name\": \"Bosnia and Herzegovina\", \"phonePrefix\": \"387\" },\n { \"code\": \"BB\", \"name\": \"Barbados\", \"phonePrefix\": \"1-246\" },\n { \"code\": \"BD\", \"name\": \"Bangladesh\", \"phonePrefix\": \"880\" },\n { \"code\": \"BE\", \"name\": \"Belgium\", \"phonePrefix\": \"32\" },\n { \"code\": \"BF\", \"name\": \"Burkina Faso\", \"phonePrefix\": \"226\" },\n { \"code\": \"BG\", \"name\": \"Bulgaria\", \"phonePrefix\": \"359\" },\n { \"code\": \"BH\", \"name\": \"Bahrain\", \"phonePrefix\": \"973\" },\n { \"code\": \"BI\", \"name\": \"Burundi\", \"phonePrefix\": \"257\" },\n { \"code\": \"BJ\", \"name\": \"Benin\", \"phonePrefix\": \"229\" },\n { \"code\": \"BL\", \"name\": \"Saint Barthélemy\", \"phonePrefix\": \"590\" },\n { \"code\": \"BM\", \"name\": \"Bermuda\", \"phonePrefix\": \"1-441\" },\n { \"code\": \"BN\", \"name\": \"Brunei Darussalam\", \"phonePrefix\": \"673\" },\n { \"code\": \"BO\", \"name\": \"Bolivia, Plurinational State of\", \"phonePrefix\": \"591\" },\n { \"code\": \"BQ\", \"name\": \"Bonaire, Sint Eustatius and Saba\", \"phonePrefix\": \"599\" },\n { \"code\": \"BR\", \"name\": \"Brazil\", \"phonePrefix\": \"55\" },\n { \"code\": \"BS\", \"name\": \"Bahamas\", \"phonePrefix\": \"1-242\" },\n { \"code\": \"BT\", \"name\": \"Bhutan\", \"phonePrefix\": \"975\" },\n { \"code\": \"BV\", \"name\": \"Bouvet Island\", \"phonePrefix\": \"\" },\n { \"code\": \"BW\", \"name\": \"Botswana\", \"phonePrefix\": \"267\" },\n { \"code\": \"BY\", \"name\": \"Belarus\", \"phonePrefix\": \"375\" },\n { \"code\": \"BZ\", \"name\": \"Belize\", \"phonePrefix\": \"501\" },\n { \"code\": \"CA\", \"name\": \"Canada\", \"phonePrefix\": \"1\" },\n { \"code\": \"CC\", \"name\": \"Cocos (Keeling) Islands\", \"phonePrefix\": \"61\" },\n { \"code\": \"CD\", \"name\": \"Congo, Democratic Republic of the\", \"phonePrefix\": \"243\" },\n { \"code\": \"CF\", \"name\": \"Central African Republic\", \"phonePrefix\": \"236\" },\n { \"code\": \"CG\", \"name\": \"Congo\", \"phonePrefix\": \"242\" },\n { \"code\": \"CH\", \"name\": \"Switzerland\", \"phonePrefix\": \"41\" },\n { \"code\": \"CI\", \"name\": \"Côte d'Ivoire\", \"phonePrefix\": \"225\" },\n { \"code\": \"CK\", \"name\": \"Cook Islands\", \"phonePrefix\": \"682\" },\n { \"code\": \"CL\", \"name\": \"Chile\", \"phonePrefix\": \"56\" },\n { \"code\": \"CM\", \"name\": \"Cameroon\", \"phonePrefix\": \"237\" },\n { \"code\": \"CN\", \"name\": \"China\", \"phonePrefix\": \"86\" },\n { \"code\": \"CO\", \"name\": \"Colombia\", \"phonePrefix\": \"57\" },\n { \"code\": \"CR\", \"name\": \"Costa Rica\", \"phonePrefix\": \"506\" },\n { \"code\": \"CU\", \"name\": \"Cuba\", \"phonePrefix\": \"53\" },\n { \"code\": \"CV\", \"name\": \"Cabo Verde\", \"phonePrefix\": \"238\" },\n { \"code\": \"CW\", \"name\": \"Curaçao\", \"phonePrefix\": \"599\" },\n { \"code\": \"CX\", \"name\": \"Christmas Island\", \"phonePrefix\": \"61\" },\n { \"code\": \"CY\", \"name\": \"Cyprus\", \"phonePrefix\": \"357\" },\n { \"code\": \"CZ\", \"name\": \"Czechia\", \"phonePrefix\": \"420\" },\n { \"code\": \"DE\", \"name\": \"Germany\", \"phonePrefix\": \"49\" },\n { \"code\": \"DJ\", \"name\": \"Djibouti\", \"phonePrefix\": \"253\" },\n { \"code\": \"DK\", \"name\": \"Denmark\", \"phonePrefix\": \"45\" },\n { \"code\": \"DM\", \"name\": \"Dominica\", \"phonePrefix\": \"1-767\" },\n { \"code\": \"DO\", \"name\": \"Dominican Republic\", \"phonePrefix\": \"1-809\" },\n { \"code\": \"DZ\", \"name\": \"Algeria\", \"phonePrefix\": \"213\" },\n { \"code\": \"EC\", \"name\": \"Ecuador\", \"phonePrefix\": \"593\" },\n { \"code\": \"EE\", \"name\": \"Estonia\", \"phonePrefix\": \"372\" },\n { \"code\": \"EG\", \"name\": \"Egypt\", \"phonePrefix\": \"20\" },\n { \"code\": \"EH\", \"name\": \"Western Sahara\", \"phonePrefix\": \"212\" },\n { \"code\": \"ER\", \"name\": \"Eritrea\", \"phonePrefix\": \"291\" },\n { \"code\": \"ES\", \"name\": \"Spain\", \"phonePrefix\": \"34\" },\n { \"code\": \"ET\", \"name\": \"Ethiopia\", \"phonePrefix\": \"251\" },\n { \"code\": \"FI\", \"name\": \"Finland\", \"phonePrefix\": \"358\" },\n { \"code\": \"FJ\", \"name\": \"Fiji\", \"phonePrefix\": \"679\" },\n { \"code\": \"FK\", \"name\": \"Falkland Islands (Malvinas)\", \"phonePrefix\": \"500\" },\n { \"code\": \"FM\", \"name\": \"Micronesia, Federated States of\", \"phonePrefix\": \"691\" },\n { \"code\": \"FO\", \"name\": \"Faroe Islands\", \"phonePrefix\": \"298\" },\n { \"code\": \"FR\", \"name\": \"France\", \"phonePrefix\": \"33\" },\n { \"code\": \"GA\", \"name\": \"Gabon\", \"phonePrefix\": \"241\" },\n { \"code\": \"GB\", \"name\": \"United Kingdom\", \"phonePrefix\": \"44\" },\n { \"code\": \"GD\", \"name\": \"Grenada\", \"phonePrefix\": \"1-473\" },\n { \"code\": \"GE\", \"name\": \"Georgia\", \"phonePrefix\": \"995\" },\n { \"code\": \"GF\", \"name\": \"French Guiana\", \"phonePrefix\": \"594\" },\n { \"code\": \"GG\", \"name\": \"Guernsey\", \"phonePrefix\": \"44\" },\n { \"code\": \"GH\", \"name\": \"Ghana\", \"phonePrefix\": \"233\" },\n { \"code\": \"GI\", \"name\": \"Gibraltar\", \"phonePrefix\": \"350\" },\n { \"code\": \"GL\", \"name\": \"Greenland\", \"phonePrefix\": \"299\" },\n { \"code\": \"GM\", \"name\": \"Gambia\", \"phonePrefix\": \"220\" },\n { \"code\": \"GN\", \"name\": \"Guinea\", \"phonePrefix\": \"224\" },\n { \"code\": \"GP\", \"name\": \"Guadeloupe\", \"phonePrefix\": \"590\" },\n { \"code\": \"GQ\", \"name\": \"Equatorial Guinea\", \"phonePrefix\": \"240\" },\n { \"code\": \"GR\", \"name\": \"Greece\", \"phonePrefix\": \"30\" },\n { \"code\": \"GS\", \"name\": \"South Georgia and the South Sandwich Islands\", \"phonePrefix\": \"\" },\n { \"code\": \"GT\", \"name\": \"Guatemala\", \"phonePrefix\": \"502\" },\n { \"code\": \"GU\", \"name\": \"Guam\", \"phonePrefix\": \"1-671\" },\n { \"code\": \"GW\", \"name\": \"Guinea-Bissau\", \"phonePrefix\": \"245\" },\n { \"code\": \"GY\", \"name\": \"Guyana\", \"phonePrefix\": \"592\" },\n { \"code\": \"HK\", \"name\": \"Hong Kong\", \"phonePrefix\": \"852\" },\n { \"code\": \"HM\", \"name\": \"Heard Island and McDonald Islands\", \"phonePrefix\": \"\" },\n { \"code\": \"HN\", \"name\": \"Honduras\", \"phonePrefix\": \"504\" },\n { \"code\": \"HR\", \"name\": \"Croatia\", \"phonePrefix\": \"385\" },\n { \"code\": \"HT\", \"name\": \"Haiti\", \"phonePrefix\": \"509\" },\n { \"code\": \"HU\", \"name\": \"Hungary\", \"phonePrefix\": \"36\" },\n { \"code\": \"ID\", \"name\": \"Indonesia\", \"phonePrefix\": \"62\" },\n { \"code\": \"IE\", \"name\": \"Ireland\", \"phonePrefix\": \"353\" },\n { \"code\": \"IL\", \"name\": \"Israel\", \"phonePrefix\": \"972\" },\n { \"code\": \"IM\", \"name\": \"Isle of Man\", \"phonePrefix\": \"44\" },\n { \"code\": \"IN\", \"name\": \"India\", \"phonePrefix\": \"91\" },\n { \"code\": \"IO\", \"name\": \"British Indian Ocean Territory\", \"phonePrefix\": \"246\" },\n { \"code\": \"IQ\", \"name\": \"Iraq\", \"phonePrefix\": \"964\" },\n { \"code\": \"IR\", \"name\": \"Iran, Islamic Republic of\", \"phonePrefix\": \"98\" },\n { \"code\": \"IS\", \"name\": \"Iceland\", \"phonePrefix\": \"354\" },\n { \"code\": \"IT\", \"name\": \"Italy\", \"phonePrefix\": \"39\" },\n { \"code\": \"JE\", \"name\": \"Jersey\", \"phonePrefix\": \"44\" },\n { \"code\": \"JM\", \"name\": \"Jamaica\", \"phonePrefix\": \"1-876\" },\n { \"code\": \"JO\", \"name\": \"Jordan\", \"phonePrefix\": \"962\" },\n { \"code\": \"JP\", \"name\": \"Japan\", \"phonePrefix\": \"81\" },\n { \"code\": \"KE\", \"name\": \"Kenya\", \"phonePrefix\": \"254\" },\n { \"code\": \"KG\", \"name\": \"Kyrgyzstan\", \"phonePrefix\": \"996\" },\n { \"code\": \"KH\", \"name\": \"Cambodia\", \"phonePrefix\": \"855\" },\n { \"code\": \"KI\", \"name\": \"Kiribati\", \"phonePrefix\": \"686\" },\n { \"code\": \"KM\", \"name\": \"Comoros\", \"phonePrefix\": \"269\" },\n { \"code\": \"KN\", \"name\": \"Saint Kitts and Nevis\", \"phonePrefix\": \"1-869\" },\n { \"code\": \"KP\", \"name\": \"Korea, Democratic People's Republic of\", \"phonePrefix\": \"850\" },\n { \"code\": \"KR\", \"name\": \"Korea, Republic of\", \"phonePrefix\": \"82\" },\n { \"code\": \"KW\", \"name\": \"Kuwait\", \"phonePrefix\": \"965\" },\n { \"code\": \"KY\", \"name\": \"Cayman Islands\", \"phonePrefix\": \"1-345\" },\n { \"code\": \"KZ\", \"name\": \"Kazakhstan\", \"phonePrefix\": \"7\" },\n { \"code\": \"LA\", \"name\": \"Lao People's Democratic Republic\", \"phonePrefix\": \"856\" },\n { \"code\": \"LB\", \"name\": \"Lebanon\", \"phonePrefix\": \"961\" },\n { \"code\": \"LC\", \"name\": \"Saint Lucia\", \"phonePrefix\": \"1-758\" },\n { \"code\": \"LI\", \"name\": \"Liechtenstein\", \"phonePrefix\": \"423\" },\n { \"code\": \"LK\", \"name\": \"Sri Lanka\", \"phonePrefix\": \"94\" },\n { \"code\": \"LR\", \"name\": \"Liberia\", \"phonePrefix\": \"231\" },\n { \"code\": \"LS\", \"name\": \"Lesotho\", \"phonePrefix\": \"266\" },\n { \"code\": \"LT\", \"name\": \"Lithuania\", \"phonePrefix\": \"370\" },\n { \"code\": \"LU\", \"name\": \"Luxembourg\", \"phonePrefix\": \"352\" },\n { \"code\": \"LV\", \"name\": \"Latvia\", \"phonePrefix\": \"371\" },\n { \"code\": \"LY\", \"name\": \"Libya\", \"phonePrefix\": \"218\" },\n { \"code\": \"MA\", \"name\": \"Morocco\", \"phonePrefix\": \"212\" },\n { \"code\": \"MC\", \"name\": \"Monaco\", \"phonePrefix\": \"377\" },\n { \"code\": \"MD\", \"name\": \"Moldova, Republic of\", \"phonePrefix\": \"373\" },\n { \"code\": \"ME\", \"name\": \"Montenegro\", \"phonePrefix\": \"382\" },\n { \"code\": \"MF\", \"name\": \"Saint Martin (French part)\", \"phonePrefix\": \"590\" },\n { \"code\": \"MG\", \"name\": \"Madagascar\", \"phonePrefix\": \"261\" },\n { \"code\": \"MH\", \"name\": \"Marshall Islands\", \"phonePrefix\": \"692\" },\n { \"code\": \"MK\", \"name\": \"Macedonia, Republic of\", \"phonePrefix\": \"389\" },\n { \"code\": \"ML\", \"name\": \"Mali\", \"phonePrefix\": \"223\" },\n { \"code\": \"MM\", \"name\": \"Myanmar\", \"phonePrefix\": \"95\" },\n { \"code\": \"MN\", \"name\": \"Mongolia\", \"phonePrefix\": \"976\" },\n { \"code\": \"MO\", \"name\": \"Macao\", \"phonePrefix\": \"853\" },\n { \"code\": \"MP\", \"name\": \"Northern Mariana Islands\", \"phonePrefix\": \"1-670\" },\n { \"code\": \"MQ\", \"name\": \"Martinique\", \"phonePrefix\": \"596\" },\n { \"code\": \"MR\", \"name\": \"Mauritania\", \"phonePrefix\": \"222\" },\n { \"code\": \"MS\", \"name\": \"Montserrat\", \"phonePrefix\": \"1-664\" },\n { \"code\": \"MT\", \"name\": \"Malta\", \"phonePrefix\": \"356\" },\n { \"code\": \"MU\", \"name\": \"Mauritius\", \"phonePrefix\": \"230\" },\n { \"code\": \"MV\", \"name\": \"Maldives\", \"phonePrefix\": \"960\" },\n { \"code\": \"MW\", \"name\": \"Malawi\", \"phonePrefix\": \"265\" },\n { \"code\": \"MX\", \"name\": \"Mexico\", \"phonePrefix\": \"52\" },\n { \"code\": \"MY\", \"name\": \"Malaysia\", \"phonePrefix\": \"60\" },\n { \"code\": \"MZ\", \"name\": \"Mozambique\", \"phonePrefix\": \"258\" },\n { \"code\": \"NA\", \"name\": \"Namibia\", \"phonePrefix\": \"264\" },\n { \"code\": \"NC\", \"name\": \"New Caledonia\", \"phonePrefix\": \"687\" },\n { \"code\": \"NE\", \"name\": \"Niger\", \"phonePrefix\": \"227\" },\n { \"code\": \"NF\", \"name\": \"Norfolk Island\", \"phonePrefix\": \"672\" },\n { \"code\": \"NG\", \"name\": \"Nigeria\", \"phonePrefix\": \"234\" },\n { \"code\": \"NI\", \"name\": \"Nicaragua\", \"phonePrefix\": \"505\" },\n { \"code\": \"NL\", \"name\": \"Netherlands\", \"phonePrefix\": \"31\" },\n { \"code\": \"NO\", \"name\": \"Norway\", \"phonePrefix\": \"47\" },\n { \"code\": \"NP\", \"name\": \"Nepal\", \"phonePrefix\": \"977\" },\n { \"code\": \"NR\", \"name\": \"Nauru\", \"phonePrefix\": \"674\" },\n { \"code\": \"NU\", \"name\": \"Niue\", \"phonePrefix\": \"683\" },\n { \"code\": \"NZ\", \"name\": \"New Zealand\", \"phonePrefix\": \"64\" },\n { \"code\": \"OM\", \"name\": \"Oman\", \"phonePrefix\": \"968\" },\n { \"code\": \"PA\", \"name\": \"Panama\", \"phonePrefix\": \"507\" },\n { \"code\": \"PE\", \"name\": \"Peru\", \"phonePrefix\": \"51\" },\n { \"code\": \"PF\", \"name\": \"French Polynesia\", \"phonePrefix\": \"689\" },\n { \"code\": \"PG\", \"name\": \"Papua New Guinea\", \"phonePrefix\": \"675\" },\n { \"code\": \"PH\", \"name\": \"Philippines\", \"phonePrefix\": \"63\" },\n { \"code\": \"PK\", \"name\": \"Pakistan\", \"phonePrefix\": \"92\" },\n { \"code\": \"PL\", \"name\": \"Poland\", \"phonePrefix\": \"48\" },\n { \"code\": \"PM\", \"name\": \"Saint Pierre and Miquelon\", \"phonePrefix\": \"508\" },\n { \"code\": \"PN\", \"name\": \"Pitcairn\", \"phonePrefix\": \"64\" },\n { \"code\": \"PR\", \"name\": \"Puerto Rico\", \"phonePrefix\": \"1-787\" },\n { \"code\": \"PS\", \"name\": \"Palestinian Territory, Occupied\", \"phonePrefix\": \"970\" },\n { \"code\": \"PT\", \"name\": \"Portugal\", \"phonePrefix\": \"351\" },\n { \"code\": \"PW\", \"name\": \"Palau\", \"phonePrefix\": \"680\" },\n { \"code\": \"PY\", \"name\": \"Paraguay\", \"phonePrefix\": \"595\" },\n { \"code\": \"QA\", \"name\": \"Qatar\", \"phonePrefix\": \"974\" },\n { \"code\": \"RE\", \"name\": \"Réunion\", \"phonePrefix\": \"262\" },\n { \"code\": \"RO\", \"name\": \"Romania\", \"phonePrefix\": \"40\" },\n { \"code\": \"RS\", \"name\": \"Serbia\", \"phonePrefix\": \"381\" },\n { \"code\": \"RU\", \"name\": \"Russian Federation\", \"phonePrefix\": \"7\" },\n { \"code\": \"RW\", \"name\": \"Rwanda\", \"phonePrefix\": \"250\" },\n { \"code\": \"SA\", \"name\": \"Saudi Arabia\", \"phonePrefix\": \"966\" },\n { \"code\": \"SB\", \"name\": \"Solomon Islands\", \"phonePrefix\": \"677\" },\n { \"code\": \"SC\", \"name\": \"Seychelles\", \"phonePrefix\": \"248\" },\n { \"code\": \"SD\", \"name\": \"Sudan\", \"phonePrefix\": \"249\" },\n { \"code\": \"SE\", \"name\": \"Sweden\", \"phonePrefix\": \"46\" },\n { \"code\": \"SG\", \"name\": \"Singapore\", \"phonePrefix\": \"65\" },\n { \"code\": \"SH\", \"name\": \"Saint Helena\", \"phonePrefix\": \"290\" },\n { \"code\": \"SI\", \"name\": \"Slovenia\", \"phonePrefix\": \"386\" },\n { \"code\": \"SJ\", \"name\": \"Svalbard and Jan Mayen\", \"phonePrefix\": \"47\" },\n { \"code\": \"SK\", \"name\": \"Slovakia\", \"phonePrefix\": \"421\" },\n { \"code\": \"SL\", \"name\": \"Sierra Leone\", \"phonePrefix\": \"232\" },\n { \"code\": \"SM\", \"name\": \"San Marino\", \"phonePrefix\": \"378\" },\n { \"code\": \"SN\", \"name\": \"Senegal\", \"phonePrefix\": \"221\" },\n { \"code\": \"SO\", \"name\": \"Somalia\", \"phonePrefix\": \"252\" },\n { \"code\": \"SR\", \"name\": \"Suriname\", \"phonePrefix\": \"597\" },\n { \"code\": \"SS\", \"name\": \"South Sudan\", \"phonePrefix\": \"211\" },\n { \"code\": \"ST\", \"name\": \"Sao Tome and Principe\", \"phonePrefix\": \"239\" },\n { \"code\": \"SV\", \"name\": \"El Salvador\", \"phonePrefix\": \"503\" },\n { \"code\": \"SX\", \"name\": \"Sint Maarten\", \"phonePrefix\": \"1-721\" },\n { \"code\": \"SY\", \"name\": \"Syrian Arab Republic\", \"phonePrefix\": \"963\" },\n { \"code\": \"SZ\", \"name\": \"Swaziland\", \"phonePrefix\": \"268\" },\n { \"code\": \"TC\", \"name\": \"Turks and Caicos Islands\", \"phonePrefix\": \"1-649\" },\n { \"code\": \"TD\", \"name\": \"Chad\", \"phonePrefix\": \"235\" },\n { \"code\": \"TF\", \"name\": \"French Southern Territories\", \"phonePrefix\": \"\" },\n { \"code\": \"TG\", \"name\": \"Togo\", \"phonePrefix\": \"228\" },\n { \"code\": \"TH\", \"name\": \"Thailand\", \"phonePrefix\": \"66\" },\n { \"code\": \"TJ\", \"name\": \"Tajikistan\", \"phonePrefix\": \"992\" },\n { \"code\": \"TK\", \"name\": \"Tokelau\", \"phonePrefix\": \"690\" },\n { \"code\": \"TL\", \"name\": \"Timor-Leste\", \"phonePrefix\": \"670\" },\n { \"code\": \"TM\", \"name\": \"Turkmenistan\", \"phonePrefix\": \"993\" },\n { \"code\": \"TN\", \"name\": \"Tunisia\", \"phonePrefix\": \"216\" },\n { \"code\": \"TO\", \"name\": \"Tonga\", \"phonePrefix\": \"676\" },\n { \"code\": \"TR\", \"name\": \"Turkey\", \"phonePrefix\": \"90\" },\n { \"code\": \"TT\", \"name\": \"Trinidad and Tobago\", \"phonePrefix\": \"1-868\" },\n { \"code\": \"TV\", \"name\": \"Tuvalu\", \"phonePrefix\": \"688\" },\n { \"code\": \"TW\", \"name\": \"Taiwan, Province of China\", \"phonePrefix\": \"886\" },\n { \"code\": \"TZ\", \"name\": \"Tanzania, United Republic of\", \"phonePrefix\": \"255\" },\n { \"code\": \"UA\", \"name\": \"Ukraine\", \"phonePrefix\": \"380\" },\n { \"code\": \"UG\", \"name\": \"Uganda\", \"phonePrefix\": \"256\" },\n { \"code\": \"UM\", \"name\": \"United States Minor Outlying Islands\", \"phonePrefix\": \"\" },\n { \"code\": \"US\", \"name\": \"United States\", \"phonePrefix\": \"1\" },\n { \"code\": \"UY\", \"name\": \"Uruguay\", \"phonePrefix\": \"598\" },\n { \"code\": \"UZ\", \"name\": \"Uzbekistan\", \"phonePrefix\": \"998\" },\n { \"code\": \"VA\", \"name\": \"Holy See\", \"phonePrefix\": \"379\" },\n { \"code\": \"VC\", \"name\": \"Saint Vincent and the Grenadines\", \"phonePrefix\": \"1-784\" },\n { \"code\": \"VE\", \"name\": \"Venezuela, Bolivarian Republic of\", \"phonePrefix\": \"58\" },\n { \"code\": \"VG\", \"name\": \"Virgin Islands, British\", \"phonePrefix\": \"1-284\" },\n { \"code\": \"VI\", \"name\": \"Virgin Islands, U.S.\", \"phonePrefix\": \"1-340\" },\n { \"code\": \"VN\", \"name\": \"Viet Nam\", \"phonePrefix\": \"84\" },\n { \"code\": \"VU\", \"name\": \"Vanuatu\", \"phonePrefix\": \"678\" },\n { \"code\": \"WF\", \"name\": \"Wallis and Futuna\", \"phonePrefix\": \"681\" },\n { \"code\": \"WS\", \"name\": \"Samoa\", \"phonePrefix\": \"685\" },\n { \"code\": \"YE\", \"name\": \"Yemen\", \"phonePrefix\": \"967\" },\n { \"code\": \"YT\", \"name\": \"Mayotte\", \"phonePrefix\": \"262\" },\n { \"code\": \"ZA\", \"name\": \"South Africa\", \"phonePrefix\": \"27\" },\n { \"code\": \"ZM\", \"name\": \"Zambia\", \"phonePrefix\": \"260\" },\n { \"code\": \"ZW\", \"name\": \"Zimbabwe\", \"phonePrefix\": \"263\" }\n];\n","/**\n * What the library refuses, by code. The message is for developers and stays\n * English; code that reacts to a refusal reads `code`.\n */\n\n/** The reasons an `I18nError` can have. */\nexport type TI18nErrorCode =\n /** a tag that is no BCP 47 language tag */\n | 'invalid_locale'\n /** a language none of the catalogs, or the host's list, offers */\n | 'unavailable_locale'\n /** a catalog of that namespace is defined already, by this or another copy of the library */\n | 'duplicate_namespace'\n /** another copy of the library keeps the shared catalog registry under another protocol */\n | 'incompatible_registry'\n /** the runtime cannot do what is asked exactly, such as formatting a decimal string without a float */\n | 'unsupported_runtime'\n /** a source message that does not read, or a catalog definition without a namespace */\n | 'invalid_catalog'\n /** a second translation of a catalog into the same language */\n | 'duplicate_translation'\n /** a translation that does not match its source catalog; `problems` says where */\n | 'invalid_translation'\n /** a translation could not be loaded */\n | 'load_failed'\n /** words were asked for before the instance's first language was loaded */\n | 'not_ready'\n /** words of a catalog whose translation for the current language is not loaded yet: `await i18n.whenLoaded(catalog)` */\n | 'not_loaded'\n /** a message was formatted without one of its arguments */\n | 'missing_argument'\n /** a message was formatted with an argument of the wrong kind */\n | 'invalid_argument';\n\n/** One thing wrong with a translation, as `verifyCatalog` reports it. */\nexport interface ITranslationProblem {\n code: 'missing' | 'extra' | 'signature' | 'syntax';\n key: string;\n detail: string;\n}\n\nexport class I18nError extends Error {\n public override readonly name = 'I18nError';\n constructor(\n public readonly code: TI18nErrorCode,\n messageArg: string,\n optionsArg: { cause?: unknown; problems?: readonly ITranslationProblem[] } = {},\n ) {\n super(messageArg, optionsArg.cause === undefined ? undefined : { cause: optionsArg.cause });\n this.problems = optionsArg.problems ?? [];\n }\n\n /** For `invalid_translation`: every key that does not match, in the source's order, extra keys last. */\n public readonly problems: readonly ITranslationProblem[];\n}\n","/**\n * Records keyed by names from messages and catalogs. They have no prototype,\n * so a name such as `constructor` or `__proto__` is a key like any other and\n * never reads or replaces a member of `Object.prototype`.\n */\n\n/** An empty record without a prototype. */\nexport const emptyRecord = <V>(): Record<string, V> => {\n const record: Record<string, V> = {};\n Object.setPrototypeOf(record, null);\n return record;\n};\n","/**\n * The runtime reader of the message grammar: a typed subset of ICU\n * MessageFormat 1 (see the readme's \"Message grammar\"). `i18n.types.ts` reads the same\n * grammar at compile time; both are held to one table of cases, so a message\n * the compiler accepts is a message this parser accepts, with the same\n * parameters, and a refusal names the same reason.\n */\n\nimport { emptyRecord } from './i18n.records.js';\nimport type { IArgumentTypeKinds, IArgumentTypeStyles, TArgumentKind, TPluralCategory } from './i18n.types.js';\n\n/** A message the grammar refuses. `why` is the reason in the words the compiler uses too. */\nexport class MessageSyntaxError extends Error {\n public override readonly name = 'MessageSyntaxError';\n constructor(\n public readonly why: string,\n public readonly text: string,\n ) {\n super(`${why}, in the message ${JSON.stringify(text)}`);\n }\n}\n\n// ---------------------------------------------------------------- the tree\n\nexport type TSimpleArgumentType = keyof IArgumentTypeStyles;\n\nexport interface ITextNode {\n type: 'text';\n value: string;\n}\n\n/** `#` inside a plural branch: the plural's number. */\nexport interface IPoundNode {\n type: 'pound';\n}\n\nexport interface IStringArgumentNode {\n type: 'string';\n name: string;\n}\n\nexport interface ISimpleArgumentNode {\n type: 'simple';\n name: string;\n argumentType: TSimpleArgumentType;\n style?: string;\n}\n\nexport interface IPluralNode {\n type: 'plural';\n name: string;\n ordinal: boolean;\n /** `=n` selectors keep their `=`: `{ '=0': […], one: […], other: […] }` */\n branches: Record<string, TMessageNode[]>;\n}\n\nexport interface ISelectNode {\n type: 'select';\n name: string;\n branches: Record<string, TMessageNode[]>;\n}\n\nexport interface ITagNode {\n type: 'tag';\n name: string;\n children: TMessageNode[];\n}\n\nexport type TMessageNode =\n | ITextNode\n | IPoundNode\n | IStringArgumentNode\n | ISimpleArgumentNode\n | IPluralNode\n | ISelectNode\n | ITagNode;\n\n/**\n * A message as the parser read it: its tree and what it asks of its caller.\n * `args`, `keys` and the `branches` of each plural and select are records\n * without a prototype, so every name is a key of its own.\n */\nexport interface IParsedMessage {\n text: string;\n nodes: TMessageNode[];\n /** each argument and the kind it ends up as (a name used as `number` and `plural` is `plural`), tags excluded */\n args: Record<string, Exclude<TArgumentKind, 'tag'>>;\n /** the keys of each select argument, `other` excluded */\n keys: Record<string, string[]>;\n tags: string[];\n /**\n * Every use of an argument as `name:kind` and every select key as\n * `name=key`, sorted: what a translation must match. The compiler compares\n * the same thing.\n */\n signature: string[];\n}\n\n// ---------------------------------------------------------------- characters\n\nconst WS = new Set([' ', '\\n', '\\t', '\\r']);\nconst QUOTABLE = new Set(['{', '}', '<', '>', '#']);\nconst NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;\n/** An argument no object literal can pass: `{ __proto__: … }` sets the prototype instead. */\nconst UNPASSABLE_NAME = '__proto__';\nconst LETTER = /^[A-Za-z]$/;\nconst PLURAL_CATEGORIES: ReadonlySet<string> = new Set<TPluralCategory>(['zero', 'one', 'two', 'few', 'many', 'other']);\n\nconst ARGUMENT_KINDS: Readonly<Record<string, TArgumentKind>> = {\n number: 'number',\n money: 'money',\n date: 'instant',\n time: 'instant',\n day: 'day',\n month: 'month',\n list: 'list',\n relative: 'relative',\n plural: 'plural',\n selectordinal: 'plural',\n select: 'select',\n} satisfies Record<keyof IArgumentTypeKinds, TArgumentKind>;\n\nconst STYLES: Readonly<Record<TSimpleArgumentType, readonly string[]>> = {\n number: ['integer', 'percent'],\n money: ['code', 'accounting', 'signed'],\n date: ['short', 'medium', 'long', 'full'],\n time: ['short', 'medium', 'long', 'full'],\n day: ['short', 'medium', 'long', 'full'],\n month: ['short', 'long'],\n list: ['and', 'or', 'unit'],\n relative: ['long', 'short', 'narrow'],\n} satisfies { [K in TSimpleArgumentType]: readonly IArgumentTypeStyles[K][] };\n\nconst isSimpleType = (typeArg: string): typeArg is TSimpleArgumentType => Object.hasOwn(STYLES, typeArg);\n\nconst trim = (textArg: string): string => {\n let start = 0;\n let end = textArg.length;\n while (start < end && WS.has(textArg[start])) start++;\n while (end > start && WS.has(textArg[end - 1])) end--;\n return textArg.slice(start, end);\n};\n\n/** The first of `delimiters` at or after `from`: its index, or -1. */\nconst earliest = (textArg: string, fromArg: number, delimitersArg: string): number => {\n for (let index = fromArg; index < textArg.length; index++) {\n if (delimitersArg.includes(textArg[index])) return index;\n }\n return -1;\n};\n\n// ---------------------------------------------------------------- the reader\n\ninterface IReaderState {\n text: string;\n position: number;\n uses: Array<[string, TArgumentKind]>;\n keys: Record<string, string[]>;\n}\n\nclass Reader {\n private state: IReaderState;\n\n constructor(textArg: string) {\n this.state = { text: textArg, position: 0, uses: [], keys: emptyRecord() };\n }\n\n private fail(whyArg: string): never {\n throw new MessageSyntaxError(whyArg, this.state.text);\n }\n\n public read(): IParsedMessage {\n const nodes = this.readNodes({ kind: 'top' }, false);\n return this.finish(nodes);\n }\n\n /**\n * Message text up to the end of what `context` encloses: the end of the\n * message, the `}` of a branch, or the closing tag of a tag.\n */\n private readNodes(contextArg: { kind: 'top' } | { kind: 'branch' } | { kind: 'tag'; name: string }, inPluralArg: boolean): TMessageNode[] {\n const { text } = this.state;\n const nodes: TMessageNode[] = [];\n let buffer = '';\n const flush = () => {\n if (buffer) nodes.push({ type: 'text', value: buffer });\n buffer = '';\n };\n while (true) {\n if (this.state.position >= text.length) {\n if (contextArg.kind === 'top') {\n flush();\n return nodes;\n }\n if (contextArg.kind === 'tag') this.fail(`the tag <${contextArg.name}> is not closed`);\n this.fail('an argument is not closed');\n }\n const char = text[this.state.position];\n if (char === '{') {\n flush();\n this.state.position++;\n nodes.push(this.readArgument(inPluralArg));\n } else if (char === '}') {\n if (contextArg.kind === 'branch') {\n flush();\n this.state.position++;\n return nodes;\n }\n if (contextArg.kind === 'tag') this.fail(`the tag <${contextArg.name}> is not closed`);\n this.fail('a closing brace without an opening one');\n } else if (char === '<') {\n const next = text[this.state.position + 1];\n if (next === '/') {\n const close = text.indexOf('>', this.state.position + 2);\n if (close === -1) this.fail('a closing tag is not complete');\n const name = text.slice(this.state.position + 2, close);\n if (contextArg.kind !== 'tag' || contextArg.name !== name) this.fail(`the closing tag </${name}> does not close an open tag`);\n flush();\n this.state.position = close + 1;\n return nodes;\n }\n if (next !== undefined && LETTER.test(next)) {\n const close = text.indexOf('>', this.state.position + 1);\n if (close === -1) this.fail('a tag is not complete');\n const name = text.slice(this.state.position + 1, close);\n if (!NAME.test(name)) this.fail(`<${name}> is no tag name`);\n flush();\n this.state.position = close + 1;\n this.state.uses.push([name, 'tag']);\n nodes.push({ type: 'tag', name, children: this.readNodes({ kind: 'tag', name }, inPluralArg) });\n } else {\n buffer += char;\n this.state.position++;\n }\n } else if (char === \"'\") {\n const next = text[this.state.position + 1];\n if (next === \"'\") {\n buffer += \"'\";\n this.state.position += 2;\n } else if (next !== undefined && QUOTABLE.has(next)) {\n const close = text.indexOf(\"'\", this.state.position + 1);\n const end = close === -1 ? text.length : close;\n buffer += text.slice(this.state.position + 1, end);\n this.state.position = close === -1 ? text.length : close + 1;\n } else {\n buffer += char;\n this.state.position++;\n }\n } else if (char === '#' && inPluralArg) {\n flush();\n nodes.push({ type: 'pound' });\n this.state.position++;\n } else {\n buffer += char;\n this.state.position++;\n }\n }\n }\n\n /** Reads `name}`, `name, type}`, `name, type, style}` or `name, plural|select, branches}` after a `{`. */\n private readArgument(inPluralArg: boolean): TMessageNode {\n const { text } = this.state;\n const headEnd = earliest(text, this.state.position, '{,}');\n if (headEnd === -1 || text[headEnd] === '{') this.fail('an argument is not closed');\n const name = trim(text.slice(this.state.position, headEnd));\n if (!NAME.test(name) || name === UNPASSABLE_NAME) this.fail(`\"${name}\" is no argument name`);\n this.state.position = headEnd + 1;\n if (text[headEnd] === '}') {\n this.state.uses.push([name, 'string']);\n return { type: 'string', name };\n }\n const typeEnd = earliest(text, this.state.position, '{,}');\n const argumentType = trim(text.slice(this.state.position, typeEnd === -1 ? text.length : typeEnd));\n if (isSimpleType(argumentType)) {\n if (typeEnd === -1 || text[typeEnd] === '{') this.fail(`the argument ${name} is not closed`);\n this.state.uses.push([name, ARGUMENT_KINDS[argumentType]]);\n if (text[typeEnd] === '}') {\n this.state.position = typeEnd + 1;\n return { type: 'simple', name, argumentType };\n }\n const styleEnd = earliest(text, typeEnd + 1, '{,}');\n if (styleEnd === -1 || text[styleEnd] !== '}') this.fail(`the argument ${name} is not closed`);\n const style = trim(text.slice(typeEnd + 1, styleEnd));\n if (!STYLES[argumentType].includes(style)) this.fail(`\"${style}\" is no style of ${argumentType}`);\n this.state.position = styleEnd + 1;\n return { type: 'simple', name, argumentType, style };\n }\n if (argumentType === 'plural' || argumentType === 'selectordinal' || argumentType === 'select') {\n if (typeEnd === -1 || text[typeEnd] !== ',') this.fail(`the ${argumentType} argument ${name} has no branches`);\n this.state.uses.push([name, ARGUMENT_KINDS[argumentType]]);\n this.state.position = typeEnd + 1;\n const kind = argumentType === 'select' ? 'select' : 'plural';\n const branches = this.readBranches(name, kind, inPluralArg);\n if (kind === 'select') {\n (this.state.keys[name] ??= []).push(...Object.keys(branches).filter((keyArg) => keyArg !== 'other'));\n return { type: 'select', name, branches };\n }\n return { type: 'plural', name, ordinal: argumentType === 'selectordinal', branches };\n }\n return this.fail(`\"${argumentType}\" is no argument type`);\n }\n\n private readBranches(nameArg: string, kindArg: 'plural' | 'select', inPluralArg: boolean): Record<string, TMessageNode[]> {\n const { text } = this.state;\n const branches = emptyRecord<TMessageNode[]>();\n while (true) {\n while (this.state.position < text.length && WS.has(text[this.state.position])) this.state.position++;\n if (text[this.state.position] === '}') {\n if (!Object.hasOwn(branches, 'other')) this.fail(`the ${kindArg} argument ${nameArg} has no other branch`);\n this.state.position++;\n return branches;\n }\n const open = earliest(text, this.state.position, '{}');\n if (open === -1 || text[open] !== '{') this.fail(`the ${kindArg} argument ${nameArg} is not closed`);\n const key = trim(text.slice(this.state.position, open));\n const valid = kindArg === 'plural' ? PLURAL_CATEGORIES.has(key) || /^=[0-9]+$/.test(key) : NAME.test(key);\n if (!valid) this.fail(`\"${key}\" is no selector of a ${kindArg} argument`);\n if (Object.hasOwn(branches, key)) this.fail(`the ${kindArg} argument ${nameArg} has two ${key} branches`);\n this.state.position = open + 1;\n branches[key] = this.readNodes({ kind: 'branch' }, kindArg === 'plural' || inPluralArg);\n }\n }\n\n private finish(nodesArg: TMessageNode[]): IParsedMessage {\n const kindsByName = new Map<string, Set<TArgumentKind>>();\n for (const [name, kind] of this.state.uses) {\n let kinds = kindsByName.get(name);\n if (!kinds) kindsByName.set(name, (kinds = new Set()));\n kinds.add(kind);\n }\n const args: IParsedMessage['args'] = emptyRecord();\n const tags: string[] = [];\n for (const [name, kinds] of kindsByName) {\n const combined = combineKinds(kinds);\n if (combined === undefined) this.fail(`the argument ${name} is used as two different kinds`);\n if (combined === 'tag') tags.push(name);\n else args[name] = combined;\n }\n const signature = new Set<string>();\n for (const [name, kind] of this.state.uses) signature.add(`${name}:${kind}`);\n for (const [name, keys] of Object.entries(this.state.keys)) for (const key of keys) signature.add(`${name}=${key}`);\n return { text: this.state.text, nodes: nodesArg, args, keys: this.state.keys, tags, signature: [...signature].sort() };\n }\n}\n\n/** One kind, or `number` with `plural`, which is `plural`; anything else is no kind. */\nconst combineKinds = (kindsArg: ReadonlySet<TArgumentKind>): TArgumentKind | undefined => {\n if (kindsArg.size === 1) return [...kindsArg][0];\n if (kindsArg.size === 2 && kindsArg.has('number') && kindsArg.has('plural')) return 'plural';\n return undefined;\n};\n\nconst parsedMessages = new Map<string, IParsedMessage>();\n\n/**\n * Reads a message, once per text: a message is parsed the first time it is\n * needed and kept. Throws `MessageSyntaxError` for a message the grammar\n * refuses.\n */\nexport const parseMessage = (textArg: string): IParsedMessage => {\n let parsed = parsedMessages.get(textArg);\n if (!parsed) {\n parsed = new Reader(textArg).read();\n parsedMessages.set(textArg, parsed);\n }\n return parsed;\n};\n\n/** Whether two messages ask for the same arguments, kinds, select keys and tags. */\nexport const sameSignature = (aArg: IParsedMessage, bArg: IParsedMessage): boolean =>\n aArg.signature.length === bArg.signature.length && aArg.signature.every((entryArg, indexArg) => entryArg === bArg.signature[indexArg]);\n","/**\n * Locale tags: canonical form, the fallback chain, negotiation and direction.\n */\n\nimport { I18nError } from './i18n.errors.js';\n\n/** The pseudo-locales for layout testing: accented and lengthened English, and right-to-left English. */\nexport const PSEUDO_LOCALES = ['en-XA', 'ar-XB'] as const;\nexport type TPseudoLocale = (typeof PSEUDO_LOCALES)[number];\n\nexport const isPseudoLocale = (tagArg: string): tagArg is TPseudoLocale => (PSEUDO_LOCALES as readonly string[]).includes(tagArg);\n\n/** A tag in its canonical BCP 47 form (`de-de` → `de-DE`). Throws `I18nError` `invalid_locale` for anything else. */\nexport const canonicalLocale = (tagArg: string): string => {\n try {\n const [canonical] = Intl.getCanonicalLocales(tagArg);\n if (canonical) return canonical;\n } catch (error) {\n throw new I18nError('invalid_locale', `\"${tagArg}\" is no BCP 47 language tag, such as \"de-DE\"`, { cause: error });\n }\n throw new I18nError('invalid_locale', `\"${tagArg}\" is no BCP 47 language tag, such as \"de-DE\"`);\n};\n\n/**\n * Where words for a locale are looked up, most specific first: the tag\n * without its extensions, then one subtag fewer at a time (RFC 4647 lookup).\n * `de-AT-u-nu-latn` → `de-AT`, `de`. A catalog's source language follows the\n * chain, as its last resort.\n */\nexport const localeChain = (tagArg: string): string[] => {\n const base = new Intl.Locale(canonicalLocale(tagArg)).baseName;\n const subtags = base.split('-');\n const chain: string[] = [];\n for (let count = subtags.length; count > 0; count--) {\n // RFC 4647 3.4: a single-letter subtag never ends a lookup tag\n if (subtags[count - 1].length === 1) continue;\n chain.push(subtags.slice(0, count).join('-'));\n }\n return chain;\n};\n\n/**\n * The first of `available` that one of `requested` asks for, in the order of\n * `requested`: looked up along each wish's chain (`de-AT` finds `de`), then\n * by language alone (`de` finds `de-CH`). A requested tag that is no tag is\n * passed over. `undefined` when none fits: the caller decides what then.\n */\nexport const negotiateLocale = (requestedArg: readonly string[], availableArg: readonly string[]): string | undefined => {\n const available = new Map<string, string>();\n for (const tag of availableArg) available.set(canonicalLocale(tag).toLowerCase(), tag);\n const wishes: string[] = [];\n for (const tag of requestedArg) {\n try {\n wishes.push(canonicalLocale(tag));\n } catch {\n // a browser or a user may name anything; a name that is no tag asks for nothing\n }\n }\n for (const wish of wishes) {\n for (const candidate of localeChain(wish)) {\n const found = available.get(candidate.toLowerCase());\n if (found) return found;\n }\n }\n for (const wish of wishes) {\n const language = new Intl.Locale(wish).language;\n for (const tag of availableArg) {\n if (new Intl.Locale(canonicalLocale(tag)).language === language) return tag;\n }\n }\n return undefined;\n};\n\n/** The scripts written right to left that a locale's likely script can be (Unicode, in use today). */\nconst RTL_SCRIPTS: ReadonlySet<string> = new Set(['Adlm', 'Arab', 'Hebr', 'Mand', 'Mend', 'Nkoo', 'Rohg', 'Samr', 'Syrc', 'Thaa', 'Yezi']);\n\n/** Whether a locale is written left to right or right to left, from its likely script (`ar` → `Arab`). */\nexport const textDirection = (tagArg: string): 'ltr' | 'rtl' => {\n const script = new Intl.Locale(canonicalLocale(tagArg)).maximize().script;\n return script !== undefined && RTL_SCRIPTS.has(script) ? 'rtl' : 'ltr';\n};\n","/**\n * Numbers, money, dates, lists and relative times through `Intl`, each in the\n * locale that decides it:\n *\n * - `number`: decimal and grouping separators, the percent sign, number and\n * money patterns;\n * - `date`: date and time patterns, month names, the clock;\n * - `words`: the words of lists, relative times and display names.\n *\n * The currency is never a locale's: an `IMoney` carries its own.\n */\n\nimport { I18nError } from './i18n.errors.js';\nimport type { IMoney, IRelativeTime, TIsoDate, TIsoMonth } from './i18n.values.js';\n\nexport type TDateStyle = 'short' | 'medium' | 'long' | 'full';\nexport type TNumberStyle = 'decimal' | 'integer' | 'percent';\nexport type TListType = 'and' | 'or' | 'unit';\nexport type TRelativeStyle = 'long' | 'short' | 'narrow';\n\n/** The locales and the time zone a `Formats` writes in. */\nexport interface IFormatSettings {\n number: string;\n date: string;\n words: string;\n /** the IANA time zone instants are written in; the runtime's when absent */\n timeZone?: string;\n}\n\nexport interface IMoneyOptions {\n /** how the currency is named: `symbol` (default, `€`, `US$`), `narrowSymbol` (`$`), `code` (`USD`) or `name` */\n display?: 'symbol' | 'narrowSymbol' | 'code' | 'name';\n /**\n * `auto` (default): a minus for a negative amount; `exceptZero`: a plus\n * for a positive amount as well, and no sign for zero (`0,00 €`, never\n * `+0,00 €`); `accounting`: the locale's accounting form, `(€5.00)` in en-US\n */\n sign?: 'auto' | 'exceptZero' | 'accounting';\n}\n\nexport interface IInstantOptions {\n date?: TDateStyle;\n time?: TDateStyle;\n}\n\nconst ISO_DATE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst ISO_MONTH = /^(\\d{4})-(\\d{2})$/;\n\n/** The value of `key` in `cache`, made by `make` the first time. */\nconst once = <T>(cacheArg: Map<string, T>, keyArg: string, makeArg: () => T): T => {\n let value = cacheArg.get(keyArg);\n if (value === undefined) {\n value = makeArg();\n cacheArg.set(keyArg, value);\n }\n return value;\n};\n\n/** The digits after the decimal point of each currency, from CLDR; shared by every `Formats`. */\nconst currencyDigitsCache = new Map<string, number>();\n\n/** Whether each `Intl.NumberFormat` the runtime has met formats a numeric string exactly. */\nconst exactStrings = new WeakMap<object, boolean>();\n\n/**\n * Refuses to go on where `Intl.NumberFormat` reads a numeric string as a\n * float: exact decimal strings came with Intl.NumberFormat v3 (ECMA-402\n * 2023, the Intl part of ES2023). 2^53 + 1 is the first whole number a\n * float cannot hold.\n */\nconst assertExactStrings = (): void => {\n const numberFormat = Intl.NumberFormat;\n let exact = exactStrings.get(numberFormat);\n if (exact === undefined) {\n exact = new numberFormat('en', { useGrouping: false }).format('9007199254740993') === '9007199254740993';\n exactStrings.set(numberFormat, exact);\n }\n if (!exact) {\n throw new I18nError('unsupported_runtime', 'this runtime formats numeric strings through a float, so money cannot be written exactly: Intl.NumberFormat v3 (ECMA-402 2023) is needed');\n }\n};\n\n/** Writes values in the locales of its settings. Formatters are made once per locale and options. */\nexport class Formats {\n private readonly numberFormats = new Map<string, Intl.NumberFormat>();\n private readonly dateFormats = new Map<string, Intl.DateTimeFormat>();\n private readonly listFormats = new Map<string, Intl.ListFormat>();\n private readonly relativeFormats = new Map<string, Intl.RelativeTimeFormat>();\n private readonly displayNames = new Map<string, Intl.DisplayNames>();\n\n constructor(public readonly settings: Readonly<IFormatSettings>) {}\n\n /** The `Intl.NumberFormat` of these options in the number locale, made once. */\n public intlNumberFormat(optionsArg: Intl.NumberFormatOptions): Intl.NumberFormat {\n return once(this.numberFormats, JSON.stringify(optionsArg), () => new Intl.NumberFormat(this.settings.number, optionsArg));\n }\n\n /** The `Intl.DateTimeFormat` of these options in the date locale, made once. */\n public intlDateTimeFormat(optionsArg: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n return once(this.dateFormats, JSON.stringify(optionsArg), () => new Intl.DateTimeFormat(this.settings.date, optionsArg));\n }\n\n /** A number: `1.234,5` in de-DE; `integer` rounds to whole numbers, `percent` writes 0.873 as `87 %`. */\n public number(valueArg: number | bigint, styleArg: TNumberStyle = 'decimal'): string {\n const options: Intl.NumberFormatOptions =\n styleArg === 'percent' ? { style: 'percent' } : styleArg === 'integer' ? { maximumFractionDigits: 0 } : {};\n return this.intlNumberFormat(options).format(valueArg);\n }\n\n /** The digits after the decimal point of a currency: 2 for EUR, 0 for JPY, 3 for BHD. Throws `RangeError` for a code that is none. */\n public currencyDigits(currencyArg: string): number {\n let digits = currencyDigitsCache.get(currencyArg);\n if (digits === undefined) {\n if (!/^[A-Za-z]{3}$/.test(currencyArg)) throw new RangeError(`\"${currencyArg}\" is no ISO 4217 currency code`);\n const resolved = new Intl.NumberFormat('en', { style: 'currency', currency: currencyArg }).resolvedOptions().maximumFractionDigits;\n if (resolved === undefined) throw new RangeError(`the runtime states no minor unit for ${currencyArg}`);\n digits = resolved;\n currencyDigitsCache.set(currencyArg, digits);\n }\n return digits;\n }\n\n /**\n * An amount of money, from its whole minor units as an exact decimal, in the\n * number locale and the currency the value carries: `1.234,56 €`. Throws\n * `RangeError` for minor units that are not a whole safe number, and\n * `I18nError` `unsupported_runtime` where `Intl` would round the decimal\n * through a float (before Intl.NumberFormat v3).\n */\n public money(valueArg: IMoney, optionsArg: IMoneyOptions = {}): string {\n assertExactStrings();\n const digits = this.currencyDigits(valueArg.currency);\n let minor: bigint;\n if (typeof valueArg.minor === 'bigint') minor = valueArg.minor;\n else if (Number.isSafeInteger(valueArg.minor)) minor = BigInt(valueArg.minor);\n else throw new RangeError(`${valueArg.minor} is no whole number of minor units of ${valueArg.currency}`);\n const negative = minor < 0n;\n const units = (negative ? -minor : minor).toString().padStart(digits + 1, '0');\n const whole = units.slice(0, units.length - digits);\n // digits only, with a point and a sign: a numeric string Intl formats exactly\n const decimal = `${negative ? '-' : ''}${whole}${digits > 0 ? `.${units.slice(units.length - digits)}` : ''}` as Intl.StringNumericLiteral;\n const sign = optionsArg.sign ?? 'auto';\n return this.intlNumberFormat({\n style: 'currency',\n currency: valueArg.currency,\n currencyDisplay: optionsArg.display ?? 'symbol',\n currencySign: sign === 'accounting' ? 'accounting' : 'standard',\n signDisplay: sign === 'exceptZero' ? 'exceptZero' : 'auto',\n minimumFractionDigits: digits,\n maximumFractionDigits: digits,\n }).format(decimal);\n }\n\n /** A moment in time in the time zone of the settings: date `medium` and time `short` unless a style is given. Throws `RangeError` for an invalid date. */\n public instant(valueArg: Date | number, optionsArg: IInstantOptions = { date: 'medium', time: 'short' }): string {\n const time = valueArg instanceof Date ? valueArg.getTime() : valueArg;\n if (!Number.isFinite(time)) throw new RangeError('an instant must be a valid date');\n return this.intlDateTimeFormat({\n ...(optionsArg.date ? { dateStyle: optionsArg.date } : {}),\n ...(optionsArg.time ? { timeStyle: optionsArg.time } : {}),\n ...(this.settings.timeZone ? { timeZone: this.settings.timeZone } : {}),\n }).format(time);\n }\n\n /** A calendar day, `2026-03-14`, as that day whatever the time zone: `14.03.2026` in de-DE. Throws `RangeError` for a day that does not exist. */\n public day(valueArg: TIsoDate, styleArg: TDateStyle = 'medium'): string {\n const match = ISO_DATE.exec(valueArg);\n const time = match ? Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3])) : Number.NaN;\n if (!match || new Date(time).toISOString().slice(0, 10) !== valueArg) throw new RangeError(`\"${valueArg}\" is no calendar day of the form 2026-03-14`);\n return this.intlDateTimeFormat({ dateStyle: styleArg, timeZone: 'UTC' }).format(time);\n }\n\n /** A calendar month, `2026-03`: `März 2026` in de-DE, `Mar 2026` with `short` in en-GB. Throws `RangeError` for a month that does not exist. */\n public month(valueArg: TIsoMonth, styleArg: 'long' | 'short' = 'long'): string {\n const match = ISO_MONTH.exec(valueArg);\n const month = match ? Number(match[2]) : 0;\n if (!match || month < 1 || month > 12) throw new RangeError(`\"${valueArg}\" is no calendar month of the form 2026-03`);\n return this.intlDateTimeFormat({ year: 'numeric', month: styleArg, timeZone: 'UTC' }).format(Date.UTC(Number(match[1]), month - 1, 1));\n }\n\n /** A list in the words locale: `a, b und c`; `or` joins with the word for or, `unit` without a conjunction. */\n public list(valuesArg: readonly string[], typeArg: TListType = 'and'): string {\n const type = typeArg === 'and' ? 'conjunction' : typeArg === 'or' ? 'disjunction' : 'unit';\n return once(this.listFormats, type, () => new Intl.ListFormat(this.settings.words, { type })).format(valuesArg);\n }\n\n /** A distance from now in the words locale: `{ value: -1, unit: 'day' }` is `gestern` in de. */\n public relative(valueArg: IRelativeTime, styleArg: TRelativeStyle = 'long'): string {\n return once(this.relativeFormats, styleArg, () => new Intl.RelativeTimeFormat(this.settings.words, { numeric: 'auto', style: styleArg })).format(\n valueArg.value,\n valueArg.unit,\n );\n }\n\n /** The name of a region, currency, language or script in the words locale: `DE` is `Deutschland` in de. */\n public displayName(codeArg: string, typeArg: 'region' | 'currency' | 'language' | 'script'): string {\n const name = once(this.displayNames, typeArg, () => new Intl.DisplayNames([this.settings.words], { type: typeArg, fallback: 'none' })).of(codeArg);\n if (name === undefined) throw new RangeError(`\"${codeArg}\" has no ${typeArg} name`);\n return name;\n }\n}\n","/**\n * Catalogs: the words of one package in its source language, and their\n * translations as data. A catalog is defined once per namespace in a\n * registry kept on `globalThis`, shared by every copy of this library that\n * speaks the same registry protocol, so a language switch loads the\n * translations of all of them before it commits.\n */\n\nimport { I18nError, type ITranslationProblem } from './i18n.errors.js';\nimport { canonicalLocale, localeChain } from './i18n.locale.js';\nimport { MessageSyntaxError, parseMessage, sameSignature, type IParsedMessage } from './i18n.parser.js';\nimport { emptyRecord } from './i18n.records.js';\nimport type { TMessageError, TMessageInput, TSameSignature } from './i18n.types.js';\n\n/** The messages of a catalog: key to text, or to text with a note for translators. */\nexport type TMessages = Readonly<Record<string, TMessageInput>>;\n\n/** A catalog entry as the catalog keeps it. */\nexport interface IMessageEntry {\n readonly message: string;\n readonly description?: string;\n}\n\n// ---------------------------------------------------------------- compile-time checks\n\n/** Why each message of a definition does not read, as one union of sentences, or `never`. */\ntype TBadMessages<M> = {\n [K in keyof M]: [TMessageError<M[K]>] extends [never] ? never : `the message \"${K & string}\" does not read: ${TMessageError<M[K]>}`;\n}[keyof M];\n\ntype TMismatchedKeys<M, T extends { readonly [K in keyof M]: string }> = {\n [K in keyof M]: TSameSignature<M[K], T[K]> extends true ? never : K;\n}[keyof M];\n\n\n/**\n * What is wrong with a complete translation `T` of messages `M`: keys it\n * lacks, keys the source has not, or keys whose parameters differ. `never`\n * when nothing is. Mapping over the source keys and indexing the translation\n * directly keeps the check linear in the number of keys.\n */\nexport type TTranslationProblems<M, T> = [Exclude<keyof M, keyof T>] extends [never]\n ? [Exclude<keyof T, keyof M>] extends [never]\n ? T extends { readonly [K in keyof M]: string }\n ? [TMismatchedKeys<M, T>] extends [never]\n ? never\n : { readonly [Key in TMismatchedKeys<M, T>]: 'takes other parameters or tags than its source' }\n : never\n : `the translation has keys its source has not: ${Exclude<keyof T, keyof M> & string}`\n : `the translation lacks the keys: ${Exclude<keyof M, keyof T> & string}`;\n\n/** What is wrong with a partial translation (an overlay or an override): keys the source has not, or keys whose parameters differ. */\nexport type TOverlayProblems<M, T> = [Exclude<keyof T, keyof M>] extends [never]\n ? [TOverlayMismatches<M, T>] extends [never]\n ? never\n : { readonly [Key in TOverlayMismatches<M, T>]: 'takes other parameters or tags than its source' }\n : `the translation has keys its source has not: ${Exclude<keyof T, keyof M> & string}`;\n\ntype TOverlayMismatches<M, T> = {\n [K in keyof T]: K extends keyof M ? (TSameSignature<M[K], T[K]> extends true ? never : K) : never;\n}[keyof T];\n\n// ---------------------------------------------------------------- translations\n\n/**\n * The locale a checked call passed. The compiler turns the locale parameter\n * into a description of the problem when a translation does not match, so at\n * runtime it is a string for every call that compiled.\n */\nexport const localeOf = (localeArg: unknown): string => {\n if (typeof localeArg !== 'string') throw new TypeError('a locale is a BCP 47 tag, such as \"de-DE\"');\n return localeArg;\n};\n\n/** A catalog's words in one language: complete (a base language) or partial (an overlay over the languages of its chain). */\nexport class Translation<M extends TMessages = TMessages> {\n constructor(\n public readonly catalog: Catalog<M>,\n public readonly locale: string,\n public readonly messages: Readonly<Record<string, string>>,\n public readonly overlay: boolean,\n ) {}\n}\n\n/** Where a translation comes from when it is needed: a module that exports it, or anything that resolves to it. */\nexport type TTranslationLoader<M extends TMessages> = () => Promise<Translation<M> | { readonly default: Translation<M> }>;\n\n// ---------------------------------------------------------------- the registry\n\n/**\n * What a copy of this library asks of a catalog another copy defined:\n * registry protocol 1. Two copies share catalogs only through these members,\n * so a change to any of them is a new protocol.\n */\nexport interface IRegisteredCatalog {\n readonly namespace: string;\n readonly source: string;\n readonly entries: Readonly<Record<string, IMessageEntry>>;\n readonly locales: readonly string[];\n hasTranslation(localeArg: string): boolean;\n localesFor(chainArg: readonly string[]): string[];\n loadTranslation(localeArg: string): Promise<{ readonly messages: Readonly<Record<string, string>> } | undefined>;\n loadedTranslation(localeArg: string): { readonly messages: Readonly<Record<string, string>> } | undefined;\n translationFromData(localeArg: string, messagesArg: Readonly<Record<string, string>>, optionsArg?: { overlay?: boolean }): { readonly locale: string; readonly messages: Readonly<Record<string, string>> };\n}\n\n/** The registry protocol this copy speaks. */\nexport const REGISTRY_PROTOCOL = 1;\n\n/** Where the registry is kept on `globalThis`: one name for every copy, whatever protocol it speaks, never changed; the registry's `protocol` field carries the version. */\nexport const REGISTRY_KEY: unique symbol = Symbol.for('@push.rocks/smarti18n/registry');\n\ninterface IRegistry {\n readonly protocol: typeof REGISTRY_PROTOCOL;\n /** by namespace, in the order they were defined */\n readonly catalogs: Map<string, IRegisteredCatalog>;\n}\n\n/** `globalThis` as the registry sees it: any object, maybe holding a registry. */\ntype TRegistryScope = object & { [REGISTRY_KEY]?: unknown };\n\nconst isRegistry = (valueArg: unknown): valueArg is IRegistry =>\n typeof valueArg === 'object' && valueArg !== null && 'protocol' in valueArg && valueArg.protocol === REGISTRY_PROTOCOL && 'catalogs' in valueArg && valueArg.catalogs instanceof Map;\n\n/**\n * The registry every copy shares: made by the first copy that needs it, and\n * refused (`incompatible_registry`) when a copy of another protocol made it,\n * rather than kept apart.\n */\nconst sharedRegistry = (): IRegistry => {\n const scope: TRegistryScope = globalThis;\n const found = scope[REGISTRY_KEY];\n if (found === undefined) {\n const made: IRegistry = { protocol: REGISTRY_PROTOCOL, catalogs: new Map() };\n Object.defineProperty(globalThis, REGISTRY_KEY, { value: made, enumerable: false, writable: false, configurable: false });\n return made;\n }\n if (isRegistry(found)) return found;\n const protocol = typeof found === 'object' && found !== null && 'protocol' in found ? String(found.protocol) : 'unknown';\n throw new I18nError(\n 'incompatible_registry',\n `another copy of @push.rocks/smarti18n keeps the catalogs under registry protocol ${protocol}, this copy speaks ${REGISTRY_PROTOCOL}: bring both to one version (pnpm dedupe)`,\n );\n};\n\n/** Every catalog defined by every copy of this library that shares the registry, in the order they were defined. */\nexport const listCatalogs = (): IRegisteredCatalog[] => [...sharedRegistry().catalogs.values()];\n\n// ---------------------------------------------------------------- catalogs\n\nexport class Catalog<M extends TMessages = TMessages> implements IRegisteredCatalog {\n /** the messages, each as text and note */\n public readonly entries: Readonly<Record<keyof M & string, IMessageEntry>>;\n private readonly loaders = new Map<string, TTranslationLoader<M>>();\n private readonly loaded = new Map<string, Translation<M>>();\n private readonly loading = new Map<string, Promise<Translation<M>>>();\n\n /** Use `defineCatalog()`. */\n constructor(\n public readonly namespace: string,\n public readonly source: string,\n messagesArg: M,\n ) {\n const entries = emptyRecord<IMessageEntry>();\n for (const [key, input] of Object.entries(messagesArg)) {\n const entry: IMessageEntry = typeof input === 'string' ? { message: input } : { message: input.message, ...(input.description === undefined ? {} : { description: input.description }) };\n try {\n parseMessage(entry.message);\n } catch (error) {\n if (error instanceof MessageSyntaxError) throw new I18nError('invalid_catalog', `the message \"${key}\" of ${namespace} does not read: ${error.why}`, { cause: error });\n throw error;\n }\n entries[key] = entry;\n }\n this.entries = entries as Record<keyof M & string, IMessageEntry>;\n }\n\n /** The source message of a key, parsed. */\n public parsedSource(keyArg: keyof M & string): IParsedMessage {\n return parseMessage(this.entries[keyArg].message);\n }\n\n /**\n * A complete translation into a base language. The compiler checks that it\n * has every key and nothing else, and that every message takes the\n * parameters and tags of its source; this call checks the same at runtime\n * and throws `I18nError` `invalid_translation` with every problem.\n */\n public translation<const L extends string, const T extends Readonly<Record<string, string>>>(\n localeArg: [TTranslationProblems<M, T>] extends [never] ? L : TTranslationProblems<M, T>,\n messagesArg: T,\n ): Translation<M>;\n public translation(localeArg: unknown, messagesArg: Readonly<Record<string, string>>): Translation<M> {\n return this.translationFromData(localeOf(localeArg), messagesArg);\n }\n\n /** A partial translation over the languages of its chain, such as `de-CH` over `de`. Checked like `translation()`, keys it leaves out excepted. */\n public overlay<const L extends string, const T extends Readonly<Record<string, string>>>(\n localeArg: [TOverlayProblems<M, T>] extends [never] ? L : TOverlayProblems<M, T>,\n messagesArg: T,\n ): Translation<M>;\n public overlay(localeArg: unknown, messagesArg: Readonly<Record<string, string>>): Translation<M> {\n return this.translationFromData(localeOf(localeArg), messagesArg, { overlay: true });\n }\n\n /**\n * A translation from data the compiler did not see, such as JSON from a\n * translation tool: checked at runtime only, and refused with every\n * problem (`I18nError` `invalid_translation`).\n */\n public translationFromData(localeArg: string, messagesArg: Readonly<Record<string, string>>, optionsArg: { overlay?: boolean } = {}): Translation<M> {\n const locale = canonicalLocale(localeArg);\n const overlay = optionsArg.overlay ?? false;\n const problems = this.problemsOf(messagesArg, overlay);\n if (problems.length) {\n throw new I18nError('invalid_translation', `the ${locale} translation of ${this.namespace} does not match its source: ${problems.map((problemArg) => `${problemArg.key}: ${problemArg.detail}`).join('; ')}`, { problems });\n }\n return new Translation(this, locale, { ...messagesArg }, overlay);\n }\n\n /** Every key of `messages` that does not match the source, in the source's order, extra keys last. */\n public problemsOf(messagesArg: Readonly<Record<string, string>>, overlayArg: boolean): ITranslationProblem[] {\n const problems: ITranslationProblem[] = [];\n for (const key of Object.keys(this.entries) as Array<keyof M & string>) {\n if (!Object.hasOwn(messagesArg, key)) {\n if (!overlayArg) problems.push({ code: 'missing', key, detail: 'the translation lacks this key' });\n continue;\n }\n const text = messagesArg[key];\n let parsed: IParsedMessage;\n try {\n if (typeof text !== 'string') throw new MessageSyntaxError('a message is text', String(text));\n parsed = parseMessage(text);\n } catch (error) {\n if (!(error instanceof MessageSyntaxError)) throw error;\n problems.push({ code: 'syntax', key, detail: error.why });\n continue;\n }\n if (!sameSignature(this.parsedSource(key), parsed)) {\n problems.push({\n code: 'signature',\n key,\n detail: `takes ${parsed.signature.join(', ') || 'nothing'} where the source takes ${this.parsedSource(key).signature.join(', ') || 'nothing'}`,\n });\n }\n }\n for (const key of Object.keys(messagesArg)) {\n if (!Object.hasOwn(this.entries, key)) problems.push({ code: 'extra', key, detail: 'the source has no such key' });\n }\n return problems;\n }\n\n /** Makes a translation known: one already made, or a loader that makes it when a language needs it. One per language. */\n public addTranslation(translationArg: Translation<M>): this;\n public addTranslation(localeArg: string, loaderArg: TTranslationLoader<M>): this;\n public addTranslation(translationOrLocaleArg: Translation<M> | string, loaderArg?: TTranslationLoader<M>): this {\n const locale = typeof translationOrLocaleArg === 'string' ? canonicalLocale(translationOrLocaleArg) : translationOrLocaleArg.locale;\n if (this.loaders.has(locale)) throw new I18nError('duplicate_translation', `${this.namespace} has a ${locale} translation already`);\n if (typeof translationOrLocaleArg === 'string') {\n if (!loaderArg) throw new TypeError('addTranslation(locale, loader) needs a loader');\n this.loaders.set(locale, loaderArg);\n } else {\n this.assertOwn(translationOrLocaleArg, locale);\n this.loaders.set(locale, () => Promise.resolve(translationOrLocaleArg));\n this.loaded.set(locale, translationOrLocaleArg);\n }\n return this;\n }\n\n private assertOwn(translationArg: Translation<M>, localeArg: string): void {\n if (!(translationArg instanceof Translation) || translationArg.catalog !== this) {\n throw new I18nError('invalid_translation', `the ${localeArg} translation given to ${this.namespace} is not one of its own`);\n }\n if (translationArg.locale !== localeArg) {\n throw new I18nError('invalid_translation', `the translation registered for ${localeArg} of ${this.namespace} is a ${translationArg.locale} translation`);\n }\n }\n\n /** The languages this catalog has translations for, as registered. */\n public get locales(): string[] {\n return [...this.loaders.keys()];\n }\n\n /** Whether a translation into exactly this locale is registered. */\n public hasTranslation(localeArg: string): boolean {\n return this.loaders.has(localeArg);\n }\n\n /** The translation into exactly this locale, if it is registered and loaded. */\n public loadedTranslation(localeArg: string): Translation<M> | undefined {\n return this.loaded.get(localeArg);\n }\n\n /**\n * Loads the translation into exactly this locale, once: `undefined` when\n * none is registered. Throws `I18nError` `load_failed` when the loader\n * fails; a later call tries again.\n */\n public async loadTranslation(localeArg: string): Promise<Translation<M> | undefined> {\n const done = this.loaded.get(localeArg);\n if (done) return done;\n const loader = this.loaders.get(localeArg);\n if (!loader) return undefined;\n let pending = this.loading.get(localeArg);\n if (!pending) {\n pending = (async () => {\n let result: Awaited<ReturnType<TTranslationLoader<M>>>;\n try {\n result = await loader();\n } catch (error) {\n throw new I18nError('load_failed', `the ${localeArg} translation of ${this.namespace} could not be loaded`, { cause: error });\n }\n const translation = result instanceof Translation ? result : result.default;\n this.assertOwn(translation, localeArg);\n this.loaded.set(localeArg, translation);\n return translation;\n })();\n this.loading.set(localeArg, pending);\n pending.then(\n () => this.loading.delete(localeArg),\n () => this.loading.delete(localeArg),\n );\n }\n return pending;\n }\n\n /** The registered locales a locale's chain passes through, most specific first. */\n public localesFor(chainArg: readonly string[]): string[] {\n return chainArg.filter((localeArg) => this.loaders.has(localeArg));\n }\n\n /** Whether an overlay locale has a base translation somewhere along its chain. */\n public hasBaseFor(localeArg: string): boolean {\n return localeChain(localeArg)\n .slice(1)\n .some((candidateArg) => this.loaders.has(candidateArg) || candidateArg === this.source);\n }\n}\n\n/**\n * Defines the catalog of a package: its namespace (the package name, once\n * across every copy of this library that shares the registry), its source\n * language and its messages. The compiler reads every message: one that\n * does not read is an error at the namespace, with the key and the reason.\n */\nexport const defineCatalog = <const N extends string, const M extends TMessages>(definitionArg: {\n namespace: [TBadMessages<M>] extends [never] ? N : TBadMessages<M>;\n source: string;\n messages: M;\n}): Catalog<M> => {\n const namespace: string = definitionArg.namespace;\n if (!namespace) throw new I18nError('invalid_catalog', 'a catalog needs a namespace, such as its package name');\n const { catalogs } = sharedRegistry();\n if (catalogs.has(namespace)) throw new I18nError('duplicate_namespace', `a catalog of the namespace ${namespace} is defined already`);\n const catalog = new Catalog<M>(namespace, canonicalLocale(definitionArg.source), definitionArg.messages);\n catalogs.set(namespace, catalog);\n return catalog;\n};\n","/**\n * Turns a parsed message and its arguments into text, or into parts around\n * the caller's tag results. Plurals are chosen by the rules of the language\n * the message is written in; numbers, money and dates are written by the\n * formats of the reader.\n */\n\nimport { I18nError } from './i18n.errors.js';\nimport type { Formats } from './i18n.format.js';\nimport type { ISimpleArgumentNode, TMessageNode } from './i18n.parser.js';\nimport type { IMoney, IRelativeTime, TIsoDate, TIsoMonth } from './i18n.values.js';\n\n/** What a message is written with. */\nexport interface IRenderContext {\n /** the language the message is written in: it chooses plural branches */\n messageLocale: string;\n /** writes numbers, money and dates in the reader's formats, lists and relative times in the message's language */\n formats: Formats;\n /** where the message comes from, for errors */\n where: string;\n}\n\n/** A tag's content handed to the caller, and what the caller makes of it. */\nexport type TTagFunction<T> = (chunksArg: Array<string | T>) => T;\n\nconst pluralRulesCache = new Map<string, Intl.PluralRules>();\nconst pluralRules = (localeArg: string, ordinalArg: boolean): Intl.PluralRules => {\n const key = `${localeArg} ${ordinalArg}`;\n let rules = pluralRulesCache.get(key);\n if (!rules) {\n rules = new Intl.PluralRules(localeArg, { type: ordinalArg ? 'ordinal' : 'cardinal' });\n pluralRulesCache.set(key, rules);\n }\n return rules;\n};\n\nfunction refuse(contextArg: IRenderContext, nameArg: string, expectedArg: string): never {\n throw new I18nError('invalid_argument', `the argument ${nameArg} of ${contextArg.where} is ${expectedArg}`);\n}\n\nconst argumentOf = (paramsArg: Readonly<Record<string, unknown>>, nameArg: string, contextArg: IRenderContext): unknown => {\n const value = Object.hasOwn(paramsArg, nameArg) ? paramsArg[nameArg] : undefined;\n if (value === undefined) throw new I18nError('missing_argument', `${contextArg.where} needs the argument ${nameArg}`);\n return value;\n};\n\nconst isMoney = (valueArg: unknown): valueArg is IMoney =>\n typeof valueArg === 'object' &&\n valueArg !== null &&\n 'minor' in valueArg &&\n 'currency' in valueArg &&\n (typeof valueArg.minor === 'number' || typeof valueArg.minor === 'bigint') &&\n typeof valueArg.currency === 'string';\n\nconst isRelative = (valueArg: unknown): valueArg is IRelativeTime =>\n typeof valueArg === 'object' && valueArg !== null && 'value' in valueArg && 'unit' in valueArg && typeof valueArg.value === 'number' && typeof valueArg.unit === 'string';\n\nconst renderSimple = (nodeArg: ISimpleArgumentNode, valueArg: unknown, contextArg: IRenderContext): string => {\n const { formats } = contextArg;\n switch (nodeArg.argumentType) {\n case 'number':\n if (typeof valueArg !== 'number' && typeof valueArg !== 'bigint') return refuse(contextArg, nodeArg.name, 'a number');\n return formats.number(valueArg, nodeArg.style === 'integer' || nodeArg.style === 'percent' ? nodeArg.style : 'decimal');\n case 'money':\n if (!isMoney(valueArg)) return refuse(contextArg, nodeArg.name, 'an amount of money, { minor, currency }');\n return formats.money(valueArg, nodeArg.style === 'code' ? { display: 'code' } : nodeArg.style === 'accounting' ? { sign: 'accounting' } : nodeArg.style === 'signed' ? { sign: 'exceptZero' } : {});\n case 'date':\n case 'time': {\n if (!(valueArg instanceof Date) && typeof valueArg !== 'number') return refuse(contextArg, nodeArg.name, 'an instant, a Date or epoch milliseconds');\n const style = (nodeArg.style ?? (nodeArg.argumentType === 'date' ? 'medium' : 'short')) as 'short' | 'medium' | 'long' | 'full';\n return formats.instant(valueArg, nodeArg.argumentType === 'date' ? { date: style } : { time: style });\n }\n case 'day':\n if (typeof valueArg !== 'string') return refuse(contextArg, nodeArg.name, 'a calendar day such as 2026-03-14');\n return formats.day(valueArg as TIsoDate, (nodeArg.style ?? 'medium') as 'short' | 'medium' | 'long' | 'full');\n case 'month':\n if (typeof valueArg !== 'string') return refuse(contextArg, nodeArg.name, 'a calendar month such as 2026-03');\n return formats.month(valueArg as TIsoMonth, nodeArg.style === 'short' ? 'short' : 'long');\n case 'list':\n if (!Array.isArray(valueArg) || !valueArg.every((itemArg) => typeof itemArg === 'string')) return refuse(contextArg, nodeArg.name, 'a list of strings');\n return formats.list(valueArg, (nodeArg.style ?? 'and') as 'and' | 'or' | 'unit');\n case 'relative':\n if (!isRelative(valueArg)) return refuse(contextArg, nodeArg.name, 'a relative time, { value, unit }');\n return formats.relative(valueArg, (nodeArg.style ?? 'long') as 'long' | 'short' | 'narrow');\n }\n};\n\n/**\n * Writes `nodes` into `out`. `pound` is the number `#` stands for, the value\n * of the nearest plural around it.\n */\nexport const renderNodes = <T>(\n nodesArg: readonly TMessageNode[],\n paramsArg: Readonly<Record<string, unknown>>,\n contextArg: IRenderContext,\n outArg: Array<string | T>,\n poundArg?: number,\n): void => {\n const push = (partArg: string | T) => {\n if (typeof partArg === 'string') {\n if (!partArg) return;\n const last = outArg.length - 1;\n if (last >= 0 && typeof outArg[last] === 'string') {\n outArg[last] = `${String(outArg[last])}${partArg}`;\n return;\n }\n }\n outArg.push(partArg);\n };\n for (const node of nodesArg) {\n switch (node.type) {\n case 'text':\n push(node.value);\n break;\n case 'pound':\n push(poundArg === undefined ? '#' : contextArg.formats.number(poundArg));\n break;\n case 'string': {\n const value = argumentOf(paramsArg, node.name, contextArg);\n if (typeof value !== 'string') refuse(contextArg, node.name, 'a string');\n push(value);\n break;\n }\n case 'simple':\n push(renderSimple(node, argumentOf(paramsArg, node.name, contextArg), contextArg));\n break;\n case 'plural': {\n const value = argumentOf(paramsArg, node.name, contextArg);\n if (typeof value !== 'number' || Number.isNaN(value)) refuse(contextArg, node.name, 'a number');\n const count = value;\n const exact = Number.isInteger(count) ? node.branches[`=${count}`] : undefined;\n const branch = exact ?? node.branches[pluralRules(contextArg.messageLocale, node.ordinal).select(count)] ?? node.branches.other;\n renderNodes(branch, paramsArg, contextArg, outArg, count);\n break;\n }\n case 'select': {\n const value = argumentOf(paramsArg, node.name, contextArg);\n if (typeof value !== 'string') refuse(contextArg, node.name, 'a string');\n const branch = (value !== 'other' && Object.hasOwn(node.branches, value) ? node.branches[value] : undefined) ?? node.branches.other;\n renderNodes(branch, paramsArg, contextArg, outArg, poundArg);\n break;\n }\n case 'tag': {\n const tag = argumentOf(paramsArg, node.name, contextArg);\n if (typeof tag !== 'function') refuse(contextArg, node.name, 'a function for the tag');\n const chunks: Array<string | T> = [];\n renderNodes(node.children, paramsArg, contextArg, chunks, poundArg);\n // the caller's parameters are typed per tag as a TTagFunction<T> (`TRichParams`)\n push((tag as TTagFunction<T>)(chunks));\n break;\n }\n }\n }\n};\n","/**\n * The pseudo-locales, made from a catalog's source messages and never\n * stored: `en-XA` accents every letter, lengthens each message by 40 % and\n * brackets it, so clipped, concatenated and untranslated text shows at a\n * glance; `ar-XB` turns every run of words right to left. What a caller\n * passes (names, numbers, amounts) is left as it is.\n */\n\nimport type { TMessageNode } from './i18n.parser.js';\nimport { emptyRecord } from './i18n.records.js';\nimport type { TPseudoLocale } from './i18n.locale.js';\n\nconst ACCENTED: Readonly<Record<string, string>> = Object.fromEntries(\n [...'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'].map((letterArg, indexArg) => [\n letterArg,\n [...'áƀçðéƒĝĥîĵķļɱñöþǫŕšţûṽŵẋýžÅƁÇÐÉƑĜĤÎĴĶĻṀÑÖÞǪŔŠŢÛṼŴẊÝŽ'][indexArg],\n ]),\n);\n\n/** The share by which `en-XA` lengthens a message, a common allowance for German and French. */\nexport const PSEUDO_EXPANSION = 0.4;\nexport const PSEUDO_OPEN = '⟦';\nexport const PSEUDO_CLOSE = '⟧';\nexport const PSEUDO_PAD = '·';\nconst RLO = '';\nconst PDF = '';\n\nconst accent = (textArg: string): string => [...textArg].map((charArg) => ACCENTED[charArg] ?? charArg).join('');\n\nconst transform = (nodesArg: readonly TMessageNode[], localeArg: TPseudoLocale): TMessageNode[] =>\n nodesArg.map((nodeArg): TMessageNode => {\n switch (nodeArg.type) {\n case 'text':\n return { type: 'text', value: localeArg === 'en-XA' ? accent(nodeArg.value) : `${RLO}${nodeArg.value}${PDF}` };\n case 'plural':\n case 'select':\n return {\n ...nodeArg,\n branches: Object.assign(emptyRecord<TMessageNode[]>(), Object.fromEntries(Object.entries(nodeArg.branches).map(([keyArg, branchArg]) => [keyArg, transform(branchArg, localeArg)]))),\n };\n case 'tag':\n return { ...nodeArg, children: transform(nodeArg.children, localeArg) };\n default:\n return nodeArg;\n }\n });\n\n/** The number of characters of text a message holds, its longest branch counted for a plural or select. */\nconst textLength = (nodesArg: readonly TMessageNode[]): number =>\n nodesArg.reduce((sumArg, nodeArg) => {\n switch (nodeArg.type) {\n case 'text':\n return sumArg + nodeArg.value.length;\n case 'plural':\n case 'select':\n return sumArg + Math.max(0, ...Object.values(nodeArg.branches).map(textLength));\n case 'tag':\n return sumArg + textLength(nodeArg.children);\n default:\n return sumArg;\n }\n }, 0);\n\nconst cache = new WeakMap<readonly TMessageNode[], Partial<Record<TPseudoLocale, TMessageNode[]>>>();\n\n/** A message's nodes in a pseudo-locale, made once per message. */\nexport const pseudoNodes = (nodesArg: readonly TMessageNode[], localeArg: TPseudoLocale): TMessageNode[] => {\n let byLocale = cache.get(nodesArg);\n if (!byLocale) cache.set(nodesArg, (byLocale = {}));\n let nodes = byLocale[localeArg];\n if (!nodes) {\n nodes = transform(nodesArg, localeArg);\n if (localeArg === 'en-XA') {\n const padding = PSEUDO_PAD.repeat(Math.ceil(textLength(nodesArg) * PSEUDO_EXPANSION));\n nodes = [{ type: 'text', value: PSEUDO_OPEN }, ...nodes, { type: 'text', value: `${padding}${PSEUDO_CLOSE}` }];\n }\n byLocale[localeArg] = nodes;\n }\n return nodes;\n};\n","/**\n * `I18n`: one audience's language, formats and time zone — a page, a\n * document preview, an e-mail. It writes the words of every catalog, is\n * observable, and switches language atomically: the translations of every\n * catalog are loaded first, then everything changes at once.\n */\n\nimport { listCatalogs, localeOf, type Catalog, type TMessages, type TOverlayProblems } from './i18n.catalog.js';\nimport { I18nError } from './i18n.errors.js';\nimport { Formats, type IFormatSettings } from './i18n.format.js';\nimport { canonicalLocale, isPseudoLocale, localeChain, textDirection, type TPseudoLocale } from './i18n.locale.js';\nimport { parseMessage, type TMessageNode } from './i18n.parser.js';\nimport { pseudoNodes } from './i18n.pseudo.js';\nimport { renderNodes, type TTagFunction } from './i18n.render.js';\nimport type { TMessageParams, TMessageTags } from './i18n.types.js';\n\n/** The locales numbers and dates are written in, when they differ from the language. */\nexport interface IFormatLocales {\n number?: string;\n date?: string;\n}\n\nexport interface II18nOptions {\n /** the language to start in, a BCP 47 tag such as `de-DE` */\n locale: string;\n /** the languages the host offers; by default every language a defined catalog is written or translated in */\n locales?: readonly string[];\n /** number and date locales set apart from the language, such as German numbers in an English UI */\n formats?: IFormatLocales;\n /** the IANA time zone instants are written in; the runtime's when absent */\n timeZone?: string;\n /** whether the pseudo-locales `en-XA` and `ar-XB` are offered */\n pseudo?: boolean;\n /**\n * told when a key is found in no translation along the chain although the\n * catalog is translated there, so its source, in another language, stands\n * in; a chain that reaches the catalog's source language misses nothing\n */\n onMissing?: (eventArg: IMissingEvent) => void;\n /**\n * makes every `Formats` the instance writes in, from the locales and time\n * zone it decided: `format`, and numbers, money and dates inside messages,\n * the `#` of a plural included. A host or library passes a subclass here,\n * for example one that writes numbers without grouping; a plain `Formats`\n * when absent.\n */\n createFormats?: (settingsArg: Readonly<IFormatSettings>) => Formats;\n}\n\n/** The options of `createSourceI18n()`: formats and time zone; a source instance speaks no other language. */\nexport type ISourceI18nOptions = Pick<II18nOptions, 'formats' | 'timeZone' | 'createFormats'>;\n\nexport interface IMissingEvent {\n namespace: string;\n key: string;\n locale: string;\n}\n\n/** A single key when the key is known; the whole union while the caller is still typing it. */\ntype TIsSingle<T, U = T> = [T] extends [never] ? false : T extends unknown ? ([U] extends [T] ? true : false) : never;\n\n/**\n * The arguments after the key: none for a message without parameters, else\n * its parameters. A message with tags is written with `rich()`, so `t()`\n * refuses it here, per key, rather than by filtering every key of the\n * catalog.\n */\nexport type TMessageArgs<M, K extends keyof M> =\n TIsSingle<K> extends true\n ? keyof TMessageParams<M[K]> extends never\n ? []\n : [params: TMessageParams<M[K]>]\n : unknown[];\n\n/** The key of `t()`: a message with tags is written with `rich()`, and saying so at the key names the reason. */\nexport type TPlainKey<M, K extends keyof M> = [TMessageTags<M[K]>] extends [never] ? K : `the message \"${K & string}\" has tags: write it with rich()`;\n\n/** The shape of the parameters of a rich message: its parameters and a function per tag. */\nexport type TRichShape<M, K extends keyof M> = TMessageParams<M[K]> & { [Tag in TMessageTags<M[K]>]: (chunksArg: never) => unknown };\n\n/** What the tag functions of `P` make: the parts a rich message is written in besides strings. */\nexport type TTagResult<M, K extends keyof M, P> = {\n [Tag in TMessageTags<M[K]>]: Tag extends keyof P ? (P[Tag] extends (chunksArg: never) => infer R ? R : never) : never;\n}[TMessageTags<M[K]>];\n\n/**\n * The parameters of a rich message as the caller wrote them, each tag\n * function checked to take what it is given: the strings and tag results of\n * its content.\n */\nexport type TRichParams<M, K extends keyof M, P> = P & {\n [Tag in TMessageTags<M[K]>]: Tag extends keyof P\n ? P[Tag] extends TTagFunction<TTagResult<M, K, P>>\n ? P[Tag]\n : TTagFunction<TTagResult<M, K, P>>\n : never;\n};\n\n/** A catalog's words bound to an instance: `t('key', params)`, `t.rich('key', params)`. */\nexport interface ITranslator<M extends TMessages> {\n <K extends keyof M & string>(keyArg: TPlainKey<M, K>, ...argsArg: TMessageArgs<M, K>): string;\n rich<K extends keyof M & string, const P extends TRichShape<M, K>>(keyArg: K, paramsArg: TRichParams<M, K, P>): Array<string | TTagResult<M, K, P>>;\n readonly i18n: I18n;\n readonly catalog: Catalog<M>;\n /**\n * Numbers, money and dates in the formats the catalog's messages write\n * them in now: the instance's `format`, and for a source instance the\n * formats of the catalog's source language. It follows every switch.\n */\n readonly format: Formats;\n}\n\ninterface IState {\n locale: string;\n chain: readonly string[];\n pseudo?: TPseudoLocale;\n formats: IFormatLocales;\n}\n\nexport class I18n {\n /**\n * Resolves once a language is loaded and committed: the first switch that\n * commits, whether the one of `options.locale` or a later one that\n * overtook it. Rejects with the error of the latest switch when that one\n * failed before any switch committed. Words asked for before throw\n * `not_ready`. It settles once and does not recover: after a refusal, a\n * later `setLocale()` that commits makes the instance usable, and\n * `whenLoaded()` waits for that commit, not for `ready`.\n */\n public readonly ready: Promise<void>;\n\n private state: IState | undefined;\n private readonly sourceOnly: boolean;\n private switchCount = 0;\n /** counts `setFormats()` calls, so a switch keeps formats set while it loaded */\n private formatsCount = 0;\n private settleReady: { resolve: () => void; reject: (errorArg: unknown) => void } | undefined;\n private readonly listeners = new Set<() => void>();\n private readonly overrides = new Map<Catalog, Map<string, Readonly<Record<string, string>>>>();\n private readonly offered: ReadonlySet<string> | undefined;\n private formatsCache = new Map<string, Formats>();\n private readonly options: Readonly<II18nOptions>;\n\n /** Use `createI18n()`, or `sourceI18n` for the source languages. */\n constructor(optionsArg: II18nOptions, sourceOnlyArg = false) {\n this.options = optionsArg;\n this.sourceOnly = sourceOnlyArg;\n this.offered = optionsArg.locales ? new Set(optionsArg.locales.map(canonicalLocale)) : undefined;\n if (sourceOnlyArg) {\n this.state = { locale: 'und', chain: [], formats: optionsArg.formats ? this.checkedFormats(optionsArg.formats) : {} };\n this.ready = Promise.resolve();\n } else {\n this.ready = new Promise<void>((resolveArg, rejectArg) => {\n this.settleReady = { resolve: resolveArg, reject: rejectArg };\n });\n // a caller that caught the failed switch itself need not also await `ready`; awaiting callers still see the refusal\n this.ready.catch(() => undefined);\n // the outcome of the first switch is reported through `ready`\n this.setLocale(optionsArg.locale, optionsArg.formats ? { formats: optionsArg.formats } : {}).then(\n () => undefined,\n () => undefined,\n );\n }\n }\n\n private get current(): IState {\n if (!this.state) throw new I18nError('not_ready', 'the first language of this I18n is still loading: await i18n.ready');\n return this.state;\n }\n\n /** The language, canonical: `de-DE`. `und` for `sourceI18n`. */\n public get locale(): string {\n return this.current.locale;\n }\n\n /** Where words are looked up, most specific first; each catalog's source follows. */\n public get chain(): readonly string[] {\n return this.current.chain;\n }\n\n /** Whether the language is written left to right or right to left. */\n public get direction(): 'ltr' | 'rtl' {\n const { locale } = this.current;\n return locale === 'und' ? 'ltr' : textDirection(locale);\n }\n\n /** The locales numbers and dates are written in now. */\n public get formats(): { number: string; date: string } {\n const { formats, locale } = this.current;\n return { number: formats.number ?? this.formatBase(locale), date: formats.date ?? this.formatBase(locale) };\n }\n\n /** The locale formats default to: the language, the source's for a pseudo-locale. */\n private formatBase(localeArg: string): string {\n return isPseudoLocale(localeArg) ? 'en' : localeArg;\n }\n\n /** The languages offered: the host's list, else every language a catalog is written or translated in. */\n public get available(): string[] {\n if (this.offered) return [...this.offered];\n const languages = new Set<string>();\n for (const catalog of listCatalogs()) {\n languages.add(catalog.source);\n for (const locale of catalog.locales) languages.add(locale);\n }\n return [...languages];\n }\n\n /**\n * Switches the language. Every catalog's translations along the new chain\n * are loaded first; then language, chain and formats change together and\n * subscribers are told once. The formats are the ones passed here, unless\n * `setFormats()` was called while the switch loaded; without any, the\n * formats in place when it commits. Resolves `true` when it committed,\n * `false` when a later switch overtook it. Rejects (`invalid_locale`,\n * `unavailable_locale`, `load_failed`) and changes nothing otherwise.\n */\n public async setLocale(localeArg: string, optionsArg: { formats?: IFormatLocales } = {}): Promise<boolean> {\n if (this.sourceOnly) throw new I18nError('unavailable_locale', 'sourceI18n speaks the source languages only');\n const turn = ++this.switchCount;\n try {\n const committed = await this.switchTo(turn, localeArg, optionsArg.formats);\n if (committed) this.settleReady?.resolve();\n return committed;\n } catch (error) {\n // the latest switch failed before any committed: no language will be loaded unless asked again\n if (!this.state && turn === this.switchCount) this.settleReady?.reject(error);\n throw error;\n }\n }\n\n private async switchTo(turnArg: number, localeArg: string, formatsArg: IFormatLocales | undefined): Promise<boolean> {\n const formatsAt = this.formatsCount;\n const locale = canonicalLocale(localeArg);\n const passedFormats = formatsArg ? this.checkedFormats(formatsArg) : undefined;\n let chain: string[];\n let pseudo: TPseudoLocale | undefined;\n if (isPseudoLocale(locale)) {\n if (!this.options.pseudo) throw new I18nError('unavailable_locale', `${locale} is a pseudo-locale, offered with the option pseudo: true`);\n chain = [];\n pseudo = locale;\n } else {\n chain = localeChain(locale);\n const available = new Set(this.available);\n if (!chain.some((candidateArg) => available.has(candidateArg))) {\n throw new I18nError('unavailable_locale', `${locale} is none of the languages offered: ${[...available].join(', ')}`);\n }\n await Promise.all(listCatalogs().flatMap((catalogArg) => catalogArg.localesFor(chain).map((candidateArg) => catalogArg.loadTranslation(candidateArg))));\n }\n if (turnArg !== this.switchCount) return false;\n const formats = passedFormats && formatsAt === this.formatsCount ? passedFormats : (this.state?.formats ?? {});\n this.state = { locale, chain, formats, ...(pseudo ? { pseudo } : {}) };\n this.formatsCache = new Map();\n this.notify();\n return true;\n }\n\n /** Sets the number and date locales apart from the language, or back to it with `{}`. Tells subscribers. */\n public setFormats(formatsArg: IFormatLocales): void {\n const state = this.current;\n this.state = { ...state, formats: this.checkedFormats(formatsArg) };\n this.formatsCount++;\n this.formatsCache = new Map();\n this.notify();\n }\n\n private checkedFormats(formatsArg: IFormatLocales): IFormatLocales {\n return {\n ...(formatsArg.number === undefined ? {} : { number: canonicalLocale(formatsArg.number) }),\n ...(formatsArg.date === undefined ? {} : { date: canonicalLocale(formatsArg.date) }),\n };\n }\n\n /** Called after every change of language, formats or overrides. Returns the unsubscribe. */\n public subscribe(listenerArg: () => void): () => void {\n this.listeners.add(listenerArg);\n return () => {\n this.listeners.delete(listenerArg);\n };\n }\n\n private notify(): void {\n for (const listener of [...this.listeners]) listener();\n }\n\n /** Resolves once a catalog's translations along the current chain are loaded; loads them when needed. */\n public async whenLoaded(catalogArg: Catalog<TMessages>): Promise<void> {\n // before the first commit, the first language decides; after it, `ready` no longer does\n if (!this.state) await this.ready;\n const { chain } = this.current;\n await Promise.all(catalogArg.localesFor(chain).map((localeArg) => catalogArg.loadTranslation(localeArg)));\n }\n\n /**\n * Whether a catalog's words can be asked for now, synchronously: a\n * language has committed and the catalog's translations along its chain\n * are loaded. `false` before the first commit and for a catalog whose\n * translations are still to load; `whenLoaded()` waits for both.\n */\n public isLoaded(catalogArg: Catalog<TMessages>): boolean {\n if (!this.state) return false;\n return catalogArg.localesFor(this.state.chain).every((localeArg) => catalogArg.loadedTranslation(localeArg) !== undefined);\n }\n\n /**\n * Replaces words of a catalog in one language, over its translations: how\n * a host says a component's words its own way. Checked like an overlay.\n * Tells subscribers.\n */\n public override<M extends TMessages, const T extends Readonly<Record<string, string>>>(\n catalogArg: Catalog<M>,\n localeArg: [TOverlayProblems<M, T>] extends [never] ? string : TOverlayProblems<M, T>,\n messagesArg: T,\n ): void;\n public override<M extends TMessages>(catalogArg: Catalog<M>, localeArg: unknown, messagesArg: Readonly<Record<string, string>>): void {\n const translation = catalogArg.translationFromData(localeOf(localeArg), messagesArg, { overlay: true });\n let byLocale = this.overrides.get(catalogArg);\n if (!byLocale) this.overrides.set(catalogArg, (byLocale = new Map()));\n byLocale.set(translation.locale, { ...byLocale.get(translation.locale), ...translation.messages });\n this.notify();\n }\n\n /**\n * The text of a key for the current language, and the language it is\n * written in. The chain is walked down to the catalog's source language,\n * which is the base of everything after it; only a chain that never reaches\n * it, through translations that all lack the key, is a missing word.\n */\n private lookup<M extends TMessages>(catalogArg: Catalog<M>, keyArg: keyof M & string): { nodes: readonly TMessageNode[]; locale: string } {\n const state = this.current;\n const overrides = this.overrides.get(catalogArg);\n const sourceText = catalogArg.entries[keyArg].message;\n if (state.pseudo) return { nodes: pseudoNodes(parseMessage(sourceText).nodes, state.pseudo), locale: catalogArg.source };\n let translated = false;\n let reachedSource = false;\n for (const locale of state.chain) {\n if (locale === catalogArg.source) {\n reachedSource = true;\n break;\n }\n const override = ownText(overrides?.get(locale), keyArg);\n if (override !== undefined) return { nodes: parseMessage(override).nodes, locale };\n if (!catalogArg.hasTranslation(locale)) continue;\n const translation = catalogArg.loadedTranslation(locale);\n if (!translation) {\n throw new I18nError('not_loaded', `the ${locale} words of ${catalogArg.namespace} are not loaded yet: await i18n.whenLoaded(catalog)`);\n }\n translated = true;\n const text = ownText(translation.messages, keyArg);\n if (text !== undefined) return { nodes: parseMessage(text).nodes, locale };\n }\n if (translated && !reachedSource && !this.sourceOnly) this.options.onMissing?.({ namespace: catalogArg.namespace, key: keyArg, locale: state.locale });\n const override = ownText(overrides?.get(catalogArg.source), keyArg);\n return { nodes: parseMessage(override ?? sourceText).nodes, locale: catalogArg.source };\n }\n\n private formatsFor(wordsLocaleArg: string): Formats {\n let formats = this.formatsCache.get(wordsLocaleArg);\n if (!formats) {\n const { formats: set, locale } = this.current;\n const base = this.sourceOnly ? wordsLocaleArg : this.formatBase(locale);\n const settings: IFormatSettings = {\n number: set.number ?? base,\n date: set.date ?? base,\n words: wordsLocaleArg,\n ...(this.options.timeZone ? { timeZone: this.options.timeZone } : {}),\n };\n formats = this.options.createFormats ? this.options.createFormats(settings) : new Formats(settings);\n this.formatsCache.set(wordsLocaleArg, formats);\n }\n return formats;\n }\n\n private render<M extends TMessages, T>(catalogArg: Catalog<M>, keyArg: keyof M & string, paramsArg: Readonly<Record<string, unknown>>): Array<string | T> {\n const { nodes, locale } = this.lookup(catalogArg, keyArg);\n const out: Array<string | T> = [];\n renderNodes<T>(nodes, paramsArg, { messageLocale: locale, formats: this.formatsFor(locale), where: `${catalogArg.namespace} ${keyArg}` }, out);\n return out;\n }\n\n /** A message of a catalog in the current language. */\n public t<M extends TMessages, K extends keyof M & string>(catalogArg: Catalog<M>, keyArg: TPlainKey<M, K>, ...argsArg: TMessageArgs<M, K>): string {\n const parts = this.render<M, never>(catalogArg, keyArg, (argsArg[0] ?? {}) as Readonly<Record<string, unknown>>);\n return parts.join('');\n }\n\n /** A message with tags: text parts around what each tag function made of its content. */\n public rich<M extends TMessages, K extends keyof M & string, const P extends TRichShape<M, K>>(\n catalogArg: Catalog<M>,\n keyArg: K,\n paramsArg: TRichParams<M, K, P>,\n ): Array<string | TTagResult<M, K, P>> {\n return this.render<M, TTagResult<M, K, P>>(catalogArg, keyArg, paramsArg);\n }\n\n /** A catalog's words bound to this instance. */\n public bind<M extends TMessages>(catalogArg: Catalog<M>): ITranslator<M> {\n const translate = <K extends keyof M & string>(keyArg: TPlainKey<M, K>, ...argsArg: TMessageArgs<M, K>): string => this.t<M, K>(catalogArg, keyArg, ...argsArg);\n const translator = Object.assign(translate, {\n rich: <K extends keyof M & string, const P extends TRichShape<M, K>>(keyArg: K, paramsArg: TRichParams<M, K, P>): Array<string | TTagResult<M, K, P>> =>\n this.rich(catalogArg, keyArg, paramsArg),\n i18n: this,\n catalog: catalogArg,\n });\n // a getter, so that the formats follow every switch\n return Object.defineProperty(translator, 'format', { get: () => this.formatOf(catalogArg), enumerable: true }) as typeof translator & { readonly format: Formats };\n }\n\n /** The formats a catalog's messages write numbers, money and dates in now; see `ITranslator.format`. */\n private formatOf(catalogArg: Catalog<TMessages>): Formats {\n return this.sourceOnly ? this.formatsFor(catalogArg.source) : this.format;\n }\n\n /** Numbers, money, dates, lists and relative times in the current formats; lists and relative times in the language (English for a source instance). Made by `options.createFormats` when given. */\n public get format(): Formats {\n const { locale } = this.current;\n return this.formatsFor(this.sourceOnly ? 'en' : this.formatBase(locale));\n }\n}\n\n/** The text of a key a record holds itself: a key such as `constructor` is not inherited. */\nconst ownText = (recordArg: Readonly<Record<string, string>> | undefined, keyArg: string): string | undefined =>\n recordArg !== undefined && Object.hasOwn(recordArg, keyArg) ? recordArg[keyArg] : undefined;\n\n/** An `I18n` that starts in `options.locale`; `await i18n.ready` before asking it for words. */\nexport const createI18n = (optionsArg: II18nOptions): I18n => new I18n(optionsArg);\n\n/**\n * An instance that speaks every catalog in its source language and is ready\n * at once, in the formats and time zone it is given: a library's words while\n * no host provided a language. Without `formats`, numbers and dates follow\n * each message's source language. It offers no other language.\n */\nexport const createSourceI18n = (optionsArg: ISourceI18nOptions = {}): I18n => new I18n({ locale: 'und', ...optionsArg }, true);\n\n/**\n * Every catalog in its source language, ready at once: for logs and for\n * errors developers read. Its numbers and dates follow each message's source\n * language.\n */\nexport const sourceI18n: I18n = createSourceI18n();\n","/**\n * `LocalizedError`: an error whose message is a catalog word for the reader,\n * kept as its key and parameters with the words it came from, so it is said\n * in the language of the moment it is read rather than of the moment it was\n * thrown.\n */\n\nimport type { TMessages } from './i18n.catalog.js';\nimport { sourceI18n, type ITranslator, type TMessageArgs, type TPlainKey } from './i18n.classes.i18n.js';\n\n/**\n * An `Error` whose `message` is a catalog word in the current language of\n * the translator it was made with. A view that shows the error and renders\n * again on a language switch shows it in the new language; everything that\n * reads `message` as a string keeps working. Until the translator can say\n * its catalog's words (before its first language commits, or while a late\n * catalog's translation is still to load), it is the word in the catalog's\n * source language, so reading the error does not fail.\n *\n * ```ts\n * throw new LocalizedError(t, 'yearClosed', { year: '2025' });\n * ```\n */\nexport class LocalizedError<M extends TMessages = TMessages, K extends keyof M & string = keyof M & string> extends Error {\n public override readonly name = 'LocalizedError';\n /** The word's key in the catalog. */\n public readonly key: K;\n /** The word's parameters, as `t()` takes them. */\n public readonly args: TMessageArgs<M, K>;\n readonly #words: ITranslator<M>;\n\n constructor(wordsArg: ITranslator<M>, keyArg: TPlainKey<M, K>, ...argsArg: TMessageArgs<M, K>) {\n // no message of its own: `message` is the getter below\n super();\n // said once, so a key or parameters from untyped data are refused here, where they are passed, rather than where the error is read\n sourceI18n.t(wordsArg.catalog, keyArg, ...argsArg);\n this.#words = wordsArg;\n this.key = keyArg as K;\n this.args = argsArg;\n }\n\n /** The word in the translator's language now, or in the catalog's source language while the translator cannot say it yet. */\n public override get message(): string {\n const words = this.#words;\n const key = this.key as TPlainKey<M, K>;\n return words.i18n.isLoaded(words.catalog) ? words(key, ...this.args) : sourceI18n.t(words.catalog, key, ...this.args);\n }\n}\n","/**\n * `verifyCatalog()`: what a package's test asks of its words. It loads every\n * registered translation and reports, per language and key, what is wrong\n * (errors) and what is worth a look (warnings).\n */\n\nimport type { Catalog, TMessages, Translation } from './i18n.catalog.js';\nimport { I18nError } from './i18n.errors.js';\nimport { parseMessage, type IParsedMessage, type TMessageNode } from './i18n.parser.js';\n\nexport type TFindingCode =\n /** a message that does not read */\n | 'syntax'\n /** a base translation lacks a key */\n | 'missing'\n /** a translation has a key its source has not */\n | 'extra'\n /** a translation takes other parameters, kinds, select keys or tags than its source */\n | 'signature'\n /** a plural lacks a category its language needs, such as `few` in Polish; exact forms that cover a category whole (English `=1` for `one`) count */\n | 'plural_categories'\n /** a plural has a branch for a category its language never chooses */\n | 'unused_plural_categories'\n /** a translation that is its source word for word */\n | 'identical'\n /** a translation much longer than its source, a layout risk */\n | 'length'\n /** a single-word source message without a note for translators (a word like \"Back\" is a noun or a verb) */\n | 'no_description'\n /** an overlay with no translation or source along its chain to fall back to */\n | 'overlay_without_base'\n /** a translation that could not be loaded */\n | 'load_failed';\n\nexport interface IFinding {\n severity: 'error' | 'warning';\n code: TFindingCode;\n namespace: string;\n locale: string;\n key?: string;\n detail: string;\n}\n\nexport interface IVerifyOptions {\n /** source messages that may stay as they are in every language, such as `IBAN` or `OK` */\n identicalAllowed?: readonly string[];\n /** the share a translation may be longer than its source before it is a `length` warning; 0.6 by default */\n lengthGrowth?: number;\n /** sources shorter than this many characters are not length-checked; 20 by default */\n lengthMinimum?: number;\n /** whether single-word source messages without a description are warnings; true by default */\n describeSingleWords?: boolean;\n}\n\nconst SINGLE_WORD = /^\\p{L}+$/u;\n\n/** Every plural of a message, with whether it is ordinal and the selectors it has. */\nconst pluralsOf = (nodesArg: readonly TMessageNode[], outArg: Array<{ name: string; ordinal: boolean; keys: string[] }> = []) => {\n for (const node of nodesArg) {\n if (node.type === 'plural') {\n outArg.push({ name: node.name, ordinal: node.ordinal, keys: Object.keys(node.branches) });\n for (const branch of Object.values(node.branches)) pluralsOf(branch, outArg);\n } else if (node.type === 'select') {\n for (const branch of Object.values(node.branches)) pluralsOf(branch, outArg);\n } else if (node.type === 'tag') {\n pluralsOf(node.children, outArg);\n }\n }\n return outArg;\n};\n\n/**\n * The numbers a category is looked at on: every whole number to 1,000 (the\n * CLDR rules look at the last two or three digits), some large ones\n * (French `many` is a million) and fractions.\n */\nconst PLURAL_SAMPLES: readonly number[] = [\n ...Array.from({ length: 1001 }, (_valueArg, indexArg) => indexArg),\n 10_000, 100_000, 1_000_000, 10_000_000,\n 0.1, 0.5, 1.1, 1.5, 2.5, 3.5, 5.5, 10.5, 11.5, 100.5, 1000.5,\n];\n\n/**\n * Whether the exact forms (`=1`) of a plural stand in for a category: the\n * category is chosen for some numbers, and every one of them has an exact\n * form, as English `one` is 1 alone. `other` never is: it is always needed.\n */\nconst coveredByExact = (rulesArg: Intl.PluralRules, categoryArg: string, keysArg: readonly string[]): boolean => {\n if (categoryArg === 'other') return false;\n const exact = new Set(keysArg.filter((keyArg) => keyArg.startsWith('=')).map((keyArg) => Number(keyArg.slice(1))));\n if (!exact.size) return false;\n const chosenFor = PLURAL_SAMPLES.filter((valueArg) => rulesArg.select(valueArg) === categoryArg);\n return chosenFor.length > 0 && chosenFor.every((valueArg) => exact.has(valueArg));\n};\n\nconst pluralFindings = (parsedArg: IParsedMessage, localeArg: string, base: Omit<IFinding, 'severity' | 'code' | 'detail'>): IFinding[] => {\n const findings: IFinding[] = [];\n for (const plural of pluralsOf(parsedArg.nodes)) {\n const rules = new Intl.PluralRules(localeArg, { type: plural.ordinal ? 'ordinal' : 'cardinal' });\n const needed = new Set<string>(rules.resolvedOptions().pluralCategories);\n const missing = [...needed].filter((categoryArg) => !plural.keys.includes(categoryArg) && !coveredByExact(rules, categoryArg, plural.keys));\n const unused = plural.keys.filter((keyArg) => !keyArg.startsWith('=') && !needed.has(keyArg));\n if (missing.length) findings.push({ ...base, severity: 'error', code: 'plural_categories', detail: `the plural ${plural.name} lacks ${missing.join(', ')}, which ${localeArg} needs` });\n if (unused.length) findings.push({ ...base, severity: 'warning', code: 'unused_plural_categories', detail: `the plural ${plural.name} has ${unused.join(', ')}, which ${localeArg} never chooses` });\n }\n return findings;\n};\n\n/** Checks a catalog and every translation registered for it. Resolves with the findings, errors and warnings alike. */\nexport const verifyCatalog = async <M extends TMessages>(catalogArg: Catalog<M>, optionsArg: IVerifyOptions = {}): Promise<IFinding[]> => {\n const findings: IFinding[] = [];\n const { namespace, source } = catalogArg;\n const identicalAllowed = new Set(optionsArg.identicalAllowed ?? []);\n const growth = optionsArg.lengthGrowth ?? 0.6;\n const minimum = optionsArg.lengthMinimum ?? 20;\n const keys = Object.keys(catalogArg.entries) as Array<keyof M & string>;\n\n for (const key of keys) {\n const entry = catalogArg.entries[key];\n findings.push(...pluralFindings(catalogArg.parsedSource(key), source, { namespace, locale: source, key }));\n if ((optionsArg.describeSingleWords ?? true) && SINGLE_WORD.test(entry.message) && entry.description === undefined) {\n findings.push({ severity: 'warning', code: 'no_description', namespace, locale: source, key, detail: `\"${entry.message}\" is one word; a description tells translators what it means here` });\n }\n }\n\n for (const locale of catalogArg.locales) {\n let translation: Translation<M> | undefined;\n try {\n translation = await catalogArg.loadTranslation(locale);\n } catch (error) {\n const failure = error instanceof I18nError ? (error.cause instanceof I18nError ? error.cause : error) : undefined;\n if (failure?.code === 'invalid_translation' && failure.problems.length) {\n for (const problem of failure.problems) findings.push({ severity: 'error', code: problem.code, namespace, locale, key: problem.key, detail: problem.detail });\n } else {\n findings.push({ severity: 'error', code: 'load_failed', namespace, locale, detail: error instanceof Error ? error.message : String(error) });\n }\n continue;\n }\n if (!translation) continue;\n if (translation.overlay && !catalogArg.hasBaseFor(locale)) {\n findings.push({ severity: 'error', code: 'overlay_without_base', namespace, locale, detail: `no translation or source along the chain of ${locale} stands in for the keys it leaves out` });\n }\n for (const problem of catalogArg.problemsOf(translation.messages, translation.overlay)) {\n findings.push({ severity: 'error', code: problem.code, namespace, locale, key: problem.key, detail: problem.detail });\n }\n for (const key of keys) {\n if (!Object.hasOwn(translation.messages, key)) continue;\n const text = translation.messages[key];\n let parsed: IParsedMessage;\n try {\n parsed = parseMessage(text);\n } catch {\n continue; // reported above as `syntax`\n }\n findings.push(...pluralFindings(parsed, locale, { namespace, locale, key }));\n const sourceText = catalogArg.entries[key].message;\n if (!translation.overlay && text === sourceText && /\\p{L}/u.test(text) && !identicalAllowed.has(sourceText)) {\n findings.push({ severity: 'warning', code: 'identical', namespace, locale, key, detail: 'the translation is its source word for word' });\n }\n if (sourceText.length >= minimum && text.length > sourceText.length * (1 + growth)) {\n findings.push({ severity: 'warning', code: 'length', namespace, locale, key, detail: `${text.length} characters where the source has ${sourceText.length}` });\n }\n }\n }\n return findings;\n};\n","export { parseMarkdown } from './parser.js';\nexport { parseFrontmatter, parseCommentFrontmatter, stringifyFrontmatter } from './frontmatter.js';\nexport type { ITomlFrontmatter, TFrontmatterData, IFrontmatterDocument } from './interfaces.js';\nexport type {\n IMarkdownParseOptions,\n TMarkdownRoot,\n TMarkdownNode,\n TMarkdownRootContent,\n TMarkdownPhrasingContent,\n} from './parser.js';\n","import * as plugins from './smartyaml.plugins.js';\n\nexport let yamlStringToObject = async (\n yamlStringArg: string,\n): Promise<any> => {\n return plugins.yaml.parse(yamlStringArg);\n};\n\nexport let objectToYamlString = async (\n objectArg: unknown\n): Promise<string> => {\n return plugins.yaml.stringify(objectArg);\n};\n\nexport let getYamlDocFromString = async (stringArg: string) => {\n return plugins.yaml.parseDocument(stringArg);\n};\n","// `export * as default from ...` fails on Webpack v4\n// https://github.com/eemeli/yaml/issues/228\nimport * as YAML from './dist/index.js'\nexport default YAML\nexport * from './dist/index.js'\n","export { Composer } from './compose/composer.js';\nexport { Document } from './doc/Document.js';\nexport { Schema } from './schema/Schema.js';\nexport { YAMLError, YAMLParseError, YAMLWarning } from './errors.js';\nexport { Alias } from './nodes/Alias.js';\nexport { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity.js';\nexport { Pair } from './nodes/Pair.js';\nexport { Scalar } from './nodes/Scalar.js';\nexport { YAMLMap } from './nodes/YAMLMap.js';\nexport { YAMLSeq } from './nodes/YAMLSeq.js';\nimport * as cst from './parse/cst.js';\nexport { cst as CST };\nexport { Lexer } from './parse/lexer.js';\nexport { LineCounter } from './parse/line-counter.js';\nexport { Parser } from './parse/parser.js';\nexport { parse, parseAllDocuments, parseDocument, stringify } from './public-api.js';\nexport { visit, visitAsync } from './visit.js';\n","const ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n}\nfunction isNode(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\nexport { ALIAS, DOC, MAP, NODE_TYPE, PAIR, SCALAR, SEQ, hasAnchor, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq };\n","import { isDocument, isNode, isPair, isCollection, isMap, isSeq, isScalar, isAlias } from './nodes/identity.js';\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (isDocument(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if (isNode(ctrl) || isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `Promise`: Must resolve to one of the following values\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (isDocument(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if (isNode(ctrl) || isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\nfunction initVisitor(visitor) {\n if (typeof visitor === 'object' &&\n (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n if (typeof visitor === 'function')\n return visitor(key, node, path);\n if (isMap(node))\n return visitor.Map?.(key, node, path);\n if (isSeq(node))\n return visitor.Seq?.(key, node, path);\n if (isPair(node))\n return visitor.Pair?.(key, node, path);\n if (isScalar(node))\n return visitor.Scalar?.(key, node, path);\n if (isAlias(node))\n return visitor.Alias?.(key, node, path);\n return undefined;\n}\nfunction replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if (isCollection(parent)) {\n parent.items[key] = node;\n }\n else if (isPair(parent)) {\n if (key === 'key')\n parent.key = node;\n else\n parent.value = node;\n }\n else if (isDocument(parent)) {\n parent.contents = node;\n }\n else {\n const pt = isAlias(parent) ? 'alias' : 'scalar';\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n}\n\nexport { visit, visitAsync };\n","import { isNode } from '../nodes/identity.js';\nimport { visit } from '../visit.js';\n\nconst escapeChars = {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n constructor(yaml, tags) {\n /**\n * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n * included in the document's stringified representation.\n */\n this.docStart = null;\n /** The doc-end marker `...`. */\n this.docEnd = false;\n this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n this.tags = Object.assign({}, Directives.defaultTags, tags);\n }\n clone() {\n const copy = new Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case '1.1':\n this.atNextDocument = true;\n break;\n case '1.2':\n this.atNextDocument = false;\n this.yaml = {\n explicit: Directives.defaultYaml.explicit,\n version: '1.2'\n };\n this.tags = Object.assign({}, Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n this.tags = Object.assign({}, Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case '%TAG': {\n if (parts.length !== 2) {\n onError(0, '%TAG directive should contain exactly two parts');\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case '%YAML': {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, '%YAML directive should contain exactly one part');\n return false;\n }\n const [version] = parts;\n if (version === '1.1' || version === '1.2') {\n this.yaml.version = version;\n return true;\n }\n else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === '!')\n return '!'; // non-specific tag\n if (source[0] !== '!') {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === '<') {\n const verbatim = source.slice(2, -1);\n if (verbatim === '!' || verbatim === '!!') {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== '>')\n onError('Verbatim tags must end with a >');\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix) {\n try {\n return prefix + decodeURIComponent(suffix);\n }\n catch (error) {\n onError(String(error));\n return null;\n }\n }\n if (handle === '!')\n return source; // local tag\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === '!' ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit\n ? [`%YAML ${this.yaml.version || '1.2'}`]\n : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && isNode(doc.contents)) {\n const tags = {};\n visit(doc.contents, (_key, node) => {\n if (isNode(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n }\n else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n continue;\n if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join('\\n');\n }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\nexport { Directives };\n","import { isScalar, isCollection } from '../nodes/identity.js';\nimport { visit } from '../visit.js';\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n}\nfunction anchorNames(root) {\n const anchors = new Set();\n visit(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}\nfunction createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n prevAnchors ?? (prevAnchors = anchorNames(doc));\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === 'object' &&\n ref.anchor &&\n (isScalar(ref.node) || isCollection(ref.node))) {\n ref.node.anchor = ref.anchor;\n }\n else {\n const error = new Error('Failed to resolve repeated object (this should not happen)');\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n}\n\nexport { anchorIsValid, anchorNames, createNodeAnchors, findNewAnchor };\n","/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n if (val && typeof val === 'object') {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n // eslint-disable-next-line @typescript-eslint/no-array-delete\n if (v1 === undefined)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n }\n else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n }\n else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === undefined)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n }\n else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n}\n\nexport { applyReviver };\n","import { hasAnchor } from './identity.js';\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n * as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n * `{ keep: true }` is not set, output should be suitable for JSON\n * stringification.\n */\nfunction toJS(value, arg, ctx) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (!ctx || !hasAnchor(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: undefined };\n ctx.anchors.set(value, data);\n ctx.onCreate = res => {\n data.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === 'bigint' && !ctx?.keep)\n return Number(value);\n return value;\n}\n\nexport { toJS };\n","import { applyReviver } from '../doc/applyReviver.js';\nimport { NODE_TYPE, isDocument } from './identity.js';\nimport { toJS } from './toJS.js';\n\nclass NodeBase {\n constructor(type) {\n Object.defineProperty(this, NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!isDocument(doc))\n throw new TypeError('A document argument is required');\n const ctx = {\n anchors: new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS(this, '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n}\n\nexport { NodeBase };\n","import { anchorIsValid } from '../doc/anchors.js';\nimport { visit } from '../visit.js';\nimport { ALIAS, isAlias, isCollection, isPair, hasAnchor } from './identity.js';\nimport { NodeBase } from './Node.js';\nimport { toJS } from './toJS.js';\n\nclass Alias extends NodeBase {\n constructor(source) {\n super(ALIAS);\n this.source = source;\n Object.defineProperty(this, 'tag', {\n set() {\n throw new Error('Alias nodes cannot have tags');\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc, ctx) {\n if (ctx?.maxAliasCount === 0)\n throw new ReferenceError('Alias resolution is disabled');\n let nodes;\n if (ctx?.aliasResolveCache) {\n nodes = ctx.aliasResolveCache;\n }\n else {\n nodes = [];\n visit(doc, {\n Node: (_key, node) => {\n if (isAlias(node) || hasAnchor(node))\n nodes.push(node);\n }\n });\n if (ctx)\n ctx.aliasResolveCache = nodes;\n }\n let found = undefined;\n for (const node of nodes) {\n if (node === this)\n break;\n if (node.anchor === this.source)\n found = node;\n }\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const { anchors, doc, maxAliasCount } = ctx;\n const source = this.resolve(doc, ctx);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n let data = anchors.get(source);\n if (!data) {\n // Resolve anchors for Node.prototype.toJS()\n toJS(source, null, ctx);\n data = anchors.get(source);\n }\n /* istanbul ignore if */\n if (data?.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc, source, anchors);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n throw new ReferenceError(msg);\n }\n }\n return data.res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n anchorIsValid(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n}\nfunction getAliasCount(doc, node, anchors) {\n if (isAlias(node)) {\n const source = node.resolve(doc);\n const anchor = anchors && source && anchors.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n }\n else if (isCollection(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors);\n if (c > count)\n count = c;\n }\n return count;\n }\n else if (isPair(node)) {\n const kc = getAliasCount(doc, node.key, anchors);\n const vc = getAliasCount(doc, node.value, anchors);\n return Math.max(kc, vc);\n }\n return 1;\n}\n\nexport { Alias };\n","import { SCALAR } from './identity.js';\nimport { NodeBase } from './Node.js';\nimport { toJS } from './toJS.js';\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends NodeBase {\n constructor(value) {\n super(SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : toJS(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\nexport { Scalar, isScalarValue };\n","import { Alias } from '../nodes/Alias.js';\nimport { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n if (isDocument(value))\n value = value.contents;\n if (isNode(value))\n return value;\n if (isPair(value)) {\n const map = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String ||\n value instanceof Number ||\n value instanceof Boolean ||\n (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n ) {\n // https://tc39.es/ecma262/#sec-serializejsonproperty\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `ref` wrapper allows for circular references to resolve.\n let ref = undefined;\n if (aliasDuplicateObjects && value && typeof value === 'object') {\n ref = sourceObjects.get(value);\n if (ref) {\n ref.anchor ?? (ref.anchor = onAnchor(value));\n return new Alias(ref.anchor);\n }\n else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith('!!'))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n value = value.toJSON();\n }\n if (!value || typeof value !== 'object') {\n const node = new Scalar(value);\n if (ref)\n ref.node = node;\n return node;\n }\n tagObj =\n value instanceof Map\n ? schema[MAP]\n : Symbol.iterator in Object(value)\n ? schema[SEQ]\n : schema[MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode\n ? tagObj.createNode(ctx.schema, value, ctx)\n : typeof tagObj?.nodeClass?.from === 'function'\n ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n : new Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n}\n\nexport { createNode };\n","import { createNode } from '../doc/createNode.js';\nimport { isNode, isPair, isCollection, isScalar } from './identity.js';\nimport { NodeBase } from './Node.js';\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n }\n else {\n v = new Map([[k, v]]);\n }\n }\n return createNode(v, undefined, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error('This should not happen, please report a bug.');\n },\n schema,\n sourceObjects: new Map()\n });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, 'schema', {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map(it => isNode(it) || isPair(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (isCollection(node))\n node.addIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if (isCollection(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && isScalar(node) ? node.value : node;\n else\n return isCollection(node) ? node.getIn(rest, keepScalar) : undefined;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every(node => {\n if (!isPair(node))\n return false;\n const n = node.value;\n return (n == null ||\n (allowScalar &&\n isScalar(n) &&\n n.value == null &&\n !n.commentBefore &&\n !n.comment &&\n !n.tag));\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return isCollection(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n }\n else {\n const node = this.get(key, true);\n if (isCollection(node))\n node.setIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n}\n\nexport { Collection, collectionFromPath, isEmptyPath };\n","/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n ? indentComment(comment, indent)\n : comment.includes('\\n')\n ? '\\n' + indentComment(comment, indent)\n : (str.endsWith(' ') ? '' : ' ') + comment;\n\nexport { indentComment, lineComment, stringifyComment };\n","const FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n if (lineWidth < minContentWidth)\n minContentWidth = 0;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i, indent.length);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; (ch = text[(i += 1)]);) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n case 'u':\n i += 5;\n break;\n case 'U':\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i, indent.length);\n end = i + indent.length + endStep;\n split = undefined;\n }\n else {\n if (ch === ' ' &&\n prev &&\n prev !== ' ' &&\n prev !== '\\n' &&\n prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n }\n else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[(i += 1)];\n overflow = true;\n }\n // Account for newline escape, but don't break preceding escape\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n // Bail out if lineWidth & minContentWidth are shorter than an escape string\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n }\n else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (fold === 0)\n res = `\\n${indent}${text.slice(0, end)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n }\n return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i, indent) {\n let end = i;\n let start = i + 1;\n let ch = text[start];\n while (ch === ' ' || ch === '\\t') {\n if (i < start + indent) {\n ch = text[++i];\n }\n else {\n do {\n ch = text[++i];\n } while (ch && ch !== '\\n');\n end = i;\n start = i + 1;\n ch = text[start];\n }\n }\n return end;\n}\n\nexport { FOLD_BLOCK, FOLD_FLOW, FOLD_QUOTED, foldFlowLines };\n","import { Scalar } from '../nodes/Scalar.js';\nimport { foldFlowLines, FOLD_FLOW, FOLD_QUOTED, FOLD_BLOCK } from './foldFlowLines.js';\n\nconst getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n}\nfunction doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n if (ch === '\\\\')\n switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n case '0007':\n str += '\\\\a';\n break;\n case '000b':\n str += '\\\\v';\n break;\n case '001b':\n str += '\\\\e';\n break;\n case '0085':\n str += '\\\\N';\n break;\n case '00a0':\n str += '\\\\_';\n break;\n case '2028':\n str += '\\\\L';\n break;\n case '2029':\n str += '\\\\P';\n break;\n default:\n if (code.substr(0, 2) === '00')\n str += '\\\\x' + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case 'n':\n if (implicitKey ||\n json[i + 2] === '\"' ||\n json.length < minMultiLineLength) {\n i += 1;\n }\n else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n while (json[i + 2] === '\\\\' &&\n json[i + 3] === 'n' &&\n json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n str += indent;\n // space after newline needs to be escaped to not be folded\n if (json[i + 2] === ' ')\n str += '\\\\';\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey\n ? str\n : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false ||\n (ctx.implicitKey && value.includes('\\n')) ||\n /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n )\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey\n ? res\n : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n blockEndNewlines = new RegExp('(^|(?<!\\n))\\n+(?!\\n|$)', 'g');\n}\ncatch {\n blockEndNewlines = /\\n+(?!\\n|$)/g;\n}\nfunction blockString({ comment, type, value }, ctx, onComment, onChompKeep) {\n const { blockQuote, commentString, lineWidth } = ctx.options;\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (!blockQuote || /\\n[\\t ]+$/.test(value)) {\n return quotedString(value, ctx);\n }\n const indent = ctx.indent ||\n (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const literal = blockQuote === 'literal'\n ? true\n : blockQuote === 'folded' || type === Scalar.BLOCK_FOLDED\n ? false\n : type === Scalar.BLOCK_LITERAL\n ? true\n : !lineLengthOverLimit(value, lineWidth, indent.length);\n if (!value)\n return literal ? '|\\n' : '>\\n';\n // determine chomping from whitespace at value end\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf('\\n');\n if (endNlPos === -1) {\n chomp = '-'; // strip\n }\n else if (value === end || endNlPos !== end.length - 1) {\n chomp = '+'; // keep\n if (onChompKeep)\n onChompKeep();\n }\n else {\n chomp = ''; // clip\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === '\\n')\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n // determine indent indicator from whitespace at value start\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === ' ')\n startWithSpace = true;\n else if (ch === '\\n')\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? '2' : '1'; // root is at -1\n // Leading | or > is added later\n let header = (startWithSpace ? indentSize : '') + chomp;\n if (comment) {\n header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n if (onComment)\n onComment();\n }\n if (!literal) {\n const foldedValue = value\n .replace(/\\n+/g, '\\n$&')\n .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n let literalFallback = false;\n const foldOptions = getFoldOptions(ctx, true);\n if (blockQuote !== 'folded' && type !== Scalar.BLOCK_FOLDED) {\n foldOptions.onOverflow = () => {\n literalFallback = true;\n };\n }\n const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions);\n if (!literalFallback)\n return `>${header}\\n${indent}${body}`;\n }\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `|${header}\\n${indent}${start}${value}${end}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if ((implicitKey && value.includes('\\n')) ||\n (inFlow && /[[\\]{},]/.test(value))) {\n return quotedString(value, ctx);\n }\n if (/^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || !value.includes('\\n')\n ? quotedString(value, ctx)\n : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey &&\n !inFlow &&\n type !== Scalar.PLAIN &&\n value.includes('\\n')) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === '') {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey\n ? str\n : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === 'string'\n ? item\n : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== Scalar.QUOTE_DOUBLE) {\n // force double quotes on control characters & unpaired surrogates\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case Scalar.BLOCK_FOLDED:\n case Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow\n ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n : blockString(ss, ctx, onComment, onChompKeep);\n case Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = (implicitKey && defaultKeyType) || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n}\n\nexport { stringifyString };\n","import { anchorIsValid } from '../doc/anchors.js';\nimport { isPair, isAlias, isNode, isScalar, isCollection } from '../nodes/identity.js';\nimport { stringifyComment } from './stringifyComment.js';\nimport { stringifyString } from './stringifyString.js';\n\nfunction createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: stringifyComment,\n defaultKeyType: null,\n defaultStringType: 'PLAIN',\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: 'false',\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: 'null',\n simpleKeys: false,\n singleQuote: null,\n trailingComma: false,\n trueStr: 'true',\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case 'block':\n inFlow = false;\n break;\n case 'flow':\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n indent: '',\n indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',\n inFlow,\n options: opt\n };\n}\nfunction getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0)\n return match.find(t => t.format === item.format) ?? match[0];\n }\n let tagObj = undefined;\n let obj;\n if (isScalar(item)) {\n obj = item.value;\n let match = tags.filter(t => t.identify?.(obj));\n if (match.length > 1) {\n const testMatch = match.filter(t => t.test);\n if (testMatch.length > 0)\n match = testMatch;\n }\n tagObj =\n match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n }\n else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (isScalar(node) || isCollection(node)) && node.anchor;\n if (anchor && anchorIsValid(anchor)) {\n anchors.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n if (isPair(item))\n return item.toString(ctx, onComment, onChompKeep);\n if (isAlias(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n }\n else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = undefined;\n const node = isNode(item)\n ? item\n : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function'\n ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n : isScalar(node)\n ? stringifyString(node, ctx, onComment, onChompKeep)\n : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return isScalar(node) || str[0] === '{' || str[0] === '['\n ? `${props} ${str}`\n : `${props}\\n${ctx.indent}${str}`;\n}\n\nexport { createStringifyContext, stringify };\n","import { isCollection, isNode, isScalar, isSeq } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\nimport { stringify } from './stringify.js';\nimport { lineComment, indentComment } from './stringifyComment.js';\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = (isNode(key) && key.comment) || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n if (isCollection(key) || (!isNode(key) && typeof key === 'object')) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys &&\n (!key ||\n (keyComment && value == null && !ctx.inFlow) ||\n isCollection(key) ||\n (isScalar(key)\n ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL\n : typeof key === 'object'));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n }\n }\n else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += lineComment(str, ctx.indent, commentString(keyComment));\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += lineComment(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\\n${indent}:`;\n }\n else {\n str = `${str}:`;\n if (keyComment)\n str += lineComment(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if (isNode(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n }\n else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === 'object')\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && isScalar(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq &&\n indentStep.length >= 2 &&\n !ctx.inFlow &&\n !explicitKey &&\n isSeq(value) &&\n !value.flow &&\n !value.tag &&\n !value.anchor) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n let ws = ' ';\n if (keyComment || vsb || vcb) {\n ws = vsb ? '\\n' : '';\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\\n${indentComment(cs, ctx.indent)}`;\n }\n if (valueStr === '' && !ctx.inFlow) {\n if (ws === '\\n' && valueComment)\n ws = '\\n\\n';\n }\n else {\n ws += `\\n${ctx.indent}`;\n }\n }\n else if (!explicitKey && isCollection(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf('\\n');\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n let sp0 = valueStr.indexOf(' ');\n if (vs0 === '&' &&\n sp0 !== -1 &&\n sp0 < nl0 &&\n valueStr[sp0 + 1] === '!') {\n sp0 = valueStr.indexOf(' ', sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\\n${ctx.indent}`;\n }\n }\n else if (valueStr === '' || valueStr[0] === '\\n') {\n ws = '';\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n }\n else if (valueComment && !valueCommentDone) {\n str += lineComment(str, ctx.indent, commentString(valueComment));\n }\n else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n}\n\nexport { stringifyPair };\n","function debug(logLevel, ...messages) {\n if (logLevel === 'debug')\n console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n if (logLevel === 'debug' || logLevel === 'warn') {\n console.warn(warning);\n }\n}\n\nexport { debug, warn };\n","import { isScalar, isSeq, isAlias, isMap } from '../../nodes/identity.js';\nimport { Scalar } from '../../nodes/Scalar.js';\n\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nconst MERGE_KEY = '<<';\nconst merge = {\n identify: value => value === MERGE_KEY ||\n (typeof value === 'symbol' && value.description === MERGE_KEY),\n default: 'key',\n tag: 'tag:yaml.org,2002:merge',\n test: /^<<$/,\n resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), {\n addToJSMap: addMergeToJSMap\n }),\n stringify: () => MERGE_KEY\n};\nconst isMergeKey = (ctx, key) => (merge.identify(key) ||\n (isScalar(key) &&\n (!key.type || key.type === Scalar.PLAIN) &&\n merge.identify(key.value))) &&\n ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);\nfunction addMergeToJSMap(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (isSeq(source))\n for (const it of source.items)\n mergeValue(ctx, map, it);\n else if (Array.isArray(source))\n for (const it of source)\n mergeValue(ctx, map, it);\n else\n mergeValue(ctx, map, source);\n}\nfunction mergeValue(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (!isMap(source))\n throw new Error('Merge sources must be maps or map aliases');\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value);\n }\n else if (map instanceof Set) {\n map.add(key);\n }\n else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n}\nfunction resolveAliasValue(ctx, value) {\n return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;\n}\n\nexport { addMergeToJSMap, isMergeKey, merge };\n","import { warn } from '../log.js';\nimport { isMergeKey, addMergeToJSMap } from '../schema/yaml-1.1/merge.js';\nimport { createStringifyContext } from '../stringify/stringify.js';\nimport { isNode } from './identity.js';\nimport { toJS } from './toJS.js';\n\nfunction addPairToJSMap(ctx, map, { key, value }) {\n if (isNode(key) && key.addToJSMap)\n key.addToJSMap(ctx, map, value);\n // TODO: Should drop this special case for bare << handling\n else if (isMergeKey(ctx, key))\n addMergeToJSMap(ctx, map, value);\n else {\n const jsKey = toJS(key, '', ctx);\n if (map instanceof Map) {\n map.set(jsKey, toJS(value, jsKey, ctx));\n }\n else if (map instanceof Set) {\n map.add(jsKey);\n }\n else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = toJS(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return '';\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n if (typeof jsKey !== 'object')\n return String(jsKey);\n if (isNode(key) && ctx?.doc) {\n const strCtx = createStringifyContext(ctx.doc, {});\n strCtx.anchors = new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n}\n\nexport { addPairToJSMap };\n","import { createNode } from '../doc/createNode.js';\nimport { stringifyPair } from '../stringify/stringifyPair.js';\nimport { addPairToJSMap } from './addPairToJSMap.js';\nimport { NODE_TYPE, PAIR, isNode } from './identity.js';\n\nfunction createPair(key, value, ctx) {\n const k = createNode(key, undefined, ctx);\n const v = createNode(value, undefined, ctx);\n return new Pair(k, v);\n}\nclass Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, NODE_TYPE, { value: PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if (isNode(key))\n key = key.clone(schema);\n if (isNode(value))\n value = value.clone(schema);\n return new Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? new Map() : {};\n return addPairToJSMap(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc\n ? stringifyPair(this, ctx, onComment, onChompKeep)\n : JSON.stringify(this);\n }\n}\n\nexport { Pair, createPair };\n","import { isNode, isPair } from '../nodes/identity.js';\nimport { stringify } from './stringify.js';\nimport { lineComment, indentComment } from './stringifyComment.js';\n\nfunction stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false; // flag for the preceding node's status\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (isNode(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment = item.comment;\n }\n else if (isPair(item)) {\n const ik = isNode(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str = stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n if (comment)\n str += lineComment(str, itemIndent, commentString(comment));\n if (chompKeep && comment)\n chompKeep = false;\n lines.push(blockItemPrefix + str);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n }\n else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\\n${indent}${line}` : '\\n';\n }\n }\n if (comment) {\n str += '\\n' + indentComment(commentString(comment), indent);\n if (onComment)\n onComment();\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n}\nfunction stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (isNode(item)) {\n if (item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n }\n else if (isPair(item)) {\n const ik = isNode(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = isNode(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n }\n else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = stringify(item, itemCtx, () => (comment = null));\n reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\\n'));\n if (i < items.length - 1) {\n str += ',';\n }\n else if (ctx.options.trailingComma) {\n if (ctx.options.lineWidth > 0) {\n reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +\n (str.length + 2) >\n ctx.options.lineWidth);\n }\n if (reqNewline) {\n str += ',';\n }\n }\n if (comment)\n str += lineComment(str, itemIndent, commentString(comment));\n lines.push(str);\n linesAtValue = lines.length;\n }\n const { start, end } = flowChars;\n if (lines.length === 0) {\n return start + end;\n }\n else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n }\n if (reqNewline) {\n let str = start;\n for (const line of lines)\n str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n return `${str}\\n${indent}${end}`;\n }\n else {\n return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n }\n }\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, '');\n if (comment) {\n const ic = indentComment(commentString(comment), indent);\n lines.push(ic.trimStart()); // Avoid double indent on first line\n }\n}\n\nexport { stringifyCollection };\n","import { stringifyCollection } from '../stringify/stringifyCollection.js';\nimport { addPairToJSMap } from './addPairToJSMap.js';\nimport { Collection } from './Collection.js';\nimport { MAP, isPair, isScalar } from './identity.js';\nimport { Pair, createPair } from './Pair.js';\nimport { isScalarValue } from './Scalar.js';\n\nfunction findPair(items, key) {\n const k = isScalar(key) ? key.value : key;\n for (const it of items) {\n if (isPair(it)) {\n if (it.key === key || it.key === k)\n return it;\n if (isScalar(it.key) && it.key.value === k)\n return it;\n }\n }\n return undefined;\n}\nclass YAMLMap extends Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:map';\n }\n constructor(schema) {\n super(MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === 'function')\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== undefined || keepUndefined)\n map.items.push(createPair(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n }\n else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if (isPair(pair))\n _pair = pair;\n else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n // In TypeScript, this never happens.\n _pair = new Pair(pair, pair?.value);\n }\n else\n _pair = new Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n // For scalars, keep the old node & its comments and anchors\n if (isScalar(prev.value) && isScalarValue(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n }\n else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n }\n else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && isScalar(node) ? node.value : node) ?? undefined;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n addPairToJSMap(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!isPair(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return stringifyCollection(this, ctx, {\n blockItemPrefix: '',\n flowChars: { start: '{', end: '}' },\n itemIndent: ctx.indent || '',\n onChompKeep,\n onComment\n });\n }\n}\n\nexport { YAMLMap, findPair };\n","import { isMap } from '../../nodes/identity.js';\nimport { YAMLMap } from '../../nodes/YAMLMap.js';\n\nconst map = {\n collection: 'map',\n default: true,\n nodeClass: YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve(map, onError) {\n if (!isMap(map))\n onError('Expected a mapping for this tag');\n return map;\n },\n createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx)\n};\n\nexport { map };\n","import { createNode } from '../doc/createNode.js';\nimport { stringifyCollection } from '../stringify/stringifyCollection.js';\nimport { Collection } from './Collection.js';\nimport { SEQ, isScalar } from './identity.js';\nimport { isScalarValue } from './Scalar.js';\nimport { toJS } from './toJS.js';\n\nclass YAMLSeq extends Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:seq';\n }\n constructor(schema) {\n super(SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return undefined;\n const it = this.items[idx];\n return !keepScalar && isScalar(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if (isScalar(prev) && isScalarValue(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push(toJS(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return stringifyCollection(this, ctx, {\n blockItemPrefix: '- ',\n flowChars: { start: '[', end: ']' },\n itemIndent: (ctx.indent || '') + ' ',\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === 'function') {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push(createNode(it, undefined, ctx));\n }\n }\n return seq;\n }\n}\nfunction asItemIndex(key) {\n let idx = isScalar(key) ? key.value : key;\n if (idx && typeof idx === 'string')\n idx = Number(idx);\n return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n ? idx\n : null;\n}\n\nexport { YAMLSeq };\n","import { isSeq } from '../../nodes/identity.js';\nimport { YAMLSeq } from '../../nodes/YAMLSeq.js';\n\nconst seq = {\n collection: 'seq',\n default: true,\n nodeClass: YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve(seq, onError) {\n if (!isSeq(seq))\n onError('Expected a sequence for this tag');\n return seq;\n },\n createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx)\n};\n\nexport { seq };\n","import { stringifyString } from '../../stringify/stringifyString.js';\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return stringifyString(item, ctx, onComment, onChompKeep);\n }\n};\n\nexport { string };\n","import { Scalar } from '../../nodes/Scalar.js';\n\nconst nullTag = {\n identify: value => value == null,\n createNode: () => new Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new Scalar(null),\n stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n ? source\n : ctx.options.nullStr\n};\n\nexport { nullTag };\n","import { Scalar } from '../../nodes/Scalar.js';\n\nconst boolTag = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => new Scalar(str[0] === 't' || str[0] === 'T'),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === 't' || source[0] === 'T';\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n};\n\nexport { boolTag };\n","function stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === 'bigint')\n return String(value);\n const num = typeof value === 'number' ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);\n if (!format &&\n minFractionDigits &&\n (!tag || tag === 'tag:yaml.org,2002:float') &&\n /^-?\\d/.test(n) &&\n !n.includes('e')) {\n let i = n.indexOf('.');\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += '0';\n }\n return n;\n}\n\nexport { stringifyNumber };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: str => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new Scalar(parseFloat(str));\n const dot = str.indexOf('.');\n if (dot !== -1 && str[str.length - 1] === '0')\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: stringifyNumber\n};\n\nexport { float, floatExp, floatNaN };\n","import { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return stringifyNumber(node);\n}\nconst intOct = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber\n};\nconst intHex = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexport { int, intHex, intOct };\n","import { map } from '../common/map.js';\nimport { nullTag } from '../common/null.js';\nimport { seq } from '../common/seq.js';\nimport { string } from '../common/string.js';\nimport { boolTag } from './bool.js';\nimport { floatNaN, floatExp, float } from './float.js';\nimport { intOct, int, intHex } from './int.js';\n\nconst schema = [\n map,\n seq,\n string,\n nullTag,\n boolTag,\n intOct,\n int,\n intHex,\n floatNaN,\n floatExp,\n float\n];\n\nexport { schema };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { map } from '../common/map.js';\nimport { seq } from '../common/seq.js';\n\nfunction intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify: stringifyJSON\n },\n {\n identify: value => value == null,\n createNode: () => new Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true$|^false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n }\n];\nconst jsonError = {\n default: true,\n tag: '',\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n};\nconst schema = [map, seq].concat(jsonScalars, jsonError);\n\nexport { schema };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { stringifyString } from '../../stringify/stringifyString.js';\n\nconst binary = {\n identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n }\n else {\n onError('This environment does not support reading binary tags; either Buffer or atob is required');\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n if (!value)\n return '';\n const buf = value; // checked earlier by binary.identify()\n let str;\n if (typeof btoa === 'function') {\n let s = '';\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n }\n else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n type ?? (type = Scalar.BLOCK_LITERAL);\n if (type !== Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n }\n return stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n};\n\nexport { binary };\n","import { isSeq, isPair, isMap } from '../../nodes/identity.js';\nimport { createPair, Pair } from '../../nodes/Pair.js';\nimport { Scalar } from '../../nodes/Scalar.js';\nimport { YAMLSeq } from '../../nodes/YAMLSeq.js';\n\nfunction resolvePairs(seq, onError) {\n if (isSeq(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (isPair(item))\n continue;\n else if (isMap(item)) {\n if (item.items.length > 1)\n onError('Each pair must have its own sequence indicator');\n const pair = item.items[0] || new Pair(new Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore\n ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment\n ? `${item.comment}\\n${cn.comment}`\n : item.comment;\n }\n item = pair;\n }\n seq.items[i] = isPair(item) ? item : new Pair(item);\n }\n }\n else\n onError('Expected a sequence for this tag');\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs = new YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === 'function')\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n }\n else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n }\n else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n }\n else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n }\n else {\n key = it;\n }\n pairs.items.push(createPair(key, value, ctx));\n }\n return pairs;\n}\nconst pairs = {\n collection: 'seq',\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: resolvePairs,\n createNode: createPairs\n};\n\nexport { createPairs, pairs, resolvePairs };\n","import { isScalar, isPair } from '../../nodes/identity.js';\nimport { toJS } from '../../nodes/toJS.js';\nimport { YAMLMap } from '../../nodes/YAMLMap.js';\nimport { YAMLSeq } from '../../nodes/YAMLSeq.js';\nimport { resolvePairs, createPairs } from './pairs.js';\n\nclass YAMLOMap extends YAMLSeq {\n constructor() {\n super();\n this.add = YAMLMap.prototype.add.bind(this);\n this.delete = YAMLMap.prototype.delete.bind(this);\n this.get = YAMLMap.prototype.get.bind(this);\n this.has = YAMLMap.prototype.has.bind(this);\n this.set = YAMLMap.prototype.set.bind(this);\n this.tag = YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if (isPair(pair)) {\n key = toJS(pair.key, '', ctx);\n value = toJS(pair.value, key, ctx);\n }\n else {\n key = toJS(pair, '', ctx);\n }\n if (map.has(key))\n throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs = createPairs(schema, iterable, ctx);\n const omap = new this();\n omap.items = pairs.items;\n return omap;\n }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n collection: 'seq',\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve(seq, onError) {\n const pairs = resolvePairs(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs.items) {\n if (isScalar(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n }\n else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\nexport { YAMLOMap, omap };\n","import { Scalar } from '../../nodes/Scalar.js';\n\nfunction boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n identify: value => value === true,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new Scalar(true),\n stringify: boolStringify\n};\nconst falseTag = {\n identify: value => value === false,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n resolve: () => new Scalar(false),\n stringify: boolStringify\n};\n\nexport { falseTag, trueTag };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, '')),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new Scalar(parseFloat(str.replace(/_/g, '')));\n const dot = str.indexOf('.');\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, '');\n if (f[f.length - 1] === '0')\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: stringifyNumber\n};\n\nexport { float, floatExp, floatNaN };\n","import { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === '-' || sign === '+')\n offset += 1;\n str = str.substring(offset).replace(/_/g, '');\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n return stringifyNumber(node);\n}\nconst intBin = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber\n};\nconst intHex = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexport { int, intBin, intHex, intOct };\n","import { isMap, isPair, isScalar } from '../../nodes/identity.js';\nimport { Pair, createPair } from '../../nodes/Pair.js';\nimport { YAMLMap, findPair } from '../../nodes/YAMLMap.js';\n\nclass YAMLSet extends YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = YAMLSet.tag;\n }\n add(key) {\n let pair;\n if (isPair(key))\n pair = key;\n else if (key &&\n typeof key === 'object' &&\n 'key' in key &&\n 'value' in key &&\n key.value === null)\n pair = new Pair(key.key, null);\n else\n pair = new Pair(key, null);\n const prev = findPair(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = findPair(this.items, key);\n return !keepPair && isPair(pair)\n ? isScalar(pair.key)\n ? pair.key.value\n : pair.key\n : pair;\n }\n set(key, value) {\n if (typeof value !== 'boolean')\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = findPair(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n }\n else if (!prev && value) {\n this.items.push(new Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error('Set items must all have null values');\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === 'function')\n value = replacer.call(iterable, value, value);\n set.items.push(createPair(value, null, ctx));\n }\n return set;\n }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n collection: 'map',\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if (isMap(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError('Set items must all have null values');\n }\n else\n onError('Expected a mapping for this tag');\n return map;\n }\n};\n\nexport { YAMLSet, set };\n","import { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts\n .replace(/_/g, '')\n .split(':')\n .reduce((res, p) => res * num(60) + num(p), num(0));\n return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === 'bigint')\n num = n => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return stringifyNumber(node);\n let sign = '';\n if (value < 0) {\n sign = '-';\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60]; // seconds, including ms\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n }\n else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60); // minutes\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value); // hours\n }\n }\n return (sign +\n parts\n .map(n => String(n).padStart(2, '0'))\n .join(':')\n .replace(/000000\\d*$/, '') // % 60 may introduce error\n );\n}\nconst intTime = {\n identify: value => typeof value === 'bigint' || Number.isInteger(value),\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: str => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:' + // time is optional\n '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?$'),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 60000 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\\.000Z$/, '') ?? ''\n};\n\nexport { floatTime, intTime, timestamp };\n","import { map } from '../common/map.js';\nimport { nullTag } from '../common/null.js';\nimport { seq } from '../common/seq.js';\nimport { string } from '../common/string.js';\nimport { binary } from './binary.js';\nimport { trueTag, falseTag } from './bool.js';\nimport { floatNaN, floatExp, float } from './float.js';\nimport { intBin, intOct, int, intHex } from './int.js';\nimport { merge } from './merge.js';\nimport { omap } from './omap.js';\nimport { pairs } from './pairs.js';\nimport { set } from './set.js';\nimport { intTime, floatTime, timestamp } from './timestamp.js';\n\nconst schema = [\n map,\n seq,\n string,\n nullTag,\n trueTag,\n falseTag,\n intBin,\n intOct,\n int,\n intHex,\n floatNaN,\n floatExp,\n float,\n binary,\n merge,\n omap,\n pairs,\n set,\n intTime,\n floatTime,\n timestamp\n];\n\nexport { schema };\n","import { map } from './common/map.js';\nimport { nullTag } from './common/null.js';\nimport { seq } from './common/seq.js';\nimport { string } from './common/string.js';\nimport { boolTag } from './core/bool.js';\nimport { floatNaN, floatExp, float } from './core/float.js';\nimport { intOct, intHex, int } from './core/int.js';\nimport { schema } from './core/schema.js';\nimport { schema as schema$1 } from './json/schema.js';\nimport { binary } from './yaml-1.1/binary.js';\nimport { merge } from './yaml-1.1/merge.js';\nimport { omap } from './yaml-1.1/omap.js';\nimport { pairs } from './yaml-1.1/pairs.js';\nimport { schema as schema$2 } from './yaml-1.1/schema.js';\nimport { set } from './yaml-1.1/set.js';\nimport { timestamp, intTime, floatTime } from './yaml-1.1/timestamp.js';\n\nconst schemas = new Map([\n ['core', schema],\n ['failsafe', [map, seq, string]],\n ['json', schema$1],\n ['yaml11', schema$2],\n ['yaml-1.1', schema$2]\n]);\nconst tagsByName = {\n binary,\n bool: boolTag,\n float,\n floatExp,\n floatNaN,\n floatTime,\n int,\n intHex,\n intOct,\n intTime,\n map,\n merge,\n null: nullTag,\n omap,\n pairs,\n seq,\n set,\n timestamp\n};\nconst coreKnownTags = {\n 'tag:yaml.org,2002:binary': binary,\n 'tag:yaml.org,2002:merge': merge,\n 'tag:yaml.org,2002:omap': omap,\n 'tag:yaml.org,2002:pairs': pairs,\n 'tag:yaml.org,2002:set': set,\n 'tag:yaml.org,2002:timestamp': timestamp\n};\nfunction getTags(customTags, schemaName, addMergeTag) {\n const schemaTags = schemas.get(schemaName);\n if (schemaTags && !customTags) {\n return addMergeTag && !schemaTags.includes(merge)\n ? schemaTags.concat(merge)\n : schemaTags.slice();\n }\n let tags = schemaTags;\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys())\n .filter(key => key !== 'yaml11')\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n }\n else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n if (addMergeTag)\n tags = tags.concat(merge);\n return tags.reduce((tags, tag) => {\n const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag;\n if (!tagObj) {\n const tagName = JSON.stringify(tag);\n const keys = Object.keys(tagsByName)\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);\n }\n if (!tags.includes(tagObj))\n tags.push(tagObj);\n return tags;\n }, []);\n}\n\nexport { coreKnownTags, getTags };\n","import { MAP, SCALAR, SEQ } from '../nodes/identity.js';\nimport { map } from './common/map.js';\nimport { seq } from './common/seq.js';\nimport { string } from './common/string.js';\nimport { getTags, coreKnownTags } from './tags.js';\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat)\n ? getTags(compat, 'compat')\n : compat\n ? getTags(null, compat)\n : null;\n this.name = (typeof schema === 'string' && schema) || 'core';\n this.knownTags = resolveKnownTags ? coreKnownTags : {};\n this.tags = getTags(customTags, this.name, merge);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, MAP, { value: map });\n Object.defineProperty(this, SCALAR, { value: string });\n Object.defineProperty(this, SEQ, { value: seq });\n // Used by createMap()\n this.sortMapEntries =\n typeof sortMapEntries === 'function'\n ? sortMapEntries\n : sortMapEntries === true\n ? sortMapEntriesByKey\n : null;\n }\n clone() {\n const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n}\n\nexport { Schema };\n","import { isNode } from '../nodes/identity.js';\nimport { createStringifyContext, stringify } from './stringify.js';\nimport { indentComment, lineComment } from './stringifyComment.js';\n\nfunction stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n }\n else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push('---');\n const ctx = createStringifyContext(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift('');\n const cs = commentString(doc.commentBefore);\n lines.unshift(indentComment(cs, ''));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if (isNode(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push('');\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push(indentComment(cs, ''));\n }\n // top-level block scalars need to be indented if followed by a comment\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n let body = stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n if (contentComment)\n body += lineComment(body, '', commentString(contentComment));\n if ((body[0] === '|' || body[0] === '>') &&\n lines[lines.length - 1] === '---') {\n // Top-level block scalars with a preceding doc marker ought to use the\n // same line for their header.\n lines[lines.length - 1] = `--- ${body}`;\n }\n else\n lines.push(body);\n }\n else {\n lines.push(stringify(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes('\\n')) {\n lines.push('...');\n lines.push(indentComment(cs, ''));\n }\n else {\n lines.push(`... ${cs}`);\n }\n }\n else {\n lines.push('...');\n }\n }\n else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, '');\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n lines.push('');\n lines.push(indentComment(commentString(dc), ''));\n }\n }\n return lines.join('\\n') + '\\n';\n}\n\nexport { stringifyDocument };\n","import { Alias } from '../nodes/Alias.js';\nimport { isEmptyPath, collectionFromPath } from '../nodes/Collection.js';\nimport { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/identity.js';\nimport { Pair } from '../nodes/Pair.js';\nimport { toJS } from '../nodes/toJS.js';\nimport { Schema } from '../schema/Schema.js';\nimport { stringifyDocument } from '../stringify/stringifyDocument.js';\nimport { anchorNames, findNewAnchor, createNodeAnchors } from './anchors.js';\nimport { applyReviver } from './applyReviver.js';\nimport { createNode } from './createNode.js';\nimport { Directives } from './directives.js';\n\nclass Document {\n constructor(value, replacer, options) {\n /** A comment before this Document */\n this.commentBefore = null;\n /** A comment immediately after this Document */\n this.comment = null;\n /** Errors encountered during parsing. */\n this.errors = [];\n /** Warnings encountered during parsing. */\n this.warnings = [];\n Object.defineProperty(this, NODE_TYPE, { value: DOC });\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: 'warn',\n prettyErrors: true,\n strict: true,\n stringKeys: false,\n uniqueKeys: true,\n version: '1.2'\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n }\n else\n this.directives = new Directives({ version });\n this.setSchema(version, options);\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents =\n value === undefined ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(Document.prototype, {\n [NODE_TYPE]: { value: DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n // @ts-expect-error We can't really know that this matches Contents.\n copy.contents = isNode(this.contents)\n ? this.contents.clone(copy.schema)\n : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = anchorNames(this);\n node.anchor =\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? findNewAnchor(name || 'a', prev) : name;\n }\n return new Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = undefined;\n if (typeof replacer === 'function') {\n value = replacer.call({ '': value }, '', value);\n _replacer = replacer;\n }\n else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors(this, \n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || 'a');\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = createNode(value, tag, ctx);\n if (flow && isCollection(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if (isEmptyPath(path)) {\n if (this.contents == null)\n return false;\n // @ts-expect-error Presumed impossible if Strict extends false\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents)\n ? this.contents.deleteIn(path)\n : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return isCollection(this.contents)\n ? this.contents.get(key, keepScalar)\n : undefined;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if (isEmptyPath(path))\n return !keepScalar && isScalar(this.contents)\n ? this.contents.value\n : this.contents;\n return isCollection(this.contents)\n ? this.contents.getIn(path, keepScalar)\n : undefined;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return isCollection(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if (isEmptyPath(path))\n return this.contents !== undefined;\n return isCollection(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = collectionFromPath(this.schema, [key], value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if (isEmptyPath(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === 'number')\n version = String(version);\n let opt;\n switch (version) {\n case '1.1':\n if (this.directives)\n this.directives.yaml.version = '1.1';\n else\n this.directives = new Directives({ version: '1.1' });\n opt = { resolveKnownTags: false, schema: 'yaml-1.1' };\n break;\n case '1.2':\n case 'next':\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new Directives({ version });\n opt = { resolveKnownTags: true, schema: 'core' };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n // Not using `instanceof Schema` to allow for duck typing\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS(this.contents, jsonArg ?? '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error('Document with errors cannot be stringified');\n if ('indent' in options &&\n (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return stringifyDocument(this, options);\n }\n}\nfunction assertCollection(contents) {\n if (isCollection(contents))\n return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nexport { Document };\n","class YAMLError extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n}\nclass YAMLParseError extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLParseError', pos, code, message);\n }\n}\nclass YAMLWarning extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLWarning', pos, code, message);\n }\n}\nconst prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map(pos => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src\n .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n .replace(/[\\n\\r]+$/, '');\n // Trim to max 80 chars, keeping col position near the middle\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = '…' + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + '…';\n // Include previous line in context if pointing at line start\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n // Regexp won't match if start is trimmed\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + '…\\n';\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end?.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = ' '.repeat(ci) + '^'.repeat(count);\n error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n }\n};\n\nexport { YAMLError, YAMLParseError, YAMLWarning, prettifyError };\n","function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = '';\n let commentSep = '';\n let hasNewline = false;\n let reqSpace = false;\n let tab = null;\n let anchor = null;\n let tag = null;\n let newlineAfterProp = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== 'space' &&\n token.type !== 'newline' &&\n token.type !== 'comma')\n onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n reqSpace = false;\n }\n if (tab) {\n if (atNewline && token.type !== 'comment' && token.type !== 'newline') {\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n }\n tab = null;\n }\n switch (token.type) {\n case 'space':\n // At the doc level, tabs at line start may be parsed\n // as leading white space rather than indentation.\n // In a flow collection, only the parser handles indent.\n if (!flow &&\n (indicator !== 'doc-start' || next?.type !== 'flow-collection') &&\n token.source.includes('\\t')) {\n tab = token;\n }\n hasSpace = true;\n break;\n case 'comment': {\n if (!hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = token.source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = '';\n atNewline = false;\n break;\n }\n case 'newline':\n if (atNewline) {\n if (comment)\n comment += token.source;\n else if (!found || indicator !== 'seq-item-ind')\n spaceBefore = true;\n }\n else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n newlineAfterProp = token;\n hasSpace = true;\n break;\n case 'anchor':\n if (anchor)\n onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n if (token.source.endsWith(':'))\n onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n anchor = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case 'tag': {\n if (tag)\n onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n tag = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n // Could here handle preceding comments differently\n if (anchor || tag)\n onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n found = token;\n atNewline =\n indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';\n hasSpace = false;\n break;\n case 'comma':\n if (flow) {\n if (comma)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n // else fallthrough\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace &&\n next &&\n next.type !== 'space' &&\n next.type !== 'newline' &&\n next.type !== 'comma' &&\n (next.type !== 'scalar' || next.source !== '')) {\n onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n }\n if (tab &&\n ((atNewline && tab.indent <= parentIndent) ||\n next?.type === 'block-map' ||\n next?.type === 'block-seq'))\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n anchor,\n tag,\n newlineAfterProp,\n end,\n start: start ?? end\n };\n}\n\nexport { resolveProps };\n","function containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case 'alias':\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n if (key.source.includes('\\n'))\n return true;\n if (key.end)\n for (const st of key.end)\n if (st.type === 'newline')\n return true;\n return false;\n case 'flow-collection':\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === 'newline')\n return true;\n if (it.sep)\n for (const st of it.sep)\n if (st.type === 'newline')\n return true;\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n}\n\nexport { containsNewline };\n","import { containsNewline } from './util-contains-newline.js';\n\nfunction flowIndentCheck(indent, fc, onError) {\n if (fc?.type === 'flow-collection') {\n const end = fc.end[0];\n if (end.indent === indent &&\n (end.source === ']' || end.source === '}') &&\n containsNewline(fc)) {\n const msg = 'Flow end indicator should be more indented than parent';\n onError(end, 'BAD_INDENT', msg, true);\n }\n }\n}\n\nexport { flowIndentCheck };\n","import { isScalar } from '../nodes/identity.js';\n\nfunction mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === 'function'\n ? uniqueKeys\n : (a, b) => a === b || (isScalar(a) && isScalar(b) && a.value === b.value);\n return items.some(pair => isEqual(pair.key, search));\n}\n\nexport { mapIncludes };\n","import { Pair } from '../nodes/Pair.js';\nimport { YAMLMap } from '../nodes/YAMLMap.js';\nimport { resolveProps } from './resolve-props.js';\nimport { containsNewline } from './util-contains-newline.js';\nimport { flowIndentCheck } from './util-flow-indent-check.js';\nimport { mapIncludes } from './util-map-includes.js';\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n // key properties\n const keyProps = resolveProps(start, {\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: bm.indent,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === 'block-seq')\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n else if ('indent' in key && key.indent !== bm.indent)\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += '\\n' + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.newlineAfterProp || containsNewline(key)) {\n onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n }\n }\n else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n // key value\n ctx.atKey = true;\n const keyStart = keyProps.end;\n const keyNode = key\n ? composeNode(ctx, key, keyProps, onError)\n : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n flowIndentCheck(bm.indent, key, onError);\n ctx.atKey = false;\n if (mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n // value properties\n const valueProps = resolveProps(sep ?? [], {\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: bm.indent,\n startOnNewline: !key || key.type === 'block-scalar'\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === 'block-map' && !valueProps.hasNewline)\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n if (ctx.options.strict &&\n keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n flowIndentCheck(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n else {\n // key with no value\n if (implicitKey)\n onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n}\n\nexport { resolveBlockMap };\n","import { YAMLSeq } from '../nodes/YAMLSeq.js';\nimport { resolveProps } from './resolve-props.js';\nimport { flowIndentCheck } from './util-flow-indent-check.js';\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = resolveProps(start, {\n indicator: 'seq-item-ind',\n next: value,\n offset,\n onError,\n parentIndent: bs.indent,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value?.type === 'block-seq')\n onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n else\n onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n }\n else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n flowIndentCheck(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n}\n\nexport { resolveBlockSeq };\n","function resolveEnd(end, offset, reqSpace, onError) {\n let comment = '';\n if (end) {\n let hasSpace = false;\n let sep = '';\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case 'space':\n hasSpace = true;\n break;\n case 'comment': {\n if (reqSpace && !hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = '';\n break;\n }\n case 'newline':\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n}\n\nexport { resolveEnd };\n","import { isPair } from '../nodes/identity.js';\nimport { Pair } from '../nodes/Pair.js';\nimport { YAMLMap } from '../nodes/YAMLMap.js';\nimport { YAMLSeq } from '../nodes/YAMLSeq.js';\nimport { resolveEnd } from './resolve-end.js';\nimport { resolveProps } from './resolve-props.js';\nimport { containsNewline } from './util-contains-newline.js';\nimport { mapIncludes } from './util-map-includes.js';\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === '{';\n const fcName = isMap ? 'flow map' : 'flow sequence';\n const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq));\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = resolveProps(start, {\n flow: fcName,\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += '\\n' + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && containsNewline(key))\n onError(key, // checked by containsNewline()\n 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n }\n else {\n if (!props.comma)\n onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = '';\n loop: for (const st of start) {\n switch (st.type) {\n case 'comma':\n case 'space':\n break;\n case 'comment':\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if (isPair(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += '\\n' + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n // item is a value in a seq\n // → key & sep are empty, start does not include ? or :\n const valueNode = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else {\n // item is a key+value pair\n // key value\n ctx.atKey = true;\n const keyStart = props.end;\n const keyNode = key\n ? composeNode(ctx, key, props, onError)\n : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n ctx.atKey = false;\n // value properties\n const valueProps = resolveProps(sep ?? [], {\n flow: fcName,\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === 'newline') {\n onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n }\n }\n else if (value) {\n if ('source' in value && value.source?.[0] === ':')\n onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : valueProps.found\n ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if (mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n map.items.push(pair);\n }\n else {\n const map = new YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n const endRange = (valueNode ?? keyNode).range;\n map.range = [keyNode.range[0], endRange[1], endRange[2]];\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? '}' : ']';\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce?.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot\n ? `${name} must end with a ${expectedEnd}`\n : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = resolveEnd(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += '\\n' + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n }\n else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n}\n\nexport { resolveFlowCollection };\n","import { isNode } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\nimport { YAMLMap } from '../nodes/YAMLMap.js';\nimport { YAMLSeq } from '../nodes/YAMLSeq.js';\nimport { resolveBlockMap } from './resolve-block-map.js';\nimport { resolveBlockSeq } from './resolve-block-seq.js';\nimport { resolveFlowCollection } from './resolve-flow-collection.js';\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === 'block-map'\n ? resolveBlockMap(CN, ctx, token, onError, tag)\n : token.type === 'block-seq'\n ? resolveBlockSeq(CN, ctx, token, onError, tag)\n : resolveFlowCollection(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n // If we got a tagName matching the class, or the tag name is '!',\n // then use the tagName from the node class used to create it.\n if (tagName === '!' || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n}\nfunction composeCollection(CN, ctx, token, props, onError) {\n const tagToken = props.tag;\n const tagName = !tagToken\n ? null\n : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n if (token.type === 'block-seq') {\n const { anchor, newlineAfterProp: nl } = props;\n const lastProp = anchor && tagToken\n ? anchor.offset > tagToken.offset\n ? anchor\n : tagToken\n : (anchor ?? tagToken);\n if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n const message = 'Missing newline after block sequence props';\n onError(lastProp, 'MISSING_CHAR', message);\n }\n }\n const expType = token.type === 'block-map'\n ? 'map'\n : token.type === 'block-seq'\n ? 'seq'\n : token.start.source === '{'\n ? 'map'\n : 'seq';\n // shortcut: check if it's a generic YAMLMap or YAMLSeq\n // before jumping into the custom tag logic.\n if (!tagToken ||\n !tagName ||\n tagName === '!' ||\n (tagName === YAMLMap.tagName && expType === 'map') ||\n (tagName === YAMLSeq.tagName && expType === 'seq')) {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt?.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n }\n else {\n if (kt) {\n onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);\n }\n else {\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n const node = isNode(res)\n ? res\n : new Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n}\n\nexport { composeCollection };\n","import { Scalar } from '../nodes/Scalar.js';\n\nfunction resolveBlockScalar(ctx, scalar, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n if (!header)\n return { value: '', type: null, comment: '', range: [start, start, start] };\n const type = header.mode === '>' ? Scalar.BLOCK_FOLDED : Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n // determine the end of content & start of chomping\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === '' || content === '\\r')\n chompStart = i;\n else\n break;\n }\n // shortcut for empty contents\n if (chompStart === 0) {\n const value = header.chomp === '+' && lines.length > 0\n ? '\\n'.repeat(Math.max(1, lines.length - 1))\n : '';\n let end = start + header.length;\n if (scalar.source)\n end += scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n // find the indentation level to trim from start\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === '' || content === '\\r') {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n }\n else {\n if (indent.length < trimIndent) {\n const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n onError(offset + indent.length, 'MISSING_CHAR', message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n if (trimIndent === 0 && !ctx.atRoot) {\n const message = 'Block scalar values in collections must be indented';\n onError(offset, 'BAD_INDENT', message);\n }\n break;\n }\n offset += indent.length + content.length + 1;\n }\n // include trailing more-indented empty lines in content\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = '';\n let sep = '';\n let prevMoreIndented = false;\n // leading whitespace is kept intact\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + '\\n';\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === '\\r';\n if (crlf)\n content = content.slice(0, -1);\n /* istanbul ignore if already caught in lexer */\n if (content && indent.length < trimIndent) {\n const src = header.indent\n ? 'explicit indentation indicator'\n : 'first line';\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n indent = '';\n }\n if (type === Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n }\n else if (indent.length > trimIndent || content[0] === '\\t') {\n // more-indented content within a folded block\n if (sep === ' ')\n sep = '\\n';\n else if (!prevMoreIndented && sep === '\\n')\n sep = '\\n\\n';\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n prevMoreIndented = true;\n }\n else if (content === '') {\n // empty line\n if (sep === '\\n')\n value += '\\n';\n else\n sep = '\\n';\n }\n else {\n value += sep + content;\n sep = ' ';\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case '-':\n break;\n case '+':\n for (let i = chompStart; i < lines.length; ++i)\n value += '\\n' + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== '\\n')\n value += '\\n';\n break;\n default:\n value += '\\n';\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n /* istanbul ignore if should not happen */\n if (props[0].type !== 'block-scalar-header') {\n onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = '';\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === '-' || ch === '+'))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = '';\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case 'space':\n hasSpace = true;\n // fallthrough\n case 'newline':\n length += token.source.length;\n break;\n case 'comment':\n if (strict && !hasSpace) {\n const message = 'Comments must be separated from other tokens by white space characters';\n onError(token, 'MISSING_CHAR', message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case 'error':\n onError(token, 'UNEXPECTED_TOKEN', token.message);\n length += token.source.length;\n break;\n /* istanbul ignore next should not happen */\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n const ts = token.source;\n if (ts && typeof ts === 'string')\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1]\n ? [m[1], first.slice(m[1].length)]\n : ['', first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n}\n\nexport { resolveBlockScalar };\n","import { Scalar } from '../nodes/Scalar.js';\nimport { resolveEnd } from './resolve-end.js';\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case 'scalar':\n _type = Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case 'single-quoted-scalar':\n _type = Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case 'double-quoted-scalar':\n _type = Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n /* istanbul ignore next should not happen */\n default:\n onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n return {\n value: '',\n type: null,\n comment: '',\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = resolveEnd(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n}\nfunction plainValue(source, onError) {\n let badChar = '';\n switch (source[0]) {\n /* istanbul ignore next should not happen */\n case '\\t':\n badChar = 'a tab character';\n break;\n case ',':\n badChar = 'flow indicator character ,';\n break;\n case '%':\n badChar = 'directive indicator character %';\n break;\n case '|':\n case '>': {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case '@':\n case '`': {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n return foldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n return foldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction foldLines(source) {\n /**\n * The negative lookbehind here and in the `re` RegExp is to\n * prevent causing a polynomial search time in certain cases.\n *\n * The try-catch is for Safari, which doesn't support this yet:\n * https://caniuse.com/js-regexp-lookbehind\n */\n let first, line;\n try {\n first = new RegExp('(.*?)(?<![ \\t])[ \\t]*\\r?\\n', 'sy');\n line = new RegExp('[ \\t]*(.*?)(?:(?<![ \\t])[ \\t]*)?\\r?\\n', 'sy');\n }\n catch {\n first = /(.*?)[ \\t]*\\r?\\n/sy;\n line = /[ \\t]*(.*?)[ \\t]*\\r?\\n/sy;\n }\n let match = first.exec(source);\n if (!match)\n return source;\n let res = match[1];\n let sep = ' ';\n let pos = first.lastIndex;\n line.lastIndex = pos;\n while ((match = line.exec(source))) {\n if (match[1] === '') {\n if (sep === '\\n')\n res += sep;\n else\n sep = '\\n';\n }\n else {\n res += sep + match[1];\n sep = ' ';\n }\n pos = line.lastIndex;\n }\n const last = /[ \\t]*(.*)/sy;\n last.lastIndex = pos;\n match = last.exec(source);\n return res + sep + (match?.[1] ?? '');\n}\nfunction doubleQuotedValue(source, onError) {\n let res = '';\n for (let i = 1; i < source.length - 1; ++i) {\n const ch = source[i];\n if (ch === '\\r' && source[i + 1] === '\\n')\n continue;\n if (ch === '\\n') {\n const { fold, offset } = foldNewline(source, i);\n res += fold;\n i = offset;\n }\n else if (ch === '\\\\') {\n let next = source[++i];\n const cc = escapeCodes[next];\n if (cc)\n res += cc;\n else if (next === '\\n') {\n // skip escaped newlines, but still trim the following line\n next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === '\\r' && source[i + 1] === '\\n') {\n // skip escaped CRLF newlines, but still trim the following line\n next = source[++i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === 'x' || next === 'u' || next === 'U') {\n const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;\n res += parseCharCode(source, i + 1, length, onError);\n i += length;\n }\n else {\n const raw = source.substr(i - 1, 2);\n onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n res += raw;\n }\n }\n else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n if (next !== '\\n' && !(next === '\\r' && source[i + 2] === '\\n'))\n res += i > wsStart ? source.slice(wsStart, i + 1) : ch;\n }\n else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n let fold = '';\n let ch = source[offset + 1];\n while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n if (ch === '\\r' && source[offset + 2] !== '\\n')\n break;\n if (ch === '\\n')\n fold += '\\n';\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = ' ';\n return { fold, offset };\n}\nconst escapeCodes = {\n '0': '\\0', // null character\n a: '\\x07', // bell character\n b: '\\b', // backspace\n e: '\\x1b', // escape character\n f: '\\f', // form feed\n n: '\\n', // line feed\n r: '\\r', // carriage return\n t: '\\t', // horizontal tab\n v: '\\v', // vertical tab\n N: '\\u0085', // Unicode next line\n _: '\\u00a0', // Unicode non-breaking space\n L: '\\u2028', // Unicode line separator\n P: '\\u2029', // Unicode paragraph separator\n ' ': ' ',\n '\"': '\"',\n '/': '/',\n '\\\\': '\\\\',\n '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n try {\n return String.fromCodePoint(code);\n }\n catch {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n return raw;\n }\n}\n\nexport { resolveFlowScalar };\n","import { isScalar, SCALAR } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\nimport { resolveBlockScalar } from './resolve-block-scalar.js';\nimport { resolveFlowScalar } from './resolve-flow-scalar.js';\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === 'block-scalar'\n ? resolveBlockScalar(ctx, token, onError)\n : resolveFlowScalar(token, ctx.options.strict, onError);\n const tagName = tagToken\n ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n : null;\n let tag;\n if (ctx.options.stringKeys && ctx.atKey) {\n tag = ctx.schema[SCALAR];\n }\n else if (tagName)\n tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);\n else if (token.type === 'scalar')\n tag = findScalarTagByTest(ctx, value, token, onError);\n else\n tag = ctx.schema[SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n scalar = isScalar(res) ? res : new Scalar(res);\n }\n catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n scalar = new Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === '!')\n return schema[SCALAR]; // non-specific tag\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n // Ensure that the known tag is available for stringifying,\n // but does not get used by default.\n schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n return kt;\n }\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n return schema[SCALAR];\n}\nfunction findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {\n const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) &&\n tag.test?.test(value)) || schema[SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n schema[SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n }\n }\n return tag;\n}\n\nexport { composeScalar };\n","function emptyScalarPosition(offset, before, pos) {\n if (before) {\n pos ?? (pos = before.length);\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case 'space':\n case 'comment':\n case 'newline':\n offset -= st.source.length;\n continue;\n }\n // Technically, an empty scalar is immediately after the last non-empty\n // node, but it's more useful to place it after any whitespace.\n st = before[++i];\n while (st?.type === 'space') {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n}\n\nexport { emptyScalarPosition };\n","import { Alias } from '../nodes/Alias.js';\nimport { isScalar } from '../nodes/identity.js';\nimport { composeCollection } from './compose-collection.js';\nimport { composeScalar } from './compose-scalar.js';\nimport { resolveEnd } from './resolve-end.js';\nimport { emptyScalarPosition } from './util-empty-scalar-position.js';\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n const atKey = ctx.atKey;\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case 'alias':\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n break;\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'block-scalar':\n node = composeScalar(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case 'block-map':\n case 'block-seq':\n case 'flow-collection':\n try {\n node = composeCollection(CN, ctx, token, props, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n }\n catch (error) {\n // Almost certainly here due to a stack overflow\n const message = error instanceof Error ? error.message : String(error);\n onError(token, 'RESOURCE_EXHAUSTION', message);\n }\n break;\n default: {\n const message = token.type === 'error'\n ? token.message\n : `Unsupported token (type: ${token.type})`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n isSrcToken = false;\n }\n }\n node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));\n if (anchor && node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n if (atKey &&\n ctx.options.stringKeys &&\n (!isScalar(node) ||\n typeof node.value !== 'string' ||\n (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) {\n const msg = 'With stringKeys, all keys must be strings';\n onError(tag ?? token, 'NON_STRING_KEY', msg);\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === 'scalar' && token.source === '')\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n // @ts-expect-error Type checking misses meaning of isSrcToken\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: 'scalar',\n offset: emptyScalarPosition(offset, before, pos),\n indent: -1,\n source: ''\n };\n const node = composeScalar(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new Alias(source.substring(1));\n if (alias.source === '')\n onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n if (alias.source.endsWith(':'))\n onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n const valueEnd = offset + source.length;\n const re = resolveEnd(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n}\n\nexport { composeEmptyNode, composeNode };\n","import { Document } from '../doc/Document.js';\nimport { composeNode, composeEmptyNode } from './compose-node.js';\nimport { resolveEnd } from './resolve-end.js';\nimport { resolveProps } from './resolve-props.js';\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new Document(undefined, opts);\n const ctx = {\n atKey: false,\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = resolveProps(start, {\n indicator: 'doc-start',\n next: value ?? end?.[0],\n offset,\n onError,\n parentIndent: 0,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value &&\n (value.type === 'block-map' || value.type === 'block-seq') &&\n !props.hasNewline)\n onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n }\n // @ts-expect-error If Contents is set, let's trust the user\n doc.contents = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = resolveEnd(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n}\n\nexport { composeDoc };\n","import { Directives } from '../doc/directives.js';\nimport { Document } from '../doc/Document.js';\nimport { YAMLWarning, YAMLParseError } from '../errors.js';\nimport { isCollection, isPair } from '../nodes/identity.js';\nimport { composeDoc } from './compose-doc.js';\nimport { resolveEnd } from './resolve-end.js';\n\nfunction getErrorPos(src) {\n if (typeof src === 'number')\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n let comment = '';\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case '#':\n comment +=\n (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n (source.substring(1) || ' ');\n atComment = true;\n afterEmptyLine = false;\n break;\n case '%':\n if (prelude[i + 1]?.[0] !== '#')\n i += 1;\n atComment = false;\n break;\n default:\n // This may be wrong after doc-end, but in that case it doesn't matter\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new YAMLWarning(pos, code, message));\n else\n this.errors.push(new YAMLParseError(pos, code, message));\n };\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n this.directives = new Directives({ version: options.version || '1.2' });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n //console.log({ dc: doc.comment, prelude, comment })\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n }\n else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n }\n else if (isCollection(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if (isPair(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n for (let i = 0; i < this.errors.length; ++i)\n doc.errors.push(this.errors[i]);\n for (let i = 0; i < this.warnings.length; ++i)\n doc.warnings.push(this.warnings[i]);\n }\n else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n switch (token.type) {\n case 'directive':\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case 'document': {\n const doc = composeDoc(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case 'byte-order-mark':\n case 'space':\n break;\n case 'comment':\n case 'newline':\n this.prelude.push(token.source);\n break;\n case 'error': {\n const msg = token.source\n ? `${token.message}: ${JSON.stringify(token.source)}`\n : token.message;\n const error = new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case 'doc-end': {\n if (!this.doc) {\n const msg = 'Unexpected doc-end without preceding document';\n this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n }\n else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new Document(undefined, opts);\n if (this.atDirectives)\n this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n}\n\nexport { Composer };\n","export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar.js';\nexport { stringify } from './cst-stringify.js';\nexport { visit } from './cst-visit.js';\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n (token.type === 'scalar' ||\n token.type === 'single-quoted-scalar' ||\n token.type === 'double-quoted-scalar' ||\n token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n switch (token) {\n case BOM:\n return '<BOM>';\n case DOCUMENT:\n return '<DOC>';\n case FLOW_END:\n return '<FLOW_END>';\n case SCALAR:\n return '<SCALAR>';\n default:\n return JSON.stringify(token);\n }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n switch (source) {\n case BOM:\n return 'byte-order-mark';\n case DOCUMENT:\n return 'doc-mode';\n case FLOW_END:\n return 'flow-error-end';\n case SCALAR:\n return 'scalar';\n case '---':\n return 'doc-start';\n case '...':\n return 'doc-end';\n case '':\n case '\\n':\n case '\\r\\n':\n return 'newline';\n case '-':\n return 'seq-item-ind';\n case '?':\n return 'explicit-key-ind';\n case ':':\n return 'map-value-ind';\n case '{':\n return 'flow-map-start';\n case '}':\n return 'flow-map-end';\n case '[':\n return 'flow-seq-start';\n case ']':\n return 'flow-seq-end';\n case ',':\n return 'comma';\n }\n switch (source[0]) {\n case ' ':\n case '\\t':\n return 'space';\n case '#':\n return 'comment';\n case '%':\n return 'directive-line';\n case '*':\n return 'alias';\n case '&':\n return 'anchor';\n case '!':\n return 'tag';\n case \"'\":\n return 'single-quoted-scalar';\n case '\"':\n return 'double-quoted-scalar';\n case '|':\n case '>':\n return 'block-scalar-header';\n }\n return null;\n}\n\nexport { BOM, DOCUMENT, FLOW_END, SCALAR, isCollection, isScalar, prettyToken, tokenType };\n","import { resolveBlockScalar } from '../compose/resolve-block-scalar.js';\nimport { resolveFlowScalar } from '../compose/resolve-flow-scalar.js';\nimport { YAMLParseError } from '../errors.js';\nimport { stringifyString } from '../stringify/stringifyString.js';\n\nfunction resolveAsScalar(token, strict = true, onError) {\n if (token) {\n const _onError = (pos, code, message) => {\n const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n if (onError)\n onError(offset, code, message);\n else\n throw new YAMLParseError([offset, offset + 1], code, message);\n };\n switch (token.type) {\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return resolveFlowScalar(token, strict, _onError);\n case 'block-scalar':\n return resolveBlockScalar({ options: { strict } }, token, _onError);\n }\n }\n return null;\n}\n/**\n * Create a new scalar token with `value`\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.indent The indent level of the token.\n * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.\n * @param context.offset The offset position of the token.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction createScalarToken(value, context) {\n const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;\n const source = stringifyString({ type, value }, {\n implicitKey,\n indent: indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n const end = context.end ?? [\n { type: 'newline', offset: -1, indent, source: '\\n' }\n ];\n switch (source[0]) {\n case '|':\n case '>': {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, end))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n return { type: 'block-scalar', offset, indent, props, source: body };\n }\n case '\"':\n return { type: 'double-quoted-scalar', offset, indent, source, end };\n case \"'\":\n return { type: 'single-quoted-scalar', offset, indent, source, end };\n default:\n return { type: 'scalar', offset, indent, source, end };\n }\n}\n/**\n * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.\n *\n * Best efforts are made to retain any comments previously associated with the `token`,\n * though all contents within a collection's `items` will be overwritten.\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.afterKey In most cases, values after a key should have an additional level of indentation.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction setScalarValue(token, value, context = {}) {\n let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n let indent = 'indent' in token ? token.indent : null;\n if (afterKey && typeof indent === 'number')\n indent += 2;\n if (!type)\n switch (token.type) {\n case 'single-quoted-scalar':\n type = 'QUOTE_SINGLE';\n break;\n case 'double-quoted-scalar':\n type = 'QUOTE_DOUBLE';\n break;\n case 'block-scalar': {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';\n break;\n }\n default:\n type = 'PLAIN';\n }\n const source = stringifyString({ type, value }, {\n implicitKey: implicitKey || indent === null,\n indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n switch (source[0]) {\n case '|':\n case '>':\n setBlockScalarValue(token, source);\n break;\n case '\"':\n setFlowScalarValue(token, source, 'double-quoted-scalar');\n break;\n case \"'\":\n setFlowScalarValue(token, source, 'single-quoted-scalar');\n break;\n default:\n setFlowScalarValue(token, source, 'scalar');\n }\n}\nfunction setBlockScalarValue(token, source) {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n if (token.type === 'block-scalar') {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n header.source = head;\n token.source = body;\n }\n else {\n const { offset } = token;\n const indent = 'indent' in token ? token.indent : -1;\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type: 'block-scalar', indent, props, source: body });\n }\n}\n/** @returns `true` if last token is a newline */\nfunction addEndtoBlockProps(props, end) {\n if (end)\n for (const st of end)\n switch (st.type) {\n case 'space':\n case 'comment':\n props.push(st);\n break;\n case 'newline':\n props.push(st);\n return true;\n }\n return false;\n}\nfunction setFlowScalarValue(token, source, type) {\n switch (token.type) {\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n token.type = type;\n token.source = source;\n break;\n case 'block-scalar': {\n const end = token.props.slice(1);\n let oa = source.length;\n if (token.props[0].type === 'block-scalar-header')\n oa -= token.props[0].source.length;\n for (const tok of end)\n tok.offset += oa;\n delete token.props;\n Object.assign(token, { type, source, end });\n break;\n }\n case 'block-map':\n case 'block-seq': {\n const offset = token.offset + source.length;\n const nl = { type: 'newline', offset, indent: token.indent, source: '\\n' };\n delete token.items;\n Object.assign(token, { type, source, end: [nl] });\n break;\n }\n default: {\n const indent = 'indent' in token ? token.indent : -1;\n const end = 'end' in token && Array.isArray(token.end)\n ? token.end.filter(st => st.type === 'space' ||\n st.type === 'comment' ||\n st.type === 'newline')\n : [];\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type, indent, source, end });\n }\n }\n}\n\nexport { createScalarToken, resolveAsScalar, setScalarValue };\n","/**\n * Stringify a CST document, token, or collection item\n *\n * Fair warning: This applies no validation whatsoever, and\n * simply concatenates the sources in their logical order.\n */\nconst stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);\nfunction stringifyToken(token) {\n switch (token.type) {\n case 'block-scalar': {\n let res = '';\n for (const tok of token.props)\n res += stringifyToken(tok);\n return res + token.source;\n }\n case 'block-map':\n case 'block-seq': {\n let res = '';\n for (const item of token.items)\n res += stringifyItem(item);\n return res;\n }\n case 'flow-collection': {\n let res = token.start.source;\n for (const item of token.items)\n res += stringifyItem(item);\n for (const st of token.end)\n res += st.source;\n return res;\n }\n case 'document': {\n let res = stringifyItem(token);\n if (token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n default: {\n let res = token.source;\n if ('end' in token && token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n }\n}\nfunction stringifyItem({ start, key, sep, value }) {\n let res = '';\n for (const st of start)\n res += st.source;\n if (key)\n res += stringifyToken(key);\n if (sep)\n for (const st of sep)\n res += st.source;\n if (value)\n res += stringifyToken(value);\n return res;\n}\n\nexport { stringify };\n","const BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n * - `item`: The current item, which included the following members:\n * - `start: SourceToken[]` – Source tokens before the key or value,\n * possibly including its anchor or tag.\n * - `key?: Token | null` – Set for pair values. May then be `null`, if\n * the key before the `:` separator is empty.\n * - `sep?: SourceToken[]` – Source tokens between the key and the value,\n * which should include the `:` map value indicator if `value` is set.\n * - `value?: Token` – The value of a sequence item, or of a map pair.\n * - `path`: The steps from the root to the current node, as an array of\n * `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this token, continue with\n * next sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current item, then continue with the next one\n * - `number`: Set the index of the next step. This is useful especially if\n * the index of the current token has changed.\n * - `function`: Define the next visitor for this item. After the original\n * visitor is called on item entry, next visitors are called after handling\n * a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n if ('type' in cst && cst.type === 'document')\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && 'items' in tok) {\n item = tok.items[index];\n }\n else\n return undefined;\n }\n return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && 'items' in coll)\n return coll;\n throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === 'symbol')\n return ctrl;\n for (const field of ['key', 'value']) {\n const token = item[field];\n if (token && 'items' in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === 'function' && field === 'key')\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\nexport { visit };\n","import { BOM, DOCUMENT, FLOW_END, SCALAR } from './cst.js';\n\n/*\nSTART -> stream\n\nstream\n directive -> line-end -> stream\n indent + line-end -> stream\n [else] -> line-start\n\nline-end\n comment -> line-end\n newline -> .\n input-end -> END\n\nline-start\n doc-start -> doc\n doc-end -> stream\n [else] -> indent -> block-start\n\nblock-start\n seq-item-start -> block-start\n explicit-key-start -> block-start\n map-value-start -> block-start\n [else] -> doc\n\ndoc\n line-end -> line-start\n spaces -> doc\n anchor -> doc\n tag -> doc\n flow-start -> flow -> doc\n flow-end -> error -> doc\n seq-item-start -> error -> doc\n explicit-key-start -> error -> doc\n map-value-start -> doc\n alias -> doc\n quote-start -> quoted-scalar -> doc\n block-scalar-header -> line-end -> block-scalar(min) -> line-start\n [else] -> plain-scalar(false, min) -> doc\n\nflow\n line-end -> flow\n spaces -> flow\n anchor -> flow\n tag -> flow\n flow-start -> flow -> flow\n flow-end -> .\n seq-item-start -> error -> flow\n explicit-key-start -> flow\n map-value-start -> flow\n alias -> flow\n quote-start -> quoted-scalar -> flow\n comma -> flow\n [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n quote-end -> .\n [else] -> quoted-scalar\n\nblock-scalar(min)\n newline + peek(indent < min) -> .\n [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n scalar-end(is-flow) -> .\n peek(newline + (indent < min)) -> .\n [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n switch (ch) {\n case undefined:\n case ' ':\n case '\\n':\n case '\\r':\n case '\\t':\n return true;\n default:\n return false;\n }\n}\nconst hexDigits = new Set('0123456789ABCDEFabcdef');\nconst tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\nconst flowIndicatorChars = new Set(',[]{}');\nconst invalidAnchorChars = new Set(' ,[]{}\\n\\r\\t');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n constructor() {\n /**\n * Flag indicating whether the end of the current buffer marks the end of\n * all input\n */\n this.atEnd = false;\n /**\n * Explicit indent set in block scalar header, as an offset from the current\n * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n * explicitly set.\n */\n this.blockScalarIndent = -1;\n /**\n * Block scalars that include a + (keep) chomping indicator in their header\n * include trailing empty lines, which are otherwise excluded from the\n * scalar's contents.\n */\n this.blockScalarKeep = false;\n /** Current input */\n this.buffer = '';\n /**\n * Flag noting whether the map value indicator : can immediately follow this\n * node within a flow context.\n */\n this.flowKey = false;\n /** Count of surrounding flow collection levels. */\n this.flowLevel = 0;\n /**\n * Minimum level of indentation required for next lines to be parsed as a\n * part of the current scalar value.\n */\n this.indentNext = 0;\n /** Indentation level of the current line. */\n this.indentValue = 0;\n /** Position of the next \\n character. */\n this.lineEndPos = null;\n /** Stores the state of the lexer if reaching the end of incpomplete input */\n this.next = null;\n /** A pointer to `buffer`; the current position of the lexer. */\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n if (typeof source !== 'string')\n throw TypeError('source is not a string');\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? 'stream';\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[++i];\n if (!ch || ch === '#' || ch === '\\n')\n return true;\n if (ch === '\\r')\n return this.buffer[i + 1] === '\\n';\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === ' ')\n ch = this.buffer[++indent + offset];\n if (ch === '\\r') {\n const next = this.buffer[indent + offset + 1];\n if (next === '\\n' || (!next && !this.atEnd))\n return offset + indent + 1;\n }\n return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n ? offset + indent\n : -1;\n }\n if (ch === '-' || ch === '.') {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n end = this.buffer.indexOf('\\n', this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === '\\r')\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case 'stream':\n return yield* this.parseStream();\n case 'line-start':\n return yield* this.parseLineStart();\n case 'block-start':\n return yield* this.parseBlockStart();\n case 'doc':\n return yield* this.parseDocument();\n case 'flow':\n return yield* this.parseFlowCollection();\n case 'quoted-scalar':\n return yield* this.parseQuotedScalar();\n case 'block-scalar':\n return yield* this.parseBlockScalar();\n case 'plain-scalar':\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext('stream');\n if (line[0] === BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === '%') {\n let dirEnd = line.length;\n let cs = line.indexOf('#');\n while (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === ' ' || ch === '\\t') {\n dirEnd = cs - 1;\n break;\n }\n else {\n cs = line.indexOf('#', cs + 1);\n }\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n); // possible comment\n this.pushNewline();\n return 'stream';\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return 'stream';\n }\n yield DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext('line-start');\n if (ch === '-' || ch === '.') {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext('line-start');\n const s = this.peek(3);\n if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return s === '---' ? 'doc' : 'stream';\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext('block-start');\n if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return 'block-start';\n }\n return 'doc';\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext('doc');\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case '#':\n yield* this.pushCount(line.length - n);\n // fallthrough\n case undefined:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return 'flow';\n case '}':\n case ']':\n // this is an error\n yield* this.pushCount(1);\n return 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'doc';\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case '|':\n case '>':\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n }\n else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext('flow');\n if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n (indent === 0 &&\n (line.startsWith('---') || line.startsWith('...')) &&\n isEmpty(line[3]))) {\n // Allowing for the terminal ] or } at the same (rather than greater)\n // indent level as the initial [ or { is technically invalid, but\n // failing here would be surprising to users.\n const atFlowEndMarker = indent === this.indentNext - 1 &&\n this.flowLevel === 1 &&\n (line[0] === ']' || line[0] === '}');\n if (!atFlowEndMarker) {\n // this is an error\n this.flowLevel = 0;\n yield FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === ',') {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case undefined:\n return 'flow';\n case '#':\n yield* this.pushCount(line.length - n);\n return 'flow';\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return 'flow';\n case '}':\n case ']':\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? 'flow' : 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'flow';\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case ':': {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === ',') {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return 'flow';\n }\n }\n // fallthrough\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n }\n else {\n // double-quote\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === '\\\\')\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n // Only looking for newlines within the quotes\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf('\\n', this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf('\\n', cs);\n }\n if (nl !== -1) {\n // this is an error caused by an unexpected unindent\n end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext('quoted-scalar');\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? 'flow' : 'doc';\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === '+')\n this.blockScalarKeep = true;\n else if (ch > '0' && ch <= '9')\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== '-')\n break;\n }\n return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n }\n *parseBlockScalar() {\n let nl = this.pos - 1; // may be -1 if this.pos === 0\n let indent = 0;\n let ch;\n loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n switch (ch) {\n case ' ':\n indent += 1;\n break;\n case '\\n':\n nl = i;\n indent = 0;\n break;\n case '\\r': {\n const next = this.buffer[i + 1];\n if (!next && !this.atEnd)\n return this.setNext('block-scalar');\n if (next === '\\n')\n break;\n } // fallthrough\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('block-scalar');\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else {\n this.indentNext =\n this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n }\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf('\\n', cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext('block-scalar');\n nl = this.buffer.length;\n }\n }\n // Trailing insufficiently indented tabs are invalid.\n // To catch that during parsing, we include them in the block scalar value.\n let i = nl + 1;\n ch = this.buffer[i];\n while (ch === ' ')\n ch = this.buffer[++i];\n if (ch === '\\t') {\n while (ch === '\\t' || ch === ' ' || ch === '\\r' || ch === '\\n')\n ch = this.buffer[++i];\n nl = i - 1;\n }\n else if (!this.blockScalarKeep) {\n do {\n let i = nl - 1;\n let ch = this.buffer[i];\n if (ch === '\\r')\n ch = this.buffer[--i];\n const lastChar = i; // Drop the line if last char not more indented\n while (ch === ' ')\n ch = this.buffer[--i];\n if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n nl = i;\n else\n break;\n } while (true);\n }\n yield SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while ((ch = this.buffer[++i])) {\n if (ch === ':') {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))\n break;\n end = i;\n }\n else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === '\\r') {\n if (next === '\\n') {\n i += 1;\n ch = '\\n';\n next = this.buffer[i + 1];\n }\n else\n end = i;\n }\n if (next === '#' || (inFlow && flowIndicatorChars.has(next)))\n break;\n if (ch === '\\n') {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n }\n }\n else {\n if (inFlow && flowIndicatorChars.has(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('plain-scalar');\n yield SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? 'flow' : 'doc';\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n }\n else if (allowEmpty)\n yield '';\n return 0;\n }\n *pushIndicators() {\n let n = 0;\n loop: while (true) {\n switch (this.charAt(0)) {\n case '!':\n n += yield* this.pushTag();\n n += yield* this.pushSpaces(true);\n continue loop;\n case '&':\n n += yield* this.pushUntil(isNotAnchorChar);\n n += yield* this.pushSpaces(true);\n continue loop;\n case '-': // this is an error\n case '?': // this is an error outside flow collections\n case ':': {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n continue loop;\n }\n }\n }\n break loop;\n }\n return n;\n }\n *pushTag() {\n if (this.charAt(1) === '<') {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== '>')\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n }\n else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.has(ch))\n ch = this.buffer[++i];\n else if (ch === '%' &&\n hexDigits.has(this.buffer[i + 1]) &&\n hexDigits.has(this.buffer[i + 2])) {\n ch = this.buffer[(i += 3)];\n }\n else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === '\\n')\n return yield* this.pushCount(1);\n else if (ch === '\\r' && this.charAt(1) === '\\n')\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === ' ' || (allowTabs && ch === '\\t'));\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n}\n\nexport { Lexer };\n","/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n constructor() {\n this.lineStarts = [];\n /**\n * Should be called in ascending order. Otherwise, call\n * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n */\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n /**\n * Performs a binary search and returns the 1-indexed { line, col }\n * position of `offset`. If `line === 0`, `addNewLine` has never been\n * called or `offset` is before the first known newline.\n */\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n}\n\nexport { LineCounter };\n","import { tokenType } from './cst.js';\nimport { Lexer } from './lexer.js';\n\nfunction includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n}\nfunction findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case 'space':\n case 'comment':\n case 'newline':\n break;\n default:\n return i;\n }\n }\n return -1;\n}\nfunction isFlowToken(token) {\n switch (token?.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'flow-collection':\n return true;\n default:\n return false;\n }\n}\nfunction getPrevProps(parent) {\n switch (parent.type) {\n case 'document':\n return parent.start;\n case 'block-map': {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case 'block-seq':\n return parent.items[parent.items.length - 1].start;\n /* istanbul ignore next should not happen */\n default:\n return [];\n }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case 'doc-start':\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n case 'newline':\n break loop;\n }\n }\n while (prev[++i]?.type === 'space') {\n /* loop */\n }\n return prev.splice(i, prev.length);\n}\nfunction arrayPushArray(target, source) {\n // May exhaust call stack with large `source` array\n if (source.length < 1e5)\n Array.prototype.push.apply(target, source);\n else\n for (let i = 0; i < source.length; ++i)\n target.push(source[i]);\n}\nfunction fixFlowSeqItems(fc) {\n if (fc.start.type === 'flow-seq-start') {\n for (const it of fc.items) {\n if (it.sep &&\n !it.value &&\n !includesToken(it.start, 'explicit-key-ind') &&\n !includesToken(it.sep, 'map-value-ind')) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n arrayPushArray(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n }\n else\n arrayPushArray(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n * // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n * const parser = new Parser()\n * for (const lexeme of lexer.lex(source))\n * yield* parser.next(lexeme)\n * yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n * // token: Token\n * }\n * ```\n */\nclass Parser {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n /** If true, space and sequence indicators count as indentation */\n this.atNewLine = true;\n /** If true, next token is a scalar value */\n this.atScalar = false;\n /** Current indentation level */\n this.indent = 0;\n /** Current offset since the start of parsing */\n this.offset = 0;\n /** On the same line with a block map key */\n this.onKeyLine = false;\n /** Top indicates the node that's currently being built */\n this.stack = [];\n /** The source of the current token, set in parse() */\n this.source = '';\n /** The type of the current token, set in parse() */\n this.type = '';\n // Must be defined after `next()`\n this.lexer = new Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = tokenType(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: 'error', offset: this.offset, message, source });\n this.offset += source.length;\n }\n else if (type === 'scalar') {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = 'scalar';\n }\n else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case 'newline':\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case 'space':\n if (this.atNewLine && source[0] === ' ')\n this.indent += source.length;\n break;\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case 'doc-mode':\n case 'flow-error-end':\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === 'doc-end' && top?.type !== 'doc-end') {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: 'doc-end',\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case 'document':\n return yield* this.document(top);\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return yield* this.scalar(top);\n case 'block-scalar':\n return yield* this.blockScalar(top);\n case 'block-map':\n return yield* this.blockMap(top);\n case 'block-seq':\n return yield* this.blockSequence(top);\n case 'flow-collection':\n return yield* this.flowCollection(top);\n case 'doc-end':\n return yield* this.documentEnd(top);\n }\n /* istanbul ignore next should not happen */\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n /* istanbul ignore if should not happen */\n if (!token) {\n const message = 'Tried to pop an empty stack';\n yield { type: 'error', offset: this.offset, source: '', message };\n }\n else if (this.stack.length === 0) {\n yield token;\n }\n else {\n const top = this.peek(1);\n if (token.type === 'block-scalar') {\n // Block scalars use their parent rather than header indent\n token.indent = 'indent' in top ? top.indent : 0;\n }\n else if (token.type === 'flow-collection' && top.type === 'document') {\n // Ignore all indent for top-level flow collections\n token.indent = 0;\n }\n if (token.type === 'flow-collection')\n fixFlowSeqItems(token);\n switch (top.type) {\n case 'document':\n top.value = token;\n break;\n case 'block-scalar':\n top.props.push(token); // error\n break;\n case 'block-map': {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n }\n else if (it.sep) {\n it.value = token;\n }\n else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !it.explicitKey;\n return;\n }\n break;\n }\n case 'block-seq': {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case 'flow-collection': {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === 'document' ||\n top.type === 'block-map' ||\n top.type === 'block-seq') &&\n (token.type === 'block-map' || token.type === 'block-seq')) {\n const last = token.items[token.items.length - 1];\n if (last &&\n !last.sep &&\n !last.value &&\n last.start.length > 0 &&\n findNonEmptyIndex(last.start) === -1 &&\n (token.indent === 0 ||\n last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n if (top.type === 'document')\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case 'directive-line':\n yield { type: 'directive', offset: this.offset, source: this.source };\n return;\n case 'byte-order-mark':\n case 'space':\n case 'comment':\n case 'newline':\n yield this.sourceToken;\n return;\n case 'doc-mode':\n case 'doc-start': {\n const doc = {\n type: 'document',\n offset: this.offset,\n start: []\n };\n if (this.type === 'doc-start')\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case 'doc-start': {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n }\n else\n doc.start.push(this.sourceToken);\n return;\n }\n case 'anchor':\n case 'tag':\n case 'space':\n case 'comment':\n case 'newline':\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === 'map-value-ind') {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n }\n else\n sep = [this.sourceToken];\n const map = {\n type: 'block-map',\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case 'space':\n case 'comment':\n case 'newline':\n scalar.props.push(this.sourceToken);\n return;\n case 'scalar':\n scalar.source = this.source;\n // block-scalar source includes trailing newline\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n yield* this.pop();\n break;\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n // it.sep is true-ish if pair already has key or : separator\n switch (this.type) {\n case 'newline':\n this.onKeyLine = false;\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'space':\n case 'comment':\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n const atNextItem = atMapIndent &&\n (it.sep || it.explicitKey) &&\n this.type !== 'seq-item-ind';\n // For empty nodes, assign newline-separated not indented empty tokens to following node\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case 'newline':\n nl.push(i);\n break;\n case 'space':\n break;\n case 'comment':\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case 'anchor':\n case 'tag':\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'explicit-key-ind':\n if (!it.sep && !it.explicitKey) {\n it.start.push(this.sourceToken);\n it.explicitKey = true;\n }\n else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start, explicitKey: true });\n }\n else {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken], explicitKey: true }]\n });\n }\n this.onKeyLine = true;\n return;\n case 'map-value-ind':\n if (it.explicitKey) {\n if (!it.sep) {\n if (includesToken(it.start, 'newline')) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else {\n const start = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n }\n else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n else if (isFlowToken(it.key) &&\n !includesToken(it.sep, 'newline')) {\n const start = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n // @ts-expect-error type guard is wrong here\n delete it.key;\n // @ts-expect-error type guard is wrong here\n delete it.sep;\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key, sep }]\n });\n }\n else if (start.length > 0) {\n // Not actually at next item\n it.sep = it.sep.concat(start, this.sourceToken);\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n this.stack.push(fs);\n }\n else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (bv.type === 'block-seq') {\n if (!it.explicitKey &&\n it.sep &&\n !includesToken(it.sep, 'newline')) {\n yield* this.pop({\n type: 'error',\n offset: this.offset,\n message: 'Unexpected block-seq-ind on same line with key',\n source: this.source\n });\n return;\n }\n }\n else if (atMapIndent) {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case 'newline':\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n }\n else\n it.start.push(this.sourceToken);\n return;\n case 'space':\n case 'comment':\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case 'anchor':\n case 'tag':\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case 'seq-item-ind':\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, 'seq-item-ind'))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === 'flow-error-end') {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top?.type === 'flow-collection');\n }\n else if (fc.end.length === 0) {\n switch (this.type) {\n case 'comma':\n case 'explicit-key-ind':\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case 'map-value-ind':\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case 'space':\n case 'comment':\n case 'newline':\n case 'anchor':\n case 'tag':\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case 'flow-map-end':\n case 'flow-seq-end':\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n /* istanbul ignore else should not happen */\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n }\n else {\n const parent = this.peek(2);\n if (parent.type === 'block-map' &&\n ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n (this.type === 'newline' &&\n !parent.items[parent.items.length - 1].sep))) {\n yield* this.pop();\n yield* this.step();\n }\n else if (this.type === 'map-value-ind' &&\n parent.type !== 'flow-collection') {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: 'block-map',\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return this.flowScalar(this.type);\n case 'block-scalar-header':\n return {\n type: 'block-scalar',\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: ''\n };\n case 'flow-map-start':\n case 'flow-seq-start':\n return {\n type: 'flow-collection',\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case 'seq-item-ind':\n return {\n type: 'block-seq',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case 'explicit-key-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, explicitKey: true }]\n };\n }\n case 'map-value-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== 'comment')\n return false;\n if (this.indent <= indent)\n return false;\n return start.every(st => st.type === 'newline' || st.type === 'space');\n }\n *documentEnd(docEnd) {\n if (this.type !== 'doc-mode') {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case 'comma':\n case 'doc-start':\n case 'doc-end':\n case 'flow-seq-end':\n case 'flow-map-end':\n case 'map-value-ind':\n yield* this.pop();\n yield* this.step();\n break;\n case 'newline':\n this.onKeyLine = false;\n // fallthrough\n case 'space':\n case 'comment':\n default:\n // all other values are errors\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n}\n\nexport { Parser };\n","import { Composer } from './compose/composer.js';\nimport { Document } from './doc/Document.js';\nimport { prettifyError, YAMLParseError } from './errors.js';\nimport { warn } from './log.js';\nimport { isDocument } from './nodes/identity.js';\nimport { LineCounter } from './parse/line-counter.js';\nimport { Parser } from './parse/parser.js';\n\nfunction parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter = options.lineCounter || (prettyErrors && new LineCounter()) || null;\n return { lineCounter, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n * EmptyStream and contain additional stream information. In\n * TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser = new Parser(lineCounter?.addNewLine);\n const composer = new Composer(options);\n const docs = Array.from(composer.compose(parser.parse(source)));\n if (prettyErrors && lineCounter)\n for (const doc of docs) {\n doc.errors.forEach(prettifyError(source, lineCounter));\n doc.warnings.forEach(prettifyError(source, lineCounter));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser = new Parser(lineCounter?.addNewLine);\n const composer = new Composer(options);\n // `doc` is always set by compose.end(true) at the very latest\n let doc = null;\n for (const _doc of composer.compose(parser.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== 'silent') {\n doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n break;\n }\n }\n if (prettyErrors && lineCounter) {\n doc.errors.forEach(prettifyError(source, lineCounter));\n doc.warnings.forEach(prettifyError(source, lineCounter));\n }\n return doc;\n}\nfunction parse(src, reviver, options) {\n let _reviver = undefined;\n if (typeof reviver === 'function') {\n _reviver = reviver;\n }\n else if (options === undefined && reviver && typeof reviver === 'object') {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach(warning => warn(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== 'silent')\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n }\n if (typeof options === 'string')\n options = options.length;\n if (typeof options === 'number') {\n const indent = Math.round(options);\n options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === undefined) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return undefined;\n }\n if (isDocument(value) && !_replacer)\n return value.toString(options);\n return new Document(value, _replacer, options).toString(options);\n}\n\nexport { parse, parseAllDocuments, parseDocument, stringify };\n","/**\n * Throw a given error.\n *\n * @param {Error|null|undefined} [error]\n * Maybe error.\n * @returns {asserts error is null|undefined}\n */\nexport function bail(error) {\n if (error) {\n throw error\n }\n}\n","export function deprecate(fn) {\n return fn\n}\n\nexport function equal() {}\n\nexport function ok() {}\n\nexport function unreachable() {}\n","export default function isPlainObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);\n}\n","// To do: remove `void`s\n// To do: remove `null` from output of our APIs, allow it as user APIs.\n\n/**\n * @typedef {(error?: Error | null | undefined, ...output: Array<any>) => void} Callback\n * Callback.\n *\n * @typedef {(...input: Array<any>) => any} Middleware\n * Ware.\n *\n * @typedef Pipeline\n * Pipeline.\n * @property {Run} run\n * Run the pipeline.\n * @property {Use} use\n * Add middleware.\n *\n * @typedef {(...input: Array<any>) => void} Run\n * Call all middleware.\n *\n * Calls `done` on completion with either an error or the output of the\n * last middleware.\n *\n * > 👉 **Note**: as the length of input defines whether async functions get a\n * > `next` function,\n * > it’s recommended to keep `input` at one value normally.\n\n *\n * @typedef {(fn: Middleware) => Pipeline} Use\n * Add middleware.\n */\n\n/**\n * Create new middleware.\n *\n * @returns {Pipeline}\n * Pipeline.\n */\nexport function trough() {\n /** @type {Array<Middleware>} */\n const fns = []\n /** @type {Pipeline} */\n const pipeline = {run, use}\n\n return pipeline\n\n /** @type {Run} */\n function run(...values) {\n let middlewareIndex = -1\n /** @type {Callback} */\n const callback = values.pop()\n\n if (typeof callback !== 'function') {\n throw new TypeError('Expected function as last argument, not ' + callback)\n }\n\n next(null, ...values)\n\n /**\n * Run the next `fn`, or we’re done.\n *\n * @param {Error | null | undefined} error\n * @param {Array<any>} output\n */\n function next(error, ...output) {\n const fn = fns[++middlewareIndex]\n let index = -1\n\n if (error) {\n callback(error)\n return\n }\n\n // Copy non-nullish input into values.\n while (++index < values.length) {\n if (output[index] === null || output[index] === undefined) {\n output[index] = values[index]\n }\n }\n\n // Save the newly created `output` for the next call.\n values = output\n\n // Next or done.\n if (fn) {\n wrap(fn, next)(...output)\n } else {\n callback(null, ...output)\n }\n }\n }\n\n /** @type {Use} */\n function use(middelware) {\n if (typeof middelware !== 'function') {\n throw new TypeError(\n 'Expected `middelware` to be a function, not ' + middelware\n )\n }\n\n fns.push(middelware)\n return pipeline\n }\n}\n\n/**\n * Wrap `middleware` into a uniform interface.\n *\n * You can pass all input to the resulting function.\n * `callback` is then called with the output of `middleware`.\n *\n * If `middleware` accepts more arguments than the later given in input,\n * an extra `done` function is passed to it after that input,\n * which must be called by `middleware`.\n *\n * The first value in `input` is the main input value.\n * All other input values are the rest input values.\n * The values given to `callback` are the input values,\n * merged with every non-nullish output value.\n *\n * * if `middleware` throws an error,\n * returns a promise that is rejected,\n * or calls the given `done` function with an error,\n * `callback` is called with that error\n * * if `middleware` returns a value or returns a promise that is resolved,\n * that value is the main output value\n * * if `middleware` calls `done`,\n * all non-nullish values except for the first one (the error) overwrite the\n * output values\n *\n * @param {Middleware} middleware\n * Function to wrap.\n * @param {Callback} callback\n * Callback called with the output of `middleware`.\n * @returns {Run}\n * Wrapped middleware.\n */\nexport function wrap(middleware, callback) {\n /** @type {boolean} */\n let called\n\n return wrapped\n\n /**\n * Call `middleware`.\n * @this {any}\n * @param {Array<any>} parameters\n * @returns {void}\n */\n function wrapped(...parameters) {\n const fnExpectsCallback = middleware.length > parameters.length\n /** @type {any} */\n let result\n\n if (fnExpectsCallback) {\n parameters.push(done)\n }\n\n try {\n result = middleware.apply(this, parameters)\n } catch (error) {\n const exception = /** @type {Error} */ (error)\n\n // Well, this is quite the pickle.\n // `middleware` received a callback and called it synchronously, but that\n // threw an error.\n // The only thing left to do is to throw the thing instead.\n if (fnExpectsCallback && called) {\n throw exception\n }\n\n return done(exception)\n }\n\n if (!fnExpectsCallback) {\n if (result && result.then && typeof result.then === 'function') {\n result.then(then, done)\n } else if (result instanceof Error) {\n done(result)\n } else {\n then(result)\n }\n }\n }\n\n /**\n * Call `callback`, only once.\n *\n * @type {Callback}\n */\n function done(error, ...output) {\n if (!called) {\n called = true\n callback(error, ...output)\n }\n }\n\n /**\n * Call `done` with one value.\n *\n * @param {any} [value]\n */\n function then(value) {\n done(null, value)\n }\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n */\n\n/**\n * Serialize the positional info of a point, position (start and end points),\n * or node.\n *\n * @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]\n * Node, position, or point.\n * @returns {string}\n * Pretty printed positional info of a node (`string`).\n *\n * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n * or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n * column, `s` for `start`, and `e` for end.\n * An empty string (`''`) is returned if the given value is neither `node`,\n * `position`, nor `point`.\n */\nexport function stringifyPosition(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if ('position' in value || 'type' in value) {\n return position(value.position)\n }\n\n // Position.\n if ('start' in value || 'end' in value) {\n return position(value)\n }\n\n // Point.\n if ('line' in value || 'column' in value) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\n/**\n * @param {Point | PointLike | null | undefined} point\n * @returns {string}\n */\nfunction point(point) {\n return index(point && point.line) + ':' + index(point && point.column)\n}\n\n/**\n * @param {Position | PositionLike | null | undefined} pos\n * @returns {string}\n */\nfunction position(pos) {\n return point(pos && pos.start) + '-' + point(pos && pos.end)\n}\n\n/**\n * @param {number | null | undefined} value\n * @returns {number}\n */\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n","/**\n * @import {Node, Point, Position} from 'unist'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n *\n * @typedef Options\n * Configuration.\n * @property {Array<Node> | null | undefined} [ancestors]\n * Stack of (inclusive) ancestor nodes surrounding the message (optional).\n * @property {Error | null | undefined} [cause]\n * Original error cause of the message (optional).\n * @property {Point | Position | null | undefined} [place]\n * Place of message (optional).\n * @property {string | null | undefined} [ruleId]\n * Category of message (optional, example: `'my-rule'`).\n * @property {string | null | undefined} [source]\n * Namespace of who sent the message (optional, example: `'my-package'`).\n */\n\nimport {stringifyPosition} from 'unist-util-stringify-position'\n\n/**\n * Message.\n */\nexport class VFileMessage extends Error {\n /**\n * Create a message for `reason`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {Options | null | undefined} [options]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns\n * Instance of `VFileMessage`.\n */\n // eslint-disable-next-line complexity\n constructor(causeOrReason, optionsOrParentOrPlace, origin) {\n super()\n\n if (typeof optionsOrParentOrPlace === 'string') {\n origin = optionsOrParentOrPlace\n optionsOrParentOrPlace = undefined\n }\n\n /** @type {string} */\n let reason = ''\n /** @type {Options} */\n let options = {}\n let legacyCause = false\n\n if (optionsOrParentOrPlace) {\n // Point.\n if (\n 'line' in optionsOrParentOrPlace &&\n 'column' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Position.\n else if (\n 'start' in optionsOrParentOrPlace &&\n 'end' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Node.\n else if ('type' in optionsOrParentOrPlace) {\n options = {\n ancestors: [optionsOrParentOrPlace],\n place: optionsOrParentOrPlace.position\n }\n }\n // Options.\n else {\n options = {...optionsOrParentOrPlace}\n }\n }\n\n if (typeof causeOrReason === 'string') {\n reason = causeOrReason\n }\n // Error.\n else if (!options.cause && causeOrReason) {\n legacyCause = true\n reason = causeOrReason.message\n options.cause = causeOrReason\n }\n\n if (!options.ruleId && !options.source && typeof origin === 'string') {\n const index = origin.indexOf(':')\n\n if (index === -1) {\n options.ruleId = origin\n } else {\n options.source = origin.slice(0, index)\n options.ruleId = origin.slice(index + 1)\n }\n }\n\n if (!options.place && options.ancestors && options.ancestors) {\n const parent = options.ancestors[options.ancestors.length - 1]\n\n if (parent) {\n options.place = parent.position\n }\n }\n\n const start =\n options.place && 'start' in options.place\n ? options.place.start\n : options.place\n\n /**\n * Stack of ancestor nodes surrounding the message.\n *\n * @type {Array<Node> | undefined}\n */\n this.ancestors = options.ancestors || undefined\n\n /**\n * Original error cause of the message.\n *\n * @type {Error | undefined}\n */\n this.cause = options.cause || undefined\n\n /**\n * Starting column of message.\n *\n * @type {number | undefined}\n */\n this.column = start ? start.column : undefined\n\n /**\n * State of problem.\n *\n * * `true` — error, file not usable\n * * `false` — warning, change may be needed\n * * `undefined` — change likely not needed\n *\n * @type {boolean | null | undefined}\n */\n this.fatal = undefined\n\n /**\n * Path of a file (used throughout the `VFile` ecosystem).\n *\n * @type {string | undefined}\n */\n this.file = ''\n\n // Field from `Error`.\n /**\n * Reason for message.\n *\n * @type {string}\n */\n this.message = reason\n\n /**\n * Starting line of error.\n *\n * @type {number | undefined}\n */\n this.line = start ? start.line : undefined\n\n // Field from `Error`.\n /**\n * Serialized positional info of message.\n *\n * On normal errors, this would be something like `ParseError`, buit in\n * `VFile` messages we use this space to show where an error happened.\n */\n this.name = stringifyPosition(options.place) || '1:1'\n\n /**\n * Place of message.\n *\n * @type {Point | Position | undefined}\n */\n this.place = options.place || undefined\n\n /**\n * Reason for message, should use markdown.\n *\n * @type {string}\n */\n this.reason = this.message\n\n /**\n * Category of message (example: `'my-rule'`).\n *\n * @type {string | undefined}\n */\n this.ruleId = options.ruleId || undefined\n\n /**\n * Namespace of message (example: `'my-package'`).\n *\n * @type {string | undefined}\n */\n this.source = options.source || undefined\n\n // Field from `Error`.\n /**\n * Stack of message.\n *\n * This is used by normal errors to show where something happened in\n * programming code, irrelevant for `VFile` messages,\n *\n * @type {string}\n */\n this.stack =\n legacyCause && options.cause && typeof options.cause.stack === 'string'\n ? options.cause.stack\n : ''\n\n // The following fields are “well known”.\n // Not standard.\n // Feel free to add other non-standard fields to your messages.\n\n /**\n * Specify the source value that’s being reported, which is deemed\n * incorrect.\n *\n * @type {string | undefined}\n */\n this.actual = undefined\n\n /**\n * Suggest acceptable values that can be used instead of `actual`.\n *\n * @type {Array<string> | undefined}\n */\n this.expected = undefined\n\n /**\n * Long form description of the message (you should use markdown).\n *\n * @type {string | undefined}\n */\n this.note = undefined\n\n /**\n * Link to docs for the message.\n *\n * > 👉 **Note**: this must be an absolute URL that can be passed as `x`\n * > to `new URL(x)`.\n *\n * @type {string | undefined}\n */\n this.url = undefined\n }\n}\n\nVFileMessage.prototype.file = ''\nVFileMessage.prototype.name = ''\nVFileMessage.prototype.reason = ''\nVFileMessage.prototype.message = ''\nVFileMessage.prototype.stack = ''\nVFileMessage.prototype.column = undefined\nVFileMessage.prototype.line = undefined\nVFileMessage.prototype.ancestors = undefined\nVFileMessage.prototype.cause = undefined\nVFileMessage.prototype.fatal = undefined\nVFileMessage.prototype.place = undefined\nVFileMessage.prototype.ruleId = undefined\nVFileMessage.prototype.source = undefined\n","// A derivative work based on:\n// <https://github.com/browserify/path-browserify>.\n// Which is licensed:\n//\n// MIT License\n//\n// Copyright (c) 2013 James Halliday\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A derivative work based on:\n//\n// Parts of that are extracted from Node’s internal `path` module:\n// <https://github.com/nodejs/node/blob/master/lib/path.js>.\n// Which is licensed:\n//\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexport const minpath = {basename, dirname, extname, join, sep: '/'}\n\n/* eslint-disable max-depth, complexity */\n\n/**\n * Get the basename from a path.\n *\n * @param {string} path\n * File path.\n * @param {string | null | undefined} [extname]\n * Extension to strip.\n * @returns {string}\n * Stem or basename.\n */\nfunction basename(path, extname) {\n if (extname !== undefined && typeof extname !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n let start = 0\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let seenNonSlash\n\n if (\n extname === undefined ||\n extname.length === 0 ||\n extname.length > path.length\n ) {\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // path component.\n seenNonSlash = true\n end = index + 1\n }\n }\n\n return end < 0 ? '' : path.slice(start, end)\n }\n\n if (extname === path) {\n return ''\n }\n\n let firstNonSlashEnd = -1\n let extnameIndex = extname.length - 1\n\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else {\n if (firstNonSlashEnd < 0) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching.\n seenNonSlash = true\n firstNonSlashEnd = index + 1\n }\n\n if (extnameIndex > -1) {\n // Try to match the explicit extension.\n if (path.codePointAt(index) === extname.codePointAt(extnameIndex--)) {\n if (extnameIndex < 0) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = index\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extnameIndex = -1\n end = firstNonSlashEnd\n }\n }\n }\n }\n\n if (start === end) {\n end = firstNonSlashEnd\n } else if (end < 0) {\n end = path.length\n }\n\n return path.slice(start, end)\n}\n\n/**\n * Get the dirname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\nfunction dirname(path) {\n assertPath(path)\n\n if (path.length === 0) {\n return '.'\n }\n\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n if (unmatchedSlash) {\n end = index\n break\n }\n } else if (!unmatchedSlash) {\n // We saw the first non-path separator\n unmatchedSlash = true\n }\n }\n\n return end < 0\n ? path.codePointAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.codePointAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\n/**\n * Get an extname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * Extname.\n */\nfunction extname(path) {\n assertPath(path)\n\n let index = path.length\n\n let end = -1\n let startPart = 0\n let startDot = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n let preDotState = 0\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n while (index--) {\n const code = path.codePointAt(index)\n\n if (code === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (unmatchedSlash) {\n startPart = index + 1\n break\n }\n\n continue\n }\n\n if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // extension.\n unmatchedSlash = true\n end = index + 1\n }\n\n if (code === 46 /* `.` */) {\n // If this is our first dot, mark it as the start of our extension.\n if (startDot < 0) {\n startDot = index\n } else if (preDotState !== 1) {\n preDotState = 1\n }\n } else if (startDot > -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension.\n preDotState = -1\n }\n }\n\n if (\n startDot < 0 ||\n end < 0 ||\n // We saw a non-dot character immediately before the dot.\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly `..`.\n (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n ) {\n return ''\n }\n\n return path.slice(startDot, end)\n}\n\n/**\n * Join segments from a path.\n *\n * @param {Array<string>} segments\n * Path segments.\n * @returns {string}\n * File path.\n */\nfunction join(...segments) {\n let index = -1\n /** @type {string | undefined} */\n let joined\n\n while (++index < segments.length) {\n assertPath(segments[index])\n\n if (segments[index]) {\n joined =\n joined === undefined ? segments[index] : joined + '/' + segments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n/**\n * Normalize a basic file path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n assertPath(path)\n\n const absolute = path.codePointAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n let value = normalizeString(path, !absolute)\n\n if (value.length === 0 && !absolute) {\n value = '.'\n }\n\n if (value.length > 0 && path.codePointAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n/**\n * Resolve `.` and `..` elements in a path with directory names.\n *\n * @param {string} path\n * File path.\n * @param {boolean} allowAboveRoot\n * Whether `..` can move above root.\n * @returns {string}\n * File path.\n */\nfunction normalizeString(path, allowAboveRoot) {\n let result = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let index = -1\n /** @type {number | undefined} */\n let code\n /** @type {number} */\n let lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.codePointAt(index)\n } else if (code === 47 /* `/` */) {\n break\n } else {\n code = 47 /* `/` */\n }\n\n if (code === 47 /* `/` */) {\n if (lastSlash === index - 1 || dots === 1) {\n // Empty.\n } else if (lastSlash !== index - 1 && dots === 2) {\n if (\n result.length < 2 ||\n lastSegmentLength !== 2 ||\n result.codePointAt(result.length - 1) !== 46 /* `.` */ ||\n result.codePointAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = ''\n lastSegmentLength = 0\n } else {\n result = result.slice(0, lastSlashIndex)\n lastSegmentLength = result.length - 1 - result.lastIndexOf('/')\n }\n\n lastSlash = index\n dots = 0\n continue\n }\n } else if (result.length > 0) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length > 0 ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length > 0) {\n result += '/' + path.slice(lastSlash + 1, index)\n } else {\n result = path.slice(lastSlash + 1, index)\n }\n\n lastSegmentLength = index - lastSlash - 1\n }\n\n lastSlash = index\n dots = 0\n } else if (code === 46 /* `.` */ && dots > -1) {\n dots++\n } else {\n dots = -1\n }\n }\n\n return result\n}\n\n/**\n * Make sure `path` is a string.\n *\n * @param {string} path\n * File path.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError(\n 'Path must be a string. Received ' + JSON.stringify(path)\n )\n }\n}\n\n/* eslint-enable max-depth, complexity */\n","// Somewhat based on:\n// <https://github.com/defunctzombie/node-process/blob/master/browser.js>.\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexport const minproc = {cwd}\n\nfunction cwd() {\n return '/'\n}\n","/**\n * Checks if a value has the shape of a WHATWG URL object.\n *\n * Using a symbol or instanceof would not be able to recognize URL objects\n * coming from other implementations (e.g. in Electron), so instead we are\n * checking some well known properties for a lack of a better test.\n *\n * We use `href` and `protocol` as they are the only properties that are\n * easy to retrieve and calculate due to the lazy nature of the getters.\n *\n * We check for auth attribute to distinguish legacy url instance with\n * WHATWG URL instance.\n *\n * @param {unknown} fileUrlOrPath\n * File path or URL.\n * @returns {fileUrlOrPath is URL}\n * Whether it’s a URL.\n */\n// From: <https://github.com/nodejs/node/blob/6a3403c/lib/internal/url.js#L720>\nexport function isUrl(fileUrlOrPath) {\n return Boolean(\n fileUrlOrPath !== null &&\n typeof fileUrlOrPath === 'object' &&\n 'href' in fileUrlOrPath &&\n fileUrlOrPath.href &&\n 'protocol' in fileUrlOrPath &&\n fileUrlOrPath.protocol &&\n // @ts-expect-error: indexing is fine.\n fileUrlOrPath.auth === undefined\n )\n}\n","import {isUrl} from './minurl.shared.js'\n\nexport {isUrl} from './minurl.shared.js'\n\n// See: <https://github.com/nodejs/node/blob/6a3403c/lib/internal/url.js>\n\n/**\n * @param {URL | string} path\n * File URL.\n * @returns {string}\n * File URL.\n */\nexport function urlToPath(path) {\n if (typeof path === 'string') {\n path = new URL(path)\n } else if (!isUrl(path)) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'The \"path\" argument must be of type string or an instance of URL. Received `' +\n path +\n '`'\n )\n error.code = 'ERR_INVALID_ARG_TYPE'\n throw error\n }\n\n if (path.protocol !== 'file:') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError('The URL must be of scheme file')\n error.code = 'ERR_INVALID_URL_SCHEME'\n throw error\n }\n\n return getPathFromURLPosix(path)\n}\n\n/**\n * Get a path from a POSIX URL.\n *\n * @param {URL} url\n * URL.\n * @returns {string}\n * File path.\n */\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL host must be \"localhost\" or empty on darwin'\n )\n error.code = 'ERR_INVALID_FILE_URL_HOST'\n throw error\n }\n\n const pathname = url.pathname\n let index = -1\n\n while (++index < pathname.length) {\n if (\n pathname.codePointAt(index) === 37 /* `%` */ &&\n pathname.codePointAt(index + 1) === 50 /* `2` */\n ) {\n const third = pathname.codePointAt(index + 2)\n if (third === 70 /* `F` */ || third === 102 /* `f` */) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL path must not include encoded / characters'\n )\n error.code = 'ERR_INVALID_FILE_URL_PATH'\n throw error\n }\n }\n }\n\n return decodeURIComponent(pathname)\n}\n","/**\n * @import {Node, Point, Position} from 'unist'\n * @import {Options as MessageOptions} from 'vfile-message'\n * @import {Compatible, Data, Map, Options, Value} from 'vfile'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n */\n\nimport {VFileMessage} from 'vfile-message'\nimport {minpath} from '#minpath'\nimport {minproc} from '#minproc'\nimport {urlToPath, isUrl} from '#minurl'\n\n/**\n * Order of setting (least specific to most), we need this because otherwise\n * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n * stem can be set.\n */\nconst order = /** @type {const} */ ([\n 'history',\n 'path',\n 'basename',\n 'stem',\n 'extname',\n 'dirname'\n])\n\nexport class VFile {\n /**\n * Create a new virtual file.\n *\n * `options` is treated as:\n *\n * * `string` or `Uint8Array` — `{value: options}`\n * * `URL` — `{path: options}`\n * * `VFile` — shallow copies its data over to the new file\n * * `object` — all fields are shallow copied over to the new file\n *\n * Path related fields are set in the following order (least specific to\n * most specific): `history`, `path`, `basename`, `stem`, `extname`,\n * `dirname`.\n *\n * You cannot set `dirname` or `extname` without setting either `history`,\n * `path`, `basename`, or `stem` too.\n *\n * @param {Compatible | null | undefined} [value]\n * File value.\n * @returns\n * New instance.\n */\n constructor(value) {\n /** @type {Options | VFile} */\n let options\n\n if (!value) {\n options = {}\n } else if (isUrl(value)) {\n options = {path: value}\n } else if (typeof value === 'string' || isUint8Array(value)) {\n options = {value}\n } else {\n options = value\n }\n\n /* eslint-disable no-unused-expressions */\n\n /**\n * Base of `path` (default: `process.cwd()` or `'/'` in browsers).\n *\n * @type {string}\n */\n // Prevent calling `cwd` (which could be expensive) if it’s not needed;\n // the empty string will be overridden in the next block.\n this.cwd = 'cwd' in options ? '' : minproc.cwd()\n\n /**\n * Place to store custom info (default: `{}`).\n *\n * It’s OK to store custom data directly on the file but moving it to\n * `data` is recommended.\n *\n * @type {Data}\n */\n this.data = {}\n\n /**\n * List of file paths the file moved between.\n *\n * The first is the original path and the last is the current path.\n *\n * @type {Array<string>}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array<VFileMessage>}\n */\n this.messages = []\n\n /**\n * Raw value.\n *\n * @type {Value}\n */\n this.value\n\n // The below are non-standard, they are “well-known”.\n // As in, used in several tools.\n /**\n * Source map.\n *\n * This type is equivalent to the `RawSourceMap` type from the `source-map`\n * module.\n *\n * @type {Map | null | undefined}\n */\n this.map\n\n /**\n * Custom, non-string, compiled, representation.\n *\n * This is used by unified to store non-string results.\n * One example is when turning markdown into React nodes.\n *\n * @type {unknown}\n */\n this.result\n\n /**\n * Whether a file was saved to disk.\n *\n * This is used by vfile reporters.\n *\n * @type {boolean}\n */\n this.stored\n /* eslint-enable no-unused-expressions */\n\n // Set path related properties in the correct order.\n let index = -1\n\n while (++index < order.length) {\n const field = order[index]\n\n // Note: we specifically use `in` instead of `hasOwnProperty` to accept\n // `vfile`s too.\n if (\n field in options &&\n options[field] !== undefined &&\n options[field] !== null\n ) {\n // @ts-expect-error: TS doesn’t understand basic reality.\n this[field] = field === 'history' ? [...options[field]] : options[field]\n }\n }\n\n /** @type {string} */\n let field\n\n // Set non-path related properties.\n for (field in options) {\n // @ts-expect-error: fine to set other things.\n if (!order.includes(field)) {\n // @ts-expect-error: fine to set other things.\n this[field] = options[field]\n }\n }\n }\n\n /**\n * Get the basename (including extname) (example: `'index.min.js'`).\n *\n * @returns {string | undefined}\n * Basename.\n */\n get basename() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path)\n : undefined\n }\n\n /**\n * Set basename (including extname) (`'index.min.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} basename\n * Basename.\n * @returns {undefined}\n * Nothing.\n */\n set basename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = minpath.join(this.dirname || '', basename)\n }\n\n /**\n * Get the parent path (example: `'~'`).\n *\n * @returns {string | undefined}\n * Dirname.\n */\n get dirname() {\n return typeof this.path === 'string'\n ? minpath.dirname(this.path)\n : undefined\n }\n\n /**\n * Set the parent path (example: `'~'`).\n *\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} dirname\n * Dirname.\n * @returns {undefined}\n * Nothing.\n */\n set dirname(dirname) {\n assertPath(this.basename, 'dirname')\n this.path = minpath.join(dirname || '', this.basename)\n }\n\n /**\n * Get the extname (including dot) (example: `'.js'`).\n *\n * @returns {string | undefined}\n * Extname.\n */\n get extname() {\n return typeof this.path === 'string'\n ? minpath.extname(this.path)\n : undefined\n }\n\n /**\n * Set the extname (including dot) (example: `'.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} extname\n * Extname.\n * @returns {undefined}\n * Nothing.\n */\n set extname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.dirname, 'extname')\n\n if (extname) {\n if (extname.codePointAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.includes('.', 1)) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = minpath.join(this.dirname, this.stem + (extname || ''))\n }\n\n /**\n * Get the full path (example: `'~/index.min.js'`).\n *\n * @returns {string}\n * Path.\n */\n get path() {\n return this.history[this.history.length - 1]\n }\n\n /**\n * Set the full path (example: `'~/index.min.js'`).\n *\n * Cannot be nullified.\n * You can set a file URL (a `URL` object with a `file:` protocol) which will\n * be turned into a path with `url.fileURLToPath`.\n *\n * @param {URL | string} path\n * Path.\n * @returns {undefined}\n * Nothing.\n */\n set path(path) {\n if (isUrl(path)) {\n path = urlToPath(path)\n }\n\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n }\n\n /**\n * Get the stem (basename w/o extname) (example: `'index.min'`).\n *\n * @returns {string | undefined}\n * Stem.\n */\n get stem() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path, this.extname)\n : undefined\n }\n\n /**\n * Set the stem (basename w/o extname) (example: `'index.min'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} stem\n * Stem.\n * @returns {undefined}\n * Nothing.\n */\n set stem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = minpath.join(this.dirname || '', stem + (this.extname || ''))\n }\n\n // Normal prototypal methods.\n /**\n * Create a fatal message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `true` (error; file not usable)\n * and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {never}\n * Never.\n * @throws {VFileMessage}\n * Message.\n */\n fail(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = true\n\n throw message\n }\n\n /**\n * Create an info message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `undefined` (info; change\n * likely not needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n info(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = undefined\n\n return message\n }\n\n /**\n * Create a message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `false` (warning; change may be\n * needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n message(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = new VFileMessage(\n // @ts-expect-error: the overloads are fine.\n causeOrReason,\n optionsOrParentOrPlace,\n origin\n )\n\n if (this.path) {\n message.name = this.path + ':' + message.name\n message.file = this.path\n }\n\n message.fatal = false\n\n this.messages.push(message)\n\n return message\n }\n\n /**\n * Serialize the file.\n *\n * > **Note**: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.\n *\n * @param {string | null | undefined} [encoding='utf8']\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (default: `'utf-8'`).\n * @returns {string}\n * Serialized file.\n */\n toString(encoding) {\n if (this.value === undefined) {\n return ''\n }\n\n if (typeof this.value === 'string') {\n return this.value\n }\n\n const decoder = new TextDecoder(encoding || undefined)\n return decoder.decode(this.value)\n }\n}\n\n/**\n * Assert that `part` is not a path (as in, does not contain `path.sep`).\n *\n * @param {string | null | undefined} part\n * File path part.\n * @param {string} name\n * Part name.\n * @returns {undefined}\n * Nothing.\n */\nfunction assertPart(part, name) {\n if (part && part.includes(minpath.sep)) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + minpath.sep + '`'\n )\n }\n}\n\n/**\n * Assert that `part` is not empty.\n *\n * @param {string | undefined} part\n * Thing.\n * @param {string} name\n * Part name.\n * @returns {asserts part is string}\n * Nothing.\n */\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n/**\n * Assert `path` exists.\n *\n * @param {string | undefined} path\n * Path.\n * @param {string} name\n * Dependency name.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","export const CallableInstance =\n /**\n * @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}\n */\n (\n /** @type {unknown} */\n (\n /**\n * @this {Function}\n * @param {string | symbol} property\n * @returns {(...parameters: Array<unknown>) => unknown}\n */\n function (property) {\n const self = this\n const constr = self.constructor\n const proto = /** @type {Record<string | symbol, Function>} */ (\n // Prototypes do exist.\n // type-coverage:ignore-next-line\n constr.prototype\n )\n const value = proto[property]\n /** @type {(...parameters: Array<unknown>) => unknown} */\n const apply = function () {\n return value.apply(apply, arguments)\n }\n\n Object.setPrototypeOf(apply, proto)\n\n // Not needed for us in `unified`: we only call this on the `copy`\n // function,\n // and we don't need to add its fields (`length`, `name`)\n // over.\n // See also: GH-246.\n // const names = Object.getOwnPropertyNames(value)\n //\n // for (const p of names) {\n // const descriptor = Object.getOwnPropertyDescriptor(value, p)\n // if (descriptor) Object.defineProperty(apply, p, descriptor)\n // }\n\n return apply\n }\n )\n )\n","/**\n * @typedef {import('trough').Pipeline} Pipeline\n *\n * @typedef {import('unist').Node} Node\n *\n * @typedef {import('vfile').Compatible} Compatible\n * @typedef {import('vfile').Value} Value\n *\n * @typedef {import('../index.js').CompileResultMap} CompileResultMap\n * @typedef {import('../index.js').Data} Data\n * @typedef {import('../index.js').Settings} Settings\n */\n\n/**\n * @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults\n * Acceptable results from compilers.\n *\n * To register custom results, add them to\n * {@linkcode CompileResultMap}.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the compiler receives (default: `Node`).\n * @template {CompileResults} [Result=CompileResults]\n * The thing that the compiler yields (default: `CompileResults`).\n * @callback Compiler\n * A **compiler** handles the compiling of a syntax tree to something else\n * (in most cases, text) (TypeScript type).\n *\n * It is used in the stringify phase and called with a {@linkcode Node}\n * and {@linkcode VFile} representation of the document to compile.\n * It should return the textual representation of the given tree (typically\n * `string`).\n *\n * > **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n * @param {Tree} tree\n * Tree to compile.\n * @param {VFile} file\n * File associated with `tree`.\n * @returns {Result}\n * New content: compiled text (`string` or `Uint8Array`, for `file.value`) or\n * something else (for `file.result`).\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the parser yields (default: `Node`)\n * @callback Parser\n * A **parser** handles the parsing of text to a syntax tree.\n *\n * It is used in the parse phase and is called with a `string` and\n * {@linkcode VFile} of the document to parse.\n * It must return the syntax tree representation of the given file\n * ({@linkcode Node}).\n * @param {string} document\n * Document to parse.\n * @param {VFile} file\n * File associated with `document`.\n * @returns {Tree}\n * Node representing the given file.\n */\n\n/**\n * @typedef {(\n * Plugin<Array<any>, any, any> |\n * PluginTuple<Array<any>, any, any> |\n * Preset\n * )} Pluggable\n * Union of the different ways to add plugins and settings.\n */\n\n/**\n * @typedef {Array<Pluggable>} PluggableList\n * List of plugins and presets.\n */\n\n// Note: we can’t use `callback` yet as it messes up `this`:\n// <https://github.com/microsoft/TypeScript/issues/55197>.\n/**\n * @template {Array<unknown>} [PluginParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=Node]\n * Value that is expected as input (default: `Node`).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node it expects.\n * * If the plugin sets a {@linkcode Parser}, this should be\n * `string`.\n * * If the plugin sets a {@linkcode Compiler}, this should be the\n * node it expects.\n * @template [Output=Input]\n * Value that is yielded as output (default: `Input`).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node that that yields.\n * * If the plugin sets a {@linkcode Parser}, this should be the\n * node that it yields.\n * * If the plugin sets a {@linkcode Compiler}, this should be\n * result it yields.\n * @typedef {(\n * (this: Processor, ...parameters: PluginParameters) =>\n * Input extends string ? // Parser.\n * Output extends Node | undefined ? undefined | void : never :\n * Output extends CompileResults ? // Compiler.\n * Input extends Node | undefined ? undefined | void : never :\n * Transformer<\n * Input extends Node ? Input : Node,\n * Output extends Node ? Output : Node\n * > | undefined | void\n * )} Plugin\n * Single plugin.\n *\n * Plugins configure the processors they are applied on in the following\n * ways:\n *\n * * they change the processor, such as the parser, the compiler, or by\n * configuring data\n * * they specify how to handle trees and files\n *\n * In practice, they are functions that can receive options and configure the\n * processor (`this`).\n *\n * > **Note**: plugins are called when the processor is *frozen*, not when\n * > they are applied.\n */\n\n/**\n * Tuple of a plugin and its configuration.\n *\n * The first item is a plugin, the rest are its parameters.\n *\n * @template {Array<unknown>} [TupleParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=undefined]\n * Value that is expected as input (optional).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node it expects.\n * * If the plugin sets a {@linkcode Parser}, this should be\n * `string`.\n * * If the plugin sets a {@linkcode Compiler}, this should be the\n * node it expects.\n * @template [Output=undefined] (optional).\n * Value that is yielded as output.\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node that that yields.\n * * If the plugin sets a {@linkcode Parser}, this should be the\n * node that it yields.\n * * If the plugin sets a {@linkcode Compiler}, this should be\n * result it yields.\n * @typedef {(\n * [\n * plugin: Plugin<TupleParameters, Input, Output>,\n * ...parameters: TupleParameters\n * ]\n * )} PluginTuple\n */\n\n/**\n * @typedef Preset\n * Sharable configuration.\n *\n * They can contain plugins and settings.\n * @property {PluggableList | undefined} [plugins]\n * List of plugins and presets (optional).\n * @property {Settings | undefined} [settings]\n * Shared settings for parsers and compilers (optional).\n */\n\n/**\n * @template {VFile} [File=VFile]\n * The file that the callback receives (default: `VFile`).\n * @callback ProcessCallback\n * Callback called when the process is done.\n *\n * Called with either an error or a result.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {File | undefined} [file]\n * Processed file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The tree that the callback receives (default: `Node`).\n * @callback RunCallback\n * Callback called when transformers are done.\n *\n * Called with either an error or results.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {Tree | undefined} [tree]\n * Transformed tree (optional).\n * @param {VFile | undefined} [file]\n * File (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Output=Node]\n * Node type that the transformer yields (default: `Node`).\n * @callback TransformCallback\n * Callback passed to transforms.\n *\n * If the signature of a `transformer` accepts a third argument, the\n * transformer may perform asynchronous operations, and must call it.\n * @param {Error | undefined} [error]\n * Fatal error to stop the process (optional).\n * @param {Output | undefined} [tree]\n * New, changed, tree (optional).\n * @param {VFile | undefined} [file]\n * New, changed, file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Input=Node]\n * Node type that the transformer expects (default: `Node`).\n * @template {Node} [Output=Input]\n * Node type that the transformer yields (default: `Input`).\n * @callback Transformer\n * Transformers handle syntax trees and files.\n *\n * They are functions that are called each time a syntax tree and file are\n * passed through the run phase.\n * When an error occurs in them (either because it’s thrown, returned,\n * rejected, or passed to `next`), the process stops.\n *\n * The run phase is handled by [`trough`][trough], see its documentation for\n * the exact semantics of these functions.\n *\n * > **Note**: you should likely ignore `next`: don’t accept it.\n * > it supports callback-style async work.\n * > But promises are likely easier to reason about.\n *\n * [trough]: https://github.com/wooorm/trough#function-fninput-next\n * @param {Input} tree\n * Tree to handle.\n * @param {VFile} file\n * File to handle.\n * @param {TransformCallback<Output>} next\n * Callback.\n * @returns {(\n * Promise<Output | undefined | void> |\n * Promise<never> | // For some reason this is needed separately.\n * Output |\n * Error |\n * undefined |\n * void\n * )}\n * If you accept `next`, nothing.\n * Otherwise:\n *\n * * `Error` — fatal error to stop the process\n * * `Promise<undefined>` or `undefined` — the next transformer keeps using\n * same tree\n * * `Promise<Node>` or `Node` — new, changed, tree\n */\n\n/**\n * @template {Node | undefined} ParseTree\n * Output of `parse`.\n * @template {Node | undefined} HeadTree\n * Input for `run`.\n * @template {Node | undefined} TailTree\n * Output for `run`.\n * @template {Node | undefined} CompileTree\n * Input of `stringify`.\n * @template {CompileResults | undefined} CompileResult\n * Output of `stringify`.\n * @template {Node | string | undefined} Input\n * Input of plugin.\n * @template Output\n * Output of plugin (optional).\n * @typedef {(\n * Input extends string\n * ? Output extends Node | undefined\n * ? // Parser.\n * Processor<\n * Output extends undefined ? ParseTree : Output,\n * HeadTree,\n * TailTree,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * : Output extends CompileResults\n * ? Input extends Node | undefined\n * ? // Compiler.\n * Processor<\n * ParseTree,\n * HeadTree,\n * TailTree,\n * Input extends undefined ? CompileTree : Input,\n * Output extends undefined ? CompileResult : Output\n * >\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * : Input extends Node | undefined\n * ? Output extends Node | undefined\n * ? // Transform.\n * Processor<\n * ParseTree,\n * HeadTree extends undefined ? Input : HeadTree,\n * Output extends undefined ? TailTree : Output,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * )} UsePlugin\n * Create a processor based on the input/output of a {@link Plugin plugin}.\n */\n\n/**\n * @template {CompileResults | undefined} Result\n * Node type that the transformer yields.\n * @typedef {(\n * Result extends Value | undefined ?\n * VFile :\n * VFile & {result: Result}\n * )} VFileWithOutput\n * Type to generate a {@linkcode VFile} corresponding to a compiler result.\n *\n * If a result that is not acceptable on a `VFile` is used, that will\n * be stored on the `result` field of {@linkcode VFile}.\n */\n\nimport {bail} from 'bail'\nimport extend from 'extend'\nimport {ok as assert} from 'devlop'\nimport isPlainObj from 'is-plain-obj'\nimport {trough} from 'trough'\nimport {VFile} from 'vfile'\nimport {CallableInstance} from './callable-instance.js'\n\n// To do: next major: drop `Compiler`, `Parser`: prefer lowercase.\n\n// To do: we could start yielding `never` in TS when a parser is missing and\n// `parse` is called.\n// Currently, we allow directly setting `processor.parser`, which is untyped.\n\nconst own = {}.hasOwnProperty\n\n/**\n * @template {Node | undefined} [ParseTree=undefined]\n * Output of `parse` (optional).\n * @template {Node | undefined} [HeadTree=undefined]\n * Input for `run` (optional).\n * @template {Node | undefined} [TailTree=undefined]\n * Output for `run` (optional).\n * @template {Node | undefined} [CompileTree=undefined]\n * Input of `stringify` (optional).\n * @template {CompileResults | undefined} [CompileResult=undefined]\n * Output of `stringify` (optional).\n * @extends {CallableInstance<[], Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>>}\n */\nexport class Processor extends CallableInstance {\n /**\n * Create a processor.\n */\n constructor() {\n // If `Processor()` is called (w/o new), `copy` is called instead.\n super('copy')\n\n /**\n * Compiler to use (deprecated).\n *\n * @deprecated\n * Use `compiler` instead.\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.Compiler = undefined\n\n /**\n * Parser to use (deprecated).\n *\n * @deprecated\n * Use `parser` instead.\n * @type {(\n * Parser<ParseTree extends undefined ? Node : ParseTree> |\n * undefined\n * )}\n */\n this.Parser = undefined\n\n // Note: the following fields are considered private.\n // However, they are needed for tests, and TSC generates an untyped\n // `private freezeIndex` field for, which trips `type-coverage` up.\n // Instead, we use `@deprecated` to visualize that they shouldn’t be used.\n /**\n * Internal list of configured plugins.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Array<PluginTuple<Array<unknown>>>}\n */\n this.attachers = []\n\n /**\n * Compiler to use.\n *\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.compiler = undefined\n\n /**\n * Internal state to track where we are while freezing.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {number}\n */\n this.freezeIndex = -1\n\n /**\n * Internal state to track whether we’re frozen.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {boolean | undefined}\n */\n this.frozen = undefined\n\n /**\n * Internal state.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Data}\n */\n this.namespace = {}\n\n /**\n * Parser to use.\n *\n * @type {(\n * Parser<ParseTree extends undefined ? Node : ParseTree> |\n * undefined\n * )}\n */\n this.parser = undefined\n\n /**\n * Internal list of configured transformers.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Pipeline}\n */\n this.transformers = trough()\n }\n\n /**\n * Copy a processor.\n *\n * @deprecated\n * This is a private internal method and should not be used.\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * New *unfrozen* processor ({@linkcode Processor}) that is\n * configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\n copy() {\n // Cast as the type parameters will be the same after attaching.\n const destination =\n /** @type {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>} */ (\n new Processor()\n )\n let index = -1\n\n while (++index < this.attachers.length) {\n const attacher = this.attachers[index]\n destination.use(...attacher)\n }\n\n destination.data(extend(true, {}, this.namespace))\n\n return destination\n }\n\n /**\n * Configure the processor with info available to all plugins.\n * Information is stored in an object.\n *\n * Typically, options can be given to a specific plugin, but sometimes it\n * makes sense to have information shared with several plugins.\n * For example, a list of HTML elements that are self-closing, which is\n * needed during all phases.\n *\n * > **Note**: setting information cannot occur on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * > **Note**: to register custom data in TypeScript, augment the\n * > {@linkcode Data} interface.\n *\n * @example\n * This example show how to get and set info:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * const processor = unified().data('alpha', 'bravo')\n *\n * processor.data('alpha') // => 'bravo'\n *\n * processor.data() // => {alpha: 'bravo'}\n *\n * processor.data({charlie: 'delta'})\n *\n * processor.data() // => {charlie: 'delta'}\n * ```\n *\n * @template {keyof Data} Key\n *\n * @overload\n * @returns {Data}\n *\n * @overload\n * @param {Data} dataset\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {Key} key\n * @returns {Data[Key]}\n *\n * @overload\n * @param {Key} key\n * @param {Data[Key]} value\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @param {Data | Key} [key]\n * Key to get or set, or entire dataset to set, or nothing to get the\n * entire dataset (optional).\n * @param {Data[Key]} [value]\n * Value to set (optional).\n * @returns {unknown}\n * The current processor when setting, the value at `key` when getting, or\n * the entire dataset when getting without key.\n */\n data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', this.frozen)\n this.namespace[key] = value\n return this\n }\n\n // Get `key`.\n return (own.call(this.namespace, key) && this.namespace[key]) || undefined\n }\n\n // Set space.\n if (key) {\n assertUnfrozen('data', this.frozen)\n this.namespace = key\n return this\n }\n\n // Get space.\n return this.namespace\n }\n\n /**\n * Freeze a processor.\n *\n * Frozen processors are meant to be extended and not to be configured\n * directly.\n *\n * When a processor is frozen it cannot be unfrozen.\n * New processors working the same way can be created by calling the\n * processor.\n *\n * It’s possible to freeze processors explicitly by calling `.freeze()`.\n * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,\n * `.stringify()`, `.process()`, or `.processSync()` are called.\n *\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * The current processor.\n */\n freeze() {\n if (this.frozen) {\n return this\n }\n\n // Cast so that we can type plugins easier.\n // Plugins are supposed to be usable on different processors, not just on\n // this exact processor.\n const self = /** @type {Processor} */ (/** @type {unknown} */ (this))\n\n while (++this.freezeIndex < this.attachers.length) {\n const [attacher, ...options] = this.attachers[this.freezeIndex]\n\n if (options[0] === false) {\n continue\n }\n\n if (options[0] === true) {\n options[0] = undefined\n }\n\n const transformer = attacher.call(self, ...options)\n\n if (typeof transformer === 'function') {\n this.transformers.use(transformer)\n }\n }\n\n this.frozen = true\n this.freezeIndex = Number.POSITIVE_INFINITY\n\n return this\n }\n\n /**\n * Parse text to a syntax tree.\n *\n * > **Note**: `parse` freezes the processor if not already *frozen*.\n *\n * > **Note**: `parse` performs the parse phase, not the run phase or other\n * > phases.\n *\n * @param {Compatible | undefined} [file]\n * file to parse (optional); typically `string` or `VFile`; any value\n * accepted as `x` in `new VFile(x)`.\n * @returns {ParseTree extends undefined ? Node : ParseTree}\n * Syntax tree representing `file`.\n */\n parse(file) {\n this.freeze()\n const realFile = vfile(file)\n const parser = this.parser || this.Parser\n assertParser('parse', parser)\n return parser(String(realFile), realFile)\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * > **Note**: `process` freezes the processor if not already *frozen*.\n *\n * > **Note**: `process` performs the parse, run, and stringify phases.\n *\n * @overload\n * @param {Compatible | undefined} file\n * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done\n * @returns {undefined}\n *\n * @overload\n * @param {Compatible | undefined} [file]\n * @returns {Promise<VFileWithOutput<CompileResult>>}\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`]; any value accepted as\n * `x` in `new VFile(x)`.\n * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]\n * Callback (optional).\n * @returns {Promise<VFile> | undefined}\n * Nothing if `done` is given.\n * Otherwise a promise, rejected with a fatal error or resolved with the\n * processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n process(file, done) {\n const self = this\n\n this.freeze()\n assertParser('process', this.parser || this.Parser)\n assertCompiler('process', this.compiler || this.Compiler)\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {((file: VFileWithOutput<CompileResult>) => undefined | void) | undefined} resolve\n * @param {(error: Error | undefined) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n const realFile = vfile(file)\n // Assume `ParseTree` (the result of the parser) matches `HeadTree` (the\n // input of the first transform).\n const parseTree =\n /** @type {HeadTree extends undefined ? Node : HeadTree} */ (\n /** @type {unknown} */ (self.parse(realFile))\n )\n\n self.run(parseTree, realFile, function (error, tree, file) {\n if (error || !tree || !file) {\n return realDone(error)\n }\n\n // Assume `TailTree` (the output of the last transform) matches\n // `CompileTree` (the input of the compiler).\n const compileTree =\n /** @type {CompileTree extends undefined ? Node : CompileTree} */ (\n /** @type {unknown} */ (tree)\n )\n\n const compileResult = self.stringify(compileTree, file)\n\n if (looksLikeAValue(compileResult)) {\n file.value = compileResult\n } else {\n file.result = compileResult\n }\n\n realDone(error, /** @type {VFileWithOutput<CompileResult>} */ (file))\n })\n\n /**\n * @param {Error | undefined} error\n * @param {VFileWithOutput<CompileResult> | undefined} [file]\n * @returns {undefined}\n */\n function realDone(error, file) {\n if (error || !file) {\n reject(error)\n } else if (resolve) {\n resolve(file)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, file)\n }\n }\n }\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `processSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `processSync` performs the parse, run, and stringify phases.\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`; any value accepted as\n * `x` in `new VFile(x)`.\n * @returns {VFileWithOutput<CompileResult>}\n * The processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n processSync(file) {\n /** @type {boolean} */\n let complete = false\n /** @type {VFileWithOutput<CompileResult> | undefined} */\n let result\n\n this.freeze()\n assertParser('processSync', this.parser || this.Parser)\n assertCompiler('processSync', this.compiler || this.Compiler)\n\n this.process(file, realDone)\n assertDone('processSync', 'process', complete)\n assert(result, 'we either bailed on an error or have a tree')\n\n return result\n\n /**\n * @type {ProcessCallback<VFileWithOutput<CompileResult>>}\n */\n function realDone(error, file) {\n complete = true\n bail(error)\n result = file\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * > **Note**: `run` freezes the processor if not already *frozen*.\n *\n * > **Note**: `run` performs the run phase, not other phases.\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} file\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} [file]\n * @returns {Promise<TailTree extends undefined ? Node : TailTree>}\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {(\n * RunCallback<TailTree extends undefined ? Node : TailTree> |\n * Compatible\n * )} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]\n * Callback (optional).\n * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}\n * Nothing if `done` is given.\n * Otherwise, a promise rejected with a fatal error or resolved with the\n * transformed tree.\n */\n run(tree, file, done) {\n assertNode(tree)\n this.freeze()\n\n const transformers = this.transformers\n\n if (!done && typeof file === 'function') {\n done = file\n file = undefined\n }\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {(\n * ((tree: TailTree extends undefined ? Node : TailTree) => undefined | void) |\n * undefined\n * )} resolve\n * @param {(error: Error) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n assert(\n typeof file !== 'function',\n '`file` can’t be a `done` anymore, we checked'\n )\n const realFile = vfile(file)\n transformers.run(tree, realFile, realDone)\n\n /**\n * @param {Error | undefined} error\n * @param {Node} outputTree\n * @param {VFile} file\n * @returns {undefined}\n */\n function realDone(error, outputTree, file) {\n const resultingTree =\n /** @type {TailTree extends undefined ? Node : TailTree} */ (\n outputTree || tree\n )\n\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(resultingTree)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, resultingTree, file)\n }\n }\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `runSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `runSync` performs the run phase, not other phases.\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {TailTree extends undefined ? Node : TailTree}\n * Transformed tree.\n */\n runSync(tree, file) {\n /** @type {boolean} */\n let complete = false\n /** @type {(TailTree extends undefined ? Node : TailTree) | undefined} */\n let result\n\n this.run(tree, file, realDone)\n\n assertDone('runSync', 'run', complete)\n assert(result, 'we either bailed on an error or have a tree')\n return result\n\n /**\n * @type {RunCallback<TailTree extends undefined ? Node : TailTree>}\n */\n function realDone(error, tree) {\n bail(error)\n result = tree\n complete = true\n }\n }\n\n /**\n * Compile a syntax tree.\n *\n * > **Note**: `stringify` freezes the processor if not already *frozen*.\n *\n * > **Note**: `stringify` performs the stringify phase, not the run phase\n * > or other phases.\n *\n * @param {CompileTree extends undefined ? Node : CompileTree} tree\n * Tree to compile.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {CompileResult extends undefined ? Value : CompileResult}\n * Textual representation of the tree (see note).\n *\n * > **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n stringify(tree, file) {\n this.freeze()\n const realFile = vfile(file)\n const compiler = this.compiler || this.Compiler\n assertCompiler('stringify', compiler)\n assertNode(tree)\n\n return compiler(tree, realFile)\n }\n\n /**\n * Configure the processor to use a plugin, a list of usable values, or a\n * preset.\n *\n * If the processor is already using a plugin, the previous plugin\n * configuration is changed based on the options that are passed in.\n * In other words, the plugin is not added a second time.\n *\n * > **Note**: `use` cannot be called on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * @example\n * There are many ways to pass plugins to `.use()`.\n * This example gives an overview:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * unified()\n * // Plugin with options:\n * .use(pluginA, {x: true, y: true})\n * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):\n * .use(pluginA, {y: false, z: true})\n * // Plugins:\n * .use([pluginB, pluginC])\n * // Two plugins, the second with options:\n * .use([pluginD, [pluginE, {}]])\n * // Preset with plugins and settings:\n * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})\n * // Settings only:\n * .use({settings: {position: false}})\n * ```\n *\n * @template {Array<unknown>} [Parameters=[]]\n * @template {Node | string | undefined} [Input=undefined]\n * @template [Output=Input]\n *\n * @overload\n * @param {Preset | null | undefined} [preset]\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {PluggableList} list\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {Plugin<Parameters, Input, Output>} plugin\n * @param {...(Parameters | [boolean])} parameters\n * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}\n *\n * @param {PluggableList | Plugin | Preset | null | undefined} value\n * Usable value.\n * @param {...unknown} parameters\n * Parameters, when a plugin is given as a usable value.\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * Current processor.\n */\n use(value, ...parameters) {\n const attachers = this.attachers\n const namespace = this.namespace\n\n assertUnfrozen('use', this.frozen)\n\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'function') {\n addPlugin(value, parameters)\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n addList(value)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n\n return this\n\n /**\n * @param {Pluggable} value\n * @returns {undefined}\n */\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value, [])\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n const [plugin, ...parameters] =\n /** @type {PluginTuple<Array<unknown>>} */ (value)\n addPlugin(plugin, parameters)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n }\n\n /**\n * @param {Preset} result\n * @returns {undefined}\n */\n function addPreset(result) {\n if (!('plugins' in result) && !('settings' in result)) {\n throw new Error(\n 'Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither'\n )\n }\n\n addList(result.plugins)\n\n if (result.settings) {\n namespace.settings = extend(true, namespace.settings, result.settings)\n }\n }\n\n /**\n * @param {PluggableList | null | undefined} plugins\n * @returns {undefined}\n */\n function addList(plugins) {\n let index = -1\n\n if (plugins === null || plugins === undefined) {\n // Empty.\n } else if (Array.isArray(plugins)) {\n while (++index < plugins.length) {\n const thing = plugins[index]\n add(thing)\n }\n } else {\n throw new TypeError('Expected a list of plugins, not `' + plugins + '`')\n }\n }\n\n /**\n * @param {Plugin} plugin\n * @param {Array<unknown>} parameters\n * @returns {undefined}\n */\n function addPlugin(plugin, parameters) {\n let index = -1\n let entryIndex = -1\n\n while (++index < attachers.length) {\n if (attachers[index][0] === plugin) {\n entryIndex = index\n break\n }\n }\n\n if (entryIndex === -1) {\n attachers.push([plugin, ...parameters])\n }\n // Only set if there was at least a `primary` value, otherwise we’d change\n // `arguments.length`.\n else if (parameters.length > 0) {\n let [primary, ...rest] = parameters\n const currentPrimary = attachers[entryIndex][1]\n if (isPlainObj(currentPrimary) && isPlainObj(primary)) {\n primary = extend(true, currentPrimary, primary)\n }\n\n attachers[entryIndex] = [plugin, primary, ...rest]\n }\n }\n }\n}\n\n// Note: this returns a *callable* instance.\n// That’s why it’s documented as a function.\n/**\n * Create a new processor.\n *\n * @example\n * This example shows how a new processor can be created (from `remark`) and linked\n * to **stdin**(4) and **stdout**(4).\n *\n * ```js\n * import process from 'node:process'\n * import concatStream from 'concat-stream'\n * import {remark} from 'remark'\n *\n * process.stdin.pipe(\n * concatStream(function (buf) {\n * process.stdout.write(String(remark().processSync(buf)))\n * })\n * )\n * ```\n *\n * @returns\n * New *unfrozen* processor (`processor`).\n *\n * This processor is configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\nexport const unified = new Processor().freeze()\n\n/**\n * Assert a parser is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Parser}\n */\nfunction assertParser(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `parser`')\n }\n}\n\n/**\n * Assert a compiler is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Compiler}\n */\nfunction assertCompiler(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `compiler`')\n }\n}\n\n/**\n * Assert the processor is not frozen.\n *\n * @param {string} name\n * @param {unknown} frozen\n * @returns {asserts frozen is false}\n */\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error(\n 'Cannot call `' +\n name +\n '` on a frozen processor.\\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.'\n )\n }\n}\n\n/**\n * Assert `node` is a unist node.\n *\n * @param {unknown} node\n * @returns {asserts node is Node}\n */\nfunction assertNode(node) {\n // `isPlainObj` unfortunately uses `any` instead of `unknown`.\n // type-coverage:ignore-next-line\n if (!isPlainObj(node) || typeof node.type !== 'string') {\n throw new TypeError('Expected node, got `' + node + '`')\n // Fine.\n }\n}\n\n/**\n * Assert that `complete` is `true`.\n *\n * @param {string} name\n * @param {string} asyncName\n * @param {unknown} complete\n * @returns {asserts complete is true}\n */\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error(\n '`' + name + '` finished async. Use `' + asyncName + '` instead'\n )\n }\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {VFile}\n */\nfunction vfile(value) {\n return looksLikeAVFile(value) ? value : new VFile(value)\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {value is VFile}\n */\nfunction looksLikeAVFile(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'message' in value &&\n 'messages' in value\n )\n}\n\n/**\n * @param {unknown} [value]\n * @returns {value is Value}\n */\nfunction looksLikeAValue(value) {\n return typeof value === 'string' || isUint8Array(value)\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","/**\n * @typedef {import('mdast').Nodes} Nodes\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [includeImageAlt=true]\n * Whether to use `alt` for `image`s (default: `true`).\n * @property {boolean | null | undefined} [includeHtml=true]\n * Whether to use `value` of HTML (default: `true`).\n */\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Get the text content of a node or list of nodes.\n *\n * Prefers the node’s plain-text fields, otherwise serializes its children,\n * and if the given value is an array, serialize the nodes in it.\n *\n * @param {unknown} [value]\n * Thing to serialize, typically `Node`.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized `value`.\n */\nexport function toString(value, options) {\n const settings = options || emptyOptions\n const includeImageAlt =\n typeof settings.includeImageAlt === 'boolean'\n ? settings.includeImageAlt\n : true\n const includeHtml =\n typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true\n\n return one(value, includeImageAlt, includeHtml)\n}\n\n/**\n * One node or several nodes.\n *\n * @param {unknown} value\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized node.\n */\nfunction one(value, includeImageAlt, includeHtml) {\n if (node(value)) {\n if ('value' in value) {\n return value.type === 'html' && !includeHtml ? '' : value.value\n }\n\n if (includeImageAlt && 'alt' in value && value.alt) {\n return value.alt\n }\n\n if ('children' in value) {\n return all(value.children, includeImageAlt, includeHtml)\n }\n }\n\n if (Array.isArray(value)) {\n return all(value, includeImageAlt, includeHtml)\n }\n\n return ''\n}\n\n/**\n * Serialize a list of nodes.\n *\n * @param {Array<unknown>} values\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized nodes.\n */\nfunction all(values, includeImageAlt, includeHtml) {\n /** @type {Array<string>} */\n const result = []\n let index = -1\n\n while (++index < values.length) {\n result[index] = one(values[index], includeImageAlt, includeHtml)\n }\n\n return result.join('')\n}\n\n/**\n * Check if `value` looks like a node.\n *\n * @param {unknown} value\n * Thing.\n * @returns {value is Nodes}\n * Whether `value` is a node.\n */\nfunction node(value) {\n return Boolean(value && typeof value === 'object')\n}\n","/// <reference lib=\"dom\" />\n\n/* global document */\n\nconst element = document.createElement('i')\n\n/**\n * @param {string} value\n * @returns {string | false}\n */\nexport function decodeNamedCharacterReference(value) {\n const characterReference = '&' + value + ';'\n element.innerHTML = characterReference\n const character = element.textContent\n\n // Some named character references do not require the closing semicolon\n // (`¬`, for instance), which leads to situations where parsing the assumed\n // named reference of `¬it;` will result in the string `¬it;`.\n // When we encounter a trailing semicolon after parsing, and the character\n // reference to decode was not a semicolon (`;`), we can assume that the\n // matching was not complete.\n if (\n character.charCodeAt(character.length - 1) === 59 /* `;` */ &&\n value !== 'semi'\n ) {\n return false\n }\n\n // If the decoded string is equal to the input, the character reference was\n // not valid.\n return character === characterReference ? false : character\n}\n","/**\n * Like `Array#splice`, but smarter for giant arrays.\n *\n * `Array#splice` takes all items to be inserted as individual argument which\n * causes a stack overflow in V8 when trying to insert 100k items for instance.\n *\n * Otherwise, this does not return the removed items, and takes `items` as an\n * array instead of rest parameters.\n *\n * @template {unknown} T\n * Item type.\n * @param {Array<T>} list\n * List to operate on.\n * @param {number} start\n * Index to remove/insert at (can be negative).\n * @param {number} remove\n * Number of items to remove.\n * @param {Array<T>} items\n * Items to inject into `list`.\n * @returns {undefined}\n * Nothing.\n */\nexport function splice(list, start, remove, items) {\n const end = list.length;\n let chunkStart = 0;\n /** @type {Array<unknown>} */\n let parameters;\n\n // Make start between zero and `end` (included).\n if (start < 0) {\n start = -start > end ? 0 : end + start;\n } else {\n start = start > end ? end : start;\n }\n remove = remove > 0 ? remove : 0;\n\n // No need to chunk the items if there’s only a couple (10k) items.\n if (items.length < 10000) {\n parameters = Array.from(items);\n parameters.unshift(start, remove);\n // @ts-expect-error Hush, it’s fine.\n list.splice(...parameters);\n } else {\n // Delete `remove` items starting from `start`\n if (remove) list.splice(start, remove);\n\n // Insert the items in chunks to not cause stack overflows.\n while (chunkStart < items.length) {\n parameters = items.slice(chunkStart, chunkStart + 10000);\n parameters.unshift(start, 0);\n // @ts-expect-error Hush, it’s fine.\n list.splice(...parameters);\n chunkStart += 10000;\n start += 10000;\n }\n }\n}\n\n/**\n * Append `items` (an array) at the end of `list` (another array).\n * When `list` was empty, returns `items` instead.\n *\n * This prevents a potentially expensive operation when `list` is empty,\n * and adds items in batches to prevent V8 from hanging.\n *\n * @template {unknown} T\n * Item type.\n * @param {Array<T>} list\n * List to operate on.\n * @param {Array<T>} items\n * Items to add to `list`.\n * @returns {Array<T>}\n * Either `list` or `items`.\n */\nexport function push(list, items) {\n if (list.length > 0) {\n splice(list, list.length, 0, items);\n return list;\n }\n return items;\n}","/**\n * @import {\n * Extension,\n * Handles,\n * HtmlExtension,\n * NormalizedExtension\n * } from 'micromark-util-types'\n */\n\nimport {splice} from 'micromark-util-chunked'\n\nconst hasOwnProperty = {}.hasOwnProperty\n\n/**\n * Combine multiple syntax extensions into one.\n *\n * @param {ReadonlyArray<Extension>} extensions\n * List of syntax extensions.\n * @returns {NormalizedExtension}\n * A single combined extension.\n */\nexport function combineExtensions(extensions) {\n /** @type {NormalizedExtension} */\n const all = {}\n let index = -1\n\n while (++index < extensions.length) {\n syntaxExtension(all, extensions[index])\n }\n\n return all\n}\n\n/**\n * Merge `extension` into `all`.\n *\n * @param {NormalizedExtension} all\n * Extension to merge into.\n * @param {Extension} extension\n * Extension to merge.\n * @returns {undefined}\n * Nothing.\n */\nfunction syntaxExtension(all, extension) {\n /** @type {keyof Extension} */\n let hook\n\n for (hook in extension) {\n const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined\n /** @type {Record<string, unknown>} */\n const left = maybe || (all[hook] = {})\n /** @type {Record<string, unknown> | undefined} */\n const right = extension[hook]\n /** @type {string} */\n let code\n\n if (right) {\n for (code in right) {\n if (!hasOwnProperty.call(left, code)) left[code] = []\n const value = right[code]\n constructs(\n // @ts-expect-error Looks like a list.\n left[code],\n Array.isArray(value) ? value : value ? [value] : []\n )\n }\n }\n }\n}\n\n/**\n * Merge `list` into `existing` (both lists of constructs).\n * Mutates `existing`.\n *\n * @param {Array<unknown>} existing\n * List of constructs to merge into.\n * @param {Array<unknown>} list\n * List of constructs to merge.\n * @returns {undefined}\n * Nothing.\n */\nfunction constructs(existing, list) {\n let index = -1\n /** @type {Array<unknown>} */\n const before = []\n\n while (++index < list.length) {\n // @ts-expect-error Looks like an object.\n ;(list[index].add === 'after' ? existing : before).push(list[index])\n }\n\n splice(existing, 0, 0, before)\n}\n\n/**\n * Combine multiple HTML extensions into one.\n *\n * @param {ReadonlyArray<HtmlExtension>} htmlExtensions\n * List of HTML extensions.\n * @returns {HtmlExtension}\n * Single combined HTML extension.\n */\nexport function combineHtmlExtensions(htmlExtensions) {\n /** @type {HtmlExtension} */\n const handlers = {}\n let index = -1\n\n while (++index < htmlExtensions.length) {\n htmlExtension(handlers, htmlExtensions[index])\n }\n\n return handlers\n}\n\n/**\n * Merge `extension` into `all`.\n *\n * @param {HtmlExtension} all\n * Extension to merge into.\n * @param {HtmlExtension} extension\n * Extension to merge.\n * @returns {undefined}\n * Nothing.\n */\nfunction htmlExtension(all, extension) {\n /** @type {keyof HtmlExtension} */\n let hook\n\n for (hook in extension) {\n const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined\n const left = maybe || (all[hook] = {})\n const right = extension[hook]\n /** @type {keyof Handles} */\n let type\n\n if (right) {\n for (type in right) {\n // @ts-expect-error assume document vs regular handler are managed correctly.\n left[type] = right[type]\n }\n }\n }\n}\n","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base);\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 || code === 11 || code > 13 && code < 32 ||\n // Control character (DEL) of C0, and C1 controls.\n code > 126 && code < 160 ||\n // Lone high surrogates and low surrogates.\n code > 55_295 && code < 57_344 ||\n // Noncharacters.\n code > 64_975 && code < 65_008 || /* eslint-disable no-bitwise */\n (code & 65_535) === 65_535 || (code & 65_535) === 65_534 || /* eslint-enable no-bitwise */\n // Out of range\n code > 1_114_111) {\n return \"\\uFFFD\";\n }\n return String.fromCodePoint(code);\n}","const characterReferences = {'\"': 'quot', '&': 'amp', '<': 'lt', '>': 'gt'}\n\n/**\n * Encode only the dangerous HTML characters.\n *\n * This ensures that certain characters which have special meaning in HTML are\n * dealt with.\n * Technically, we can skip `>` and `\"` in many cases, but CM includes them.\n *\n * @param {string} value\n * Value to encode.\n * @returns {string}\n * Encoded value.\n */\nexport function encode(value) {\n return value.replace(/[\"&<>]/g, replace)\n\n /**\n * @param {string} value\n * Value to replace.\n * @returns {string}\n * Encoded value.\n */\n function replace(value) {\n return (\n '&' +\n characterReferences[\n /** @type {keyof typeof characterReferences} */ (value)\n ] +\n ';'\n )\n }\n}\n","/**\n * Normalize an identifier (as found in references, definitions).\n *\n * Collapses markdown whitespace, trim, and then lower- and uppercase.\n *\n * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their\n * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different\n * uppercase character (U+0398 (`Θ`)).\n * So, to get a canonical form, we perform both lower- and uppercase.\n *\n * Using uppercase last makes sure keys will never interact with default\n * prototypal values (such as `constructor`): nothing in the prototype of\n * `Object` is uppercase.\n *\n * @param {string} value\n * Identifier to normalize.\n * @returns {string}\n * Normalized identifier.\n */\nexport function normalizeIdentifier(value) {\n return value\n // Collapse markdown whitespace.\n .replace(/[\\t\\n\\r ]+/g, \" \")\n // Trim.\n .replace(/^ | $/g, '')\n // Some characters are considered “uppercase”, but if their lowercase\n // counterpart is uppercased will result in a different uppercase\n // character.\n // Hence, to get that form, we perform both lower- and uppercase.\n // Upper case makes sure keys will not interact with default prototypal\n // methods: no method is uppercase.\n .toLowerCase().toUpperCase();\n}","/**\n * @import {Code} from 'micromark-util-types'\n */\n\n/**\n * Check whether the character code represents an ASCII alpha (`a` through `z`,\n * case insensitive).\n *\n * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.\n *\n * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)\n * to U+005A (`Z`).\n *\n * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)\n * to U+007A (`z`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiAlpha = regexCheck(/[A-Za-z]/);\n\n/**\n * Check whether the character code represents an ASCII alphanumeric (`a`\n * through `z`, case insensitive, or `0` through `9`).\n *\n * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha\n * (see `asciiAlpha`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/);\n\n/**\n * Check whether the character code represents an ASCII atext.\n *\n * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in\n * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),\n * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F\n * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E\n * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE\n * (`{`) to U+007E TILDE (`~`).\n *\n * See:\n * **\\[RFC5322]**:\n * [Internet Message Format](https://tools.ietf.org/html/rfc5322).\n * P. Resnick.\n * IETF.\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiAtext = regexCheck(/[#-'*+\\--9=?A-Z^-~]/);\n\n/**\n * Check whether a character code is an ASCII control character.\n *\n * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)\n * to U+001F (US), or U+007F (DEL).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code !== null && (code < 32 || code === 127)\n );\n}\n\n/**\n * Check whether the character code represents an ASCII digit (`0` through `9`).\n *\n * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to\n * U+0039 (`9`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiDigit = regexCheck(/\\d/);\n\n/**\n * Check whether the character code represents an ASCII hex digit (`a` through\n * `f`, case insensitive, or `0` through `9`).\n *\n * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex\n * digit, or an ASCII lower hex digit.\n *\n * An **ASCII upper hex digit** is a character in the inclusive range U+0041\n * (`A`) to U+0046 (`F`).\n *\n * An **ASCII lower hex digit** is a character in the inclusive range U+0061\n * (`a`) to U+0066 (`f`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiHexDigit = regexCheck(/[\\dA-Fa-f]/);\n\n/**\n * Check whether the character code represents ASCII punctuation.\n *\n * An **ASCII punctuation** is a character in the inclusive ranges U+0021\n * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT\n * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT\n * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);\n\n/**\n * Check whether a character code is a markdown line ending.\n *\n * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN\n * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).\n *\n * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE\n * RETURN (CR) are replaced by these virtual characters depending on whether\n * they occurred together.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEnding(code) {\n return code !== null && code < -2;\n}\n\n/**\n * Check whether a character code is a markdown line ending (see\n * `markdownLineEnding`) or markdown space (see `markdownSpace`).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEndingOrSpace(code) {\n return code !== null && (code < 0 || code === 32);\n}\n\n/**\n * Check whether a character code is a markdown space.\n *\n * A **markdown space** is the concrete character U+0020 SPACE (SP) and the\n * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).\n *\n * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is\n * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL\n * SPACE (VS) characters, depending on the column at which the tab occurred.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownSpace(code) {\n return code === -2 || code === -1 || code === 32;\n}\n\n// Size note: removing ASCII from the regex and using `asciiPunctuation` here\n// In fact adds to the bundle size.\n/**\n * Check whether the character code represents Unicode punctuation.\n *\n * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,\n * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`\n * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`\n * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII\n * punctuation (see `asciiPunctuation`).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodePunctuation = regexCheck(/\\p{P}|\\p{S}/u);\n\n/**\n * Check whether the character code represents Unicode whitespace.\n *\n * Note that this does handle micromark specific markdown whitespace characters.\n * See `markdownLineEndingOrSpace` to check that.\n *\n * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,\n * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),\n * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\\[UNICODE]**).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodeWhitespace = regexCheck(/\\s/);\n\n/**\n * Create a code check from a regex.\n *\n * @param {RegExp} regex\n * Expression.\n * @returns {(code: Code) => boolean}\n * Check.\n */\nfunction regexCheck(regex) {\n return check;\n\n /**\n * Check whether a code matches the bound regex.\n *\n * @param {Code} code\n * Character code.\n * @returns {boolean}\n * Whether the character code matches the bound regex.\n */\n function check(code) {\n return code !== null && code > -1 && regex.test(String.fromCharCode(code));\n }\n}","import { asciiAlphanumeric } from 'micromark-util-character';\nimport { encode } from 'micromark-util-encode';\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | null | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''));\n if (!protocol) {\n return value;\n }\n const colon = value.indexOf(':');\n const questionMark = value.indexOf('?');\n const numberSign = value.indexOf('#');\n const slash = value.indexOf('/');\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))) {\n return value;\n }\n return '';\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array<string>} */\n const result = [];\n let index = -1;\n let start = 0;\n let skip = 0;\n while (++index < value.length) {\n const code = value.charCodeAt(index);\n /** @type {string} */\n let replace = '';\n\n // A correct percent encoded value.\n if (code === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) {\n skip = 2;\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code);\n }\n }\n // Astral.\n else if (code > 55_295 && code < 57_344) {\n const next = value.charCodeAt(index + 1);\n\n // A correct surrogate pair.\n if (code < 56_320 && next > 56_319 && next < 57_344) {\n replace = String.fromCharCode(code, next);\n skip = 1;\n }\n // Lone surrogate.\n else {\n replace = \"\\uFFFD\";\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code);\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace));\n start = index + skip + 1;\n replace = '';\n }\n if (skip) {\n index += skip;\n skip = 0;\n }\n }\n return result.join('') + value.slice(start);\n}","/**\n * While micromark is a lexer/tokenizer, the common case of going from markdown\n * to html is currently built in as this module, even though the parts can be\n * used separately to build ASTs, CSTs, or many other output formats.\n *\n * Having an HTML compiler built in is useful because it allows us to check for\n * compliancy to CommonMark, the de facto norm of markdown, specified in roughly\n * 600 input/output cases.\n *\n * This module has an interface that accepts lists of events instead of the\n * whole at once, however, because markdown can’t be truly streaming, we buffer\n * events before processing and outputting the final result.\n */\n\n/**\n * @import {\n * CompileContext,\n * CompileData,\n * CompileOptions,\n * Compile,\n * Definition,\n * Event,\n * Handle,\n * HtmlExtension,\n * LineEnding,\n * NormalizedHtmlExtension,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @typedef Media\n * @property {boolean | undefined} [image]\n * @property {string | undefined} [labelId]\n * @property {string | undefined} [label]\n * @property {string | undefined} [referenceId]\n * @property {string | undefined} [destination]\n * @property {string | undefined} [title]\n */\n\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { push } from 'micromark-util-chunked';\nimport { combineHtmlExtensions } from 'micromark-util-combine-extensions';\nimport { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';\nimport { encode as _encode } from 'micromark-util-encode';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { sanitizeUri } from 'micromark-util-sanitize-uri';\nconst hasOwnProperty = {}.hasOwnProperty;\n\n/**\n * These two are allowlists of safe protocols for full URLs in respectively the\n * `href` (on `<a>`) and `src` (on `<img>`) attributes.\n * They are based on what is allowed on GitHub,\n * <https://github.com/syntax-tree/hast-util-sanitize/blob/9275b21/lib/github.json#L31>\n */\nconst protocolHref = /^(https?|ircs?|mailto|xmpp)$/i;\nconst protocolSource = /^https?$/i;\n\n/**\n * @param {CompileOptions | null | undefined} [options]\n * @returns {Compile}\n */\nexport function compile(options) {\n const settings = options || {};\n\n /**\n * Tags is needed because according to markdown, links and emphasis and\n * whatnot can exist in images, however, as HTML doesn’t allow content in\n * images, the tags are ignored in the `alt` attribute, but the content\n * remains.\n *\n * @type {boolean | undefined}\n */\n let tags = true;\n\n /**\n * An object to track identifiers to media (URLs and titles) defined with\n * definitions.\n *\n * @type {Record<string, Definition>}\n */\n const definitions = {};\n\n /**\n * A lot of the handlers need to capture some of the output data, modify it\n * somehow, and then deal with it.\n * We do that by tracking a stack of buffers, that can be opened (with\n * `buffer`) and closed (with `resume`) to access them.\n *\n * @type {Array<Array<string>>}\n */\n const buffers = [[]];\n\n /**\n * As we can have links in images and the other way around, where the deepest\n * ones are closed first, we need to track which one we’re in.\n *\n * @type {Array<Media>}\n */\n const mediaStack = [];\n\n /**\n * Same as `mediaStack` for tightness, which is specific to lists.\n * We need to track if we’re currently in a tight or loose container.\n *\n * @type {Array<boolean>}\n */\n const tightStack = [];\n\n /** @type {HtmlExtension} */\n const defaultHandlers = {\n enter: {\n blockQuote: onenterblockquote,\n codeFenced: onentercodefenced,\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: onentercodeindented,\n codeText: onentercodetext,\n content: onentercontent,\n definition: onenterdefinition,\n definitionDestinationString: onenterdefinitiondestinationstring,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: onenteremphasis,\n htmlFlow: onenterhtmlflow,\n htmlText: onenterhtml,\n image: onenterimage,\n label: buffer,\n link: onenterlink,\n listItemMarker: onenterlistitemmarker,\n listItemValue: onenterlistitemvalue,\n listOrdered: onenterlistordered,\n listUnordered: onenterlistunordered,\n paragraph: onenterparagraph,\n reference: buffer,\n resource: onenterresource,\n resourceDestinationString: onenterresourcedestinationstring,\n resourceTitleString: buffer,\n setextHeading: onentersetextheading,\n strong: onenterstrong\n },\n exit: {\n atxHeading: onexitatxheading,\n atxHeadingSequence: onexitatxheadingsequence,\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: onexitblockquote,\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n codeFenced: onexitflowcode,\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onresumedrop,\n codeFlowValue: onexitcodeflowvalue,\n codeIndented: onexitflowcode,\n codeText: onexitcodetext,\n codeTextData: onexitdata,\n data: onexitdata,\n definition: onexitdefinition,\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: onexitemphasis,\n hardBreakEscape: onexithardbreak,\n hardBreakTrailing: onexithardbreak,\n htmlFlow: onexithtml,\n htmlFlowData: onexitdata,\n htmlText: onexithtml,\n htmlTextData: onexitdata,\n image: onexitmedia,\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: onexitmedia,\n listOrdered: onexitlistordered,\n listUnordered: onexitlistunordered,\n paragraph: onexitparagraph,\n reference: onresumedrop,\n referenceString: onexitreferencestring,\n resource: onresumedrop,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n setextHeading: onexitsetextheading,\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: onexitstrong,\n thematicBreak: onexitthematicbreak\n }\n };\n\n /**\n * Combine the HTML extensions with the default handlers.\n * An HTML extension is an object whose fields are either `enter` or `exit`\n * (reflecting whether a token is entered or exited).\n * The values at such objects are names of tokens mapping to handlers.\n * Handlers are called, respectively when a token is opener or closed, with\n * that token, and a context as `this`.\n */\n const handlers = /** @type {NormalizedHtmlExtension} */\n combineHtmlExtensions([defaultHandlers, ...(settings.htmlExtensions || [])]);\n\n /**\n * Handlers do often need to keep track of some state.\n * That state is provided here as a key-value store (an object).\n *\n * @type {CompileData}\n */\n const data = {\n definitions,\n tightStack\n };\n\n /**\n * The context for handlers references a couple of useful functions.\n * In handlers from extensions, those can be accessed at `this`.\n * For the handlers here, they can be accessed directly.\n *\n * @type {Omit<CompileContext, 'sliceSerialize'>}\n */\n const context = {\n buffer,\n encode,\n getData,\n lineEndingIfNeeded,\n options: settings,\n raw,\n resume,\n setData,\n tag\n };\n\n /**\n * Generally, micromark copies line endings (`'\\r'`, `'\\n'`, `'\\r\\n'`) in the\n * markdown document over to the compiled HTML.\n * In some cases, such as `> a`, CommonMark requires that extra line endings\n * are added: `<blockquote>\\n<p>a</p>\\n</blockquote>`.\n * This variable hold the default line ending when given (or `undefined`),\n * and in the latter case will be updated to the first found line ending if\n * there is one.\n */\n let lineEndingStyle = settings.defaultLineEnding;\n\n // Return the function that handles a slice of events.\n return compile;\n\n /**\n * Deal w/ a slice of events.\n * Return either the empty string if there’s nothing of note to return, or the\n * result when done.\n *\n * @param {ReadonlyArray<Event>} events\n * @returns {string}\n */\n function compile(events) {\n let index = -1;\n let start = 0;\n /** @type {Array<number>} */\n const listStack = [];\n // As definitions can come after references, we need to figure out the media\n // (urls and titles) defined by them before handling the references.\n // So, we do sort of what HTML does: put metadata at the start (in head), and\n // then put content after (`body`).\n /** @type {Array<Event>} */\n let head = [];\n /** @type {Array<Event>} */\n let body = [];\n while (++index < events.length) {\n // Figure out the line ending style used in the document.\n if (!lineEndingStyle && (events[index][1].type === \"lineEnding\" || events[index][1].type === \"lineEndingBlank\")) {\n lineEndingStyle = /** @type {LineEnding} */\n events[index][2].sliceSerialize(events[index][1]);\n }\n\n // Preprocess lists to infer whether the list is loose or not.\n if (events[index][1].type === \"listOrdered\" || events[index][1].type === \"listUnordered\") {\n if (events[index][0] === 'enter') {\n listStack.push(index);\n } else {\n prepareList(events.slice(listStack.pop(), index));\n }\n }\n\n // Move definitions to the front.\n if (events[index][1].type === \"definition\") {\n if (events[index][0] === 'enter') {\n body = push(body, events.slice(start, index));\n start = index;\n } else {\n head = push(head, events.slice(start, index + 1));\n start = index + 1;\n }\n }\n }\n head = push(head, body);\n head = push(head, events.slice(start));\n index = -1;\n const result = head;\n\n // Handle the start of the document, if defined.\n if (handlers.enter.null) {\n handlers.enter.null.call(context);\n }\n\n // Handle all events.\n while (++index < events.length) {\n const handles = handlers[result[index][0]];\n const kind = result[index][1].type;\n const handle = handles[kind];\n if (hasOwnProperty.call(handles, kind) && handle) {\n handle.call({\n sliceSerialize: result[index][2].sliceSerialize,\n ...context\n }, result[index][1]);\n }\n }\n\n // Handle the end of the document, if defined.\n if (handlers.exit.null) {\n handlers.exit.null.call(context);\n }\n return buffers[0].join('');\n }\n\n /**\n * Figure out whether lists are loose or not.\n *\n * @param {ReadonlyArray<Event>} slice\n * @returns {undefined}\n */\n function prepareList(slice) {\n const length = slice.length;\n let index = 0; // Skip open.\n let containerBalance = 0;\n let loose = false;\n /** @type {boolean | undefined} */\n let atMarker;\n while (++index < length) {\n const event = slice[index];\n if (event[1]._container) {\n atMarker = undefined;\n if (event[0] === 'enter') {\n containerBalance++;\n } else {\n containerBalance--;\n }\n } else switch (event[1].type) {\n case \"listItemPrefix\":\n {\n if (event[0] === 'exit') {\n atMarker = true;\n }\n break;\n }\n case \"linePrefix\":\n {\n // Ignore\n\n break;\n }\n case \"lineEndingBlank\":\n {\n if (event[0] === 'enter' && !containerBalance) {\n if (atMarker) {\n atMarker = undefined;\n } else {\n loose = true;\n }\n }\n break;\n }\n default:\n {\n atMarker = undefined;\n }\n }\n }\n slice[0][1]._loose = loose;\n }\n\n /**\n * @type {CompileContext['setData']}\n */\n function setData(key, value) {\n // @ts-expect-error: assume `value` is omitted (`undefined` is passed) only\n // if allowed.\n data[key] = value;\n }\n\n /**\n * @type {CompileContext['getData']}\n */\n function getData(key) {\n return data[key];\n }\n\n /** @type {CompileContext['buffer']} */\n function buffer() {\n buffers.push([]);\n }\n\n /** @type {CompileContext['resume']} */\n function resume() {\n const buf = buffers.pop();\n return buf.join('');\n }\n\n /** @type {CompileContext['tag']} */\n function tag(value) {\n if (!tags) return;\n setData('lastWasTag', true);\n buffers[buffers.length - 1].push(value);\n }\n\n /** @type {CompileContext['raw']} */\n function raw(value) {\n setData('lastWasTag');\n buffers[buffers.length - 1].push(value);\n }\n\n /**\n * Output an extra line ending.\n *\n * @returns {undefined}\n */\n function lineEnding() {\n raw(lineEndingStyle || '\\n');\n }\n\n /** @type {CompileContext['lineEndingIfNeeded']} */\n function lineEndingIfNeeded() {\n const buffer = buffers[buffers.length - 1];\n const slice = buffer[buffer.length - 1];\n const previous = slice ? slice.charCodeAt(slice.length - 1) : null;\n if (previous === 10 || previous === 13 || previous === null) {\n return;\n }\n lineEnding();\n }\n\n /** @type {CompileContext['encode']} */\n function encode(value) {\n return getData('ignoreEncode') ? value : _encode(value);\n }\n\n //\n // Handlers.\n //\n\n /**\n * @returns {undefined}\n */\n function onresumedrop() {\n resume();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered(token) {\n tightStack.push(!token._loose);\n lineEndingIfNeeded();\n tag('<ol');\n setData('expectFirstItem', true);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistunordered(token) {\n tightStack.push(!token._loose);\n lineEndingIfNeeded();\n tag('<ul');\n setData('expectFirstItem', true);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (getData('expectFirstItem')) {\n const value = Number.parseInt(this.sliceSerialize(token), 10);\n if (value !== 1) {\n tag(' start=\"' + encode(String(value)) + '\"');\n }\n }\n }\n\n /**\n * @returns {undefined}\n */\n function onenterlistitemmarker() {\n if (getData('expectFirstItem')) {\n tag('>');\n } else {\n onexitlistitem();\n }\n lineEndingIfNeeded();\n tag('<li>');\n setData('expectFirstItem');\n // “Hack” to prevent a line ending from showing up if the item is empty.\n setData('lastWasTag');\n }\n\n /**\n * @returns {undefined}\n */\n function onexitlistordered() {\n onexitlistitem();\n tightStack.pop();\n lineEnding();\n tag('</ol>');\n }\n\n /**\n * @returns {undefined}\n */\n function onexitlistunordered() {\n onexitlistitem();\n tightStack.pop();\n lineEnding();\n tag('</ul>');\n }\n\n /**\n * @returns {undefined}\n */\n function onexitlistitem() {\n if (getData('lastWasTag') && !getData('slurpAllLineEndings')) {\n lineEndingIfNeeded();\n }\n tag('</li>');\n setData('slurpAllLineEndings');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterblockquote() {\n tightStack.push(false);\n lineEndingIfNeeded();\n tag('<blockquote>');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitblockquote() {\n tightStack.pop();\n lineEndingIfNeeded();\n tag('</blockquote>');\n setData('slurpAllLineEndings');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterparagraph() {\n if (!tightStack[tightStack.length - 1]) {\n lineEndingIfNeeded();\n tag('<p>');\n }\n setData('slurpAllLineEndings');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitparagraph() {\n if (tightStack[tightStack.length - 1]) {\n setData('slurpAllLineEndings', true);\n } else {\n tag('</p>');\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onentercodefenced() {\n lineEndingIfNeeded();\n tag('<pre><code');\n setData('fencesCount', 0);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const value = resume();\n tag(' class=\"language-' + value + '\"');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n const count = getData('fencesCount') || 0;\n if (!count) {\n tag('>');\n setData('slurpOneLineEnding', true);\n }\n setData('fencesCount', count + 1);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onentercodeindented() {\n lineEndingIfNeeded();\n tag('<pre><code>');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitflowcode() {\n const count = getData('fencesCount');\n\n // One special case is if we are inside a container, and the fenced code was\n // not closed (meaning it runs to the end).\n // In that case, the following line ending, is considered *outside* the\n // fenced code and block quote by micromark, but CM wants to treat that\n // ending as part of the code.\n if (count !== undefined && count < 2 && data.tightStack.length > 0 && !getData('lastWasTag')) {\n lineEnding();\n }\n\n // But in most cases, it’s simpler: when we’ve seen some data, emit an extra\n // line ending when needed.\n if (getData('flowCodeSeenData')) {\n lineEndingIfNeeded();\n }\n tag('</code></pre>');\n if (count !== undefined && count < 2) lineEndingIfNeeded();\n setData('flowCodeSeenData');\n setData('fencesCount');\n setData('slurpOneLineEnding');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterimage() {\n mediaStack.push({\n image: true\n });\n tags = undefined; // Disallow tags.\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlink() {\n mediaStack.push({});\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitlabeltext(token) {\n mediaStack[mediaStack.length - 1].labelId = this.sliceSerialize(token);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitlabel() {\n mediaStack[mediaStack.length - 1].label = resume();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitreferencestring(token) {\n mediaStack[mediaStack.length - 1].referenceId = this.sliceSerialize(token);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterresource() {\n buffer(); // We can have line endings in the resource, ignore them.\n mediaStack[mediaStack.length - 1].destination = '';\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterresourcedestinationstring() {\n buffer();\n // Ignore encoding the result, as we’ll first percent encode the url and\n // encode manually after.\n setData('ignoreEncode', true);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitresourcedestinationstring() {\n mediaStack[mediaStack.length - 1].destination = resume();\n setData('ignoreEncode');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitresourcetitlestring() {\n mediaStack[mediaStack.length - 1].title = resume();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitmedia() {\n let index = mediaStack.length - 1; // Skip current.\n const media = mediaStack[index];\n const id = media.referenceId || media.labelId;\n const context = media.destination === undefined ? definitions[normalizeIdentifier(id)] : media;\n tags = true;\n while (index--) {\n if (mediaStack[index].image) {\n tags = undefined;\n break;\n }\n }\n if (media.image) {\n tag('<img src=\"' + sanitizeUri(context.destination, settings.allowDangerousProtocol ? undefined : protocolSource) + '\" alt=\"');\n raw(media.label);\n tag('\"');\n } else {\n tag('<a href=\"' + sanitizeUri(context.destination, settings.allowDangerousProtocol ? undefined : protocolHref) + '\"');\n }\n tag(context.title ? ' title=\"' + context.title + '\"' : '');\n if (media.image) {\n tag(' />');\n } else {\n tag('>');\n raw(media.label);\n tag('</a>');\n }\n mediaStack.pop();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterdefinition() {\n buffer();\n mediaStack.push({});\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n // Discard label, use the source content instead.\n resume();\n mediaStack[mediaStack.length - 1].labelId = this.sliceSerialize(token);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterdefinitiondestinationstring() {\n buffer();\n setData('ignoreEncode', true);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n mediaStack[mediaStack.length - 1].destination = resume();\n setData('ignoreEncode');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n mediaStack[mediaStack.length - 1].title = resume();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinition() {\n const media = mediaStack[mediaStack.length - 1];\n const id = normalizeIdentifier(media.labelId);\n resume();\n if (!hasOwnProperty.call(definitions, id)) {\n definitions[id] = mediaStack[mediaStack.length - 1];\n }\n mediaStack.pop();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onentercontent() {\n setData('slurpAllLineEndings', true);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n // Exit for further sequences.\n if (getData('headingRank')) return;\n setData('headingRank', this.sliceSerialize(token).length);\n lineEndingIfNeeded();\n tag('<h' + getData('headingRank') + '>');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onentersetextheading() {\n buffer();\n setData('slurpAllLineEndings');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n setData('slurpAllLineEndings', true);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheading() {\n tag('</h' + getData('headingRank') + '>');\n setData('headingRank');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n setData('headingRank', this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n const value = resume();\n lineEndingIfNeeded();\n tag('<h' + getData('headingRank') + '>');\n raw(value);\n tag('</h' + getData('headingRank') + '>');\n setData('slurpAllLineEndings');\n setData('headingRank');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdata(token) {\n raw(encode(this.sliceSerialize(token)));\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitlineending(token) {\n if (getData('slurpAllLineEndings')) {\n return;\n }\n if (getData('slurpOneLineEnding')) {\n setData('slurpOneLineEnding');\n return;\n }\n if (getData('inCodeText')) {\n raw(' ');\n return;\n }\n raw(encode(this.sliceSerialize(token)));\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeflowvalue(token) {\n raw(encode(this.sliceSerialize(token)));\n setData('flowCodeSeenData', true);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexithardbreak() {\n tag('<br />');\n }\n\n /**\n * @returns {undefined}\n */\n function onenterhtmlflow() {\n lineEndingIfNeeded();\n onenterhtml();\n }\n\n /**\n * @returns {undefined}\n */\n function onexithtml() {\n setData('ignoreEncode');\n }\n\n /**\n * @returns {undefined}\n */\n function onenterhtml() {\n if (settings.allowDangerousHtml) {\n setData('ignoreEncode', true);\n }\n }\n\n /**\n * @returns {undefined}\n */\n function onenteremphasis() {\n tag('<em>');\n }\n\n /**\n * @returns {undefined}\n */\n function onenterstrong() {\n tag('<strong>');\n }\n\n /**\n * @returns {undefined}\n */\n function onentercodetext() {\n setData('inCodeText', true);\n tag('<code>');\n }\n\n /**\n * @returns {undefined}\n */\n function onexitcodetext() {\n setData('inCodeText');\n tag('</code>');\n }\n\n /**\n * @returns {undefined}\n */\n function onexitemphasis() {\n tag('</em>');\n }\n\n /**\n * @returns {undefined}\n */\n function onexitstrong() {\n tag('</strong>');\n }\n\n /**\n * @returns {undefined}\n */\n function onexitthematicbreak() {\n lineEndingIfNeeded();\n tag('<hr />');\n }\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const value = this.sliceSerialize(token);\n const decoded = getData('characterReferenceType') ? decodeNumericCharacterReference(value, getData('characterReferenceType') === \"characterReferenceMarkerNumeric\" ? 10 : 16) : decodeNamedCharacterReference(value);\n\n // `decodeNamedCharacterReference` can return `false` for invalid named\n // character references,\n // but everything we’ve tokenized is valid.\n raw(encode(/** @type {string} */decoded));\n setData('characterReferenceType');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n const uri = this.sliceSerialize(token);\n tag('<a href=\"' + sanitizeUri(uri, settings.allowDangerousProtocol ? undefined : protocolHref) + '\">');\n raw(encode(uri));\n tag('</a>');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n const uri = this.sliceSerialize(token);\n tag('<a href=\"' + sanitizeUri('mailto:' + uri) + '\">');\n raw(encode(uri));\n tag('</a>');\n }\n}","/**\n * @import {Effects, State, TokenType} from 'micromark-util-types'\n */\n\nimport { markdownSpace } from 'micromark-util-character';\n\n// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`.\n\n/**\n * Parse spaces and tabs.\n *\n * There is no `nok` parameter:\n *\n * * spaces in markdown are often optional, in which case this factory can be\n * used and `ok` will be switched to whether spaces were found or not\n * * one line ending or space can be detected with `markdownSpace(code)` right\n * before using `factorySpace`\n *\n * ###### Examples\n *\n * Where `␉` represents a tab (plus how much it expands) and `␠` represents a\n * single space.\n *\n * ```markdown\n * ␉\n * ␠␠␠␠\n * ␉␠\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {TokenType} type\n * Type (`' \\t'`).\n * @param {number | undefined} [max=Infinity]\n * Max (exclusive).\n * @returns {State}\n * Start state.\n */\nexport function factorySpace(effects, ok, type, max) {\n const limit = max ? max - 1 : Number.POSITIVE_INFINITY;\n let size = 0;\n return start;\n\n /** @type {State} */\n function start(code) {\n if (markdownSpace(code)) {\n effects.enter(type);\n return prefix(code);\n }\n return ok(code);\n }\n\n /** @type {State} */\n function prefix(code) {\n if (markdownSpace(code) && size++ < limit) {\n effects.consume(code);\n return prefix;\n }\n effects.exit(type);\n return ok(code);\n }\n}","/**\n * @import {\n * InitialConstruct,\n * Initializer,\n * State,\n * TokenizeContext,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {InitialConstruct} */\nexport const content = {\n tokenize: initializeContent\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n * Content.\n */\nfunction initializeContent(effects) {\n const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);\n /** @type {Token} */\n let previous;\n return contentStart;\n\n /** @type {State} */\n function afterContentStartConstruct(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, contentStart, \"linePrefix\");\n }\n\n /** @type {State} */\n function paragraphInitial(code) {\n effects.enter(\"paragraph\");\n return lineStart(code);\n }\n\n /** @type {State} */\n function lineStart(code) {\n const token = effects.enter(\"chunkText\", {\n contentType: \"text\",\n previous\n });\n if (previous) {\n previous.next = token;\n }\n previous = token;\n return data(code);\n }\n\n /** @type {State} */\n function data(code) {\n if (code === null) {\n effects.exit(\"chunkText\");\n effects.exit(\"paragraph\");\n effects.consume(code);\n return;\n }\n if (markdownLineEnding(code)) {\n effects.consume(code);\n effects.exit(\"chunkText\");\n return lineStart;\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n}","/**\n * @import {\n * Construct,\n * ContainerState,\n * InitialConstruct,\n * Initializer,\n * Point,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @typedef {[Construct, ContainerState]} StackItem\n * Construct and its state.\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { splice } from 'micromark-util-chunked';\n/** @type {InitialConstruct} */\nexport const document = {\n tokenize: initializeDocument\n};\n\n/** @type {Construct} */\nconst containerConstruct = {\n tokenize: tokenizeContainer\n};\n\n/**\n * @this {TokenizeContext}\n * Self.\n * @type {Initializer}\n * Initializer.\n */\nfunction initializeDocument(effects) {\n const self = this;\n /** @type {Array<StackItem>} */\n const stack = [];\n let continued = 0;\n /** @type {TokenizeContext | undefined} */\n let childFlow;\n /** @type {Token | undefined} */\n let childToken;\n /** @type {number} */\n let lineStartOffset;\n return start;\n\n /** @type {State} */\n function start(code) {\n // First we iterate through the open blocks, starting with the root\n // document, and descending through last children down to the last open\n // block.\n // Each block imposes a condition that the line must satisfy if the block is\n // to remain open.\n // For example, a block quote requires a `>` character.\n // A paragraph requires a non-blank line.\n // In this phase we may match all or just some of the open blocks.\n // But we cannot close unmatched blocks yet, because we may have a lazy\n // continuation line.\n if (continued < stack.length) {\n const item = stack[continued];\n self.containerState = item[1];\n return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);\n }\n\n // Done.\n return checkNewContainers(code);\n }\n\n /** @type {State} */\n function documentContinue(code) {\n continued++;\n\n // Note: this field is called `_closeFlow` but it also closes containers.\n // Perhaps a good idea to rename it but it’s already used in the wild by\n // extensions.\n if (self.containerState._closeFlow) {\n self.containerState._closeFlow = undefined;\n if (childFlow) {\n closeFlow();\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when dealing with lazy lines in `writeToChild`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {Point | undefined} */\n let point;\n\n // Find the flow chunk.\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n let index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n\n // Discard the duplicate exits.\n self.events.length = index;\n return checkNewContainers(code);\n }\n return start(code);\n }\n\n /** @type {State} */\n function checkNewContainers(code) {\n // Next, after consuming the continuation markers for existing blocks, we\n // look for new block starts (e.g. `>` for a block quote).\n // If we encounter a new block start, we close any blocks unmatched in\n // step 1 before creating the new block as a child of the last matched\n // block.\n if (continued === stack.length) {\n // No need to `check` whether there’s a container, of `exitContainers`\n // would be moot.\n // We can instead immediately `attempt` to parse one.\n if (!childFlow) {\n return documentContinued(code);\n }\n\n // If we have concrete content, such as block HTML or fenced code,\n // we can’t have containers “pierce” into them, so we can immediately\n // start.\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n return flowStart(code);\n }\n\n // If we do have flow, it could still be a blank line,\n // but we’d be interrupting it w/ a new container if there’s a current\n // construct.\n // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer\n // needed in micromark-extension-gfm-table@1.0.6).\n self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);\n }\n\n // Check if there is a new container.\n self.containerState = {};\n return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);\n }\n\n /** @type {State} */\n function thereIsANewContainer(code) {\n if (childFlow) closeFlow();\n exitContainers(continued);\n return documentContinued(code);\n }\n\n /** @type {State} */\n function thereIsNoNewContainer(code) {\n self.parser.lazy[self.now().line] = continued !== stack.length;\n lineStartOffset = self.now().offset;\n return flowStart(code);\n }\n\n /** @type {State} */\n function documentContinued(code) {\n // Try new containers.\n self.containerState = {};\n return effects.attempt(containerConstruct, containerContinue, flowStart)(code);\n }\n\n /** @type {State} */\n function containerContinue(code) {\n continued++;\n stack.push([self.currentConstruct, self.containerState]);\n // Try another.\n return documentContinued(code);\n }\n\n /** @type {State} */\n function flowStart(code) {\n if (code === null) {\n if (childFlow) closeFlow();\n exitContainers(0);\n effects.consume(code);\n return;\n }\n childFlow = childFlow || self.parser.flow(self.now());\n effects.enter(\"chunkFlow\", {\n _tokenizer: childFlow,\n contentType: \"flow\",\n previous: childToken\n });\n return flowContinue(code);\n }\n\n /** @type {State} */\n function flowContinue(code) {\n if (code === null) {\n writeToChild(effects.exit(\"chunkFlow\"), true);\n exitContainers(0);\n effects.consume(code);\n return;\n }\n if (markdownLineEnding(code)) {\n effects.consume(code);\n writeToChild(effects.exit(\"chunkFlow\"));\n // Get ready for the next line.\n continued = 0;\n self.interrupt = undefined;\n return start;\n }\n effects.consume(code);\n return flowContinue;\n }\n\n /**\n * @param {Token} token\n * Token.\n * @param {boolean | undefined} [endOfFile]\n * Whether the token is at the end of the file (default: `false`).\n * @returns {undefined}\n * Nothing.\n */\n function writeToChild(token, endOfFile) {\n const stream = self.sliceStream(token);\n if (endOfFile) stream.push(null);\n token.previous = childToken;\n if (childToken) childToken.next = token;\n childToken = token;\n childFlow.defineSkip(token.start);\n childFlow.write(stream);\n\n // Alright, so we just added a lazy line:\n //\n // ```markdown\n // > a\n // b.\n //\n // Or:\n //\n // > ~~~c\n // d\n //\n // Or:\n //\n // > | e |\n // f\n // ```\n //\n // The construct in the second example (fenced code) does not accept lazy\n // lines, so it marked itself as done at the end of its first line, and\n // then the content construct parses `d`.\n // Most constructs in markdown match on the first line: if the first line\n // forms a construct, a non-lazy line can’t “unmake” it.\n //\n // The construct in the third example is potentially a GFM table, and\n // those are *weird*.\n // It *could* be a table, from the first line, if the following line\n // matches a condition.\n // In this case, that second line is lazy, which “unmakes” the first line\n // and turns the whole into one content block.\n //\n // We’ve now parsed the non-lazy and the lazy line, and can figure out\n // whether the lazy line started a new flow block.\n // If it did, we exit the current containers between the two flow blocks.\n if (self.parser.lazy[token.start.line]) {\n let index = childFlow.events.length;\n while (index--) {\n if (\n // The token starts before the line ending…\n childFlow.events[index][1].start.offset < lineStartOffset && (\n // …and either is not ended yet…\n !childFlow.events[index][1].end ||\n // …or ends after it.\n childFlow.events[index][1].end.offset > lineStartOffset)) {\n // Exit: there’s still something open, which means it’s a lazy line\n // part of something.\n return;\n }\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when closing flow in `documentContinue`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {boolean | undefined} */\n let seen;\n /** @type {Point | undefined} */\n let point;\n\n // Find the previous chunk (the one before the lazy line).\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n if (seen) {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n seen = true;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n\n // Discard the duplicate exits.\n self.events.length = index;\n }\n }\n\n /**\n * @param {number} size\n * Size.\n * @returns {undefined}\n * Nothing.\n */\n function exitContainers(size) {\n let index = stack.length;\n\n // Exit open containers.\n while (index-- > size) {\n const entry = stack[index];\n self.containerState = entry[1];\n entry[0].exit.call(self, effects);\n }\n stack.length = size;\n }\n function closeFlow() {\n childFlow.write([null]);\n childToken = undefined;\n childFlow = undefined;\n self.containerState._closeFlow = undefined;\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n * Tokenizer.\n */\nfunction tokenizeContainer(effects, ok, nok) {\n // Always populated by defaults.\n\n return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), \"linePrefix\", this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4);\n}","/**\n * @import {Code} from 'micromark-util-types'\n */\n\nimport { markdownLineEndingOrSpace, unicodePunctuation, unicodeWhitespace } from 'micromark-util-character';\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return 1;\n }\n if (unicodePunctuation(code)) {\n return 2;\n }\n}","/**\n * @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'\n */\n\n/**\n * Call all `resolveAll`s.\n *\n * @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs\n * List of constructs, optionally with `resolveAll`s.\n * @param {Array<Event>} events\n * List of events.\n * @param {TokenizeContext} context\n * Context used by `tokenize`.\n * @returns {Array<Event>}\n * Changed events.\n */\nexport function resolveAll(constructs, events, context) {\n /** @type {Array<Resolver>} */\n const called = []\n let index = -1\n\n while (++index < constructs.length) {\n const resolve = constructs[index].resolveAll\n\n if (resolve && !called.includes(resolve)) {\n events = resolve(events, context)\n called.push(resolve)\n }\n }\n\n return events\n}\n","/**\n * @import {\n * Code,\n * Construct,\n * Event,\n * Point,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { push, splice } from 'micromark-util-chunked';\nimport { classifyCharacter } from 'micromark-util-classify-character';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n resolveAll: resolveAllAttention,\n tokenize: tokenizeAttention\n};\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\n// eslint-disable-next-line complexity\nfunction resolveAllAttention(events, context) {\n let index = -1;\n /** @type {number} */\n let open;\n /** @type {Token} */\n let group;\n /** @type {Token} */\n let text;\n /** @type {Token} */\n let openingSequence;\n /** @type {Token} */\n let closingSequence;\n /** @type {number} */\n let use;\n /** @type {Array<Event>} */\n let nextEvents;\n /** @type {number} */\n let offset;\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (events[index][0] === 'enter' && events[index][1].type === 'attentionSequence' && events[index][1]._close) {\n open = index;\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (events[open][0] === 'exit' && events[open][1].type === 'attentionSequence' && events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) {\n continue;\n }\n\n // Number of markers to use from the sequence.\n use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;\n const start = {\n ...events[open][1].end\n };\n const end = {\n ...events[index][1].start\n };\n movePoint(start, -use);\n movePoint(end, use);\n openingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start,\n end: {\n ...events[open][1].end\n }\n };\n closingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start: {\n ...events[index][1].start\n },\n end\n };\n text = {\n type: use > 1 ? \"strongText\" : \"emphasisText\",\n start: {\n ...events[open][1].end\n },\n end: {\n ...events[index][1].start\n }\n };\n group = {\n type: use > 1 ? \"strong\" : \"emphasis\",\n start: {\n ...openingSequence.start\n },\n end: {\n ...closingSequence.end\n }\n };\n events[open][1].end = {\n ...openingSequence.start\n };\n events[index][1].start = {\n ...closingSequence.end\n };\n nextEvents = [];\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [['enter', events[open][1], context], ['exit', events[open][1], context]]);\n }\n\n // Opening.\n nextEvents = push(nextEvents, [['enter', group, context], ['enter', openingSequence, context], ['exit', openingSequence, context], ['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));\n\n // Closing.\n nextEvents = push(nextEvents, [['exit', text, context], ['enter', closingSequence, context], ['exit', closingSequence, context], ['exit', group, context]]);\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2;\n nextEvents = push(nextEvents, [['enter', events[index][1], context], ['exit', events[index][1], context]]);\n } else {\n offset = 0;\n }\n splice(events, open - 1, index - open + 3, nextEvents);\n index = open + nextEvents.length - offset - 2;\n break;\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1;\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data';\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null;\n const previous = this.previous;\n const before = classifyCharacter(previous);\n\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code;\n effects.enter('attentionSequence');\n return inside(code);\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n const token = effects.exit('attentionSequence');\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code);\n\n // Always populated by defaults.\n\n const open = !after || after === 2 && before || attentionMarkers.includes(code);\n const close = !before || before === 2 && after || attentionMarkers.includes(previous);\n token._open = Boolean(marker === 42 ? open : open && (before || !close));\n token._close = Boolean(marker === 42 ? close : close && (after || !open));\n return ok(code);\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * Point.\n * @param {number} offset\n * Amount to move.\n * @returns {undefined}\n * Nothing.\n */\nfunction movePoint(point, offset) {\n point.column += offset;\n point.offset += offset;\n point._bufferIndex += offset;\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiAlphanumeric, asciiAlpha, asciiAtext, asciiControl } from 'micromark-util-character';\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0;\n return start;\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"autolink\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.enter(\"autolinkProtocol\");\n return open;\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code);\n return schemeOrEmailAtext;\n }\n if (code === 64) {\n return nok(code);\n }\n return emailAtext(code);\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1;\n return schemeInsideOrEmailAtext(code);\n }\n return emailAtext(code);\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code);\n size = 0;\n return urlInside;\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {\n effects.consume(code);\n return schemeInsideOrEmailAtext;\n }\n size = 0;\n return emailAtext(code);\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit(\"autolinkProtocol\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code);\n }\n effects.consume(code);\n return urlInside;\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code);\n return emailAtSignOrDot;\n }\n if (asciiAtext(code)) {\n effects.consume(code);\n return emailAtext;\n }\n return nok(code);\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code);\n size = 0;\n return emailAtSignOrDot;\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit(\"autolinkProtocol\").type = \"autolinkEmail\";\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n return emailValue(code);\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | a<user.name@ex-ample.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel;\n effects.consume(code);\n return next;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const blankLine = {\n partial: true,\n tokenize: tokenizeBlankLine\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLine(effects, ok, nok) {\n return start;\n\n /**\n * Start of blank line.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n return markdownSpace(code) ? factorySpace(effects, after, \"linePrefix\")(code) : after(code);\n }\n\n /**\n * At eof/eol, after optional whitespace.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * Exiter,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const blockQuote = {\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit,\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of block quote.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 62) {\n const state = self.containerState;\n if (!state.open) {\n effects.enter(\"blockQuote\", {\n _container: true\n });\n state.open = true;\n }\n effects.enter(\"blockQuotePrefix\");\n effects.enter(\"blockQuoteMarker\");\n effects.consume(code);\n effects.exit(\"blockQuoteMarker\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `>`, before optional whitespace.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownSpace(code)) {\n effects.enter(\"blockQuotePrefixWhitespace\");\n effects.consume(code);\n effects.exit(\"blockQuotePrefixWhitespace\");\n effects.exit(\"blockQuotePrefix\");\n return ok;\n }\n effects.exit(\"blockQuotePrefix\");\n return ok(code);\n }\n}\n\n/**\n * Start of block quote continuation.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n const self = this;\n return contStart;\n\n /**\n * Start of block quote continuation.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contStart(code) {\n if (markdownSpace(code)) {\n // Always populated by defaults.\n\n return factorySpace(effects, contBefore, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);\n }\n return contBefore(code);\n }\n\n /**\n * At `>`, after optional whitespace.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contBefore(code) {\n return effects.attempt(blockQuote, ok, nok)(code);\n }\n}\n\n/** @type {Exiter} */\nfunction exit(effects) {\n effects.exit(\"blockQuote\");\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiPunctuation } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start;\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterEscape\");\n effects.enter(\"escapeMarker\");\n effects.consume(code);\n effects.exit(\"escapeMarker\");\n return inside;\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter(\"characterEscapeValue\");\n effects.consume(code);\n effects.exit(\"characterEscapeValue\");\n effects.exit(\"characterEscape\");\n return ok;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { asciiAlphanumeric, asciiDigit, asciiHexDigit } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this;\n let size = 0;\n /** @type {number} */\n let max;\n /** @type {(code: Code) => boolean} */\n let test;\n return start;\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterReference\");\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n return open;\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter(\"characterReferenceMarkerNumeric\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerNumeric\");\n return numeric;\n }\n effects.enter(\"characterReferenceValue\");\n max = 31;\n test = asciiAlphanumeric;\n return value(code);\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter(\"characterReferenceMarkerHexadecimal\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerHexadecimal\");\n effects.enter(\"characterReferenceValue\");\n max = 6;\n test = asciiHexDigit;\n return value;\n }\n effects.enter(\"characterReferenceValue\");\n max = 7;\n test = asciiDigit;\n return value(code);\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit(\"characterReferenceValue\");\n if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) {\n return nok(code);\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n effects.exit(\"characterReference\");\n return ok;\n }\n if (test(code) && size++ < max) {\n effects.consume(code);\n return value;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nconst nonLazyContinuation = {\n partial: true,\n tokenize: tokenizeNonLazyContinuation\n};\n\n/** @type {Construct} */\nexport const codeFenced = {\n concrete: true,\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this;\n /** @type {Construct} */\n const closeStart = {\n partial: true,\n tokenize: tokenizeCloseStart\n };\n let initialPrefix = 0;\n let sizeOpen = 0;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code);\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1];\n initialPrefix = tail && tail[1].type === \"linePrefix\" ? tail[2].sliceSerialize(tail[1], true).length : 0;\n marker = code;\n effects.enter(\"codeFenced\");\n effects.enter(\"codeFencedFence\");\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++;\n effects.consume(code);\n return sequenceOpen;\n }\n if (sizeOpen < 3) {\n return nok(code);\n }\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, infoBefore, \"whitespace\")(code) : infoBefore(code);\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return self.interrupt ? ok(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFencedFenceInfo\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return info(code);\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return infoBefore(code);\n }\n if (markdownSpace(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return factorySpace(effects, metaBefore, \"whitespace\")(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return info;\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code);\n }\n effects.enter(\"codeFencedFenceMeta\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return meta(code);\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceMeta\");\n return infoBefore(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return meta;\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code);\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return contentStart;\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code) ? factorySpace(effects, beforeContentChunk, \"linePrefix\", initialPrefix + 1)(code) : beforeContentChunk(code);\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFlowValue\");\n return contentChunk(code);\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFlowValue\");\n return beforeContentChunk(code);\n }\n effects.consume(code);\n return contentChunk;\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit(\"codeFenced\");\n return ok(code);\n }\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0;\n return startBefore;\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return start;\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter(\"codeFencedFence\");\n return markdownSpace(code) ? factorySpace(effects, beforeSequenceClose, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : beforeSequenceClose(code);\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceClose(code);\n }\n return nok(code);\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++;\n effects.consume(code);\n return sequenceClose;\n }\n if (size >= sizeOpen) {\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, sequenceCloseAfter, \"whitespace\")(code) : sequenceCloseAfter(code);\n }\n return nok(code);\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return ok(code);\n }\n return nok(code);\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code);\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineStart;\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeIndented = {\n name: 'codeIndented',\n tokenize: tokenizeCodeIndented\n};\n\n/** @type {Construct} */\nconst furtherStart = {\n partial: true,\n tokenize: tokenizeFurtherStart\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeIndented(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of code (indented).\n *\n * > **Parsing note**: it is not needed to check if this first line is a\n * > filled line (that it has a non-whitespace character), because blank lines\n * > are parsed already, so we never run into that.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: manually check if interrupting like `markdown-rs`.\n\n effects.enter(\"codeIndented\");\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, \"linePrefix\", 4 + 1)(code);\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? atBreak(code) : nok(code);\n }\n\n /**\n * At a break.\n *\n * ```markdown\n * > | aaa\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === null) {\n return after(code);\n }\n if (markdownLineEnding(code)) {\n return effects.attempt(furtherStart, atBreak, after)(code);\n }\n effects.enter(\"codeFlowValue\");\n return inside(code);\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * > | aaa\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFlowValue\");\n return atBreak(code);\n }\n effects.consume(code);\n return inside;\n }\n\n /** @type {State} */\n function after(code) {\n effects.exit(\"codeIndented\");\n // To do: allow interrupting like `markdown-rs`.\n // Feel free to interrupt.\n // tokenizer.interrupt = false\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeFurtherStart(effects, ok, nok) {\n const self = this;\n return furtherStart;\n\n /**\n * At eol, trying to parse another indent.\n *\n * ```markdown\n * > | aaa\n * ^\n * | bbb\n * ```\n *\n * @type {State}\n */\n function furtherStart(code) {\n // To do: improve `lazy` / `pierce` handling.\n // If this is a lazy line, it can’t be code.\n if (self.parser.lazy[self.now().line]) {\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return furtherStart;\n }\n\n // To do: the code here in `micromark-js` is a bit different from\n // `markdown-rs` because there it can attempt spaces.\n // We can’t yet.\n //\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, \"linePrefix\", 4 + 1)(code);\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code) : markdownLineEnding(code) ? furtherStart(code) : nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * Previous,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n previous,\n resolve: resolveCodeText,\n tokenize: tokenizeCodeText\n};\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4;\n let headEnterIndex = 3;\n /** @type {number} */\n let index;\n /** @type {number | undefined} */\n let enter;\n\n // If we start and end with an EOL or a space.\n if ((events[headEnterIndex][1].type === \"lineEnding\" || events[headEnterIndex][1].type === 'space') && (events[tailExitIndex][1].type === \"lineEnding\" || events[tailExitIndex][1].type === 'space')) {\n index = headEnterIndex;\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === \"codeTextData\") {\n // Then we have padding.\n events[headEnterIndex][1].type = \"codeTextPadding\";\n events[tailExitIndex][1].type = \"codeTextPadding\";\n headEnterIndex += 2;\n tailExitIndex -= 2;\n break;\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1;\n tailExitIndex++;\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== \"lineEnding\") {\n enter = index;\n }\n } else if (index === tailExitIndex || events[index][1].type === \"lineEnding\") {\n events[enter][1].type = \"codeTextData\";\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n tailExitIndex -= index - enter - 2;\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return code !== 96 || this.events[this.events.length - 1][1].type === \"characterEscape\";\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this;\n let sizeOpen = 0;\n /** @type {number} */\n let size;\n /** @type {Token} */\n let token;\n return start;\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"codeText\");\n effects.enter(\"codeTextSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code);\n sizeOpen++;\n return sequenceOpen;\n }\n effects.exit(\"codeTextSequence\");\n return between(code);\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code);\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space');\n effects.consume(code);\n effects.exit('space');\n return between;\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter(\"codeTextSequence\");\n size = 0;\n return sequenceClose(code);\n }\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return between;\n }\n\n // Data.\n effects.enter(\"codeTextData\");\n return data(code);\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) {\n effects.exit(\"codeTextData\");\n return between(code);\n }\n effects.consume(code);\n return data;\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code);\n size++;\n return sequenceClose;\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit(\"codeTextSequence\");\n effects.exit(\"codeText\");\n return ok(code);\n }\n\n // More or less accents: mark as data.\n token.type = \"codeTextData\";\n return data(code);\n }\n}","/**\n * Some of the internal operations of micromark do lots of editing\n * operations on very large arrays. This runs into problems with two\n * properties of most circa-2020 JavaScript interpreters:\n *\n * - Array-length modifications at the high end of an array (push/pop) are\n * expected to be common and are implemented in (amortized) time\n * proportional to the number of elements added or removed, whereas\n * other operations (shift/unshift and splice) are much less efficient.\n * - Function arguments are passed on the stack, so adding tens of thousands\n * of elements to an array with `arr.push(...newElements)` will frequently\n * cause stack overflows. (see <https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why>)\n *\n * SpliceBuffers are an implementation of gap buffers, which are a\n * generalization of the \"queue made of two stacks\" idea. The splice buffer\n * maintains a cursor, and moving the cursor has cost proportional to the\n * distance the cursor moves, but inserting, deleting, or splicing in\n * new information at the cursor is as efficient as the push/pop operation.\n * This allows for an efficient sequence of splices (or pushes, pops, shifts,\n * or unshifts) as long such edits happen at the same part of the array or\n * generally sweep through the array from the beginning to the end.\n *\n * The interface for splice buffers also supports large numbers of inputs by\n * passing a single array argument rather passing multiple arguments on the\n * function call stack.\n *\n * @template T\n * Item type.\n */\nexport class SpliceBuffer {\n /**\n * @param {ReadonlyArray<T> | null | undefined} [initial]\n * Initial items (optional).\n * @returns\n * Splice buffer.\n */\n constructor(initial) {\n /** @type {Array<T>} */\n this.left = initial ? [...initial] : [];\n /** @type {Array<T>} */\n this.right = [];\n }\n\n /**\n * Array access;\n * does not move the cursor.\n *\n * @param {number} index\n * Index.\n * @return {T}\n * Item.\n */\n get(index) {\n if (index < 0 || index >= this.left.length + this.right.length) {\n throw new RangeError('Cannot access index `' + index + '` in a splice buffer of size `' + (this.left.length + this.right.length) + '`');\n }\n if (index < this.left.length) return this.left[index];\n return this.right[this.right.length - index + this.left.length - 1];\n }\n\n /**\n * The length of the splice buffer, one greater than the largest index in the\n * array.\n */\n get length() {\n return this.left.length + this.right.length;\n }\n\n /**\n * Remove and return `list[0]`;\n * moves the cursor to `0`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n shift() {\n this.setCursor(0);\n return this.right.pop();\n }\n\n /**\n * Slice the buffer to get an array;\n * does not move the cursor.\n *\n * @param {number} start\n * Start.\n * @param {number | null | undefined} [end]\n * End (optional).\n * @returns {Array<T>}\n * Array of items.\n */\n slice(start, end) {\n /** @type {number} */\n const stop = end === null || end === undefined ? Number.POSITIVE_INFINITY : end;\n if (stop < this.left.length) {\n return this.left.slice(start, stop);\n }\n if (start > this.left.length) {\n return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();\n }\n return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());\n }\n\n /**\n * Mimics the behavior of Array.prototype.splice() except for the change of\n * interface necessary to avoid segfaults when patching in very large arrays.\n *\n * This operation moves cursor is moved to `start` and results in the cursor\n * placed after any inserted items.\n *\n * @param {number} start\n * Start;\n * zero-based index at which to start changing the array;\n * negative numbers count backwards from the end of the array and values\n * that are out-of bounds are clamped to the appropriate end of the array.\n * @param {number | null | undefined} [deleteCount=0]\n * Delete count (default: `0`);\n * maximum number of elements to delete, starting from start.\n * @param {Array<T> | null | undefined} [items=[]]\n * Items to include in place of the deleted items (default: `[]`).\n * @return {Array<T>}\n * Any removed items.\n */\n splice(start, deleteCount, items) {\n /** @type {number} */\n const count = deleteCount || 0;\n this.setCursor(Math.trunc(start));\n const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);\n if (items) chunkedPush(this.left, items);\n return removed.reverse();\n }\n\n /**\n * Remove and return the highest-numbered item in the array, so\n * `list[list.length - 1]`;\n * Moves the cursor to `length`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n pop() {\n this.setCursor(Number.POSITIVE_INFINITY);\n return this.left.pop();\n }\n\n /**\n * Inserts a single item to the high-numbered side of the array;\n * moves the cursor to `length`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n push(item) {\n this.setCursor(Number.POSITIVE_INFINITY);\n this.left.push(item);\n }\n\n /**\n * Inserts many items to the high-numbered side of the array.\n * Moves the cursor to `length`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n pushMany(items) {\n this.setCursor(Number.POSITIVE_INFINITY);\n chunkedPush(this.left, items);\n }\n\n /**\n * Inserts a single item to the low-numbered side of the array;\n * Moves the cursor to `0`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n unshift(item) {\n this.setCursor(0);\n this.right.push(item);\n }\n\n /**\n * Inserts many items to the low-numbered side of the array;\n * moves the cursor to `0`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n unshiftMany(items) {\n this.setCursor(0);\n chunkedPush(this.right, items.reverse());\n }\n\n /**\n * Move the cursor to a specific position in the array. Requires\n * time proportional to the distance moved.\n *\n * If `n < 0`, the cursor will end up at the beginning.\n * If `n > length`, the cursor will end up at the end.\n *\n * @param {number} n\n * Position.\n * @return {undefined}\n * Nothing.\n */\n setCursor(n) {\n if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;\n if (n < this.left.length) {\n // Move cursor to the this.left\n const removed = this.left.splice(n, Number.POSITIVE_INFINITY);\n chunkedPush(this.right, removed.reverse());\n } else {\n // Move cursor to the this.right\n const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);\n chunkedPush(this.left, removed.reverse());\n }\n }\n}\n\n/**\n * Avoid stack overflow by pushing items onto the stack in segments\n *\n * @template T\n * Item type.\n * @param {Array<T>} list\n * List to inject into.\n * @param {ReadonlyArray<T>} right\n * Items to inject.\n * @return {undefined}\n * Nothing.\n */\nfunction chunkedPush(list, right) {\n /** @type {number} */\n let chunkStart = 0;\n if (right.length < 10000) {\n list.push(...right);\n } else {\n while (chunkStart < right.length) {\n list.push(...right.slice(chunkStart, chunkStart + 10000));\n chunkStart += 10000;\n }\n }\n}","/**\n * @import {Chunk, Event, Token} from 'micromark-util-types'\n */\n\nimport { splice } from 'micromark-util-chunked';\nimport { SpliceBuffer } from './lib/splice-buffer.js';\n\n// Hidden API exposed for testing.\nexport { SpliceBuffer } from './lib/splice-buffer.js';\n\n/**\n * Tokenize subcontent.\n *\n * @param {Array<Event>} eventsArray\n * List of events.\n * @returns {boolean}\n * Whether subtokens were found.\n */\n// eslint-disable-next-line complexity\nexport function subtokenize(eventsArray) {\n /** @type {Record<string, number>} */\n const jumps = {};\n let index = -1;\n /** @type {Event} */\n let event;\n /** @type {number | undefined} */\n let lineIndex;\n /** @type {number} */\n let otherIndex;\n /** @type {Event} */\n let otherEvent;\n /** @type {Array<Event>} */\n let parameters;\n /** @type {Array<Event>} */\n let subevents;\n /** @type {boolean | undefined} */\n let more;\n const events = new SpliceBuffer(eventsArray);\n while (++index < events.length) {\n while (index in jumps) {\n index = jumps[index];\n }\n event = events.get(index);\n\n // Add a hook for the GFM tasklist extension, which needs to know if text\n // is in the first content of a list item.\n if (index && event[1].type === \"chunkFlow\" && events.get(index - 1)[1].type === \"listItemPrefix\") {\n subevents = event[1]._tokenizer.events;\n otherIndex = 0;\n if (otherIndex < subevents.length && subevents[otherIndex][1].type === \"lineEndingBlank\") {\n otherIndex += 2;\n }\n if (otherIndex < subevents.length && subevents[otherIndex][1].type === \"content\") {\n while (++otherIndex < subevents.length) {\n if (subevents[otherIndex][1].type === \"content\") {\n break;\n }\n if (subevents[otherIndex][1].type === \"chunkText\") {\n subevents[otherIndex][1]._isInFirstContentOfListItem = true;\n otherIndex++;\n }\n }\n }\n }\n\n // Enter.\n if (event[0] === 'enter') {\n if (event[1].contentType) {\n Object.assign(jumps, subcontent(events, index));\n index = jumps[index];\n more = true;\n }\n }\n // Exit.\n else if (event[1]._container) {\n otherIndex = index;\n lineIndex = undefined;\n while (otherIndex--) {\n otherEvent = events.get(otherIndex);\n if (otherEvent[1].type === \"lineEnding\" || otherEvent[1].type === \"lineEndingBlank\") {\n if (otherEvent[0] === 'enter') {\n if (lineIndex) {\n events.get(lineIndex)[1].type = \"lineEndingBlank\";\n }\n otherEvent[1].type = \"lineEnding\";\n lineIndex = otherIndex;\n }\n } else if (otherEvent[1].type === \"linePrefix\" || otherEvent[1].type === \"listItemIndent\") {\n // Move past.\n } else {\n break;\n }\n }\n if (lineIndex) {\n // Fix position.\n event[1].end = {\n ...events.get(lineIndex)[1].start\n };\n\n // Switch container exit w/ line endings.\n parameters = events.slice(lineIndex, index);\n parameters.unshift(event);\n events.splice(lineIndex, index - lineIndex + 1, parameters);\n }\n }\n }\n\n // The changes to the `events` buffer must be copied back into the eventsArray\n splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));\n return !more;\n}\n\n/**\n * Tokenize embedded tokens.\n *\n * @param {SpliceBuffer<Event>} events\n * Events.\n * @param {number} eventIndex\n * Index.\n * @returns {Record<string, number>}\n * Gaps.\n */\nfunction subcontent(events, eventIndex) {\n const token = events.get(eventIndex)[1];\n const context = events.get(eventIndex)[2];\n let startPosition = eventIndex - 1;\n /** @type {Array<number>} */\n const startPositions = [];\n let tokenizer = token._tokenizer;\n if (!tokenizer) {\n tokenizer = context.parser[token.contentType](token.start);\n if (token._contentTypeTextTrailing) {\n tokenizer._contentTypeTextTrailing = true;\n }\n }\n const childEvents = tokenizer.events;\n /** @type {Array<[number, number]>} */\n const jumps = [];\n /** @type {Record<string, number>} */\n const gaps = {};\n /** @type {Array<Chunk>} */\n let stream;\n /** @type {Token | undefined} */\n let previous;\n let index = -1;\n /** @type {Token | undefined} */\n let current = token;\n let adjust = 0;\n let start = 0;\n const breaks = [start];\n\n // Loop forward through the linked tokens to pass them in order to the\n // subtokenizer.\n while (current) {\n // Find the position of the event for this token.\n while (events.get(++startPosition)[1] !== current) {\n // Empty.\n }\n startPositions.push(startPosition);\n if (!current._tokenizer) {\n stream = context.sliceStream(current);\n if (!current.next) {\n stream.push(null);\n }\n if (previous) {\n tokenizer.defineSkip(current.start);\n }\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = true;\n }\n tokenizer.write(stream);\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = undefined;\n }\n }\n\n // Unravel the next token.\n previous = current;\n current = current.next;\n }\n\n // Now, loop back through all events (and linked tokens), to figure out which\n // parts belong where.\n current = token;\n while (++index < childEvents.length) {\n if (\n // Find a void token that includes a break.\n childEvents[index][0] === 'exit' && childEvents[index - 1][0] === 'enter' && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) {\n start = index + 1;\n breaks.push(start);\n // Help GC.\n current._tokenizer = undefined;\n current.previous = undefined;\n current = current.next;\n }\n }\n\n // Help GC.\n tokenizer.events = [];\n\n // If there’s one more token (which is the cases for lines that end in an\n // EOF), that’s perfect: the last point we found starts it.\n // If there isn’t then make sure any remaining content is added to it.\n if (current) {\n // Help GC.\n current._tokenizer = undefined;\n current.previous = undefined;\n } else {\n breaks.pop();\n }\n\n // Now splice the events from the subtokenizer into the current events,\n // moving back to front so that splice indices aren’t affected.\n index = breaks.length;\n while (index--) {\n const slice = childEvents.slice(breaks[index], breaks[index + 1]);\n const start = startPositions.pop();\n jumps.push([start, start + slice.length - 1]);\n events.splice(start, 2, slice);\n }\n jumps.reverse();\n index = -1;\n while (++index < jumps.length) {\n gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];\n adjust += jumps[index][1] - jumps[index][0] - 1;\n }\n return gaps;\n}","/**\n * @import {\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { subtokenize } from 'micromark-util-subtokenize';\n/**\n * No name because it must not be turned off.\n * @type {Construct}\n */\nexport const content = {\n resolve: resolveContent,\n tokenize: tokenizeContent\n};\n\n/** @type {Construct} */\nconst continuationConstruct = {\n partial: true,\n tokenize: tokenizeContinuation\n};\n\n/**\n * Content is transparent: it’s parsed right now. That way, definitions are also\n * parsed right now: before text in paragraphs (specifically, media) are parsed.\n *\n * @type {Resolver}\n */\nfunction resolveContent(events) {\n subtokenize(events);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeContent(effects, ok) {\n /** @type {Token | undefined} */\n let previous;\n return chunkStart;\n\n /**\n * Before a content chunk.\n *\n * ```markdown\n * > | abc\n * ^\n * ```\n *\n * @type {State}\n */\n function chunkStart(code) {\n effects.enter(\"content\");\n previous = effects.enter(\"chunkContent\", {\n contentType: \"content\"\n });\n return chunkInside(code);\n }\n\n /**\n * In a content chunk.\n *\n * ```markdown\n * > | abc\n * ^^^\n * ```\n *\n * @type {State}\n */\n function chunkInside(code) {\n if (code === null) {\n return contentEnd(code);\n }\n\n // To do: in `markdown-rs`, each line is parsed on its own, and everything\n // is stitched together resolving.\n if (markdownLineEnding(code)) {\n return effects.check(continuationConstruct, contentContinue, contentEnd)(code);\n }\n\n // Data.\n effects.consume(code);\n return chunkInside;\n }\n\n /**\n *\n *\n * @type {State}\n */\n function contentEnd(code) {\n effects.exit(\"chunkContent\");\n effects.exit(\"content\");\n return ok(code);\n }\n\n /**\n *\n *\n * @type {State}\n */\n function contentContinue(code) {\n effects.consume(code);\n effects.exit(\"chunkContent\");\n previous.next = effects.enter(\"chunkContent\", {\n contentType: \"content\",\n previous\n });\n previous = previous.next;\n return chunkInside;\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeContinuation(effects, ok, nok) {\n const self = this;\n return startLookahead;\n\n /**\n *\n *\n * @type {State}\n */\n function startLookahead(code) {\n effects.exit(\"chunkContent\");\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, prefixed, \"linePrefix\");\n }\n\n /**\n *\n *\n * @type {State}\n */\n function prefixed(code) {\n if (code === null || markdownLineEnding(code)) {\n return nok(code);\n }\n\n // Always populated by defaults.\n\n const tail = self.events[self.events.length - 1];\n if (!self.parser.constructs.disable.null.includes('codeIndented') && tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4) {\n return ok(code);\n }\n return effects.interrupt(self.parser.constructs.flow, nok, ok)(code);\n }\n}","/**\n * @import {Effects, State, TokenType} from 'micromark-util-types'\n */\n\nimport { asciiControl, markdownLineEndingOrSpace, markdownLineEnding } from 'micromark-util-character';\n/**\n * Parse destinations.\n *\n * ###### Examples\n *\n * ```markdown\n * <a>\n * <a\\>b>\n * <a b>\n * <a)>\n * a\n * a\\)b\n * a(b)c\n * a(b)\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type for whole (`<a>` or `b`).\n * @param {TokenType} literalType\n * Type when enclosed (`<a>`).\n * @param {TokenType} literalMarkerType\n * Type for enclosing (`<` and `>`).\n * @param {TokenType} rawType\n * Type when not enclosed (`b`).\n * @param {TokenType} stringType\n * Type for the value (`a` or `b`).\n * @param {number | undefined} [max=Infinity]\n * Depth of nested parens (inclusive).\n * @returns {State}\n * Start state.\n */\nexport function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) {\n const limit = max || Number.POSITIVE_INFINITY;\n let balance = 0;\n return start;\n\n /**\n * Start of destination.\n *\n * ```markdown\n * > | <aa>\n * ^\n * > | aa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 60) {\n effects.enter(type);\n effects.enter(literalType);\n effects.enter(literalMarkerType);\n effects.consume(code);\n effects.exit(literalMarkerType);\n return enclosedBefore;\n }\n\n // ASCII control, space, closing paren.\n if (code === null || code === 32 || code === 41 || asciiControl(code)) {\n return nok(code);\n }\n effects.enter(type);\n effects.enter(rawType);\n effects.enter(stringType);\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return raw(code);\n }\n\n /**\n * After `<`, at an enclosed destination.\n *\n * ```markdown\n * > | <aa>\n * ^\n * ```\n *\n * @type {State}\n */\n function enclosedBefore(code) {\n if (code === 62) {\n effects.enter(literalMarkerType);\n effects.consume(code);\n effects.exit(literalMarkerType);\n effects.exit(literalType);\n effects.exit(type);\n return ok;\n }\n effects.enter(stringType);\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return enclosed(code);\n }\n\n /**\n * In enclosed destination.\n *\n * ```markdown\n * > | <aa>\n * ^\n * ```\n *\n * @type {State}\n */\n function enclosed(code) {\n if (code === 62) {\n effects.exit(\"chunkString\");\n effects.exit(stringType);\n return enclosedBefore(code);\n }\n if (code === null || code === 60 || markdownLineEnding(code)) {\n return nok(code);\n }\n effects.consume(code);\n return code === 92 ? enclosedEscape : enclosed;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | <a\\*a>\n * ^\n * ```\n *\n * @type {State}\n */\n function enclosedEscape(code) {\n if (code === 60 || code === 62 || code === 92) {\n effects.consume(code);\n return enclosed;\n }\n return enclosed(code);\n }\n\n /**\n * In raw destination.\n *\n * ```markdown\n * > | aa\n * ^\n * ```\n *\n * @type {State}\n */\n function raw(code) {\n if (!balance && (code === null || code === 41 || markdownLineEndingOrSpace(code))) {\n effects.exit(\"chunkString\");\n effects.exit(stringType);\n effects.exit(rawType);\n effects.exit(type);\n return ok(code);\n }\n if (balance < limit && code === 40) {\n effects.consume(code);\n balance++;\n return raw;\n }\n if (code === 41) {\n effects.consume(code);\n balance--;\n return raw;\n }\n\n // ASCII control (but *not* `\\0`) and space and `(`.\n // Note: in `markdown-rs`, `\\0` exists in codes, in `micromark-js` it\n // doesn’t.\n if (code === null || code === 32 || code === 40 || asciiControl(code)) {\n return nok(code);\n }\n effects.consume(code);\n return code === 92 ? rawEscape : raw;\n }\n\n /**\n * After `\\`, at special character.\n *\n * ```markdown\n * > | a\\*a\n * ^\n * ```\n *\n * @type {State}\n */\n function rawEscape(code) {\n if (code === 40 || code === 41 || code === 92) {\n effects.consume(code);\n return raw;\n }\n return raw(code);\n }\n}","/**\n * @import {\n * Effects,\n * State,\n * TokenizeContext,\n * TokenType\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/**\n * Parse labels.\n *\n * > 👉 **Note**: labels in markdown are capped at 999 characters in the string.\n *\n * ###### Examples\n *\n * ```markdown\n * [a]\n * [a\n * b]\n * [a\\]b]\n * ```\n *\n * @this {TokenizeContext}\n * Tokenize context.\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type of the whole label (`[a]`).\n * @param {TokenType} markerType\n * Type for the markers (`[` and `]`).\n * @param {TokenType} stringType\n * Type for the identifier (`a`).\n * @returns {State}\n * Start state.\n */\nexport function factoryLabel(effects, ok, nok, type, markerType, stringType) {\n const self = this;\n let size = 0;\n /** @type {boolean} */\n let seen;\n return start;\n\n /**\n * Start of label.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(type);\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n effects.enter(stringType);\n return atBreak;\n }\n\n /**\n * In label, at something, before something else.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (size > 999 || code === null || code === 91 || code === 93 && !seen ||\n // To do: remove in the future once we’ve switched from\n // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,\n // which doesn’t need this.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n code === 94 && !size && '_hiddenFootnoteSupport' in self.parser.constructs) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit(stringType);\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n effects.exit(type);\n return ok;\n }\n\n // To do: indent? Link chunks and EOLs together?\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return atBreak;\n }\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return labelInside(code);\n }\n\n /**\n * In label, in text.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (code === null || code === 91 || code === 93 || markdownLineEnding(code) || size++ > 999) {\n effects.exit(\"chunkString\");\n return atBreak(code);\n }\n effects.consume(code);\n if (!seen) seen = !markdownSpace(code);\n return code === 92 ? labelEscape : labelInside;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | [a\\*a]\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return labelInside;\n }\n return labelInside(code);\n }\n}","/**\n * @import {\n * Code,\n * Effects,\n * State,\n * TokenType\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/**\n * Parse titles.\n *\n * ###### Examples\n *\n * ```markdown\n * \"a\"\n * 'b'\n * (c)\n * \"a\n * b\"\n * 'a\n * b'\n * (a\\)b)\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type of the whole title (`\"a\"`, `'b'`, `(c)`).\n * @param {TokenType} markerType\n * Type for the markers (`\"`, `'`, `(`, and `)`).\n * @param {TokenType} stringType\n * Type for the value (`a`).\n * @returns {State}\n * Start state.\n */\nexport function factoryTitle(effects, ok, nok, type, markerType, stringType) {\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Start of title.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 34 || code === 39 || code === 40) {\n effects.enter(type);\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n marker = code === 40 ? 41 : code;\n return begin;\n }\n return nok(code);\n }\n\n /**\n * After opening marker.\n *\n * This is also used at the closing marker.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function begin(code) {\n if (code === marker) {\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n effects.exit(type);\n return ok;\n }\n effects.enter(stringType);\n return atBreak(code);\n }\n\n /**\n * At something, before something else.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === marker) {\n effects.exit(stringType);\n return begin(marker);\n }\n if (code === null) {\n return nok(code);\n }\n\n // Note: blank lines can’t exist in content.\n if (markdownLineEnding(code)) {\n // To do: use `space_or_tab_eol_with_options`, connect.\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, atBreak, \"linePrefix\");\n }\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return inside(code);\n }\n\n /**\n *\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker || code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n return atBreak(code);\n }\n effects.consume(code);\n return code === 92 ? escape : inside;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | \"a\\*b\"\n * ^\n * ```\n *\n * @type {State}\n */\n function escape(code) {\n if (code === marker || code === 92) {\n effects.consume(code);\n return inside;\n }\n return inside(code);\n }\n}","/**\n * @import {Effects, State} from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/**\n * Parse spaces and tabs.\n *\n * There is no `nok` parameter:\n *\n * * line endings or spaces in markdown are often optional, in which case this\n * factory can be used and `ok` will be switched to whether spaces were found\n * or not\n * * one line ending or space can be detected with\n * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace`\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @returns {State}\n * Start state.\n */\nexport function factoryWhitespace(effects, ok) {\n /** @type {boolean} */\n let seen;\n return start;\n\n /** @type {State} */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n seen = true;\n return start;\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, start, seen ? \"linePrefix\" : \"lineSuffix\")(code);\n }\n return ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factorySpace } from 'micromark-factory-space';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\n/** @type {Construct} */\nexport const definition = {\n name: 'definition',\n tokenize: tokenizeDefinition\n};\n\n/** @type {Construct} */\nconst titleBefore = {\n partial: true,\n tokenize: tokenizeTitleBefore\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeDefinition(effects, ok, nok) {\n const self = this;\n /** @type {string} */\n let identifier;\n return start;\n\n /**\n * At start of a definition.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Do not interrupt paragraphs (but do follow definitions).\n // To do: do `interrupt` the way `markdown-rs` does.\n // To do: parse whitespace the way `markdown-rs` does.\n effects.enter(\"definition\");\n return before(code);\n }\n\n /**\n * After optional whitespace, at `[`.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n // To do: parse whitespace the way `markdown-rs` does.\n\n return factoryLabel.call(self, effects, labelAfter,\n // Note: we don’t need to reset the way `markdown-rs` does.\n nok, \"definitionLabel\", \"definitionLabelMarker\", \"definitionLabelString\")(code);\n }\n\n /**\n * After label.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n identifier = normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1));\n if (code === 58) {\n effects.enter(\"definitionMarker\");\n effects.consume(code);\n effects.exit(\"definitionMarker\");\n return markerAfter;\n }\n return nok(code);\n }\n\n /**\n * After marker.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function markerAfter(code) {\n // Note: whitespace is optional.\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code);\n }\n\n /**\n * Before destination.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function destinationBefore(code) {\n return factoryDestination(effects, destinationAfter,\n // Note: we don’t need to reset the way `markdown-rs` does.\n nok, \"definitionDestination\", \"definitionDestinationLiteral\", \"definitionDestinationLiteralMarker\", \"definitionDestinationRaw\", \"definitionDestinationString\")(code);\n }\n\n /**\n * After destination.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function destinationAfter(code) {\n return effects.attempt(titleBefore, after, after)(code);\n }\n\n /**\n * After definition.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return markdownSpace(code) ? factorySpace(effects, afterWhitespace, \"whitespace\")(code) : afterWhitespace(code);\n }\n\n /**\n * After definition, after optional whitespace.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function afterWhitespace(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"definition\");\n\n // Note: we don’t care about uniqueness.\n // It’s likely that that doesn’t happen very frequently.\n // It is more likely that it wastes precious time.\n self.parser.defined.push(identifier);\n\n // To do: `markdown-rs` interrupt.\n // // You’d be interrupting.\n // tokenizer.interrupt = true\n return ok(code);\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeTitleBefore(effects, ok, nok) {\n return titleBefore;\n\n /**\n * After destination, at whitespace.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code);\n }\n\n /**\n * At title.\n *\n * ```markdown\n * | [a]: b\n * > | \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeMarker(code) {\n return factoryTitle(effects, titleAfter, nok, \"definitionTitle\", \"definitionTitleMarker\", \"definitionTitleString\")(code);\n }\n\n /**\n * After title.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleAfter(code) {\n return markdownSpace(code) ? factorySpace(effects, titleAfterOptionalWhitespace, \"whitespace\")(code) : titleAfterOptionalWhitespace(code);\n }\n\n /**\n * After title, after optional whitespace.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleAfterOptionalWhitespace(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start;\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"hardBreakEscape\");\n effects.consume(code);\n return after;\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit(\"hardBreakEscape\");\n return ok(code);\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\nimport { splice } from 'micromark-util-chunked';\n/** @type {Construct} */\nexport const headingAtx = {\n name: 'headingAtx',\n resolve: resolveHeadingAtx,\n tokenize: tokenizeHeadingAtx\n};\n\n/** @type {Resolver} */\nfunction resolveHeadingAtx(events, context) {\n let contentEnd = events.length - 2;\n let contentStart = 3;\n /** @type {Token} */\n let content;\n /** @type {Token} */\n let text;\n\n // Prefix whitespace, part of the opening.\n if (events[contentStart][1].type === \"whitespace\") {\n contentStart += 2;\n }\n\n // Suffix whitespace, part of the closing.\n if (contentEnd - 2 > contentStart && events[contentEnd][1].type === \"whitespace\") {\n contentEnd -= 2;\n }\n if (events[contentEnd][1].type === \"atxHeadingSequence\" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === \"whitespace\")) {\n contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;\n }\n if (contentEnd > contentStart) {\n content = {\n type: \"atxHeadingText\",\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end\n };\n text = {\n type: \"chunkText\",\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end,\n contentType: \"text\"\n };\n splice(events, contentStart, contentEnd - contentStart + 1, [['enter', content, context], ['enter', text, context], ['exit', text, context], ['exit', content, context]]);\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHeadingAtx(effects, ok, nok) {\n let size = 0;\n return start;\n\n /**\n * Start of a heading (atx).\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse indent like `markdown-rs`.\n effects.enter(\"atxHeading\");\n return before(code);\n }\n\n /**\n * After optional whitespace, at `#`.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"atxHeadingSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 35 && size++ < 6) {\n effects.consume(code);\n return sequenceOpen;\n }\n\n // Always at least one `#`.\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit(\"atxHeadingSequence\");\n return atBreak(code);\n }\n return nok(code);\n }\n\n /**\n * After something, before something else.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === 35) {\n effects.enter(\"atxHeadingSequence\");\n return sequenceFurther(code);\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"atxHeading\");\n // To do: interrupt like `markdown-rs`.\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n return ok(code);\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, atBreak, \"whitespace\")(code);\n }\n\n // To do: generate `data` tokens, add the `text` token later.\n // Needs edit map, see: `markdown.rs`.\n effects.enter(\"atxHeadingText\");\n return data(code);\n }\n\n /**\n * In further sequence (after whitespace).\n *\n * Could be normal “visible” hashes in the heading or a final sequence.\n *\n * ```markdown\n * > | ## aa ##\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceFurther(code) {\n if (code === 35) {\n effects.consume(code);\n return sequenceFurther;\n }\n effects.exit(\"atxHeadingSequence\");\n return atBreak(code);\n }\n\n /**\n * In text.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {\n effects.exit(\"atxHeadingText\");\n return atBreak(code);\n }\n effects.consume(code);\n return data;\n }\n}","/**\n * List of lowercase HTML “block” tag names.\n *\n * The list, when parsing HTML (flow), results in more relaxed rules (condition\n * 6).\n * Because they are known blocks, the HTML-like syntax doesn’t have to be\n * strictly parsed.\n * For tag names not in this list, a more strict algorithm (condition 7) is used\n * to detect whether the HTML-like syntax is seen as HTML (flow) or not.\n *\n * This is copied from:\n * <https://spec.commonmark.org/0.30/#html-blocks>.\n *\n * > 👉 **Note**: `search` was added in `CommonMark@0.31`.\n */\nexport const htmlBlockNames = [\n 'address',\n 'article',\n 'aside',\n 'base',\n 'basefont',\n 'blockquote',\n 'body',\n 'caption',\n 'center',\n 'col',\n 'colgroup',\n 'dd',\n 'details',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'frame',\n 'frameset',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hr',\n 'html',\n 'iframe',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'menu',\n 'menuitem',\n 'nav',\n 'noframes',\n 'ol',\n 'optgroup',\n 'option',\n 'p',\n 'param',\n 'search',\n 'section',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n]\n\n/**\n * List of lowercase HTML “raw” tag names.\n *\n * The list, when parsing HTML (flow), results in HTML that can include lines\n * without exiting, until a closing tag also in this list is found (condition\n * 1).\n *\n * This module is copied from:\n * <https://spec.commonmark.org/0.30/#html-blocks>.\n *\n * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`.\n */\nexport const htmlRawNames = ['pre', 'script', 'style', 'textarea']\n","/**\n * @import {\n * Code,\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiAlphanumeric, asciiAlpha, markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\nimport { htmlBlockNames, htmlRawNames } from 'micromark-util-html-tag-name';\nimport { blankLine } from './blank-line.js';\n\n/** @type {Construct} */\nexport const htmlFlow = {\n concrete: true,\n name: 'htmlFlow',\n resolveTo: resolveToHtmlFlow,\n tokenize: tokenizeHtmlFlow\n};\n\n/** @type {Construct} */\nconst blankLineBefore = {\n partial: true,\n tokenize: tokenizeBlankLineBefore\n};\nconst nonLazyContinuationStart = {\n partial: true,\n tokenize: tokenizeNonLazyContinuationStart\n};\n\n/** @type {Resolver} */\nfunction resolveToHtmlFlow(events) {\n let index = events.length;\n while (index--) {\n if (events[index][0] === 'enter' && events[index][1].type === \"htmlFlow\") {\n break;\n }\n }\n if (index > 1 && events[index - 2][1].type === \"linePrefix\") {\n // Add the prefix start to the HTML token.\n events[index][1].start = events[index - 2][1].start;\n // Add the prefix start to the HTML line token.\n events[index + 1][1].start = events[index - 2][1].start;\n // Remove the line prefix.\n events.splice(index - 2, 2);\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlFlow(effects, ok, nok) {\n const self = this;\n /** @type {number} */\n let marker;\n /** @type {boolean} */\n let closingTag;\n /** @type {string} */\n let buffer;\n /** @type {number} */\n let index;\n /** @type {Code} */\n let markerB;\n return start;\n\n /**\n * Start of HTML (flow).\n *\n * ```markdown\n * > | <x />\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse indent like `markdown-rs`.\n return before(code);\n }\n\n /**\n * At `<`, after optional whitespace.\n *\n * ```markdown\n * > | <x />\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"htmlFlow\");\n effects.enter(\"htmlFlowData\");\n effects.consume(code);\n return open;\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | <x />\n * ^\n * > | <!doctype>\n * ^\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code);\n return declarationOpen;\n }\n if (code === 47) {\n effects.consume(code);\n closingTag = true;\n return tagCloseStart;\n }\n if (code === 63) {\n effects.consume(code);\n marker = 3;\n // To do:\n // tokenizer.concrete = true\n // To do: use `markdown-rs` style interrupt.\n // While we’re in an instruction instead of a declaration, we’re on a `?`\n // right now, so we do need to search for `>`, similar to declarations.\n return self.interrupt ? ok : continuationDeclarationInside;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n // Always the case.\n effects.consume(code);\n buffer = String.fromCharCode(code);\n return tagName;\n }\n return nok(code);\n }\n\n /**\n * After `<!`, at declaration, comment, or CDATA.\n *\n * ```markdown\n * > | <!doctype>\n * ^\n * > | <!--xxx-->\n * ^\n * > | <![CDATA[>&<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code);\n marker = 2;\n return commentOpenInside;\n }\n if (code === 91) {\n effects.consume(code);\n marker = 5;\n index = 0;\n return cdataOpenInside;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n marker = 4;\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside;\n }\n return nok(code);\n }\n\n /**\n * After `<!-`, inside a comment, at another `-`.\n *\n * ```markdown\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code);\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside;\n }\n return nok(code);\n }\n\n /**\n * After `<![`, inside CDATA, expecting `CDATA[`.\n *\n * ```markdown\n * > | <![CDATA[>&<]]>\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = \"CDATA[\";\n if (code === value.charCodeAt(index++)) {\n effects.consume(code);\n if (index === value.length) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation;\n }\n return cdataOpenInside;\n }\n return nok(code);\n }\n\n /**\n * After `</`, in closing tag, at tag name.\n *\n * ```markdown\n * > | </x>\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n // Always the case.\n effects.consume(code);\n buffer = String.fromCharCode(code);\n return tagName;\n }\n return nok(code);\n }\n\n /**\n * In tag name.\n *\n * ```markdown\n * > | <ab>\n * ^^\n * > | </ab>\n * ^^\n * ```\n *\n * @type {State}\n */\n function tagName(code) {\n if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n const slash = code === 47;\n const name = buffer.toLowerCase();\n if (!slash && !closingTag && htmlRawNames.includes(name)) {\n marker = 1;\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code);\n }\n if (htmlBlockNames.includes(buffer.toLowerCase())) {\n marker = 6;\n if (slash) {\n effects.consume(code);\n return basicSelfClosing;\n }\n\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code);\n }\n marker = 7;\n // Do not support complete HTML when interrupting.\n return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code);\n }\n\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n buffer += String.fromCharCode(code);\n return tagName;\n }\n return nok(code);\n }\n\n /**\n * After closing slash of a basic tag name.\n *\n * ```markdown\n * > | <div/>\n * ^\n * ```\n *\n * @type {State}\n */\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code);\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation;\n }\n return nok(code);\n }\n\n /**\n * After closing slash of a complete tag name.\n *\n * ```markdown\n * > | <x/>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeClosingTagAfter;\n }\n return completeEnd(code);\n }\n\n /**\n * At an attribute name.\n *\n * At first, this state is used after a complete tag name, after whitespace,\n * where it expects optional attributes or the end of the tag.\n * It is also reused after attributes, when expecting more optional\n * attributes.\n *\n * ```markdown\n * > | <a />\n * ^\n * > | <a :b>\n * ^\n * > | <a _b>\n * ^\n * > | <a b>\n * ^\n * > | <a >\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code);\n return completeEnd;\n }\n\n // ASCII alphanumerical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code);\n return completeAttributeName;\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAttributeNameBefore;\n }\n return completeEnd(code);\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | <a :b>\n * ^\n * > | <a _b>\n * ^\n * > | <a b>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeName(code) {\n // ASCII alphanumerical and `-`, `.`, `:`, and `_`.\n if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return completeAttributeName;\n }\n return completeAttributeNameAfter(code);\n }\n\n /**\n * After attribute name, at an optional initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | <a b>\n * ^\n * > | <a b=c>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code);\n return completeAttributeValueBefore;\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAttributeNameAfter;\n }\n return completeAttributeNameBefore(code);\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | <a b=c>\n * ^\n * > | <a b=\"c\">\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueBefore(code) {\n if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {\n return nok(code);\n }\n if (code === 34 || code === 39) {\n effects.consume(code);\n markerB = code;\n return completeAttributeValueQuoted;\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAttributeValueBefore;\n }\n return completeAttributeValueUnquoted(code);\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | <a b=\"c\">\n * ^\n * > | <a b='c'>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuoted(code) {\n if (code === markerB) {\n effects.consume(code);\n markerB = null;\n return completeAttributeValueQuotedAfter;\n }\n if (code === null || markdownLineEnding(code)) {\n return nok(code);\n }\n effects.consume(code);\n return completeAttributeValueQuoted;\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | <a b=c>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueUnquoted(code) {\n if (code === null || code === 34 || code === 39 || code === 47 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code)) {\n return completeAttributeNameAfter(code);\n }\n effects.consume(code);\n return completeAttributeValueUnquoted;\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the\n * end of the tag.\n *\n * ```markdown\n * > | <a b=\"c\">\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code);\n }\n return nok(code);\n }\n\n /**\n * In certain circumstances of a complete tag where only an `>` is allowed.\n *\n * ```markdown\n * > | <a b=\"c\">\n * ^\n * ```\n *\n * @type {State}\n */\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code);\n return completeAfter;\n }\n return nok(code);\n }\n\n /**\n * After `>` in a complete tag.\n *\n * ```markdown\n * > | <x>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return continuation(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAfter;\n }\n return nok(code);\n }\n\n /**\n * In continuation of any HTML kind.\n *\n * ```markdown\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function continuation(code) {\n if (code === 45 && marker === 2) {\n effects.consume(code);\n return continuationCommentInside;\n }\n if (code === 60 && marker === 1) {\n effects.consume(code);\n return continuationRawTagOpen;\n }\n if (code === 62 && marker === 4) {\n effects.consume(code);\n return continuationClose;\n }\n if (code === 63 && marker === 3) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n if (code === 93 && marker === 5) {\n effects.consume(code);\n return continuationCdataInside;\n }\n if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {\n effects.exit(\"htmlFlowData\");\n return effects.check(blankLineBefore, continuationAfter, continuationStart)(code);\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"htmlFlowData\");\n return continuationStart(code);\n }\n effects.consume(code);\n return continuation;\n }\n\n /**\n * In continuation, at eol.\n *\n * ```markdown\n * > | <x>\n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStart(code) {\n return effects.check(nonLazyContinuationStart, continuationStartNonLazy, continuationAfter)(code);\n }\n\n /**\n * In continuation, at eol, before non-lazy content.\n *\n * ```markdown\n * > | <x>\n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStartNonLazy(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return continuationBefore;\n }\n\n /**\n * In continuation, before non-lazy content.\n *\n * ```markdown\n * | <x>\n * > | asd\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return continuationStart(code);\n }\n effects.enter(\"htmlFlowData\");\n return continuation(code);\n }\n\n /**\n * In comment continuation, after one `-`, expecting another.\n *\n * ```markdown\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In raw continuation, after `<`, at `/`.\n *\n * ```markdown\n * > | <script>console.log(1)</script>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code);\n buffer = '';\n return continuationRawEndTag;\n }\n return continuation(code);\n }\n\n /**\n * In raw continuation, after `</`, in a raw tag name.\n *\n * ```markdown\n * > | <script>console.log(1)</script>\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase();\n if (htmlRawNames.includes(name)) {\n effects.consume(code);\n return continuationClose;\n }\n return continuation(code);\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n // Always the case.\n effects.consume(code);\n buffer += String.fromCharCode(code);\n return continuationRawEndTag;\n }\n return continuation(code);\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | <![CDATA[>&<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | <!-->\n * ^\n * > | <?>\n * ^\n * > | <!q>\n * ^\n * > | <!--ab-->\n * ^\n * > | <![CDATA[>&<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code);\n return continuationClose;\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | <!doctype>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"htmlFlowData\");\n return continuationAfter(code);\n }\n effects.consume(code);\n return continuationClose;\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | <!doctype>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit(\"htmlFlow\");\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start;\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > | <div>\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return effects.attempt(blankLine, ok, nok);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiAlphanumeric, asciiAlpha, markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable<Code> | undefined} */\n let marker;\n /** @type {number} */\n let index;\n /** @type {State} */\n let returnState;\n return start;\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"htmlText\");\n effects.enter(\"htmlTextData\");\n effects.consume(code);\n return open;\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * > | a <!doctype> c\n * ^\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code);\n return declarationOpen;\n }\n if (code === 47) {\n effects.consume(code);\n return tagCloseStart;\n }\n if (code === 63) {\n effects.consume(code);\n return instruction;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagOpen;\n }\n return nok(code);\n }\n\n /**\n * After `<!`, at declaration, comment, or CDATA.\n *\n * ```markdown\n * > | a <!doctype> c\n * ^\n * > | a <!--b--> c\n * ^\n * > | a <![CDATA[>&<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code);\n return commentOpenInside;\n }\n if (code === 91) {\n effects.consume(code);\n index = 0;\n return cdataOpenInside;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return declaration;\n }\n return nok(code);\n }\n\n /**\n * In a comment, after `<!-`, at another `-`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return nok(code);\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 45) {\n effects.consume(code);\n return commentClose;\n }\n if (markdownLineEnding(code)) {\n returnState = comment;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return comment;\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return comment(code);\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code);\n }\n\n /**\n * After `<![`, in CDATA, expecting `CDATA[`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = \"CDATA[\";\n if (code === value.charCodeAt(index++)) {\n effects.consume(code);\n return index === value.length ? cdata : cdataOpenInside;\n }\n return nok(code);\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataClose;\n }\n if (markdownLineEnding(code)) {\n returnState = cdata;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return cdata;\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a <!b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code);\n }\n if (markdownLineEnding(code)) {\n returnState = declaration;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return declaration;\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a <?b?> c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 63) {\n effects.consume(code);\n return instructionClose;\n }\n if (markdownLineEnding(code)) {\n returnState = instruction;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return instruction;\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a <?b?> c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code);\n }\n\n /**\n * After `</`, in closing tag, at tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagClose;\n }\n return nok(code);\n }\n\n /**\n * After `</x`, in a tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagClose;\n }\n return tagCloseBetween(code);\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagCloseBetween;\n }\n return end(code);\n }\n\n /**\n * After `<x`, in opening tag name.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpen;\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code);\n return end;\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenBetween;\n }\n return end(code);\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a <b c> d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n return tagOpenAttributeNameAfter(code);\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a <b c> d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeNameAfter;\n }\n return tagOpenBetween(code);\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a <b c=d> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {\n return nok(code);\n }\n if (code === 34 || code === 39) {\n effects.consume(code);\n marker = code;\n return tagOpenAttributeValueQuoted;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code);\n marker = undefined;\n return tagOpenAttributeValueQuotedAfter;\n }\n if (code === null) {\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueQuoted;\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a <b c=d> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) {\n return nok(code);\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code);\n effects.exit(\"htmlTextData\");\n effects.exit(\"htmlText\");\n return ok;\n }\n return nok(code);\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a <!--a\n * ^\n * | b-->\n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit(\"htmlTextData\");\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineEndingAfter;\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a <!--a\n * > | b-->\n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code) ? factorySpace(effects, lineEndingAfterPrefix, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : lineEndingAfterPrefix(code);\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a <!--a\n * > | b-->\n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter(\"htmlTextData\");\n return returnState(code);\n }\n}","/**\n * @import {\n * Construct,\n * Event,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n resolveAll: resolveAllLabelEnd,\n resolveTo: resolveToLabelEnd,\n tokenize: tokenizeLabelEnd\n};\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n};\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n};\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n};\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1;\n /** @type {Array<Event>} */\n const newEvents = [];\n while (++index < events.length) {\n const token = events[index][1];\n newEvents.push(events[index]);\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n const offset = token.type === \"labelImage\" ? 4 : 2;\n token.type = \"data\";\n index += offset;\n }\n }\n\n // If the events are equal, we don't have to copy newEvents to events\n if (events.length !== newEvents.length) {\n splice(events, 0, events.length, newEvents);\n }\n return events;\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length;\n let offset = 0;\n /** @type {Token} */\n let token;\n /** @type {number | undefined} */\n let open;\n /** @type {number | undefined} */\n let close;\n /** @type {Array<Event>} */\n let media;\n\n // Find an opening.\n while (index--) {\n token = events[index][1];\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (token.type === \"link\" || token.type === \"labelLink\" && token._inactive) {\n break;\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === \"labelLink\") {\n token._inactive = true;\n }\n } else if (close) {\n if (events[index][0] === 'enter' && (token.type === \"labelImage\" || token.type === \"labelLink\") && !token._balanced) {\n open = index;\n if (token.type !== \"labelLink\") {\n offset = 2;\n break;\n }\n }\n } else if (token.type === \"labelEnd\") {\n close = index;\n }\n }\n const group = {\n type: events[open][1].type === \"labelLink\" ? \"link\" : \"image\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n const label = {\n type: \"label\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[close][1].end\n }\n };\n const text = {\n type: \"labelText\",\n start: {\n ...events[open + offset + 2][1].end\n },\n end: {\n ...events[close - 2][1].start\n }\n };\n media = [['enter', group, context], ['enter', label, context]];\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3));\n\n // Text open.\n media = push(media, [['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));\n\n // Text close, marker close, label close.\n media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]);\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1));\n\n // Media close.\n media = push(media, [['exit', group, context]]);\n splice(events, open, events.length, media);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n /** @type {Token} */\n let labelStart;\n /** @type {boolean} */\n let defined;\n\n // Find an opening.\n while (index--) {\n if ((self.events[index][1].type === \"labelImage\" || self.events[index][1].type === \"labelLink\") && !self.events[index][1]._balanced) {\n labelStart = self.events[index][1];\n break;\n }\n }\n return start;\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code);\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code);\n }\n defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })));\n effects.enter(\"labelEnd\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelEnd\");\n return after;\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code);\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code);\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true;\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart;\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter(\"resource\");\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n return resourceBefore;\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code);\n }\n return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, \"resourceDestination\", \"resourceDestinationLiteral\", \"resourceDestinationLiteralMarker\", \"resourceDestinationRaw\", \"resourceDestinationString\", 32)(code);\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code);\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(effects, resourceTitleAfter, nok, \"resourceTitle\", \"resourceTitleMarker\", \"resourceTitleString\")(code);\n }\n return resourceEnd(code);\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n effects.exit(\"resource\");\n return ok;\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this;\n return referenceFull;\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, \"reference\", \"referenceMarker\", \"referenceString\")(code);\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart;\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter(\"reference\");\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n return referenceCollapsedOpen;\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n effects.exit(\"reference\");\n return ok;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * \n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n * <p>!<a href=\\\"b\\\">^a</a></p>\n * <p>!<a href=\\\"c\\\">^a</a></p>\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelLink\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelLink\");\n return after;\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start;\n\n /** @type {State} */\n function start(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, ok, \"linePrefix\");\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeThematicBreak(effects, ok, nok) {\n let size = 0;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Start of thematic break.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"thematicBreak\");\n // To do: parse indent like `markdown-rs`.\n return before(code);\n }\n\n /**\n * After optional whitespace, at marker.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n marker = code;\n return atBreak(code);\n }\n\n /**\n * After something, before something else.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === marker) {\n effects.enter(\"thematicBreakSequence\");\n return sequence(code);\n }\n if (size >= 3 && (code === null || markdownLineEnding(code))) {\n effects.exit(\"thematicBreak\");\n return ok(code);\n }\n return nok(code);\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function sequence(code) {\n if (code === marker) {\n effects.consume(code);\n size++;\n return sequence;\n }\n effects.exit(\"thematicBreakSequence\");\n return markdownSpace(code) ? factorySpace(effects, atBreak, \"whitespace\")(code) : atBreak(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * Exiter,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiDigit, markdownSpace } from 'micromark-util-character';\nimport { blankLine } from './blank-line.js';\nimport { thematicBreak } from './thematic-break.js';\n\n/** @type {Construct} */\nexport const list = {\n continuation: {\n tokenize: tokenizeListContinuation\n },\n exit: tokenizeListEnd,\n name: 'list',\n tokenize: tokenizeListStart\n};\n\n/** @type {Construct} */\nconst listItemPrefixWhitespaceConstruct = {\n partial: true,\n tokenize: tokenizeListItemPrefixWhitespace\n};\n\n/** @type {Construct} */\nconst indentConstruct = {\n partial: true,\n tokenize: tokenizeIndent\n};\n\n// To do: `markdown-rs` parses list items on their own and later stitches them\n// together.\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListStart(effects, ok, nok) {\n const self = this;\n const tail = self.events[self.events.length - 1];\n let initialSize = tail && tail[1].type === \"linePrefix\" ? tail[2].sliceSerialize(tail[1], true).length : 0;\n let size = 0;\n return start;\n\n /** @type {State} */\n function start(code) {\n const kind = self.containerState.type || (code === 42 || code === 43 || code === 45 ? \"listUnordered\" : \"listOrdered\");\n if (kind === \"listUnordered\" ? !self.containerState.marker || code === self.containerState.marker : asciiDigit(code)) {\n if (!self.containerState.type) {\n self.containerState.type = kind;\n effects.enter(kind, {\n _container: true\n });\n }\n if (kind === \"listUnordered\") {\n effects.enter(\"listItemPrefix\");\n return code === 42 || code === 45 ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code);\n }\n if (!self.interrupt || code === 49) {\n effects.enter(\"listItemPrefix\");\n effects.enter(\"listItemValue\");\n return inside(code);\n }\n }\n return nok(code);\n }\n\n /** @type {State} */\n function inside(code) {\n if (asciiDigit(code) && ++size < 10) {\n effects.consume(code);\n return inside;\n }\n if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === 41 || code === 46)) {\n effects.exit(\"listItemValue\");\n return atMarker(code);\n }\n return nok(code);\n }\n\n /**\n * @type {State}\n **/\n function atMarker(code) {\n effects.enter(\"listItemMarker\");\n effects.consume(code);\n effects.exit(\"listItemMarker\");\n self.containerState.marker = self.containerState.marker || code;\n return effects.check(blankLine,\n // Can’t be empty when interrupting.\n self.interrupt ? nok : onBlank, effects.attempt(listItemPrefixWhitespaceConstruct, endOfPrefix, otherPrefix));\n }\n\n /** @type {State} */\n function onBlank(code) {\n self.containerState.initialBlankLine = true;\n initialSize++;\n return endOfPrefix(code);\n }\n\n /** @type {State} */\n function otherPrefix(code) {\n if (markdownSpace(code)) {\n effects.enter(\"listItemPrefixWhitespace\");\n effects.consume(code);\n effects.exit(\"listItemPrefixWhitespace\");\n return endOfPrefix;\n }\n return nok(code);\n }\n\n /** @type {State} */\n function endOfPrefix(code) {\n self.containerState.size = initialSize + self.sliceSerialize(effects.exit(\"listItemPrefix\"), true).length;\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListContinuation(effects, ok, nok) {\n const self = this;\n self.containerState._closeFlow = undefined;\n return effects.check(blankLine, onBlank, notBlank);\n\n /** @type {State} */\n function onBlank(code) {\n self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine;\n\n // We have a blank line.\n // Still, try to consume at most the items size.\n return factorySpace(effects, ok, \"listItemIndent\", self.containerState.size + 1)(code);\n }\n\n /** @type {State} */\n function notBlank(code) {\n if (self.containerState.furtherBlankLines || !markdownSpace(code)) {\n self.containerState.furtherBlankLines = undefined;\n self.containerState.initialBlankLine = undefined;\n return notInCurrentItem(code);\n }\n self.containerState.furtherBlankLines = undefined;\n self.containerState.initialBlankLine = undefined;\n return effects.attempt(indentConstruct, ok, notInCurrentItem)(code);\n }\n\n /** @type {State} */\n function notInCurrentItem(code) {\n // While we do continue, we signal that the flow should be closed.\n self.containerState._closeFlow = true;\n // As we’re closing flow, we’re no longer interrupting.\n self.interrupt = undefined;\n // Always populated by defaults.\n\n return factorySpace(effects, effects.attempt(list, ok, nok), \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this;\n return factorySpace(effects, afterPrefix, \"listItemIndent\", self.containerState.size + 1);\n\n /** @type {State} */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"listItemIndent\" && tail[2].sliceSerialize(tail[1], true).length === self.containerState.size ? ok(code) : nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Exiter}\n */\nfunction tokenizeListEnd(effects) {\n effects.exit(this.containerState.type);\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListItemPrefixWhitespace(effects, ok, nok) {\n const self = this;\n\n // Always populated by defaults.\n\n return factorySpace(effects, afterPrefix, \"listItemPrefixWhitespace\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + 1);\n\n /** @type {State} */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return !markdownSpace(code) && tail && tail[1].type === \"listItemPrefixWhitespace\" ? ok(code) : nok(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const setextUnderline = {\n name: 'setextUnderline',\n resolveTo: resolveToSetextUnderline,\n tokenize: tokenizeSetextUnderline\n};\n\n/** @type {Resolver} */\nfunction resolveToSetextUnderline(events, context) {\n // To do: resolve like `markdown-rs`.\n let index = events.length;\n /** @type {number | undefined} */\n let content;\n /** @type {number | undefined} */\n let text;\n /** @type {number | undefined} */\n let definition;\n\n // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === \"content\") {\n content = index;\n break;\n }\n if (events[index][1].type === \"paragraph\") {\n text = index;\n }\n }\n // Exit\n else {\n if (events[index][1].type === \"content\") {\n // Remove the content end (if needed we’ll add it later)\n events.splice(index, 1);\n }\n if (!definition && events[index][1].type === \"definition\") {\n definition = index;\n }\n }\n }\n const heading = {\n type: \"setextHeading\",\n start: {\n ...events[content][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n\n // Change the paragraph to setext heading text.\n events[text][1].type = \"setextHeadingText\";\n\n // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n if (definition) {\n events.splice(text, 0, ['enter', heading, context]);\n events.splice(definition + 1, 0, ['exit', events[content][1], context]);\n events[content][1].end = {\n ...events[definition][1].end\n };\n } else {\n events[content][1] = heading;\n }\n\n // Add the heading exit at the end.\n events.push(['exit', heading, context]);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * At start of heading (setext) underline.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n let index = self.events.length;\n /** @type {boolean | undefined} */\n let paragraph;\n // Find an opening.\n while (index--) {\n // Skip enter/exit of line ending, line prefix, and content.\n // We can now either have a definition or a paragraph.\n if (self.events[index][1].type !== \"lineEnding\" && self.events[index][1].type !== \"linePrefix\" && self.events[index][1].type !== \"content\") {\n paragraph = self.events[index][1].type === \"paragraph\";\n break;\n }\n }\n\n // To do: handle lazy/pierce like `markdown-rs`.\n // To do: parse indent like `markdown-rs`.\n if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {\n effects.enter(\"setextHeadingLine\");\n marker = code;\n return before(code);\n }\n return nok(code);\n }\n\n /**\n * After optional whitespace, at `-` or `=`.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"setextHeadingLineSequence\");\n return inside(code);\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n effects.exit(\"setextHeadingLineSequence\");\n return markdownSpace(code) ? factorySpace(effects, after, \"lineSuffix\")(code) : after(code);\n }\n\n /**\n * After sequence, after optional whitespace.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"setextHeadingLine\");\n return ok(code);\n }\n return nok(code);\n }\n}","/**\n * @import {\n * InitialConstruct,\n * Initializer,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nimport { blankLine, content } from 'micromark-core-commonmark';\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {InitialConstruct} */\nexport const flow = {\n tokenize: initializeFlow\n};\n\n/**\n * @this {TokenizeContext}\n * Self.\n * @type {Initializer}\n * Initializer.\n */\nfunction initializeFlow(effects) {\n const self = this;\n const initial = effects.attempt(\n // Try to parse a blank line.\n blankLine, atBlankEnding,\n // Try to parse initial flow (essentially, only code).\n effects.attempt(this.parser.constructs.flowInitial, afterConstruct, factorySpace(effects, effects.attempt(this.parser.constructs.flow, afterConstruct, effects.attempt(content, afterConstruct)), \"linePrefix\")));\n return initial;\n\n /** @type {State} */\n function atBlankEnding(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"lineEndingBlank\");\n effects.consume(code);\n effects.exit(\"lineEndingBlank\");\n self.currentConstruct = undefined;\n return initial;\n }\n\n /** @type {State} */\n function afterConstruct(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n self.currentConstruct = undefined;\n return initial;\n }\n}","/**\n * @import {\n * Code,\n * InitialConstruct,\n * Initializer,\n * Resolver,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nexport const resolver = {\n resolveAll: createResolver()\n};\nexport const string = initializeFactory('string');\nexport const text = initializeFactory('text');\n\n/**\n * @param {'string' | 'text'} field\n * Field.\n * @returns {InitialConstruct}\n * Construct.\n */\nfunction initializeFactory(field) {\n return {\n resolveAll: createResolver(field === 'text' ? resolveAllLineSuffixes : undefined),\n tokenize: initializeText\n };\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this;\n const constructs = this.parser.constructs[field];\n const text = effects.attempt(constructs, start, notText);\n return start;\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code);\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"data\");\n effects.consume(code);\n return data;\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit(\"data\");\n return text(code);\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n\n /**\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether the code is a break.\n */\n function atBreak(code) {\n if (code === null) {\n return true;\n }\n const list = constructs[code];\n let index = -1;\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index];\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true;\n }\n }\n }\n return false;\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * Resolver.\n * @returns {Resolver}\n * Resolver.\n */\nfunction createResolver(extraResolver) {\n return resolveAllText;\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1;\n /** @type {number | undefined} */\n let enter;\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === \"data\") {\n enter = index;\n index++;\n }\n } else if (!events[index] || events[index][1].type !== \"data\") {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return extraResolver ? extraResolver(events, context) : events;\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n let eventIndex = 0; // Skip first.\n\n while (++eventIndex <= events.length) {\n if ((eventIndex === events.length || events[eventIndex][1].type === \"lineEnding\") && events[eventIndex - 1][1].type === \"data\") {\n const data = events[eventIndex - 1][1];\n const chunks = context.sliceStream(data);\n let index = chunks.length;\n let bufferIndex = -1;\n let size = 0;\n /** @type {boolean | undefined} */\n let tabs;\n while (index--) {\n const chunk = chunks[index];\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length;\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++;\n bufferIndex--;\n }\n if (bufferIndex) break;\n bufferIndex = -1;\n }\n // Number\n else if (chunk === -2) {\n tabs = true;\n size++;\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++;\n break;\n }\n }\n\n // Allow final trailing whitespace.\n if (context._contentTypeTextTrailing && eventIndex === events.length) {\n size = 0;\n }\n if (size) {\n const token = {\n type: eventIndex === events.length || tabs || size < 2 ? \"lineSuffix\" : \"hardBreakTrailing\",\n start: {\n _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,\n _index: data.start._index + index,\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size\n },\n end: {\n ...data.end\n }\n };\n data.end = {\n ...token.start\n };\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token);\n } else {\n events.splice(eventIndex, 0, ['enter', token, context], ['exit', token, context]);\n eventIndex += 2;\n }\n }\n eventIndex++;\n }\n }\n return events;\n}","/**\n * @import {Extension} from 'micromark-util-types'\n */\n\nimport { attention, autolink, blockQuote, characterEscape, characterReference, codeFenced, codeIndented, codeText, definition, hardBreakEscape, headingAtx, htmlFlow, htmlText, labelEnd, labelStartImage, labelStartLink, lineEnding, list, setextUnderline, thematicBreak } from 'micromark-core-commonmark';\nimport { resolver as resolveText } from './initialize/text.js';\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n};\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n};\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n};\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n};\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n};\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n};\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n};\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n};\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n};","/**\n * @import {\n * Chunk,\n * Code,\n * ConstructRecord,\n * Construct,\n * Effects,\n * InitialConstruct,\n * ParseContext,\n * Point,\n * State,\n * TokenizeContext,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @callback Restore\n * Restore the state.\n * @returns {undefined}\n * Nothing.\n *\n * @typedef Info\n * Info.\n * @property {Restore} restore\n * Restore.\n * @property {number} from\n * From.\n *\n * @callback ReturnHandle\n * Handle a successful run.\n * @param {Construct} construct\n * Construct.\n * @param {Info} info\n * Info.\n * @returns {undefined}\n * Nothing.\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/**\n * Create a tokenizer.\n * Tokenizers deal with one type of data (e.g., containers, flow, text).\n * The parser is the object dealing with it all.\n * `initialize` works like other constructs, except that only its `tokenize`\n * function is used, in which case it doesn’t receive an `ok` or `nok`.\n * `from` can be given to set the point before the first character, although\n * when further lines are indented, they must be set with `defineSkip`.\n *\n * @param {ParseContext} parser\n * Parser.\n * @param {InitialConstruct} initialize\n * Construct.\n * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from]\n * Point (optional).\n * @returns {TokenizeContext}\n * Context.\n */\nexport function createTokenizer(parser, initialize, from) {\n /** @type {Point} */\n let point = {\n _bufferIndex: -1,\n _index: 0,\n line: from && from.line || 1,\n column: from && from.column || 1,\n offset: from && from.offset || 0\n };\n /** @type {Record<string, number>} */\n const columnStart = {};\n /** @type {Array<Construct>} */\n const resolveAllConstructs = [];\n /** @type {Array<Chunk>} */\n let chunks = [];\n /** @type {Array<Token>} */\n let stack = [];\n /** @type {boolean | undefined} */\n let consumed = true;\n\n /**\n * Tools used for tokenizing.\n *\n * @type {Effects}\n */\n const effects = {\n attempt: constructFactory(onsuccessfulconstruct),\n check: constructFactory(onsuccessfulcheck),\n consume,\n enter,\n exit,\n interrupt: constructFactory(onsuccessfulcheck, {\n interrupt: true\n })\n };\n\n /**\n * State and tools for resolving and serializing.\n *\n * @type {TokenizeContext}\n */\n const context = {\n code: null,\n containerState: {},\n defineSkip,\n events: [],\n now,\n parser,\n previous: null,\n sliceSerialize,\n sliceStream,\n write\n };\n\n /**\n * The state function.\n *\n * @type {State | undefined}\n */\n let state = initialize.tokenize.call(context, effects);\n\n /**\n * Track which character we expect to be consumed, to catch bugs.\n *\n * @type {Code}\n */\n let expectedCode;\n if (initialize.resolveAll) {\n resolveAllConstructs.push(initialize);\n }\n return context;\n\n /** @type {TokenizeContext['write']} */\n function write(slice) {\n chunks = push(chunks, slice);\n main();\n\n // Exit if we’re not done, resolve might change stuff.\n if (chunks[chunks.length - 1] !== null) {\n return [];\n }\n addResult(initialize, 0);\n\n // Otherwise, resolve, and exit.\n context.events = resolveAll(resolveAllConstructs, context.events, context);\n return context.events;\n }\n\n //\n // Tools.\n //\n\n /** @type {TokenizeContext['sliceSerialize']} */\n function sliceSerialize(token, expandTabs) {\n return serializeChunks(sliceStream(token), expandTabs);\n }\n\n /** @type {TokenizeContext['sliceStream']} */\n function sliceStream(token) {\n return sliceChunks(chunks, token);\n }\n\n /** @type {TokenizeContext['now']} */\n function now() {\n // This is a hot path, so we clone manually instead of `Object.assign({}, point)`\n const {\n _bufferIndex,\n _index,\n line,\n column,\n offset\n } = point;\n return {\n _bufferIndex,\n _index,\n line,\n column,\n offset\n };\n }\n\n /** @type {TokenizeContext['defineSkip']} */\n function defineSkip(value) {\n columnStart[value.line] = value.column;\n accountForPotentialSkip();\n }\n\n //\n // State management.\n //\n\n /**\n * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by\n * `consume`).\n * Here is where we walk through the chunks, which either include strings of\n * several characters, or numerical character codes.\n * The reason to do this in a loop instead of a call is so the stack can\n * drain.\n *\n * @returns {undefined}\n * Nothing.\n */\n function main() {\n /** @type {number} */\n let chunkIndex;\n while (point._index < chunks.length) {\n const chunk = chunks[point._index];\n\n // If we’re in a buffer chunk, loop through it.\n if (typeof chunk === 'string') {\n chunkIndex = point._index;\n if (point._bufferIndex < 0) {\n point._bufferIndex = 0;\n }\n while (point._index === chunkIndex && point._bufferIndex < chunk.length) {\n go(chunk.charCodeAt(point._bufferIndex));\n }\n } else {\n go(chunk);\n }\n }\n }\n\n /**\n * Deal with one code.\n *\n * @param {Code} code\n * Code.\n * @returns {undefined}\n * Nothing.\n */\n function go(code) {\n consumed = undefined;\n expectedCode = code;\n state = state(code);\n }\n\n /** @type {Effects['consume']} */\n function consume(code) {\n if (markdownLineEnding(code)) {\n point.line++;\n point.column = 1;\n point.offset += code === -3 ? 2 : 1;\n accountForPotentialSkip();\n } else if (code !== -1) {\n point.column++;\n point.offset++;\n }\n\n // Not in a string chunk.\n if (point._bufferIndex < 0) {\n point._index++;\n } else {\n point._bufferIndex++;\n\n // At end of string chunk.\n if (point._bufferIndex ===\n // Points w/ non-negative `_bufferIndex` reference\n // strings.\n /** @type {string} */\n chunks[point._index].length) {\n point._bufferIndex = -1;\n point._index++;\n }\n }\n\n // Expose the previous character.\n context.previous = code;\n\n // Mark as consumed.\n consumed = true;\n }\n\n /** @type {Effects['enter']} */\n function enter(type, fields) {\n /** @type {Token} */\n // @ts-expect-error Patch instead of assign required fields to help GC.\n const token = fields || {};\n token.type = type;\n token.start = now();\n context.events.push(['enter', token, context]);\n stack.push(token);\n return token;\n }\n\n /** @type {Effects['exit']} */\n function exit(type) {\n const token = stack.pop();\n token.end = now();\n context.events.push(['exit', token, context]);\n return token;\n }\n\n /**\n * Use results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulconstruct(construct, info) {\n addResult(construct, info.from);\n }\n\n /**\n * Discard results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulcheck(_, info) {\n info.restore();\n }\n\n /**\n * Factory to attempt/check/interrupt.\n *\n * @param {ReturnHandle} onreturn\n * Callback.\n * @param {{interrupt?: boolean | undefined} | undefined} [fields]\n * Fields.\n */\n function constructFactory(onreturn, fields) {\n return hook;\n\n /**\n * Handle either an object mapping codes to constructs, a list of\n * constructs, or a single construct.\n *\n * @param {Array<Construct> | ConstructRecord | Construct} constructs\n * Constructs.\n * @param {State} returnState\n * State.\n * @param {State | undefined} [bogusState]\n * State.\n * @returns {State}\n * State.\n */\n function hook(constructs, returnState, bogusState) {\n /** @type {ReadonlyArray<Construct>} */\n let listOfConstructs;\n /** @type {number} */\n let constructIndex;\n /** @type {Construct} */\n let currentConstruct;\n /** @type {Info} */\n let info;\n return Array.isArray(constructs) ? /* c8 ignore next 1 */\n handleListOfConstructs(constructs) : 'tokenize' in constructs ?\n // Looks like a construct.\n handleListOfConstructs([(/** @type {Construct} */constructs)]) : handleMapOfConstructs(constructs);\n\n /**\n * Handle a list of construct.\n *\n * @param {ConstructRecord} map\n * Constructs.\n * @returns {State}\n * State.\n */\n function handleMapOfConstructs(map) {\n return start;\n\n /** @type {State} */\n function start(code) {\n const left = code !== null && map[code];\n const all = code !== null && map.null;\n const list = [\n // To do: add more extension tests.\n /* c8 ignore next 2 */\n ...(Array.isArray(left) ? left : left ? [left] : []), ...(Array.isArray(all) ? all : all ? [all] : [])];\n return handleListOfConstructs(list)(code);\n }\n }\n\n /**\n * Handle a list of construct.\n *\n * @param {ReadonlyArray<Construct>} list\n * Constructs.\n * @returns {State}\n * State.\n */\n function handleListOfConstructs(list) {\n listOfConstructs = list;\n constructIndex = 0;\n if (list.length === 0) {\n return bogusState;\n }\n return handleConstruct(list[constructIndex]);\n }\n\n /**\n * Handle a single construct.\n *\n * @param {Construct} construct\n * Construct.\n * @returns {State}\n * State.\n */\n function handleConstruct(construct) {\n return start;\n\n /** @type {State} */\n function start(code) {\n // To do: not needed to store if there is no bogus state, probably?\n // Currently doesn’t work because `inspect` in document does a check\n // w/o a bogus, which doesn’t make sense. But it does seem to help perf\n // by not storing.\n info = store();\n currentConstruct = construct;\n if (!construct.partial) {\n context.currentConstruct = construct;\n }\n\n // Always populated by defaults.\n\n if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {\n return nok(code);\n }\n return construct.tokenize.call(\n // If we do have fields, create an object w/ `context` as its\n // prototype.\n // This allows a “live binding”, which is needed for `interrupt`.\n fields ? Object.assign(Object.create(context), fields) : context, effects, ok, nok)(code);\n }\n }\n\n /** @type {State} */\n function ok(code) {\n consumed = true;\n onreturn(currentConstruct, info);\n return returnState;\n }\n\n /** @type {State} */\n function nok(code) {\n consumed = true;\n info.restore();\n if (++constructIndex < listOfConstructs.length) {\n return handleConstruct(listOfConstructs[constructIndex]);\n }\n return bogusState;\n }\n }\n }\n\n /**\n * @param {Construct} construct\n * Construct.\n * @param {number} from\n * From.\n * @returns {undefined}\n * Nothing.\n */\n function addResult(construct, from) {\n if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {\n resolveAllConstructs.push(construct);\n }\n if (construct.resolve) {\n splice(context.events, from, context.events.length - from, construct.resolve(context.events.slice(from), context));\n }\n if (construct.resolveTo) {\n context.events = construct.resolveTo(context.events, context);\n }\n }\n\n /**\n * Store state.\n *\n * @returns {Info}\n * Info.\n */\n function store() {\n const startPoint = now();\n const startPrevious = context.previous;\n const startCurrentConstruct = context.currentConstruct;\n const startEventsIndex = context.events.length;\n const startStack = Array.from(stack);\n return {\n from: startEventsIndex,\n restore\n };\n\n /**\n * Restore state.\n *\n * @returns {undefined}\n * Nothing.\n */\n function restore() {\n point = startPoint;\n context.previous = startPrevious;\n context.currentConstruct = startCurrentConstruct;\n context.events.length = startEventsIndex;\n stack = startStack;\n accountForPotentialSkip();\n }\n }\n\n /**\n * Move the current point a bit forward in the line when it’s on a column\n * skip.\n *\n * @returns {undefined}\n * Nothing.\n */\n function accountForPotentialSkip() {\n if (point.line in columnStart && point.column < 2) {\n point.column = columnStart[point.line];\n point.offset += columnStart[point.line] - 1;\n }\n }\n}\n\n/**\n * Get the chunks from a slice of chunks in the range of a token.\n *\n * @param {ReadonlyArray<Chunk>} chunks\n * Chunks.\n * @param {Pick<Token, 'end' | 'start'>} token\n * Token.\n * @returns {Array<Chunk>}\n * Chunks.\n */\nfunction sliceChunks(chunks, token) {\n const startIndex = token.start._index;\n const startBufferIndex = token.start._bufferIndex;\n const endIndex = token.end._index;\n const endBufferIndex = token.end._bufferIndex;\n /** @type {Array<Chunk>} */\n let view;\n if (startIndex === endIndex) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];\n } else {\n view = chunks.slice(startIndex, endIndex);\n if (startBufferIndex > -1) {\n const head = view[0];\n if (typeof head === 'string') {\n view[0] = head.slice(startBufferIndex);\n /* c8 ignore next 4 -- used to be used, no longer */\n } else {\n view.shift();\n }\n }\n if (endBufferIndex > 0) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view.push(chunks[endIndex].slice(0, endBufferIndex));\n }\n }\n return view;\n}\n\n/**\n * Get the string value of a slice of chunks.\n *\n * @param {ReadonlyArray<Chunk>} chunks\n * Chunks.\n * @param {boolean | undefined} [expandTabs=false]\n * Whether to expand tabs (default: `false`).\n * @returns {string}\n * Result.\n */\nfunction serializeChunks(chunks, expandTabs) {\n let index = -1;\n /** @type {Array<string>} */\n const result = [];\n /** @type {boolean | undefined} */\n let atTab;\n while (++index < chunks.length) {\n const chunk = chunks[index];\n /** @type {string} */\n let value;\n if (typeof chunk === 'string') {\n value = chunk;\n } else switch (chunk) {\n case -5:\n {\n value = \"\\r\";\n break;\n }\n case -4:\n {\n value = \"\\n\";\n break;\n }\n case -3:\n {\n value = \"\\r\" + \"\\n\";\n break;\n }\n case -2:\n {\n value = expandTabs ? \" \" : \"\\t\";\n break;\n }\n case -1:\n {\n if (!expandTabs && atTab) continue;\n value = \" \";\n break;\n }\n default:\n {\n // Currently only replacement character.\n value = String.fromCharCode(chunk);\n }\n }\n atTab = chunk === -2;\n result.push(value);\n }\n return result.join('');\n}","/**\n * @import {\n * Create,\n * FullNormalizedExtension,\n * InitialConstruct,\n * ParseContext,\n * ParseOptions\n * } from 'micromark-util-types'\n */\n\nimport { combineExtensions } from 'micromark-util-combine-extensions';\nimport { content } from './initialize/content.js';\nimport { document } from './initialize/document.js';\nimport { flow } from './initialize/flow.js';\nimport { string, text } from './initialize/text.js';\nimport * as defaultConstructs from './constructs.js';\nimport { createTokenizer } from './create-tokenizer.js';\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * Configuration (optional).\n * @returns {ParseContext}\n * Parser.\n */\nexport function parse(options) {\n const settings = options || {};\n const constructs = /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])]);\n\n /** @type {ParseContext} */\n const parser = {\n constructs,\n content: create(content),\n defined: [],\n document: create(document),\n flow: create(flow),\n lazy: {},\n string: create(string),\n text: create(text)\n };\n return parser;\n\n /**\n * @param {InitialConstruct} initial\n * Construct to start with.\n * @returns {Create}\n * Create a tokenizer.\n */\n function create(initial) {\n return creator;\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from);\n }\n }\n}","/**\n * @import {Event} from 'micromark-util-types'\n */\n\nimport { subtokenize } from 'micromark-util-subtokenize';\n\n/**\n * @param {Array<Event>} events\n * Events.\n * @returns {Array<Event>}\n * Events.\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events;\n}","/**\n * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'\n */\n\n/**\n * @callback Preprocessor\n * Preprocess a value.\n * @param {Value} value\n * Value.\n * @param {Encoding | null | undefined} [encoding]\n * Encoding when `value` is a typed array (optional).\n * @param {boolean | null | undefined} [end=false]\n * Whether this is the last chunk (default: `false`).\n * @returns {Array<Chunk>}\n * Chunks.\n */\n\nconst search = /[\\0\\t\\n\\r]/g;\n\n/**\n * @returns {Preprocessor}\n * Preprocess a value.\n */\nexport function preprocess() {\n let column = 1;\n let buffer = '';\n /** @type {boolean | undefined} */\n let start = true;\n /** @type {boolean | undefined} */\n let atCarriageReturn;\n return preprocessor;\n\n /** @type {Preprocessor} */\n // eslint-disable-next-line complexity\n function preprocessor(value, encoding, end) {\n /** @type {Array<Chunk>} */\n const chunks = [];\n /** @type {RegExpMatchArray | null} */\n let match;\n /** @type {number} */\n let next;\n /** @type {number} */\n let startPosition;\n /** @type {number} */\n let endPosition;\n /** @type {Code} */\n let code;\n value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));\n startPosition = 0;\n buffer = '';\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++;\n }\n start = undefined;\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition;\n match = search.exec(value);\n endPosition = match && match.index !== undefined ? match.index : value.length;\n code = value.charCodeAt(endPosition);\n if (!match) {\n buffer = value.slice(startPosition);\n break;\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3);\n atCarriageReturn = undefined;\n } else {\n if (atCarriageReturn) {\n chunks.push(-5);\n atCarriageReturn = undefined;\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition));\n column += endPosition - startPosition;\n }\n switch (code) {\n case 0:\n {\n chunks.push(65533);\n column++;\n break;\n }\n case 9:\n {\n next = Math.ceil(column / 4) * 4;\n chunks.push(-2);\n while (column++ < next) chunks.push(-1);\n break;\n }\n case 10:\n {\n chunks.push(-4);\n column = 1;\n break;\n }\n default:\n {\n atCarriageReturn = true;\n column = 1;\n }\n }\n }\n startPosition = endPosition + 1;\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5);\n if (buffer) chunks.push(buffer);\n chunks.push(null);\n }\n return chunks;\n }\n}","/**\n * @import {Encoding, Value} from 'micromark-util-types'\n */\n\n/**\n * @typedef {import('micromark-util-types').Options} Options\n */\n\nimport { compile } from './lib/compile.js';\nimport { parse } from './lib/parse.js';\nimport { postprocess } from './lib/postprocess.js';\nimport { preprocess } from './lib/preprocess.js';\nexport { compile } from './lib/compile.js';\nexport { parse } from './lib/parse.js';\nexport { postprocess } from './lib/postprocess.js';\nexport { preprocess } from './lib/preprocess.js';\n\n/**\n * Compile markdown to HTML.\n *\n * > Note: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.\n *\n * @overload\n * @param {Value} value\n * Markdown to parse (`string` or `Uint8Array`).\n * @param {Encoding | null | undefined} encoding\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (`string`, default: `'utf8'`).\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {string}\n * Compiled HTML.\n *\n * @overload\n * @param {Value} value\n * Markdown to parse (`string` or `Uint8Array`).\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {string}\n * Compiled HTML.\n *\n * @param {Value} value\n * Markdown to parse (`string` or `Uint8Array`).\n * @param {Encoding | Options | null | undefined} [encoding]\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (`string`, default: `'utf8'`).\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {string}\n * Compiled HTML.\n */\nexport function micromark(value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding;\n encoding = undefined;\n }\n return compile(options)(postprocess(parse(options).document().write(preprocess()(value, encoding, true))));\n}","import { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';\nconst characterEscapeOrReference = /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi;\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode);\n}\n\n/**\n * @param {string} $0\n * Match.\n * @param {string} $1\n * Character escape.\n * @param {string} $2\n * Character reference.\n * @returns {string}\n * Decoded value\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1;\n }\n\n // Reference.\n const head = $2.charCodeAt(0);\n if (head === 35) {\n const head = $2.charCodeAt(1);\n const hex = head === 120 || head === 88;\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);\n }\n return decodeNamedCharacterReference($2) || $0;\n}","/**\n * @import {\n * Break,\n * Blockquote,\n * Code,\n * Definition,\n * Emphasis,\n * Heading,\n * Html,\n * Image,\n * InlineCode,\n * Link,\n * ListItem,\n * List,\n * Nodes,\n * Paragraph,\n * PhrasingContent,\n * ReferenceType,\n * Root,\n * Strong,\n * Text,\n * ThematicBreak\n * } from 'mdast'\n * @import {\n * Encoding,\n * Event,\n * Token,\n * Value\n * } from 'micromark-util-types'\n * @import {Point} from 'unist'\n * @import {\n * CompileContext,\n * CompileData,\n * Config,\n * Extension,\n * Handle,\n * OnEnterError,\n * Options\n * } from './types.js'\n */\n\nimport { toString } from 'mdast-util-to-string';\nimport { parse, postprocess, preprocess } from 'micromark';\nimport { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';\nimport { decodeString } from 'micromark-util-decode-string';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { stringifyPosition } from 'unist-util-stringify-position';\nconst own = {}.hasOwnProperty;\n\n/**\n * Turn markdown into a syntax tree.\n *\n * @overload\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @overload\n * @param {Value} value\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @param {Value} value\n * Markdown to parse.\n * @param {Encoding | Options | null | undefined} [encoding]\n * Character encoding for when `value` is `Buffer`.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {Root}\n * mdast tree.\n */\nexport function fromMarkdown(value, encoding, options) {\n if (encoding && typeof encoding === 'object') {\n options = encoding;\n encoding = undefined;\n }\n return compiler(options)(postprocess(parse(options).document().write(preprocess()(value, encoding, true))));\n}\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n characterReference: onexitcharacterreference,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n };\n configure(config, (options || {}).mdastExtensions || []);\n\n /** @type {CompileData} */\n const data = {};\n return compile;\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array<Event>} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n };\n /** @type {Omit<CompileContext, 'sliceSerialize'>} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n data\n };\n /** @type {Array<number>} */\n const listStack = [];\n let index = -1;\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (events[index][1].type === \"listOrdered\" || events[index][1].type === \"listUnordered\") {\n if (events[index][0] === 'enter') {\n listStack.push(index);\n } else {\n const tail = listStack.pop();\n index = prepareList(events, tail, index);\n }\n }\n }\n index = -1;\n while (++index < events.length) {\n const handler = config[events[index][0]];\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(Object.assign({\n sliceSerialize: events[index][2].sliceSerialize\n }, context), events[index][1]);\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1];\n const handler = tail[1] || defaultOnError;\n handler.call(context, undefined, tail[0]);\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(events.length > 0 ? events[0][1].start : {\n line: 1,\n column: 1,\n offset: 0\n }),\n end: point(events.length > 0 ? events[events.length - 2][1].end : {\n line: 1,\n column: 1,\n offset: 0\n })\n };\n\n // Call transforms.\n index = -1;\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree;\n }\n return tree;\n }\n\n /**\n * @param {Array<Event>} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1;\n let containerBalance = -1;\n let listSpread = false;\n /** @type {Token | undefined} */\n let listItem;\n /** @type {number | undefined} */\n let lineIndex;\n /** @type {number | undefined} */\n let firstBlankLineIndex;\n /** @type {boolean | undefined} */\n let atMarker;\n while (++index <= length) {\n const event = events[index];\n switch (event[1].type) {\n case \"listUnordered\":\n case \"listOrdered\":\n case \"blockQuote\":\n {\n if (event[0] === 'enter') {\n containerBalance++;\n } else {\n containerBalance--;\n }\n atMarker = undefined;\n break;\n }\n case \"lineEndingBlank\":\n {\n if (event[0] === 'enter') {\n if (listItem && !atMarker && !containerBalance && !firstBlankLineIndex) {\n firstBlankLineIndex = index;\n }\n atMarker = undefined;\n }\n break;\n }\n case \"linePrefix\":\n case \"listItemValue\":\n case \"listItemMarker\":\n case \"listItemPrefix\":\n case \"listItemPrefixWhitespace\":\n {\n // Empty.\n\n break;\n }\n default:\n {\n atMarker = undefined;\n }\n }\n if (!containerBalance && event[0] === 'enter' && event[1].type === \"listItemPrefix\" || containerBalance === -1 && event[0] === 'exit' && (event[1].type === \"listUnordered\" || event[1].type === \"listOrdered\")) {\n if (listItem) {\n let tailIndex = index;\n lineIndex = undefined;\n while (tailIndex--) {\n const tailEvent = events[tailIndex];\n if (tailEvent[1].type === \"lineEnding\" || tailEvent[1].type === \"lineEndingBlank\") {\n if (tailEvent[0] === 'exit') continue;\n if (lineIndex) {\n events[lineIndex][1].type = \"lineEndingBlank\";\n listSpread = true;\n }\n tailEvent[1].type = \"lineEnding\";\n lineIndex = tailIndex;\n } else if (tailEvent[1].type === \"linePrefix\" || tailEvent[1].type === \"blockQuotePrefix\" || tailEvent[1].type === \"blockQuotePrefixWhitespace\" || tailEvent[1].type === \"blockQuoteMarker\" || tailEvent[1].type === \"listItemIndent\") {\n // Empty\n } else {\n break;\n }\n }\n if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) {\n listItem._spread = true;\n }\n\n // Fix position.\n listItem.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]);\n index++;\n length++;\n }\n\n // Create a new list item.\n if (event[1].type === \"listItemPrefix\") {\n /** @type {Token} */\n const item = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n };\n listItem = item;\n events.splice(index, 0, ['enter', item, event[2]]);\n index++;\n length++;\n firstBlankLineIndex = undefined;\n atMarker = true;\n }\n }\n }\n events[start][1]._spread = listSpread;\n return length;\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Nodes} create\n * Create a node.\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open;\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function open(token) {\n enter.call(this, create(token), token);\n if (and) and.call(this, token);\n }\n }\n\n /**\n * @type {CompileContext['buffer']}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n });\n }\n\n /**\n * @type {CompileContext['enter']}\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1];\n /** @type {Array<Nodes>} */\n const siblings = parent.children;\n siblings.push(node);\n this.stack.push(node);\n this.tokenStack.push([token, errorHandler || undefined]);\n node.position = {\n start: point(token.start),\n // @ts-expect-error: `end` will be patched later.\n end: undefined\n };\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close;\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function close(token) {\n if (and) and.call(this, token);\n exit.call(this, token);\n }\n }\n\n /**\n * @type {CompileContext['exit']}\n */\n function exit(token, onExitError) {\n const node = this.stack.pop();\n const open = this.tokenStack.pop();\n if (!open) {\n throw new Error('Cannot close `' + token.type + '` (' + stringifyPosition({\n start: token.start,\n end: token.end\n }) + '): it’s not open');\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0]);\n } else {\n const handler = open[1] || defaultOnError;\n handler.call(this, token, open[0]);\n }\n }\n node.position.end = point(token.end);\n }\n\n /**\n * @type {CompileContext['resume']}\n */\n function resume() {\n return toString(this.stack.pop());\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n this.data.expectingFirstListItemValue = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (this.data.expectingFirstListItemValue) {\n const ancestor = this.stack[this.stack.length - 2];\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10);\n this.data.expectingFirstListItemValue = undefined;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.lang = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.meta = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (this.data.flowCodeInside) return;\n this.buffer();\n this.data.flowCodeInside = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '');\n this.data.flowCodeInside = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.label = label;\n node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.title = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.url = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1];\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length;\n node.depth = depth;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n this.data.setextHeadingSlurpLineEnding = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1];\n node.depth = this.sliceSerialize(token).codePointAt(0) === 61 ? 1 : 2;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n this.data.setextHeadingSlurpLineEnding = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1];\n /** @type {Array<Nodes>} */\n const siblings = node.children;\n let tail = siblings[siblings.length - 1];\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text();\n tail.position = {\n start: point(token.start),\n // @ts-expect-error: we’ll add `end` later.\n end: undefined\n };\n siblings.push(tail);\n }\n this.stack.push(tail);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop();\n tail.value += this.sliceSerialize(token);\n tail.position.end = point(token.end);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1];\n // If we’re at a hard break, include the line ending in there.\n if (this.data.atHardBreak) {\n const tail = context.children[context.children.length - 1];\n tail.position.end = point(token.end);\n this.data.atHardBreak = undefined;\n return;\n }\n if (!this.data.setextHeadingSlurpLineEnding && config.canContainEols.includes(context.type)) {\n onenterdata.call(this, token);\n onexitdata.call(this, token);\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n this.data.atHardBreak = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1];\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut';\n node.type += 'Reference';\n // @ts-expect-error: mutate.\n node.referenceType = referenceType;\n // @ts-expect-error: mutate.\n delete node.url;\n delete node.title;\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier;\n // @ts-expect-error: mutate.\n delete node.label;\n }\n this.data.referenceType = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1];\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut';\n node.type += 'Reference';\n // @ts-expect-error: mutate.\n node.referenceType = referenceType;\n // @ts-expect-error: mutate.\n delete node.url;\n delete node.title;\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier;\n // @ts-expect-error: mutate.\n delete node.label;\n }\n this.data.referenceType = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token);\n const ancestor = this.stack[this.stack.length - 2];\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string);\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1];\n const value = this.resume();\n const node = this.stack[this.stack.length - 1];\n // Assume a reference.\n this.data.inReference = true;\n if (node.type === 'link') {\n /** @type {Array<PhrasingContent>} */\n const children = fragment.children;\n node.children = children;\n } else {\n node.alt = value;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.url = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.title = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n this.data.inReference = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n this.data.referenceType = 'collapsed';\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume();\n const node = this.stack[this.stack.length - 1];\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label;\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();\n this.data.referenceType = 'full';\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n this.data.characterReferenceType = token.type;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token);\n const type = this.data.characterReferenceType;\n /** @type {string} */\n let value;\n if (type) {\n value = decodeNumericCharacterReference(data, type === \"characterReferenceMarkerNumeric\" ? 10 : 16);\n this.data.characterReferenceType = undefined;\n } else {\n const result = decodeNamedCharacterReference(data);\n value = result;\n }\n const tail = this.stack[this.stack.length - 1];\n tail.value += value;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreference(token) {\n const tail = this.stack.pop();\n tail.position.end = point(token.end);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token);\n const node = this.stack[this.stack.length - 1];\n node.url = this.sliceSerialize(token);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token);\n const node = this.stack[this.stack.length - 1];\n node.url = 'mailto:' + this.sliceSerialize(token);\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n };\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n };\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n };\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n };\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n };\n }\n\n /** @returns {Heading} */\n function heading() {\n return {\n type: 'heading',\n // @ts-expect-error `depth` will be set later.\n depth: 0,\n children: []\n };\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n };\n }\n\n /** @returns {Html} */\n function html() {\n return {\n type: 'html',\n value: ''\n };\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n };\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n };\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n };\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n };\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n };\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n };\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n };\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n };\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n };\n}\n\n/**\n * @param {Config} combined\n * @param {Array<Array<Extension> | Extension>} extensions\n * @returns {undefined}\n */\nfunction configure(combined, extensions) {\n let index = -1;\n while (++index < extensions.length) {\n const value = extensions[index];\n if (Array.isArray(value)) {\n configure(combined, value);\n } else {\n extension(combined, value);\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {undefined}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key;\n for (key in extension) {\n if (own.call(extension, key)) {\n switch (key) {\n case 'canContainEols':\n {\n const right = extension[key];\n if (right) {\n combined[key].push(...right);\n }\n break;\n }\n case 'transforms':\n {\n const right = extension[key];\n if (right) {\n combined[key].push(...right);\n }\n break;\n }\n case 'enter':\n case 'exit':\n {\n const right = extension[key];\n if (right) {\n Object.assign(combined[key], right);\n }\n break;\n }\n // No default\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error('Cannot close `' + left.type + '` (' + stringifyPosition({\n start: left.start,\n end: left.end\n }) + '): a different token (`' + right.type + '`, ' + stringifyPosition({\n start: right.start,\n end: right.end\n }) + ') is open');\n } else {\n throw new Error('Cannot close document, a token (`' + right.type + '`, ' + stringifyPosition({\n start: right.start,\n end: right.end\n }) + ') is still open');\n }\n}","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions\n * @typedef {import('unified').Parser<Root>} Parser\n * @typedef {import('unified').Processor<Root>} Processor\n */\n\n/**\n * @typedef {Omit<FromMarkdownOptions, 'extensions' | 'mdastExtensions'>} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * Aadd support for parsing from markdown.\n *\n * @param {Readonly<Options> | null | undefined} [options]\n * Configuration (optional).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkParse(options) {\n /** @type {Processor} */\n // @ts-expect-error: TS in JSDoc generates wrong types if `this` is typed regularly.\n const self = this\n\n self.parser = parser\n\n /**\n * @type {Parser}\n */\n function parser(doc) {\n return fromMarkdown(doc, {\n ...self.data('settings'),\n ...options,\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: self.data('micromarkExtensions') || [],\n mdastExtensions: self.data('fromMarkdownExtensions') || []\n })\n }\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","/**\n * @import {Node, Parent} from 'unist'\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is a node.\n * @param {unknown} this\n * The given context.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n *\n * @typedef {Record<string, unknown> | Node} Props\n * Object to check for equivalence.\n *\n * Note: `Node` is included as it is common but is not indexable.\n *\n * @typedef {Array<Props | TestFunction | string> | ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test\n * Check for an arbitrary node.\n *\n * @callback TestFunction\n * Check if a node passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | undefined | void}\n * Whether this node passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param {unknown} node\n * Thing to check, typically `Node`.\n * @param {Test} test\n * A check for a specific node.\n * @param {number | null | undefined} index\n * The node’s position in its parent.\n * @param {Parent | null | undefined} parent\n * The node’s parent.\n * @param {unknown} context\n * Context object (`this`) to pass to `test` functions.\n * @returns {boolean}\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends ReadonlyArray<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * (<Condition extends Array<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * (<Condition extends string>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * (<Condition extends Props>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * (<Condition extends TestFunction>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &\n * ((node?: null | undefined) => false) &\n * ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n return looksLikeANode(node)\n ? check.call(context, node, index, parent)\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param {Test} test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns {Check}\n * An assertion.\n */\nexport const convert =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &\n * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return ok\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test)\n ? anyFactory(test)\n : // Cast because `ReadonlyArray` goes into the above but `isArray`\n // narrows to `Array`.\n propertiesFactory(/** @type {Props} */ (test))\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array<Props | TestFunction | string>} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array<Check>} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {Check}\n */\nfunction propertiesFactory(check) {\n const checkAsRecord = /** @type {Record<string, unknown>} */ (check)\n\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n const nodeAsRecord = /** @type {Record<string, unknown>} */ (\n /** @type {unknown} */ (node)\n )\n\n /** @type {string} */\n let key\n\n for (key in check) {\n if (nodeAsRecord[key] !== checkAsRecord[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeANode(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\nfunction ok() {\n return true\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Node}\n */\nfunction looksLikeANode(value) {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n","/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return d\n}\n","/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n */\n\n/**\n * @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate<Check, Value> extends Value\n * ? Predicate<Check, Value>\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray<infer T>\n * ? MatchesOne<Value, T>\n * : Check extends Array<infer T>\n * ? MatchesOne<Value, T>\n * : MatchesOne<Value, Check>\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array<infer Children>}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent<Node, Child>\n * | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {InternalAncestor<InclusiveDescendant<Tree>, Child>} Ancestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {'skip' | boolean} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array<VisitedParents>} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [VisitedParents=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor<Matches<InclusiveDescendant<Tree>, Check>, Ancestor<Tree, Matches<InclusiveDescendant<Tree>, Check>>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n * @template {UnistNode} [Tree=UnistNode]\n * Tree type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from 'unist-util-visit-parents/do-not-use-color'\n\n/** @type {Readonly<ActionTuple>} */\nconst empty = []\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor<Tree, Check>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor<Tree>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} test\n * `unist-util-is`-compatible test\n * @param {Visitor | boolean | null | undefined} [visitor]\n * Handle each node.\n * @param {boolean | null | undefined} [reverse]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visitParents(tree, test, visitor, reverse) {\n /** @type {Test} */\n let check\n\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n } else {\n // @ts-expect-error visitor given, so `test` isn’t a visitor.\n check = test\n }\n\n const is = convert(check)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {UnistNode} node\n * @param {number | undefined} index\n * @param {Array<UnistParent>} parents\n */\n function factory(node, index, parents) {\n const value = /** @type {Record<string, unknown>} */ (\n node && typeof node === 'object' ? node : {}\n )\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {Readonly<ActionTuple>} */\n let result = empty\n /** @type {Readonly<ActionTuple>} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array<UnistParent>} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || undefined)) {\n // @ts-expect-error: `visitor` is now a visitor.\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n if ('children' in node && node.children) {\n const nodeAsParent = /** @type {UnistParent} */ (node)\n\n if (nodeAsParent.children && result[0] !== SKIP) {\n offset = (reverse ? nodeAsParent.children.length : -1) + step\n grandparents = parents.concat(nodeAsParent)\n\n while (offset > -1 && offset < nodeAsParent.children.length) {\n const child = nodeAsParent.children[offset]\n\n subresult = factory(child, offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n }\n\n return result\n }\n }\n}\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {Readonly<ActionTuple>}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return value === null || value === undefined ? empty : [value]\n}\n","/**\n * @import {Nodes, Parents, PhrasingContent, Root, Text} from 'mdast'\n * @import {BuildVisitor, Test, VisitorResult} from 'unist-util-visit-parents'\n */\n\n/**\n * @typedef RegExpMatchObject\n * Info on the match.\n * @property {number} index\n * The index of the search at which the result was found.\n * @property {string} input\n * A copy of the search string in the text node.\n * @property {[...Array<Parents>, Text]} stack\n * All ancestors of the text node, where the last node is the text itself.\n *\n * @typedef {RegExp | string} Find\n * Pattern to find.\n *\n * Strings are escaped and then turned into global expressions.\n *\n * @typedef {Array<FindAndReplaceTuple>} FindAndReplaceList\n * Several find and replaces, in array form.\n *\n * @typedef {[Find, Replace?]} FindAndReplaceTuple\n * Find and replace in tuple form.\n *\n * @typedef {ReplaceFunction | string | null | undefined} Replace\n * Thing to replace with.\n *\n * @callback ReplaceFunction\n * Callback called when a search matches.\n * @param {...any} parameters\n * The parameters are the result of corresponding search expression:\n *\n * * `value` (`string`) — whole match\n * * `...capture` (`Array<string>`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array<PhrasingContent> | PhrasingContent | string | false | null | undefined}\n * Thing to replace with.\n *\n * * when `null`, `undefined`, `''`, remove the match\n * * …or when `false`, do not replace at all\n * * …or when `string`, replace with a text node of that value\n * * …or when `Node` or `Array<Node>`, replace with those nodes\n *\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n *\n * @typedef {Array<Pair>} Pairs\n * All find and replaced.\n *\n * @typedef Options\n * Configuration.\n * @property {Test | null | undefined} [ignore]\n * Test for which nodes to ignore (optional).\n */\n\nimport escape from 'escape-string-regexp'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {convert} from 'unist-util-is'\n\n/**\n * Find patterns in a tree and replace them.\n *\n * The algorithm searches the tree in *preorder* for complete values in `Text`\n * nodes.\n * Partial matches are not supported.\n *\n * @param {Nodes} tree\n * Tree to change.\n * @param {FindAndReplaceList | FindAndReplaceTuple} list\n * Patterns to find.\n * @param {Options | null | undefined} [options]\n * Configuration (when `find` is not `Find`).\n * @returns {undefined}\n * Nothing.\n */\nexport function findAndReplace(tree, list, options) {\n const settings = options || {}\n const ignored = convert(settings.ignore || [])\n const pairs = toPairs(list)\n let pairIndex = -1\n\n while (++pairIndex < pairs.length) {\n visitParents(tree, 'text', visitor)\n }\n\n /** @type {BuildVisitor<Root, 'text'>} */\n function visitor(node, parents) {\n let index = -1\n /** @type {Parents | undefined} */\n let grandparent\n\n while (++index < parents.length) {\n const parent = parents[index]\n /** @type {Array<Nodes> | undefined} */\n const siblings = grandparent ? grandparent.children : undefined\n\n if (\n ignored(\n parent,\n siblings ? siblings.indexOf(parent) : undefined,\n grandparent\n )\n ) {\n return\n }\n\n grandparent = parent\n }\n\n if (grandparent) {\n return handler(node, parents)\n }\n }\n\n /**\n * Handle a text node which is not in an ignored parent.\n *\n * @param {Text} node\n * Text node.\n * @param {Array<Parents>} parents\n * Parents.\n * @returns {VisitorResult}\n * Result.\n */\n function handler(node, parents) {\n const parent = parents[parents.length - 1]\n const find = pairs[pairIndex][0]\n const replace = pairs[pairIndex][1]\n let start = 0\n /** @type {Array<Nodes>} */\n const siblings = parent.children\n const index = siblings.indexOf(node)\n let change = false\n /** @type {Array<PhrasingContent>} */\n let nodes = []\n\n find.lastIndex = 0\n\n let match = find.exec(node.value)\n\n while (match) {\n const position = match.index\n /** @type {RegExpMatchObject} */\n const matchObject = {\n index: match.index,\n input: match.input,\n stack: [...parents, node]\n }\n let value = replace(...match, matchObject)\n\n if (typeof value === 'string') {\n value = value.length > 0 ? {type: 'text', value} : undefined\n }\n\n // It wasn’t a match after all.\n if (value === false) {\n // False acts as if there was no match.\n // So we need to reset `lastIndex`, which currently being at the end of\n // the current match, to the beginning.\n find.lastIndex = position + 1\n } else {\n if (start !== position) {\n nodes.push({\n type: 'text',\n value: node.value.slice(start, position)\n })\n }\n\n if (Array.isArray(value)) {\n nodes.push(...value)\n } else if (value) {\n nodes.push(value)\n }\n\n start = position + match[0].length\n change = true\n }\n\n if (!find.global) {\n break\n }\n\n match = find.exec(node.value)\n }\n\n if (change) {\n if (start < node.value.length) {\n nodes.push({type: 'text', value: node.value.slice(start)})\n }\n\n parent.children.splice(index, 1, ...nodes)\n } else {\n nodes = [node]\n }\n\n return index + nodes.length\n }\n}\n\n/**\n * Turn a tuple or a list of tuples into pairs.\n *\n * @param {FindAndReplaceList | FindAndReplaceTuple} tupleOrList\n * Schema.\n * @returns {Pairs}\n * Clean pairs.\n */\nfunction toPairs(tupleOrList) {\n /** @type {Pairs} */\n const result = []\n\n if (!Array.isArray(tupleOrList)) {\n throw new TypeError('Expected find and replace tuple or list of tuples')\n }\n\n /** @type {FindAndReplaceList} */\n // @ts-expect-error: correct.\n const list =\n !tupleOrList[0] || Array.isArray(tupleOrList[0])\n ? tupleOrList\n : [tupleOrList]\n\n let index = -1\n\n while (++index < list.length) {\n const tuple = list[index]\n result.push([toExpression(tuple[0]), toFunction(tuple[1])])\n }\n\n return result\n}\n\n/**\n * Turn a find into an expression.\n *\n * @param {Find} find\n * Find.\n * @returns {RegExp}\n * Expression.\n */\nfunction toExpression(find) {\n return typeof find === 'string' ? new RegExp(escape(find), 'g') : find\n}\n\n/**\n * Turn a replace into a function.\n *\n * @param {Replace} replace\n * Replace.\n * @returns {ReplaceFunction}\n * Function.\n */\nfunction toFunction(replace) {\n return typeof replace === 'function'\n ? replace\n : function () {\n return replace\n }\n}\n","/**\n * @import {RegExpMatchObject, ReplaceFunction} from 'mdast-util-find-and-replace'\n * @import {CompileContext, Extension as FromMarkdownExtension, Handle as FromMarkdownHandle, Transform as FromMarkdownTransform} from 'mdast-util-from-markdown'\n * @import {ConstructName, Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\n * @import {Link, PhrasingContent} from 'mdast'\n */\n\nimport {ccount} from 'ccount'\nimport {ok as assert} from 'devlop'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\n\n/** @type {ConstructName} */\nconst inConstruct = 'phrasing'\n/** @type {Array<ConstructName>} */\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralFromMarkdown() {\n return {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralToMarkdown() {\n return {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: ':',\n before: '[ps]',\n after: '\\\\/',\n inConstruct,\n notInConstruct\n }\n ]\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'link')\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/gu, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n * @returns {Array<PhrasingContent> | Link | false}\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {Link} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n * @returns {Link | false}\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[-\\d_]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string | undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n\n if (!trailExec) {\n return [url, undefined]\n }\n\n url = url.slice(0, trailExec.index)\n\n let trail = trailExec[0]\n let closingParenIndex = trail.indexOf(')')\n const openingParens = ccount(url, '(')\n let closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean | null | undefined} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n // If it’s an email, the previous character should not be a slash.\n (!email || code !== 47)\n )\n}\n","/**\n * @import {\n * CompileContext,\n * Extension as FromMarkdownExtension,\n * Handle as FromMarkdownHandle\n * } from 'mdast-util-from-markdown'\n * @import {ToMarkdownOptions} from 'mdast-util-gfm-footnote'\n * @import {\n * Handle as ToMarkdownHandle,\n * Map,\n * Options as ToMarkdownExtension\n * } from 'mdast-util-to-markdown'\n * @import {FootnoteDefinition, FootnoteReference} from 'mdast'\n */\n\nimport {ok as assert} from 'devlop'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\n\nfootnoteReference.peek = footnoteReferencePeek\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCallString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCall(token) {\n this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinitionLabelString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinition(token) {\n this.enter(\n {type: 'footnoteDefinition', identifier: '', label: '', children: []},\n token\n )\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCallString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteReference')\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n node.label = label\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinitionLabelString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteDefinition')\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n node.label = label\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteReference} node\n */\nfunction footnoteReference(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteReference')\n const subexit = state.enter('reference')\n value += tracker.move(\n state.safe(state.associationId(node), {after: ']', before: value})\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown`.\n */\nexport function gfmFootnoteFromMarkdown() {\n return {\n enter: {\n gfmFootnoteCallString: enterFootnoteCallString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteDefinition: enterFootnoteDefinition\n },\n exit: {\n gfmFootnoteCallString: exitFootnoteCallString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteDefinition: exitFootnoteDefinition\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @param {ToMarkdownOptions | null | undefined} [options]\n * Configuration (optional).\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown(options) {\n // To do: next major: change default.\n let firstLineBlank = false\n\n if (options && options.firstLineBlank) {\n firstLineBlank = true\n }\n\n return {\n handlers: {footnoteDefinition, footnoteReference},\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['label', 'phrasing', 'reference']}]\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\n function footnoteDefinition(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteDefinition')\n const subexit = state.enter('label')\n value += tracker.move(\n state.safe(state.associationId(node), {before: value, after: ']'})\n )\n subexit()\n\n value += tracker.move(']:')\n\n if (node.children && node.children.length > 0) {\n tracker.shift(4)\n\n value += tracker.move(\n (firstLineBlank ? '\\n' : ' ') +\n state.indentLines(\n state.containerFlow(node, tracker.current()),\n firstLineBlank ? mapAll : mapExceptFirst\n )\n )\n }\n\n exit()\n\n return value\n }\n}\n\n/** @type {Map} */\nfunction mapExceptFirst(line, index, blank) {\n return index === 0 ? line : mapAll(line, index, blank)\n}\n\n/** @type {Map} */\nfunction mapAll(line, index, blank) {\n return (blank ? '' : ' ') + line\n}\n","/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain strikethrough.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>\n *\n * @type {Array<ConstructName>}\n */\nconst constructsWithoutStrikethrough = [\n 'autolink',\n 'destinationLiteral',\n 'destinationRaw',\n 'reference',\n 'titleQuote',\n 'titleApostrophe'\n]\n\nhandleDelete.peek = peekDelete\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughFromMarkdown() {\n return {\n canContainEols: ['delete'],\n enter: {strikethrough: enterStrikethrough},\n exit: {strikethrough: exitStrikethrough}\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughToMarkdown() {\n return {\n unsafe: [\n {\n character: '~',\n inConstruct: 'phrasing',\n notInConstruct: constructsWithoutStrikethrough\n }\n ],\n handlers: {delete: handleDelete}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterStrikethrough(token) {\n this.enter({type: 'delete', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitStrikethrough(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */\nfunction handleDelete(node, _, state, info) {\n const tracker = state.createTracker(info)\n const exit = state.enter('strikethrough')\n let value = tracker.move('~~')\n value += state.containerPhrasing(node, {\n ...tracker.current(),\n before: value,\n after: '~'\n })\n value += tracker.move('~~')\n exit()\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction peekDelete() {\n return '~'\n}\n","// To do: next major: remove.\n/**\n * @typedef {Options} MarkdownTableOptions\n * Configuration.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [alignDelimiters=true]\n * Whether to align the delimiters (default: `true`);\n * they are aligned by default:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * Pass `false` to make them staggered:\n *\n * ```markdown\n * | Alpha | B |\n * | - | - |\n * | C | Delta |\n * ```\n * @property {ReadonlyArray<string | null | undefined> | string | null | undefined} [align]\n * How to align columns (default: `''`);\n * one style for all columns or styles for their respective columns;\n * each style is either `'l'` (left), `'r'` (right), or `'c'` (center);\n * other values are treated as `''`, which doesn’t place the colon in the\n * alignment row but does align left;\n * *only the lowercased first character is used, so `Right` is fine.*\n * @property {boolean | null | undefined} [delimiterEnd=true]\n * Whether to end each row with the delimiter (default: `true`).\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are ending delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no ending delimiters:\n *\n * ```markdown\n * | Alpha | B\n * | ----- | -----\n * | C | Delta\n * ```\n * @property {boolean | null | undefined} [delimiterStart=true]\n * Whether to begin each row with the delimiter (default: `true`).\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are starting delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no starting delimiters:\n *\n * ```markdown\n * Alpha | B |\n * ----- | ----- |\n * C | Delta |\n * ```\n * @property {boolean | null | undefined} [padding=true]\n * Whether to add a space of padding between delimiters and cells\n * (default: `true`).\n *\n * When `true`, there is padding:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there is no padding:\n *\n * ```markdown\n * |Alpha|B |\n * |-----|-----|\n * |C |Delta|\n * ```\n * @property {((value: string) => number) | null | undefined} [stringLength]\n * Function to detect the length of table cell content (optional);\n * this is used when aligning the delimiters (`|`) between table cells;\n * full-width characters and emoji mess up delimiter alignment when viewing\n * the markdown source;\n * to fix this, you can pass this function,\n * which receives the cell content and returns its “visible” size;\n * note that what is and isn’t visible depends on where the text is displayed.\n *\n * Without such a function, the following:\n *\n * ```js\n * markdownTable([\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩❤️👩', 'Delta']\n * ])\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | - | - |\n * | 中文 | Charlie |\n * | 👩❤️👩 | Delta |\n * ```\n *\n * With [`string-width`](https://github.com/sindresorhus/string-width):\n *\n * ```js\n * import stringWidth from 'string-width'\n *\n * markdownTable(\n * [\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩❤️👩', 'Delta']\n * ],\n * {stringLength: stringWidth}\n * )\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | ----- | ------- |\n * | 中文 | Charlie |\n * | 👩❤️👩 | Delta |\n * ```\n */\n\n/**\n * @param {string} value\n * Cell value.\n * @returns {number}\n * Cell size.\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * Generate a markdown\n * ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables))\n * table.\n *\n * @param {ReadonlyArray<ReadonlyArray<string | null | undefined>>} table\n * Table data (matrix of strings).\n * @param {Readonly<Options> | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Result.\n */\nexport function markdownTable(table, options) {\n const settings = options || {}\n // To do: next major: change to spread.\n const align = (settings.align || []).concat()\n const stringLength = settings.stringLength || defaultStringLength\n /** @type {Array<number>} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array<Array<string>>} Cells per row. */\n const cellMatrix = []\n /** @type {Array<Array<number>>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array<number>} */\n const longestCellByColumn = []\n let mostCellsPerRow = 0\n let rowIndex = -1\n\n // This is a superfluous loop if we don’t align delimiters, but otherwise we’d\n // do superfluous work when aligning, so optimize for aligning.\n while (++rowIndex < table.length) {\n /** @type {Array<string>} */\n const row = []\n /** @type {Array<number>} */\n const sizes = []\n let columnIndex = -1\n\n if (table[rowIndex].length > mostCellsPerRow) {\n mostCellsPerRow = table[rowIndex].length\n }\n\n while (++columnIndex < table[rowIndex].length) {\n const cell = serialize(table[rowIndex][columnIndex])\n\n if (settings.alignDelimiters !== false) {\n const size = stringLength(cell)\n sizes[columnIndex] = size\n\n if (\n longestCellByColumn[columnIndex] === undefined ||\n size > longestCellByColumn[columnIndex]\n ) {\n longestCellByColumn[columnIndex] = size\n }\n }\n\n row.push(cell)\n }\n\n cellMatrix[rowIndex] = row\n sizeMatrix[rowIndex] = sizes\n }\n\n // Figure out which alignments to use.\n let columnIndex = -1\n\n if (typeof align === 'object' && 'length' in align) {\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = toAlignment(align[columnIndex])\n }\n } else {\n const code = toAlignment(align)\n\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = code\n }\n }\n\n // Inject the alignment row.\n columnIndex = -1\n /** @type {Array<string>} */\n const row = []\n /** @type {Array<number>} */\n const sizes = []\n\n while (++columnIndex < mostCellsPerRow) {\n const code = alignments[columnIndex]\n let before = ''\n let after = ''\n\n if (code === 99 /* `c` */) {\n before = ':'\n after = ':'\n } else if (code === 108 /* `l` */) {\n before = ':'\n } else if (code === 114 /* `r` */) {\n after = ':'\n }\n\n // There *must* be at least one hyphen-minus in each alignment cell.\n let size =\n settings.alignDelimiters === false\n ? 1\n : Math.max(\n 1,\n longestCellByColumn[columnIndex] - before.length - after.length\n )\n\n const cell = before + '-'.repeat(size) + after\n\n if (settings.alignDelimiters !== false) {\n size = before.length + size + after.length\n\n if (size > longestCellByColumn[columnIndex]) {\n longestCellByColumn[columnIndex] = size\n }\n\n sizes[columnIndex] = size\n }\n\n row[columnIndex] = cell\n }\n\n // Inject the alignment row.\n cellMatrix.splice(1, 0, row)\n sizeMatrix.splice(1, 0, sizes)\n\n rowIndex = -1\n /** @type {Array<string>} */\n const lines = []\n\n while (++rowIndex < cellMatrix.length) {\n const row = cellMatrix[rowIndex]\n const sizes = sizeMatrix[rowIndex]\n columnIndex = -1\n /** @type {Array<string>} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (settings.alignDelimiters !== false) {\n const size =\n longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0)\n const code = alignments[columnIndex]\n\n if (code === 114 /* `r` */) {\n before = ' '.repeat(size)\n } else if (code === 99 /* `c` */) {\n if (size % 2) {\n before = ' '.repeat(size / 2 + 0.5)\n after = ' '.repeat(size / 2 - 0.5)\n } else {\n before = ' '.repeat(size / 2)\n after = before\n }\n } else {\n after = ' '.repeat(size)\n }\n }\n\n if (settings.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n settings.padding !== false &&\n // Don’t add the opening space if we’re not aligning and the cell is\n // empty: there will be a closing space.\n !(settings.alignDelimiters === false && cell === '') &&\n (settings.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (settings.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (settings.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (settings.padding !== false) {\n line.push(' ')\n }\n\n if (\n settings.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n settings.delimiterEnd === false\n ? line.join('').replace(/ +$/, '')\n : line.join('')\n )\n }\n\n return lines.join('\\n')\n}\n\n/**\n * @param {string | null | undefined} [value]\n * Value to serialize.\n * @returns {string}\n * Result.\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string | null | undefined} value\n * Value.\n * @returns {number}\n * Alignment.\n */\nfunction toAlignment(value) {\n const code = typeof value === 'string' ? value.codePointAt(0) : 0\n\n return code === 67 /* `C` */ || code === 99 /* `c` */\n ? 99 /* `c` */\n : code === 76 /* `L` */ || code === 108 /* `l` */\n ? 108 /* `l` */\n : code === 82 /* `R` */ || code === 114 /* `r` */\n ? 114 /* `r` */\n : 0\n}\n","/**\n * @callback Handler\n * Handle a value, with a certain ID field set to a certain value.\n * The ID field is passed to `zwitch`, and it’s value is this function’s\n * place on the `handlers` record.\n * @param {...any} parameters\n * Arbitrary parameters passed to the zwitch.\n * The first will be an object with a certain ID field set to a certain value.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback UnknownHandler\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @param {unknown} value\n * An object with a certain ID field set to an unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback InvalidHandler\n * Handle values that do not have a certain ID field.\n * @param {unknown} value\n * Any unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {void|null|undefined|never}\n * This should crash or return nothing.\n */\n\n/**\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @typedef Options\n * Configuration (required).\n * @property {Invalid} [invalid]\n * Handler to use for invalid values.\n * @property {Unknown} [unknown]\n * Handler to use for unknown values.\n * @property {Handlers} [handlers]\n * Handlers to use.\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Handle values based on a field.\n *\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @param {string} key\n * Field to switch on.\n * @param {Options<Invalid, Unknown, Handlers>} [options]\n * Configuration (required).\n * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}\n */\nexport function zwitch(key, options) {\n const settings = options || {}\n\n /**\n * Handle one value.\n *\n * Based on the bound `key`, a respective handler will be called.\n * If `value` is not an object, or doesn’t have a `key` property, the special\n * “invalid” handler will be called.\n * If `value` has an unknown `key`, the special “unknown” handler will be\n * called.\n *\n * All arguments, and the context object, are passed through to the handler,\n * and it’s result is returned.\n *\n * @this {unknown}\n * Any context object.\n * @param {unknown} [value]\n * Any value.\n * @param {...unknown} parameters\n * Arbitrary parameters passed to the zwitch.\n * @property {Handler} invalid\n * Handle for values that do not have a certain ID field.\n * @property {Handler} unknown\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @property {Handlers} handlers\n * Record of handlers.\n * @returns {unknown}\n * Anything.\n */\n function one(value, ...parameters) {\n /** @type {Handler|undefined} */\n let fn = one.invalid\n const handlers = one.handlers\n\n if (value && own.call(value, key)) {\n // @ts-expect-error Indexable.\n const id = String(value[key])\n // @ts-expect-error Indexable.\n fn = own.call(handlers, id) ? handlers[id] : one.unknown\n }\n\n if (fn) {\n return fn.call(this, value, ...parameters)\n }\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n // @ts-expect-error: matches!\n return one\n}\n","/**\n * @import {Options, State} from './types.js'\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * @param {State} base\n * @param {Options} extension\n * @returns {State}\n */\nexport function configure(base, extension) {\n let index = -1\n /** @type {keyof Options} */\n let key\n\n // First do subextensions.\n if (extension.extensions) {\n while (++index < extension.extensions.length) {\n configure(base, extension.extensions[index])\n }\n }\n\n for (key in extension) {\n if (own.call(extension, key)) {\n switch (key) {\n case 'extensions': {\n // Empty.\n break\n }\n\n /* c8 ignore next 4 */\n case 'unsafe': {\n list(base[key], extension[key])\n break\n }\n\n case 'join': {\n list(base[key], extension[key])\n break\n }\n\n case 'handlers': {\n map(base[key], extension[key])\n break\n }\n\n default: {\n // @ts-expect-error: matches.\n base.options[key] = extension[key]\n }\n }\n }\n }\n\n return base\n}\n\n/**\n * @template T\n * @param {Array<T>} left\n * @param {Array<T> | null | undefined} right\n */\nfunction list(left, right) {\n if (right) {\n left.push(...right)\n }\n}\n\n/**\n * @template T\n * @param {Record<string, T>} left\n * @param {Record<string, T> | null | undefined} right\n */\nfunction map(left, right) {\n if (right) {\n Object.assign(left, right)\n }\n}\n","/**\n * @import {Blockquote, Parents} from 'mdast'\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {Blockquote} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function blockquote(node, _, state, info) {\n const exit = state.enter('blockquote')\n const tracker = state.createTracker(info)\n tracker.move('> ')\n tracker.shift(2)\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return '>' + (blank ? '' : ' ') + line\n}\n","/**\n * @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (typeof list === 'string') {\n list = [list]\n }\n\n if (!list || list.length === 0) {\n return none\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n","/**\n * @import {Break, Parents} from 'mdast'\n * @import {Info, State} from 'mdast-util-to-markdown'\n */\n\nimport {patternInScope} from '../util/pattern-in-scope.js'\n\n/**\n * @param {Break} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function hardBreak(_, _1, state, info) {\n let index = -1\n\n while (++index < state.unsafe.length) {\n // If we can’t put eols in this construct (setext headings, tables), use a\n // space instead.\n if (\n state.unsafe[index].character === '\\n' &&\n patternInScope(state.stack, state.unsafe[index])\n ) {\n return /[ \\t]/.test(info.before) ? '' : ' '\n }\n }\n\n return '\\\\\\n'\n}\n","/**\n * Get the count of the longest repeating streak of `substring` in `value`.\n *\n * @param {string} value\n * Content to search in.\n * @param {string} substring\n * Substring to look for, typically one character.\n * @returns {number}\n * Count of most frequent adjacent `substring`s in `value`.\n */\nexport function longestStreak(value, substring) {\n const source = String(value)\n let index = source.indexOf(substring)\n let expected = index\n let count = 0\n let max = 0\n\n if (typeof substring !== 'string') {\n throw new TypeError('Expected substring')\n }\n\n while (index !== -1) {\n if (index === expected) {\n if (++count > max) {\n max = count\n }\n } else {\n count = 1\n }\n\n expected = index + substring.length\n index = source.indexOf(substring, expected)\n }\n\n return max\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Code} from 'mdast'\n */\n\n/**\n * @param {Code} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatCodeAsIndented(node, state) {\n return Boolean(\n state.options.fences === false &&\n node.value &&\n // If there’s no info…\n !node.lang &&\n // And there’s a non-whitespace character…\n /[^ \\r\\n]/.test(node.value) &&\n // And the value doesn’t start or end in a blank…\n !/^[\\t ]*(?:[\\r\\n]|$)|(?:^|[\\r\\n])[\\t ]*$/.test(node.value)\n )\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['fence'], null | undefined>}\n */\nexport function checkFence(state) {\n const marker = state.options.fence || '`'\n\n if (marker !== '`' && marker !== '~') {\n throw new Error(\n 'Cannot serialize code with `' +\n marker +\n '` for `options.fence`, expected `` ` `` or `~`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n * @import {Code, Parents} from 'mdast'\n */\n\nimport {longestStreak} from 'longest-streak'\nimport {formatCodeAsIndented} from '../util/format-code-as-indented.js'\nimport {checkFence} from '../util/check-fence.js'\n\n/**\n * @param {Code} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function code(node, _, state, info) {\n const marker = checkFence(state)\n const raw = node.value || ''\n const suffix = marker === '`' ? 'GraveAccent' : 'Tilde'\n\n if (formatCodeAsIndented(node, state)) {\n const exit = state.enter('codeIndented')\n const value = state.indentLines(raw, map)\n exit()\n return value\n }\n\n const tracker = state.createTracker(info)\n const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3))\n const exit = state.enter('codeFenced')\n let value = tracker.move(sequence)\n\n if (node.lang) {\n const subexit = state.enter(`codeFencedLang${suffix}`)\n value += tracker.move(\n state.safe(node.lang, {\n before: value,\n after: ' ',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n if (node.lang && node.meta) {\n const subexit = state.enter(`codeFencedMeta${suffix}`)\n value += tracker.move(' ')\n value += tracker.move(\n state.safe(node.meta, {\n before: value,\n after: '\\n',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n value += tracker.move('\\n')\n\n if (raw) {\n value += tracker.move(raw + '\\n')\n }\n\n value += tracker.move(sequence)\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return (blank ? '' : ' ') + line\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['quote'], null | undefined>}\n */\nexport function checkQuote(state) {\n const marker = state.options.quote || '\"'\n\n if (marker !== '\"' && marker !== \"'\") {\n throw new Error(\n 'Cannot serialize title with `' +\n marker +\n '` for `options.quote`, expected `\"`, or `\\'`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Definition, Parents} from 'mdast'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\n/**\n * @param {Definition} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function definition(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('definition')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n value += tracker.move(\n state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n )\n value += tracker.move(']: ')\n\n subexit()\n\n if (\n // If there’s no url, or…\n !node.url ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : '\\n',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n exit()\n\n return value\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['emphasis'], null | undefined>}\n */\nexport function checkEmphasis(state) {\n const marker = state.options.emphasis || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize emphasis with `' +\n marker +\n '` for `options.emphasis`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * Encode a code point as a character reference.\n *\n * @param {number} code\n * Code point to encode.\n * @returns {string}\n * Encoded character reference.\n */\nexport function encodeCharacterReference(code) {\n return '&#x' + code.toString(16).toUpperCase() + ';'\n}\n","/**\n * @import {EncodeSides} from '../types.js'\n */\n\nimport {classifyCharacter} from 'micromark-util-classify-character'\n\n/**\n * Check whether to encode (as a character reference) the characters\n * surrounding an attention run.\n *\n * Which characters are around an attention run influence whether it works or\n * not.\n *\n * See <https://github.com/orgs/syntax-tree/discussions/60> for more info.\n * See this markdown in a particular renderer to see what works:\n *\n * ```markdown\n * | | A (letter inside) | B (punctuation inside) | C (whitespace inside) | D (nothing inside) |\n * | ----------------------- | ----------------- | ---------------------- | --------------------- | ------------------ |\n * | 1 (letter outside) | x*y*z | x*.*z | x* *z | x**z |\n * | 2 (punctuation outside) | .*y*. | .*.*. | .* *. | .**. |\n * | 3 (whitespace outside) | x *y* z | x *.* z | x * * z | x ** z |\n * | 4 (nothing outside) | *x* | *.* | * * | ** |\n * ```\n *\n * @param {number} outside\n * Code point on the outer side of the run.\n * @param {number} inside\n * Code point on the inner side of the run.\n * @param {'*' | '_'} marker\n * Marker of the run.\n * Underscores are handled more strictly (they form less often) than\n * asterisks.\n * @returns {EncodeSides}\n * Whether to encode characters.\n */\n// Important: punctuation must never be encoded.\n// Punctuation is solely used by markdown constructs.\n// And by encoding itself.\n// Encoding them will break constructs or double encode things.\nexport function encodeInfo(outside, inside, marker) {\n const outsideKind = classifyCharacter(outside)\n const insideKind = classifyCharacter(inside)\n\n // Letter outside:\n if (outsideKind === undefined) {\n return insideKind === undefined\n ? // Letter inside:\n // we have to encode *both* letters for `_` as it is looser.\n // it already forms for `*` (and GFMs `~`).\n marker === '_'\n ? {inside: true, outside: true}\n : {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (letter, whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: encode outer (letter)\n {inside: false, outside: true}\n }\n\n // Whitespace outside:\n if (outsideKind === 1) {\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n }\n\n // Punctuation outside:\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode inner (whitespace).\n {inside: true, outside: false}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Emphasis, Parents} from 'mdast'\n */\n\nimport {checkEmphasis} from '../util/check-emphasis.js'\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {encodeInfo} from '../util/encode-info.js'\n\nemphasis.peek = emphasisPeek\n\n/**\n * @param {Emphasis} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function emphasis(node, _, state, info) {\n const marker = checkEmphasis(state)\n const exit = state.enter('emphasis')\n const tracker = state.createTracker(info)\n const before = tracker.move(marker)\n\n let between = tracker.move(\n state.containerPhrasing(node, {\n after: marker,\n before,\n ...tracker.current()\n })\n )\n const betweenHead = between.charCodeAt(0)\n const open = encodeInfo(\n info.before.charCodeAt(info.before.length - 1),\n betweenHead,\n marker\n )\n\n if (open.inside) {\n between = encodeCharacterReference(betweenHead) + between.slice(1)\n }\n\n const betweenTail = between.charCodeAt(between.length - 1)\n const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker)\n\n if (close.inside) {\n between = between.slice(0, -1) + encodeCharacterReference(betweenTail)\n }\n\n const after = tracker.move(marker)\n\n exit()\n\n state.attentionEncodeSurroundingInfo = {\n after: close.outside,\n before: open.outside\n }\n return before + between + after\n}\n\n/**\n * @param {Emphasis} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction emphasisPeek(_, _1, state) {\n return state.options.emphasis || '*'\n}\n","/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n * @import {VisitorResult} from 'unist-util-visit-parents'\n */\n\n/**\n * @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n// To do: use types from `unist-util-visit-parents` when it’s released.\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate<Check, Value> extends Value\n * ? Predicate<Check, Value>\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray<any>\n * ? MatchesOne<Value, Check[number]>\n * : MatchesOne<Value, Check>\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array<infer Children>}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent<Node, Child>\n * | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends UnistNode ? number | undefined : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [Ancestor=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor<Visited, Parent<Ancestor, Visited>>} BuildVisitorFromMatch\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Visited\n * Node type.\n * @template {UnistParent} Ancestor\n * Parent type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromMatch<\n * Matches<Descendant, Check>,\n * Extract<Descendant, UnistParent>\n * >\n * )} BuildVisitorFromDescendants\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromDescendants<\n * InclusiveDescendant<Tree>,\n * Check\n * >\n * )} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} [Tree=UnistNode]\n * Node type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor<Tree, Check>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor<Tree>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} testOrVisitor\n * `unist-util-is`-compatible test (optional, omit to pass a visitor).\n * @param {Visitor | boolean | null | undefined} [visitorOrReverse]\n * Handle each node (when test is omitted, pass `reverse`).\n * @param {boolean | null | undefined} [maybeReverse=false]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {\n /** @type {boolean | null | undefined} */\n let reverse\n /** @type {Test} */\n let test\n /** @type {Visitor} */\n let visitor\n\n if (\n typeof testOrVisitor === 'function' &&\n typeof visitorOrReverse !== 'function'\n ) {\n test = undefined\n visitor = testOrVisitor\n reverse = visitorOrReverse\n } else {\n // @ts-expect-error: assume the overload with test was given.\n test = testOrVisitor\n // @ts-expect-error: assume the overload with test was given.\n visitor = visitorOrReverse\n reverse = maybeReverse\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {UnistNode} node\n * @param {Array<UnistParent>} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n const index = parent ? parent.children.indexOf(node) : undefined\n return visitor(node, index, parent)\n }\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Heading} from 'mdast'\n */\n\nimport {EXIT, visit} from 'unist-util-visit'\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Heading} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatHeadingAsSetext(node, state) {\n let literalWithBreak = false\n\n // Look for literals with a line break.\n // Note that this also\n visit(node, function (node) {\n if (\n ('value' in node && /\\r?\\n|\\r/.test(node.value)) ||\n node.type === 'break'\n ) {\n literalWithBreak = true\n return EXIT\n }\n })\n\n return Boolean(\n (!node.depth || node.depth < 3) &&\n toString(node) &&\n (state.options.setext || literalWithBreak)\n )\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Heading, Parents} from 'mdast'\n */\n\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {formatHeadingAsSetext} from '../util/format-heading-as-setext.js'\n\n/**\n * @param {Heading} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function heading(node, _, state, info) {\n const rank = Math.max(Math.min(6, node.depth || 1), 1)\n const tracker = state.createTracker(info)\n\n if (formatHeadingAsSetext(node, state)) {\n const exit = state.enter('headingSetext')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...tracker.current(),\n before: '\\n',\n after: '\\n'\n })\n subexit()\n exit()\n\n return (\n value +\n '\\n' +\n (rank === 1 ? '=' : '-').repeat(\n // The whole size…\n value.length -\n // Minus the position of the character after the last EOL (or\n // 0 if there is none)…\n (Math.max(value.lastIndexOf('\\r'), value.lastIndexOf('\\n')) + 1)\n )\n )\n }\n\n const sequence = '#'.repeat(rank)\n const exit = state.enter('headingAtx')\n const subexit = state.enter('phrasing')\n\n // Note: for proper tracking, we should reset the output positions when there\n // is no content returned, because then the space is not output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n tracker.move(sequence + ' ')\n\n let value = state.containerPhrasing(node, {\n before: '# ',\n after: '\\n',\n ...tracker.current()\n })\n\n if (/^[\\t ]/.test(value)) {\n // To do: what effect has the character reference on tracking?\n value = encodeCharacterReference(value.charCodeAt(0)) + value.slice(1)\n }\n\n value = value ? sequence + ' ' + value : sequence\n\n if (state.options.closeAtx) {\n value += ' ' + sequence\n }\n\n subexit()\n exit()\n\n return value\n}\n","/**\n * @import {Html} from 'mdast'\n */\n\nhtml.peek = htmlPeek\n\n/**\n * @param {Html} node\n * @returns {string}\n */\nexport function html(node) {\n return node.value || ''\n}\n\n/**\n * @returns {string}\n */\nfunction htmlPeek() {\n return '<'\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Image, Parents} from 'mdast'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\nimage.peek = imagePeek\n\n/**\n * @param {Image} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function image(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('image')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n value += tracker.move(\n state.safe(node.alt, {before: value, after: ']', ...tracker.current()})\n )\n value += tracker.move('](')\n\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n exit()\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imagePeek() {\n return '!'\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {ImageReference, Parents} from 'mdast'\n */\n\nimageReference.peek = imageReferencePeek\n\n/**\n * @param {ImageReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function imageReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('imageReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n const alt = state.safe(node.alt, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(alt + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !alt || alt !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imageReferencePeek() {\n return '!'\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {InlineCode, Parents} from 'mdast'\n */\n\ninlineCode.peek = inlineCodePeek\n\n/**\n * @param {InlineCode} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nexport function inlineCode(node, _, state) {\n let value = node.value || ''\n let sequence = '`'\n let index = -1\n\n // If there is a single grave accent on its own in the code, use a fence of\n // two.\n // If there are two in a row, use one.\n while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {\n sequence += '`'\n }\n\n // If this is not just spaces or eols (tabs don’t count), and either the\n // first or last character are a space, eol, or tick, then pad with spaces.\n if (\n /[^ \\r\\n]/.test(value) &&\n ((/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value)) || /^`|`$/.test(value))\n ) {\n value = ' ' + value + ' '\n }\n\n // We have a potential problem: certain characters after eols could result in\n // blocks being seen.\n // For example, if someone injected the string `'\\n# b'`, then that would\n // result in an ATX heading.\n // We can’t escape characters in `inlineCode`, but because eols are\n // transformed to spaces when going from markdown to HTML anyway, we can swap\n // them out.\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n const expression = state.compilePattern(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n // Only look for `atBreak`s.\n // Btw: note that `atBreak` patterns will always start the regex at LF or\n // CR.\n if (!pattern.atBreak) continue\n\n while ((match = expression.exec(value))) {\n let position = match.index\n\n // Support CRLF (patterns only look for one of the characters).\n if (\n value.charCodeAt(position) === 10 /* `\\n` */ &&\n value.charCodeAt(position - 1) === 13 /* `\\r` */\n ) {\n position--\n }\n\n value = value.slice(0, position) + ' ' + value.slice(match.index + 1)\n }\n }\n\n return sequence + value + sequence\n}\n\n/**\n * @returns {string}\n */\nfunction inlineCodePeek() {\n return '`'\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Link} from 'mdast'\n */\n\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Link} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatLinkAsAutolink(node, state) {\n const raw = toString(node)\n\n return Boolean(\n !state.options.resourceLink &&\n // If there’s a url…\n node.url &&\n // And there’s a no title…\n !node.title &&\n // And the content of `node` is a single text node…\n node.children &&\n node.children.length === 1 &&\n node.children[0].type === 'text' &&\n // And if the url is the same as the content…\n (raw === node.url || 'mailto:' + raw === node.url) &&\n // And that starts w/ a protocol…\n /^[a-z][a-z+.-]+:/i.test(node.url) &&\n // And that doesn’t contain ASCII control codes (character escapes and\n // references don’t work), space, or angle brackets…\n !/[\\0- <>\\u007F]/.test(node.url)\n )\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Link, Parents} from 'mdast'\n * @import {Exit} from '../types.js'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\nimport {formatLinkAsAutolink} from '../util/format-link-as-autolink.js'\n\nlink.peek = linkPeek\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function link(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const tracker = state.createTracker(info)\n /** @type {Exit} */\n let exit\n /** @type {Exit} */\n let subexit\n\n if (formatLinkAsAutolink(node, state)) {\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n exit = state.enter('autolink')\n let value = tracker.move('<')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '>',\n ...tracker.current()\n })\n )\n value += tracker.move('>')\n exit()\n state.stack = stack\n return value\n }\n\n exit = state.enter('link')\n subexit = state.enter('label')\n let value = tracker.move('[')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '](',\n ...tracker.current()\n })\n )\n value += tracker.move('](')\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n\n exit()\n return value\n}\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nfunction linkPeek(node, _, state) {\n return formatLinkAsAutolink(node, state) ? '<' : '['\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {LinkReference, Parents} from 'mdast'\n */\n\nlinkReference.peek = linkReferencePeek\n\n/**\n * @param {LinkReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function linkReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('linkReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n const text = state.containerPhrasing(node, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(text + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !text || text !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction linkReferencePeek() {\n return '['\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bullet'], null | undefined>}\n */\nexport function checkBullet(state) {\n const marker = state.options.bullet || '*'\n\n if (marker !== '*' && marker !== '+' && marker !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bullet`, expected `*`, `+`, or `-`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\nimport {checkBullet} from './check-bullet.js'\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bullet'], null | undefined>}\n */\nexport function checkBulletOther(state) {\n const bullet = checkBullet(state)\n const bulletOther = state.options.bulletOther\n\n if (!bulletOther) {\n return bullet === '*' ? '-' : '*'\n }\n\n if (bulletOther !== '*' && bulletOther !== '+' && bulletOther !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n bulletOther +\n '` for `options.bulletOther`, expected `*`, `+`, or `-`'\n )\n }\n\n if (bulletOther === bullet) {\n throw new Error(\n 'Expected `bullet` (`' +\n bullet +\n '`) and `bulletOther` (`' +\n bulletOther +\n '`) to be different'\n )\n }\n\n return bulletOther\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bulletOrdered'], null | undefined>}\n */\nexport function checkBulletOrdered(state) {\n const marker = state.options.bulletOrdered || '.'\n\n if (marker !== '.' && marker !== ')') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bulletOrdered`, expected `.` or `)`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['rule'], null | undefined>}\n */\nexport function checkRule(state) {\n const marker = state.options.rule || '*'\n\n if (marker !== '*' && marker !== '-' && marker !== '_') {\n throw new Error(\n 'Cannot serialize rules with `' +\n marker +\n '` for `options.rule`, expected `*`, `-`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {List, Parents} from 'mdast'\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkBulletOther} from '../util/check-bullet-other.js'\nimport {checkBulletOrdered} from '../util/check-bullet-ordered.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {List} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function list(node, parent, state, info) {\n const exit = state.enter('list')\n const bulletCurrent = state.bulletCurrent\n /** @type {string} */\n let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state)\n /** @type {string} */\n const bulletOther = node.ordered\n ? bullet === '.'\n ? ')'\n : '.'\n : checkBulletOther(state)\n let useDifferentMarker =\n parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false\n\n if (!node.ordered) {\n const firstListItem = node.children ? node.children[0] : undefined\n\n // If there’s an empty first list item directly in two list items,\n // we have to use a different bullet:\n //\n // ```markdown\n // * - *\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (\n // Bullet could be used as a thematic break marker:\n (bullet === '*' || bullet === '-') &&\n // Empty first list item:\n firstListItem &&\n (!firstListItem.children || !firstListItem.children[0]) &&\n // Directly in two other list items:\n state.stack[state.stack.length - 1] === 'list' &&\n state.stack[state.stack.length - 2] === 'listItem' &&\n state.stack[state.stack.length - 3] === 'list' &&\n state.stack[state.stack.length - 4] === 'listItem' &&\n // That are each the first child.\n state.indexStack[state.indexStack.length - 1] === 0 &&\n state.indexStack[state.indexStack.length - 2] === 0 &&\n state.indexStack[state.indexStack.length - 3] === 0\n ) {\n useDifferentMarker = true\n }\n\n // If there’s a thematic break at the start of the first list item,\n // we have to use a different bullet:\n //\n // ```markdown\n // * ---\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (checkRule(state) === bullet && firstListItem) {\n let index = -1\n\n while (++index < node.children.length) {\n const item = node.children[index]\n\n if (\n item &&\n item.type === 'listItem' &&\n item.children &&\n item.children[0] &&\n item.children[0].type === 'thematicBreak'\n ) {\n useDifferentMarker = true\n break\n }\n }\n }\n }\n\n if (useDifferentMarker) {\n bullet = bulletOther\n }\n\n state.bulletCurrent = bullet\n const value = state.containerFlow(node, info)\n state.bulletLastUsed = bullet\n state.bulletCurrent = bulletCurrent\n exit()\n return value\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['listItemIndent'], null | undefined>}\n */\nexport function checkListItemIndent(state) {\n const style = state.options.listItemIndent || 'one'\n\n if (style !== 'tab' && style !== 'one' && style !== 'mixed') {\n throw new Error(\n 'Cannot serialize items with `' +\n style +\n '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'\n )\n }\n\n return style\n}\n","/**\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n * @import {ListItem, Parents} from 'mdast'\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkListItemIndent} from '../util/check-list-item-indent.js'\n\n/**\n * @param {ListItem} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function listItem(node, parent, state, info) {\n const listItemIndent = checkListItemIndent(state)\n let bullet = state.bulletCurrent || checkBullet(state)\n\n // Add the marker value for ordered lists.\n if (parent && parent.type === 'list' && parent.ordered) {\n bullet =\n (typeof parent.start === 'number' && parent.start > -1\n ? parent.start\n : 1) +\n (state.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n bullet\n }\n\n let size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' &&\n ((parent && parent.type === 'list' && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n const tracker = state.createTracker(info)\n tracker.move(bullet + ' '.repeat(size - bullet.length))\n tracker.shift(size)\n const exit = state.enter('listItem')\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' '.repeat(size)) + line\n }\n\n return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line\n }\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Paragraph, Parents} from 'mdast'\n */\n\n/**\n * @param {Paragraph} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function paragraph(node, _, state, info) {\n const exit = state.enter('paragraph')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, info)\n subexit()\n exit()\n return value\n}\n","/**\n * @typedef {import('mdast').Html} Html\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n */\n\nimport {convert} from 'unist-util-is'\n\n/**\n * Check if the given value is *phrasing content*.\n *\n * > 👉 **Note**: Excludes `html`, which can be both phrasing or flow.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @returns\n * Whether `value` is phrasing content.\n */\n\nexport const phrasing =\n /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */\n (\n convert([\n 'break',\n 'delete',\n 'emphasis',\n // To do: next major: removed since footnotes were added to GFM.\n 'footnote',\n 'footnoteReference',\n 'image',\n 'imageReference',\n 'inlineCode',\n // Enabled by `mdast-util-math`:\n 'inlineMath',\n 'link',\n 'linkReference',\n // Enabled by `mdast-util-mdx`:\n 'mdxJsxTextElement',\n // Enabled by `mdast-util-mdx`:\n 'mdxTextExpression',\n 'strong',\n 'text',\n // Enabled by `mdast-util-directive`:\n 'textDirective'\n ])\n )\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Root} from 'mdast'\n */\n\nimport {phrasing} from 'mdast-util-phrasing'\n\n/**\n * @param {Root} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function root(node, _, state, info) {\n // Note: `html` nodes are ambiguous.\n const hasPhrasing = node.children.some(function (d) {\n return phrasing(d)\n })\n\n const container = hasPhrasing ? state.containerPhrasing : state.containerFlow\n return container.call(state, node, info)\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['strong'], null | undefined>}\n */\nexport function checkStrong(state) {\n const marker = state.options.strong || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize strong with `' +\n marker +\n '` for `options.strong`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Strong} from 'mdast'\n */\n\nimport {checkStrong} from '../util/check-strong.js'\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {encodeInfo} from '../util/encode-info.js'\n\nstrong.peek = strongPeek\n\n/**\n * @param {Strong} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function strong(node, _, state, info) {\n const marker = checkStrong(state)\n const exit = state.enter('strong')\n const tracker = state.createTracker(info)\n const before = tracker.move(marker + marker)\n\n let between = tracker.move(\n state.containerPhrasing(node, {\n after: marker,\n before,\n ...tracker.current()\n })\n )\n const betweenHead = between.charCodeAt(0)\n const open = encodeInfo(\n info.before.charCodeAt(info.before.length - 1),\n betweenHead,\n marker\n )\n\n if (open.inside) {\n between = encodeCharacterReference(betweenHead) + between.slice(1)\n }\n\n const betweenTail = between.charCodeAt(between.length - 1)\n const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker)\n\n if (close.inside) {\n between = between.slice(0, -1) + encodeCharacterReference(betweenTail)\n }\n\n const after = tracker.move(marker + marker)\n\n exit()\n\n state.attentionEncodeSurroundingInfo = {\n after: close.outside,\n before: open.outside\n }\n return before + between + after\n}\n\n/**\n * @param {Strong} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction strongPeek(_, _1, state) {\n return state.options.strong || '*'\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Text} from 'mdast'\n */\n\n/**\n * @param {Text} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function text(node, _, state, info) {\n return state.safe(node.value, info)\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['ruleRepetition'], null | undefined>}\n */\nexport function checkRuleRepetition(state) {\n const repetition = state.options.ruleRepetition || 3\n\n if (repetition < 3) {\n throw new Error(\n 'Cannot serialize rules with repetition `' +\n repetition +\n '` for `options.ruleRepetition`, expected `3` or more'\n )\n }\n\n return repetition\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Parents, ThematicBreak} from 'mdast'\n */\n\nimport {checkRuleRepetition} from '../util/check-rule-repetition.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {ThematicBreak} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nexport function thematicBreak(_, _1, state) {\n const value = (\n checkRule(state) + (state.options.ruleSpaces ? ' ' : '')\n ).repeat(checkRuleRepetition(state))\n\n return state.options.ruleSpaces ? value.slice(0, -1) : value\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {definition} from './definition.js'\nimport {emphasis} from './emphasis.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {image} from './image.js'\nimport {imageReference} from './image-reference.js'\nimport {inlineCode} from './inline-code.js'\nimport {link} from './link.js'\nimport {linkReference} from './link-reference.js'\nimport {list} from './list.js'\nimport {listItem} from './list-item.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default (CommonMark) handlers.\n */\nexport const handle = {\n blockquote,\n break: hardBreak,\n code,\n definition,\n emphasis,\n hardBreak,\n heading,\n html,\n image,\n imageReference,\n inlineCode,\n link,\n linkReference,\n list,\n listItem,\n paragraph,\n root,\n strong,\n text,\n thematicBreak\n}\n","/**\n * @import {Join} from 'mdast-util-to-markdown'\n */\n\nimport {formatCodeAsIndented} from './util/format-code-as-indented.js'\nimport {formatHeadingAsSetext} from './util/format-heading-as-setext.js'\n\n/** @type {Array<Join>} */\nexport const join = [joinDefaults]\n\n/** @type {Join} */\nfunction joinDefaults(left, right, parent, state) {\n // Indented code after list or another indented code.\n if (\n right.type === 'code' &&\n formatCodeAsIndented(right, state) &&\n (left.type === 'list' ||\n (left.type === right.type && formatCodeAsIndented(left, state)))\n ) {\n return false\n }\n\n // Join children of a list or an item.\n // In which case, `parent` has a `spread` field.\n if ('spread' in parent && typeof parent.spread === 'boolean') {\n if (\n left.type === 'paragraph' &&\n // Two paragraphs.\n (left.type === right.type ||\n right.type === 'definition' ||\n // Paragraph followed by a setext heading.\n (right.type === 'heading' && formatHeadingAsSetext(right, state)))\n ) {\n return\n }\n\n return parent.spread ? 1 : 0\n }\n}\n","/**\n * @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'\n */\n\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain things like attention (emphasis, strong), images, or links.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * @type {Array<ConstructName>}\n */\nconst fullPhrasingSpans = [\n 'autolink',\n 'destinationLiteral',\n 'destinationRaw',\n 'reference',\n 'titleQuote',\n 'titleApostrophe'\n]\n\n/** @type {Array<Unsafe>} */\nexport const unsafe = [\n {character: '\\t', after: '[\\\\r\\\\n]', inConstruct: 'phrasing'},\n {character: '\\t', before: '[\\\\r\\\\n]', inConstruct: 'phrasing'},\n {\n character: '\\t',\n inConstruct: ['codeFencedLangGraveAccent', 'codeFencedLangTilde']\n },\n {\n character: '\\r',\n inConstruct: [\n 'codeFencedLangGraveAccent',\n 'codeFencedLangTilde',\n 'codeFencedMetaGraveAccent',\n 'codeFencedMetaTilde',\n 'destinationLiteral',\n 'headingAtx'\n ]\n },\n {\n character: '\\n',\n inConstruct: [\n 'codeFencedLangGraveAccent',\n 'codeFencedLangTilde',\n 'codeFencedMetaGraveAccent',\n 'codeFencedMetaTilde',\n 'destinationLiteral',\n 'headingAtx'\n ]\n },\n {character: ' ', after: '[\\\\r\\\\n]', inConstruct: 'phrasing'},\n {character: ' ', before: '[\\\\r\\\\n]', inConstruct: 'phrasing'},\n {\n character: ' ',\n inConstruct: ['codeFencedLangGraveAccent', 'codeFencedLangTilde']\n },\n // An exclamation mark can start an image, if it is followed by a link or\n // a link reference.\n {\n character: '!',\n after: '\\\\[',\n inConstruct: 'phrasing',\n notInConstruct: fullPhrasingSpans\n },\n // A quote can break out of a title.\n {character: '\"', inConstruct: 'titleQuote'},\n // A number sign could start an ATX heading if it starts a line.\n {atBreak: true, character: '#'},\n {character: '#', inConstruct: 'headingAtx', after: '(?:[\\r\\n]|$)'},\n // Dollar sign and percentage are not used in markdown.\n // An ampersand could start a character reference.\n {character: '&', after: '[#A-Za-z]', inConstruct: 'phrasing'},\n // An apostrophe can break out of a title.\n {character: \"'\", inConstruct: 'titleApostrophe'},\n // A left paren could break out of a destination raw.\n {character: '(', inConstruct: 'destinationRaw'},\n // A left paren followed by `]` could make something into a link or image.\n {\n before: '\\\\]',\n character: '(',\n inConstruct: 'phrasing',\n notInConstruct: fullPhrasingSpans\n },\n // A right paren could start a list item or break out of a destination\n // raw.\n {atBreak: true, before: '\\\\d+', character: ')'},\n {character: ')', inConstruct: 'destinationRaw'},\n // An asterisk can start thematic breaks, list items, emphasis, strong.\n {atBreak: true, character: '*', after: '(?:[ \\t\\r\\n*])'},\n {character: '*', inConstruct: 'phrasing', notInConstruct: fullPhrasingSpans},\n // A plus sign could start a list item.\n {atBreak: true, character: '+', after: '(?:[ \\t\\r\\n])'},\n // A dash can start thematic breaks, list items, and setext heading\n // underlines.\n {atBreak: true, character: '-', after: '(?:[ \\t\\r\\n-])'},\n // A dot could start a list item.\n {atBreak: true, before: '\\\\d+', character: '.', after: '(?:[ \\t\\r\\n]|$)'},\n // Slash, colon, and semicolon are not used in markdown for constructs.\n // A less than can start html (flow or text) or an autolink.\n // HTML could start with an exclamation mark (declaration, cdata, comment),\n // slash (closing tag), question mark (instruction), or a letter (tag).\n // An autolink also starts with a letter.\n // Finally, it could break out of a destination literal.\n {atBreak: true, character: '<', after: '[!/?A-Za-z]'},\n {\n character: '<',\n after: '[!/?A-Za-z]',\n inConstruct: 'phrasing',\n notInConstruct: fullPhrasingSpans\n },\n {character: '<', inConstruct: 'destinationLiteral'},\n // An equals to can start setext heading underlines.\n {atBreak: true, character: '='},\n // A greater than can start block quotes and it can break out of a\n // destination literal.\n {atBreak: true, character: '>'},\n {character: '>', inConstruct: 'destinationLiteral'},\n // Question mark and at sign are not used in markdown for constructs.\n // A left bracket can start definitions, references, labels,\n {atBreak: true, character: '['},\n {character: '[', inConstruct: 'phrasing', notInConstruct: fullPhrasingSpans},\n {character: '[', inConstruct: ['label', 'reference']},\n // A backslash can start an escape (when followed by punctuation) or a\n // hard break (when followed by an eol).\n // Note: typical escapes are handled in `safe`!\n {character: '\\\\', after: '[\\\\r\\\\n]', inConstruct: 'phrasing'},\n // A right bracket can exit labels.\n {character: ']', inConstruct: ['label', 'reference']},\n // Caret is not used in markdown for constructs.\n // An underscore can start emphasis, strong, or a thematic break.\n {atBreak: true, character: '_'},\n {character: '_', inConstruct: 'phrasing', notInConstruct: fullPhrasingSpans},\n // A grave accent can start code (fenced or text), or it can break out of\n // a grave accent code fence.\n {atBreak: true, character: '`'},\n {\n character: '`',\n inConstruct: ['codeFencedLangGraveAccent', 'codeFencedMetaGraveAccent']\n },\n {character: '`', inConstruct: 'phrasing', notInConstruct: fullPhrasingSpans},\n // Left brace, vertical bar, right brace are not used in markdown for\n // constructs.\n // A tilde can start code (fenced).\n {atBreak: true, character: '~'}\n]\n","/**\n * @import {AssociationId} from '../types.js'\n */\n\nimport {decodeString} from 'micromark-util-decode-string'\n\n/**\n * Get an identifier from an association to match it to others.\n *\n * Associations are nodes that match to something else through an ID:\n * <https://github.com/syntax-tree/mdast#association>.\n *\n * The `label` of an association is the string value: character escapes and\n * references work, and casing is intact.\n * The `identifier` is used to match one association to another:\n * controversially, character escapes and references don’t work in this\n * matching: `©` does not match `©`, and `\\+` does not match `+`.\n *\n * But casing is ignored (and whitespace) is trimmed and collapsed: ` A\\nb`\n * matches `a b`.\n * So, we do prefer the label when figuring out how we’re going to serialize:\n * it has whitespace, casing, and we can ignore most useless character\n * escapes and all character references.\n *\n * @type {AssociationId}\n */\nexport function association(node) {\n if (node.label || !node.identifier) {\n return node.label || ''\n }\n\n return decodeString(node.identifier)\n}\n","/**\n * @import {CompilePattern} from '../types.js'\n */\n\n/**\n * @type {CompilePattern}\n */\nexport function compilePattern(pattern) {\n if (!pattern._compiled) {\n const before =\n (pattern.atBreak ? '[\\\\r\\\\n][\\\\t ]*' : '') +\n (pattern.before ? '(?:' + pattern.before + ')' : '')\n\n pattern._compiled = new RegExp(\n (before ? '(' + before + ')' : '') +\n (/[|\\\\{}()[\\]^$+*?.-]/.test(pattern.character) ? '\\\\' : '') +\n pattern.character +\n (pattern.after ? '(?:' + pattern.after + ')' : ''),\n 'g'\n )\n }\n\n return pattern._compiled\n}\n","/**\n * @import {Handle, Info, State} from 'mdast-util-to-markdown'\n * @import {PhrasingParents} from '../types.js'\n */\n\nimport {encodeCharacterReference} from './encode-character-reference.js'\n\n/**\n * Serialize the children of a parent that contains phrasing children.\n *\n * These children will be joined flush together.\n *\n * @param {PhrasingParents} parent\n * Parent of flow nodes.\n * @param {State} state\n * Info passed around about the current state.\n * @param {Info} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined together.\n */\nexport function containerPhrasing(parent, state, info) {\n const indexStack = state.indexStack\n const children = parent.children || []\n /** @type {Array<string>} */\n const results = []\n let index = -1\n let before = info.before\n /** @type {string | undefined} */\n let encodeAfter\n\n indexStack.push(-1)\n let tracker = state.createTracker(info)\n\n while (++index < children.length) {\n const child = children[index]\n /** @type {string} */\n let after\n\n indexStack[indexStack.length - 1] = index\n\n if (index + 1 < children.length) {\n /** @type {Handle} */\n // @ts-expect-error: hush, it’s actually a `zwitch`.\n let handle = state.handle.handlers[children[index + 1].type]\n /** @type {Handle} */\n // @ts-expect-error: hush, it’s actually a `zwitch`.\n if (handle && handle.peek) handle = handle.peek\n after = handle\n ? handle(children[index + 1], parent, state, {\n before: '',\n after: '',\n ...tracker.current()\n }).charAt(0)\n : ''\n } else {\n after = info.after\n }\n\n // In some cases, html (text) can be found in phrasing right after an eol.\n // When we’d serialize that, in most cases that would be seen as html\n // (flow).\n // As we can’t escape or so to prevent it from happening, we take a somewhat\n // reasonable approach: replace that eol with a space.\n // See: <https://github.com/syntax-tree/mdast-util-to-markdown/issues/15>\n if (\n results.length > 0 &&\n (before === '\\r' || before === '\\n') &&\n child.type === 'html'\n ) {\n results[results.length - 1] = results[results.length - 1].replace(\n /(\\r?\\n|\\r)$/,\n ' '\n )\n before = ' '\n\n // To do: does this work to reset tracker?\n tracker = state.createTracker(info)\n tracker.move(results.join(''))\n }\n\n let value = state.handle(child, parent, state, {\n ...tracker.current(),\n after,\n before\n })\n\n // If we had to encode the first character after the previous node and it’s\n // still the same character,\n // encode it.\n if (encodeAfter && encodeAfter === value.slice(0, 1)) {\n value =\n encodeCharacterReference(encodeAfter.charCodeAt(0)) + value.slice(1)\n }\n\n const encodingInfo = state.attentionEncodeSurroundingInfo\n state.attentionEncodeSurroundingInfo = undefined\n encodeAfter = undefined\n\n // If we have to encode the first character before the current node and\n // it’s still the same character,\n // encode it.\n if (encodingInfo) {\n if (\n results.length > 0 &&\n encodingInfo.before &&\n before === results[results.length - 1].slice(-1)\n ) {\n results[results.length - 1] =\n results[results.length - 1].slice(0, -1) +\n encodeCharacterReference(before.charCodeAt(0))\n }\n\n if (encodingInfo.after) encodeAfter = after\n }\n\n tracker.move(value)\n results.push(value)\n before = value.slice(-1)\n }\n\n indexStack.pop()\n\n return results.join('')\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {FlowChildren, FlowParents, TrackFields} from '../types.js'\n */\n\n/**\n * @param {FlowParents} parent\n * Parent of flow nodes.\n * @param {State} state\n * Info passed around about the current state.\n * @param {TrackFields} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined by (blank) lines.\n */\nexport function containerFlow(parent, state, info) {\n const indexStack = state.indexStack\n const children = parent.children || []\n const tracker = state.createTracker(info)\n /** @type {Array<string>} */\n const results = []\n let index = -1\n\n indexStack.push(-1)\n\n while (++index < children.length) {\n const child = children[index]\n\n indexStack[indexStack.length - 1] = index\n\n results.push(\n tracker.move(\n state.handle(child, parent, state, {\n before: '\\n',\n after: '\\n',\n ...tracker.current()\n })\n )\n )\n\n if (child.type !== 'list') {\n state.bulletLastUsed = undefined\n }\n\n if (index < children.length - 1) {\n results.push(\n tracker.move(between(child, children[index + 1], parent, state))\n )\n }\n }\n\n indexStack.pop()\n\n return results.join('')\n}\n\n/**\n * @param {FlowChildren} left\n * @param {FlowChildren} right\n * @param {FlowParents} parent\n * @param {State} state\n * @returns {string}\n */\nfunction between(left, right, parent, state) {\n let index = state.join.length\n\n while (index--) {\n const result = state.join[index](left, right, parent, state)\n\n if (result === true || result === 1) {\n break\n }\n\n if (typeof result === 'number') {\n return '\\n'.repeat(1 + result)\n }\n\n if (result === false) {\n return '\\n\\n<!---->\\n\\n'\n }\n }\n\n return '\\n\\n'\n}\n","/**\n * @import {IndentLines} from '../types.js'\n */\n\nconst eol = /\\r?\\n|\\r/g\n\n/**\n * @type {IndentLines}\n */\nexport function indentLines(value, map) {\n /** @type {Array<string>} */\n const result = []\n let start = 0\n let line = 0\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = eol.exec(value))) {\n one(value.slice(start, match.index))\n result.push(match[0])\n start = match.index + match[0].length\n line++\n }\n\n one(value.slice(start))\n\n return result.join('')\n\n /**\n * @param {string} value\n */\n function one(value) {\n result.push(map(value, line, !value))\n }\n}\n","/**\n * @import {SafeConfig, State} from 'mdast-util-to-markdown'\n */\n\nimport {encodeCharacterReference} from './encode-character-reference.js'\nimport {patternInScope} from './pattern-in-scope.js'\n\n/**\n * Make a string safe for embedding in markdown constructs.\n *\n * In markdown, almost all punctuation characters can, in certain cases,\n * result in something.\n * Whether they do is highly subjective to where they happen and in what\n * they happen.\n *\n * To solve this, `mdast-util-to-markdown` tracks:\n *\n * * Characters before and after something;\n * * What “constructs” we are in.\n *\n * This information is then used by this function to escape or encode\n * special characters.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {string | null | undefined} input\n * Raw value to make safe.\n * @param {SafeConfig} config\n * Configuration.\n * @returns {string}\n * Serialized markdown safe for embedding.\n */\nexport function safe(state, input, config) {\n const value = (config.before || '') + (input || '') + (config.after || '')\n /** @type {Array<number>} */\n const positions = []\n /** @type {Array<string>} */\n const result = []\n /** @type {Record<number, {before: boolean, after: boolean}>} */\n const infos = {}\n let index = -1\n\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n\n if (!patternInScope(state.stack, pattern)) {\n continue\n }\n\n const expression = state.compilePattern(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = expression.exec(value))) {\n const before = 'before' in pattern || Boolean(pattern.atBreak)\n const after = 'after' in pattern\n const position = match.index + (before ? match[1].length : 0)\n\n if (positions.includes(position)) {\n if (infos[position].before && !before) {\n infos[position].before = false\n }\n\n if (infos[position].after && !after) {\n infos[position].after = false\n }\n } else {\n positions.push(position)\n infos[position] = {before, after}\n }\n }\n }\n\n positions.sort(numerical)\n\n let start = config.before ? config.before.length : 0\n const end = value.length - (config.after ? config.after.length : 0)\n index = -1\n\n while (++index < positions.length) {\n const position = positions[index]\n\n // Character before or after matched:\n if (position < start || position >= end) {\n continue\n }\n\n // If this character is supposed to be escaped because it has a condition on\n // the next character, and the next character is definitly being escaped,\n // then skip this escape.\n if (\n (position + 1 < end &&\n positions[index + 1] === position + 1 &&\n infos[position].after &&\n !infos[position + 1].before &&\n !infos[position + 1].after) ||\n (positions[index - 1] === position - 1 &&\n infos[position].before &&\n !infos[position - 1].before &&\n !infos[position - 1].after)\n ) {\n continue\n }\n\n if (start !== position) {\n // If we have to use a character reference, an ampersand would be more\n // correct, but as backslashes only care about punctuation, either will\n // do the trick\n result.push(escapeBackslashes(value.slice(start, position), '\\\\'))\n }\n\n start = position\n\n if (\n /[!-/:-@[-`{-~]/.test(value.charAt(position)) &&\n (!config.encode || !config.encode.includes(value.charAt(position)))\n ) {\n // Character escape.\n result.push('\\\\')\n } else {\n // Character reference.\n result.push(encodeCharacterReference(value.charCodeAt(position)))\n start++\n }\n }\n\n result.push(escapeBackslashes(value.slice(start, end), config.after))\n\n return result.join('')\n}\n\n/**\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction numerical(a, b) {\n return a - b\n}\n\n/**\n * @param {string} value\n * @param {string} after\n * @returns {string}\n */\nfunction escapeBackslashes(value, after) {\n const expression = /\\\\(?=[!-/:-@[-`{-~])/g\n /** @type {Array<number>} */\n const positions = []\n /** @type {Array<string>} */\n const results = []\n const whole = value + after\n let index = -1\n let start = 0\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = expression.exec(whole))) {\n positions.push(match.index)\n }\n\n while (++index < positions.length) {\n if (start !== positions[index]) {\n results.push(value.slice(start, positions[index]))\n }\n\n results.push('\\\\')\n start = positions[index]\n }\n\n results.push(value.slice(start))\n\n return results.join('')\n}\n","/**\n * @import {CreateTracker, TrackCurrent, TrackMove, TrackShift} from '../types.js'\n */\n\n/**\n * Track positional info in the output.\n *\n * @type {CreateTracker}\n */\nexport function track(config) {\n // Defaults are used to prevent crashes when older utilities somehow activate\n // this code.\n /* c8 ignore next 5 */\n const options = config || {}\n const now = options.now || {}\n let lineShift = options.lineShift || 0\n let line = now.line || 1\n let column = now.column || 1\n\n return {move, current, shift}\n\n /**\n * Get the current tracked info.\n *\n * @type {TrackCurrent}\n */\n function current() {\n return {now: {line, column}, lineShift}\n }\n\n /**\n * Define an increased line shift (the typical indent for lines).\n *\n * @type {TrackShift}\n */\n function shift(value) {\n lineShift += value\n }\n\n /**\n * Move past some generated markdown.\n *\n * @type {TrackMove}\n */\n function move(input) {\n // eslint-disable-next-line unicorn/prefer-default-parameters\n const value = input || ''\n const chunks = value.split(/\\r?\\n|\\r/g)\n const tail = chunks[chunks.length - 1]\n line += chunks.length - 1\n column =\n chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift\n return value\n }\n}\n","/**\n * @import {Info, Join, Options, SafeConfig, State} from 'mdast-util-to-markdown'\n * @import {Nodes} from 'mdast'\n * @import {Enter, FlowParents, PhrasingParents, TrackFields} from './types.js'\n */\n\nimport {zwitch} from 'zwitch'\nimport {configure} from './configure.js'\nimport {handle as handlers} from './handle/index.js'\nimport {join} from './join.js'\nimport {unsafe} from './unsafe.js'\nimport {association} from './util/association.js'\nimport {compilePattern} from './util/compile-pattern.js'\nimport {containerPhrasing} from './util/container-phrasing.js'\nimport {containerFlow} from './util/container-flow.js'\nimport {indentLines} from './util/indent-lines.js'\nimport {safe} from './util/safe.js'\nimport {track} from './util/track.js'\n\n/**\n * Turn an mdast syntax tree into markdown.\n *\n * @param {Nodes} tree\n * Tree to serialize.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized markdown representing `tree`.\n */\nexport function toMarkdown(tree, options) {\n const settings = options || {}\n /** @type {State} */\n const state = {\n associationId: association,\n containerPhrasing: containerPhrasingBound,\n containerFlow: containerFlowBound,\n createTracker: track,\n compilePattern,\n enter,\n // @ts-expect-error: GFM / frontmatter are typed in `mdast` but not defined\n // here.\n handlers: {...handlers},\n // @ts-expect-error: add `handle` in a second.\n handle: undefined,\n indentLines,\n indexStack: [],\n join: [...join],\n options: {},\n safe: safeBound,\n stack: [],\n unsafe: [...unsafe]\n }\n\n configure(state, settings)\n\n if (state.options.tightDefinitions) {\n state.join.push(joinDefinition)\n }\n\n state.handle = zwitch('type', {\n invalid,\n unknown,\n handlers: state.handlers\n })\n\n let result = state.handle(tree, undefined, state, {\n before: '\\n',\n after: '\\n',\n now: {line: 1, column: 1},\n lineShift: 0\n })\n\n if (\n result &&\n result.charCodeAt(result.length - 1) !== 10 &&\n result.charCodeAt(result.length - 1) !== 13\n ) {\n result += '\\n'\n }\n\n return result\n\n /** @type {Enter} */\n function enter(name) {\n state.stack.push(name)\n return exit\n\n /**\n * @returns {undefined}\n */\n function exit() {\n state.stack.pop()\n }\n }\n}\n\n/**\n * @param {unknown} value\n * @returns {never}\n */\nfunction invalid(value) {\n throw new Error('Cannot handle value `' + value + '`, expected node')\n}\n\n/**\n * @param {unknown} value\n * @returns {never}\n */\nfunction unknown(value) {\n // Always a node.\n const node = /** @type {Nodes} */ (value)\n throw new Error('Cannot handle unknown node `' + node.type + '`')\n}\n\n/** @type {Join} */\nfunction joinDefinition(left, right) {\n // No blank line between adjacent definitions.\n if (left.type === 'definition' && left.type === right.type) {\n return 0\n }\n}\n\n/**\n * Serialize the children of a parent that contains phrasing children.\n *\n * These children will be joined flush together.\n *\n * @this {State}\n * Info passed around about the current state.\n * @param {PhrasingParents} parent\n * Parent of flow nodes.\n * @param {Info} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined together.\n */\nfunction containerPhrasingBound(parent, info) {\n return containerPhrasing(parent, this, info)\n}\n\n/**\n * Serialize the children of a parent that contains flow children.\n *\n * These children will typically be joined by blank lines.\n * What they are joined by exactly is defined by `Join` functions.\n *\n * @this {State}\n * Info passed around about the current state.\n * @param {FlowParents} parent\n * Parent of flow nodes.\n * @param {TrackFields} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined by (blank) lines.\n */\nfunction containerFlowBound(parent, info) {\n return containerFlow(parent, this, info)\n}\n\n/**\n * Make a string safe for embedding in markdown constructs.\n *\n * In markdown, almost all punctuation characters can, in certain cases,\n * result in something.\n * Whether they do is highly subjective to where they happen and in what\n * they happen.\n *\n * To solve this, `mdast-util-to-markdown` tracks:\n *\n * * Characters before and after something;\n * * What “constructs” we are in.\n *\n * This information is then used by this function to escape or encode\n * special characters.\n *\n * @this {State}\n * Info passed around about the current state.\n * @param {string | null | undefined} value\n * Raw value to make safe.\n * @param {SafeConfig} config\n * Configuration.\n * @returns {string}\n * Serialized markdown safe for embedding.\n */\nfunction safeBound(value, config) {\n return safe(this, value, config)\n}\n","/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').TableRow} TableRow\n *\n * @typedef {import('markdown-table').Options} MarkdownTableOptions\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').State} State\n * @typedef {import('mdast-util-to-markdown').Info} Info\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [tableCellPadding=true]\n * Whether to add a space of padding between delimiters and cells (default:\n * `true`).\n * @property {boolean | null | undefined} [tablePipeAlign=true]\n * Whether to align the delimiters (default: `true`).\n * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]\n * Function to detect the length of table cell content, used when aligning\n * the delimiters between cells (optional).\n */\n\nimport {ok as assert} from 'devlop'\nimport {markdownTable} from 'markdown-table'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM tables in\n * markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM tables.\n */\nexport function gfmTableFromMarkdown() {\n return {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterTable(token) {\n const align = token._align\n assert(align, 'expected `_align` on table')\n this.enter(\n {\n type: 'table',\n align: align.map(function (d) {\n return d === 'none' ? null : d\n }),\n children: []\n },\n token\n )\n this.data.inTable = true\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitTable(token) {\n this.exit(token)\n this.data.inTable = undefined\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exit(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.data.inTable) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'inlineCode')\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM tables in\n * markdown.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM tables.\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>\n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n inlineCode: inlineCodeWithTable,\n table: handleTable,\n tableCell: handleTableCell,\n tableRow: handleTableRow\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, state, info) {\n return serializeData(handleTableAsData(node, state, info), node.align)\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, state, info) {\n const row = handleTableRowAsData(node, state, info)\n const value = serializeData([row])\n // `markdown-table` will always add an align row\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, state, info) {\n const exit = state.enter('tableCell')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...info,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array<Array<string>>} matrix\n * @param {Array<string | null | undefined> | null | undefined} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n // @ts-expect-error: `markdown-table` types should support `null`.\n alignDelimiters,\n // @ts-expect-error: `markdown-table` types should support `null`.\n padding,\n // @ts-expect-error: `markdown-table` types should support `null`.\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<Array<string>>} */\n const result = []\n const subexit = state.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(children[index], state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableRowAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<string>} */\n const result = []\n const subexit = state.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(children[index], node, state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, state) {\n let value = defaultHandlers.inlineCode(node, parent, state)\n\n if (state.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n","/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {ok as assert} from 'devlop'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM task\n * list items in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemFromMarkdown() {\n return {\n exit: {\n taskListCheckValueChecked: exitCheck,\n taskListCheckValueUnchecked: exitCheck,\n paragraph: exitParagraphWithTaskListItem\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM task list\n * items in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemToMarkdown() {\n return {\n unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],\n handlers: {listItem: listItemWithTaskListItem}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCheck(token) {\n // We’re always in a paragraph, in a list item.\n const node = this.stack[this.stack.length - 2]\n assert(node.type === 'listItem')\n node.checked = token.type === 'taskListCheckValueChecked'\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitParagraphWithTaskListItem(token) {\n const parent = this.stack[this.stack.length - 2]\n\n if (\n parent &&\n parent.type === 'listItem' &&\n typeof parent.checked === 'boolean'\n ) {\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'paragraph')\n const head = node.children[0]\n\n if (head && head.type === 'text') {\n const siblings = parent.children\n let index = -1\n /** @type {Paragraph | undefined} */\n let firstParaghraph\n\n while (++index < siblings.length) {\n const sibling = siblings[index]\n if (sibling.type === 'paragraph') {\n firstParaghraph = sibling\n break\n }\n }\n\n if (firstParaghraph === node) {\n // Must start with a space or a tab.\n head.value = head.value.slice(1)\n\n if (head.value.length === 0) {\n node.children.shift()\n } else if (\n node.position &&\n head.position &&\n typeof head.position.start.offset === 'number'\n ) {\n head.position.start.column++\n head.position.start.offset++\n node.position.start = Object.assign({}, head.position.start)\n }\n }\n }\n }\n\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {ListItem} node\n */\nfunction listItemWithTaskListItem(node, parent, state, info) {\n const head = node.children[0]\n const checkable =\n typeof node.checked === 'boolean' && head && head.type === 'paragraph'\n const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '\n const tracker = state.createTracker(info)\n\n if (checkable) {\n tracker.move(checkbox)\n }\n\n let value = defaultHandlers.listItem(node, parent, state, {\n ...info,\n ...tracker.current()\n })\n\n if (checkable) {\n value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check)\n }\n\n return value\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function check($0) {\n return $0 + checkbox\n }\n}\n","/**\n * @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'\n * @import {Options} from 'mdast-util-gfm'\n * @import {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\n */\n\nimport {\n gfmAutolinkLiteralFromMarkdown,\n gfmAutolinkLiteralToMarkdown\n} from 'mdast-util-gfm-autolink-literal'\nimport {\n gfmFootnoteFromMarkdown,\n gfmFootnoteToMarkdown\n} from 'mdast-util-gfm-footnote'\nimport {\n gfmStrikethroughFromMarkdown,\n gfmStrikethroughToMarkdown\n} from 'mdast-util-gfm-strikethrough'\nimport {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'\nimport {\n gfmTaskListItemFromMarkdown,\n gfmTaskListItemToMarkdown\n} from 'mdast-util-gfm-task-list-item'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @returns {Array<FromMarkdownExtension>}\n * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmFromMarkdown() {\n return [\n gfmAutolinkLiteralFromMarkdown(),\n gfmFootnoteFromMarkdown(),\n gfmStrikethroughFromMarkdown(),\n gfmTableFromMarkdown(),\n gfmTaskListItemFromMarkdown()\n ]\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmToMarkdown(options) {\n return {\n extensions: [\n gfmAutolinkLiteralToMarkdown(),\n gfmFootnoteToMarkdown(options),\n gfmStrikethroughToMarkdown(),\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown()\n ]\n }\n}\n","/**\n * @import {Code, ConstructRecord, Event, Extension, Previous, State, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { asciiAlpha, asciiAlphanumeric, asciiControl, markdownLineEndingOrSpace, unicodePunctuation, unicodeWhitespace } from 'micromark-util-character';\nconst wwwPrefix = {\n tokenize: tokenizeWwwPrefix,\n partial: true\n};\nconst domain = {\n tokenize: tokenizeDomain,\n partial: true\n};\nconst path = {\n tokenize: tokenizePath,\n partial: true\n};\nconst trail = {\n tokenize: tokenizeTrail,\n partial: true\n};\nconst emailDomainDotTrail = {\n tokenize: tokenizeEmailDomainDotTrail,\n partial: true\n};\nconst wwwAutolink = {\n name: 'wwwAutolink',\n tokenize: tokenizeWwwAutolink,\n previous: previousWww\n};\nconst protocolAutolink = {\n name: 'protocolAutolink',\n tokenize: tokenizeProtocolAutolink,\n previous: previousProtocol\n};\nconst emailAutolink = {\n name: 'emailAutolink',\n tokenize: tokenizeEmailAutolink,\n previous: previousEmail\n};\n\n/** @type {ConstructRecord} */\nconst text = {};\n\n/**\n * Create an extension for `micromark` to support GitHub autolink literal\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * autolink literal syntax.\n */\nexport function gfmAutolinkLiteral() {\n return {\n text\n };\n}\n\n/** @type {Code} */\nlet code = 48;\n\n// Add alphanumerics.\nwhile (code < 123) {\n text[code] = emailAutolink;\n code++;\n if (code === 58) code = 65;else if (code === 91) code = 97;\n}\ntext[43] = emailAutolink;\ntext[45] = emailAutolink;\ntext[46] = emailAutolink;\ntext[95] = emailAutolink;\ntext[72] = [emailAutolink, protocolAutolink];\ntext[104] = [emailAutolink, protocolAutolink];\ntext[87] = [emailAutolink, wwwAutolink];\ntext[119] = [emailAutolink, wwwAutolink];\n\n// To do: perform email autolink literals on events, afterwards.\n// That’s where `markdown-rs` and `cmark-gfm` perform it.\n// It should look for `@`, then for atext backwards, and then for a label\n// forwards.\n// To do: `mailto:`, `xmpp:` protocol as prefix.\n\n/**\n * Email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailAutolink(effects, ok, nok) {\n const self = this;\n /** @type {boolean | undefined} */\n let dot;\n /** @type {boolean} */\n let data;\n return start;\n\n /**\n * Start of email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (!gfmAtext(code) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkEmail');\n return atext(code);\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function atext(code) {\n if (gfmAtext(code)) {\n effects.consume(code);\n return atext;\n }\n if (code === 64) {\n effects.consume(code);\n return emailDomain;\n }\n return nok(code);\n }\n\n /**\n * In email domain.\n *\n * The reference code is a bit overly complex as it handles the `@`, of which\n * there may be just one.\n * Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L318>\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomain(code) {\n // Dot followed by alphanumerical (not `-` or `_`).\n if (code === 46) {\n return effects.check(emailDomainDotTrail, emailDomainAfter, emailDomainDot)(code);\n }\n\n // Alphanumerical, `-`, and `_`.\n if (code === 45 || code === 95 || asciiAlphanumeric(code)) {\n data = true;\n effects.consume(code);\n return emailDomain;\n }\n\n // To do: `/` if xmpp.\n\n // Note: normally we’d truncate trailing punctuation from the link.\n // However, email autolink literals cannot contain any of those markers,\n // except for `.`, but that can only occur if it isn’t trailing.\n // So we can ignore truncating!\n return emailDomainAfter(code);\n }\n\n /**\n * In email domain, on dot that is not a trail.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainDot(code) {\n effects.consume(code);\n dot = true;\n return emailDomain;\n }\n\n /**\n * After email domain.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainAfter(code) {\n // Domain must not be empty, must include a dot, and must end in alphabetical.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L332>.\n if (data && dot && asciiAlpha(self.previous)) {\n effects.exit('literalAutolinkEmail');\n effects.exit('literalAutolink');\n return ok(code);\n }\n return nok(code);\n }\n}\n\n/**\n * `www` autolink literal.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwAutolink(effects, ok, nok) {\n const self = this;\n return wwwStart;\n\n /**\n * Start of www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwStart(code) {\n if (code !== 87 && code !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkWww');\n // Note: we *check*, so we can discard the `www.` we parsed.\n // If it worked, we consider it as a part of the domain.\n return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path, wwwAfter), nok), nok)(code);\n }\n\n /**\n * After a www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwAfter(code) {\n effects.exit('literalAutolinkWww');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * Protocol autolink literal.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeProtocolAutolink(effects, ok, nok) {\n const self = this;\n let buffer = '';\n let seen = false;\n return protocolStart;\n\n /**\n * Start of protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolStart(code) {\n if ((code === 72 || code === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) {\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkHttp');\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n return nok(code);\n }\n\n /**\n * In protocol.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^^^^\n * ```\n *\n * @type {State}\n */\n function protocolPrefixInside(code) {\n // `5` is size of `https`\n if (asciiAlpha(code) && buffer.length < 5) {\n // @ts-expect-error: definitely number.\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n if (code === 58) {\n const protocol = buffer.toLowerCase();\n if (protocol === 'http' || protocol === 'https') {\n effects.consume(code);\n return protocolSlashesInside;\n }\n }\n return nok(code);\n }\n\n /**\n * In slashes.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^\n * ```\n *\n * @type {State}\n */\n function protocolSlashesInside(code) {\n if (code === 47) {\n effects.consume(code);\n if (seen) {\n return afterProtocol;\n }\n seen = true;\n return protocolSlashesInside;\n }\n return nok(code);\n }\n\n /**\n * After protocol, before domain.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function afterProtocol(code) {\n // To do: this is different from `markdown-rs`:\n // https://github.com/wooorm/markdown-rs/blob/b3a921c761309ae00a51fe348d8a43adbc54b518/src/construct/gfm_autolink_literal.rs#L172-L182\n return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code);\n }\n\n /**\n * After a protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolAfter(code) {\n effects.exit('literalAutolinkHttp');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * `www` prefix.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwPrefix(effects, ok, nok) {\n let size = 0;\n return wwwPrefixInside;\n\n /**\n * In www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixInside(code) {\n if ((code === 87 || code === 119) && size < 3) {\n size++;\n effects.consume(code);\n return wwwPrefixInside;\n }\n if (code === 46 && size === 3) {\n effects.consume(code);\n return wwwPrefixAfter;\n }\n return nok(code);\n }\n\n /**\n * After www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixAfter(code) {\n // If there is *anything*, we can link.\n return code === null ? nok(code) : ok(code);\n }\n}\n\n/**\n * Domain.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDomain(effects, ok, nok) {\n /** @type {boolean | undefined} */\n let underscoreInLastSegment;\n /** @type {boolean | undefined} */\n let underscoreInLastLastSegment;\n /** @type {boolean | undefined} */\n let seen;\n return domainInside;\n\n /**\n * In domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^^^^^^^^^^\n * ```\n *\n * @type {State}\n */\n function domainInside(code) {\n // Check whether this marker, which is a trailing punctuation\n // marker, optionally followed by more trailing markers, and then\n // followed by an end.\n if (code === 46 || code === 95) {\n return effects.check(trail, domainAfter, domainAtPunctuation)(code);\n }\n\n // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can\n // occur, which sounds like ASCII only, but they also support `www.點看.com`,\n // so that’s Unicode.\n // Instead of some new production for Unicode alphanumerics, markdown\n // already has that for Unicode punctuation and whitespace, so use those.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L12>.\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || code !== 45 && unicodePunctuation(code)) {\n return domainAfter(code);\n }\n seen = true;\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * In domain, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function domainAtPunctuation(code) {\n // There is an underscore in the last segment of the domain\n if (code === 95) {\n underscoreInLastSegment = true;\n }\n // Otherwise, it’s a `.`: save the last segment underscore in the\n // penultimate segment slot.\n else {\n underscoreInLastLastSegment = underscoreInLastSegment;\n underscoreInLastSegment = undefined;\n }\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * After domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^\n * ```\n *\n * @type {State} */\n function domainAfter(code) {\n // Note: that’s GH says a dot is needed, but it’s not true:\n // <https://github.com/github/cmark-gfm/issues/279>\n if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {\n return nok(code);\n }\n return ok(code);\n }\n}\n\n/**\n * Path.\n *\n * ```markdown\n * > | a https://example.org/stuff b\n * ^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePath(effects, ok) {\n let sizeOpen = 0;\n let sizeClose = 0;\n return pathInside;\n\n /**\n * In path.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^\n * ```\n *\n * @type {State}\n */\n function pathInside(code) {\n if (code === 40) {\n sizeOpen++;\n effects.consume(code);\n return pathInside;\n }\n\n // To do: `markdown-rs` also needs this.\n // If this is a paren, and there are less closings than openings,\n // we don’t check for a trail.\n if (code === 41 && sizeClose < sizeOpen) {\n return pathAtPunctuation(code);\n }\n\n // Check whether this trailing punctuation marker is optionally\n // followed by more trailing markers, and then followed\n // by an end.\n if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 63 || code === 93 || code === 95 || code === 126) {\n return effects.check(trail, ok, pathAtPunctuation)(code);\n }\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n effects.consume(code);\n return pathInside;\n }\n\n /**\n * In path, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com/a\"b\n * ^\n * ```\n *\n * @type {State}\n */\n function pathAtPunctuation(code) {\n // Count closing parens.\n if (code === 41) {\n sizeClose++;\n }\n effects.consume(code);\n return pathInside;\n }\n}\n\n/**\n * Trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the entire trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | https://example.com\").\n * ^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTrail(effects, ok, nok) {\n return trail;\n\n /**\n * In trail of domain or path.\n *\n * ```markdown\n * > | https://example.com\").\n * ^\n * ```\n *\n * @type {State}\n */\n function trail(code) {\n // Regular trailing punctuation.\n if (code === 33 || code === 34 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 63 || code === 95 || code === 126) {\n effects.consume(code);\n return trail;\n }\n\n // `&` followed by one or more alphabeticals and then a `;`, is\n // as a whole considered as trailing punctuation.\n // In all other cases, it is considered as continuation of the URL.\n if (code === 38) {\n effects.consume(code);\n return trailCharacterReferenceStart;\n }\n\n // Needed because we allow literals after `[`, as we fix:\n // <https://github.com/github/cmark-gfm/issues/278>.\n // Check that it is not followed by `(` or `[`.\n if (code === 93) {\n effects.consume(code);\n return trailBracketAfter;\n }\n if (\n // `<` is an end.\n code === 60 ||\n // So is whitespace.\n code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return nok(code);\n }\n\n /**\n * In trail, after `]`.\n *\n * > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.\n * > See end of <https://github.com/github/cmark-gfm/issues/278> for more.\n *\n * ```markdown\n * > | https://example.com](\n * ^\n * ```\n *\n * @type {State}\n */\n function trailBracketAfter(code) {\n // Whitespace or something that could start a resource or reference is the end.\n // Switch back to trail otherwise.\n if (code === null || code === 40 || code === 91 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return trail(code);\n }\n\n /**\n * In character-reference like trail, after `&`.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceStart(code) {\n // When non-alpha, it’s not a trail.\n return asciiAlpha(code) ? trailCharacterReferenceInside(code) : nok(code);\n }\n\n /**\n * In character-reference like trail.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceInside(code) {\n // Switch back to trail if this is well-formed.\n if (code === 59) {\n effects.consume(code);\n return trail;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return trailCharacterReferenceInside;\n }\n\n // It’s not a trail.\n return nok(code);\n }\n}\n\n/**\n * Dot in email domain trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | contact@example.org.\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailDomainDotTrail(effects, ok, nok) {\n return start;\n\n /**\n * Dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Must be dot.\n effects.consume(code);\n return after;\n }\n\n /**\n * After dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Not a trail if alphanumeric.\n return asciiAlphanumeric(code) ? nok(code) : ok(code);\n }\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L156>.\n *\n * @type {Previous}\n */\nfunction previousWww(code) {\n return code === null || code === 40 || code === 42 || code === 95 || code === 91 || code === 93 || code === 126 || markdownLineEndingOrSpace(code);\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L214>.\n *\n * @type {Previous}\n */\nfunction previousProtocol(code) {\n return !asciiAlpha(code);\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previousEmail(code) {\n // Do not allow a slash “inside” atext.\n // The reference code is a bit weird, but that’s what it results in.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L307>.\n // Other than slash, every preceding character is allowed.\n return !(code === 47 || gfmAtext(code));\n}\n\n/**\n * @param {Code} code\n * @returns {boolean}\n */\nfunction gfmAtext(code) {\n return code === 43 || code === 45 || code === 46 || code === 95 || asciiAlphanumeric(code);\n}\n\n/**\n * @param {Array<Event>} events\n * @returns {boolean}\n */\nfunction previousUnbalanced(events) {\n let index = events.length;\n let result = false;\n while (index--) {\n const token = events[index][1];\n if ((token.type === 'labelLink' || token.type === 'labelImage') && !token._balanced) {\n result = true;\n break;\n }\n\n // If we’ve seen this token, and it was marked as not having any unbalanced\n // bracket before it, we can exit.\n if (token._gfmAutolinkLiteralWalkedInto) {\n result = false;\n break;\n }\n }\n if (events.length > 0 && !result) {\n // Mark the last token as “walked into” w/o finding\n // anything.\n events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;\n }\n return result;\n}","/**\n * @import {CompileContext, Handle, HtmlExtension, Token} from 'micromark-util-types'\n */\n\nimport { sanitizeUri } from 'micromark-util-sanitize-uri';\n\n/**\n * Create an HTML extension for `micromark` to support GitHub autolink literal\n * when serializing to HTML.\n *\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GitHub autolink literal when serializing to HTML.\n */\nexport function gfmAutolinkLiteralHtml() {\n return {\n exit: {\n literalAutolinkEmail,\n literalAutolinkHttp,\n literalAutolinkWww\n }\n };\n}\n\n/**\n * @this {CompileContext}\n * @type {Handle}\n */\nfunction literalAutolinkWww(token) {\n anchorFromToken.call(this, token, 'http://');\n}\n\n/**\n * @this {CompileContext}\n * @type {Handle}\n */\nfunction literalAutolinkEmail(token) {\n anchorFromToken.call(this, token, 'mailto:');\n}\n\n/**\n * @this {CompileContext}\n * @type {Handle}\n */\nfunction literalAutolinkHttp(token) {\n anchorFromToken.call(this, token);\n}\n\n/**\n * @this CompileContext\n * @param {Token} token\n * @param {string | null | undefined} [protocol]\n * @returns {undefined}\n */\nfunction anchorFromToken(token, protocol) {\n const url = this.sliceSerialize(token);\n this.tag('<a href=\"' + sanitizeUri((protocol || '') + url) + '\">');\n this.raw(this.encode(url));\n this.tag('</a>');\n}","/**\n * @import {Event, Exiter, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { blankLine } from 'micromark-core-commonmark';\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nconst indent = {\n tokenize: tokenizeIndent,\n partial: true\n};\n\n// To do: micromark should support a `_hiddenGfmFootnoteSupport`, which only\n// affects label start (image).\n// That will let us drop `tokenizePotentialGfmFootnote*`.\n// It currently has a `_hiddenFootnoteSupport`, which affects that and more.\n// That can be removed when `micromark-extension-footnote` is archived.\n\n/**\n * Create an extension for `micromark` to enable GFM footnote syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to\n * enable GFM footnote syntax.\n */\nexport function gfmFootnote() {\n /** @type {Extension} */\n return {\n document: {\n [91]: {\n name: 'gfmFootnoteDefinition',\n tokenize: tokenizeDefinitionStart,\n continuation: {\n tokenize: tokenizeDefinitionContinuation\n },\n exit: gfmFootnoteDefinitionEnd\n }\n },\n text: {\n [91]: {\n name: 'gfmFootnoteCall',\n tokenize: tokenizeGfmFootnoteCall\n },\n [93]: {\n name: 'gfmPotentialFootnoteCall',\n add: 'after',\n tokenize: tokenizePotentialGfmFootnoteCall,\n resolveTo: resolveToPotentialGfmFootnoteCall\n }\n }\n };\n}\n\n// To do: remove after micromark update.\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePotentialGfmFootnoteCall(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n /** @type {Token} */\n let labelStart;\n\n // Find an opening.\n while (index--) {\n const token = self.events[index][1];\n if (token.type === \"labelImage\") {\n labelStart = token;\n break;\n }\n\n // Exit if we’ve walked far enough.\n if (token.type === 'gfmFootnoteCall' || token.type === \"labelLink\" || token.type === \"label\" || token.type === \"image\" || token.type === \"link\") {\n break;\n }\n }\n return start;\n\n /**\n * @type {State}\n */\n function start(code) {\n if (!labelStart || !labelStart._balanced) {\n return nok(code);\n }\n const id = normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n }));\n if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {\n return nok(code);\n }\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n return ok(code);\n }\n}\n\n// To do: remove after micromark update.\n/** @type {Resolver} */\nfunction resolveToPotentialGfmFootnoteCall(events, context) {\n let index = events.length;\n /** @type {Token | undefined} */\n let labelStart;\n\n // Find an opening.\n while (index--) {\n if (events[index][1].type === \"labelImage\" && events[index][0] === 'enter') {\n labelStart = events[index][1];\n break;\n }\n }\n // Change the `labelImageMarker` to a `data`.\n events[index + 1][1].type = \"data\";\n events[index + 3][1].type = 'gfmFootnoteCallLabelMarker';\n\n // The whole (without `!`):\n /** @type {Token} */\n const call = {\n type: 'gfmFootnoteCall',\n start: Object.assign({}, events[index + 3][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n };\n // The `^` marker\n /** @type {Token} */\n const marker = {\n type: 'gfmFootnoteCallMarker',\n start: Object.assign({}, events[index + 3][1].end),\n end: Object.assign({}, events[index + 3][1].end)\n };\n // Increment the end 1 character.\n marker.end.column++;\n marker.end.offset++;\n marker.end._bufferIndex++;\n /** @type {Token} */\n const string = {\n type: 'gfmFootnoteCallString',\n start: Object.assign({}, marker.end),\n end: Object.assign({}, events[events.length - 1][1].start)\n };\n /** @type {Token} */\n const chunk = {\n type: \"chunkString\",\n contentType: 'string',\n start: Object.assign({}, string.start),\n end: Object.assign({}, string.end)\n };\n\n /** @type {Array<Event>} */\n const replacement = [\n // Take the `labelImageMarker` (now `data`, the `!`)\n events[index + 1], events[index + 2], ['enter', call, context],\n // The `[`\n events[index + 3], events[index + 4],\n // The `^`.\n ['enter', marker, context], ['exit', marker, context],\n // Everything in between.\n ['enter', string, context], ['enter', chunk, context], ['exit', chunk, context], ['exit', string, context],\n // The ending (`]`, properly parsed and labelled).\n events[events.length - 2], events[events.length - 1], ['exit', call, context]];\n events.splice(index, events.length - index + 1, ...replacement);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeGfmFootnoteCall(effects, ok, nok) {\n const self = this;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n let size = 0;\n /** @type {boolean} */\n let data;\n\n // Note: the implementation of `markdown-rs` is different, because it houses\n // core *and* extensions in one project.\n // Therefore, it can include footnote logic inside `label-end`.\n // We can’t do that, but luckily, we can parse footnotes in a simpler way than\n // needed for labels.\n return start;\n\n /**\n * Start of footnote label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteCall');\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n return callStart;\n }\n\n /**\n * After `[`, at `^`.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callStart(code) {\n if (code !== 94) return nok(code);\n effects.enter('gfmFootnoteCallMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallMarker');\n effects.enter('gfmFootnoteCallString');\n effects.enter('chunkString').contentType = 'string';\n return callData;\n }\n\n /**\n * In label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callData(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n code === 93 && !data ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null || code === 91 || markdownLineEndingOrSpace(code)) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit('chunkString');\n const token = effects.exit('gfmFootnoteCallString');\n if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {\n return nok(code);\n }\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n effects.exit('gfmFootnoteCall');\n return ok;\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true;\n }\n size++;\n effects.consume(code);\n return code === 92 ? callEscape : callData;\n }\n\n /**\n * On character after escape.\n *\n * ```markdown\n * > | a [^b\\c] d\n * ^\n * ```\n *\n * @type {State}\n */\n function callEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return callData;\n }\n return callData(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionStart(effects, ok, nok) {\n const self = this;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n /** @type {string} */\n let identifier;\n let size = 0;\n /** @type {boolean | undefined} */\n let data;\n return start;\n\n /**\n * Start of GFM footnote definition.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteDefinition')._container = true;\n effects.enter('gfmFootnoteDefinitionLabel');\n effects.enter('gfmFootnoteDefinitionLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionLabelMarker');\n return labelAtMarker;\n }\n\n /**\n * In label, at caret.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAtMarker(code) {\n if (code === 94) {\n effects.enter('gfmFootnoteDefinitionMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionMarker');\n effects.enter('gfmFootnoteDefinitionLabelString');\n effects.enter('chunkString').contentType = 'string';\n return labelInside;\n }\n return nok(code);\n }\n\n /**\n * In label.\n *\n * > 👉 **Note**: `cmark-gfm` prevents whitespace from occurring in footnote\n * > definition labels.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n code === 93 && !data ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null || code === 91 || markdownLineEndingOrSpace(code)) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit('chunkString');\n const token = effects.exit('gfmFootnoteDefinitionLabelString');\n identifier = normalizeIdentifier(self.sliceSerialize(token));\n effects.enter('gfmFootnoteDefinitionLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionLabelMarker');\n effects.exit('gfmFootnoteDefinitionLabel');\n return labelAfter;\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true;\n }\n size++;\n effects.consume(code);\n return code === 92 ? labelEscape : labelInside;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * > 👉 **Note**: `cmark-gfm` currently does not support escaped brackets:\n * > <https://github.com/github/cmark-gfm/issues/240>\n *\n * ```markdown\n * > | [^a\\*b]: c\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return labelInside;\n }\n return labelInside(code);\n }\n\n /**\n * After definition label.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n if (code === 58) {\n effects.enter('definitionMarker');\n effects.consume(code);\n effects.exit('definitionMarker');\n if (!defined.includes(identifier)) {\n defined.push(identifier);\n }\n\n // Any whitespace after the marker is eaten, forming indented code\n // is not possible.\n // No space is also fine, just like a block quote marker.\n return factorySpace(effects, whitespaceAfter, 'gfmFootnoteDefinitionWhitespace');\n }\n return nok(code);\n }\n\n /**\n * After definition prefix.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function whitespaceAfter(code) {\n // `markdown-rs` has a wrapping token for the prefix that is closed here.\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionContinuation(effects, ok, nok) {\n /// Start of footnote definition continuation.\n ///\n /// ```markdown\n /// | [^a]: b\n /// > | c\n /// ^\n /// ```\n //\n // Either a blank line, which is okay, or an indented thing.\n return effects.check(blankLine, ok, effects.attempt(indent, ok, nok));\n}\n\n/** @type {Exiter} */\nfunction gfmFootnoteDefinitionEnd(effects) {\n effects.exit('gfmFootnoteDefinition');\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this;\n return factorySpace(effects, afterPrefix, 'gfmFootnoteDefinitionIndent', 4 + 1);\n\n /**\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === 'gfmFootnoteDefinitionIndent' && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code) : nok(code);\n }\n}","/**\n * @import {HtmlOptions as Options} from 'micromark-extension-gfm-footnote'\n * @import {HtmlExtension} from 'micromark-util-types'\n */\n\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { sanitizeUri } from 'micromark-util-sanitize-uri';\nconst own = {}.hasOwnProperty;\n\n/** @type {Options} */\nconst emptyOptions = {};\n\n/**\n * Generate the default label that GitHub uses on backreferences.\n *\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {string}\n * Default label.\n */\nexport function defaultBackLabel(referenceIndex, rereferenceIndex) {\n return 'Back to reference ' + (referenceIndex + 1) + (rereferenceIndex > 1 ? '-' + rereferenceIndex : '');\n}\n\n/**\n * Create an extension for `micromark` to support GFM footnotes when\n * serializing to HTML.\n *\n * @param {Options | null | undefined} [options={}]\n * Configuration (optional).\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM footnotes when serializing to HTML.\n */\nexport function gfmFootnoteHtml(options) {\n const config = options || emptyOptions;\n const label = config.label || 'Footnotes';\n const labelTagName = config.labelTagName || 'h2';\n const labelAttributes = config.labelAttributes === null || config.labelAttributes === undefined ? 'class=\"sr-only\"' : config.labelAttributes;\n const backLabel = config.backLabel || defaultBackLabel;\n const clobberPrefix = config.clobberPrefix === null || config.clobberPrefix === undefined ? 'user-content-' : config.clobberPrefix;\n return {\n enter: {\n gfmFootnoteDefinition() {\n const stack = this.getData('tightStack');\n stack.push(false);\n },\n gfmFootnoteDefinitionLabelString() {\n this.buffer();\n },\n gfmFootnoteCallString() {\n this.buffer();\n }\n },\n exit: {\n gfmFootnoteDefinition() {\n let definitions = this.getData('gfmFootnoteDefinitions');\n const footnoteStack = this.getData('gfmFootnoteDefinitionStack');\n const tightStack = this.getData('tightStack');\n const current = footnoteStack.pop();\n const value = this.resume();\n if (!definitions) {\n this.setData('gfmFootnoteDefinitions', definitions = {});\n }\n if (!own.call(definitions, current)) definitions[current] = value;\n tightStack.pop();\n this.setData('slurpOneLineEnding', true);\n // “Hack” to prevent a line ending from showing up if we’re in a definition in\n // an empty list item.\n this.setData('lastWasTag');\n },\n gfmFootnoteDefinitionLabelString(token) {\n let footnoteStack = this.getData('gfmFootnoteDefinitionStack');\n if (!footnoteStack) {\n this.setData('gfmFootnoteDefinitionStack', footnoteStack = []);\n }\n footnoteStack.push(normalizeIdentifier(this.sliceSerialize(token)));\n this.resume(); // Drop the label.\n this.buffer(); // Get ready for a value.\n },\n gfmFootnoteCallString(token) {\n let calls = this.getData('gfmFootnoteCallOrder');\n let counts = this.getData('gfmFootnoteCallCounts');\n const id = normalizeIdentifier(this.sliceSerialize(token));\n /** @type {number} */\n let counter;\n this.resume();\n if (!calls) this.setData('gfmFootnoteCallOrder', calls = []);\n if (!counts) this.setData('gfmFootnoteCallCounts', counts = {});\n const index = calls.indexOf(id);\n const safeId = sanitizeUri(id.toLowerCase());\n if (index === -1) {\n calls.push(id);\n counts[id] = 1;\n counter = calls.length;\n } else {\n counts[id]++;\n counter = index + 1;\n }\n const reuseCounter = counts[id];\n this.tag('<sup><a href=\"#' + clobberPrefix + 'fn-' + safeId + '\" id=\"' + clobberPrefix + 'fnref-' + safeId + (reuseCounter > 1 ? '-' + reuseCounter : '') + '\" data-footnote-ref=\"\" aria-describedby=\"footnote-label\">' + String(counter) + '</a></sup>');\n },\n null() {\n const calls = this.getData('gfmFootnoteCallOrder') || [];\n const counts = this.getData('gfmFootnoteCallCounts') || {};\n const definitions = this.getData('gfmFootnoteDefinitions') || {};\n let index = -1;\n if (calls.length > 0) {\n this.lineEndingIfNeeded();\n this.tag('<section data-footnotes=\"\" class=\"footnotes\"><' + labelTagName + ' id=\"footnote-label\"' + (labelAttributes ? ' ' + labelAttributes : '') + '>');\n this.raw(this.encode(label));\n this.tag('</' + labelTagName + '>');\n this.lineEndingIfNeeded();\n this.tag('<ol>');\n }\n while (++index < calls.length) {\n // Called definitions are always defined.\n const id = calls[index];\n const safeId = sanitizeUri(id.toLowerCase());\n let referenceIndex = 0;\n /** @type {Array<string>} */\n const references = [];\n while (++referenceIndex <= counts[id]) {\n references.push('<a href=\"#' + clobberPrefix + 'fnref-' + safeId + (referenceIndex > 1 ? '-' + referenceIndex : '') + '\" data-footnote-backref=\"\" aria-label=\"' + this.encode(typeof backLabel === 'string' ? backLabel : backLabel(index, referenceIndex)) + '\" class=\"data-footnote-backref\">↩' + (referenceIndex > 1 ? '<sup>' + referenceIndex + '</sup>' : '') + '</a>');\n }\n const reference = references.join(' ');\n let injected = false;\n this.lineEndingIfNeeded();\n this.tag('<li id=\"' + clobberPrefix + 'fn-' + safeId + '\">');\n this.lineEndingIfNeeded();\n this.tag(definitions[id].replace(/<\\/p>(?:\\r?\\n|\\r)?$/, function ($0) {\n injected = true;\n return ' ' + reference + $0;\n }));\n if (!injected) {\n this.lineEndingIfNeeded();\n this.tag(reference);\n }\n this.lineEndingIfNeeded();\n this.tag('</li>');\n }\n if (calls.length > 0) {\n this.lineEndingIfNeeded();\n this.tag('</ol>');\n this.lineEndingIfNeeded();\n this.tag('</section>');\n }\n }\n }\n };\n}","/**\n * @import {HtmlExtension} from 'micromark-util-types'\n */\n\n/**\n * Create an HTML extension for `micromark` to support GFM strikethrough when\n * serializing to HTML.\n *\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions`, to\n * support GFM strikethrough when serializing to HTML.\n */\nexport function gfmStrikethroughHtml() {\n return {\n enter: {\n strikethrough() {\n this.tag('<del>');\n }\n },\n exit: {\n strikethrough() {\n this.tag('</del>');\n }\n }\n };\n}","/**\n * @import {Options} from 'micromark-extension-gfm-strikethrough'\n * @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { splice } from 'micromark-util-chunked';\nimport { classifyCharacter } from 'micromark-util-classify-character';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/**\n * Create an extension for `micromark` to enable GFM strikethrough syntax.\n *\n * @param {Options | null | undefined} [options={}]\n * Configuration.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable GFM strikethrough syntax.\n */\nexport function gfmStrikethrough(options) {\n const options_ = options || {};\n let single = options_.singleTilde;\n const tokenizer = {\n name: 'strikethrough',\n tokenize: tokenizeStrikethrough,\n resolveAll: resolveAllStrikethrough\n };\n if (single === null || single === undefined) {\n single = true;\n }\n return {\n text: {\n [126]: tokenizer\n },\n insideSpan: {\n null: [tokenizer]\n },\n attentionMarkers: {\n null: [126]\n }\n };\n\n /**\n * Take events and resolve strikethrough.\n *\n * @type {Resolver}\n */\n function resolveAllStrikethrough(events, context) {\n let index = -1;\n\n // Walk through all events.\n while (++index < events.length) {\n // Find a token that can close.\n if (events[index][0] === 'enter' && events[index][1].type === 'strikethroughSequenceTemporary' && events[index][1]._close) {\n let open = index;\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (events[open][0] === 'exit' && events[open][1].type === 'strikethroughSequenceTemporary' && events[open][1]._open &&\n // If the sizes are the same:\n events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {\n events[index][1].type = 'strikethroughSequence';\n events[open][1].type = 'strikethroughSequence';\n\n /** @type {Token} */\n const strikethrough = {\n type: 'strikethrough',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[index][1].end)\n };\n\n /** @type {Token} */\n const text = {\n type: 'strikethroughText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n };\n\n // Opening.\n /** @type {Array<Event>} */\n const nextEvents = [['enter', strikethrough, context], ['enter', events[open][1], context], ['exit', events[open][1], context], ['enter', text, context]];\n const insideSpan = context.parser.constructs.insideSpan.null;\n if (insideSpan) {\n // Between.\n splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));\n }\n\n // Closing.\n splice(nextEvents, nextEvents.length, 0, [['exit', text, context], ['enter', events[index][1], context], ['exit', events[index][1], context], ['exit', strikethrough, context]]);\n splice(events, open - 1, index - open + 3, nextEvents);\n index = open + nextEvents.length - 2;\n break;\n }\n }\n }\n }\n index = -1;\n while (++index < events.length) {\n if (events[index][1].type === 'strikethroughSequenceTemporary') {\n events[index][1].type = \"data\";\n }\n }\n return events;\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeStrikethrough(effects, ok, nok) {\n const previous = this.previous;\n const events = this.events;\n let size = 0;\n return start;\n\n /** @type {State} */\n function start(code) {\n if (previous === 126 && events[events.length - 1][1].type !== \"characterEscape\") {\n return nok(code);\n }\n effects.enter('strikethroughSequenceTemporary');\n return more(code);\n }\n\n /** @type {State} */\n function more(code) {\n const before = classifyCharacter(previous);\n if (code === 126) {\n // If this is the third marker, exit.\n if (size > 1) return nok(code);\n effects.consume(code);\n size++;\n return more;\n }\n if (size < 2 && !single) return nok(code);\n const token = effects.exit('strikethroughSequenceTemporary');\n const after = classifyCharacter(code);\n token._open = !after || after === 2 && Boolean(before);\n token._close = !before || before === 2 && Boolean(after);\n return ok(code);\n }\n }\n}","/**\n * @import {HtmlExtension} from 'micromark-util-types'\n */\n\nconst alignment = {\n none: '',\n left: ' align=\"left\"',\n right: ' align=\"right\"',\n center: ' align=\"center\"'\n};\n\n// To do: micromark@5: use `infer` here, when all events are exposed.\n\n/**\n * Create an HTML extension for `micromark` to support GitHub tables when\n * serializing to HTML.\n *\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GitHub tables when serializing to HTML.\n */\nexport function gfmTableHtml() {\n return {\n enter: {\n table(token) {\n const tableAlign = token._align;\n this.lineEndingIfNeeded();\n this.tag('<table>');\n this.setData('tableAlign', tableAlign);\n },\n tableBody() {\n this.tag('<tbody>');\n },\n tableData() {\n const tableAlign = this.getData('tableAlign');\n const tableColumn = this.getData('tableColumn');\n const align = alignment[tableAlign[tableColumn]];\n if (align === undefined) {\n // Capture results to ignore them.\n this.buffer();\n } else {\n this.lineEndingIfNeeded();\n this.tag('<td' + align + '>');\n }\n },\n tableHead() {\n this.lineEndingIfNeeded();\n this.tag('<thead>');\n },\n tableHeader() {\n const tableAlign = this.getData('tableAlign');\n const tableColumn = this.getData('tableColumn');\n const align = alignment[tableAlign[tableColumn]];\n this.lineEndingIfNeeded();\n this.tag('<th' + align + '>');\n },\n tableRow() {\n this.setData('tableColumn', 0);\n this.lineEndingIfNeeded();\n this.tag('<tr>');\n }\n },\n exit: {\n // Overwrite the default code text data handler to unescape escaped pipes when\n // they are in tables.\n codeTextData(token) {\n let value = this.sliceSerialize(token);\n if (this.getData('tableAlign')) {\n value = value.replace(/\\\\([\\\\|])/g, replace);\n }\n this.raw(this.encode(value));\n },\n table() {\n this.setData('tableAlign');\n // Note: we don’t set `slurpAllLineEndings` anymore, in delimiter rows,\n // but we do need to reset it to match a funky newline GH generates for\n // list items combined with tables.\n this.setData('slurpAllLineEndings');\n this.lineEndingIfNeeded();\n this.tag('</table>');\n },\n tableBody() {\n this.lineEndingIfNeeded();\n this.tag('</tbody>');\n },\n tableData() {\n const tableAlign = this.getData('tableAlign');\n const tableColumn = this.getData('tableColumn');\n if (tableColumn in tableAlign) {\n this.tag('</td>');\n this.setData('tableColumn', tableColumn + 1);\n } else {\n // Stop capturing.\n this.resume();\n }\n },\n tableHead() {\n this.lineEndingIfNeeded();\n this.tag('</thead>');\n },\n tableHeader() {\n const tableColumn = this.getData('tableColumn');\n this.tag('</th>');\n this.setData('tableColumn', tableColumn + 1);\n },\n tableRow() {\n const tableAlign = this.getData('tableAlign');\n let tableColumn = this.getData('tableColumn');\n while (tableColumn < tableAlign.length) {\n this.lineEndingIfNeeded();\n this.tag('<td' + alignment[tableAlign[tableColumn]] + '></td>');\n tableColumn++;\n }\n this.setData('tableColumn', tableColumn);\n this.lineEndingIfNeeded();\n this.tag('</tr>');\n }\n }\n };\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0;\n}","/**\n * @import {Event} from 'micromark-util-types'\n */\n\n// Port of `edit_map.rs` from `markdown-rs`.\n// This should move to `markdown-js` later.\n\n// Deal with several changes in events, batching them together.\n//\n// Preferably, changes should be kept to a minimum.\n// Sometimes, it’s needed to change the list of events, because parsing can be\n// messy, and it helps to expose a cleaner interface of events to the compiler\n// and other users.\n// It can also help to merge many adjacent similar events.\n// And, in other cases, it’s needed to parse subcontent: pass some events\n// through another tokenizer and inject the result.\n\n/**\n * @typedef {[number, number, Array<Event>]} Change\n * @typedef {[number, number, number]} Jump\n */\n\n/**\n * Tracks a bunch of edits.\n */\nexport class EditMap {\n /**\n * Create a new edit map.\n */\n constructor() {\n /**\n * Record of changes.\n *\n * @type {Array<Change>}\n */\n this.map = [];\n }\n\n /**\n * Create an edit: a remove and/or add at a certain place.\n *\n * @param {number} index\n * @param {number} remove\n * @param {Array<Event>} add\n * @returns {undefined}\n */\n add(index, remove, add) {\n addImplementation(this, index, remove, add);\n }\n\n // To do: add this when moving to `micromark`.\n // /**\n // * Create an edit: but insert `add` before existing additions.\n // *\n // * @param {number} index\n // * @param {number} remove\n // * @param {Array<Event>} add\n // * @returns {undefined}\n // */\n // addBefore(index, remove, add) {\n // addImplementation(this, index, remove, add, true)\n // }\n\n /**\n * Done, change the events.\n *\n * @param {Array<Event>} events\n * @returns {undefined}\n */\n consume(events) {\n this.map.sort(function (a, b) {\n return a[0] - b[0];\n });\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (this.map.length === 0) {\n return;\n }\n\n // To do: if links are added in events, like they are in `markdown-rs`,\n // this is needed.\n // // Calculate jumps: where items in the current list move to.\n // /** @type {Array<Jump>} */\n // const jumps = []\n // let index = 0\n // let addAcc = 0\n // let removeAcc = 0\n // while (index < this.map.length) {\n // const [at, remove, add] = this.map[index]\n // removeAcc += remove\n // addAcc += add.length\n // jumps.push([at, removeAcc, addAcc])\n // index += 1\n // }\n //\n // . shiftLinks(events, jumps)\n\n let index = this.map.length;\n /** @type {Array<Array<Event>>} */\n const vecs = [];\n while (index > 0) {\n index -= 1;\n vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]);\n\n // Truncate rest.\n events.length = this.map[index][0];\n }\n vecs.push(events.slice());\n events.length = 0;\n let slice = vecs.pop();\n while (slice) {\n for (const element of slice) {\n events.push(element);\n }\n slice = vecs.pop();\n }\n\n // Truncate everything.\n this.map.length = 0;\n }\n}\n\n/**\n * Create an edit.\n *\n * @param {EditMap} editMap\n * @param {number} at\n * @param {number} remove\n * @param {Array<Event>} add\n * @returns {undefined}\n */\nfunction addImplementation(editMap, at, remove, add) {\n let index = 0;\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (remove === 0 && add.length === 0) {\n return;\n }\n while (index < editMap.map.length) {\n if (editMap.map[index][0] === at) {\n editMap.map[index][1] += remove;\n\n // To do: before not used by tables, use when moving to micromark.\n // if (before) {\n // add.push(...editMap.map[index][2])\n // editMap.map[index][2] = add\n // } else {\n editMap.map[index][2].push(...add);\n // }\n\n return;\n }\n index += 1;\n }\n editMap.map.push([at, remove, add]);\n}\n\n// /**\n// * Shift `previous` and `next` links according to `jumps`.\n// *\n// * This fixes links in case there are events removed or added between them.\n// *\n// * @param {Array<Event>} events\n// * @param {Array<Jump>} jumps\n// */\n// function shiftLinks(events, jumps) {\n// let jumpIndex = 0\n// let index = 0\n// let add = 0\n// let rm = 0\n\n// while (index < events.length) {\n// const rmCurr = rm\n\n// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {\n// add = jumps[jumpIndex][2]\n// rm = jumps[jumpIndex][1]\n// jumpIndex += 1\n// }\n\n// // Ignore items that will be removed.\n// if (rm > rmCurr) {\n// index += rm - rmCurr\n// } else {\n// // ?\n// // if let Some(link) = &events[index].link {\n// // if let Some(next) = link.next {\n// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);\n// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {\n// // add = jumps[jumpIndex].2;\n// // rm = jumps[jumpIndex].1;\n// // jumpIndex += 1;\n// // }\n// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);\n// // index = next;\n// // continue;\n// // }\n// // }\n// index += 1\n// }\n// }\n// }","/**\n * @import {Event} from 'micromark-util-types'\n */\n\n/**\n * @typedef {'center' | 'left' | 'none' | 'right'} Align\n */\n\n/**\n * Figure out the alignment of a GFM table.\n *\n * @param {Readonly<Array<Event>>} events\n * List of events.\n * @param {number} index\n * Table enter event.\n * @returns {Array<Align>}\n * List of aligns.\n */\nexport function gfmTableAlign(events, index) {\n let inDelimiterRow = false;\n /** @type {Array<Align>} */\n const align = [];\n while (index < events.length) {\n const event = events[index];\n if (inDelimiterRow) {\n if (event[0] === 'enter') {\n // Start of alignment value: set a new column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n if (event[1].type === 'tableContent') {\n align.push(events[index + 1][1].type === 'tableDelimiterMarker' ? 'left' : 'none');\n }\n }\n // Exits:\n // End of alignment value: change the column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n else if (event[1].type === 'tableContent') {\n if (events[index - 1][1].type === 'tableDelimiterMarker') {\n const alignIndex = align.length - 1;\n align[alignIndex] = align[alignIndex] === 'left' ? 'center' : 'right';\n }\n }\n // Done!\n else if (event[1].type === 'tableDelimiterRow') {\n break;\n }\n } else if (event[0] === 'enter' && event[1].type === 'tableDelimiterRow') {\n inDelimiterRow = true;\n }\n index += 1;\n }\n return align;\n}","/**\n * @import {Event, Extension, Point, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\n/**\n * @typedef {[number, number, number, number]} Range\n * Cell info.\n *\n * @typedef {0 | 1 | 2 | 3} RowKind\n * Where we are: `1` for head row, `2` for delimiter row, `3` for body row.\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';\nimport { EditMap } from './edit-map.js';\nimport { gfmTableAlign } from './infer.js';\n\n/**\n * Create an HTML extension for `micromark` to support GitHub tables syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * table syntax.\n */\nexport function gfmTable() {\n return {\n flow: {\n null: {\n name: 'table',\n tokenize: tokenizeTable,\n resolveAll: resolveTable\n }\n }\n };\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTable(effects, ok, nok) {\n const self = this;\n let size = 0;\n let sizeB = 0;\n /** @type {boolean | undefined} */\n let seen;\n return start;\n\n /**\n * Start of a GFM table.\n *\n * If there is a valid table row or table head before, then we try to parse\n * another row.\n * Otherwise, we try to parse a head.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * > | | b |\n * ^\n * ```\n * @type {State}\n */\n function start(code) {\n let index = self.events.length - 1;\n while (index > -1) {\n const type = self.events[index][1].type;\n if (type === \"lineEnding\" ||\n // Note: markdown-rs uses `whitespace` instead of `linePrefix`\n type === \"linePrefix\") index--;else break;\n }\n const tail = index > -1 ? self.events[index][1].type : null;\n const next = tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore;\n\n // Don’t allow lazy body rows.\n if (next === bodyRowStart && self.parser.lazy[self.now().line]) {\n return nok(code);\n }\n return next(code);\n }\n\n /**\n * Before table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBefore(code) {\n effects.enter('tableHead');\n effects.enter('tableRow');\n return headRowStart(code);\n }\n\n /**\n * Before table head row, after whitespace.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowStart(code) {\n if (code === 124) {\n return headRowBreak(code);\n }\n\n // To do: micromark-js should let us parse our own whitespace in extensions,\n // like `markdown-rs`:\n //\n // ```js\n // // 4+ spaces.\n // if (markdownSpace(code)) {\n // return nok(code)\n // }\n // ```\n\n seen = true;\n // Count the first character, that isn’t a pipe, double.\n sizeB += 1;\n return headRowBreak(code);\n }\n\n /**\n * At break in table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * ^\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBreak(code) {\n if (code === null) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n // If anything other than one pipe (ignoring whitespace) was used, it’s fine.\n if (sizeB > 1) {\n sizeB = 0;\n // To do: check if this works.\n // Feel free to interrupt:\n self.interrupt = true;\n effects.exit('tableRow');\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return headDelimiterStart;\n }\n\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code);\n }\n if (markdownSpace(code)) {\n // To do: check if this is fine.\n // effects.attempt(State::Next(StateName::GfmTableHeadRowBreak), State::Nok)\n // State::Retry(space_or_tab(tokenizer))\n return factorySpace(effects, headRowBreak, \"whitespace\")(code);\n }\n sizeB += 1;\n if (seen) {\n seen = false;\n // Header cell count.\n size += 1;\n }\n if (code === 124) {\n effects.enter('tableCellDivider');\n effects.consume(code);\n effects.exit('tableCellDivider');\n // Whether a delimiter was seen.\n seen = true;\n return headRowBreak;\n }\n\n // Anything else is cell data.\n effects.enter(\"data\");\n return headRowData(code);\n }\n\n /**\n * In table head row data.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit(\"data\");\n return headRowBreak(code);\n }\n effects.consume(code);\n return code === 92 ? headRowEscape : headRowData;\n }\n\n /**\n * In table head row escape.\n *\n * ```markdown\n * > | | a\\-b |\n * ^\n * | | ---- |\n * | | c |\n * ```\n *\n * @type {State}\n */\n function headRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code);\n return headRowData;\n }\n return headRowData(code);\n }\n\n /**\n * Before delimiter row.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterStart(code) {\n // Reset `interrupt`.\n self.interrupt = false;\n\n // Note: in `markdown-rs`, we need to handle piercing here too.\n if (self.parser.lazy[self.now().line]) {\n return nok(code);\n }\n effects.enter('tableDelimiterRow');\n // Track if we’ve seen a `:` or `|`.\n seen = false;\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterBefore, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);\n }\n return headDelimiterBefore(code);\n }\n\n /**\n * Before delimiter row, after optional whitespace.\n *\n * Reused when a `|` is found later, to parse another cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterBefore(code) {\n if (code === 45 || code === 58) {\n return headDelimiterValueBefore(code);\n }\n if (code === 124) {\n seen = true;\n // If we start with a pipe, we open a cell marker.\n effects.enter('tableCellDivider');\n effects.consume(code);\n effects.exit('tableCellDivider');\n return headDelimiterCellBefore;\n }\n\n // More whitespace / empty row not allowed at start.\n return headDelimiterNok(code);\n }\n\n /**\n * After `|`, before delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellBefore(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterValueBefore, \"whitespace\")(code);\n }\n return headDelimiterValueBefore(code);\n }\n\n /**\n * Before delimiter cell value.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterValueBefore(code) {\n // Align: left.\n if (code === 58) {\n sizeB += 1;\n seen = true;\n effects.enter('tableDelimiterMarker');\n effects.consume(code);\n effects.exit('tableDelimiterMarker');\n return headDelimiterLeftAlignmentAfter;\n }\n\n // Align: none.\n if (code === 45) {\n sizeB += 1;\n // To do: seems weird that this *isn’t* left aligned, but that state is used?\n return headDelimiterLeftAlignmentAfter(code);\n }\n if (code === null || markdownLineEnding(code)) {\n return headDelimiterCellAfter(code);\n }\n return headDelimiterNok(code);\n }\n\n /**\n * After delimiter cell left alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | :- |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterLeftAlignmentAfter(code) {\n if (code === 45) {\n effects.enter('tableDelimiterFiller');\n return headDelimiterFiller(code);\n }\n\n // Anything else is not ok after the left-align colon.\n return headDelimiterNok(code);\n }\n\n /**\n * In delimiter cell filler.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterFiller(code) {\n if (code === 45) {\n effects.consume(code);\n return headDelimiterFiller;\n }\n\n // Align is `center` if it was `left`, `right` otherwise.\n if (code === 58) {\n seen = true;\n effects.exit('tableDelimiterFiller');\n effects.enter('tableDelimiterMarker');\n effects.consume(code);\n effects.exit('tableDelimiterMarker');\n return headDelimiterRightAlignmentAfter;\n }\n effects.exit('tableDelimiterFiller');\n return headDelimiterRightAlignmentAfter(code);\n }\n\n /**\n * After delimiter cell right alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterRightAlignmentAfter(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterCellAfter, \"whitespace\")(code);\n }\n return headDelimiterCellAfter(code);\n }\n\n /**\n * After delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellAfter(code) {\n if (code === 124) {\n return headDelimiterBefore(code);\n }\n if (code === null || markdownLineEnding(code)) {\n // Exit when:\n // * there was no `:` or `|` at all (it’s a thematic break or setext\n // underline instead)\n // * the header cell count is not the delimiter cell count\n if (!seen || size !== sizeB) {\n return headDelimiterNok(code);\n }\n\n // Note: in markdown-rs`, a reset is needed here.\n effects.exit('tableDelimiterRow');\n effects.exit('tableHead');\n // To do: in `markdown-rs`, resolvers need to be registered manually.\n // effects.register_resolver(ResolveName::GfmTable)\n return ok(code);\n }\n return headDelimiterNok(code);\n }\n\n /**\n * In delimiter row, at a disallowed byte.\n *\n * ```markdown\n * | | a |\n * > | | x |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterNok(code) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code);\n }\n\n /**\n * Before table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowStart(code) {\n // Note: in `markdown-rs` we need to manually take care of a prefix,\n // but in `micromark-js` that is done for us, so if we’re here, we’re\n // never at whitespace.\n effects.enter('tableRow');\n return bodyRowBreak(code);\n }\n\n /**\n * At break in table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ^\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowBreak(code) {\n if (code === 124) {\n effects.enter('tableCellDivider');\n effects.consume(code);\n effects.exit('tableCellDivider');\n return bodyRowBreak;\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('tableRow');\n return ok(code);\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, bodyRowBreak, \"whitespace\")(code);\n }\n\n // Anything else is cell content.\n effects.enter(\"data\");\n return bodyRowData(code);\n }\n\n /**\n * In table body row data.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit(\"data\");\n return bodyRowBreak(code);\n }\n effects.consume(code);\n return code === 92 ? bodyRowEscape : bodyRowData;\n }\n\n /**\n * In table body row escape.\n *\n * ```markdown\n * | | a |\n * | | ---- |\n * > | | b\\-c |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code);\n return bodyRowData;\n }\n return bodyRowData(code);\n }\n}\n\n/** @type {Resolver} */\n\nfunction resolveTable(events, context) {\n let index = -1;\n let inFirstCellAwaitingPipe = true;\n /** @type {RowKind} */\n let rowKind = 0;\n /** @type {Range} */\n let lastCell = [0, 0, 0, 0];\n /** @type {Range} */\n let cell = [0, 0, 0, 0];\n let afterHeadAwaitingFirstBodyRow = false;\n let lastTableEnd = 0;\n /** @type {Token | undefined} */\n let currentTable;\n /** @type {Token | undefined} */\n let currentBody;\n /** @type {Token | undefined} */\n let currentCell;\n const map = new EditMap();\n while (++index < events.length) {\n const event = events[index];\n const token = event[1];\n if (event[0] === 'enter') {\n // Start of head.\n if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = false;\n\n // Inject previous (body end and) table end.\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);\n currentBody = undefined;\n lastTableEnd = 0;\n }\n\n // Inject table start.\n currentTable = {\n type: 'table',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n };\n map.add(index, 0, [['enter', currentTable, context]]);\n } else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') {\n inFirstCellAwaitingPipe = true;\n currentCell = undefined;\n lastCell = [0, 0, 0, 0];\n cell = [0, index + 1, 0, 0];\n\n // Inject table body start.\n if (afterHeadAwaitingFirstBodyRow) {\n afterHeadAwaitingFirstBodyRow = false;\n currentBody = {\n type: 'tableBody',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n };\n map.add(index, 0, [['enter', currentBody, context]]);\n }\n rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1;\n }\n // Cell data.\n else if (rowKind && (token.type === \"data\" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) {\n inFirstCellAwaitingPipe = false;\n\n // First value in cell.\n if (cell[2] === 0) {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1];\n currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell);\n lastCell = [0, 0, 0, 0];\n }\n cell[2] = index;\n }\n } else if (token.type === 'tableCellDivider') {\n if (inFirstCellAwaitingPipe) {\n inFirstCellAwaitingPipe = false;\n } else {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1];\n currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell);\n }\n lastCell = cell;\n cell = [lastCell[1], index, 0, 0];\n }\n }\n }\n // Exit events.\n else if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = true;\n lastTableEnd = index;\n } else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') {\n lastTableEnd = index;\n if (lastCell[1] !== 0) {\n cell[0] = cell[1];\n currentCell = flushCell(map, context, lastCell, rowKind, index, currentCell);\n } else if (cell[1] !== 0) {\n currentCell = flushCell(map, context, cell, rowKind, index, currentCell);\n }\n rowKind = 0;\n } else if (rowKind && (token.type === \"data\" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) {\n cell[3] = index;\n }\n }\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);\n }\n map.consume(context.events);\n\n // To do: move this into `html`, when events are exposed there.\n // That’s what `markdown-rs` does.\n // That needs updates to `mdast-util-gfm-table`.\n index = -1;\n while (++index < context.events.length) {\n const event = context.events[index];\n if (event[0] === 'enter' && event[1].type === 'table') {\n event[1]._align = gfmTableAlign(context.events, index);\n }\n }\n return events;\n}\n\n/**\n * Generate a cell.\n *\n * @param {EditMap} map\n * @param {Readonly<TokenizeContext>} context\n * @param {Readonly<Range>} range\n * @param {RowKind} rowKind\n * @param {number | undefined} rowEnd\n * @param {Token | undefined} previousCell\n * @returns {Token | undefined}\n */\n// eslint-disable-next-line max-params\nfunction flushCell(map, context, range, rowKind, rowEnd, previousCell) {\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCell' : 'tableCell'\n const groupName = rowKind === 1 ? 'tableHeader' : rowKind === 2 ? 'tableDelimiter' : 'tableData';\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText'\n const valueName = 'tableContent';\n\n // Insert an exit for the previous cell, if there is one.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[0] !== 0) {\n previousCell.end = Object.assign({}, getPoint(context.events, range[0]));\n map.add(range[0], 0, [['exit', previousCell, context]]);\n }\n\n // Insert enter of this cell.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^^^^-- this cell\n // ```\n const now = getPoint(context.events, range[1]);\n previousCell = {\n type: groupName,\n start: Object.assign({}, now),\n // Note: correct end is set later.\n end: Object.assign({}, now)\n };\n map.add(range[1], 0, [['enter', previousCell, context]]);\n\n // Insert text start at first data start and end at last data end, and\n // remove events between.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[2] !== 0) {\n const relatedStart = getPoint(context.events, range[2]);\n const relatedEnd = getPoint(context.events, range[3]);\n /** @type {Token} */\n const valueToken = {\n type: valueName,\n start: Object.assign({}, relatedStart),\n end: Object.assign({}, relatedEnd)\n };\n map.add(range[2], 0, [['enter', valueToken, context]]);\n if (rowKind !== 2) {\n // Fix positional info on remaining events\n const start = context.events[range[2]];\n const end = context.events[range[3]];\n start[1].end = Object.assign({}, end[1].end);\n start[1].type = \"chunkText\";\n start[1].contentType = \"text\";\n\n // Remove if needed.\n if (range[3] > range[2] + 1) {\n const a = range[2] + 1;\n const b = range[3] - range[2] - 1;\n map.add(a, b, []);\n }\n }\n map.add(range[3] + 1, 0, [['exit', valueToken, context]]);\n }\n\n // Insert an exit for the last cell, if at the row end.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^^^-- this cell (the last one contains two “between” parts)\n // ```\n if (rowEnd !== undefined) {\n previousCell.end = Object.assign({}, getPoint(context.events, rowEnd));\n map.add(rowEnd, 0, [['exit', previousCell, context]]);\n previousCell = undefined;\n }\n return previousCell;\n}\n\n/**\n * Generate table end (and table body end).\n *\n * @param {Readonly<EditMap>} map\n * @param {Readonly<TokenizeContext>} context\n * @param {number} index\n * @param {Token} table\n * @param {Token | undefined} tableBody\n */\n// eslint-disable-next-line max-params\nfunction flushTableEnd(map, context, index, table, tableBody) {\n /** @type {Array<Event>} */\n const exits = [];\n const related = getPoint(context.events, index);\n if (tableBody) {\n tableBody.end = Object.assign({}, related);\n exits.push(['exit', tableBody, context]);\n }\n table.end = Object.assign({}, related);\n exits.push(['exit', table, context]);\n map.add(index + 1, 0, exits);\n}\n\n/**\n * @param {Readonly<Array<Event>>} events\n * @param {number} index\n * @returns {Readonly<Point>}\n */\nfunction getPoint(events, index) {\n const event = events[index];\n const side = event[0] === 'enter' ? 'start' : 'end';\n return event[1][side];\n}","/**\n * @typedef {import('micromark-util-types').CompileContext} CompileContext\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n * @typedef {import('micromark-util-types').Token} Token\n */\n\n// An opening or closing tag start, followed by a case-insensitive specific tag name,\n// followed by HTML whitespace, a greater than, or a slash.\nconst reFlow =\n /<(\\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\\t\\n\\f\\r />])/gi\n\n// As HTML (text) parses tags separately (and very strictly), we don’t need to be\n// global.\nconst reText = new RegExp('^' + reFlow.source, 'i')\n\n/**\n * Create an HTML extension for `micromark` to support GitHubs weird and\n * useless tagfilter when serializing to HTML.\n *\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to support\n * GitHubs weird and useless tagfilter when serializing to HTML.\n */\nexport function gfmTagfilterHtml() {\n return {\n exit: {\n htmlFlowData(token) {\n exitHtmlData.call(this, token, reFlow)\n },\n htmlTextData(token) {\n exitHtmlData.call(this, token, reText)\n }\n }\n }\n}\n\n/**\n * @this {CompileContext}\n * @param {Token} token\n * @param {RegExp} filter\n * @returns {undefined}\n */\nfunction exitHtmlData(token, filter) {\n let value = this.sliceSerialize(token)\n\n if (this.options.allowDangerousHtml) {\n value = value.replace(filter, '<$1$2')\n }\n\n this.raw(this.encode(value))\n}\n","/**\n * @import {HtmlExtension} from 'micromark-util-types'\n */\n\n/**\n * Create an HTML extension for `micromark` to support GFM task list items when\n * serializing to HTML.\n *\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM task list items when serializing to HTML.\n */\nexport function gfmTaskListItemHtml() {\n return {\n enter: {\n taskListCheck() {\n this.tag('<input type=\"checkbox\" disabled=\"\" ');\n }\n },\n exit: {\n taskListCheck() {\n this.tag('/>');\n },\n taskListCheckValueChecked() {\n this.tag('checked=\"\" ');\n }\n }\n };\n}","/**\n * @import {Extension, State, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';\nconst tasklistCheck = {\n name: 'tasklistCheck',\n tokenize: tokenizeTasklistCheck\n};\n\n/**\n * Create an HTML extension for `micromark` to support GFM task list items\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM task list items when serializing to HTML.\n */\nexport function gfmTaskListItem() {\n return {\n text: {\n [91]: tasklistCheck\n }\n };\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTasklistCheck(effects, ok, nok) {\n const self = this;\n return open;\n\n /**\n * At start of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (\n // Exit if there’s stuff before.\n self.previous !== null ||\n // Exit if not in the first content that is the first child of a list\n // item.\n !self._gfmTasklistFirstContentOfListItem) {\n return nok(code);\n }\n effects.enter('taskListCheck');\n effects.enter('taskListCheckMarker');\n effects.consume(code);\n effects.exit('taskListCheckMarker');\n return inside;\n }\n\n /**\n * In task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // Currently we match how GH works in files.\n // To match how GH works in comments, use `markdownSpace` (`[\\t ]`) instead\n // of `markdownLineEndingOrSpace` (`[\\t\\n\\r ]`).\n if (markdownLineEndingOrSpace(code)) {\n effects.enter('taskListCheckValueUnchecked');\n effects.consume(code);\n effects.exit('taskListCheckValueUnchecked');\n return close;\n }\n if (code === 88 || code === 120) {\n effects.enter('taskListCheckValueChecked');\n effects.consume(code);\n effects.exit('taskListCheckValueChecked');\n return close;\n }\n return nok(code);\n }\n\n /**\n * At close of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function close(code) {\n if (code === 93) {\n effects.enter('taskListCheckMarker');\n effects.consume(code);\n effects.exit('taskListCheckMarker');\n effects.exit('taskListCheck');\n return after;\n }\n return nok(code);\n }\n\n /**\n * @type {State}\n */\n function after(code) {\n // EOL in paragraph means there must be something else after it.\n if (markdownLineEnding(code)) {\n return ok(code);\n }\n\n // Space or tab?\n // Check what comes after.\n if (markdownSpace(code)) {\n return effects.check({\n tokenize: spaceThenNonSpace\n }, ok, nok)(code);\n }\n\n // EOF, or non-whitespace, both wrong.\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction spaceThenNonSpace(effects, ok, nok) {\n return factorySpace(effects, after, \"whitespace\");\n\n /**\n * After whitespace, after task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // EOF means there was nothing, so bad.\n // EOL means there’s content after it, so good.\n // Impossible to have more spaces.\n // Anything else is good.\n return code === null ? nok(code) : ok(code);\n }\n}","/**\n * @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions\n * @typedef {import('micromark-extension-gfm-strikethrough').Options} Options\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n */\n\nimport {\n combineExtensions,\n combineHtmlExtensions\n} from 'micromark-util-combine-extensions'\nimport {\n gfmAutolinkLiteral,\n gfmAutolinkLiteralHtml\n} from 'micromark-extension-gfm-autolink-literal'\nimport {gfmFootnote, gfmFootnoteHtml} from 'micromark-extension-gfm-footnote'\nimport {\n gfmStrikethrough,\n gfmStrikethroughHtml\n} from 'micromark-extension-gfm-strikethrough'\nimport {gfmTable, gfmTableHtml} from 'micromark-extension-gfm-table'\nimport {gfmTagfilterHtml} from 'micromark-extension-gfm-tagfilter'\nimport {\n gfmTaskListItem,\n gfmTaskListItemHtml\n} from 'micromark-extension-gfm-task-list-item'\n\n/**\n * Create an extension for `micromark` to enable GFM syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-strikethrough`.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * syntax.\n */\nexport function gfm(options) {\n return combineExtensions([\n gfmAutolinkLiteral(),\n gfmFootnote(),\n gfmStrikethrough(options),\n gfmTable(),\n gfmTaskListItem()\n ])\n}\n\n/**\n * Create an extension for `micromark` to support GFM when serializing to HTML.\n *\n * @param {HtmlOptions | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-footnote`.\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM when serializing to HTML.\n */\nexport function gfmHtml(options) {\n return combineHtmlExtensions([\n gfmAutolinkLiteralHtml(),\n gfmFootnoteHtml(options),\n gfmStrikethroughHtml(),\n gfmTableHtml(),\n gfmTagfilterHtml(),\n gfmTaskListItemHtml()\n ])\n}\n","/**\n * @import {Root} from 'mdast'\n * @import {Options} from 'remark-gfm'\n * @import {} from 'remark-parse'\n * @import {} from 'remark-stringify'\n * @import {Processor} from 'unified'\n */\n\nimport {gfmFromMarkdown, gfmToMarkdown} from 'mdast-util-gfm'\nimport {gfm} from 'micromark-extension-gfm'\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Add support GFM (autolink literals, footnotes, strikethrough, tables,\n * tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkGfm(options) {\n // @ts-expect-error: TS is wrong about `this`.\n // eslint-disable-next-line unicorn/no-this-assignment\n const self = /** @type {Processor<Root>} */ (this)\n const settings = options || emptyOptions\n const data = self.data()\n\n const micromarkExtensions =\n data.micromarkExtensions || (data.micromarkExtensions = [])\n const fromMarkdownExtensions =\n data.fromMarkdownExtensions || (data.fromMarkdownExtensions = [])\n const toMarkdownExtensions =\n data.toMarkdownExtensions || (data.toMarkdownExtensions = [])\n\n micromarkExtensions.push(gfm(settings))\n fromMarkdownExtensions.push(gfmFromMarkdown())\n toMarkdownExtensions.push(gfmToMarkdown(settings))\n}\n","// @ts-expect-error\nimport formatter from 'format'\n\nexport const fault = Object.assign(create(Error), {\n eval: create(EvalError),\n range: create(RangeError),\n reference: create(ReferenceError),\n syntax: create(SyntaxError),\n type: create(TypeError),\n uri: create(URIError)\n})\n\n/**\n * Create a new `EConstructor`, with the formatted `format` as a first argument.\n *\n * @template {Error} Fault\n * @template {new (reason: string) => Fault} Class\n * @param {Class} Constructor\n */\nexport function create(Constructor) {\n /** @type {string} */\n // @ts-expect-error\n FormattedError.displayName = Constructor.displayName || Constructor.name\n\n return FormattedError\n\n /**\n * Create an error with a printf-like formatted message.\n *\n * @param {string|null} [format]\n * Template string.\n * @param {...unknown} values\n * Values to render in `format`.\n * @returns {Fault}\n */\n function FormattedError(format, ...values) {\n /** @type {string} */\n const reason = format ? formatter(format, ...values) : format\n return new Constructor(reason)\n }\n}\n","/**\n * @typedef {'toml' | 'yaml'} Preset\n * Known name of a frontmatter style.\n *\n * @typedef Info\n * Sequence.\n *\n * Depending on how this structure is used, it reflects a marker or a fence.\n * @property {string} close\n * Closing.\n * @property {string} open\n * Opening.\n *\n * @typedef MatterProps\n * Fields describing a kind of matter.\n * @property {string} type\n * Node type to tokenize as.\n * @property {boolean | null | undefined} [anywhere=false]\n * Whether matter can be found anywhere in the document, normally, only matter\n * at the start of the document is recognized.\n *\n * > 👉 **Note**: using this is a terrible idea.\n * > It’s called frontmatter, not matter-in-the-middle or so.\n * > This makes your markdown less portable.\n *\n * @typedef MarkerProps\n * Marker configuration.\n * @property {Info | string} marker\n * Character repeated 3 times, used as complete fences.\n *\n * For example the character `'-'` will result in `'---'` being used as the\n * fence\n * Pass `open` and `close` to specify different characters for opening and\n * closing fences.\n * @property {never} [fence]\n * If `marker` is set, `fence` must not be set.\n *\n * @typedef FenceProps\n * Fence configuration.\n * @property {Info | string} fence\n * Complete fences.\n *\n * This can be used when fences contain different characters or lengths\n * other than 3.\n * Pass `open` and `close` to interface to specify different characters for opening and\n * closing fences.\n * @property {never} [marker]\n * If `fence` is set, `marker` must not be set.\n *\n * @typedef {(MatterProps & FenceProps) | (MatterProps & MarkerProps)} Matter\n * Fields describing a kind of matter.\n *\n * > 👉 **Note**: using `anywhere` is a terrible idea.\n * > It’s called frontmatter, not matter-in-the-middle or so.\n * > This makes your markdown less portable.\n *\n * > 👉 **Note**: `marker` and `fence` are mutually exclusive.\n * > If `marker` is set, `fence` must not be set, and vice versa.\n *\n * @typedef {Matter | Preset | Array<Matter | Preset>} Options\n * Configuration.\n */\n\nimport {fault} from 'fault'\nconst own = {}.hasOwnProperty\nconst markers = {\n yaml: '-',\n toml: '+'\n}\n\n/**\n * Simplify options by normalizing them to an array of matters.\n *\n * @param {Options | null | undefined} [options='yaml']\n * Configuration (default: `'yaml'`).\n * @returns {Array<Matter>}\n * List of matters.\n */\nexport function toMatters(options) {\n /** @type {Array<Matter>} */\n const result = []\n let index = -1\n\n /** @type {Array<Matter | Preset>} */\n const presetsOrMatters = Array.isArray(options)\n ? options\n : options\n ? [options]\n : ['yaml']\n while (++index < presetsOrMatters.length) {\n result[index] = matter(presetsOrMatters[index])\n }\n return result\n}\n\n/**\n * Simplify an option.\n *\n * @param {Matter | Preset} option\n * Configuration.\n * @returns {Matter}\n * Matter.\n */\nfunction matter(option) {\n let result = option\n if (typeof result === 'string') {\n if (!own.call(markers, result)) {\n throw fault('Missing matter definition for `%s`', result)\n }\n result = {\n type: result,\n marker: markers[result]\n }\n } else if (typeof result !== 'object') {\n throw fault('Expected matter to be an object, not `%j`', result)\n }\n if (!own.call(result, 'type')) {\n throw fault('Missing `type` in matter `%j`', result)\n }\n if (!own.call(result, 'fence') && !own.call(result, 'marker')) {\n throw fault('Missing `marker` or `fence` in matter `%j`', result)\n }\n return result\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenType} TokenType\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n *\n * @typedef {import('./to-matters.js').Info} Info\n * @typedef {import('./to-matters.js').Matter} Matter\n * @typedef {import('./to-matters.js').Options} Options\n */\n\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\nimport {toMatters} from './to-matters.js'\n\n/**\n * Create an extension for `micromark` to enable frontmatter syntax.\n *\n * @param {Options | null | undefined} [options='yaml']\n * Configuration (default: `'yaml'`).\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable frontmatter syntax.\n */\nexport function frontmatter(options) {\n const matters = toMatters(options)\n /** @type {ConstructRecord} */\n const flow = {}\n let index = -1\n while (++index < matters.length) {\n const matter = matters[index]\n const code = fence(matter, 'open').charCodeAt(0)\n const construct = createConstruct(matter)\n const existing = flow[code]\n if (Array.isArray(existing)) {\n existing.push(construct)\n } else {\n // Never a single object, always an array.\n flow[code] = [construct]\n }\n }\n return {\n flow\n }\n}\n\n/**\n * @param {Matter} matter\n * @returns {Construct}\n */\nfunction createConstruct(matter) {\n const anywhere = matter.anywhere\n const frontmatterType = /** @type {TokenType} */ matter.type\n const fenceType = /** @type {TokenType} */ frontmatterType + 'Fence'\n const sequenceType = /** @type {TokenType} */ fenceType + 'Sequence'\n const valueType = /** @type {TokenType} */ frontmatterType + 'Value'\n const closingFenceConstruct = {\n tokenize: tokenizeClosingFence,\n partial: true\n }\n\n /**\n * Fence to look for.\n *\n * @type {string}\n */\n let buffer\n let bufferIndex = 0\n return {\n tokenize: tokenizeFrontmatter,\n concrete: true\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeFrontmatter(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of frontmatter.\n *\n * ```markdown\n * > | ---\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function start(code) {\n const position = self.now()\n if (\n // Indent not allowed.\n position.column === 1 &&\n // Normally, only allowed in first line.\n (position.line === 1 || anywhere)\n ) {\n buffer = fence(matter, 'open')\n bufferIndex = 0\n if (code === buffer.charCodeAt(bufferIndex)) {\n effects.enter(frontmatterType)\n effects.enter(fenceType)\n effects.enter(sequenceType)\n return openSequence(code)\n }\n }\n return nok(code)\n }\n\n /**\n * In open sequence.\n *\n * ```markdown\n * > | ---\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function openSequence(code) {\n if (bufferIndex === buffer.length) {\n effects.exit(sequenceType)\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n return openSequenceWhitespace(code)\n }\n return openAfter(code)\n }\n if (code === buffer.charCodeAt(bufferIndex++)) {\n effects.consume(code)\n return openSequence\n }\n return nok(code)\n }\n\n /**\n * In whitespace after open sequence.\n *\n * ```markdown\n * > | ---␠\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function openSequenceWhitespace(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return openSequenceWhitespace\n }\n effects.exit('whitespace')\n return openAfter(code)\n }\n\n /**\n * After open sequence.\n *\n * ```markdown\n * > | ---\n * ^\n * | title: \"Venus\"\n * | ---\n * ```\n *\n * @type {State}\n */\n function openAfter(code) {\n if (markdownLineEnding(code)) {\n effects.exit(fenceType)\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n // Get ready for closing fence.\n buffer = fence(matter, 'close')\n bufferIndex = 0\n return effects.attempt(closingFenceConstruct, after, contentStart)\n }\n\n // EOF is not okay.\n return nok(code)\n }\n\n /**\n * Start of content chunk.\n *\n * ```markdown\n * | ---\n * > | title: \"Venus\"\n * ^\n * | ---\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n if (code === null || markdownLineEnding(code)) {\n return contentEnd(code)\n }\n effects.enter(valueType)\n return contentInside(code)\n }\n\n /**\n * In content chunk.\n *\n * ```markdown\n * | ---\n * > | title: \"Venus\"\n * ^\n * | ---\n * ```\n *\n * @type {State}\n */\n function contentInside(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(valueType)\n return contentEnd(code)\n }\n effects.consume(code)\n return contentInside\n }\n\n /**\n * End of content chunk.\n *\n * ```markdown\n * | ---\n * > | title: \"Venus\"\n * ^\n * | ---\n * ```\n *\n * @type {State}\n */\n function contentEnd(code) {\n // Require a closing fence.\n if (code === null) {\n return nok(code)\n }\n\n // Can only be an eol.\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(closingFenceConstruct, after, contentStart)\n }\n\n /**\n * After frontmatter.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // `code` must be eol/eof.\n effects.exit(frontmatterType)\n return ok(code)\n }\n }\n\n /** @type {Tokenizer} */\n function tokenizeClosingFence(effects, ok, nok) {\n let bufferIndex = 0\n return closeStart\n\n /**\n * Start of close sequence.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function closeStart(code) {\n if (code === buffer.charCodeAt(bufferIndex)) {\n effects.enter(fenceType)\n effects.enter(sequenceType)\n return closeSequence(code)\n }\n return nok(code)\n }\n\n /**\n * In close sequence.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function closeSequence(code) {\n if (bufferIndex === buffer.length) {\n effects.exit(sequenceType)\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n return closeSequenceWhitespace(code)\n }\n return closeAfter(code)\n }\n if (code === buffer.charCodeAt(bufferIndex++)) {\n effects.consume(code)\n return closeSequence\n }\n return nok(code)\n }\n\n /**\n * In whitespace after close sequence.\n *\n * ```markdown\n * > | ---\n * | title: \"Venus\"\n * | ---␠\n * ^\n * ```\n *\n * @type {State}\n */\n function closeSequenceWhitespace(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return closeSequenceWhitespace\n }\n effects.exit('whitespace')\n return closeAfter(code)\n }\n\n /**\n * After close sequence.\n *\n * ```markdown\n * | ---\n * | title: \"Venus\"\n * > | ---\n * ^\n * ```\n *\n * @type {State}\n */\n function closeAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(fenceType)\n return ok(code)\n }\n return nok(code)\n }\n }\n}\n\n/**\n * @param {Matter} matter\n * @param {'close' | 'open'} prop\n * @returns {string}\n */\nfunction fence(matter, prop) {\n return matter.marker\n ? pick(matter.marker, prop).repeat(3)\n : // @ts-expect-error: They’re mutually exclusive.\n pick(matter.fence, prop)\n}\n\n/**\n * @param {Info | string} schema\n * @param {'close' | 'open'} prop\n * @returns {string}\n */\nfunction pick(schema, prop) {\n return typeof schema === 'string' ? schema : schema[prop]\n}\n","/**\n * @typedef {import('mdast').Literal} Literal\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n *\n * @typedef {import('micromark-extension-frontmatter').Info} Info\n * @typedef {import('micromark-extension-frontmatter').Matter} Matter\n * @typedef {import('micromark-extension-frontmatter').Options} Options\n */\n\nimport {ok as assert} from 'devlop'\nimport {toMatters} from 'micromark-extension-frontmatter'\nimport escapeStringRegexp from 'escape-string-regexp'\n\n/**\n * Create an extension for `mdast-util-from-markdown`.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown`.\n */\nexport function frontmatterFromMarkdown(options) {\n const matters = toMatters(options)\n /** @type {FromMarkdownExtension['enter']} */\n const enter = {}\n /** @type {FromMarkdownExtension['exit']} */\n const exit = {}\n let index = -1\n\n while (++index < matters.length) {\n const matter = matters[index]\n enter[matter.type] = opener(matter)\n exit[matter.type] = close\n exit[matter.type + 'Value'] = value\n }\n\n return {enter, exit}\n}\n\n/**\n * @param {Matter} matter\n * @returns {FromMarkdownHandle} enter\n */\nfunction opener(matter) {\n return open\n\n /**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\n function open(token) {\n // @ts-expect-error: custom.\n this.enter({type: matter.type, value: ''}, token)\n this.buffer()\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction close(token) {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert('value' in node)\n this.exit(token)\n // Remove the initial and final eol.\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '')\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction value(token) {\n this.config.enter.data.call(this, token)\n this.config.exit.data.call(this, token)\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown`.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function frontmatterToMarkdown(options) {\n /** @type {ToMarkdownExtension['unsafe']} */\n const unsafe = []\n /** @type {ToMarkdownExtension['handlers']} */\n const handlers = {}\n const matters = toMatters(options)\n let index = -1\n\n while (++index < matters.length) {\n const matter = matters[index]\n\n // @ts-expect-error: this can add custom frontmatter nodes.\n // Typing those is the responsibility of the end user.\n handlers[matter.type] = handler(matter)\n\n const open = fence(matter, 'open')\n\n unsafe.push({\n atBreak: true,\n character: open.charAt(0),\n after: escapeStringRegexp(open.charAt(1))\n })\n }\n\n return {unsafe, handlers}\n}\n\n/**\n * Create a handle that can serialize a frontmatter node as markdown.\n *\n * @param {Matter} matter\n * Structure.\n * @returns {(node: Literal) => string} enter\n * Handler.\n */\nfunction handler(matter) {\n const open = fence(matter, 'open')\n const close = fence(matter, 'close')\n\n return handle\n\n /**\n * Serialize a frontmatter node as markdown.\n *\n * @param {Literal} node\n * Node to serialize.\n * @returns {string}\n * Serialized node.\n */\n function handle(node) {\n return open + (node.value ? '\\n' + node.value : '') + '\\n' + close\n }\n}\n\n/**\n * Get an `open` or `close` fence.\n *\n * @param {Matter} matter\n * Structure.\n * @param {'close' | 'open'} prop\n * Field to get.\n * @returns {string}\n * Fence.\n */\nfunction fence(matter, prop) {\n return matter.marker\n ? pick(matter.marker, prop).repeat(3)\n : // @ts-expect-error: They’re mutually exclusive.\n pick(matter.fence, prop)\n}\n\n/**\n * Take `open` or `close` fields when schema is an info object, or use the\n * given value when it is a string.\n *\n * @param {Info | string} schema\n * Info object or value.\n * @param {'close' | 'open'} prop\n * Field to get.\n * @returns {string}\n * Thing to use for the opening or closing.\n */\nfunction pick(schema, prop) {\n return typeof schema === 'string' ? schema : schema[prop]\n}\n","/// <reference types=\"remark-parse\" />\n/// <reference types=\"remark-stringify\" />\n\n/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('micromark-extension-frontmatter').Options} Options\n * @typedef {import('unified').Processor<Root>} Processor\n */\n\nimport {\n frontmatterFromMarkdown,\n frontmatterToMarkdown\n} from 'mdast-util-frontmatter'\nimport {frontmatter} from 'micromark-extension-frontmatter'\n\n/** @type {Options} */\nconst emptyOptions = 'yaml'\n\n/**\n * Add support for frontmatter.\n *\n * ###### Notes\n *\n * Doesn’t parse the data inside them: create your own plugin to do that.\n *\n * @param {Options | null | undefined} [options='yaml']\n * Configuration (default: `'yaml'`).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkFrontmatter(options) {\n // @ts-expect-error: TS is wrong about `this`.\n // eslint-disable-next-line unicorn/no-this-assignment\n const self = /** @type {Processor} */ (this)\n const settings = options || emptyOptions\n const data = self.data()\n\n const micromarkExtensions =\n data.micromarkExtensions || (data.micromarkExtensions = [])\n const fromMarkdownExtensions =\n data.fromMarkdownExtensions || (data.fromMarkdownExtensions = [])\n const toMarkdownExtensions =\n data.toMarkdownExtensions || (data.toMarkdownExtensions = [])\n\n micromarkExtensions.push(frontmatter(settings))\n fromMarkdownExtensions.push(frontmatterFromMarkdown(settings))\n toMarkdownExtensions.push(frontmatterToMarkdown(settings))\n}\n","import * as plugins from './plugins.js';\nimport type {} from './interfaces.js';\n\nexport type TFrontmatterSyntax = 'yaml' | 'toml';\n\n/** The shared syntax configuration for parsing and HTML conversion. */\nexport const createMarkdownProcessor = (frontmatterSyntaxArg: TFrontmatterSyntax[] = ['yaml', 'toml']) =>\n plugins.unified()\n .use(plugins.remarkParse)\n .use(plugins.remarkGfm)\n .use(plugins.remarkFrontmatter, frontmatterSyntaxArg);\n\nexport type TMarkdownRoot = plugins.Root;\nexport type TMarkdownNode = plugins.Nodes;\nexport type TMarkdownRootContent = plugins.RootContent;\nexport type TMarkdownPhrasingContent = plugins.PhrasingContent;\n\n/** How Markdown is parsed (`parseMarkdown`). */\nexport interface IMarkdownParseOptions {\n /**\n * Whether a leading `---` (YAML) or `+++` (TOML) block is frontmatter: a `yaml` or `toml` node of the tree (`true`,\n * the default). `false`: the text has no frontmatter, and its first lines parse as Markdown like the rest: a leading\n * `---` is a thematic break, a leading `+++` is text, and the lists and block quotes after them are lists and block\n * quotes. Text a person writes (an editor's value) has no frontmatter: parse it with `false`, because with the\n * default a leading `---` or `+++` that no closing fence follows leaves every list and block quote after it as\n * paragraph text (`micromark-extension-frontmatter` 2.0.0).\n */\n frontmatter?: boolean;\n}\n\n/** Parse CommonMark, GFM and frontmatter without rendering HTML or performing I/O. */\nexport const parseMarkdown = (sourceArg: string, optionsArg: IMarkdownParseOptions = {}): TMarkdownRoot => {\n if (typeof sourceArg !== 'string') {\n throw new TypeError('Markdown source must be a string.');\n }\n return createMarkdownProcessor(optionsArg.frontmatter === false ? [] : undefined).parse(sourceArg);\n};\n","import * as plugins from './plugins.js';\nimport type { IFrontmatterDocument, TFrontmatterData } from './interfaces.js';\n\n/** Maps a source line to its frontmatter text, or `null` when the line cannot belong to a frontmatter block. */\ntype TLineReader = (lineArg: string) => string | null;\n\nconst delimiterRegex = /^---[ \\t]*$/;\n\nconst byteOrderMark = '\\uFEFF';\n\nconst readLineAsIs: TLineReader = (lineArg) => lineArg;\n\nconst withoutCarriageReturn = (lineArg: string): string => {\n return lineArg.endsWith('\\r') ? lineArg.slice(0, -1) : lineArg;\n};\n\n/**\n * Parses the YAML of a frontmatter block: an empty or comment-only block yields `{}`, YAML that is not\n * a mapping yields `null` (the block is not frontmatter). Invalid YAML throws.\n */\nconst parseFrontmatterYaml = async (yamlArg: string): Promise<TFrontmatterData | null> => {\n const parsed: unknown = await plugins.smartyaml.yamlStringToObject(yamlArg);\n if (parsed === null || parsed === undefined) {\n return {};\n }\n if (typeof parsed !== 'object' || Array.isArray(parsed)) {\n return null;\n }\n return parsed as TFrontmatterData;\n};\n\nconst readBlock = async (\n sourceArg: string,\n readLineArg: TLineReader\n): Promise<IFrontmatterDocument | null> => {\n if (typeof sourceArg !== 'string') {\n throw new TypeError('Frontmatter source must be a string.');\n }\n // A leading byte order mark is not part of the text; it neither hides nor survives a frontmatter block.\n const text = sourceArg.startsWith(byteOrderMark) ? sourceArg.slice(byteOrderMark.length) : sourceArg;\n const lines = text.split('\\n');\n const openingLine = readLineArg(withoutCarriageReturn(lines[0]));\n if (openingLine === null || !delimiterRegex.test(openingLine)) {\n return null;\n }\n const yamlLines: string[] = [];\n for (let lineIndex = 1; lineIndex < lines.length; lineIndex++) {\n const line = readLineArg(withoutCarriageReturn(lines[lineIndex]));\n if (line === null) {\n return null;\n }\n if (delimiterRegex.test(line)) {\n const data = await parseFrontmatterYaml(yamlLines.join('\\n'));\n return data === null ? null : { data, content: lines.slice(lineIndex + 1).join('\\n') };\n }\n yamlLines.push(line);\n }\n return null;\n};\n\n/**\n * Reads a leading YAML frontmatter block. Returns `null` unless the source starts with a complete\n * `---` … `---` block whose YAML is a mapping (or empty). A leading byte order mark is skipped.\n */\nexport const readFrontmatterBlock = async (sourceArg: string): Promise<IFrontmatterDocument | null> => {\n return readBlock(sourceArg, readLineAsIs);\n};\n\nconst orWholeSource = (blockArg: IFrontmatterDocument | null, sourceArg: string): IFrontmatterDocument => {\n return blockArg ?? { data: {}, content: sourceArg };\n};\n\n/**\n * Splits a leading YAML frontmatter block (`---` … `---`) from any text, Markdown or not.\n * A block counts only when it is complete and its YAML is a mapping (or empty); otherwise the whole\n * source is returned as `content` with empty `data`. Invalid YAML inside a complete block throws.\n * A leading byte order mark (U+FEFF) is skipped before the block; it is not part of the returned `content`.\n */\nexport const parseFrontmatter = async (sourceArg: string): Promise<IFrontmatterDocument> => {\n return orWholeSource(await readFrontmatterBlock(sourceArg), sourceArg);\n};\n\n/**\n * Parses YAML frontmatter that is written as a leading block of line comments, for files\n * whose syntax has no frontmatter of its own (systemd units, shell scripts, ...):\n *\n * ```\n * # ---\n * # name: my-service\n * # ---\n * ```\n *\n * Every block line must start with `commentPrefixArg` (a line equal to the trimmed prefix counts as empty).\n * `content` is the source after the block, unchanged. The block rules of `parseFrontmatter` apply.\n */\nexport const parseCommentFrontmatter = async (\n sourceArg: string,\n commentPrefixArg: string\n): Promise<IFrontmatterDocument> => {\n if (typeof commentPrefixArg !== 'string' || commentPrefixArg.trim() === '') {\n throw new TypeError('Comment prefix must be a non-blank string.');\n }\n const emptyCommentLine = commentPrefixArg.trimEnd();\n const block = await readBlock(sourceArg, (lineArg) => {\n if (lineArg.startsWith(commentPrefixArg)) {\n return lineArg.slice(commentPrefixArg.length);\n }\n return lineArg === emptyCommentLine ? '' : null;\n });\n return orWholeSource(block, sourceArg);\n};\n\n/**\n * Prepends `dataArg` as a YAML frontmatter block to `contentArg`.\n * `parseFrontmatter(await stringifyFrontmatter(content, data))` returns `{ data, content }`.\n */\nexport const stringifyFrontmatter = async (\n contentArg: string,\n dataArg: TFrontmatterData\n): Promise<string> => {\n const yaml = Object.keys(dataArg).length === 0 ? '' : await plugins.smartyaml.objectToYamlString(dataArg);\n return `---\\n${yaml}---\\n${contentArg}`;\n};\n","import { defer } from './smartpromise.classes.deferred.js';\nimport { Timeout } from './smartpromise.classes.timeout.js';\n\nexport * from './smartpromise.classes.cumulativedeferred.js';\nexport * from './smartpromise.classes.deferred.js';\nexport * from './smartpromise.classes.timeout.js';\n\nexport function resolvedPromise(): Promise<void>;\nexport function resolvedPromise<T>(value: T): Promise<T>;\n/**\n * Creates a new resolved promise for the provided value.\n */\nexport function resolvedPromise<T>(value?: T): Promise<T | void> {\n return Promise.resolve(value);\n}\n\n/**\n * Creates a new rejected promise for the provided reason.\n */\nexport const rejectedPromise = (err: unknown): Promise<never> => {\n return Promise.reject(err);\n};\n\ninterface IAsyncFunction<TInput, TOutput> {\n (someArg: TInput): Promise<TOutput>;\n}\n\n/**\n * accepts an array of inputs and a function that accepts the input.\n * runs all items with the function and returns the result array when all items have run\n * @param inputArg\n * @param functionArg\n */\nexport const map = async <TInput, TOutput = TInput>(\n inputArg: TInput[],\n functionArg: IAsyncFunction<TInput, TOutput>\n): Promise<TOutput[]> => {\n return Promise.all(inputArg.map(functionArg));\n};\n\nexport const timeoutWrap = async <T = unknown>(\n promiseArg: Promise<T>,\n timeoutInMsArg: number,\n rejectArg = true\n): Promise<T | null> => {\n return new Promise<T | null>((resolve, reject) => {\n let timeout: ReturnType<typeof setTimeout> | undefined;\n const releaseTimeout = () => {\n if (timeout === undefined) {\n return;\n }\n clearTimeout(timeout);\n timeout = undefined;\n };\n\n timeout = setTimeout(() => {\n timeout = undefined;\n if (rejectArg) {\n reject(new Error('timeout'));\n } else {\n resolve(null);\n }\n }, timeoutInMsArg);\n promiseArg.then(\n (valueArg) => {\n releaseTimeout();\n resolve(valueArg);\n },\n (errorArg) => {\n releaseTimeout();\n reject(errorArg);\n },\n );\n });\n};\n\nexport const timeoutAndContinue = async <T = unknown>(\n promiseArg: Promise<T>,\n timeoutInMsArg = 60000\n): Promise<T | null> => {\n return timeoutWrap(promiseArg, timeoutInMsArg, false);\n};\n\n/**\n * Waits for the given milliseconds like setTimeout and resolves with the pass-on value.\n * An unrefed delay does not keep a Node.js process alive.\n */\nexport const delayFor = async <T>(\n timeInMillisecondArg: number,\n passOnArg?: T,\n unrefedArg = false\n): Promise<T | undefined> => {\n await new Timeout<void>(timeInMillisecondArg, undefined, unrefedArg).promise;\n return passOnArg;\n};\n\n/**\n * Waits for a random duration between the given minimum and maximum milliseconds\n * and resolves with the pass-on value.\n */\nexport const delayForRandom = async <T>(\n timeMinInMillisecondArg: number,\n timeMaxInMillisecondArg: number,\n passOnArg?: T,\n unrefedArg = false\n): Promise<T | undefined> => {\n await delayFor(\n Math.random() * (timeMaxInMillisecondArg - timeMinInMillisecondArg) + timeMinInMillisecondArg,\n undefined,\n unrefedArg\n );\n return passOnArg;\n};\n\nexport const getFirstTrueOrFalse = async (promisesArg: Promise<boolean>[]): Promise<boolean> => {\n const done = defer<boolean>();\n for (const promiseArg of promisesArg) {\n promiseArg.then((resultArg) => {\n if (resultArg === true) {\n done.resolve(true);\n }\n });\n }\n Promise.all(promisesArg).then(() => {\n done.resolve(false);\n });\n return done.promise;\n};\n\n/**\n * Converts a Node.js-style callback-based function into a Promise.\n * @param fn The function that expects a callback.\n * @returns A Promise that resolves with the result of the function or rejects with an error.\n */\nexport const fromCallback = <T>(\n fn: (callback: (err: NodeJS.ErrnoException | null, result?: T) => void) => void\n): Promise<T> => {\n return new Promise((resolve, reject) => {\n fn((err, result) => {\n if (err) {\n reject(err); // Reject the promise with the error\n } else {\n resolve(result as T); // Resolve the promise with the result\n }\n });\n });\n};\n","export interface IResolve<T> {\n (value?: T | PromiseLike<T>): void;\n}\n\nexport interface IReject {\n (reason?: unknown): void;\n}\n\nexport type TDeferredStatus = 'pending' | 'fulfilled' | 'rejected';\n\nexport class Deferred<T> {\n public promise: Promise<T>;\n public resolve!: IResolve<T>;\n public reject!: IReject;\n public status!: TDeferredStatus;\n public claimed = false;\n public claim() {\n if (this.claimed) {\n throw new Error('Deferred already claimed');\n }\n this.claimed = true;\n }\n\n public startedAt!: number;\n public stoppedAt!: number;\n public get duration(): number {\n if (this.stoppedAt) {\n return this.stoppedAt - this.startedAt;\n } else {\n return Date.now() - this.startedAt;\n }\n }\n\n constructor() {\n this.promise = new Promise<T>((resolve, reject) => {\n this.resolve = (valueArg?: T | PromiseLike<T>) => {\n this.status = 'fulfilled';\n this.stoppedAt = Date.now();\n resolve(valueArg as T | PromiseLike<T>);\n };\n this.reject = (reason?: unknown) => {\n this.status = 'rejected';\n this.stoppedAt = Date.now();\n reject(reason);\n };\n this.startedAt = Date.now();\n this.status = 'pending';\n });\n }\n}\n\nexport const defer = <T = void>() => {\n return new Deferred<T>();\n};\n","import { defer, type Deferred } from './smartpromise.classes.deferred.js';\n\n/**\n * The largest delay setTimeout accepts. Longer delays fire after 1 ms in Node.js and\n * browsers, so Timeout waits for them in chunks of at most this size.\n */\nconst maxTimerDelayMs = 2_147_483_647;\n\ntype TTimer = ReturnType<typeof setTimeout>;\n\n/**\n * Node.js timers can be unrefed; browser and Deno timer handles are plain numbers without unref.\n */\nconst unrefTimer = (timerArg: TTimer) => {\n (timerArg as TTimer & { unref?: () => void }).unref?.();\n};\n\n/**\n * A promise-backed timer that can be cancelled and unrefed.\n * `promise` resolves with the pass-on value once the delay has elapsed;\n * a cancelled Timeout never settles its promise.\n */\nexport class Timeout<T> {\n public promise: Promise<T>;\n\n private deferred: Deferred<T>;\n private passOn: T | undefined;\n private timer: TTimer;\n private unrefed = false;\n private state: 'running' | 'completed' | 'cancelled' = 'running';\n /**\n * monotonic deadline, so wall-clock adjustments do not skew getTimeLeft()\n */\n private deadline: number;\n private timeLeftAtCancel = 0;\n\n constructor(timeInMillisecondArg: number, passOn?: T, unrefedArg = false) {\n this.passOn = passOn;\n this.deferred = defer<T>();\n this.promise = this.deferred.promise;\n this.deadline = performance.now() + timeInMillisecondArg;\n this.timer = this.startChunk(timeInMillisecondArg);\n if (unrefedArg) {\n this.makeUnrefed();\n }\n }\n\n /**\n * starts the one live timer for the next chunk of the remaining delay\n */\n private startChunk(remainingMillisArg: number): TTimer {\n const chunkMillis = Math.min(remainingMillisArg, maxTimerDelayMs);\n const chunkTimer = setTimeout(() => {\n if (this.state !== 'running') {\n return;\n }\n const remainingMillis = remainingMillisArg - chunkMillis;\n if (remainingMillis > 0) {\n this.timer = this.startChunk(remainingMillis);\n } else {\n this.state = 'completed';\n this.deferred.resolve(this.passOn);\n }\n }, chunkMillis);\n if (this.unrefed) {\n unrefTimer(chunkTimer);\n }\n return chunkTimer;\n }\n\n /**\n * unreffing a timeout causes the node process to not wait for completion before exit;\n * it applies to every remaining chunk of a long delay\n */\n public makeUnrefed() {\n this.unrefed = true;\n unrefTimer(this.timer);\n }\n\n /**\n * cancels the timer; the promise stays pending and getTimeLeft() keeps the time\n * that was left at cancellation. Cancelling a completed or cancelled Timeout does nothing.\n */\n public cancel() {\n if (this.state !== 'running') {\n return;\n }\n this.timeLeftAtCancel = this.getTimeLeft();\n this.state = 'cancelled';\n clearTimeout(this.timer);\n }\n\n /**\n * the whole milliseconds left until the promise resolves; 0 once it has resolved\n */\n public getTimeLeft(): number {\n if (this.state === 'completed') {\n return 0;\n }\n if (this.state === 'cancelled') {\n return this.timeLeftAtCancel;\n }\n const timeLeft = Math.ceil(this.deadline - performance.now());\n return timeLeft > 0 ? timeLeft : 0;\n }\n}\n","import { defer } from './smartpromise.classes.deferred.js';\n\nexport class CumulativeDeferred {\n private accumulatedPromises: Promise<unknown>[] = [];\n private deferred = defer<void>();\n public promise = this.deferred.promise;\n\n constructor() {\n setTimeout(async () => {\n while (this.accumulatedPromises.length > 0) {\n const poppedPromise = this.accumulatedPromises.shift();\n await poppedPromise;\n }\n this.deferred.resolve();\n }, 0);\n }\n\n public subDefer() {\n const done = defer<void>();\n this.addPromise(done.promise);\n return done;\n }\n\n public addPromise(promiseArg: Promise<unknown>): void {\n this.accumulatedPromises.push(promiseArg);\n }\n}\n\nexport const cumulativeDefer = () => {\n return new CumulativeDeferred();\n};\n","// Authentication\nimport * as authentication from './authentication/index.js';\n\n// Business\nimport * as business from './business/index.js';\n\n// Code\nimport * as code from './code/index.js';\n\n// Container\nimport * as container from './container/index.js';\n\n// Database\nimport * as database from './database/index.js';\n\n// Descriptors \nimport * as descriptors from './descriptors/index.js';\n\n// Events\nimport * as events from './events/index.js';\n\n// Finance\nimport * as finance from './finance/index.js';\n\n// Content\nimport * as content from './content/index.js';\n\n// General\nimport * as general from './general/index.js';\n\n// Network\nimport * as network from './network/index.js';\n\n// SaaS\nimport * as saas from './saas/index.js';\n\n// Storage\nimport * as storage from './storage/index.js';\n\n// Website\nimport * as website from './website/index.js';\n\nexport {\n authentication,\n business,\n container,\n code,\n database,\n descriptors,\n events,\n finance,\n content,\n general,\n network,\n saas,\n storage,\n website,\n};\n\nimport type * as typeFest from 'type-fest';\nimport * as typeFestOwn from './typefest.own.js';\n\nexport { type typeFest, type typeFestOwn };\n","export * from './claim.js';\nexport * from './processedclaim.js';\n","export * from './address.js';\nexport * from './contact.js';\nexport * from './document.js';\nexport * from './job.js';\nexport * from './letter.js';\nexport * from './pdf.js';\nexport * from './project.js';\n","export * from './mongodescriptor.js';\nexport * from './objectaction.js';\nexport * from './objectstatus.js';\nexport * from './wrappeddata.js';\n","export * from './checkingaccount.js';\nexport * from './currency.js';\nexport * from './expense.js';\nexport * from './accountingdoc.js';\nexport * from './payment.js';\nexport * from './paymentreminder.js';\nexport * from './stockprice.js';\nexport * from './transaction.js';\n","export * from './commitinfo.js';\nexport * from './statusobject.js';","export * from './container.js';\nexport * from './volumemount.js';\n","export type { IMongoDescriptor } from '../database/index.js';\nexport type { IStorageDescriptor, IS3Descriptor } from '../storage/index.js';\n\nexport interface ICloudflareDescriptor {\n authToken: string;\n};\n\nexport interface ILetterExpressDescriptor {\n email: string,\n apiToken: string,\n}\n","export * from './contractevent.js';\nexport * from './moneyevent.js';\nexport * from './releaseevent.js';\nexport * from './requestevent.js';\nexport * from './sessionevent.js';\nexport * from './userevent.js';\n","export * from './article.js';\nexport * from './author.js';\nexport * from './documentationset.js';\n","export * from './date.js';\nexport * from './time.js';\n","export * from './cert.js';\nexport * from './cname.js';\nexport * from './device.js';\nexport * from './dns.js';\nexport * from './dnschallenge.js';\nexport * from './dnsconvenience.js';\nexport * from './domaindelegation.js';\nexport * from './jwt.js';\nexport * from './networknode.js';\nexport * from './request.js';\nexport * from './reverseproxy.js';\nexport * from './ssh.js';\n","import { type ICert } from './cert.js';\n\nexport class ICnameDescriptor {\n /**\n * the original domain that is being cnamed\n */\n cnamedDomain!: string;\n\n /**\n * the cname proxy domain\n * the domain that is used for the cname dns entry\n */\n cnameProxyDomain!: string;\n\n /**\n * the internal target url\n */\n targetUrl!: string;\n\n /**\n * a description\n */\n description!: string;\n\n /**\n * the ssl certificate\n */\n sslCertificate?: ICert;\n}\n","export * from './subscriptionplan.js';\nexport * from './product.js';\n","export {};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9zdG9yYWdlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==","export * from './link.js';\nexport * from './menuitem.js';\nexport * from './linkblock.js';\n","import * as plugins from '../elements/00plugins.js';\nimport type { TDcLocalizer } from './messages.js';\n\ntype TFormats = TDcLocalizer['format'];\n\n/**\n * The formats of a component nobody provided an `I18n`: English, as the\n * source language, with numbers ungrouped (`5000`, `1234.5`) and weeks that\n * start on Monday, as dees-catalog wrote them before it spoke the reader's\n * language. A provided `I18n` writes as its locale does.\n */\nclass DcNeutralFormats extends plugins.smarti18n.Formats {\n /** Monday, as `Date.getDay()` counts */\n public readonly firstDayOfWeek = 1;\n\n /** Ungrouped unless the options ask for grouping; `number()` and `money()` come through here too. */\n public override intlNumberFormat(optionsArg: Intl.NumberFormatOptions): Intl.NumberFormat {\n return super.intlNumberFormat({ useGrouping: false, ...optionsArg });\n }\n}\n\n/**\n * The instance dees-catalog's components speak while no host provides an\n * `I18n`: the catalog's English source words, in the neutral formats\n * (`DcNeutralFormats`), in-message numbers included. `dcLocalize()` passes it\n * to dees-element's `localize()` as the fallback.\n */\nexport const dcSourceI18n = plugins.smarti18n.createSourceI18n({\n createFormats: (settingsArg) => new DcNeutralFormats(settingsArg),\n});\n\n/**\n * An `Intl.DateTimeFormat` for a moment, in the provided date locale and time\n * zone: what `format.instant()` does for its fixed styles, for the options a\n * component needs (a clock time with seconds, a weekday). A `timeZone` in the\n * options wins, for a calendar day that must stay the day it is.\n */\nexport const momentFormat = (formatsArg: TFormats, optionsArg: Intl.DateTimeFormatOptions): Intl.DateTimeFormat =>\n formatsArg.intlDateTimeFormat(\n formatsArg.settings.timeZone && !optionsArg.timeZone\n ? { ...optionsArg, timeZone: formatsArg.settings.timeZone }\n : optionsArg,\n );\n\n/** What `Intl.Locale` says about a week where the engine knows it: `getWeekInfo()`, or the older `weekInfo` getter. */\ninterface ILocaleWeekInfo {\n /** 1 Monday … 7 Sunday */\n firstDay: number;\n}\ntype TLocaleWithWeekInfo = Intl.Locale & {\n getWeekInfo?: () => ILocaleWeekInfo;\n weekInfo?: ILocaleWeekInfo;\n};\n\n/**\n * The first day of the week in the provided date locale, counted as\n * `Date.getDay()` counts (0 Sunday … 6 Saturday): Monday in `de-DE`, Sunday in\n * `en-US`, Monday without a provided `I18n`. `undefined` where the engine does\n * not know it.\n */\nexport const firstDayOfWeek = (formatsArg: TFormats): number | undefined => {\n if (formatsArg instanceof DcNeutralFormats) return formatsArg.firstDayOfWeek;\n const locale = new Intl.Locale(formatsArg.intlDateTimeFormat({}).resolvedOptions().locale) as TLocaleWithWeekInfo;\n const info = typeof locale.getWeekInfo === 'function' ? locale.getWeekInfo() : locale.weekInfo;\n return info ? info.firstDay % 7 : undefined;\n};\n\nconst fileSizeUnits = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte'] as const;\n\n/**\n * A file size in the provided number format, counted in steps of 1024 and\n * named with the locale's unit: `1.5 MB` in English, `1,5 MB` in German.\n */\nexport const fileSize = (formatsArg: TFormats, bytesArg: number): string => {\n const exponent = bytesArg > 0\n ? Math.min(Math.floor(Math.log(bytesArg) / Math.log(1024)), fileSizeUnits.length - 1)\n : 0;\n return formatsArg\n .intlNumberFormat({ style: 'unit', unit: fileSizeUnits[exponent], unitDisplay: 'short', maximumFractionDigits: 2 })\n .format(bytesArg / Math.pow(1024, exponent));\n};\n","import type { ILocalizer } from '@design.estate/dees-element';\nimport * as plugins from '../elements/00plugins.js';\nimport { dcSourceI18n } from './formats.js';\n\n/**\n * Every word dees-catalog says to a reader, in English, the source language:\n * one typed `@push.rocks/smarti18n` catalog with dotted keys per group\n * (`appui.*`, …). A component reads its words with `dcLocalize(this)`\n * (`localize(this, dcMessages)` from dees-element), in the language of the\n * nearest provided `I18n`; without one it speaks English, and writes numbers\n * and weeks as before (`dcSourceI18n`).\n *\n * - A translation is `dcMessages.translation(locale, {…})` in a module of its\n * own (`de.ts`), registered below; the compiler checks it against this\n * source, and `test/test.i18n-catalog.node.ts` runs `verifyCatalog`.\n * - A host says a word its own way with\n * `i18n.override(dcMessages, locale, { 'appui.skipLink': '…' })`.\n * - The `appui.*` keys are the fields of `IAppuiLabels`, one to one, so a\n * label a host configures still overrides the catalog's word.\n */\nexport const dcMessages = plugins.smarti18n.defineCatalog({\n namespace: '@design.estate/dees-catalog',\n source: 'en',\n messages: {\n // dees-appui: the shell\n 'appui.skipLink': { message: 'Skip to content', description: 'The skip link, the shell\\'s first focusable control.' },\n 'appui.viewAnnouncement': { message: '{view}', description: 'What the live region says after a navigation; {view} is the name of the view now shown.' },\n 'appui.compactNavigation': { message: 'Workspace navigation', description: 'The compact layout\\'s navigation row (a landmark name).' },\n 'appui.compactMainMenu': { message: 'Navigation', description: 'The compact layout\\'s button that opens the main menu.' },\n 'appui.compactSections': { message: 'Sections', description: 'The compact layout\\'s button that opens the section menu, while the view gives that menu no heading.' },\n 'appui.compactClose': { message: 'Close navigation', description: 'The backdrop that closes an open menu drawer.' },\n 'appui.leaveHeading': { message: 'Leave this view?', description: 'The heading of the dialog that asks before leaving a view with unsaved work.' },\n 'appui.leaveConfirm': { message: 'Leave', description: 'That dialog\\'s button that leaves the view.' },\n 'appui.leaveCancel': { message: 'Stay', description: 'That dialog\\'s button that stays on the view.' },\n 'appui.linkInvalid': { message: 'Enter a valid app link.', description: 'Why the location field refuses what is no link.' },\n 'appui.linkForeign': { message: 'This link does not belong to this app.', description: 'Why the location field refuses a link to another app.' },\n 'appui.linkUnavailable': { message: 'This app screen or resource is unavailable. Check the link.', description: 'Why the location field refuses a link that names no screen.' },\n 'appui.loadingBar': { message: 'Loading', description: 'The name of the loading bar.' },\n 'appui.loadError': { message: '{view} could not be loaded.', description: 'Said in place of a view that failed to load; {view} is its name.' },\n 'appui.retry': { message: 'Retry', description: 'The button that asks for a failed view again.' },\n 'appui.resizeSecondary': { message: 'Resize section navigation', description: 'The section menu\\'s resize handle.' },\n 'appui.resizeActivity': { message: 'Resize activity log', description: 'The activity log\\'s resize handle.' },\n 'appui.resizeAssistant': { message: 'Resize assistant', description: 'The assistant\\'s resize handle.' },\n 'appui.resizeReset': { message: 'Double-click or press Enter to reset', description: 'How a resize handle is reset, read as its description.' },\n 'appui.sidePanel': { message: 'Side panel', description: 'The side panel landmark, which shows the activity log or the assistant.' },\n 'appui.showActivity': { message: 'Show activity', description: 'The command palette command that shows the activity log.' },\n 'appui.showAssistant': { message: 'Show assistant', description: 'The command palette command that shows the assistant.' },\n 'appui.closeSidePanel': { message: 'Close side panel', description: 'The command palette command that closes the side panel, and the close button in the side panel\\'s header.' },\n 'appui.assistantTitle': { message: 'Assistant', description: 'The side panel\\'s heading while it shows the assistant, and the assistant\\'s side of the switch between the activity log and the assistant.' },\n\n // dees-appui-commandpalette\n 'appui.paletteName': { message: 'Command palette', description: 'The command palette dialog.' },\n 'appui.palettePlaceholder': { message: 'Search views, menus and commands', description: 'The command palette\\'s query field: its placeholder and name.' },\n 'appui.paletteResults': { message: 'Results', description: 'The list of rows that match the query.' },\n 'appui.paletteEmpty': { message: 'Nothing matches that.', description: 'Said when nothing matches the query.' },\n 'appui.paletteViews': { message: 'Views', description: 'Command palette group heading: the app\\'s screens.' },\n 'appui.paletteMenu': { message: 'Menu', description: 'Command palette group heading: the app bar\\'s menu items.' },\n 'appui.paletteAccount': { message: 'Account', description: 'Command palette group heading: the account menu\\'s items.' },\n 'appui.paletteSections': { message: 'Sections', description: 'Command palette group heading: the rows of the current view\\'s section menu.' },\n 'appui.paletteTabs': { message: 'Tabs', description: 'Command palette group heading: the open content tabs.' },\n 'appui.paletteSidePanel': { message: 'Side panel', description: 'Command palette group heading: the side panel\\'s commands.' },\n 'appui.paletteCommands': { message: 'Commands', description: 'Command palette group heading: host commands that name no group of their own.' },\n\n // dees-appui-appbar\n 'appui.appMenu': { message: 'Application menu', description: 'The menu bar of the app\\'s window menus.' },\n 'appui.appMenuOverflow': { message: 'Menu', description: 'The one menu button the compact app bar shows in place of the window menus.' },\n 'appui.breadcrumbs': { message: 'Breadcrumbs', description: 'The breadcrumb trail (a landmark name).' },\n 'appui.search': { message: 'Search workspace', description: 'The app bar\\'s search button.' },\n 'appui.account': { message: 'Account: {name}', description: 'The account button; {name} is the signed-in person\\'s name.' },\n 'appui.accountMenu': { message: 'Account', description: 'The account menu the account button opens.' },\n 'appui.activityToggle': { message: 'Activity log', description: 'The app bar\\'s button that shows the activity log.' },\n 'appui.assistantToggle': { message: 'Assistant', description: 'The app bar\\'s button that shows the assistant.' },\n\n // dees-appui-location\n 'appui.locationInput': { message: 'App location', description: 'The field that edits the address of the current screen.' },\n 'appui.locationTrail': { message: 'Current location', description: 'The trail to the current screen (a landmark name).' },\n 'appui.locationParents': { message: 'Parent screens', description: 'The button that lists the screens above the current one.' },\n 'appui.locationEdit': { message: 'Edit app location', description: 'The button that edits the address.' },\n 'appui.locationEditHint': { message: 'Edit or paste an app link', description: 'That button\\'s tooltip.' },\n 'appui.locationCopy': { message: 'Copy link to this screen', description: 'The button that copies the address.' },\n 'appui.locationCopyHint': { message: 'Copy link', description: 'That button\\'s tooltip.' },\n 'appui.locationCopied': { message: 'Link copied', description: 'The copy button, and the message, once the address is copied.' },\n 'appui.locationCopiedHint': { message: 'Copied', description: 'The copy button\\'s tooltip once the address is copied.' },\n 'appui.locationStopped': { message: 'Navigation was stopped. Save or discard your changes before leaving.', description: 'Said when the current view would not be left.' },\n 'appui.locationFailed': { message: 'Could not open this app link.', description: 'Said when an address failed for a reason nobody named.' },\n 'appui.locationClipboard': { message: 'Clipboard access is unavailable. Copy the selected link.', description: 'Said when the clipboard refuses the address; the field then selects it.' },\n\n // dees-appui-mainmenu\n 'appui.mainNavigation': { message: 'Main navigation', description: 'The main navigation (a landmark name).' },\n 'appui.expandSidebar': { message: 'Expand sidebar', description: 'The button that expands the collapsed main menu, and its tooltip.' },\n 'appui.collapseSidebar': { message: 'Collapse sidebar', description: 'The button that collapses the main menu.' },\n\n // dees-appui-secondarymenu\n 'appui.sectionNavigation': { message: 'Section navigation', description: 'The section navigation, while it has no heading (a landmark name).' },\n 'appui.sectionName': { message: 'section', description: 'What {name} is in expandSection and collapseSection while the section menu has no heading.' },\n 'appui.expandSection': { message: 'Expand {name} sidebar', description: 'The button that expands the collapsed section menu, and its tooltip; {name} is the menu\\'s heading.' },\n 'appui.collapseSection': { message: 'Collapse {name} sidebar', description: 'The button that collapses the section menu; {name} is the menu\\'s heading.' },\n 'appui.confirmCancel': { message: 'Cancel', description: 'The button of an action\\'s confirmation dialog that does not run the action.' },\n\n // dees-appui-tabs\n 'appui.tabsName': { message: 'Views', description: 'The list of content tabs (a tab list name).' },\n 'appui.closeTab': { message: 'Close {name}', description: 'A tab\\'s close button; {name} is the tab\\'s label.' },\n 'appui.renameTab': { message: 'Rename', description: 'The tab context menu entry that renames a tab.' },\n 'appui.trayName': { message: 'Tabs tray', description: 'The tabs tray: a bar above the bottom bar that keeps pages from any view (its landmark name).' },\n 'appui.trayToggle': { message: '{count, plural, =0 {Tabs tray} one {Tabs tray, # tab} other {Tabs tray, # tabs}}', description: 'The bottom bar\\'s button that shows and hides the tabs tray; {count} is the number of tabs in it.' },\n 'appui.trayKeep': { message: 'Keep this page', description: 'The tray\\'s button that adds the page on show to the tray.' },\n 'appui.trayRemove': { message: 'Remove {label} from the tray', description: 'A tray tab\\'s remove button; {label} is the tab\\'s label.' },\n 'appui.trayEmpty': { message: 'Keep a page here to come back to it from any view.', description: 'Said by a tray that holds no tab.' },\n 'appui.trayClose': { message: 'Close the tray', description: 'The tray\\'s button that closes it.' },\n\n // dees-appui-page and dees-appui-contentheading\n 'page.breadcrumb': { message: 'Breadcrumb', description: 'The trail of pages above a page or a content heading (a landmark name).' },\n 'contentheading.back': { message: 'Back to {label}', description: 'A content heading\\'s back link before the title; {label} is the screen it leads to.' },\n\n // dees-appui-activitylog\n 'appui.activityTitle': { message: 'Activity', description: 'The activity log\\'s heading and the name of its feed: the side panel\\'s heading while it shows the log, and the log\\'s side of its switch.' },\n 'appui.activityCount': { message: 'Visible entries', description: 'The tooltip of the activity log\\'s entry count.' },\n 'appui.activityLive': { message: 'Live', description: 'The indicator that the activity log receives entries as they happen.' },\n 'appui.activityClose': { message: 'Close activity log', description: 'The activity log\\'s close button.' },\n 'appui.activityEmpty': { message: 'No activity entries', description: 'Said while the activity log shows no entry.' },\n 'appui.activitySearch': { message: 'Search activity', description: 'The activity log\\'s search field.' },\n 'appui.activitySearchPlaceholder': { message: 'Search activities, users...', description: 'The placeholder of the activity log\\'s search field.' },\n 'appui.today': { message: 'Today', description: 'The activity log\\'s heading over today\\'s entries.' },\n 'appui.yesterday': { message: 'Yesterday', description: 'The activity log\\'s heading over yesterday\\'s entries.' },\n 'appui.activityCopy': { message: 'Copy activity', description: 'Entry context menu: copies the entry.' },\n 'appui.activityFilterUser': { message: 'Filter by user', description: 'Entry context menu: shows only the entries of the entry\\'s user.' },\n 'appui.activityFilterType': { message: 'Filter by type', description: 'Entry context menu: shows only the entries of the entry\\'s type.' },\n 'appui.activityClearFilters': { message: 'Clear filters', description: 'Entry context menu: shows every entry again.' },\n\n // common words, shared by every component: generic actions whose sense does not change with the component\n 'common.cancel': { message: 'Cancel', description: 'A button that abandons what a dialog or form was about to do.' },\n 'common.close': { message: 'Close', description: 'A button that closes a dialog, panel or message.' },\n 'common.save': { message: 'Save', description: 'A button that saves changes.' },\n 'common.delete': { message: 'Delete', description: 'A button or menu entry that deletes the item it belongs to.' },\n 'common.remove': { message: 'Remove', description: 'A button that takes an item out of a list or field, without deleting anything else.' },\n 'common.rename': { message: 'Rename', description: 'A button or menu entry that renames the item it belongs to.' },\n 'common.retry': { message: 'Retry', description: 'A button that asks again for something that failed.' },\n 'common.tryAgain': { message: 'Try again', description: 'A button that runs a failed step or load once more.' },\n 'common.copy': { message: 'Copy', description: 'A menu entry or button that copies to the clipboard.' },\n 'common.cut': { message: 'Cut', description: 'A menu entry that cuts the selection to the clipboard.' },\n 'common.paste': { message: 'Paste', description: 'A menu entry that pastes from the clipboard.' },\n 'common.download': { message: 'Download', description: 'A button or menu entry that downloads a file.' },\n 'common.dismiss': { message: 'Dismiss', description: 'A button that removes a notice without acting on it.' },\n 'common.back': { message: 'Back', description: 'A button that returns to the previous step or screen.' },\n 'common.loading': { message: 'Loading…', description: 'Said while something loads.' },\n 'common.actions': { message: 'Actions', description: 'The name of a menu or column of actions for an item.' },\n 'common.search': { message: 'Search', description: 'A search field or the button that opens one.' },\n 'common.preview': { message: 'Preview', description: 'A menu entry or button that shows a preview of a file.' },\n 'common.open': { message: 'Open', description: 'A menu entry that opens the item it belongs to.' },\n 'common.create': { message: 'Create', description: 'A button that creates the item a dialog describes.' },\n 'common.edit': { message: 'Edit', description: 'A button that switches an item to editing.' },\n 'common.done': { message: 'Done', description: 'A button that closes a dialog after its settings were chosen.' },\n 'common.name': { message: 'Name', description: 'A column or field that holds a name.' },\n\n // dees-modal\n 'modal.help': { message: 'Help', description: 'The dialog\\'s help button (its accessible name).' },\n 'modal.continue': { message: 'Continue', description: 'The confirming button of a yes-or-no dialog, when the caller names no button.' },\n 'modal.emptyName': { message: 'Enter a name.', description: 'Said on a prompt\\'s field when it is confirmed empty, when the caller gives no message.' },\n\n // dees-label\n 'label.info': { message: 'More information', description: 'The info button after a field\\'s label; focusing or hovering it shows the field\\'s info text.' },\n\n // dees-stepper\n 'stepper.name': { message: 'Setup', description: 'The stepper\\'s name while no step is selected.' },\n 'stepper.empty': { message: 'No steps to show.', description: 'Said by a stepper that has no steps.' },\n 'stepper.progress': { message: 'Progress', description: 'The ribbon of step markers beside the steps (its accessible name).' },\n 'stepper.step': { message: '{position, number}. {title}', description: 'A step marker; {position} is the step\\'s number, {title} its title.' },\n 'stepper.stepCompleted': { message: '{position, number}. {title}, completed', description: 'A step marker of a step that is done; {position} is its number, {title} its title.' },\n 'stepper.counter': { message: '{current, number} of {total, number}', description: 'Where the reader is in the steps: {current} is the step shown, {total} the number of steps.' },\n 'stepper.counterPosition': { message: 'Step {current, number}', description: 'Where the reader is in a flow whose length is not known yet: {current} is the step shown.' },\n 'stepper.required': { message: 'Complete required fields', description: 'The hint in a step\\'s footer, beside its primary button, while its form is not complete.' },\n 'stepper.requiredHint': { message: 'Fill in the required fields to continue.', description: 'That hint\\'s tooltip.' },\n 'stepper.returnFailed': { message: 'Could not return to this step.', description: 'Said when going back to a step failed for a reason nobody named.' },\n 'stepper.actionFailed': { message: 'The action could not be completed. Try again.', description: 'Said when a step\\'s action failed for a reason nobody named.' },\n 'stepper.stepFailed': { message: 'This step could not be completed. Try again.', description: 'Said when a step failed for a reason nobody named.' },\n 'stepper.cancelHeading': { message: 'Cancel setup?', description: 'The heading of the dialog that asks before a stepper is cancelled.' },\n 'stepper.cancelQuestion': { message: 'Are you sure you want to cancel? Any progress on the current step will be lost.', description: 'That dialog\\'s question.' },\n 'stepper.cancelStay': { message: 'Continue setup', description: 'That dialog\\'s button that keeps the stepper open.' },\n 'stepper.cancelConfirm': { message: 'Yes, cancel', description: 'That dialog\\'s button that cancels the stepper.' },\n\n // dees-state\n 'state.empty': { message: 'Nothing here yet', description: 'Said by an empty place (a tile, a panel, a list) whose host gave no sentence of its own.' },\n 'state.error': { message: 'This could not be loaded.', description: 'Said in place of content that failed to load, when the host gave no sentence of its own.' },\n 'state.details': { message: 'Technical details', description: 'The disclosure that shows the technical cause of a failure.' },\n\n // dees-statusbutton\n 'statusbutton.heading': { message: 'Status', description: 'The status button\\'s panel heading and the first word of the button\\'s name, while the host gives no heading.' },\n 'statusbutton.name': { message: '{heading}: {summary}', description: 'The status button\\'s accessible name; {heading} is the panel\\'s heading, {summary} what needs attention (statusbutton.errors, statusbutton.warnings, statusbutton.summary or statusbutton.clear).' },\n 'statusbutton.count': { message: '{count, number}', description: 'The number on the status button: how many warnings and errors there are.' },\n 'statusbutton.errors': { message: '{count, plural, one {# error} other {# errors}}', description: 'How many errors the status button reports.' },\n 'statusbutton.warnings': { message: '{count, plural, one {# warning} other {# warnings}}', description: 'How many warnings the status button reports.' },\n 'statusbutton.summary': { message: '{errors}, {warnings}', description: 'Both counts together, errors first; {errors} is statusbutton.errors, {warnings} statusbutton.warnings.' },\n 'statusbutton.progress': { message: '{done, number} of {total, number}', description: 'The progress on the status button\\'s face, beside its glyph: {done} steps of {total} are done.' },\n 'statusbutton.progressDone': { message: '{done, number} of {total, number} done', description: 'The progress in the status button\\'s accessible name and its panel\\'s summary: {done} steps of {total} are done.' },\n 'statusbutton.countAndProgress': { message: '{count, number} · {progress}', description: 'The status button\\'s face with warnings or errors and a progress: their number, then the progress (statusbutton.progress, or the host\\'s own words).' },\n 'statusbutton.withProgress': { message: '{progress}. {summary}', description: 'What the status button\\'s accessible name and its panel\\'s summary say with a progress: {progress} is statusbutton.progressDone or the host\\'s own words, {summary} what needs attention.' },\n 'statusbutton.clear': { message: 'No warnings or errors', description: 'What the status button and its panel say while nothing needs attention.' },\n 'statusbutton.error': { message: 'Error', description: 'Said before an error\\'s text in the status panel: the name of its icon.' },\n 'statusbutton.warning': { message: 'Warning', description: 'Said before a warning\\'s text in the status panel: the name of its icon.' },\n 'statusbutton.info': { message: 'Information', description: 'Said before a note\\'s text in the status panel: the name of its icon.' },\n 'statusbutton.success': { message: 'Success', description: 'Said before an all-good status\\'s text in the status panel: the name of its icon.' },\n 'statusbutton.item': { message: '{severity}: {text}', description: 'Announced when an error or a severe warning appears; {severity} is statusbutton.error or statusbutton.warning, {text} the status.' },\n\n // dees-contextmenu, dees-popover\n 'contextmenu.allowNative': { message: 'Allow native context', description: 'The only entry of a context menu that has no items: it lets the browser\\'s own context menu open next time.' },\n 'popover.name': { message: 'Details', description: 'A popover\\'s accessible name while its host gives it none.' },\n\n // dees-toast, dees-progressbar\n 'toast.info': { message: 'Information', description: 'Said before an info toast\\'s message: the name of its icon.' },\n 'toast.success': { message: 'Success', description: 'Said before a success toast\\'s message: the name of its icon.' },\n 'toast.warning': { message: 'Warning', description: 'Said before a warning toast\\'s message: the name of its icon.' },\n 'toast.error': { message: 'Error', description: 'Said before an error toast\\'s message: the name of its icon.' },\n 'progressbar.name': { message: 'Progress', description: 'A progress bar\\'s accessible name while its host gives it no label.' },\n\n // dees-dashboardgrid, dees-pagination, dees-mosaic, dees-resize-handle\n 'dashboardgrid.deleteTile': { message: 'Delete tile', description: 'A dashboard tile\\'s context menu entry that removes the tile.' },\n 'dashboardgrid.empty': { message: 'No widgets configured', description: 'Said by a dashboard without tiles.' },\n 'dashboardgrid.emptyHint': { message: 'Add widgets to populate the dashboard', description: 'The hint below that.' },\n 'dashboardgrid.untitledTile': { message: 'Tile {index, number}', description: 'The name of a tile without a title, on its move handle and in announcements; {index} is its place among the tiles, from 1.' },\n 'dashboardgrid.hintMove': { message: 'Arrow keys move the tile.', description: 'Part of a tile handle\\'s description, while the tile can move.' },\n 'dashboardgrid.hintResize': { message: 'Shift and arrow keys resize the tile.', description: 'Part of a tile handle\\'s description, while the tile can be resized.' },\n 'dashboardgrid.hintMenu': { message: 'The menu key or Shift+F10 opens the tile\\'s actions.', description: 'Part of a tile handle\\'s description, while the tile can be deleted.' },\n 'dashboardgrid.moved': { message: 'Moved {title} to column {column, number}, row {row, number}.', description: 'Announced after a tile moved; {title} is its name, {column} and {row} its new place, from 1.' },\n 'dashboardgrid.resized': { message: 'Resized {title} to {width, plural, one {# column} other {# columns}} by {height, plural, one {# row} other {# rows}}.', description: 'Announced after a tile was resized; {title} is its name, {width} and {height} its new size in grid cells.' },\n 'dashboardgrid.removed': { message: 'Removed {title}.', description: 'Announced after a tile was deleted from its menu; {title} is its name.' },\n 'dashboardgrid.sizeBadge': { message: '{width, number} × {height, number}', description: 'The badge on a tile while the pointer resizes it: the size it snaps to, {width} columns by {height} rows. Shown only; dashboardgrid.resized announces the size taken.' },\n 'pagination.previous': { message: 'Previous page', description: 'The pagination\\'s button to the previous page.' },\n 'pagination.next': { message: 'Next page', description: 'The pagination\\'s button to the next page.' },\n 'pagination.page': { message: 'Page {page, number}', description: 'A page button\\'s accessible name; {page} is its number.' },\n 'mosaic.closeTile': { message: 'Close {title}', description: 'A mosaic tile\\'s close button; {title} is the tile\\'s title.' },\n 'resizehandle.reset': { message: 'Double-click or press Enter to reset', description: 'How a resize handle is reset, read as its description.' },\n\n // dees-shopping-productcard\n 'productcard.placeholderName': { message: 'Product name', description: 'The name a product card shows while it has no product.' },\n 'productcard.select': { message: 'Select {name}', description: 'The product card\\'s checkbox; {name} is the product\\'s name.' },\n 'productcard.inStock': { message: 'In stock', description: 'Said on a product that is available.' },\n 'productcard.outOfStock': { message: 'Out of stock', description: 'Said on a product that is not available.' },\n 'productcard.quantity': { message: 'Quantity for {name}', description: 'The product card\\'s quantity field; {name} is the product\\'s name.' },\n\n // dees-chips\n 'chips.remove': { message: 'Remove {chip}', description: 'A chip\\'s remove button; {chip} is the chip\\'s label, its key and then its value.' },\n\n // dees-simple-appdash\n 'appdash.defaultName': { message: 'Application Dashboard', description: 'The dashboard\\'s name while its host gives it none.' },\n 'appdash.compactNavigation': { message: 'Compact navigation', description: 'The navigation toggle while the layout is compact (disabled).' },\n 'appdash.expandNavigation': { message: 'Expand navigation', description: 'The button that expands the collapsed navigation.' },\n 'appdash.collapseNavigation': { message: 'Collapse navigation', description: 'The button that collapses the navigation.' },\n 'appdash.navigation': { message: 'App navigation', description: 'The dashboard\\'s navigation (a landmark name).' },\n 'appdash.workspace': { message: 'Workspace', description: 'The heading over the dashboard\\'s views.' },\n 'appdash.signOut': { message: 'Sign out', description: 'The button that signs the reader out.' },\n 'appdash.dismissMessage': { message: 'Dismiss: {message}', description: 'A message banner\\'s close button; {message} is the banner\\'s text.' },\n 'appdash.connected': { message: 'Connected', description: 'The status bar\\'s connection state.' },\n 'appdash.terminal': { message: 'Terminal', description: 'The status bar\\'s button that opens the terminal.' },\n\n // dees-simple-login (a label the host sets in `labels` wins over these)\n 'login.heading': { message: 'Sign in', description: 'The login card\\'s heading, and the password form\\'s submit button.' },\n 'login.defaultName': { message: 'Application', description: 'What {name} is in the subheading while the host names no application.' },\n 'login.subheading': { message: 'Enter your credentials to access {name}', description: 'The login card\\'s subheading; {name} is the application\\'s name.' },\n 'login.unavailable': { message: 'No sign-in method is available in this browser.', description: 'Said when no configured sign-in method works in this browser.' },\n 'login.divider': { message: 'or', description: 'The divider between two sign-in methods.' },\n 'login.passkeyRegister': { message: 'Create a passkey', description: 'The button that creates a passkey.' },\n 'login.passkeyAuthenticate': { message: 'Sign in with a passkey', description: 'The button that signs in with a passkey.' },\n 'login.provider': { message: 'Continue with {provider}', description: 'A sign-in provider\\'s button; {provider} is the provider\\'s name.' },\n 'login.username': { message: 'Username', description: 'The username field.' },\n 'login.password': { message: 'Password', description: 'The password field.' },\n 'login.credentials': { message: 'Credentials', description: 'The heading over the username and password fields.' },\n\n // charts\n 'chart.untitled': { message: 'Untitled Chart', description: 'A chart\\'s heading while its host gives it none.' },\n 'chart.loadFailed': { message: 'The chart could not be loaded.', description: 'Said in place of a chart whose library failed to load.' },\n 'chart.loading': { message: 'Loading chart…', description: 'Said while a chart loads.' },\n 'chart.noData': { message: 'No data for this period', description: 'Said by a chart without data.' },\n 'chart.series': { message: 'Chart series', description: 'The chart\\'s legend, a group of series toggles.' },\n 'chart.seriesSummary': { message: '{name}: {values}', description: 'A series in a chart\\'s text alternative; {name} is the series, {values} its readings, separated by commas.' },\n 'chart.seriesEmpty': { message: '{name}: no values', description: 'A series without values in a chart\\'s text alternative.' },\n 'chart.statLatest': { message: 'latest', description: 'Legend statistic: the newest value of a series.' },\n 'chart.statMin': { message: 'min', description: 'Legend statistic: the lowest value of a series.' },\n 'chart.statMax': { message: 'max', description: 'Legend statistic and chart line: the highest value of a series.' },\n 'chart.statAvg': { message: 'avg', description: 'Legend statistic and chart line: the average value of a series.' },\n 'chartline.reading': { message: '{time} {value}', description: 'One reading in a line chart\\'s text alternative: when, then the value.' },\n 'chartarea.expand': { message: 'Expand chart', description: 'The button that shows the chart on the full page.' },\n 'chartarea.fullPage': { message: 'Full page', description: 'That button\\'s tooltip.' },\n 'chartarea.exitFullPage': { message: 'Exit full page', description: 'The button that returns the chart from the full page.' },\n 'chartarea.noReadings': { message: '{name}: no readings', description: 'A series without readings in the chart\\'s text alternative.' },\n 'chartarea.unavailable': { message: 'unavailable', description: 'What the text alternative says for a newest reading that is missing.' },\n 'chartarea.summaryPeriod': { message: '{name}, from {first} to {newest}: latest {latest}, lowest {lowest}, highest {highest}', description: 'A series in the chart\\'s text alternative, over a period; {first} and {newest} are moments, the rest formatted values.' },\n 'chartarea.summaryMoment': { message: '{name}, at {newest}: latest {latest}, lowest {lowest}, highest {highest}', description: 'A series in the chart\\'s text alternative with one moment; {newest} is that moment.' },\n 'chartlog.defaultLabel': { message: 'Server Logs', description: 'The log\\'s heading while its host gives it none.' },\n 'chartlog.jumpUnavailable': { message: 'Jumping between matches needs xterm’s search addon', description: 'The tooltip of the previous and next match buttons while they cannot work.' },\n 'chartlog.search': { message: 'Search logs...', description: 'The log\\'s search field (placeholder and name).' },\n 'chartlog.previousMatch': { message: 'Previous match', description: 'The button to the previous search match.' },\n 'chartlog.nextMatch': { message: 'Next match', description: 'The button to the next search match.' },\n 'chartlog.toHighlight': { message: 'Switch to highlight mode', description: 'The tooltip of the filter toggle while it filters.' },\n 'chartlog.toFilter': { message: 'Switch to filter mode', description: 'The tooltip of the filter toggle while it highlights.' },\n 'chartlog.filter': { message: 'Filter', description: 'The filter toggle while it filters.' },\n 'chartlog.highlight': { message: 'Highlight', description: 'The filter toggle while it highlights.' },\n 'chartlog.autoScroll': { message: 'Auto Scroll', description: 'The toggle that keeps the log at its newest line.' },\n 'chartlog.clear': { message: 'Clear', description: 'The button that empties the log.' },\n 'chartlog.levels': { message: 'Log lines by level', description: 'The metrics footer\\'s legend: the count of lines per log level.' },\n 'chartlog.errors': { message: 'errors: {count, number}', description: 'A metric: the number of error lines.' },\n 'chartlog.warnings': { message: 'warns: {count, number}', description: 'A metric: the number of warning lines.' },\n 'chartlog.info': { message: 'info: {count, number}', description: 'A metric: the number of info lines.' },\n 'chartlog.success': { message: 'success: {count, number}', description: 'A metric: the number of success lines.' },\n 'chartlog.debug': { message: 'debug: {count, number}', description: 'A metric: the number of debug lines.' },\n 'chartlog.rate': { message: '{rate} logs/sec', description: 'A metric: log lines per second; {rate} is the formatted rate.' },\n\n // dees-searchbar\n 'searchbar.placeholder': { message: 'Your Skills (e.g. TypeScript, Rust, Projectmanagement)', description: 'The search field\\'s placeholder, an example of what to search for.' },\n 'searchbar.search': { message: 'Search ->', description: 'The search button.' },\n 'searchbar.filters': { message: 'Filters', description: 'The heading over the search filters.' },\n 'searchbar.location': { message: 'location', description: 'The location filter\\'s label.' },\n\n // dees-updater\n 'updater.defaultName': { message: 'Application', description: 'The updated app\\'s name while the host names none.' },\n 'updater.phase.checking': { message: 'Check release', description: 'Built-in update phase: finds the release and checks the version is available.' },\n 'updater.phase.downloading': { message: 'Download', description: 'Built-in update phase: downloads the release.' },\n 'updater.phase.verifying': { message: 'Verify payload', description: 'Built-in update phase: verifies the downloaded release.' },\n 'updater.phase.installing': { message: 'Install release', description: 'Built-in update phase: installs the release.' },\n 'updater.phase.restarting': { message: 'Restart app', description: 'Built-in update phase: restarts the application.' },\n 'updater.phase.verifyingApp': { message: 'Verify app', description: 'Built-in update phase: waits for the application to answer with the new version.' },\n 'updater.phaseRunning': { message: '{phase}…', description: 'The status line while a phase runs; {phase} is the phase\\'s label.' },\n 'updater.preparing': { message: 'Preparing update…', description: 'The status line before the first phase.' },\n 'updater.verified': { message: 'Update verified', description: 'The log line once the update is verified.' },\n 'updater.complete': { message: 'Update complete', description: 'The subtitle once the update is done.' },\n 'updater.attention': { message: 'Needs attention', description: 'The subtitle after a warning.' },\n 'updater.failed': { message: 'Update failed', description: 'The subtitle after a failure.' },\n 'updater.updatingTo': { message: 'Updating to {version}', description: 'The subtitle while updating; {version} is the target version.' },\n 'updater.updating': { message: 'Updating…', description: 'The subtitle while updating to a version nobody named.' },\n 'updater.details': { message: 'Details', description: 'The toggle that shows the update log.' },\n 'updater.moreInfo': { message: 'More info', description: 'The link to more information about the release.' },\n 'updater.changelog': { message: 'Changelog', description: 'The link to the release\\'s changelog.' },\n 'updater.continueNow': { message: 'Continue now', description: 'The button that continues at once after the update.' },\n 'updater.reloadNow': { message: 'Reload now', description: 'The button that reloads the application at once after the update.' },\n 'updater.closeNow': { message: 'Close now', description: 'The button that closes the updater at once after the update.' },\n 'updater.continueIn': { message: 'Continuing automatically in {seconds, number}s', description: 'The countdown before the app continues on its own.' },\n 'updater.reloadIn': { message: 'Reloading application in {seconds, number}s', description: 'The countdown before the application reloads.' },\n 'updater.closeIn': { message: 'Closing updater in {seconds, number}s', description: 'The countdown before the updater closes.' },\n 'updater.customIn': { message: '{action} in {seconds, number}s', description: 'The countdown before the host\\'s own success action; {action} is the host\\'s label for it.' },\n 'updater.continueStarted': { message: 'Continuing automatically now…', description: 'Said once the app continues.' },\n 'updater.reloadStarted': { message: 'Reloading application now…', description: 'Said once the application reloads.' },\n 'updater.closeStarted': { message: 'Closing updater now…', description: 'Said once the updater closes.' },\n 'updater.customStarted': { message: '{action} now…', description: 'Said once the host\\'s own success action runs; {action} is its label.' },\n 'updater.phaseInfo.checking': { message: 'Resolve release metadata and confirm that the target version is available.', description: 'What the built-in phase \"Check release\" does, in a phase\\'s description.' },\n 'updater.phaseInfo.downloading': { message: 'Download the release payload from the configured update source.', description: 'What the built-in phase \"Download\" does.' },\n 'updater.phaseInfo.verifying': { message: 'Verify the downloaded payload before applying it.', description: 'What the built-in phase \"Verify payload\" does.' },\n 'updater.phaseInfo.installing': { message: 'Install the new release on this host.', description: 'What the built-in phase \"Install release\" does.' },\n 'updater.phaseInfo.restarting': { message: 'Restart the application so the new release can become active.', description: 'What the built-in phase \"Restart app\" does.' },\n 'updater.phaseInfo.verifyingApp': { message: 'Wait for the application to answer with the expected version.', description: 'What the built-in phase \"Verify app\" does.' },\n 'chartlog.hidden': { message: '[{count, plural, one {# log line} other {# log lines}} hidden by filter ...]', description: 'The line that stands in for log lines the filter hides; {count} is how many.' },\n\n // dees-input-datepicker\n 'datepicker.dialog': { message: 'Choose a date', description: 'The calendar popup (a dialog name).' },\n 'datepicker.previousMonth': { message: 'Previous month', description: 'The calendar\\'s button to the previous month.' },\n 'datepicker.nextMonth': { message: 'Next month', description: 'The calendar\\'s button to the next month.' },\n 'datepicker.moreEvents': { message: '(+{count, number} more)', description: 'After the first event of a day in its tooltip: how many more events the day has.' },\n 'datepicker.time': { message: 'Time', description: 'The heading over the time fields.' },\n 'datepicker.timezone': { message: 'Timezone', description: 'The heading over the time zone choice.' },\n 'datepicker.today': { message: 'Today', description: 'The button that picks today.' },\n 'datepicker.clear': { message: 'Clear', description: 'The button that clears the date.' },\n 'datepicker.clearDate': { message: 'Clear date', description: 'The field\\'s button that clears the date.' },\n 'datepicker.required': { message: 'Choose a date.', description: 'Said on a required date field that is empty.' },\n 'datepicker.invalid': { message: 'Enter a valid date (YYYY-MM-DD, DD.MM.YYYY or MM/DD/YYYY).', description: 'Said on a date field whose text is no date; the formats in brackets are the ones the field reads, keep them as they are.' },\n 'datepicker.minInvalid': { message: 'Minimum date is invalid.', description: 'Said when the host\\'s earliest date is no date.' },\n 'datepicker.maxInvalid': { message: 'Maximum date is invalid.', description: 'Said when the host\\'s latest date is no date.' },\n 'datepicker.onOrAfter': { message: 'Choose a date on or after {date}.', description: 'Said on a date before the earliest allowed one; {date} is that date as the host gave it.' },\n 'datepicker.onOrBefore': { message: 'Choose a date on or before {date}.', description: 'Said on a date after the latest allowed one; {date} is that date as the host gave it.' },\n 'datepicker.disabledInvalid': { message: 'A disabled date is invalid.', description: 'Said when one of the host\\'s unavailable dates is no date.' },\n 'datepicker.unavailable': { message: 'This date is unavailable.', description: 'Said on a date that cannot be chosen.' },\n 'datepicker.zone.utc': { message: 'UTC (Coordinated Universal Time)', description: 'A time zone to choose.' },\n 'datepicker.zone.eastern': { message: 'Eastern Time (US & Canada)', description: 'A time zone to choose.' },\n 'datepicker.zone.central': { message: 'Central Time (US & Canada)', description: 'A time zone to choose.' },\n 'datepicker.zone.mountain': { message: 'Mountain Time (US & Canada)', description: 'A time zone to choose.' },\n 'datepicker.zone.pacific': { message: 'Pacific Time (US & Canada)', description: 'A time zone to choose.' },\n 'datepicker.zone.london': { message: 'London', description: 'A time zone to choose, named by its city.' },\n 'datepicker.zone.paris': { message: 'Paris', description: 'A time zone to choose, named by its city.' },\n 'datepicker.zone.berlin': { message: 'Berlin', description: 'A time zone to choose, named by its city.' },\n 'datepicker.zone.moscow': { message: 'Moscow', description: 'A time zone to choose, named by its city.' },\n 'datepicker.zone.dubai': { message: 'Dubai', description: 'A time zone to choose, named by its city.' },\n 'datepicker.zone.india': { message: 'India Standard Time', description: 'A time zone to choose.' },\n 'datepicker.zone.china': { message: 'China Standard Time', description: 'A time zone to choose.' },\n 'datepicker.zone.tokyo': { message: 'Tokyo', description: 'A time zone to choose, named by its city.' },\n 'datepicker.zone.sydney': { message: 'Sydney', description: 'A time zone to choose, named by its city.' },\n 'datepicker.zone.auckland': { message: 'Auckland', description: 'A time zone to choose, named by its city.' },\n\n // dees-input-code\n 'code.wordWrap': { message: 'Word Wrap', description: 'The code editor\\'s toggle that wraps long lines.' },\n 'code.lineNumbers': { message: 'Line Numbers', description: 'The code editor\\'s toggle that shows line numbers.' },\n 'code.copy': { message: 'Copy Code', description: 'The code editor\\'s button that copies the code.' },\n 'code.expand': { message: 'Expand', description: 'The code editor\\'s button that opens it in a full-screen dialog.' },\n 'code.unavailable': { message: 'Editor unavailable', description: 'Said in the footer when the code editor could not load.' },\n 'code.cursor': { message: 'Ln {line, number}, Col {column, number}', description: 'The cursor position in the footer: line and column.' },\n 'code.lines': { message: '{count, plural, one {# line} other {# lines}}', description: 'The number of lines in the footer.' },\n 'code.editor': { message: 'Code Editor', description: 'The full-screen dialog\\'s heading while the field has no label.' },\n 'code.saveClose': { message: 'Save & Close', description: 'The full-screen dialog\\'s button that keeps the changes and closes it.' },\n 'code.language.typescript': { message: 'TypeScript', description: 'A programming language\\'s name, as the language picker lists it.' },\n 'code.language.javascript': { message: 'JavaScript', description: 'A programming language\\'s name.' },\n 'code.language.json': { message: 'JSON', description: 'A data format\\'s name.' },\n 'code.language.html': { message: 'HTML', description: 'A markup language\\'s name.' },\n 'code.language.css': { message: 'CSS', description: 'A style sheet language\\'s name.' },\n 'code.language.scss': { message: 'SCSS', description: 'A style sheet language\\'s name.' },\n 'code.language.markdown': { message: 'Markdown', description: 'A markup language\\'s name.' },\n 'code.language.yaml': { message: 'YAML', description: 'A data format\\'s name.' },\n 'code.language.xml': { message: 'XML', description: 'A markup language\\'s name.' },\n 'code.language.sql': { message: 'SQL', description: 'A query language\\'s name.' },\n 'code.language.python': { message: 'Python', description: 'A programming language\\'s name.' },\n 'code.language.java': { message: 'Java', description: 'A programming language\\'s name.' },\n 'code.language.csharp': { message: 'C#', description: 'A programming language\\'s name.' },\n 'code.language.cpp': { message: 'C++', description: 'A programming language\\'s name.' },\n 'code.language.go': { message: 'Go', description: 'A programming language\\'s name.' },\n 'code.language.rust': { message: 'Rust', description: 'A programming language\\'s name.' },\n 'code.language.shell': { message: 'Shell', description: 'Shell scripts, as a language to pick.' },\n 'code.language.plaintext': { message: 'Plain Text', description: 'Text without a language, as a language to pick.' },\n\n // dees-input-dropdown\n 'dropdown.search': { message: 'Search options', description: 'The dropdown\\'s search field (name and placeholder).' },\n 'dropdown.options': { message: 'Options', description: 'The list of options while the field has no label.' },\n 'dropdown.searching': { message: 'Searching…', description: 'Said while a remote search runs.' },\n 'dropdown.empty': { message: 'No options found', description: 'Said when no option matches.' },\n 'dropdown.searchFailed': { message: 'Search failed. Try again.', description: 'Said when a remote search failed for a reason nobody named.' },\n 'dropdown.placeholder': { message: 'Select an option', description: 'The dropdown while nothing is chosen.' },\n\n // dees-input-fileupload\n 'fileupload.multiple': { message: 'Multiple files supported', description: 'A hint: the field takes several files.' },\n 'fileupload.single': { message: 'Single file only', description: 'A hint: the field takes one file.' },\n 'fileupload.maxSize': { message: 'Max {size}', description: 'A hint: the largest file allowed; {size} is a formatted size.' },\n 'fileupload.noLimit': { message: 'No size limit', description: 'A hint: files of any size are allowed.' },\n 'fileupload.accepts': { message: 'Accepts {types}', description: 'A hint: the file types allowed; {types} is a list of them.' },\n 'fileupload.select': { message: 'Select files', description: 'The drop zone\\'s name, and what choosing files does.' },\n 'fileupload.selectAccepted': { message: 'Select files ({types})', description: 'The drop zone\\'s name with the file types it takes.' },\n 'fileupload.drop': { message: 'Drop files here or', description: 'The drop zone\\'s title, followed by the browse button.' },\n 'fileupload.browse': { message: 'browse', description: 'The button after \"Drop files here or\" that opens the file chooser.' },\n 'fileupload.none': { message: 'No files selected', description: 'Said while no file is chosen.' },\n 'fileupload.selected': { message: '{count, plural, one {# file selected} other {# files selected}}', description: 'The number of chosen files.' },\n 'fileupload.clear': { message: 'Clear', description: 'The button that removes the chosen file.' },\n 'fileupload.clearAll': { message: 'Clear all', description: 'The button that removes every chosen file.' },\n 'fileupload.typeImage': { message: 'Image', description: 'A chosen file\\'s type badge: a picture.' },\n 'fileupload.typePdf': { message: 'PDF', description: 'A chosen file\\'s type badge: a PDF document.' },\n 'fileupload.typeDoc': { message: 'Document', description: 'A chosen file\\'s type badge: a word-processor document.' },\n 'fileupload.typeSpreadsheet': { message: 'Spreadsheet', description: 'A chosen file\\'s type badge: a spreadsheet.' },\n 'fileupload.typePresentation': { message: 'Presentation', description: 'A chosen file\\'s type badge: a slide presentation.' },\n 'fileupload.typeVideo': { message: 'Video', description: 'A chosen file\\'s type badge: a video.' },\n 'fileupload.typeAudio': { message: 'Audio', description: 'A chosen file\\'s type badge: a sound recording.' },\n 'fileupload.typeArchive': { message: 'Archive', description: 'A chosen file\\'s type badge: an archive such as ZIP.' },\n 'fileupload.previewOf': { message: 'Preview of {name}', description: 'A file\\'s preview image; {name} is the file\\'s name.' },\n 'fileupload.remove': { message: 'Remove {name}', description: 'A file\\'s remove button; {name} is the file\\'s name.' },\n 'fileupload.tooLarge': { message: 'File \"{name}\" exceeds the maximum size of {size}', description: 'Said when a file is too large.' },\n 'fileupload.typeRefused': { message: 'File type not accepted. Allowed: {types}', description: 'Said when a file\\'s type is not allowed; {types} lists the allowed ones.' },\n 'fileupload.allFiles': { message: 'All files', description: 'An accepted type: any file.' },\n 'fileupload.family': { message: '{family} files', description: 'An accepted type: every file of a family; {family} is its technical name, such as image or video.' },\n 'fileupload.addMore': { message: 'Add more files', description: 'What choosing files does once some are chosen.' },\n 'fileupload.replace': { message: 'Replace file', description: 'What choosing a file does once one is chosen.' },\n 'fileupload.maxFiles': { message: 'Maximum {count, number} files allowed', description: 'Said when no more files may be added.' },\n 'fileupload.onlyMore': { message: '{count, plural, one {Only # more file can be added} other {Only # more files can be added}}', description: 'Said when only some of the dropped files were taken.' },\n 'fileupload.required': { message: 'Please select at least one file', description: 'Said on a required file field that is empty.' },\n 'fileupload.queued': { message: 'Queued', description: 'A chosen file\\'s upload waits for its turn.' },\n 'fileupload.uploading': { message: 'Uploading…', description: 'A chosen file uploads, how far along is not known.' },\n 'fileupload.uploaded': { message: 'Uploaded', description: 'A chosen file finished uploading.' },\n 'fileupload.uploadFailed': { message: 'Upload failed', description: 'A chosen file did not upload, for a reason nobody named.' },\n 'fileupload.progressOf': { message: 'Upload of {name}', description: 'A file\\'s upload progress bar (its name); {name} is the file\\'s name.' },\n 'fileupload.announceUploaded': { message: '{name} uploaded', description: 'Said to assistive technology once a file finished uploading; {name} is the file\\'s name.' },\n 'fileupload.announceFailed': { message: '{name} not uploaded: {reason}', description: 'Said to assistive technology when a file did not upload; {name} is the file\\'s name, {reason} why.' },\n\n // dees-dropzone-overlay\n 'dropzoneoverlay.heading': { message: 'Drop files to add them', description: 'Shown over the whole window while the reader drags files over it.' },\n\n // dees-input-iban, -list, -phone, -reference, -tags, -typelist, -quantityselector, -checkbox, -text, -textarea\n 'iban.valid': { message: 'IBAN is valid', description: 'Said under a valid IBAN.' },\n 'iban.invalid': { message: 'Please enter a valid IBAN', description: 'Said under an IBAN that is not valid.' },\n 'list.placeholder': { message: 'Add an item…', description: 'The list\\'s field for a new item.' },\n 'list.empty': { message: 'No items yet', description: 'Said by an empty list, in place of its items.' },\n 'list.max': { message: 'Maximum {count, number} items allowed', description: 'Said when the list is full.' },\n 'list.duplicate': { message: 'This item already exists in the list', description: 'Said when an item is added twice.' },\n 'list.notCandidate': { message: 'Choose one of the suggestions', description: 'Said when an entry that is none of the list\\'s suggestions is refused.' },\n 'list.confirmDelete': { message: 'Delete “{item}”?', description: 'The question before an item is deleted; {item} is its text.' },\n 'list.confirmDeleteDetail': { message: '“{item}” will be removed from the list.', description: 'The line under the question before an item is deleted, naming what goes; {item} is its text.' },\n 'list.required': { message: 'At least one item is required', description: 'Said on a required list that is empty.' },\n 'list.min': { message: 'At least {count, number} items required', description: 'Said on a list with too few items.' },\n 'list.limit': { message: '{count, number} / {max, number}', description: 'The short counter beside the list\\'s field while the list has a maximum: {count} items of at most {max}. It is shown, not read out; list.limitLabel is read out instead.' },\n 'list.limitLabel': { message: '{count, number} of {max, number} items', description: 'The counter beside the list\\'s field as it is read out: {count} items of at most {max}.' },\n 'list.limitReached': { message: 'Limit reached', description: 'Said in place of the list\\'s field once the list holds as many items as it may.' },\n 'list.filled': { message: 'Added {item}. Limit of {count, plural, one {# item} other {# items}} reached.', description: 'Announced when the item just added fills the list to its maximum and the list\\'s field goes; {item} is its text, {count} the maximum.' },\n 'list.add': { message: 'Add item', description: 'The list\\'s add button; also the name of its field for a new item while the list has no label.' },\n 'list.addTo': { message: 'Add to {label}', description: 'The name of the list\\'s field for a new item; {label} is the list\\'s label.' },\n 'list.custom': { message: 'Custom', description: 'A mark beside an item that is none of the list\\'s suggestions but was typed in freely.' },\n 'list.suggestion': { message: 'Suggestion: {item}. Press Tab to complete.', description: 'Read out with the list\\'s field while it shows a suggested completion; {item} is the whole suggestion.' },\n 'list.completeKey': { message: 'Tab', description: 'The key hint beside a suggested completion: the name of the key that accepts it, as printed on a keyboard.' },\n 'list.edit': { message: 'Edit {item}', description: 'An item\\'s edit button, and the name of its field while it is edited; {item} is its text.' },\n 'list.delete': { message: 'Delete {item}', description: 'An item\\'s delete button; {item} is its text.' },\n 'list.deleted': { message: 'Deleted {item}.', description: 'Announced after an item was deleted; {item} is its text.' },\n 'list.reorder': { message: 'Reorder {item}', description: 'An item\\'s drag handle (its name); {item} is its text.' },\n 'list.dragHint': { message: 'Drag to reorder, or use the arrow, Home and End keys', description: 'The drag handle\\'s tooltip.' },\n 'list.moved': { message: 'Moved {item} to position {position, number} of {count, number}.', description: 'Announced after an item moved; {item} is its text, {position} its new place and {count} the number of items.' },\n 'phone.label': { message: 'Phone number', description: 'The phone field\\'s name while it has no label.' },\n 'reference.label': { message: 'Message', description: 'The reference editor\\'s name while it has no label.' },\n 'reference.placeholder': { message: 'Write a comment…', description: 'The reference editor\\'s placeholder.' },\n 'reference.search': { message: 'Search tickets', description: 'The search for a reference to insert.' },\n 'reference.loadFailed': { message: 'Could not load the editor.', description: 'Said when the editor failed to load for a reason nobody named.' },\n 'reference.searchFailed': { message: 'Could not open search.', description: 'Said when the reference search failed to open for a reason nobody named.' },\n 'tags.placeholder': { message: 'Add tags...', description: 'The tag field\\'s placeholder.' },\n 'tags.remove': { message: 'Remove {tag}', description: 'A tag\\'s remove button; {tag} is the tag.' },\n 'tags.addTo': { message: 'Add to {label}', description: 'The field that adds to a list; {label} is the field\\'s label.' },\n 'tags.add': { message: 'Add tag', description: 'The field that adds a tag, while it has no label.' },\n 'tags.required': { message: 'At least one tag is required', description: 'Said on a required tag field that is empty.' },\n 'typelist.empty': { message: 'No tags yet', description: 'Said by an empty type list.' },\n 'typelist.add': { message: 'Add item', description: 'The field that adds an item, while it has no label.' },\n 'typelist.placeholder': { message: 'Type, press Enter to add it...', description: 'The type list\\'s placeholder.' },\n 'quantity.decrease': { message: 'Decrease quantity', description: 'The quantity selector\\'s minus button.' },\n 'quantity.increase': { message: 'Increase quantity', description: 'The quantity selector\\'s plus button.' },\n 'checkbox.name': { message: 'Checkbox', description: 'A checkbox\\'s name while it has no label.' },\n 'text.placeholder': { message: 'Enter text…', description: 'A text field\\'s placeholder while it has neither label nor placeholder.' },\n 'text.showPassword': { message: 'Show password', description: 'The button that shows the password.' },\n 'text.hidePassword': { message: 'Hide password', description: 'The button that hides the password.' },\n 'text.selectAll': { message: 'Select All', description: 'A text field\\'s context menu entry that selects all its text.' },\n 'textarea.required': { message: 'Enter a value.', description: 'Said on a required text area that is empty.' },\n 'textarea.invalid': { message: 'Check this value.', description: 'Said on a text area whose value was refused for a reason nobody named.' },\n\n // dees-input-richtext\n 'richtext.bold': { message: 'Bold (Ctrl+B)', description: 'Toolbar button, with its shortcut.' },\n 'richtext.italic': { message: 'Italic (Ctrl+I)', description: 'Toolbar button, with its shortcut.' },\n 'richtext.underline': { message: 'Underline (Ctrl+U)', description: 'Toolbar button, with its shortcut.' },\n 'richtext.strike': { message: 'Strikethrough', description: 'Toolbar button.' },\n 'richtext.h1': { message: 'Heading 1', description: 'Toolbar button.' },\n 'richtext.h2': { message: 'Heading 2', description: 'Toolbar button.' },\n 'richtext.h3': { message: 'Heading 3', description: 'Toolbar button.' },\n 'richtext.bulletList': { message: 'Bullet List', description: 'Toolbar button.' },\n 'richtext.orderedList': { message: 'Numbered List', description: 'Toolbar button.' },\n 'richtext.blockquote': { message: 'Quote', description: 'Toolbar button.' },\n 'richtext.code': { message: 'Code', description: 'Toolbar button: inline code.' },\n 'richtext.codeBlock': { message: 'Code Block', description: 'Toolbar button.' },\n 'richtext.link': { message: 'Add Link', description: 'Toolbar button.' },\n 'richtext.alignLeft': { message: 'Align Left', description: 'Toolbar button.' },\n 'richtext.alignCenter': { message: 'Align Center', description: 'Toolbar button.' },\n 'richtext.alignRight': { message: 'Align Right', description: 'Toolbar button.' },\n 'richtext.undo': { message: 'Undo (Ctrl+Z)', description: 'Toolbar button, with its shortcut.' },\n 'richtext.redo': { message: 'Redo (Ctrl+Y)', description: 'Toolbar button, with its shortcut.' },\n 'richtext.urlPlaceholder': { message: 'Enter URL...', description: 'The link field\\'s placeholder.' },\n 'richtext.url': { message: 'Link address', description: 'The link field\\'s name.' },\n 'richtext.referenceSearch': { message: 'Search to link', description: 'The search typing the reference trigger (#) opens in a text, for a record to link.' },\n 'richtext.kept': { message: 'Kept as written', description: 'The tooltip of Markdown the editor does not offer, such as a table or an image: shown as written and saved unchanged.' },\n 'richtext.words': { message: '{count, plural, one {# word} other {# words}}', description: 'The word count in the footer.' },\n\n // dees-input-profilepicture\n 'profilepicture.change': { message: 'Change profile picture', description: 'The picture button while a picture is set.' },\n 'profilepicture.choose': { message: 'Choose profile picture', description: 'The picture button while no picture is set.' },\n 'profilepicture.picture': { message: 'Profile picture', description: 'The picture\\'s text alternative.' },\n 'profilepicture.drop': { message: 'Drop image here', description: 'Said while an image is dragged over the picture.' },\n 'profilepicture.changeShort': { message: 'Change picture', description: 'The button beside the picture while one is set.' },\n 'profilepicture.chooseShort': { message: 'Choose picture', description: 'The button beside the picture while none is set.' },\n 'profilepicture.adjust': { message: 'Adjust Image', description: 'The cropping dialog\\'s heading.' },\n 'profilepicture.success': { message: 'Success', description: 'The cropping dialog\\'s heading once the picture is saved.' },\n 'profilepicture.instructions': { message: 'Position and resize the square to select your profile area', description: 'How to crop the picture.' },\n 'profilepicture.saving': { message: 'Saving...', description: 'Said while the cropped picture is saved.' },\n 'profilepicture.preview': { message: 'Cropped preview', description: 'The cropped picture\\'s text alternative.' },\n 'profilepicture.lookingGood': { message: 'Looking good!', description: 'Said once the picture is cropped.' },\n\n // dees-input-wysiwyg\n 'wysiwyg.htmlPlaceholder': { message: 'Enter HTML content...', description: 'The HTML block\\'s editor placeholder.' },\n 'wysiwyg.markdownPlaceholder': { message: 'Enter markdown content...', description: 'The Markdown block\\'s editor placeholder.' },\n 'wysiwyg.markdownFormatting': { message: 'Markdown formatting', description: 'The rich Markdown toolbar\\'s accessible name.' },\n 'wysiwyg.markdownSource': { message: 'Markdown source', description: 'The full Markdown source editor\\'s accessible name.' },\n 'wysiwyg.markdownSourceEdit': { message: 'Edit Markdown source', description: 'A raw Markdown region\\'s accessible name.' },\n 'wysiwyg.legacySource': { message: 'Edit {type} source', description: 'The accessible name for a structured legacy block shown as source in Markdown mode.' },\n 'wysiwyg.sourceView': { message: 'Source', description: 'Switches rich Markdown editing to source editing.' },\n 'wysiwyg.richView': { message: 'Rich view', description: 'Switches Markdown source editing to rich editing.' },\n 'wysiwyg.tableInsert': { message: 'Table', description: 'Inserts a Markdown table.' },\n 'wysiwyg.tableAddRow': { message: 'Add row', description: 'Adds a Markdown table row.' },\n 'wysiwyg.tableRemoveRow': { message: 'Remove row', description: 'Removes a Markdown table row.' },\n 'wysiwyg.tableAddColumn': { message: 'Add column', description: 'Adds a Markdown table column.' },\n 'wysiwyg.tableRemoveColumn': { message: 'Remove column', description: 'Removes a Markdown table column.' },\n 'wysiwyg.previewEmpty': { message: 'No content to preview', description: 'Said by an empty HTML or Markdown block\\'s preview.' },\n 'wysiwyg.attachments': { message: 'File Attachments', description: 'The attachment block\\'s heading.' },\n 'wysiwyg.addMoreFiles': { message: 'Add More Files', description: 'The attachment block\\'s button that adds files.' },\n 'wysiwyg.addFiles': { message: 'Click to add files', description: 'The empty attachment block\\'s prompt.' },\n 'wysiwyg.dragDrop': { message: 'or drag and drop', description: 'The hint below a prompt to add files or an image.' },\n 'wysiwyg.image': { message: 'Image', description: 'An image block\\'s name, and its text alternative while it has none.' },\n 'wysiwyg.uploadImage': { message: 'Click to upload an image', description: 'The empty image block\\'s prompt.' },\n 'wysiwyg.uploadingImage': { message: 'Uploading image...', description: 'Said while an image uploads.' },\n 'wysiwyg.youtubeUrl': { message: 'Enter YouTube URL', description: 'The empty video block\\'s prompt.' },\n 'wysiwyg.embedVideo': { message: 'Embed Video', description: 'The video block\\'s button that embeds the video.' },\n 'wysiwyg.copied': { message: 'Copied!', description: 'The code block\\'s copy button, once the code is copied.' },\n 'wysiwyg.paragraphPlaceholder': { message: 'Type \\'/\\' for commands...', description: 'The placeholder of an empty paragraph.' },\n 'wysiwyg.quotePlaceholder': { message: 'Add a quote...', description: 'The placeholder of an empty quote.' },\n 'wysiwyg.heading': { message: 'Heading', description: 'The placeholder of an empty heading of another level.' },\n 'wysiwyg.block.paragraph': { message: 'Paragraph', description: 'A block type in the slash menu.' },\n 'wysiwyg.block.divider': { message: 'Divider', description: 'A block type in the slash menu.' },\n 'wysiwyg.block.youtube': { message: 'YouTube', description: 'A block type in the slash menu: an embedded YouTube video.' },\n 'wysiwyg.block.attachment': { message: 'File Attachment', description: 'A block type in the slash menu.' },\n 'wysiwyg.format.bold': { message: 'Bold', description: 'A formatting button.' },\n 'wysiwyg.format.italic': { message: 'Italic', description: 'A formatting button.' },\n 'wysiwyg.format.underline': { message: 'Underline', description: 'A formatting button.' },\n 'wysiwyg.format.code': { message: 'Inline Code', description: 'A formatting button.' },\n 'wysiwyg.format.link': { message: 'Link', description: 'A formatting button.' },\n 'wysiwyg.format.withShortcut': { message: '{label} ({shortcut})', description: 'A formatting button\\'s title with its shortcut; {label} is the button\\'s name.' },\n 'wysiwyg.changeType': { message: 'Change Type', description: 'A block\\'s context menu entry that changes its type.' },\n 'wysiwyg.deleteBlock': { message: 'Delete Block', description: 'A block\\'s context menu entry that deletes it.' },\n 'wysiwyg.selectLanguage': { message: 'Select Programming Language', description: 'The heading of the dialog that picks a code block\\'s language.' },\n 'wysiwyg.blockSettings': { message: 'Block Settings', description: 'The heading of a block\\'s settings dialog.' },\n 'wysiwyg.language': { message: 'Programming Language', description: 'The settings dialog\\'s heading over the languages.' },\n 'wysiwyg.blockType': { message: 'Block Type', description: 'The settings dialog\\'s heading over the block types.' },\n 'wysiwyg.formatting': { message: 'Formatting', description: 'The HTML editor toolbar\\'s accessible name.' },\n 'wysiwyg.undo': { message: 'Undo', description: 'The editor toolbar\\'s button that undoes the last change.' },\n 'wysiwyg.redo': { message: 'Redo', description: 'The editor toolbar\\'s button that redoes the change last undone.' },\n 'wysiwyg.characters': { message: '{count, plural, one {# character} other {# characters}}', description: 'The character count in the editor\\'s footer.' },\n 'wysiwyg.search': { message: 'Search in document', description: 'The editor footer\\'s search field: its placeholder and accessible name.' },\n 'wysiwyg.searchMatch': { message: '{current, number} of {total, number}', description: 'Which search match is selected, out of how many, in the editor\\'s footer.' },\n 'wysiwyg.searchNoMatches': { message: 'No matches', description: 'Said in the editor\\'s footer when the search finds nothing.' },\n 'wysiwyg.previousMatch': { message: 'Previous match', description: 'The editor footer\\'s button that selects the previous search match.' },\n 'wysiwyg.nextMatch': { message: 'Next match', description: 'The editor footer\\'s button that selects the next search match.' },\n 'wysiwyg.clearSearch': { message: 'Clear search', description: 'The editor footer\\'s button that empties the search.' },\n 'wysiwyg.blockActions': { message: 'Block actions', description: 'The handle beside a block that opens its actions menu (its accessible name).' },\n 'wysiwyg.addBlockBelow': { message: 'Add block below', description: 'A block\\'s context menu entry that starts a new, empty block after it.' },\n 'wysiwyg.duplicateBlock': { message: 'Duplicate', description: 'A block\\'s context menu entry that inserts a copy of it after it.' },\n 'wysiwyg.moveBlockUp': { message: 'Move up', description: 'A block\\'s context menu entry that swaps it with the block before it.' },\n 'wysiwyg.moveBlockDown': { message: 'Move down', description: 'A block\\'s context menu entry that swaps it with the block after it.' },\n 'wysiwyg.copyMarkdown': { message: 'Copy as Markdown', description: 'A block\\'s context menu entry that copies its Markdown source.' },\n\n // dees-dataview-codebox\n 'codebox.copyDiff': { message: 'Copy Unified Diff', description: 'The code box\\'s context menu entry that copies the diff.' },\n 'codebox.codeCopied': { message: 'Code copied', description: 'The code box\\'s copy button once the code is on the clipboard (its accessible name and tooltip).' },\n 'codebox.diffLayout': { message: 'Diff layout', description: 'The toggle between an inline and a split diff (its name).' },\n 'codebox.inline': { message: 'Inline', description: 'The diff shown in one column.' },\n 'codebox.split': { message: 'Split', description: 'The diff shown side by side.' },\n 'codebox.partial': { message: 'Partial diff', description: 'A footer note: the diff is not complete.' },\n 'codebox.unparseable': { message: 'Diff format unavailable', description: 'A footer note: the diff could not be read.' },\n 'codebox.binaryFiles': { message: '{count, plural, one {# binary file} other {# binary files}}', description: 'A footer note: how many binary files the diff touches.' },\n 'codebox.metadataOnly': { message: 'Metadata-only diff', description: 'A footer note: the diff changes metadata only.' },\n 'codebox.noSections': { message: 'The diff has no displayable file sections.', description: 'Said by a diff with nothing to show.' },\n 'codebox.unscoped': { message: 'Unscoped patch', description: 'The heading of a diff section that names no file.' },\n 'codebox.newFile': { message: 'New file · mode {mode}', description: 'A file\\'s diff note: the file is new; {mode} is its file mode.' },\n 'codebox.deletedFile': { message: 'Deleted file · mode {mode}', description: 'A file\\'s diff note: the file is deleted; {mode} is its file mode.' },\n 'codebox.renamed': { message: 'Renamed', description: 'A file\\'s diff note: the file is renamed.' },\n 'codebox.copied': { message: 'Copied', description: 'A file\\'s diff note: the file is a copy.' },\n 'codebox.modeChange': { message: 'Mode {from} → {to}', description: 'A file\\'s diff note: its file mode changed.' },\n 'codebox.similar': { message: '{value} similar', description: 'A file\\'s diff note: how similar it is to its source; {value} is a percentage.' },\n 'codebox.dissimilar': { message: '{value} dissimilar', description: 'A file\\'s diff note: how different it is from its source; {value} is a percentage.' },\n 'codebox.binaryChange': { message: 'Binary change', description: 'A file\\'s diff note: a binary file changed.' },\n 'codebox.binaryHidden': { message: 'Binary content is not shown.', description: 'Said in place of a binary file\\'s changes.' },\n 'codebox.noLineChanges': { message: 'No textual line changes.', description: 'Said by a file section without changed lines.' },\n 'codebox.before': { message: 'Before', description: 'The split diff\\'s left side.' },\n 'codebox.after': { message: 'After', description: 'The split diff\\'s right side.' },\n 'codebox.unchanged': { message: '{count, plural, one {# unchanged line} other {# unchanged lines}}', description: 'The button that shows hidden unchanged lines.' },\n\n // dees-dataview-statusobject\n 'statusobject.name': { message: 'Service status', description: 'The status card\\'s heading while the status names no service.' },\n 'statusobject.ok': { message: 'Healthy', description: 'A status: everything works.' },\n 'statusobject.partlyOk': { message: 'Needs attention', description: 'A status: something needs looking at.' },\n 'statusobject.notOk': { message: 'Unavailable', description: 'A status: the service does not work.' },\n 'statusobject.unreported': { message: 'Status not reported', description: 'Said when a check reports no status.' },\n 'statusobject.copyJson': { message: 'Copy status as JSON', description: 'The button that copies the status (its accessible name).' },\n 'statusobject.copiedJson': { message: 'Copied status JSON', description: 'That button once the status is copied.' },\n 'statusobject.copyJsonShort': { message: 'Copy JSON', description: 'That button\\'s text.' },\n 'statusobject.copied': { message: 'Copied', description: 'That button\\'s text once the status is copied.' },\n 'statusobject.detailMenu': { message: 'Copy options for {name}', description: 'A check\\'s menu button; {name} is the check\\'s name.' },\n 'statusobject.detailMenuAt': { message: 'Copy options for detail {position, number}', description: 'A check\\'s menu button while the check has no name.' },\n 'statusobject.noDetails': { message: 'No detail checks reported.', description: 'Said when the status has no checks.' },\n 'statusobject.noService': { message: 'Connect a service to see its health and checks.', description: 'Said while no status is shown.' },\n 'statusobject.updated': { message: 'Updated <time>{when}</time>', description: 'When the status was last updated; {when} is a date and time, marked up as a time.' },\n 'statusobject.noUpdate': { message: 'No update time reported', description: 'Said when the status names no update time.' },\n 'statusobject.copyValue': { message: 'Copy value', description: 'A check\\'s menu entry.' },\n 'statusobject.copyKey': { message: 'Copy key', description: 'A check\\'s menu entry.' },\n 'statusobject.copyBoth': { message: 'Copy key and value', description: 'A check\\'s menu entry.' },\n 'statusobject.valueCopied': { message: '{name} value copied', description: 'Said once a check\\'s value is copied; {name} is the check.' },\n 'statusobject.keyCopied': { message: '{name} key copied', description: 'Said once a check\\'s key is copied.' },\n 'statusobject.bothCopied': { message: '{name} key and value copied', description: 'Said once a check\\'s key and value are copied.' },\n 'statusobject.copyFailed': { message: 'Could not copy. Check clipboard access and try again.', description: 'Said when the clipboard refused.' },\n 'statusobject.jsonCopied': { message: 'Status JSON copied', description: 'Said once the status is copied.' },\n\n // dees-statsgrid\n 'statsgrid.empty': { message: 'No metrics available yet.', description: 'Said by a stats grid without tiles.' },\n 'statsgrid.actions': { message: 'Actions for {title}', description: 'A tile\\'s menu button; {title} is the tile\\'s title.' },\n 'statsgrid.core': { message: 'Core {core}: {usage}', description: 'A CPU core bar\\'s tooltip; {core} is its name, {usage} its load.' },\n 'statsgrid.used': { message: 'Used', description: 'A disk partition\\'s used space.' },\n 'statsgrid.free': { message: 'Free', description: 'A disk partition\\'s free space.' },\n 'statsgrid.read': { message: 'Read', description: 'A disk\\'s read operations.' },\n 'statsgrid.write': { message: 'Write', description: 'A disk\\'s write operations.' },\n 'statsgrid.health': { message: 'Health', description: 'A disk\\'s health.' },\n\n // dees-storage-browser (columns, list, preview)\n 'storage.copyPath': { message: 'Copy Path', description: 'Context menu entry that copies an item\\'s path.' },\n 'storage.moveTo': { message: 'Move to...', description: 'Context menu entry that moves an item to a folder to choose.' },\n 'storage.newFolderInside': { message: 'New Folder Inside', description: 'A folder\\'s context menu entry.' },\n 'storage.newFileInside': { message: 'New File Inside', description: 'A folder\\'s context menu entry.' },\n 'storage.uploadFiles': { message: 'Upload Files...', description: 'Context menu entry that uploads files.' },\n 'storage.uploadFolder': { message: 'Upload Folder...', description: 'Context menu entry that uploads a folder.' },\n 'storage.deleteFolder': { message: 'Delete Folder', description: 'A folder\\'s context menu entry.' },\n 'storage.newFolder': { message: 'New Folder', description: 'Context menu entry that creates a folder.' },\n 'storage.newFile': { message: 'New File', description: 'Context menu entry that creates a file.' },\n 'storage.confirmDeleteFolder': { message: 'Delete folder \"{name}\" and all its contents?', description: 'The question before a folder is deleted.' },\n 'storage.confirmDeleteFile': { message: 'Delete file \"{name}\"?', description: 'The question before a file is deleted.' },\n 'storage.moveFailed': { message: 'Move operation failed', description: 'Said when a move failed for a reason nobody named.' },\n 'storage.nameUnchanged': { message: 'Name is the same as current', description: 'Said when a rename keeps the name.' },\n 'storage.nameEmpty': { message: 'Name cannot be empty', description: 'Said when a rename leaves no name.' },\n 'storage.nameSlash': { message: 'Name cannot contain \"/\"', description: 'Said when a new name has a slash.' },\n 'storage.renameFailed': { message: 'Rename failed', description: 'Said when a rename failed for a reason nobody named.' },\n 'storage.renameFolder': { message: 'Rename Folder', description: 'The rename dialog\\'s heading for a folder.' },\n 'storage.renameFile': { message: 'Rename File', description: 'The rename dialog\\'s heading for a file.' },\n 'storage.location': { message: 'Location: {path}', description: 'Where an item is; {path} is the folder path.' },\n 'storage.renaming': { message: 'Renaming...', description: 'The rename button while renaming.' },\n 'storage.move': { message: 'Move', description: 'The move dialog\\'s name and its confirming button.' },\n 'storage.moveFolder': { message: 'Move Folder', description: 'The move dialog\\'s heading for a folder.' },\n 'storage.moveFile': { message: 'Move File', description: 'The move dialog\\'s heading for a file.' },\n 'storage.from': { message: 'From:', description: 'The move dialog: where the item is now.' },\n 'storage.to': { message: 'To:', description: 'The move dialog: where the item goes.' },\n 'storage.moving': { message: 'Moving...', description: 'The move button while moving.' },\n 'storage.chooseDestination': { message: 'Choose destination', description: 'The folder picker dialog\\'s name.' },\n 'storage.moveNameTo': { message: 'Move \"{name}\" to...', description: 'The folder picker\\'s heading; {name} is the item.' },\n 'storage.noSubfolders': { message: 'No subfolders', description: 'Said by a folder without subfolders in the picker.' },\n 'storage.moveHere': { message: 'Move Here', description: 'The folder picker\\'s confirming button.' },\n 'storage.createFolder': { message: 'Create New Folder', description: 'The create dialog\\'s heading for a folder.' },\n 'storage.createFile': { message: 'Create New File', description: 'The create dialog\\'s heading for a file.' },\n 'storage.folderPlaceholder': { message: 'folder-name or path/to/folder', description: 'The folder name field\\'s placeholder.' },\n 'storage.filePlaceholder': { message: 'filename.txt or path/to/file.txt', description: 'The file name field\\'s placeholder.' },\n 'storage.nestedFolderHint': { message: 'Use \"/\" to create nested folders (e.g., parent/child)', description: 'How to create nested folders.' },\n 'storage.nestedFileHint': { message: 'Use \"/\" to create nested path (e.g., folder/file.txt)', description: 'How to create a file in nested folders.' },\n 'storage.loadFailed': { message: 'Unable to load files. Try again.', description: 'Said when the file list failed to load.' },\n 'storage.openFailed': { message: 'Unable to open this folder. Try again.', description: 'Said when a folder failed to open.' },\n 'storage.columnWidth': { message: 'Column width', description: 'A column\\'s resize handle.' },\n 'storage.emptyFolder': { message: 'Empty folder', description: 'Said by an empty folder.' },\n 'storage.actionsFor': { message: 'Actions for {name}', description: 'An item\\'s menu button; {name} is the item.' },\n 'storage.moveInto': { message: 'Move to {name}', description: 'The drop hint while dragging an item over a folder.' },\n 'storage.moveHereHint': { message: 'Move here', description: 'The drop hint while dragging an item over a column.' },\n 'storage.dropInto': { message: 'Drop to upload into {name}', description: 'The drop hint while dragging files over a folder.' },\n 'storage.dropHere': { message: 'Drop to upload here', description: 'The drop hint while dragging files over a column.' },\n 'storage.uploading': { message: 'Uploading...', description: 'Said while files upload.' },\n 'storage.uploadProgress': { message: '{current, number} / {total, number} files', description: 'Upload progress.' },\n 'storage.moveIntoItself': { message: 'Cannot move a folder into itself', description: 'Said when a folder would move into itself.' },\n 'storage.alreadyThere': { message: 'Item is already in this location', description: 'Said when an item would move where it is.' },\n 'storage.filter': { message: 'Filter files', description: 'The list\\'s filter field (its name).' },\n 'storage.filterPlaceholder': { message: 'Filter files…', description: 'The list\\'s filter field placeholder.' },\n 'storage.createAny': { message: 'Create file or folder', description: 'The list\\'s add button.' },\n 'storage.noObjects': { message: 'No objects found', description: 'Said by an empty list.' },\n 'storage.size': { message: 'Size', description: 'The list\\'s size column.' },\n 'storage.notFound': { message: 'Object not found', description: 'Said when a file to preview does not exist.' },\n 'storage.loadObjectFailed': { message: 'Failed to load object', description: 'Said when a file to preview failed to load.' },\n 'storage.confirmDiscard': { message: 'Discard unsaved changes?', description: 'The question before unsaved edits are discarded.' },\n 'storage.decodeFailed': { message: 'Unable to decode content', description: 'Said in place of text that could not be decoded.' },\n 'storage.deleteFailed': { message: 'Unable to delete this file. Try again.', description: 'Said when a delete failed.' },\n 'storage.saveFailed': { message: 'Unable to save. Your edits are still available. Try again.', description: 'Said when a save failed.' },\n 'storage.unsaved': { message: 'Unsaved changes', description: 'The indicator of unsaved edits.' },\n 'storage.discard': { message: 'Discard', description: 'The button that discards edits.' },\n 'storage.saving': { message: 'Saving…', description: 'The save button while saving.' },\n 'storage.previewWidth': { message: 'Preview width', description: 'The preview\\'s resize handle.' },\n 'storage.path': { message: 'Storage path', description: 'The breadcrumb (a landmark name).' },\n 'storage.files': { message: 'Files', description: 'The root of the breadcrumb while the bucket has no name, and the back button.' },\n 'storage.live': { message: 'Live', description: 'The change stream is connected.' },\n 'storage.offline': { message: 'Offline', description: 'The change stream is not connected.' },\n 'storage.changes': { message: '{count, plural, one {# change} other {# changes}}', description: 'How many changes arrived recently.' },\n 'storage.view': { message: 'File view', description: 'The toggle between columns and list (its name).' },\n 'storage.columns': { message: 'Columns', description: 'The column view.' },\n 'storage.list': { message: 'List', description: 'The list view.' },\n 'storage.closePreview': { message: 'Close preview', description: 'The preview\\'s close button.' },\n 'preview.select': { message: 'Select a file to preview', description: 'Said while no file is chosen for the preview.' },\n\n // dees-actionfooter\n 'actionfooter.info': { message: 'More information', description: 'The name and tooltip of the info button at the leading end of an action footer, while its host names no subject for it.' },\n\n // dees-tile\n 'tile.info': { message: 'About this view', description: 'The accessible name and tooltip of the info button at the end of a tile\\'s footer, and of the speech bubble it opens, while the tile has no heading.' },\n 'tile.infoNamed': { message: 'About {heading}', description: 'The info button\\'s name on a tile with a heading; {heading} is the tile\\'s heading.' },\n // dees-table\n 'table.search': { message: 'Search rows', description: 'The table\\'s search field while the table names no data.' },\n 'table.searchNamed': { message: 'Search {name}', description: 'The table\\'s search field; {name} is what the rows are, in the host\\'s words.' },\n 'table.searchPlaceholder': { message: 'Search rows…', description: 'The search field\\'s placeholder while the table names no data.' },\n 'table.searchNamedPlaceholder': { message: 'Search {name}…', description: 'The search field\\'s placeholder; {name} is what the rows are.' },\n 'table.searchHint': { message: 'Search with words, field:value or field:[from TO to]; write dates as 2026-03-31 or 2026-03-31T14:30. Combine expressions with AND, OR and NOT, or exclude a word with a leading minus.', description: 'The search field\\'s tooltip; AND, OR, NOT and TO are operators and the dates are the accepted ISO forms: keep them as written.' },\n 'table.scopeTable': { message: 'Visible columns', description: 'A search scope: what the table shows.' },\n 'table.scopeData': { message: 'Original data', description: 'A search scope: the rows\\' data.' },\n 'table.scopeServer': { message: 'Server', description: 'A search scope: the server searches.' },\n 'table.filters': { message: 'Filters', description: 'The filter button at the end of the search field (its name and tooltip while no filter is active), and the speech bubble it opens.' },\n 'table.filtersActive': { message: '{count, plural, one {Filters, # active} other {Filters, # active}}', description: 'The filter button\\'s name and tooltip while {count} filters are active.' },\n 'table.filterByColumn': { message: 'Filter by column', description: 'The switch in the filter bubble that shows a filter field above each column.' },\n 'table.searchIn': { message: 'Search in', description: 'The filter bubble\\'s choice of where the search looks (the visible columns, the original data or the server).' },\n 'table.filterChip': { message: '{label}: {value}', description: 'An active filter\\'s chip: {label} is the filter\\'s or the column\\'s name, {value} the chosen option, day or text.' },\n 'table.filterChipOn': { message: '{label}: on', description: 'The chip of a switch filter that is on while it is off by default; {label} is its name.' },\n 'table.filterChipOff': { message: '{label}: off', description: 'The chip of a switch filter that is off while it is on by default; {label} is its name.' },\n 'table.searchChip': { message: 'Search: {query}', description: 'The active search\\'s chip; {query} is the search text.' },\n 'table.removeFilter': { message: 'Remove filter {filter}', description: 'A chip in the active-filter bar (its name); {filter} is the chip\\'s words.' },\n 'table.clearAll': { message: 'Clear all', description: 'The active-filter bar\\'s button that clears every filter and the search.' },\n 'table.activeFilters': { message: 'Active filters', description: 'The active-filter bar above the column headers (its name).' },\n 'table.filtersAnnounce': { message: '{count, plural, =0 {No filters active} one {# filter active} other {# filters active}}', description: 'Said to screen reader users after a filter changed.' },\n 'table.filterRemoved': { message: 'Filter removed: {filter}', description: 'Said to screen reader users after a chip removed its filter; {filter} is the chip\\'s words.' },\n 'table.filtersCleared': { message: 'Filters cleared', description: 'Said to screen reader users after every filter was cleared.' },\n 'table.info': { message: 'About this list', description: 'The accessible name and tooltip of the info button at the end of a table\\'s footer, and of the speech bubble it opens with the host\\'s explanation of the list.' },\n 'table.data': { message: 'Data', description: 'The table\\'s name while it has neither label nor data name.' },\n 'table.selectVisible': { message: 'Select visible rows', description: 'The header checkbox.' },\n 'table.filterPlaceholder': { message: 'Filter…', description: 'A column filter\\'s placeholder.' },\n 'table.filterColumn': { message: 'Filter {column}', description: 'A column filter (its name).' },\n 'table.rowMenu': { message: '{menu} for row {row, number}', description: 'A row\\'s menu button; {menu} is its name, {row} the row\\'s position.' },\n 'table.moreActions': { message: 'More actions', description: 'A row\\'s menu of further actions.' },\n 'table.showing': { message: '{total, plural, one {Showing {shown, number} of # row} other {Showing {shown, number} of # rows}}', description: 'The table\\'s footer while it names no data: {shown} rows are shown of {total}.' },\n 'table.showingNamed': { message: '{total, plural, one {Showing {shown, number} of # {nameOne}} other {Showing {shown, number} of # {name}}}', description: 'The table\\'s footer: {shown} rows are shown of {total}. {name} is what the rows are, in the host\\'s words for many, {nameOne} its word for one (the same plural noun when the host gave only that).' },\n 'table.selectedCount': { message: '{count, number} selected', description: 'The table\\'s footer: how many rows are selected.' },\n 'table.noMatches': { message: 'No matches', description: 'Said when nothing matches the search.' },\n 'table.noMatchesHint': { message: 'Try a different search or clear your filters.', description: 'The hint below that.' },\n 'table.empty': { message: 'No rows yet', description: 'Said by an empty table that names no data.' },\n 'table.emptyNamed': { message: 'No {name} yet', description: 'Said by an empty table; {name} is what the rows are.' },\n 'table.emptyHint': { message: 'New items will appear here.', description: 'The hint below that.' },\n 'table.clearFilters': { message: 'Clear filters', description: 'The button that clears search and filters.' },\n 'table.loading': { message: 'Loading rows…', description: 'Said by a table while its rows load and it names no data.' },\n 'table.loadingNamed': { message: 'Loading {name}…', description: 'Said by a table while its rows load; {name} is what the rows are.' },\n 'table.loadError': { message: 'Could not load the rows.', description: 'Said by a table whose rows failed to load and that names no data.' },\n 'table.loadErrorNamed': { message: 'Could not load {name}.', description: 'Said by a table whose rows failed to load; {name} is what the rows are.' },\n 'table.replaceSortHeading': { message: 'Replace multi-column sort?', description: 'The heading of the dialog before a sort over several columns is replaced.' },\n 'table.replaceSortActive': { message: '{count, plural, one {You currently have a #-column sort active:} other {You currently have a #-column sort active:}}', description: 'That dialog\\'s first line.' },\n 'table.replaceSortQuestion': { message: 'Continuing will discard the cascade and replace it with a single sort on <strong>{column}</strong>.', description: 'That dialog\\'s question; {column} is the column clicked.' },\n 'table.replace': { message: 'Replace', description: 'That dialog\\'s confirming button.' },\n 'table.sortAscending': { message: 'Sort Ascending', description: 'A column\\'s menu entry.' },\n 'table.sortDescending': { message: 'Sort Descending', description: 'A column\\'s menu entry.' },\n 'table.sortByColumn': { message: 'Sort by {column}', description: 'A column\\'s menu entry for a hidden column whose value the column shows beneath its own; {column} is the hidden column\\'s name.' },\n 'table.setSortSlot': { message: 'Set as {slot, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} sort', description: 'A column\\'s menu entry that makes it the n-th sort key.' },\n 'table.ascending': { message: 'Ascending', description: 'A sort direction.' },\n 'table.descending': { message: 'Descending', description: 'A sort direction.' },\n 'table.appendSort': { message: 'Append to sort', description: 'A column\\'s menu entry that adds it as the last sort key.' },\n 'table.removeSort': { message: 'Remove from sort', description: 'A column\\'s menu entry.' },\n 'table.clearSorts': { message: 'Clear all sorts', description: 'A column\\'s menu entry.' },\n 'table.showFilters': { message: 'Show column filters', description: 'A column\\'s menu entry.' },\n 'table.hideFilters': { message: 'Hide column filters', description: 'A column\\'s menu entry.' },\n 'table.copyRow': { message: 'Copy row as JSON', description: 'A row\\'s context menu entry.' },\n 'table.copyRows': { message: 'Copy {count, number} rows as JSON', description: 'A row\\'s context menu entry while several rows are selected.' },\n\n // media viewers: dees-audio-viewer, dees-video-viewer, dees-image-viewer, dees-pdf-viewer\n 'media.play': { message: 'Play', description: 'A player\\'s button that starts playback.' },\n 'media.pause': { message: 'Pause', description: 'A player\\'s button that pauses playback.' },\n 'media.loop': { message: 'Loop', description: 'A player\\'s toggle that repeats the track.' },\n 'media.mute': { message: 'Mute', description: 'A player\\'s button that mutes the sound.' },\n 'media.unmute': { message: 'Unmute', description: 'A player\\'s button that turns the sound back on.' },\n 'media.volume': { message: 'Volume', description: 'A player\\'s volume slider.' },\n 'media.position': { message: 'Playback position', description: 'A player\\'s slider that seeks in the track.' },\n 'media.fullscreen': { message: 'Fullscreen', description: 'The video player\\'s button that shows the video on the full screen.' },\n 'media.exitFullscreen': { message: 'Exit fullscreen', description: 'The video player\\'s button while the video is on the full screen.' },\n 'media.playFailed': { message: 'Playback could not start. Try again.', description: 'Said when the browser refused to start playback.' },\n 'media.exitFullscreenFailed': { message: 'Could not exit fullscreen.', description: 'Said when leaving the full screen failed.' },\n 'media.fullscreenUnavailable': { message: 'Fullscreen is unavailable.', description: 'Said when the browser refused the full screen.' },\n 'media.zoomIn': { message: 'Zoom in', description: 'A viewer\\'s button that enlarges the view.' },\n 'media.zoomOut': { message: 'Zoom out', description: 'A viewer\\'s button that shrinks the view.' },\n 'media.resetZoom': { message: 'Reset zoom', description: 'A viewer\\'s button, showing the zoom level, that resets it to 100 %.' },\n 'audioviewer.loading': { message: 'Loading audio', description: 'The spinner while an audio file loads.' },\n 'audioviewer.loadFailed': { message: 'Could not load this audio file.', description: 'Said in place of an audio file that failed to load.' },\n 'audioviewer.waveformUnavailable': { message: 'Waveform unavailable. Playback controls are still available.', description: 'Said when the waveform could not be drawn.' },\n 'videoviewer.loading': { message: 'Loading video', description: 'The spinner while a video loads.' },\n 'videoviewer.loadFailed': { message: 'Could not load this video file.', description: 'Said in place of a video that failed to load.' },\n 'imageviewer.size': { message: 'Image size', description: 'The toggle between fitting the image and its actual size.' },\n 'imageviewer.fit': { message: 'Fit', description: 'That toggle\\'s option that fits the image into the view.' },\n 'imageviewer.actual': { message: 'Actual', description: 'That toggle\\'s option that shows the image at its actual size.' },\n 'imageviewer.loadFailed': { message: 'Failed to load image', description: 'Said in place of an image that failed to load.' },\n 'pdfviewer.view': { message: 'PDF view', description: 'The toggle between the document and the gallery of pages.' },\n 'pdfviewer.document': { message: 'Document', description: 'That toggle\\'s option that shows the document page by page.' },\n 'pdfviewer.gallery': { message: 'Gallery', description: 'That toggle\\'s option that shows all pages side by side.' },\n 'pdfviewer.pageNumber': { message: 'Page number', description: 'The field that shows and sets the current page.' },\n 'pdfviewer.fitPage': { message: 'Fit to page', description: 'The button that fits a whole page into the view.' },\n 'pdfviewer.fitWidth': { message: 'Fit to width', description: 'The button that fits the page width into the view.' },\n 'pdfviewer.showThumbnails': { message: 'Show thumbnails', description: 'The button that shows the page thumbnails.' },\n 'pdfviewer.hideThumbnails': { message: 'Hide thumbnails', description: 'The button that hides the page thumbnails.' },\n 'pdfviewer.print': { message: 'Print', description: 'The toolbar\\'s button that prints the PDF.' },\n 'pdfviewer.pages': { message: 'Pages', description: 'The heading over the page thumbnails.' },\n 'pdfviewer.pageCount': { message: '{count, plural, one {# page} other {# pages}}', description: 'The heading over the gallery: the number of pages.' },\n 'pdfviewer.closeThumbnails': { message: 'Close page thumbnails', description: 'The button that closes the page thumbnails.' },\n 'pdfviewer.documentName': { message: 'PDF document', description: 'The scrolling area that shows the PDF\\'s pages (its accessible name).' },\n 'pdfviewer.loading': { message: 'Loading PDF...', description: 'Said while the PDF loads.' },\n 'pdfviewer.zoom': { message: 'Zoom {zoom}', description: 'The footer\\'s zoom level; {zoom} is a formatted percentage.' },\n 'pdfviewer.pageOf': { message: 'Page {current, number} of {total, number}', description: 'The footer\\'s position in the document.' },\n 'pdfviewer.loadFailed': { message: 'Could not open this PDF.', description: 'Said in place of a PDF that failed to load.' },\n 'pdfviewer.printTitle': { message: 'Print PDF', description: 'The title of the window that prints the PDF, and the context menu entry that opens it.' },\n 'pdfviewer.downloadPdf': { message: 'Download PDF', description: 'A context menu entry that downloads the PDF.' },\n\n // thumbnails\n 'thumbnail.preview': { message: '{kind, select, pdf {PDF preview} image {Image preview} audio {Audio preview} video {Video preview} note {Note preview} folder {Folder preview} other {Preview}}', description: 'A thumbnail\\'s accessible name while it has neither label nor title; {kind} is its kind.' },\n 'thumbnail.previewAny': { message: 'Preview', description: 'A thumbnail\\'s accessible name while it has neither label nor title and is of no known kind.' },\n 'thumbnail.loadFailed': { message: 'Failed to load', description: 'Said on a thumbnail whose content failed to load.' },\n 'thumbnail.untitledFolder': { message: 'Untitled Folder', description: 'A folder thumbnail\\'s name while it has none.' },\n 'thumbnail.items': { message: '{count, plural, one {# item} other {# items}}', description: 'A folder thumbnail\\'s number of items.' },\n 'thumbnail.lines': { message: '{count, plural, one {# line} other {# lines}}', description: 'A note thumbnail\\'s number of lines.' },\n 'thumbnail.lineRange': { message: 'Line {first, number}–{last, number} of {total, number}', description: 'A note thumbnail\\'s visible lines while the pointer scrolls it.' },\n 'thumbnail.pagesShort': { message: '{count, number} pg', description: 'A PDF thumbnail\\'s page count, abbreviated.' },\n 'thumbnail.viewPdf': { message: 'View PDF', description: 'A PDF thumbnail\\'s context menu entry that opens the PDF.' },\n 'thumbnail.openPdfTab': { message: 'Open PDF in New Tab', description: 'A PDF thumbnail\\'s context menu entry.' },\n 'thumbnail.copyPdfUrl': { message: 'Copy PDF URL', description: 'A PDF thumbnail\\'s context menu entry.' },\n 'thumbnail.pageCount': { message: '{count, plural, one {# page} other {# pages}}', description: 'A PDF thumbnail\\'s context menu line that states its page count.' },\n\n // dees-preview\n 'preview.kind': { message: '{kind, select, image {Image} pdf {PDF} audio {Audio} video {Video} code {Source} text {Text} unknown {File} other {File}}', description: 'The kind of file the preview shows, beside its name.' },\n 'preview.openFailed': { message: 'Unable to open this file', description: 'The heading over why a file could not be opened.' },\n 'preview.opening': { message: 'Opening preview…', description: 'Said while the preview loads.' },\n 'preview.selectHint': { message: 'Images, documents, audio, video, and source files.', description: 'The hint below the empty preview: what it can show.' },\n 'preview.unavailable': { message: 'Preview not available', description: 'Said for a file type the preview cannot show.' },\n 'preview.unavailableHint': { message: 'This file type can’t be displayed here.', description: 'The hint below that.' },\n 'preview.loadFailed': { message: 'Could not load this file.', description: 'Said when a file failed to load for a reason nobody named.' },\n 'preview.httpFailed': { message: 'Could not load this file (HTTP {status}).', description: 'Said when the server refused the file; {status} is the HTTP status code.' },\n\n // kanban: dees-kanban, dees-kanban-column, dees-kanban-card, dees-kanban-ticket-detail, dees-kanban-discussion\n 'kanban.board': { message: 'Board', description: 'The board\\'s heading while its host gives it none.' },\n 'kanban.totals': { message: '{tasks, plural, one {# task} other {# tasks}} · {epics, plural, one {# epic} other {# epics}}', description: 'The board\\'s totals beside its heading.' },\n 'kanban.search': { message: 'Search tickets', description: 'The board\\'s search field (its name).' },\n 'kanban.searchPlaceholder': { message: 'Search tickets…', description: 'The board\\'s search field (its placeholder).' },\n 'kanban.epic': { message: 'Epic', description: 'The epic a task belongs to: the board\\'s epic filter and a task\\'s field.' },\n 'kanban.allEpics': { message: 'All epics', description: 'The epic filter\\'s option that shows the tasks of every epic.' },\n 'kanban.openEpic': { message: 'Open epic', description: 'The button that opens the epic the board is filtered by.' },\n 'kanban.newTicket': { message: '{kind, select, epic {New epic} task {New task} subtask {New subtask} other {New ticket}}', description: 'The buttons that create a ticket, and the heading of the dialog that names it; {kind} is the kind of ticket.' },\n 'kanban.loading': { message: 'Loading board…', description: 'Said while the board loads.' },\n 'kanban.opening': { message: 'Opening ticket…', description: 'Said while a ticket opens.' },\n 'kanban.noColumns': { message: 'No columns configured.', description: 'Said by a board without columns.' },\n 'kanban.ticketUnavailable': { message: 'This ticket is unavailable or you do not have access.', description: 'Said when a ticket could not be opened.' },\n 'kanban.unknownColumn': { message: 'Unknown destination column.', description: 'Said when a ticket is moved to a column the board does not have.' },\n 'kanban.invalidTarget': { message: 'Invalid insertion target.', description: 'Said when a ticket is moved before a ticket it cannot stand before.' },\n 'kanban.moveNotReturned': { message: 'The move provider did not return the moved ticket.', description: 'Said when the host\\'s move did not answer with the moved ticket.' },\n 'kanban.invalidParent': { message: 'Choose a valid parent ticket.', description: 'Said when a ticket is saved with a parent it cannot have.' },\n 'kanban.invalidAssignee': { message: 'Choose an available assignee.', description: 'Said when a ticket is saved with a person who is not available.' },\n 'kanban.updateMismatch': { message: 'The update provider returned a different ticket.', description: 'Said when the host\\'s save answered with another ticket.' },\n 'kanban.ticketTitle': { message: 'Title', description: 'The field for a ticket\\'s title.' },\n 'kanban.moveUp': { message: 'Move up', description: 'A ticket\\'s move menu entry.' },\n 'kanban.moveDown': { message: 'Move down', description: 'A ticket\\'s move menu entry.' },\n 'kanban.moveTo': { message: 'Move to {column}', description: 'A ticket\\'s move menu entry; {column} is a column\\'s title.' },\n 'kanban.saving': { message: 'Saving…', description: 'Said on a ticket while it is saved.' },\n 'kanban.moveTicket': { message: 'Move ticket', description: 'A ticket\\'s button that opens its move menu.' },\n 'kanban.priority': { message: '{priority, select, none {None} low {Low} normal {Normal} high {High} urgent {Urgent} other {None}}', description: 'A ticket\\'s priority.' },\n 'kanban.unassigned': { message: 'Unassigned', description: 'Said for a ticket nobody is assigned to.' },\n 'kanban.subtasksComplete': { message: '{completed, number}/{total, number} subtasks complete', description: 'A task\\'s progress over its subtasks.' },\n 'kanban.addTaskTo': { message: 'Add task to {column}', description: 'A column\\'s button that creates a task in it.' },\n 'kanban.dropHere': { message: 'Drop ticket here', description: 'The gap where a dragged ticket will land.' },\n 'kanban.noTasks': { message: 'No tasks', description: 'Said by an empty column.' },\n 'kanban.kind': { message: '{kind, select, epic {Epic} task {Task} subtask {Subtask} other {Ticket}}', description: 'The kind of a ticket, on its detail.' },\n 'kanban.editTicket': { message: 'Edit ticket', description: 'The button that edits a ticket.' },\n 'kanban.description': { message: 'Description', description: 'The field for a ticket\\'s description.' },\n 'kanban.saveChanges': { message: 'Save changes', description: 'The button that saves a ticket\\'s changes, beside Cancel at the foot of its narrow fields column: keep it short.' },\n 'kanban.noDescription': { message: 'No description yet.', description: 'Said by a ticket without a description.' },\n 'kanban.status': { message: 'Status', description: 'A ticket\\'s column, as a field.' },\n 'kanban.priorityLabel': { message: 'Priority', description: 'A ticket\\'s priority, as a field.' },\n 'kanban.assignee': { message: 'Assignee', description: 'The person a ticket is assigned to, as a field.' },\n 'kanban.parentTask': { message: 'Parent task', description: 'The task a subtask belongs to, as a field.' },\n 'kanban.none': { message: 'None', description: 'The option for no epic.' },\n 'kanban.labels': { message: 'Labels', description: 'A ticket\\'s labels, as a field.' },\n 'kanban.noLabels': { message: 'No labels', description: 'A ticket\\'s labels field while the ticket has none.' },\n 'kanban.children': { message: '{kind, select, epic {Tasks} task {Subtasks} other {Subtasks}}', description: 'The heading over a ticket\\'s child tickets; {kind} is the ticket\\'s kind.' },\n 'kanban.addChild': { message: '{kind, select, epic {Add task} task {Add subtask} other {Add subtask}}', description: 'The button that creates a child ticket; {kind} is the ticket\\'s kind.' },\n 'kanban.noChildren': { message: '{kind, select, epic {No tasks yet.} task {No subtasks yet.} other {No subtasks yet.}}', description: 'Said by a ticket without child tickets; {kind} is the ticket\\'s kind.' },\n 'kanban.discussion': { message: 'Discussion', description: 'The heading over a ticket\\'s comments.' },\n 'kanban.refresh': { message: 'Refresh', description: 'The button that loads a ticket\\'s comments again.' },\n 'kanban.commentPlaceholder': { message: 'Write a comment — type # to link a ticket', description: 'The comment field\\'s placeholder; keep #, the character that links a ticket.' },\n 'kanban.readOnly': { message: 'Comments are read-only.', description: 'Said in place of the comment field when the reader cannot comment.' },\n 'kanban.commentMismatch': { message: 'The saved comment belongs to a different ticket.', description: 'Said when the host saved a comment to another ticket.' },\n 'kanban.activityMismatch': { message: 'The history belongs to a different ticket.', description: 'Said when the host answered a ticket\\'s history with another ticket\\'s entries.' },\n 'kanban.project': { message: 'Project', description: 'The project a ticket belongs to: the board\\'s project filter and a ticket\\'s field.' },\n 'kanban.allProjects': { message: 'All projects', description: 'The project filter\\'s option that shows the tasks of every project.' },\n 'kanban.noProject': { message: 'No project', description: 'A ticket\\'s project field while the ticket belongs to no project.' },\n 'kanban.projectRequired': { message: 'Every ticket belongs to a project.', description: 'Below the create dialog\\'s project field where the board requires one: why the dialog offers no \"No project\".' },\n 'kanban.label': { message: 'Label', description: 'The board\\'s label filter.' },\n 'kanban.allLabels': { message: 'All labels', description: 'The label filter\\'s option that shows tasks with any label.' },\n 'kanban.anyone': { message: 'Anyone', description: 'The assignee filter\\'s option that shows the tasks of every person.' },\n 'kanban.mine': { message: 'Assigned to me', description: 'The board\\'s switch filter that shows only the reader\\'s tasks, and its chip.' },\n 'kanban.filters': { message: 'Filters', description: 'The filter button at the end of the board\\'s search field (its name and tooltip while no filter is active), and the speech bubble it opens.' },\n 'kanban.filtersActive': { message: '{count, plural, one {Filters, # active} other {Filters, # active}}', description: 'The board\\'s filter button\\'s name and tooltip while {count} filters are active.' },\n 'kanban.filterChip': { message: '{label}: {value}', description: 'An active filter\\'s chip: {label} is the filter\\'s name, {value} the chosen option.' },\n 'kanban.searchChip': { message: 'Search: {query}', description: 'The board\\'s active search, as a chip; {query} is the search text.' },\n 'kanban.activeFilters': { message: 'Active filters', description: 'The active-filter bar below the board\\'s header (its name).' },\n 'kanban.removeFilter': { message: 'Remove filter {filter}', description: 'A chip in the board\\'s active-filter bar (its name); {filter} is the chip\\'s words.' },\n 'kanban.clearAll': { message: 'Clear all', description: 'The active-filter bar\\'s button that clears every filter and the search.' },\n 'kanban.clearFilters': { message: 'Clear filters', description: 'The filter bubble\\'s button that clears every filter.' },\n 'kanban.filterRemoved': { message: 'Filter removed: {filter}', description: 'Said to screen reader users after a chip removed its filter; {filter} is the chip\\'s words.' },\n 'kanban.filtersCleared': { message: 'Filters cleared', description: 'Said to screen reader users after every filter was cleared.' },\n 'kanban.createdStamp': { message: 'Created <time>{when}</time>', description: 'When a ticket was created, below its fields; {when} is the date and time.' },\n 'kanban.createdStampBy': { message: 'Created <time>{when}</time> <by>by {name}</by>', description: 'When and by whom a ticket was created, below its fields; {when} is the date and time, {name} the person.' },\n 'kanban.updatedStamp': { message: 'Updated <time>{when}</time>', description: 'When a ticket was last changed, below its fields; {when} is the date and time.' },\n 'kanban.updatedStampBy': { message: 'Updated <time>{when}</time> <by>by {name}</by>', description: 'When and by whom a ticket was last changed, below its fields; {when} is the date and time, {name} the person.' },\n 'kanban.labelsPlaceholder': { message: 'Add a label…', description: 'The labels field\\'s placeholder while a ticket is edited.' },\n 'kanban.links': { message: 'Links', description: 'The heading over a ticket\\'s links: its branches, commits, releases and pages.' },\n 'kanban.linkKind': { message: '{kind, select, branch {Branch} commit {Commit} release {Release} url {Link} other {Link}}', description: 'What a ticket\\'s link names, before its words for screen reader users; {kind} is its kind.' },\n 'kanban.source': { message: 'Source', description: 'The heading over the words a ticket was written from, while its host names them no other way.' },\n 'kanban.attachments': { message: 'Attachments', description: 'The files of a ticket\\'s source (the list\\'s name).' },\n 'kanban.history': { message: 'History', description: 'The heading over a ticket\\'s history, and the switch that shows it.' },\n 'kanban.feed': { message: 'Comments or history', description: 'The switch between a ticket\\'s comments and its history (its name).' },\n 'kanban.loadingHistory': { message: 'Loading history…', description: 'Said while a ticket\\'s history loads.' },\n 'kanban.noHistory': { message: 'No history yet.', description: 'Said by a ticket without history.' },\n 'kanban.activity': { message: '{action, select, created {created the ticket} updated {changed the ticket} moved {moved the ticket} reordered {changed the ticket’s position} commented {commented} linked {added a link} other {changed the ticket}}', description: 'What a person did to a ticket, after their name in its history; {action} is the kind of change.' },\n 'kanban.activityMoved': { message: 'moved the ticket from {from} to {to}', description: 'A move in a ticket\\'s history, after the person\\'s name; {from} and {to} are columns.' },\n 'kanban.activityLinked': { message: '{count, plural, one {added a link} other {added # links}}', description: 'Links added to a ticket, in its history, after the person\\'s name.' },\n 'kanban.parent': { message: 'Parent', description: 'The ticket a ticket belongs to, as a field in the ticket\\'s history.' },\n 'kanban.edited': { message: 'edited', description: 'A text field\\'s change in a ticket\\'s history, in place of the text before and after.' },\n 'kanban.changeTo': { message: '{before} → {after}', description: 'A field\\'s change in a ticket\\'s history: {before} is its value before, {after} its value after.' },\n 'kanban.listAdded': { message: 'added {items}', description: 'Labels or links a change added, in a ticket\\'s history; {items} is their list.' },\n 'kanban.listRemoved': { message: 'removed {items}', description: 'Labels or links a change removed, in a ticket\\'s history; {items} is their list.' },\n 'kanban.reloadTicket': { message: 'Reload ticket', description: 'The button that loads a ticket again after the server refused a save because someone changed the ticket meanwhile.' },\n 'kanban.conflictHint': { message: 'Reload the ticket to see the change. Your edits are kept, so you can apply them again.', description: 'Below the server\\'s reason, when it refused a save because the ticket changed meanwhile.' },\n 'kanban.yourEdit': { message: 'Your changes', description: 'The heading over the fields a person changed before their save was refused, kept to apply to the reloaded ticket.' },\n 'kanban.yourEditHint': { message: 'The form now shows the latest version. Apply the changes you still want.', description: 'Below \"Your changes\", after the ticket was loaded again.' },\n 'kanban.applyEdit': { message: 'Apply', description: 'The button that puts one kept change back into the edit.' },\n 'kanban.applyField': { message: 'Apply {field}', description: 'The accessible name of the button that puts one kept change back into the edit; {field} is the field\\'s name, as \"Title\".' },\n 'kanban.discardEdit': { message: 'Discard', description: 'The button that throws away the kept changes.' },\n 'kanban.collapseColumn': { message: 'Collapse {column}', description: 'A column\\'s button that folds it to a narrow lane; {column} is its title.' },\n 'kanban.expandColumn': { message: 'Expand {column}', description: 'A folded column\\'s button that shows it whole again; {column} is its title.' },\n 'kanban.showAll': { message: '{count, plural, one {Show # task} other {Show all # tasks}}', description: 'The button below a folded column\\'s newest tasks that shows the column whole; {count} is how many tasks it holds.' },\n 'kanban.titleRequired': { message: 'Enter a title.', description: 'Shown on the title field of the create dialog when it is confirmed empty.' },\n\n // dees-thread\n 'thread.timeline': { message: 'Conversation', description: 'The thread\\'s list of comments and events (its accessible name).' },\n 'thread.loading': { message: 'Loading the conversation…', description: 'Said while a thread without comments yet loads.' },\n 'thread.loadFailed': { message: 'Could not load the conversation.', description: 'Said when a thread failed to load.' },\n 'thread.empty': { message: 'No comments yet.', description: 'Said by a thread without comments or events.' },\n 'thread.justNow': { message: 'just now', description: 'When something in a thread happened, under 45 seconds ago.' },\n 'thread.on': { message: 'on {date}', description: 'When something in a thread happened, as a date in a sentence: \"closed this on {date}\"; {date} is the date and time.' },\n 'thread.edited': { message: 'edited', description: 'Marks a comment that was changed after it was posted.' },\n 'thread.editedOn': { message: 'Edited {date}', description: 'The tooltip of the \"edited\" mark; {date} is when the comment was last changed.' },\n 'thread.agent': { message: 'Agent', description: 'The badge of a comment an agent wrote.' },\n 'thread.system': { message: 'System', description: 'Who did something to a thread when no person or agent did: \"System closed this\".' },\n 'thread.onBehalfOf': { message: 'on behalf of {name}', description: 'Whom an agent wrote a comment or did something for; {name} is that person.' },\n 'thread.entryMenu': { message: 'Comment actions', description: 'The button that opens a comment\\'s menu.' },\n 'thread.posting': { message: 'Posting…', description: 'Said by a comment while it is posted.' },\n 'thread.answering': { message: 'Answering…', description: 'Said by an agent\\'s comment while the agent writes it.' },\n 'thread.notPosted': { message: 'Not posted', description: 'Said by a comment the server refused.' },\n 'thread.retry': { message: 'Retry', description: 'Posts a refused comment again.' },\n 'thread.discard': { message: 'Discard', description: 'Removes a refused comment.' },\n 'thread.hidden': { message: '{count, plural, one {# hidden item} other {# hidden items}}', description: 'The line that stands in for the middle of a long thread; {count} is how many comments and events it hides.' },\n 'thread.loadMore': { message: 'Load more…', description: 'Shows more of the hidden middle of a long thread.' },\n 'thread.comment': { message: 'Comment', description: 'The button that posts a comment.' },\n 'thread.composer': { message: 'Comment', description: 'The comment field\\'s name, for assistive technology.' },\n 'thread.placeholder': { message: 'Write a comment…', description: 'The comment field\\'s placeholder.' },\n 'thread.postFailed': { message: 'Could not post the comment.', description: 'Said when posting a comment failed for a reason nobody named.' },\n 'thread.attachments': { message: 'Attachments', description: 'The list of files below a comment (its accessible name).' },\n 'thread.composerInfo': { message: 'About this conversation', description: 'The name and tooltip of the info button in the comment field\\'s footer, which explains how the conversation works.' },\n 'thread.readOnly': { message: 'This conversation is read-only.', description: 'Said in place of the comment field when the reader cannot comment.' },\n 'thread.event.opened': { message: '<who>{actor}</who> opened this <at>{time}</at>', description: 'A thread\\'s event; {actor} did it, {time} is when (\"3 hours ago\", \"on {date}\"). Keep the tags.' },\n 'thread.event.answered': { message: '<who>{actor}</who> marked this as answered <at>{time}</at>', description: 'A thread\\'s event; {actor} did it, {time} is when. Keep the tags.' },\n 'thread.event.reopened': { message: '<who>{actor}</who> reopened this <at>{time}</at>', description: 'A thread\\'s event; {actor} did it, {time} is when. Keep the tags.' },\n 'thread.event.closed': { message: '<who>{actor}</who> closed this <at>{time}</at>', description: 'A thread\\'s event; {actor} did it, {time} is when. Keep the tags.' },\n 'thread.event.assigned': { message: '<who>{actor}</who> assigned <what>{subject}</what> <at>{time}</at>', description: 'A thread\\'s event; {actor} assigned the person {subject}, {time} is when. Keep the tags.' },\n 'thread.event.unassigned': { message: '<who>{actor}</who> unassigned <what>{subject}</what> <at>{time}</at>', description: 'A thread\\'s event; {actor} took the thread from the person {subject}, {time} is when. Keep the tags.' },\n 'thread.event.labelled': { message: '<who>{actor}</who> added the label <what>{subject}</what> <at>{time}</at>', description: 'A thread\\'s event; {actor} added the label {subject}, {time} is when. Keep the tags.' },\n 'thread.event.unlabelled': { message: '<who>{actor}</who> removed the label <what>{subject}</what> <at>{time}</at>', description: 'A thread\\'s event; {actor} removed the label {subject}, {time} is when. Keep the tags.' },\n 'thread.event.linked': { message: '<who>{actor}</who> linked <what>{subject}</what> <at>{time}</at>', description: 'A thread\\'s event; {actor} linked the record {subject}, {time} is when. Keep the tags.' },\n 'thread.event.referenced': { message: '<who>{actor}</who> mentioned this in <what>{subject}</what> <at>{time}</at>', description: 'A thread\\'s event; {actor} mentioned the thread in the record {subject}, {time} is when. Keep the tags.' },\n 'thread.event.renamed': { message: '<who>{actor}</who> changed the title to <what>{subject}</what> <at>{time}</at>', description: 'A thread\\'s event; {actor} renamed the thread to {subject}, {time} is when. Keep the tags.' },\n\n // dees-workspace\n 'workspace.defaultName': { message: 'Workspace', description: 'The workspace\\'s name while its host gives it none.' },\n 'workspace.toggleProblems': { message: 'Toggle problems', description: 'The toolbar\\'s button that shows or hides the problems panel.' },\n 'workspace.toggleTerminal': { message: 'Toggle terminal', description: 'The toolbar\\'s button that shows or hides the terminal panel.' },\n 'workspace.starting': { message: 'Starting…', description: 'The save state while the workspace starts.' },\n 'workspace.connectionFailed': { message: 'Connection failed', description: 'The save state when the workspace could not connect.' },\n 'workspace.notConnected': { message: 'Not connected', description: 'The save state while no environment is connected.' },\n 'workspace.unsaved': { message: '{count, number} unsaved', description: 'The save state: the number of files with unsaved changes.' },\n 'workspace.allSaved': { message: 'All changes saved', description: 'The save state when every file is saved.' },\n 'workspace.saveAll': { message: 'Save all files', description: 'The toolbar\\'s button that saves every changed file.' },\n 'workspace.toggleFiles': { message: 'Toggle files', description: 'The toolbar\\'s button that shows or hides the file tree.' },\n 'workspace.editorOptions': { message: 'Editor options', description: 'The toolbar\\'s button that opens the editor\\'s menu.' },\n 'workspace.loadingFiles': { message: 'Loading project files…', description: 'Said in the file panel while the files load.' },\n 'workspace.filesWhenConnected': { message: 'Project files appear when connected.', description: 'Said in the file panel while no environment is connected.' },\n 'workspace.resizeFiles': { message: 'Resize files panel', description: 'The file panel\\'s resize handle.' },\n 'workspace.closeFiles': { message: 'Close files', description: 'The backdrop that closes the file panel on a narrow screen.' },\n 'workspace.newFile': { message: 'New file', description: 'The tab bar\\'s button that creates a file.' },\n 'workspace.opening': { message: 'Opening your workspace', description: 'The heading while the workspace opens.' },\n 'workspace.openFailed': { message: 'Unable to open workspace', description: 'The heading when the workspace could not open.' },\n 'workspace.readyToConnect': { message: 'Your workspace, ready to connect', description: 'The heading while no environment is connected.' },\n 'workspace.preparing': { message: 'Preparing the project and its runtime.', description: 'The text below the heading while the workspace opens.' },\n 'workspace.connectHint': { message: 'Connect an execution environment to browse files and run commands.', description: 'The text below the heading while no environment is connected.' },\n 'workspace.emptyHeading': { message: 'Make something good.', description: 'The heading of the editor while no file is open.' },\n 'workspace.emptyHint': { message: 'Open a file from the explorer to start editing.', description: 'The text below that.' },\n 'workspace.browseFiles': { message: 'Browse files', description: 'The button that opens the file tree.' },\n 'workspace.resizeTerminal': { message: 'Resize terminal panel', description: 'The output panel\\'s resize handle.' },\n 'workspace.outputPanel': { message: 'Output panel', description: 'The toggle between the terminal and the problems.' },\n 'workspace.terminal': { message: 'Terminal', description: 'The output panel\\'s terminal.' },\n 'workspace.problems': { message: 'Problems', description: 'The output panel\\'s problems, while there are none.' },\n 'workspace.problemsCount': { message: 'Problems · {count, number}', description: 'The output panel\\'s problems, with their number.' },\n 'workspace.expandOutput': { message: 'Expand output panel', description: 'The button that expands the output panel.' },\n 'workspace.collapseOutput': { message: 'Collapse output panel', description: 'The button that collapses the output panel.' },\n 'workspace.startingRuntime': { message: 'Starting runtime…', description: 'Said in the terminal panel while the runtime starts.' },\n 'workspace.terminalNotConnected': { message: 'Terminal is not connected.', description: 'Said in the terminal panel while no environment is connected.' },\n 'workspace.edited': { message: 'Edited', description: 'The badge of an open file with unsaved changes.' },\n 'workspace.setupFailed': { message: 'Workspace setup failed with exit code {code}.', description: 'Said when the setup command failed; {code} is its exit code.' },\n 'workspace.setupCompleted': { message: 'Command completed with exit code: {code}', description: 'The last line of the setup command\\'s output; {code} is its exit code.' },\n 'workspace.changedOnDisk': { message: '\"{name}\" changed on disk. What do you want to do?', description: 'Asked when an open file with unsaved changes changed on disk; {name} is the file.' },\n 'workspace.loadFromDisk': { message: 'Load from Disk', description: 'That question\\'s answer that loads the file from disk.' },\n 'workspace.saveLocal': { message: 'Save Local to Disk', description: 'That question\\'s answer that saves the open version to disk.' },\n 'workspace.compare': { message: 'Compare', description: 'That question\\'s answer that compares both versions.' },\n 'workspace.openFileFailed': { message: 'Could not open {name}: {reason}', description: 'Said when a file could not be opened; {reason} is why.' },\n 'workspace.revealNoEnvironment': { message: 'Could not reveal {path}: the workspace has no environment.', description: 'Said when a path is shown while no environment is connected.' },\n 'workspace.revealNotFound': { message: 'Could not reveal {path}: it is not in this workspace.', description: 'Said when a path to show is not in the workspace.' },\n 'workspace.saveFailed': { message: 'Could not save {names}. Your edits are still open.', description: 'Said when files could not be saved; {names} lists them.' },\n 'workspace.saveConflict': { message: 'Could not save {names} because it changed elsewhere. Your edits are still open.', description: 'Said when a conditional save finds a newer file version; {names} lists affected files.' },\n 'workspace.autoSave': { message: 'Auto Save', description: 'The editor menu\\'s toggle that saves changes every two seconds.' },\n 'workspace.autoSaveOn': { message: '✓ Auto Save', description: 'That toggle while it is on.' },\n 'workspace.saveAllShort': { message: 'Save All', description: 'The editor menu\\'s entry that saves every changed file.' },\n 'workspace.noProblems': { message: 'No problems detected', description: 'Said by the problems panel while there are none.' },\n\n // dees-workspace-bottombar\n 'bottombar.runScript': { message: 'Run script', description: 'The bottom bar\\'s button that opens the list of package scripts.' },\n 'bottombar.scripts': { message: 'Scripts', description: 'That button\\'s text.' },\n 'bottombar.checking': { message: 'Checking...', description: 'The package widget, and its menu entry, while it checks for updates.' },\n 'bottombar.checkUpdates': { message: 'Check for updates', description: 'The package menu\\'s entry that checks for updates.' },\n 'bottombar.checkLabel': { message: 'check packages', description: 'The name of the terminal tab that checks the packages.' },\n 'bottombar.packageVersion': { message: '{name}: {current} → {latest}', description: 'A package menu entry that updates one package: its name, its version and the newest version.' },\n 'bottombar.more': { message: '... and {count, number} more', description: 'The package menu\\'s line for the packages not listed.' },\n 'bottombar.updateAll': { message: 'Update all packages', description: 'The package menu\\'s entry that updates every package.' },\n 'bottombar.updateLabel': { message: 'update {name}', description: 'The name of the terminal tab that updates a package.' },\n 'bottombar.updateAllLabel': { message: 'update all', description: 'The name of the terminal tab that updates every package.' },\n 'bottombar.upToDate': { message: 'Up to date', description: 'The package widget when no package has an update.' },\n 'bottombar.updates': { message: '{count, plural, one {# update} other {# updates}}', description: 'The package widget: the number of packages with an update.' },\n 'bottombar.checkFailed': { message: 'Check failed', description: 'The package widget when the check failed.' },\n 'bottombar.packages': { message: 'Packages', description: 'The package widget before the first check.' },\n 'bottombar.checkingHint': { message: 'Checking for package updates...', description: 'The package widget\\'s tooltip while it checks.' },\n 'bottombar.upToDateHint': { message: 'All packages are up to date', description: 'The package widget\\'s tooltip when no package has an update.' },\n 'bottombar.updatesHint': { message: '{count, plural, one {# package update available} other {# package updates available}}', description: 'The package widget\\'s tooltip when packages have updates.' },\n 'bottombar.checkFailedHint': { message: 'Failed to check for updates. Click to retry.', description: 'The package widget\\'s tooltip when the check failed.' },\n 'bottombar.checkHint': { message: 'Click to check for package updates', description: 'The package widget\\'s tooltip before the first check.' },\n 'bottombar.unknownVersion': { message: 'unknown', description: 'A package version the check did not report.' },\n\n // dees-workspace-diff-editor, dees-workspace-monaco, dees-workspace-markdownoutlet, dees-workspace-terminal-preview\n 'diffeditor.disk': { message: 'Disk Version', description: 'The comparison\\'s name for the version on disk, while its host names none.' },\n 'diffeditor.local': { message: 'Local Version', description: 'The comparison\\'s name for the version in the editor, while its host names none.' },\n 'diffeditor.file': { message: 'file', description: 'The comparison\\'s file name while it has no path.' },\n 'diffeditor.previous': { message: 'Previous', description: 'The button to the previous difference.' },\n 'diffeditor.next': { message: 'Next', description: 'The button to the next difference.' },\n 'diffeditor.useLocal': { message: 'Use Local', description: 'The button that keeps the version in the editor.' },\n 'diffeditor.useDisk': { message: 'Use Disk', description: 'The button that takes the version on disk.' },\n 'diffeditor.loadFailed': { message: 'The comparison could not load: {reason}', description: 'Said when the comparison editor failed to load; {reason} is why.' },\n 'monaco.loadFailed': { message: 'The editor could not load: {reason}', description: 'Said when the code editor failed to load; {reason} is why.' },\n 'markdownoutlet.heading': { message: 'Markdown Preview', description: 'The Markdown preview\\'s heading while it has no content.' },\n 'markdownoutlet.empty': { message: 'Content will appear here when markdown is parsed.', description: 'The text below that.' },\n 'terminalpreview.waiting': { message: 'Waiting…', description: 'The command line of the terminal preview while it has no command.' },\n 'terminalpreview.output': { message: 'Output of {command}', description: 'The terminal preview\\'s output (its name); {command} is the command.' },\n 'terminalpreview.outputUnnamed': { message: 'Command output', description: 'The terminal preview\\'s output (its name) while it has no command.' },\n\n // dees-workspace-filetree\n 'filetree.noEnvironment': { message: 'No execution environment provided.', description: 'Said by the file tree while it has no environment.' },\n 'filetree.loading': { message: 'Loading files...', description: 'Said while the file tree loads.' },\n 'filetree.files': { message: 'Files', description: 'The file tree\\'s heading.' },\n 'filetree.newFile': { message: 'New file', description: 'The button that creates a file, and the heading of the dialog that names it.' },\n 'filetree.newFolder': { message: 'New folder', description: 'The button that creates a folder, and the heading of the dialog that names it.' },\n 'filetree.empty': { message: 'No files found.', description: 'Said by an empty file tree.' },\n 'filetree.tree': { message: 'Project files', description: 'The file tree (its accessible name).' },\n 'filetree.menuNewFile': { message: 'New File', description: 'A folder\\'s context menu entry that creates a file in it.' },\n 'filetree.menuNewFolder': { message: 'New Folder', description: 'A folder\\'s context menu entry that creates a folder in it.' },\n 'filetree.duplicate': { message: 'Duplicate', description: 'A file\\'s context menu entry that copies it beside itself.' },\n 'filetree.singleName': { message: 'Use a single name without slashes.', description: 'Said when a new name holds a slash or is . or ..' },\n 'filetree.fileName': { message: 'File name', description: 'The field of the dialog that names a new file.' },\n 'filetree.folderName': { message: 'Folder name', description: 'The field of the dialog that names a new folder.' },\n 'filetree.exists': { message: 'An item with this name already exists.', description: 'Said when the new name is taken.' },\n 'filetree.safeTransferUnavailable': { message: 'This environment cannot safely copy or rename this item.', description: 'Said when an environment with versioned files lacks an atomic no-replace transfer.' },\n 'filetree.confirmDelete': { message: 'Delete {name}?', description: 'The question before an entry is deleted; {name} is the entry.' },\n 'filetree.newName': { message: 'New name', description: 'The field of the dialog that renames an entry.' },\n 'filetree.gone': { message: 'it no longer exists.', description: 'Why a paste failed: the copied entry is gone.' },\n 'filetree.operationFailed': { message: '{verb, select, delete {Could not delete {name}: {reason}} rename {Could not rename {name}: {reason}} duplicate {Could not duplicate {name}: {reason}} paste {Could not paste {name}: {reason}} other {Could not change {name}: {reason}}}', description: 'Said when a file tree operation failed; {name} is the entry, {reason} why.' },\n 'filetree.loadFailed': { message: 'Failed to load files: {reason}', description: 'Said when the file tree could not load; {reason} is why.' },\n\n // dees-workspace-terminal\n 'terminal.shell': { message: 'shell', description: 'The name of a shell session while the host names none.' },\n 'terminal.script': { message: 'script', description: 'The name of a script session while the host names none.' },\n 'terminal.update': { message: 'update', description: 'The name of a package update session while the host names none.' },\n 'terminal.updatePackage': { message: 'update {name}', description: 'The name of a session that updates one package.' },\n 'terminal.process': { message: 'process', description: 'The name of a process session while the host names none.' },\n 'terminal.couldNotRun': { message: '\"{label}\" could not run.', description: 'The bar of a session that could not run; {label} is its name.' },\n 'terminal.completed': { message: '\"{label}\" completed.', description: 'The bar of a session whose process completed.' },\n 'terminal.exited': { message: '\"{label}\" exited with code {code}.', description: 'The bar of a session whose process failed; {code} is its exit code.' },\n 'terminal.renameSession': { message: 'Rename session', description: 'The heading of the dialog that renames a session.' },\n 'terminal.sessionName': { message: 'Session name', description: 'That dialog\\'s field.' },\n 'terminal.sessionClosed': { message: 'This session has closed.', description: 'Said when a session closed while the dialog renamed it.' },\n 'terminal.sessions': { message: 'Sessions', description: 'The heading over the sessions.' },\n 'terminal.newTerminal': { message: 'New terminal', description: 'The button that opens a shell session.' },\n 'terminal.noEnvironment': { message: 'No execution environment', description: 'Said by the panel while it has no environment.' },\n 'terminal.noProcesses': { message: 'This environment runs no processes', description: 'Said by the panel when the environment runs no processes.' },\n 'terminal.noShell': { message: 'This environment offers no shell', description: 'Said by the panel when the environment has no shell.' },\n 'terminal.noSession': { message: 'No session open', description: 'Said by the panel while no session is open.' },\n 'terminal.startFailed': { message: 'Could not start a session: {reason}', description: 'Said when a session could not start; {reason} is why.' },\n 'terminal.startingEnvironment': { message: 'Starting the environment…', description: 'The line a session writes while the environment starts.' },\n 'terminal.processCompleted': { message: '[process completed]', description: 'The line a session writes after its process completed; keep the brackets.' },\n 'terminal.processExited': { message: '[process exited with code {code}]', description: 'The line a session writes after its process failed; keep the brackets.' },\n 'terminal.sessionFailed': { message: '[session failed: {reason}]', description: 'The line a session writes when it failed; keep the brackets.' },\n 'terminal.runAgain': { message: 'Run again', description: 'The ended session\\'s button that runs its command again.' },\n 'terminal.closeSession': { message: 'Close session', description: 'The ended session\\'s button that closes it.' },\n 'terminal.noEnvironmentError': { message: 'No execution environment available', description: 'Said when environment variables are set while no environment is connected.' },\n\n 'harness.subtaskChecking': { message: 'Checking subagent status…', description: 'A child status lookup is pending; the child lifecycle is unknown.' },\n 'harness.subtaskUnavailable': { message: 'Subagent status unavailable', description: 'A child status lookup failed, not the child itself.' },\n 'sidebar.unknownCount': { message: '{count, number} unknown', description: 'Calls whose child lifecycle is not confirmed.' },\n 'sidebar.unknown': { message: 'Status unknown', description: 'Subagents awaiting a confirmed lifecycle status.' },\n // harness: shared helpers\n 'harness.justNow': { message: 'just now', description: 'How long ago something happened, under 45 seconds.' },\n 'harness.readFailed': { message: 'Could not read {name}.', description: 'Said when an attached file could not be read.' },\n 'harness.file': { message: 'file', description: 'What {name} is in that message for a file without a name.' },\n 'harness.completed': { message: 'Completed', description: 'A terminal tool\\'s status when its command ran to its end with a failing exit code.' },\n 'harness.toolStatus': { message: '{status, select, pending {pending} running {running} completed {completed} stopped {stopped} error {error} other {unknown}}', description: 'A tool call\\'s status.' },\n 'harness.exitZero': { message: 'exit 0', description: 'A shell call\\'s summary part: its command exited with code 0.' },\n 'harness.lineCount': { message: '{count, plural, one {# line} other {# lines}}', description: 'A shell call\\'s summary part: how many lines of output came back.' },\n 'harness.noOutput': { message: 'no output', description: 'A shell call\\'s summary part: nothing came back.' },\n\n // harness: the built-in tool descriptors\n 'harnesstool.shell': { message: 'Shell', description: 'The name of a shell command call.' },\n 'harnesstool.commandIn': { message: '{command} — in {cwd}', description: 'A shell call\\'s subtitle: the command and the folder it ran in.' },\n 'harnesstool.read': { message: 'Read', description: 'The name of a file read call.' },\n 'harnesstool.write': { message: 'Write', description: 'The name of a file write call.' },\n 'harnesstool.delete': { message: 'Delete', description: 'The name of a file delete call.' },\n 'harnesstool.list': { message: 'List', description: 'The name of a directory listing call.' },\n 'harnesstool.recursive': { message: '{path} (recursive)', description: 'A listing call\\'s subtitle when it lists every level.' },\n 'harnesstool.browser': { message: 'Browser', description: 'The name of a browser call.' },\n 'harnesstool.fetch': { message: 'Fetch', description: 'The name of a web fetch call.' },\n 'harnesstool.jsonTransform': { message: 'JSON Transform', description: 'The name of a JSON transform call.' },\n 'harnesstool.jsonValidate': { message: 'JSON Validate', description: 'The name of a JSON validation call.' },\n 'harnesstool.search': { message: 'Search', description: 'The name of a search call.' },\n 'harnesstool.subagent': { message: 'Subagent', description: 'The name of a call that delegates to a subagent.' },\n 'harnesstool.question': { message: 'Question', description: 'The name of a call that asks the reader a question.' },\n 'harnesstool.projectTask': { message: 'Project task', description: 'The name of a project task call.' },\n 'harnesstool.action': { message: 'Action: {action}', description: 'A project task call\\'s subtitle: what it does.' },\n 'harnesstool.todos': { message: 'Todos', description: 'The name of a todo list call.' },\n 'harnesstool.todoCount': { message: '{count, plural, one {# todo} other {# todos}}', description: 'A todo call\\'s subtitle: the number of todos.' },\n 'harnesstool.tool': { message: 'Tool', description: 'The name of a call to an unknown tool without a name.' },\n 'harnesstool.running': { message: 'running…', description: 'A shell call\\'s body while its command runs without output yet.' },\n 'harnesstool.exitCode': { message: 'exit code {code}', description: 'A shell call\\'s body: the exit code its command ended with.' },\n 'harnesstool.field.file': { message: 'file', description: 'A call\\'s detail: the file it worked on.' },\n 'harnesstool.field.deleted': { message: 'deleted', description: 'A patch call\\'s detail: a file it deleted.' },\n 'harnesstool.field.action': { message: 'action', description: 'A browser call\\'s detail: what it did.' },\n 'harnesstool.field.url': { message: 'url', description: 'A call\\'s detail: the address it used.' },\n 'harnesstool.field.selector': { message: 'selector', description: 'A browser call\\'s detail: the element it acted on.' },\n 'harnesstool.screenshot': { message: 'browser screenshot', description: 'The text alternative of a browser call\\'s screenshot.' },\n 'harnesstool.brief': { message: 'Agent Brief', description: 'The heading over what a subagent was asked.' },\n 'harnesstool.result': { message: 'Result', description: 'The heading over what a subagent answered.' },\n 'harnesstool.noResult': { message: 'No result was returned.', description: 'Said when a subagent ended without an answer.' },\n\n // dees-harness-tool-card, dees-harness-tool-fullscreen\n 'toolcard.exit': { message: 'exit {code}', description: 'A terminal call\\'s token: the non-zero exit code its command ended with.' },\n 'toolcard.failed': { message: 'failed', description: 'A call\\'s token when it failed.' },\n 'toolcard.stopped': { message: 'stopped', description: 'A call\\'s token when it was stopped.' },\n 'toolcard.name': { message: '{label}: {status}', description: 'A call\\'s row (its accessible name): the tool\\'s name and its status.' },\n 'toolcard.showEverything': { message: 'Show everything', description: 'The bar under a clipped body that opens it in full.' },\n 'toolcard.linesAdded': { message: '{count, plural, one {# line added} other {# lines added}}', description: 'A write call\\'s diff stat (its accessible name): lines added.' },\n 'toolcard.linesRemoved': { message: '{count, plural, one {# line removed} other {# lines removed}}', description: 'A write call\\'s diff stat (its accessible name): lines removed.' },\n 'toolcard.readOnly': { message: 'read-only', description: 'An MCP tool\\'s badge: it changes nothing.' },\n 'toolcard.destructive': { message: 'destructive', description: 'An MCP tool\\'s badge: it may destroy data.' },\n 'toolcard.openWorld': { message: 'open-world', description: 'An MCP tool\\'s badge: it reaches outside systems.' },\n 'toolcard.idempotent': { message: 'idempotent', description: 'An MCP tool\\'s badge: running it again changes nothing more.' },\n 'toolcard.previewBoth': { message: 'Live preview — the complete output and error arrive with the transcript.', description: 'Said under a call whose output and error were cut to the live budget.' },\n 'toolcard.previewError': { message: 'Live preview — the complete error arrives with the transcript.', description: 'Said under a call whose error was cut to the live budget.' },\n 'toolcard.previewOutput': { message: 'Live preview — the complete output arrives with the transcript.', description: 'Said under a call whose output was cut to the live budget.' },\n 'toolcard.threadLoading': { message: 'Loading the subagent thread…', description: 'Said while a subagent\\'s thread loads.' },\n 'toolcard.threadUnavailable': { message: 'The thread is unavailable. Open the subagent chat to follow it.', description: 'Said when a subagent\\'s thread cannot be shown.' },\n 'toolcard.transcript': { message: 'Subagent transcript', description: 'A subagent\\'s thread (a region name).' },\n 'toolcard.omitted': { message: 'Earlier child messages were omitted.', description: 'Said above a subagent\\'s thread that starts after its first messages.' },\n 'toolcard.waitingTitle': { message: 'Waiting for subagent output', description: 'The heading of a subagent\\'s thread before its first message.' },\n 'toolcard.waitingText': { message: 'The child session is active.', description: 'The text below that.' },\n 'toolcard.showAll': { message: 'Show all', description: 'The button under a cut text that shows all of it.' },\n 'toolcard.image': { message: 'tool output image', description: 'The text alternative of an image a tool returned, when it has none.' },\n 'toolcard.closeInspection': { message: 'Close tool inspection', description: 'The button that closes the full view of a call.' },\n\n // dees-harness-session-sidebar\n 'sidebar.tasks': { message: 'Tasks', description: 'The section of the session\\'s tasks.' },\n 'sidebar.activeCount': { message: '{count, number} active', description: 'The tool section\\'s summary: calls still running.' },\n 'sidebar.pastCount': { message: '{count, number} past', description: 'The tool section\\'s summary: calls that ended.' },\n 'sidebar.activity': { message: 'Tools & Subagents', description: 'The section of the session\\'s tool calls.' },\n 'sidebar.active': { message: 'Active', description: 'The group of tool calls still running.' },\n 'sidebar.history': { message: 'History', description: 'The group of tool calls that ended.' },\n 'sidebar.inspect': { message: 'Inspect {label}', description: 'A tool call\\'s button that opens its full view; {label} is the tool.' },\n 'sidebar.exitCode': { message: 'Exit Code: {code}', description: 'A terminal call\\'s non-zero exit code.' },\n 'sidebar.tokens': { message: 'Tokens', description: 'The section of the session\\'s token counts.' },\n 'sidebar.lifetimeUsed': { message: 'Lifetime used', description: 'Tokens the session used over its whole life.' },\n 'sidebar.reportedTokens': { message: 'Reported tokens', description: 'Tokens in available reports, not necessarily the complete lifetime.' },\n 'sidebar.reportedExact': { message: 'Reported total is exact.', description: 'The provided reported token total is exact, independently of lifetime coverage.' },\n 'sidebar.reportedLowerBound': { message: 'Reported total is a lower bound.', description: 'The reported total is not exact; the count is prefixed with ≥.' },\n 'sidebar.lifetimeComplete': { message: 'Complete lifetime usage.', description: 'The host confirms complete lifetime usage coverage, not a missing count.' },\n 'sidebar.lifetimeIncomplete': { message: 'Lifetime usage incomplete.', description: 'The reports do not cover the complete session lifetime.' },\n 'sidebar.lifetimeUnknown': { message: 'Lifetime completeness unknown.', description: 'A reported count was supplied without confirmed lifetime coverage.' },\n 'sidebar.usageInFlight': { message: 'In flight — totals may increase.', description: 'Work is running, so token totals may not include everything yet.' },\n 'sidebar.usageIdle': { message: 'Idle.', description: 'The host explicitly reports no work in flight; this does not imply complete usage.' },\n 'sidebar.lastObservedInput': { message: 'Last observed input', description: 'A historical input-token count, never current context.' },\n 'sidebar.observedAt': { message: 'Observed at', description: 'The timestamp of the historical input-token observation.' },\n 'sidebar.historicalInput': { message: 'Historical — not current context.', description: 'The last observed input count or timestamp cannot measure current context.' },\n 'sidebar.compactions': { message: 'Compactions', description: 'How often the session\\'s context was compacted.' },\n 'sidebar.beforeCompaction': { message: 'Before latest compaction', description: 'Tokens in the context before its latest compaction.' },\n 'sidebar.contextWindow': { message: 'Context window', description: 'The most tokens the context can hold.' },\n 'sidebar.currentContext': { message: 'Current context', description: 'Tokens in the context now.' },\n 'sidebar.contextUsage': { message: 'Current context window usage', description: 'The bar of how full the context is.' },\n 'sidebar.scratchpad': { message: 'Session Scratchpad', description: 'The section of the session\\'s shared notes.' },\n 'sidebar.scratchpadField': { message: 'Session scratchpad', description: 'The notes field (its name).' },\n 'sidebar.newerRevision': { message: 'A newer revision arrived. Keep this draft on the latest revision or discard it.', description: 'Said when the notes changed elsewhere while the reader edited them.' },\n 'sidebar.discardDraft': { message: 'Discard draft', description: 'The button that drops the reader\\'s notes draft.' },\n 'sidebar.keepDraft': { message: 'Keep draft on latest', description: 'The button that keeps the reader\\'s draft on the newer version.' },\n 'sidebar.revision': { message: 'rev. {revision}', description: 'The notes\\' revision number.' },\n 'sidebar.attachedResources': { message: 'Attached Resources', description: 'The section of the resources attached to the session, such as terminals and browsers.' },\n 'sidebar.noAttachedResources': { message: 'No resources attached.', description: 'Said in that section while nothing is attached to the session.' },\n 'sidebar.openResource': { message: 'Open {title}', description: 'An attached resource\\'s row (its name); {title} is the resource\\'s name.' },\n 'sidebar.intelligence': { message: 'Session Intelligence', description: 'The name of the section that answers questions about the session, while the host names none.' },\n 'sidebar.checking': { message: 'Checking {heading} availability…', description: 'Said while it is checked whether that section can answer; {heading} is its name.' },\n 'sidebar.unavailable': { message: '{heading} is unavailable.', description: 'Said when that section cannot answer.' },\n 'sidebar.askHint': { message: 'Ask about this session without interrupting its main work.', description: 'Said in that section before the first question.' },\n 'sidebar.askName': { message: 'Ask {heading}', description: 'The question field (its name).' },\n 'sidebar.askPlaceholder': { message: 'Ask a parallel question…', description: 'The question field (its placeholder).' },\n 'sidebar.askShortcut': { message: 'Parallel session · Ctrl/⌘ + Enter', description: 'The hint beside the ask button.' },\n 'sidebar.ask': { message: 'Ask', description: 'The button that asks the question.' },\n 'sidebar.thinking': { message: 'Thinking in parallel…', description: 'Said while an answer is worked out.' },\n 'sidebar.failed': { message: '{heading} failed.', description: 'Said when an answer failed for a reason nobody named.' },\n\n // dees-harness-chat\n 'chat.sessionDetails': { message: 'Session details', description: 'The button that shows the session\\'s details, and the panel it opens.' },\n 'chat.closeSessionDetails': { message: 'Close session details', description: 'The button that closes that panel.' },\n 'chat.toggleSessionDetails': { message: 'Toggle session details', description: 'The toolbar\\'s button that shows or hides that panel.' },\n 'chat.replyingTo': { message: 'Replying to', description: 'The label before the name of the conversation the composer writes to.' },\n 'chat.replyingToName': { message: 'Replying to {name}', description: 'The composer\\'s description: the conversation it writes to.' },\n 'chat.agent': { message: 'Agent', description: 'The chat\\'s heading while its host gives it none.' },\n\n // dees-harness-composer\n 'composer.message': { message: 'Message', description: 'The prompt field (its name).' },\n 'composer.placeholder': { message: 'Message the agent…', description: 'The prompt field\\'s placeholder while attachments are off.' },\n 'composer.placeholderAttach': { message: 'Message the agent — drop or paste files to attach…', description: 'The prompt field\\'s placeholder while attachments are on.' },\n 'composer.attach': { message: 'Attach files', description: 'The button that picks files to attach.' },\n 'composer.moreOptions': { message: 'More options', description: 'The button beside Send that opens the host\\'s menu of commands (its name and tooltip).' },\n 'composer.mode': { message: 'Agent mode', description: 'The toggle between the agent\\'s modes.' },\n 'composer.chooseAccount': { message: 'Choose an account', description: 'The account select while no account the host offers is chosen.' },\n 'composer.chooseModel': { message: 'Choose a model', description: 'The model select while no model is chosen.' },\n 'composer.chooseEffort': { message: 'Choose an effort', description: 'The reasoning effort select while no effort is chosen.' },\n 'composer.queued': { message: '{count, number} queued', description: 'The number of messages waiting to be sent.' },\n 'composer.stopRun': { message: 'Stop current run', description: 'The stop button\\'s name and tooltip.' },\n 'composer.stopUnavailable': { message: 'Stopping is unavailable.', description: 'Why the stop button is disabled, while the host names no reason.' },\n 'composer.stopRunUnavailable': { message: 'Stop current run. {reason}', description: 'The disabled stop button\\'s name; {reason} is why it is disabled.' },\n 'composer.stop': { message: 'Stop', description: 'The stop button.' },\n 'composer.steer': { message: 'Steer', description: 'The main button while a turn runs and the host can steer: it hands the message to the running turn.' },\n 'composer.queue': { message: 'Queue', description: 'The button that queues the message for after the running turn.' },\n 'composer.queueForAfterTurn': { message: 'Queue for after this turn', description: 'That button\\'s name and tooltip.' },\n 'composer.hintSteer': { message: 'Read at the next step', description: 'Said beside the main button while it steers: when the running turn reads the message.' },\n 'composer.hintNextTurn': { message: 'Read after this turn', description: 'Said beside the main button while the harness reads messages only between turns.' },\n 'composer.hintQueue': { message: 'Sent after this turn', description: 'Said beside the main button while it queues the message.' },\n 'composer.send': { message: 'Send', description: 'The send button.' },\n 'composer.run': { message: 'Run', description: 'The main button while the prompt names one of the host\\'s slash commands: it runs the command.' },\n 'composer.commands': { message: 'Commands', description: 'The menu of slash commands that opens while the prompt starts with a slash (its name).' },\n 'composer.commandOptions': { message: 'Options for {command}', description: 'The menu of values for a slash command\\'s argument (its name); {command} is the command, as /model.' },\n 'composer.commandUnavailable': { message: 'Unavailable', description: 'Said on a slash command that cannot run now, while the host names no reason.' },\n 'composer.removeAttachment': { message: 'Remove attachment', description: 'An attachment\\'s remove button.' },\n 'composer.tooMany': { message: 'A maximum of {count, number} attachments is allowed.', description: 'Said when more files are attached than allowed.' },\n 'composer.tooLarge': { message: '{name} is too large. Max per attachment is {size}.', description: 'Said when a file is larger than allowed; {size} is the limit.' },\n 'composer.totalLimit': { message: 'Attachments exceed the {size} total limit.', description: 'Said when the attachments together are larger than allowed.' },\n 'composer.typeRefused': { message: '{name} cannot be attached here: its file type is not accepted.', description: 'Said when a file is of a type the host does not take; {name} is the file name.' },\n\n // dees-harness-message\n 'message.role': { message: '{role, select, user {user} assistant {assistant} system {system} tool {tool} other {message}}', description: 'A message\\'s role label.' },\n 'message.truncated': { message: 'truncated', description: 'Said on an attachment that was cut.' },\n 'message.pendingSteering': { message: 'Steering · read at the next step', description: 'Said on a message handed to the running turn that it has not read yet.' },\n 'message.pendingQueued': { message: 'Queued for the next turn', description: 'Said on a message that waits for the next turn.' },\n 'message.pendingUncertain': { message: 'Delivery unconfirmed', description: 'Said when the host cannot confirm whether an attempted prompt reached the harness.' },\n 'message.pendingHeld': { message: 'Held · not sent', description: 'Said on a message that was not sent because the run was stopped.' },\n 'message.resend': { message: 'Resend', description: 'The button that sends a held message.' },\n 'message.discard': { message: 'Discard', description: 'The button that drops a held message.' },\n 'message.pendingOptions': { message: 'Pending message options', description: 'Opens the edit and retract menu on a pending message.' },\n 'message.editPending': { message: 'Edit pending message', description: 'Withdraws a pending message for editing in the composer.' },\n 'message.retractPending': { message: 'Retract pending message', description: 'Withdraws a pending message without putting it in the composer.' },\n 'message.openImage': { message: 'Open image: {name}', description: 'Opens a chat image attachment in a dialog.' },\n 'message.loadingImage': { message: 'Loading image…', description: 'Shown while an image preview is fetched.' },\n 'message.imageUnavailable': { message: 'This image could not be opened.', description: 'Shown when the attachment preview cannot be loaded.' },\n\n // dees-harness-content-blocks\n 'contentblocks.image': { message: 'tool result image', description: 'The text alternative of an image a tool returned.' },\n 'contentblocks.binary': { message: 'binary resource', description: 'A downloadable resource\\'s kind while it names no media type.' },\n\n // dees-harness-conversation-picker\n 'picker.heading': { message: 'Attach to…', description: 'The conversation picker\\'s heading and the name of its search field, while the host names none.' },\n 'picker.search': { message: 'Search conversations', description: 'The picker\\'s search field (its placeholder).' },\n 'picker.empty': { message: 'No conversation matches.', description: 'Said when nothing matches the search, while the host names nothing.' },\n\n // dees-harness-message-list\n 'messagelist.emptyTitle': { message: 'No messages yet', description: 'The empty transcript\\'s heading, while the host names none.' },\n 'messagelist.emptyText': { message: 'Start a conversation to see it here.', description: 'The empty transcript\\'s text, while the host names none.' },\n 'messagelist.starterPrompts': { message: 'Prompts to start with', description: 'The ready prompts the empty transcript offers (a group name); choosing one puts it into the composer.' },\n 'messagelist.jump': { message: 'Jump to latest', description: 'The chip that scrolls to the newest message.' },\n 'messagelist.transcript': { message: 'Conversation transcript', description: 'The transcript (a log name).' },\n 'messagelist.queue': { message: 'Pending messages', description: 'The messages the session has not taken in yet (a region name).' },\n 'messagelist.queued': { message: 'Pending', description: 'The divider over the messages the session has not taken in yet.' },\n\n // dees-harness-permission-card\n 'permission.requested': { message: 'Permission requested', description: 'A permission request\\'s title while the producer gives none.' },\n 'permission.answered': { message: 'Answered: {response}', description: 'Said on an answered permission request; {response} is the answer.' },\n 'permission.answeredRemembered': { message: 'Answered: {response} (remembered)', description: 'Said on an answered permission request that is remembered for the session.' },\n 'permission.response': { message: '{response, select, once {once} always {always} reject {reject} other {answered}}', description: 'The answer to a permission request, as the answered note names it.' },\n 'permission.once': { message: 'Allow Once', description: 'The button that allows the request this once.' },\n 'permission.always': { message: 'Always Allow', description: 'The button that always allows such requests.' },\n 'permission.reject': { message: 'Reject', description: 'The button that refuses the request.' },\n 'permission.remember': { message: 'remember for this session', description: 'The checkbox that remembers the answer for the session.' },\n 'permission.items': { message: 'What it acts on', description: 'The list of records a request acts on (a list name).' },\n 'permission.moreItems': { message: '{count, plural, one {Show # more} other {Show # more}}', description: 'The button under a long list of records that shows the rest; {count} is how many are hidden.' },\n 'permission.fewerItems': { message: 'Show fewer', description: 'The button that shortens the list of records again.' },\n 'permission.change': { message: '{label}: from {before} to {after}', description: 'A changed field, as a screen reader says it; {before} and {after} are its values.' },\n 'permission.changeNew': { message: '{label}: {after}', description: 'A field set afresh, as a screen reader says it; {after} is its value.' },\n\n // dees-harness-question-card\n 'question.answered': { message: 'Answered:', description: 'The label before the answer to a question.' },\n 'question.custom': { message: 'Answer in your own words…', description: 'The field for an answer of the reader\\'s own.' },\n 'question.send': { message: 'Send Answer', description: 'The button that sends the answer.' },\n 'question.confirm': { message: 'Confirm', description: 'The button that confirms the chosen answers.' },\n 'question.warning': { message: 'Warning:', description: 'Said to assistive technology before a question or proposal that asks for care (orange, a warning sign).' },\n 'question.danger': { message: 'Danger:', description: 'Said to assistive technology before a question or proposal that deletes, sends or cannot be taken back (red, a stop sign).' },\n 'question.items': { message: 'Proposed changes', description: 'The list of changes a proposal makes (a list name).' },\n 'question.proposalConfirm': { message: 'Confirm', description: 'The button that confirms a proposal: the agent then makes its changes.' },\n 'question.proposalDecline': { message: 'Decline', description: 'The button that declines a proposal: nothing is changed.' },\n 'question.confirmed': { message: 'Confirmed', description: 'Said on a proposal the reader confirmed.' },\n 'question.declined': { message: 'Declined', description: 'Said on a proposal the reader declined.' },\n 'question.expired': { message: 'Expired', description: 'Said on a proposal that can no longer be confirmed or declined.' },\n 'question.failed': { message: 'Failed', description: 'Said on a confirmed proposal whose changes could not be made.' },\n 'question.includeItem': { message: 'Include: {summary}', description: 'The checkbox that keeps a change in a proposal (checked) or leaves it out; {summary} is what the change does.' },\n 'question.leftOut': { message: 'Left out', description: 'Said on a change the reader left out of a proposal: it is not made.' },\n 'question.credentialHidden': { message: 'hidden', description: 'Said to assistive technology in place of a secret that is not shown.' },\n 'question.credentialShowShort': { message: 'Show', description: 'The button that shows a secret a change issued, such as an API key.' },\n 'question.credentialHideShort': { message: 'Hide', description: 'The button that hides that secret again.' },\n 'question.credentialShow': { message: 'Show {label}', description: 'The show button\\'s accessible name; {label} is what the secret is (\"API key\"). Keep the button\\'s word in it.' },\n 'question.credentialHide': { message: 'Hide {label}', description: 'The hide button\\'s accessible name. Keep the button\\'s word in it.' },\n 'question.credentialCopy': { message: 'Copy {label}', description: 'The copy button\\'s accessible name. Keep the button\\'s word (\"Copy\") in it.' },\n 'question.credentialCopied': { message: '{label} copied', description: 'Said once the secret is on the clipboard.' },\n 'question.credentialCopyFailed': { message: 'Could not copy. Check clipboard access and try again.', description: 'Said when the clipboard refused the secret.' },\n 'question.credentialNote': { message: 'Only you can see this. The agent is not shown it.', description: 'Under a secret a change issued: it stays on the reader\\'s screen and does not go back to the agent.' },\n 'question.personFieldsNote': { message: 'Sent with your confirmation only. The agent is not shown it.', description: 'Under the fields a proposal asks the reader to fill in, such as a password: what is entered goes to the app with the confirmation, never to the agent.' },\n 'question.personFieldsMissing': { message: 'Fill in the required fields to confirm.', description: 'Said while a required field of a proposal is empty; its Confirm button waits for it.' },\n 'question.personTooLong': { message: 'Use {max, plural, one {# character} other {# characters}} or fewer; this has {count, number}.', description: 'Said on a field whose value is too long to confirm; {max} is the most it takes, {count} how many it has.' },\n 'question.rejected': { message: 'Not carried out. Check the marked fields and confirm again.', description: 'Said when the app refused a confirmation because of values entered, and named no reason of its own.' },\n 'message.usage': { message: '{input, number} in · {output, number} out · {total, number} total tokens', description: 'A reply\\'s token usage: tokens read, written and in total.' },\n\n // dees-harness-todos, dees-harness-reasoning, dees-harness-status, dees-harness-thread-cut, dees-harness-usage\n 'todos.empty': { message: 'No tasks yet.', description: 'Said by an empty task list.' },\n 'reasoning.thinking': { message: 'Thinking', description: 'The reasoning\\'s label while the model reasons.' },\n 'reasoning.thought': { message: 'Thought', description: 'The reasoning\\'s label once the model has reasoned.' },\n 'reasoning.waiting': { message: 'Waiting for reasoning…', description: 'Said in the open reasoning before its first text.' },\n 'reasoning.none': { message: 'No reasoning emitted.', description: 'Said in the open reasoning when the model gave none.' },\n 'status.busy': { message: 'Working…', description: 'The session\\'s status while it works.' },\n 'status.error': { message: 'Something went wrong.', description: 'The session\\'s status after an error nobody named.' },\n 'status.idle': { message: 'Idle', description: 'The session\\'s status while it waits.' },\n 'threadcut.show': { message: '{count, plural, one {Show # hidden message} other {Show # hidden messages}}', description: 'The cut in a thread (its accessible name): it shows the messages it stands for.' },\n 'usage.input': { message: 'input: {count, number}', description: 'The usage chip\\'s tooltip line: tokens read.' },\n 'usage.output': { message: 'output: {count, number}', description: 'The usage chip\\'s tooltip line: tokens written.' },\n 'usage.total': { message: 'total: {count, number}', description: 'The usage chip\\'s tooltip line: tokens in total.' },\n 'usage.cacheRead': { message: 'cache read: {count, number}', description: 'The usage chip\\'s tooltip line: tokens read from the cache.' },\n 'usage.cacheWrite': { message: 'cache write: {count, number}', description: 'The usage chip\\'s tooltip line: tokens written to the cache.' },\n 'usage.compact': { message: '<total>{count}</total> tokens', description: 'The compact usage chip; {count} is the formatted total, keep the tag.' },\n 'usage.in': { message: '{count} in', description: 'The usage chip: tokens read; {count} is formatted.' },\n 'usage.out': { message: '{count} out', description: 'The usage chip: tokens written; {count} is formatted.' },\n\n // dees-harness-session-list\n 'sessionlist.empty': { message: 'No conversations yet.', description: 'Said by an empty list, while the host names nothing.' },\n 'sessionlist.dropHere': { message: 'Drop here', description: 'The gap where a dragged row will land.' },\n 'sessionlist.searchAll': { message: 'Search conversations and resources', description: 'The search field while the list shows resources too.' },\n 'sessionlist.searchResources': { message: 'Search resources', description: 'The search field while the list shows resources only.' },\n 'sessionlist.newGroup': { message: 'New group', description: 'The button that creates a group.' },\n 'sessionlist.loading': { message: 'Loading conversations…', description: 'Said while the list loads.' },\n 'sessionlist.noMatchAll': { message: 'No conversations or resources match this search.', description: 'Said when nothing matches the search.' },\n 'sessionlist.noMatchResources': { message: 'No resources match this search.', description: 'Said when no resource matches the search and there are no conversations.' },\n 'sessionlist.noMatch': { message: 'No conversations match this search.', description: 'Said when no conversation matches the search.' },\n 'sessionlist.ungrouped': { message: 'Ungrouped', description: 'The section of rows in no group.' },\n 'sessionlist.attention': { message: '{count, number} need attention', description: 'A group\\'s badge (its name): rows that need attention.' },\n 'sessionlist.dragHint': { message: 'Drag to reorder; use arrow, Home, or End keys for keyboard reordering', description: 'The drag handle\\'s tooltip.' },\n 'sessionlist.reorder': { message: 'Reorder {title}', description: 'The drag handle (its name).' },\n 'sessionlist.actionsFor': { message: 'Actions for {title}', description: 'A row\\'s actions button (its name).' },\n 'sessionlist.resourceActions': { message: 'Resource actions', description: 'A resource row\\'s actions button (its tooltip).' },\n 'sessionlist.closeResource': { message: 'Close {title}', description: 'A closeable resource row\\'s close button (its name); {title} is the resource\\'s title.' },\n 'sessionlist.collapse': { message: 'Collapse conversation card', description: 'The button that collapses a conversation\\'s details.' },\n 'sessionlist.expand': { message: 'Expand conversation card', description: 'The button that expands a conversation\\'s details.' },\n 'sessionlist.messages': { message: '{count, plural, one {# message} other {# messages}}', description: 'A conversation\\'s number of messages.' },\n 'sessionlist.attachedTo': { message: 'Attached to {titles}', description: 'A resource\\'s attachments (tooltip); {titles} lists the conversations.' },\n 'sessionlist.attachedToPrefix': { message: 'Attached to', description: 'Read before a resource\\'s attached conversations.' },\n 'sessionlist.state.working': { message: 'Working', description: 'A conversation\\'s state.' },\n 'sessionlist.state.external': { message: 'Running elsewhere', description: 'A conversation\\'s state: it runs in another place.' },\n 'sessionlist.state.finished': { message: 'Finished', description: 'A conversation\\'s state.' },\n 'sessionlist.state.attention': { message: 'Needs attention', description: 'A conversation\\'s state.' },\n 'sessionlist.state.error': { message: 'Error', description: 'A conversation\\'s state.' },\n 'sessionlist.state.idle': { message: 'Idle', description: 'A conversation\\'s state.' },\n 'sessionlist.movedTo': { message: 'Moved {title} to {group}.', description: 'Announced after a keyboard move into another group.' },\n 'sessionlist.movedBefore': { message: 'Moved {title} before {before}.', description: 'Announced after a keyboard move before another row.' },\n 'sessionlist.movedToEnd': { message: 'Moved {title} to the end.', description: 'Announced after a keyboard move to the end.' },\n 'sessionlist.unattached': { message: 'unattached', description: 'What the attachments are when there are none.' },\n 'sessionlist.notApplied': { message: 'Association request for {resource} was not applied; controlled attachments are {targets}.', description: 'Announced when the host did not apply an attachment change.' },\n 'sessionlist.nowAttached': { message: '{resource} is now attached to {to}.', description: 'Announced when a resource was attached.' },\n 'sessionlist.nowDetached': { message: '{resource} is now detached from {from}.', description: 'Announced when a resource was detached.' },\n 'sessionlist.nowMoved': { message: '{resource} is now moved from {from} to {to}.', description: 'Announced when a resource was moved.' },\n 'sessionlist.attachPhase': { message: '{phase, select, completed {Attach completed for {resource} to {to}.} requested {Attach requested for {resource} to {to}.} other {Attach requested for {resource} to {to}.}}', description: 'Announced when attaching a resource was requested or completed.' },\n 'sessionlist.attachAdditionalPhase': { message: '{phase, select, completed {Additional attach completed for {resource} to {to}.} requested {Additional attach requested for {resource} to {to}.} other {Additional attach requested for {resource} to {to}.}}', description: 'Announced when attaching a resource to one more conversation was requested or completed.' },\n 'sessionlist.detachPhase': { message: '{phase, select, completed {Detach completed for {resource} from {from}.} requested {Detach requested for {resource} from {from}.} other {Detach requested for {resource} from {from}.}}', description: 'Announced when detaching a resource was requested or completed.' },\n 'sessionlist.movePhase': { message: '{phase, select, completed {Move completed for {resource} from {from} to {to}.} requested {Move requested for {resource} from {from} to {to}.} other {Move requested for {resource} from {from} to {to}.}}', description: 'Announced when moving a resource was requested or completed.' },\n 'workspace.confirmClose': { message: '{name} has unsaved changes. Close anyway?', description: 'Asked before an open file with unsaved changes is closed.' },\n },\n});\n\ndcMessages.addTranslation('de', () => import('./de.js'));\n\n/** The messages of `dcMessages`, as the compiler reads them. */\nexport type TDcMessages = typeof dcMessages extends plugins.smarti18n.Catalog<infer M> ? M : never;\n\n/** What `dcLocalize(this)` gives a component. */\nexport type TDcLocalizer = ILocalizer<TDcMessages>;\n\n/**\n * The words alone, for a helper outside an element that only says words:\n * a component passes its `this.t`, which is one.\n */\nexport type TDcTranslator = plugins.smarti18n.ITranslator<TDcMessages>;\n\n/**\n * The catalog's English source words, for a public helper called without a\n * component's words: it keeps saying what it said before the catalog.\n */\nexport const dcSourceWords: TDcTranslator = dcSourceI18n.bind(dcMessages);\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAEA,QAAI,SAAS,OAAO,UAAU;AAC9B,QAAI,QAAQ,OAAO,UAAU;AAC7B,QAAI,iBAAiB,OAAO;AAC5B,QAAI,OAAO,OAAO;AAElB,QAAI,UAAU,gCAASA,SAAQ,KAAK;A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AS,6FAA6F,aAAa,8DAA8D;AAAA,IAC7M,2BAA2B,EAAE,SAAS,uCAAuC,aAAa,0CAA0C;AAAA,IACpI,2BAA2B,EAAE,SAAS,2CAA2C,aAAa,0CAA0C;AAAA,IACxI,wBAAwB,EAAE,SAAS,gDAAgD,aAAa,uCAAuC;AAAA,IACvI,2BAA2B,EAAE,SAAS,+KAA+K,aAAa,kEAAkE;AAAA,IACpS,qCAAqC,EAAE,SAAS,gNAAgN,aAAa,2FAA2F;AAAA,IACxW,2BAA2B,EAAE,SAAS,2LAA2L,aAAa,kEAAkE;AAAA,IAChT,yBAAyB,EAAE,SAAS,6MAA6M,aAAa,+DAA+D;AAAA,IAC7T,0BAA0B,EAAE,SAAS,6CAA6C,aAAa,4DAA4D;AAAA,EAC7J;AACF,CAAC;AAED,WAAW,eAAe,MAAM,MAAM,OAAO,kBAAS,CAAC;AAkBhD,IAAM,gBAA+B,aAAa,KAAK,UAAU;","names":["isArray","isPlainObject","setProperty","getProperty","extend","code","text","index","close","value","text","value","push","node","override","text","set","node","text","dist_ts_exports","stringify","stringify","node","node","path","handle","node","root","node","value","res","res","node","value","value","map","schema","node","schema","path","value","node","indent","text","indent","i","end","isBlock","value","indent","code","blockQuote","node","value","indent","flow","value","map","map","value","node","value","schema","flow","stringify","indent","comment","str","schema","map","value","node","map","schema","schema","value","seq","seq","schema","value","value","value","value","value","node","value","node","intIdentify","value","schema","value","seq","schema","pairs","value","map","value","schema","pairs","omap","seq","value","floatNaN","value","floatExp","node","float","intIdentify","value","intResolve","n","intStringify","node","intOct","int","intHex","schema","value","set","map","res","node","value","schema","intOct","int","intHex","floatNaN","floatExp","float","schema","tags","merge","schema","value","path","node","flow","res","code","flow","indent","search","composeNode","composeEmptyNode","map","value","composeNode","composeEmptyNode","seq","value","node","composeNode","composeEmptyNode","isMap","value","map","CN","node","content","value","end","indent","value","code","ok","value","schema","tag","node","value","code","SCALAR","isCollection","isScalar","stringify","visit","code","value","indent","stringify","value","BREAK","SKIP","REMOVE","visit","path","index","SCALAR","isCollection","isScalar","indent","i","ch","SCALAR","list","map","start","seq","indent","stringify","value","indent","value","index","value","value","point","index","path","extname","index","code","value","path","index","value","index","field","basename","dirname","assertPath","extname","path","value","index","extend","value","file","tree","compiler","parameters","node","isUint8Array","value","index","value","characterReference","list","all","index","extension","code","value","list","value","code","value","replace","value","code","value","index","code","replace","hasOwnProperty","encode","compile","index","handle","value","lineEnding","buffer","previous","context","ok","code","previous","code","document","code","point","index","ok","code","constructs","index","index","text","ok","attentionMarkers","previous","code","close","point","ok","code","ok","code","ok","code","ok","code","ok","code","value","ok","code","effects","nok","start","ok","code","furtherStart","index","code","ok","between","index","list","index","previous","start","content","ok","previous","code","ok","code","ok","code","ok","code","ok","code","ok","code","titleBefore","ok","code","content","text","ok","code","index","ok","code","value","ok","index","code","value","index","close","text","ok","code","ok","code","ok","code","ok","code","ok","code","ok","code","index","content","text","definition","heading","ok","code","paragraph","content","code","string","constructs","text","code","list","index","document","flow","string","text","point","exit","value","code","constructs","map","all","list","ok","from","index","parse","constructs","create","document","string","value","code","value","parse","value","head","own","value","parse","opener","link","heading","blockQuote","codeText","definition","emphasis","hardBreak","html","image","listItem","list","paragraph","strong","thematicBreak","compile","exit","index","handler","point","create","node","close","data","text","string","extension","value","index","string","node","index","ok","all","value","SKIP","is","node","index","value","visit","list","pairs","node","index","handler","replace","position","value","node","domain","path","previous","trail","code","node","value","exit","index","node","exit","value","value","row","sizes","columnIndex","code","own","one","value","own","configure","extension","index","list","map","node","exit","value","map","list","index","index","value","index","node","node","exit","value","map","definition","node","exit","value","code","node","exit","between","close","visit","node","index","node","visit","node","exit","subexit","value","node","node","exit","value","node","exit","value","node","value","index","position","node","node","exit","value","node","exit","value","text","list","node","exit","index","value","node","exit","value","map","index","node","exit","value","node","node","exit","between","close","text","node","thematicBreak","value","definition","list","text","thematicBreak","join","node","index","handle","value","index","value","map","one","value","index","position","value","join","configure","exit","value","node","exit","value","node","index","node","index","value","text","code","ok","trail","index","tokenizeIndent","ok","index","code","string","own","emptyOptions","value","index","index","text","insideSpan","ok","previous","code","value","replace","index","element","index","ok","code","index","map","value","ok","code","close","emptyOptions","formatter","own","index","flow","index","matter","code","ok","position","bufferIndex","schema","exit","index","matter","node","unsafe","fence","close","handle","pick","schema","emptyOptions","dist_ts_exports","text","dist_ts_exports","map","value","map","dist_ts_exports"]}
|